/* ===== 운영자 콘솔 진입 버튼 ===== */
.topbar-admin { display: none; background: #0f2b5b; color: #fff; border: none; border-radius: 999px; padding: 8px 16px; font-size: 0.84rem; font-weight: 800; cursor: pointer; }
.topbar-admin:hover { background: #173d7a; }
html.is-authed .topbar-admin { display: inline-flex; }

/* ===== 운영자 콘솔 (관리자 대시보드) ===== */
.adm-overlay { position: fixed; inset: 0; z-index: 12000; background: #f1f5f9; overflow: auto; }
.adm-overlay[hidden] { display: none; }
html.adm-open body { overflow: hidden; }
.adm-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* 사이드바 */
.adm-side { width: 236px; flex: 0 0 236px; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; border-bottom: 1px solid #1e293b; margin-bottom: 14px; }
.adm-brand img { width: 34px; height: 34px; object-fit: contain; }
.adm-brand b { color: #fff; font-size: 0.98rem; display: block; }
.adm-brand small { color: #94a3b8; font-size: 0.72rem; }
.adm-side-cap { font-size: 0.7rem; color: #64748b; font-weight: 700; padding: 4px 8px 8px; }
.adm-nav-list { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.adm-nav { text-align: left; background: none; border: none; color: #cbd5e1; font-size: 0.9rem; font-weight: 600; padding: 11px 12px; border-radius: 10px; cursor: pointer; }
.adm-nav:hover { background: #1e293b; color: #fff; }
.adm-nav.active { background: #2563eb; color: #fff; font-weight: 800; }
.adm-side-foot { border-top: 1px solid #1e293b; padding-top: 12px; }
.adm-exit { width: 100%; background: #1e293b; color: #e2e8f0; border: none; border-radius: 10px; padding: 11px; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.adm-exit:hover { background: #334155; }

/* 메인 */
.adm-main { flex: 1 1 auto; min-width: 0; padding: 26px 30px 40px; }
.adm-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.adm-title { font-size: 1.7rem; font-weight: 800; color: #0f172a; margin: 0 0 6px; }
.adm-sub { color: #64748b; font-size: 0.92rem; margin: 0; }
.adm-range { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 14px; font-size: 0.85rem; font-weight: 700; color: #475569; white-space: nowrap; }
.adm-demo-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 11px 15px; font-size: 0.85rem; font-weight: 600; margin-bottom: 18px; }

/* KPI */
.adm-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 18px; }
.adm-kpi { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.adm-kpi-lb { font-size: 0.84rem; color: #64748b; font-weight: 700; margin-bottom: 10px; }
.adm-kpi-v { font-size: 1.45rem; font-weight: 800; color: #0f172a; }
.adm-kpi-v.sm { font-size: 1.3rem; }
.adm-kpi-d { font-size: 0.78rem; color: #16a34a; font-weight: 700; margin-top: 8px; }
.adm-kpi.blue { border-top: 3px solid #2563eb; }
.adm-kpi.violet { border-top: 3px solid #7c3aed; }
.adm-kpi.green { border-top: 3px solid #16a34a; }
.adm-kpi.amber { border-top: 3px solid #f59e0b; }
.adm-kpi.gold { background: #fffdf5; border-color: #f6e7b8; }

/* 차트 */
.adm-charts { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.adm-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.adm-card-h { font-size: 1.02rem; font-weight: 800; color: #0f172a; margin-bottom: 14px; }
.adm-legend-top { display: flex; gap: 16px; justify-content: flex-end; margin-top: -34px; margin-bottom: 8px; font-size: 0.78rem; color: #64748b; font-weight: 700; }
.adm-legend-top i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.adm-line { width: 100%; height: 190px; }
.adm-line-x { display: flex; justify-content: space-between; font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }
.adm-donut-wrap { display: flex; align-items: center; gap: 16px; }
.adm-donut { width: 130px; height: 130px; border-radius: 50%; flex: 0 0 auto; position: relative; -webkit-mask: radial-gradient(circle 40px at center, transparent 98%, #000 100%); mask: radial-gradient(circle 40px at center, transparent 98%, #000 100%); }
.adm-donut-hole { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.adm-donut-t { font-size: 0.72rem; color: #94a3b8; font-weight: 700; }
.adm-donut-n { font-size: 0.95rem; color: #0f172a; font-weight: 800; }
.adm-legend { flex: 1 1 auto; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.adm-lg { display: grid; grid-template-columns: 14px 1fr auto; gap: 7px; align-items: center; font-size: 0.82rem; }
.adm-lg-dot { width: 9px; height: 9px; border-radius: 50%; }
.adm-lg-lb { color: #334155; font-weight: 600; }
.adm-lg-v { color: #0f172a; font-weight: 800; }
.adm-lg-sub { grid-column: 2 / 4; font-size: 0.74rem; color: #94a3b8; text-align: right; }

/* 회원 테이블 */
.adm-table-card { padding: 20px; }
.adm-table-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-table-tools { display: flex; gap: 8px; }
.adm-table-tools input { border: 1px solid #cbd5e1; border-radius: 9px; padding: 8px 12px; font-size: 0.85rem; min-width: 220px; }
.adm-table-tools input:focus { outline: none; border-color: #2563eb; }
.adm-xlsx { background: #0f2b5b; color: #fff; border: none; border-radius: 9px; padding: 8px 14px; font-weight: 700; font-size: 0.83rem; cursor: pointer; }
.adm-xlsx:hover { background: #173d7a; }
.adm-table { overflow-x: auto; }
.adm-th, .adm-tr { display: grid; grid-template-columns: 190px 84px 96px 130px 120px 96px 100px 104px 106px 110px 80px 96px; align-items: center; gap: 10px; min-width: 1310px; }
.adm-th { padding: 0 4px 12px; border-bottom: 1px solid #eef2f7; font-size: 0.76rem; color: #94a3b8; font-weight: 700; }
.adm-tr { padding: 14px 4px; border-bottom: 1px solid #f1f5f9; font-size: 0.82rem; color: #334155; }
.adm-c-mem { display: flex; align-items: center; gap: 9px; }
.adm-ava { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #e0e7ff; color: #4338ca; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.adm-mem-n { font-weight: 700; color: #0f172a; }
.adm-mem-e { font-size: 0.74rem; color: #94a3b8; }
.adm-grade { font-size: 0.72rem; font-weight: 800; border-radius: 999px; padding: 3px 9px; }
.adm-grade.g-prem { color: #1d4ed8; background: #dbeafe; }
.adm-grade.g-basic { color: #047857; background: #d1fae5; }
.adm-grade.g-free { color: #b45309; background: #fef3c7; }
.adm-grade.g-trial { color: #64748b; background: #e2e8f0; }
.adm-c-num { text-align: right; font-weight: 600; white-space: nowrap; }
.adm-c-num.pos { color: #16a34a; font-weight: 800; }
.adm-c-num.neg { color: #dc2626; font-weight: 800; }
.adm-usebar { height: 6px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.adm-usebar span { display: block; height: 100%; background: #2563eb; }
.adm-c-use small { font-size: 0.72rem; color: #94a3b8; }
.adm-c-state { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; }
.adm-dot.on { background: #22c55e; }
.adm-dot.off { background: #f59e0b; }
.adm-detail { background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 10px; font-size: 0.76rem; font-weight: 700; color: #475569; cursor: pointer; }
.adm-detail:hover { border-color: #93c5fd; color: #1d4ed8; }
.adm-table-foot { padding-top: 14px; font-size: 0.82rem; color: #64748b; }
.adm-empty { padding: 24px; text-align: center; color: #94a3b8; }

/* 2-차트 레이아웃 / 준비중 / 설정 */
.adm-charts-2 { grid-template-columns: 1fr 1fr; }
.adm-ph { text-align: center; padding: 56px 24px; }
.adm-ph-ic { font-size: 2rem; margin-bottom: 12px; }
.adm-ph-t { font-size: 1.1rem; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.adm-ph-d { color: #64748b; font-size: 0.9rem; }
.adm-set { max-width: 460px; }
.adm-set-d { color: #64748b; font-size: 0.88rem; margin: 0 0 16px; }
.adm-set-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.adm-set-row label { font-size: 0.82rem; font-weight: 700; color: #334155; }
.adm-set-row input { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: 0.92rem; }
.adm-set-row input:focus { outline: none; border-color: #2563eb; }

@media (max-width: 1200px) { .adm-kpis { grid-template-columns: repeat(3, 1fr); } .adm-charts { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .adm-side { display: none; } .adm-kpis { grid-template-columns: repeat(2, 1fr); } }
