/* Generated from admin/index.html. Source of truth: index.html prototype. */

/* ========================================
     F-ROAD ADMIN DASHBOARD
     하늘숲엔지니어링 — 관리자 페이지
     ======================================== */
  :root {
    --green-900: #0f1d14;
    --green-800: #1a2a20;
    --green-700: #1f4128;
    --green-600: #2d5a3d;
    --green-500: #4a7c59;
    --green-100: #f0f7f2;
    --green-50:  #f5f7f4;
    --line:      #e5ebe7;
    --line-soft: #f0f3f1;
    --text:      #1f2d1f;
    --text-mute: #6b7d6f;
    --text-soft: #94a39a;

    --c-genuine:  #2d7a4d;   /* 정품 */
    --c-edu:      #3498db;   /* 교육 */
    --c-demo:     #e67e22;   /* 데모 */
    --c-update:   #f1c40f;   /* 업데이트 */
    --c-extra:    #9b59b6;   /* 추가구매 */

    --c-active:   #27ae60;
    --c-warn:     #e74c3c;
    --c-pending:  #f39c12;

    --shadow-sm: 0 1px 2px rgba(15,29,20,0.04);
    --shadow:    0 4px 12px rgba(15,29,20,0.06);
    --shadow-lg: 0 12px 28px rgba(15,29,20,0.10);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
    background: var(--green-50);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'tnum';
  }
  .mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }

  /* ========== ADMIN LOGIN ========== */
  .admin-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0f1d14;
  }
  .admin-login-overlay.active { display: flex; }
  .admin-login-panel {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.26);
    padding: 28px;
  }
  .admin-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
  .admin-login-brand .logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a7c59, #2d5a3d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .admin-login-brand strong {
    display: block;
    color: var(--green-700);
    font-size: 18px;
    line-height: 1.2;
  }
  .admin-login-brand span {
    display: block;
    color: var(--text-mute);
    font-size: 12.5px;
    margin-top: 3px;
  }
  .admin-login-guide {
    margin: -6px 0 18px;
    padding: 10px 12px;
    border-radius: 7px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 12.5px;
    line-height: 1.5;
  }
  .admin-login-field { margin-bottom: 14px; }
  .admin-login-field label {
    display: block;
    color: var(--green-600);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .admin-login-field input {
    width: 100%;
    height: 42px;
    border: 1.5px solid var(--line);
    border-radius: 7px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
  }
  .admin-login-field input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(74,124,89,0.12);
  }
  .admin-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-mute);
    font-size: 12.5px;
    margin: 2px 0 12px;
  }
  .admin-login-error {
    min-height: 18px;
    color: var(--c-warn);
    font-size: 12.5px;
    margin-bottom: 12px;
  }
  .admin-login-submit {
    width: 100%;
    height: 42px;
    justify-content: center;
    font-size: 13.5px;
  }
  .hint {
    display: block;
    margin-top: 7px;
    color: var(--text-mute);
    font-size: 12px;
    font-weight: 500;
  }

  /* ========== TOP NAV ========== */
  .topnav {
    background: var(--green-800);
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  }
  .topnav .brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 700; font-size: 16px; letter-spacing: 0.2px;
  }
  .topnav .brand .logo {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a7c59, #2d5a3d);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
  }
  .topnav .brand .name-ko { color: #cfe3d7; font-weight: 500; font-size: 13px; margin-left: 2px;}
  .topnav .brand .badge {
    background: #c0392b; color: white;
    font-size: 10px; padding: 3px 7px;
    border-radius: 3px; letter-spacing: 0.5px; font-weight: 600;
  }
  .topnav .user-info {
    display: flex; align-items: center; gap: 14px; font-size: 13px;
  }
  .topnav .user-info .divider { color: #6b7d6f; }
  .topnav .topnav-link-btn,
  .topnav .logout-btn {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px; font-weight: 500;
    cursor: pointer; font-family: inherit;
    transition: all 0.15s;
  }
  .topnav .topnav-link-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .topnav .topnav-link-btn:hover,
  .topnav .logout-btn:hover { background: rgba(255,255,255,0.16); }

  /* ========== LAYOUT ========== */
  .layout {
    display: grid;
    grid-template-columns: 232px 1fr;
    min-height: calc(100vh - 56px);
  }

  /* ========== SIDEBAR ========== */
  .sidebar {
    background: white;
    border-right: 1px solid var(--line);
    padding: 24px 0 40px;
    position: sticky; top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .sidebar .menu-title {
    font-size: 11px; font-weight: 700;
    color: var(--text-soft);
    padding: 0 24px 8px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }
  .sidebar .menu-section { margin-bottom: 18px; }
  .sidebar a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px; font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
  }
  .sidebar a .icon { font-size: 15px; width: 20px; text-align: center; }
  .sidebar a:hover { background: var(--green-100); color: var(--green-600); }
  .sidebar a.active {
    background: var(--green-100);
    color: var(--green-600);
    border-left-color: var(--green-600);
    font-weight: 700;
  }
  .sidebar .footer-info {
    margin: 24px 24px 0;
    padding: 12px;
    background: var(--green-50);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-mute);
    line-height: 1.5;
  }
  .sidebar .footer-info strong { color: var(--green-600); display: block; margin-bottom: 3px; }

  /* ========== MAIN ========== */
  .main { padding: 28px 32px 60px; max-width: 1500px; }
  .page { display: none; }
  .page.active { display: block; animation: fadeIn 0.25s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  .page-title {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
  .page-title h1 {
    font-size: 23px; font-weight: 800; color: var(--text);
    letter-spacing: -0.3px;
    display: flex; align-items: center; gap: 10px;
  }
  .page-title h1 .accent { color: var(--green-600); }
  .page-title p { font-size: 13px; color: var(--text-mute); margin-top: 4px; }
  .page-title .actions { display: flex; gap: 8px; }

  /* ========== BUTTONS ========== */
  .btn {
    padding: 9px 16px;
    border-radius: 7px;
    border: none;
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
    line-height: 1;
  }
  .btn-primary { background: var(--green-600); color: white; box-shadow: var(--shadow-sm); }
  .btn-primary:hover { background: var(--green-700); }
  .btn-outline { background: white; color: var(--green-600); border: 1.5px solid var(--line); }
  .btn-outline:hover { border-color: var(--green-600); }
  .btn-danger { background: var(--c-warn); color: white; }
  .btn-success { background: var(--c-active); color: white; }
  .btn-kakao {
    background: #FEE500; color: #191919;
    font-weight: 700;
  }
  .btn-kakao:hover { background: #FFD800; }
  .btn-sm { padding: 6px 11px; font-size: 11.5px; border-radius: 5px; }

  /* ========== DASHBOARD ========== */
  .dashboard-hero {
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 18px;
    margin-bottom: 22px;
  }
  .hero-total {
    background: linear-gradient(135deg, #1f4128 0%, #2d5a3d 60%, #3a7048 100%);
    color: white;
    border-radius: 14px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .hero-total::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
    border-radius: 50%;
  }
  .hero-total .label {
    font-size: 12px; font-weight: 600;
    color: #cfe3d7;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .hero-total .value {
    font-size: 56px; font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 10px;
  }
  .hero-total .value .unit { font-size: 22px; font-weight: 500; color: #cfe3d7; margin-left: 6px; }
  .hero-total .delta {
    font-size: 13px;
    color: #d4f0e0;
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.10);
    padding: 5px 11px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
  }
  .hero-total .meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 12px; color: #cfe3d7;
    display: flex; justify-content: space-between;
  }
  .hero-total .meta strong { color: white; font-weight: 600; }

  /* 도넛 차트 영역 */
  .hero-chart {
    background: white;
    border-radius: 14px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: center;
  }
  .hero-chart .chart-title {
    grid-column: 1 / -1;
    font-size: 14px; font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .hero-chart .chart-title small {
    color: var(--text-mute); font-weight: 500; font-size: 11.5px;
  }
  .donut-wrap {
    position: relative;
    width: 200px; height: 200px;
  }
  .donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .donut-wrap .center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    pointer-events: none;
  }
  .donut-wrap .center .num { font-size: 30px; font-weight: 800; color: var(--text); letter-spacing: -1px; }
  .donut-wrap .center .lbl { font-size: 11px; color: var(--text-mute); margin-top: 2px; letter-spacing: 0.5px; }
  .donut-track { stroke: var(--line); stroke-width: 18; fill: none; }
  .donut-seg { stroke-width: 18; fill: none; transition: stroke-width 0.2s; }
  .donut-seg:hover { stroke-width: 22; }

  .legend { display: flex; flex-direction: column; gap: 9px; }
  .legend-item {
    display: grid;
    grid-template-columns: 14px 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed var(--line-soft);
  }
  .legend-item:last-child { border-bottom: none; }
  .legend-dot {
    width: 12px; height: 12px;
    border-radius: 3px;
  }
  .legend-name { color: var(--text); font-weight: 500; }
  .legend-num { font-weight: 700; color: var(--text); }
  .legend-pct { color: var(--text-mute); font-size: 11.5px; min-width: 44px; text-align: right; }

  /* 카테고리 카드 */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 26px;
  }
  .stat-card {
    background: white;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    transition: all 0.15s;
    cursor: pointer;
  }
  .stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--bar-color, var(--green-600));
  }
  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--bar-color, var(--green-600));
  }
  .stat-card .label {
    font-size: 12px; color: var(--text-mute);
    margin-bottom: 8px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
  }
  .stat-card .label .swatch {
    width: 9px; height: 9px;
    background: var(--bar-color);
    border-radius: 2px;
  }
  .stat-card .value {
    font-size: 28px; font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1.1;
  }
  .stat-card .value .unit {
    font-size: 13px; color: var(--text-mute);
    font-weight: 500; margin-left: 3px;
  }
  .stat-card .change {
    font-size: 11.5px;
    margin-top: 6px;
    color: var(--text-mute);
    font-weight: 500;
  }
  .stat-card .change.up { color: var(--c-active); }
  .stat-card .change.down { color: var(--c-warn); }

  .card-genuine { --bar-color: var(--c-genuine); }
  .card-edu     { --bar-color: var(--c-edu); }
  .card-demo    { --bar-color: var(--c-demo); }
  .card-update  { --bar-color: var(--c-update); }
  .card-extra   { --bar-color: var(--c-extra); }

  /* 알림 / 만료 임박 */
  .dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .panel {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
  }
  .panel-head {
    padding: 16px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .panel-head h3 { font-size: 14.5px; font-weight: 700; }
  .panel-head .more {
    font-size: 12px; color: var(--green-600);
    text-decoration: none; font-weight: 600; cursor: pointer;
  }
  .panel-body { padding: 8px 0; }

  .alert-list { list-style: none; }
  .alert-list li {
    padding: 12px 20px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px;
  }
  .alert-list li:last-child { border-bottom: none; }
  .alert-list .alert-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .alert-list .icon-warn { background: #fff4e6; color: var(--c-warn); }
  .alert-list .icon-info { background: var(--green-100); color: var(--green-600); }
  .alert-list .alert-content { flex: 1; min-width: 0; }
  .alert-list .alert-title { font-weight: 600; color: var(--text); }
  .alert-list .alert-meta { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
  .alert-list .alert-action {
    font-size: 11.5px; color: var(--green-600); font-weight: 600;
    background: var(--green-100); padding: 4px 9px; border-radius: 5px;
    cursor: pointer; border: none; font-family: inherit;
  }
  .alert-list .alert-action:hover { background: var(--green-600); color: white; }

  /* 월별 추이 */
  .trend-chart { padding: 18px 22px 22px; }
  .trend-bars {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    height: 140px;
    align-items: end;
    margin-top: 14px;
  }
  .trend-bar {
    background: linear-gradient(to top, var(--green-600), var(--green-500));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: opacity 0.15s;
    min-height: 4px;
  }
  .trend-bar:hover { opacity: 0.75; }
  .trend-bar .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%; transform: translateX(-50%);
    background: var(--green-800);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    margin-bottom: 4px;
  }
  .trend-bar:hover .tooltip { opacity: 1; }
  .trend-labels {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    margin-top: 8px;
    font-size: 10.5px;
    color: var(--text-mute);
    text-align: center;
  }

  /* ========== FILTER BAR ========== */
  .filter-bar {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  .filter-bar select,
  .filter-bar input[type="text"],
  .filter-bar input[type="date"] {
    padding: 8px 12px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-size: 12.5px;
    font-family: inherit;
    background: white;
    color: var(--text);
  }
  .filter-bar input[type="text"] { min-width: 240px; }
  .filter-bar select:focus,
  .filter-bar input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(74,124,89,0.12);
  }
  .filter-bar .filter-label {
    font-size: 12px;
    color: var(--text-mute);
    font-weight: 600;
  }
  .right-actions { margin-left: auto; display: flex; gap: 8px; }

  .inquiry-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }
  .inquiry-tab {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .inquiry-tab.active {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
  }
  .inquiry-type-badge,
  .inquiry-status-badge,
  .inquiry-email-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  .inquiry-type-badge { background: var(--green-100); color: var(--green-600); }
  .inquiry-status-badge { background: #eef7ff; color: #2563eb; }
  .inquiry-status-badge.status-received { background: #eef7ff; color: #2563eb; }
  .inquiry-status-badge.status-reviewing { background: #fff7ed; color: #c2410c; }
  .inquiry-status-badge.status-contacted { background: #ecfdf5; color: #047857; }
  .inquiry-status-badge.status-closed { background: #f3f4f6; color: #4b5563; }
  .inquiry-status-badge.status-canceled { background: #fef2f2; color: #b91c1c; }
  .inquiry-email-badge { background: #f3f4f6; color: #4b5563; }
  .inquiry-email-badge.email-status-sent { background: #ecfdf5; color: #047857; }
  .inquiry-email-badge.email-status-failed { background: #fef2f2; color: #b91c1c; }
  .inquiry-email-badge.email-status-skipped { background: #f3f4f6; color: #4b5563; }
  .inquiry-email-badge.email-status-pending { background: #fff7ed; color: #c2410c; }
  .inquiry-email-badge.email-status-none { background: transparent; color: var(--text-mute); padding-left: 0; padding-right: 0; }
  .inquiry-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .inquiry-detail-item {
    background: var(--green-50);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 12px;
  }
  .inquiry-detail-item span {
    display: block;
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
  }
  .inquiry-detail-item strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    word-break: break-word;
  }
  .inquiry-history-list {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    min-height: 46px;
    overflow: hidden;
  }
  .inquiry-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }
  .inquiry-history-item:last-child { border-bottom: 0; }
  .inquiry-history-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .inquiry-history-message {
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    word-break: break-word;
  }
  .inquiry-history-date {
    color: var(--text-mute);
    font-size: 11.5px;
    white-space: nowrap;
  }
  .inquiry-history-empty {
    padding: 12px;
    color: var(--text-mute);
    font-size: 12.5px;
    text-align: center;
  }

  /* ========== TABLE ========== */
  .table-wrap {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
  }
  .table-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .table-header h3 { font-size: 14.5px; font-weight: 700; }
  .table-header h3 .count { color: var(--text-mute); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
  .table-header .actions { display: flex; gap: 8px; align-items: center; }
  .selected-info {
    font-size: 12px; color: var(--green-600); font-weight: 600;
    background: var(--green-100);
    padding: 5px 11px; border-radius: 5px;
  }

  .table-scroll { overflow-x: auto; }
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  thead { background: var(--green-50); }
  th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--green-600);
    font-size: 11.5px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    letter-spacing: 0.3px;
  }
  .column-group-row th {
    background: #e8f2ed;
    color: var(--green-700);
    text-align: center;
    font-size: 12px;
    border-bottom: 1px solid #d7e5dd;
  }
  #licenseIssueTable .column-group-row th:nth-child(2) {
    background: #fff4dc;
    color: #8a5a00;
    border-bottom-color: #f2d49a;
  }
  #licenseIssueTable thead tr:not(.column-group-row) th:nth-child(n+13) {
    background: #fffaf0;
    color: #8a5a00;
  }
  #licenseIssueTable tbody td:nth-child(n+13) {
    background: #fffdf7;
  }
  #licenseIssueTable tbody tr:hover td:nth-child(n+13) {
    background: #fff8e8;
  }
  td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
    vertical-align: middle;
  }
  tbody tr { transition: background 0.1s; }
  tbody tr:hover { background: #fafcfa; }
  tbody tr.selected { background: var(--green-100); }
  tbody tr.selected:hover { background: #e3f0e8; }
  tbody td.num { color: var(--text-mute); font-weight: 500; }
  .device-count-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    color: var(--text);
    font-weight: 700;
  }
  .device-toggle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green-600);
    border-radius: 4px;
    background: #fff;
    color: var(--green-900);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
  }
  .device-toggle:hover {
    background: var(--green-100);
    border-color: var(--green-700);
  }
  .license-device-detail-row,
  .license-device-detail-row:hover {
    background: #fbfbfb;
  }
  .license-device-detail-row > td {
    padding: 16px 20px;
  }
  .license-device-detail {
    color: var(--text);
  }
  .license-device-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 900;
    color: var(--green-900);
  }
  .license-device-scroll {
    overflow-x: auto;
  }
  .license-device-table {
    width: 100%;
    min-width: 920px;
    border: 1px solid #eee;
    border-collapse: collapse;
    background: #fff;
    font-size: 12.5px;
  }
  .license-device-table th {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #f5f5f5;
    color: var(--green-700);
    text-align: left;
    font-size: 12px;
    font-weight: 900;
  }
  .license-device-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eee;
    color: var(--text);
    white-space: nowrap;
  }
  .license-device-table tbody tr:last-child td {
    border-bottom: 0;
  }
  .license-device-table .mono {
    color: #666;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 12px;
  }

  th.center, td.center { text-align: center; }
  th.checkbox-col, td.checkbox-col { width: 40px; padding-left: 16px; padding-right: 4px; }
  input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--green-600);
    cursor: pointer;
  }

  /* Badges */
  .badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.2px;
  }
  .badge-genuine { background: #d4ede0; color: #155724; }
  .badge-edu     { background: #d1ecf1; color: #0c5460; }
  .badge-demo    { background: #fde2cc; color: #8a4400; }
  .badge-update  { background: #fff3cd; color: #856404; }
  .badge-extra   { background: #e2d4f0; color: #4a235a; }
  /* [v1.13] 회원 등급 뱃지 */
  .badge-grade-sapling { background:#d4edda; color:#155724; }
  .badge-grade-vip     { background:linear-gradient(135deg,#FFE066,#f5a623); color:#5a3d00; }
  .badge-grade-manager { background:linear-gradient(135deg,#bfdbfe,#3b82f6); color:#fff; }
  .badge-grade-admin   { background:linear-gradient(135deg,#dc2626,#7f1d1d); color:#fff; }
  /* [v1.13] 회원 등급 카드 좌측 바 색상 */
  .card-grade-sapling { --bar-color: #155724; }
  .card-grade-vip     { --bar-color: #f5a623; }
  .card-grade-manager { --bar-color: #3b82f6; }
  .card-grade-admin   { --bar-color: #dc2626; }
  /* [v1.13] 등급 라디오 picker (회원 등급/권한 수정 모달) */
  .mgr-grade-picker { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
  .mgr-grade-opt {
    display:flex; align-items:flex-start; gap:12px;
    padding:12px 14px; border-radius:10px; cursor:pointer;
    border:1.5px solid #e0f2fe; background:#f0f9ff;
    transition:all .15s;
  }
  .mgr-grade-opt:hover { border-color:#38BDF8; background:#e0f2fe; transform:translateY(-1px); }
  .mgr-grade-opt input { margin-top:3px; }
  .mgr-grade-opt span { font-weight:800; color:#1B4332; font-size:14px; display:block; }
  .mgr-grade-opt small { font-weight:500; color:#6b7d6f; font-size:11.5px; display:block; margin-top:2px; line-height:1.45; }
  .mgr-grade-opt:has(input:checked){
    background:linear-gradient(135deg,#0EA5E9,#0284C7);
    border-color:#0284C7;
    box-shadow:0 6px 14px rgba(14,165,233,.30);
  }
  .mgr-grade-opt:has(input:checked) span,
  .mgr-grade-opt:has(input:checked) small { color:#fff; }
  .badge-active   { background: #d4edda; color: #155724; }
  .badge-expiring { background: #fce4ec; color: #c2185b; }
  .badge-expired  { background: #f8d7da; color: #721c24; }

  .key-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--green-700);
    background: var(--green-50);
    padding: 3px 7px;
    border-radius: 4px;
    display: inline-block;
  }

  .action-btns { display: flex; gap: 4px; }
  .license-manage-actions { justify-content: center; white-space: nowrap; }
  .action-btn {
    padding: 4px 9px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    color: var(--green-600);
    font-family: inherit;
    transition: all 0.1s;
  }
  .action-btn:hover { background: var(--green-100); border-color: var(--green-600); }
  .action-btn.danger { color: var(--c-warn); }
  .action-btn.danger:hover { background: #fef0ef; border-color: var(--c-warn); }

  /* Pagination */
  .pagination {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--text-mute);
  }
  .pagination strong { color: var(--text); }
  .pagination .pages { display: flex; gap: 4px; }
  .pagination .page-btn {
    padding: 5px 11px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    color: var(--text);
    min-width: 30px;
  }
  .pagination .page-btn:hover { border-color: var(--green-600); color: var(--green-600); }
  .pagination .page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
  }
  .pagination .page-btn:disabled:hover {
    border-color: var(--line);
    color: var(--text);
  }
  .pagination .page-btn.active {
    background: var(--green-600);
    color: white;
    border-color: var(--green-600);
    font-weight: 700;
  }

  /* ========== MODAL ========== */
  .modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,29,20,0.55);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
  }
  .modal-overlay.active { display: flex; animation: fadeIn 0.15s ease; }
  .modal {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .modal.modal-lg { max-width: 720px; }
  .modal.guid-license-edit-modal { max-width: 760px; }
  .modal.community-editor-modal {
    max-width: 820px;
    max-height: min(92vh, 860px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .community-editor-modal form {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .community-editor-modal .modal-body {
    overflow-y: auto;
    min-height: 0;
  }
  .community-editor-modal .modal-footer {
    flex: 0 0 auto;
  }
  .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .modal-header h3 { font-size: 17px; color: var(--green-600); font-weight: 700; }
  .modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-mute);
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
  }
  .modal-close:hover { background: var(--green-50); color: var(--text); }
  .modal-body { padding: 22px 24px; }
  .modal-body .readonly-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #d7e5dd;
    border-left: 4px solid var(--green-600);
    border-radius: 8px;
    background: #f5faf7;
    color: var(--green-700);
    font-size: 12.5px;
    line-height: 1.5;
  }
  .modal-body .readonly-notice strong {
    flex: 0 0 auto;
    color: var(--green-900);
  }
  .modal-body .form-group { margin-bottom: 14px; }
  .modal-body label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--green-600);
    margin-bottom: 6px;
  }
  .modal-body label .req { color: var(--c-warn); margin-left: 2px; }
  .modal-body input,
  .modal-body select,
  .modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--line);
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
  }
  .modal-body textarea { resize: vertical; min-height: 80px; }
  .modal-body input:focus,
  .modal-body select:focus,
  .modal-body textarea:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(74,124,89,0.12);
  }
  .modal-body .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .modal-body .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--green-50);
  }

  .license-issue-window-overlay,
  .license-mail-window-overlay {
    background: transparent;
    backdrop-filter: none;
    align-items: flex-start;
    justify-content: flex-end;
    pointer-events: none;
    padding: 82px 28px 28px;
  }
  .license-issue-window-overlay.active,
  .license-mail-window-overlay.active { display: flex; }
  .license-issue-window,
  .license-mail-window {
    width: min(760px, calc(100vw - 56px));
    max-height: calc(100vh - 112px);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 61, 42, 0.18);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(10, 31, 21, 0.22);
    pointer-events: auto;
  }
  .license-mail-window {
    width: min(840px, calc(100vw - 56px));
  }
  .license-issue-window .modal-header,
  .license-mail-window .modal-header {
    background: linear-gradient(180deg, #f8fbf8, #eef6f0);
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
  }
  .license-issue-window .modal-header h3,
  .license-mail-window .modal-header h3 {
    color: var(--green-700);
    font-size: 16px;
  }
  .license-issue-window .modal-body,
  .license-mail-window .modal-body {
    max-height: calc(100vh - 260px);
    overflow: auto;
    padding: 18px;
  }
  .license-issue-window .modal-footer,
  .license-mail-window .modal-footer {
    background: #fff;
    padding: 12px 18px;
  }
  .license-issue-window .readonly-notice,
  .license-mail-window .readonly-notice {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #cfe8d5;
    border-radius: 7px;
    background: #f4fbf6;
    color: var(--green-700);
    font-size: 12.5px;
  }
  .license-issue-window .readonly-notice strong,
  .license-mail-window .readonly-notice strong {
    flex: 0 0 auto;
    color: var(--green-900);
  }
  .license-issue-window input[readonly],
  .license-issue-window textarea[readonly],
  .license-issue-window select:disabled {
    background: #f7faf8;
    color: var(--text);
    cursor: default;
    opacity: 1;
  }
  .license-mail-preview {
    width: 100%;
    height: 540px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f3f7f4;
  }
  .license-mail-search-box {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid #d9e9de;
    border-radius: 8px;
    background: #fbfdfb;
  }
  .license-mail-search-box .inline-check {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    min-width: 190px;
    min-height: 44px;
    margin: 0;
    font-weight: 800;
    color: var(--green-800);
    white-space: nowrap;
  }
  .license-mail-search-box .inline-check input {
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 0;
  }
  .license-mail-search-box .inline-check span {
    flex: 0 0 auto;
  }
  .license-mail-search-row {
    display: grid;
    grid-template-columns: 210px minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
    gap: 8px;
    align-items: center;
  }
  .license-mail-search-row input,
  .license-mail-search-row select {
    min-width: 0;
  }
  @media (max-width: 720px) {
    .license-mail-search-row {
      grid-template-columns: 1fr;
    }
    .license-mail-search-row .btn {
      width: 100%;
    }
  }
  .mail-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
  }
  .mail-status-none { background: #f1f4f2; color: #78887f; }
  .mail-status-sent { background: #dff5e6; color: #1f7a45; }
  .mail-status-failed { background: #ffe5e5; color: #c0392b; }

  /* 카카오 발송 모달 */
  .kakao-info {
    background: linear-gradient(135deg, #FFF8DC, #FEE500);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #5A4A00;
    line-height: 1.6;
    border: 1px solid #FFE100;
  }
  .kakao-info strong { color: #1f1f1f; }
  .recipient-list {
    background: var(--green-50);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    max-height: 120px;
    overflow-y: auto;
    font-size: 12.5px;
  }
  .recipient-list .chip {
    display: inline-block;
    background: white;
    padding: 4px 10px;
    margin: 3px;
    border-radius: 12px;
    border: 1px solid var(--line);
    font-size: 11.5px;
    color: var(--text);
  }
  .recipient-list .chip strong { color: var(--green-600); margin-right: 4px; }
  .template-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .template-tab {
    padding: 8px 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 12.5px;
    color: var(--text-mute);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
  }
  .template-tab.active {
    color: var(--green-600);
    border-bottom-color: var(--green-600);
    font-weight: 700;
  }
  .char-count {
    font-size: 11px;
    color: var(--text-mute);
    text-align: right;
    margin-top: 4px;
  }

  /* ========== RESPONSIVE ========== */
  @media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-hero { grid-template-columns: 1fr; }
    .dashboard-bottom { grid-template-columns: 1fr; }
  }
  @media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
      display: none;
      position: fixed;
      top: 56px; left: 0; bottom: 0;
      width: 260px;
      z-index: 50;
      box-shadow: 4px 0 24px rgba(0,0,0,.18);
      overflow-y: auto;
    }
    .sidebar.open { display: block; }
    .admin-mobile-toggle {
      display: inline-flex !important;
      align-items: center; justify-content: center;
      width: 36px; height: 36px;
      background: rgba(255,255,255,.10);
      color: #fff;
      border: 1px solid rgba(255,255,255,.20);
      border-radius: 6px;
      font-size: 18px;
      cursor: pointer;
      margin-right: 8px;
    }
    .admin-mobile-toggle:hover { background: rgba(255,255,255,.20); }
    .admin-sidebar-overlay {
      display: none;
      position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.45);
      z-index: 40;
    }
    .admin-sidebar-overlay.open { display: block; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .main { padding: 20px 16px; }
    th, td { padding: 8px 10px; font-size: 12px; }
    .filter-bar input[type="text"] { min-width: 100%; }
    .hero-chart { grid-template-columns: 1fr; }
    .donut-wrap { margin: 0 auto; }
    /* 모바일 user-info 컴팩트 */
    .topnav .user-info { gap: 6px; font-size: 12px; }
    .topnav .user-info span:nth-child(2),
    .topnav .user-info .divider { display: none; }
  }
  .admin-mobile-toggle { display: none; }
  .admin-sidebar-overlay { display: none; }

  /* ========== [v22] 추가 페이지용 패턴 ========== */
  /* 메이저 업데이트 체크박스 (정품 선택 시) */
  .update-checkbox-label {
    display: flex; gap: 12px; align-items: flex-start;
    background: linear-gradient(135deg, #fff8e1 0%, #fef4d7 100%);
    border: 1px solid #f5e6a8;
    border-left: 4px solid #f1c40f;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all .15s ease;
  }
  .update-checkbox-label:hover { background: linear-gradient(135deg, #fff4c4 0%, #fbe999 100%); }
  .update-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px; height: 16px;
    accent-color: #f1c40f;
    cursor: pointer;
  }
  .upd-check-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
  .update-checkbox-label strong {
    display: block;
    font-size: 13px;
    color: #7a5d00;
    margin-bottom: 2px;
  }
  .update-checkbox-label p {
    font-size: 11.5px;
    color: #8b6f1a;
    margin: 0;
    line-height: 1.5;
  }

  /* 일괄 발급 안내 배너 */
  .batch-banner {
    display: flex; gap: 14px;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf2c5 100%);
    border: 1px solid #f5e6a8;
    border-left: 4px solid #f1c40f;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
  }
  .batch-banner .batch-icon { font-size: 24px; flex-shrink: 0; }
  .batch-banner strong { display: block; font-size: 13px; color: #7a5d00; margin-bottom: 2px; }
  .batch-banner p { font-size: 12px; color: #8b6f1a; margin: 0; line-height: 1.5; }

  /* 일괄 발급 키 미리보기 */
  .batch-preview {
    background: var(--green-50);
    border: 1px dashed var(--green-500);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--green-700);
    line-height: 1.7;
    margin-top: 8px;
    min-height: 0;
    transition: all .15s ease;
  }
  .batch-preview:empty { display: none; }
  .batch-preview .preview-title {
    font-family: 'Pretendard', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--green-600);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
  }
  .batch-preview .preview-keys { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .batch-preview .preview-key {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11.5px;
  }

  /* 업데이트 상태 배지 */
  .update-cell { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
  .update-cell .version-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
  }
  .update-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    width: fit-content;
  }
  .update-latest { background: #d4f5e0; color: #1b6b3d; }
  .update-outdated { background: #fef4d7; color: #8b6f1a; }
  .update-old { background: #fde2de; color: #b73c2b; }

  /* 정품 추가 라벨 (테이블) */
  .extra-tag {
    display: inline-block;
    background: var(--green-600);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    letter-spacing: 0.3px;
  }
  /* 업데이트 결제 태그 (정품+업데이트 표시) */
  .upd-tag {
    display: inline-block;
    background: #f1c40f;
    color: #5d4500;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    letter-spacing: 0.3px;
  }

  /* 필터바 2줄 확장 (라이센스 검색) */
  .filter-bar-2row {
    display: flex; flex-direction: column; gap: 12px;
    align-items: stretch;
  }
  .filter-bar-2row .filter-row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .filter-row-dates {
    padding-top: 12px;
    border-top: 1px dashed var(--line);
  }
  .filter-bar-2row .right-actions { margin-left: auto; display: flex; gap: 8px; }
  .filter-bar-2row input[type="date"] {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
  }
  .filter-bar-2row input[type="date"]:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(74,124,89,.12);
  }

  /* 빠른 기간 버튼 그룹 */
  .quick-period {
    display: inline-flex;
    background: var(--green-50);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
  }
  .quick-period .period-btn {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-mute);
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s ease;
    white-space: nowrap;
  }
  .quick-period .period-btn:hover {
    color: var(--green-700);
    background: rgba(74,124,89,.08);
  }
  .quick-period .period-btn.active {
    background: var(--green-600);
    color: #fff;
    box-shadow: 0 1px 3px rgba(45,90,61,.25);
  }

  /* 적용 필터 요약 칩 */
  .filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding-top: 4px;
    min-height: 0;
  }
  .filter-summary:empty { display: none; }
  .filter-summary .summary-label {
    font-size: 11.5px;
    color: var(--text-mute);
    font-weight: 600;
    margin-right: 4px;
  }
  .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green-100);
    color: var(--green-700);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid rgba(45,90,61,.15);
  }
  .filter-chip .chip-close {
    cursor: pointer;
    color: var(--green-600);
    font-weight: 700;
    margin-left: 2px;
  }
  .filter-chip .chip-close:hover { color: var(--c-warn); }

  /* 미니 액션 버튼 (테이블 내부) */
  .btn-mini {
    background: var(--green-50);
    color: var(--green-700);
    border: 1px solid var(--line);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s ease;
  }
  .btn-mini:hover { background: var(--green-100); border-color: var(--green-500); }
  .btn-mini-danger { color: var(--c-warn); background: #fef5f4; border-color: #f5d0cc; }
  .btn-mini-danger:hover { background: #fde2de; border-color: var(--c-warn); }
  .btn-mini + .btn-mini { margin-left: 4px; }

  /* 토글 스위치 (미니) */
  .toggle-mini { display: inline-block; position: relative; width: 36px; height: 20px; cursor: pointer; }
  .toggle-mini input { opacity: 0; width: 0; height: 0; }
  .toggle-mini span {
    position: absolute; inset: 0;
    background: #d0d6d2;
    border-radius: 20px;
    transition: background .2s ease;
  }
  .toggle-mini span::before {
    content: ''; position: absolute;
    width: 16px; height: 16px; top: 2px; left: 2px;
    background: #fff; border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
  }
  .toggle-mini input:checked + span { background: var(--green-600); }
  .toggle-mini input:checked + span::before { transform: translateX(16px); }

  /* 시스템 설정 그리드 */
  .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
  }
  .settings-grid .panel { display: flex; flex-direction: column; }
  .settings-grid .panel-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
  .settings-grid .form-group { display: flex; flex-direction: column; gap: 6px; }
  .settings-grid .form-group label {
    font-size: 12.5px; font-weight: 600; color: var(--text-mute);
    display: flex; align-items: center; gap: 6px;
  }
  .settings-grid .form-group input,
  .settings-grid .form-group select {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--line); border-radius: 6px;
    font-size: 13px; font-family: inherit; background: #fff;
    transition: border-color .15s ease;
  }
  .settings-grid .form-group input:focus,
  .settings-grid .form-group select:focus {
    border-color: var(--green-500); outline: none;
    box-shadow: 0 0 0 3px rgba(74,124,89,.12);
  }
  .settings-grid .row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  }
  @media (max-width: 1100px) {
    .settings-grid { grid-template-columns: 1fr; }
  }

.bn-list{display:grid;grid-template-columns:1fr;gap:14px}
        .bn-item{
          display:grid;grid-template-columns:120px 1fr auto;gap:18px;
          background:#fff;border:1px solid #e0f2fe;border-radius:12px;padding:14px;
          align-items:center;transition:all .15s;
        }
        .bn-item:hover{border-color:#7dd3fc;box-shadow:0 8px 20px rgba(2,132,199,.10)}
        .bn-item.disabled{opacity:.55}
        .bn-item .bn-thumb{
          width:120px;height:120px;border-radius:10px;overflow:hidden;
          background:linear-gradient(135deg,#e0f2fe,#bae6fd);
          background-size:cover;background-position:center;
        }
        .bn-item .bn-info h3{font-size:16px;font-weight:900;color:#1B4332;margin:0 0 4px}
        .bn-item .bn-info p{font-size:13px;color:#6b7d6f;margin:0 0 8px;line-height:1.5}
        .bn-item .bn-info .bn-meta{font-size:11.5px;color:#94a39a}
        .bn-item .bn-info .bn-meta strong{color:#0284C7}
        .bn-item .bn-actions{display:flex;flex-direction:column;gap:6px}
        .bn-item .bn-actions button{
          padding:7px 14px;border-radius:6px;border:1px solid #e5ebe7;
          background:#fff;cursor:pointer;font-size:12.5px;font-weight:700;
          min-width:80px;transition:all .12s;
        }
        .bn-item .bn-actions button:hover{background:#f0f9ff;border-color:#7dd3fc}
        .bn-item .bn-actions .bn-btn-edit{color:#0284C7}
        .bn-item .bn-actions .bn-btn-toggle{color:#475569}
        .bn-item .bn-actions .bn-btn-del{color:#c0392b;border-color:#fee2e2}
        .bn-item .bn-actions .bn-btn-del:hover{background:#fef2f2;border-color:#fecaca}
        .bn-empty{
          text-align:center;padding:60px 20px;
          background:#fbfdfc;border:1px dashed #e0f2fe;border-radius:12px;
          color:#94a39a;
        }
        .bn-empty-icon{font-size:48px;margin-bottom:10px;opacity:.5}
        .bn-empty-text{font-size:14px;font-weight:600;color:#6b7d6f}
        @media (max-width:760px){
          .bn-item{grid-template-columns:90px 1fr;grid-template-rows:auto auto;gap:12px}
          .bn-item .bn-thumb{width:90px;height:90px}
          .bn-item .bn-actions{grid-column:1 / -1;flex-direction:row}
        }

.ai-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
        @media (max-width:960px){ .ai-grid{ grid-template-columns:1fr 1fr } }
        @media (max-width:640px){ .ai-grid{ grid-template-columns:1fr } }
        .ai-slot{
          background:#fff; border:1px solid #e0f2fe; border-radius:14px; overflow:hidden;
          box-shadow:0 6px 18px rgba(2,132,199,.08); display:flex; flex-direction:column;
        }
        .ai-slot .ai-head{
          padding:12px 16px; background:#f0f9ff; border-bottom:1px solid #e0f2fe;
          display:flex; align-items:center; justify-content:space-between;
        }
        .ai-slot .ai-head h3{ margin:0; font-size:14.5px; font-weight:900; color:#1B4332 }
        .ai-slot .ai-head .ai-key{ font-size:11px; color:#0284C7; font-weight:700; letter-spacing:1px }
        .ai-slot .ai-thumb{
          width:100%; aspect-ratio:4/3; background:#f0f9ff;
          background-size:contain; background-position:center; background-repeat:no-repeat;
          display:flex; align-items:center; justify-content:center;
          color:#0284C7; font-size:13.5px; font-weight:700; gap:8px;
          flex-direction:column;
        }
        .ai-slot .ai-thumb .ai-empty-icon{ font-size:36px; opacity:.5 }
        .ai-slot .ai-thumb.has-bg{ color:transparent }
        .ai-slot .ai-thumb.has-bg .ai-empty-icon,
        .ai-slot .ai-thumb.has-bg span:not(.ai-empty-icon){ display:none }
        .ai-slot .ai-body{ padding:12px 16px; display:flex; flex-direction:column; gap:8px; }
        .ai-slot .ai-actions{ display:flex; gap:6px; }
        .ai-slot .ai-actions label{
          flex:1; padding:8px 10px; border:1px solid #e0f2fe; border-radius:8px;
          font-size:12.5px; font-weight:700; color:#0284C7; cursor:pointer; text-align:center;
          background:#fff; transition:all .12s;
        }
        .ai-slot .ai-actions label:hover{ background:#f0f9ff; border-color:#7dd3fc }
        .ai-slot .ai-actions input[type="file"]{ display:none }
        .ai-slot .ai-actions .ai-btn-del{
          padding:8px 12px; border:1px solid #fee2e2; border-radius:8px; background:#fff;
          color:#c0392b; font-size:12.5px; font-weight:700; cursor:pointer;
        }
        .ai-slot .ai-actions .ai-btn-save{
          padding:8px 12px; border:1px solid #b7dcc8; border-radius:8px; background:#f5fbf7;
          color:#1B4332; font-size:12.5px; font-weight:700; cursor:pointer;
        }
        .ai-slot .ai-actions .ai-btn-save:hover{ background:#e6f7ec; border-color:#95d5b2 }
        .ai-slot .ai-actions .ai-btn-del:hover{ background:#fef2f2; border-color:#fecaca }
        .ai-slot .ai-actions .ai-btn-del:disabled{ opacity:.4; cursor:not-allowed }
        .ai-slot small{ font-size:11.5px; color:#94a39a; line-height:1.5; }
        .ai-alt-input{
          width:100%;border:1px solid #dfe8e2;border-radius:8px;padding:9px 10px;
          font-size:12.5px;color:#1f2d1f;background:#fff;
        }
        .ai-meta{font-size:11.5px;color:#6b7d6f;line-height:1.45;min-height:17px}
