/* VPN 관리자 — 공통 스타일 */
:root {
    --bg: #f4f6fa;
    --card: #fff;
    --line: #e5e8ef;
    --text: #1b2230;
    --text2: #4b5565;
    --muted: #8a93a3;
    --primary: #2f6bff;
    --primary-soft: #eaf0ff;
    --side: #111827;
    --side-text: #a6afc0;
    --ok: #16a34a; --ok-soft: #e7f6ec;
    --warn: #c27803; --warn-soft: #fdf3dc;
    --bad: #dc2626; --bad-soft: #fde8e8;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 14px/1.55 "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; min-width: 160px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.warn, .warn-text { color: var(--warn); }
.mt { margin-top: 20px; }
[hidden] { display: none !important; }

/* ---- 관리자 레이아웃 ---- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 228px; background: var(--side); color: var(--side-text);
    display: flex; flex-direction: column; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; font-weight: 700; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand small { display: block; font-weight: 400; color: var(--side-text); font-size: 11.5px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; }
.side-nav a:hover { background: #1f2937; color: #fff; text-decoration: none; }
.side-nav a.active { background: var(--primary); color: #fff; }
.side-foot { padding: 14px 20px 18px; border-top: 1px solid #1f2937; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.side-foot a, .side-foot .link { color: var(--side-text); }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }

.ic { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-home { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E"); }
.ic-users { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.ic-server { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='8' rx='2'/%3E%3Crect x='2' y='13' width='20' height='8' rx='2'/%3E%3Cpath d='M6 7h.01M6 17h.01'/%3E%3C/svg%3E"); }
.ic-pulse { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E"); }
.ic-game { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='4'/%3E%3Cpath d='M6 12h4M8 10v4M15 11h.01M18 13h.01'/%3E%3C/svg%3E"); }
.ic-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.ic-plug { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2v6M15 2v6M6 8h12v4a6 6 0 0 1-12 0zM12 18v4'/%3E%3C/svg%3E"); }

.main { margin-left: 228px; min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    height: 60px; padding: 0 28px; background: rgba(244, 246, 250, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 18px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.menu-btn { display: none; background: none; border: 0; font-size: 20px; cursor: pointer; padding: 4px 6px; color: var(--text); }
.sample-bar { background: #fff4cc; color: #6b4e00; text-align: center; font-size: 13px; padding: 6px 12px; }
.sample-bar a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.content { padding: 24px 28px 60px; max-width: 1400px; display: flex; flex-direction: column; gap: 20px; }
.nav-backdrop { display: none; }

/* ---- 카드·공통 ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; }
.card-head h2 small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-wide-left { grid-template-columns: 1.15fr .85fr; }
.flash { background: var(--ok-soft); color: #11632f; border: 1px solid #bfe5cb; border-radius: 10px; padding: 11px 16px; }
.flash-error { background: var(--bad-soft); color: #9b1c1c; border-color: #f5c2c2; }
.flash-info { background: var(--warn-soft); color: #7a4d00; border-color: #f1dca6; }
.label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.big { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.empty { text-align: center; color: var(--muted); padding: 28px 0 !important; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-weight: 500;
    cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { border-color: #c9cfdb; background: #fafbfd; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #2259e0; border-color: #2259e0; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-soft { color: var(--bad); }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--ok-soft); color: #15803d; }
.badge-ok-soft { background: var(--ok-soft); color: #15803d; font-weight: 500; }
.badge-warn { background: var(--warn-soft); color: #a16207; }
.badge-bad { background: var(--bad-soft); color: #b91c1c; }
.badge-muted { background: #eef0f4; color: #5f6878; }
.dot-online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); vertical-align: middle; margin-left: 4px; }

/* 연결 방식 칩: 글자로 구분하고 색은 보조 */
.proto { display: inline-flex; align-items: center; gap: 4px; font: 600 11.5px/1 var(--mono); padding: 4px 6px; border-radius: 5px; margin-right: 3px; background: #eef1f6; color: #3b4558; }
.proto small { font-weight: 400; color: var(--muted); }
.proto-WG { background: #e6efff; color: #1d4fd8; }
.proto-VT { background: #f1e9ff; color: #6d28d9; }
.proto-VL { background: #e3f6f3; color: #0f766e; }
.proto-SS { background: #fff0e3; color: #b45309; }
.proto.disabled { background: #f3f4f6; color: #b6bcc7; text-decoration: line-through; }

/* ---- 통계 타일 ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--text); box-shadow: var(--shadow); }
a.stat:hover { border-color: #c9d5f5; text-decoration: none; }
.stat b { display: inline-block; font-size: 26px; margin-top: 4px; letter-spacing: -.5px; }
.stat small { color: var(--muted); margin-left: 4px; }

/* ---- 차트 ---- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 210px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.bar span { width: 100%; max-width: 28px; background: #9db8ff; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar:hover span { background: var(--primary); }
.bar.today span { background: var(--primary); }
.bar em { position: absolute; bottom: -22px; font-style: normal; font-size: 11px; color: var(--muted); }
.bars + * { margin-top: 30px; }
section.card .bars { margin-bottom: 22px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 10px; }
.hbar-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.hbar-label b { font-family: var(--mono); color: var(--text); margin-right: 4px; }
.hbar-track { height: 10px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: #6f95ff; border-radius: 4px; }
.hbar:hover .hbar-track span { background: var(--primary); }
.hbar-val { text-align: right; font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.tooltip { position: absolute; z-index: 50; background: #111827; color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
.meter { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 14px 0; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.mini-meter { width: 80px; height: 5px; background: #eef1f6; border-radius: 3px; overflow: hidden; margin: 4px 0 2px auto; }
.mini-meter span { display: block; height: 100%; background: #6f95ff; }
.mini-meter.hot span { background: var(--bad); }

/* ---- 서버 카드 ---- */
.server-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.server-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.server-card:hover { border-color: #b9c8f5; text-decoration: none; background: #fbfcff; }
.server-card.off { background: #fff8f8; border-color: #f3cfcf; }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-metrics { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.sc-metrics b { color: var(--text); }

/* ---- 표 ---- */
.table-wrap { padding: 0; overflow-x: auto; }
.card.table-wrap .table th:first-child, .card.table-wrap .table td:first-child { padding-left: 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.table-hover tbody tr:hover td { background: #f8faff; }
.row-fail td { background: #fff6f6; }
.row-muted td { color: var(--muted); }
.card > .table td:first-child, .card > .table th:first-child { padding-left: 0; }
.chip { display: inline-block; font-family: var(--mono); font-size: 12px; background: #f1f3f7; border-radius: 5px; padding: 2px 7px; margin: 2px 4px 2px 0; }

/* ---- 목록 도구 ---- */
.tabs-bar { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs-bar a { padding: 9px 14px; color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs-bar a:hover { text-decoration: none; color: var(--text); }
.tabs-bar a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs-bar a span { font-size: 12px; color: var(--muted); margin-left: 2px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar p { margin: 0; }
input, select, textarea {
    height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; min-width: 0;
}
input:focus, select:focus { outline: 2px solid #c7d6ff; border-color: var(--primary); }
input[type=checkbox], input[type=radio] { height: auto; width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
input:disabled { background: #f5f6f8; color: var(--muted); }
.check-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text2); }
.pager { display: flex; gap: 4px; justify-content: center; }
.pager a, .pager span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text2); }
.pager a:hover { text-decoration: none; border-color: #c9cfdb; }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- 폼 ---- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form.narrow { max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; color: var(--text2); }
.field > span small { font-weight: 400; }
.field.check { flex-direction: row; align-items: center; gap: 8px; padding-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-error { color: var(--bad); }
.form-error ul { margin: 0; padding-left: 18px; }
.form-error:empty, .validation-summary-valid { display: none; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text2); }
.seg-sm span { height: 30px; padding: 0 10px; font-family: var(--mono); font-size: 12.5px; }
.seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid #c7d6ff; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: pointer; }
.choice input { margin-top: 3px; }
.choice > span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice.off { opacity: .65; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.w-num { width: 70px; }
.editing td { background: #f8faff; }

/* ---- 사용자 상세 ---- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.page-head p { margin: 0; }
.back { font-size: 13px; color: var(--muted); }
.sync-state { border-radius: 10px; padding: 8px 14px; font-size: 13px; }
.sync-state.allowed { background: var(--ok-soft); color: #15803d; }
.sync-state.blocked { background: #eef0f4; color: #4b5565; }
.period { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.extend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.extend .label { margin-right: 6px; }
.action-row { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 14px; }
.page-head .action-row { padding: 0; }
.notice-ok { border-color: #bfe5cb; background: #f6fcf8; }
.notice-bad { border-color: #f5c2c2; background: #fff7f7; }
.notice-bad p { margin: 6px 0 0; color: var(--text2); }
.code { background: #0f172a; color: #e2e8f0; font: 12.5px/1.6 var(--mono); padding: 14px 16px; border-radius: 10px; overflow-x: auto; white-space: pre; margin: 0 0 10px; }
.json-out { max-height: 420px; margin-top: 12px; }
.danger-zone { display: flex; justify-content: flex-end; }

.tabs .tab-list { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs .tab-list button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font: 600 13px var(--mono); cursor: pointer; color: var(--text2); }
.tabs .tab-list button small { font-family: inherit; font-weight: 400; color: var(--muted); }
.tabs .tab-list button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.conn { display: flex; gap: 20px; align-items: flex-start; }
.qr { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; image-rendering: pixelated; flex: none; }
.conn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.conn-body p { margin: 0; color: var(--text2); }
.conn-body > .btn { align-self: flex-start; }
.kv { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid #f0f2f6; font-size: 13px; }
.log-list.compact li { grid-template-columns: 1fr auto; }
.log-list li:last-child { border-bottom: 0; }
.log-list li.fail .log-msg { color: var(--bad); }
.log-list time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.log-msg { min-width: 0; overflow-wrap: anywhere; }
.log-kind { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: #eef0f4; color: #4b5565; white-space: nowrap; }
.kind-admin { background: #e6efff; color: #1d4fd8; }
.kind-sync { background: #e3f6f3; color: #0f766e; }
.kind-system { background: #fff0e3; color: #b45309; }
.kind-app { background: #f1e9ff; color: #6d28d9; }

/* ---- 서버 ---- */
.proto-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.proto-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
section.proto-card { padding: 18px; }
.proto-card.off { opacity: .55; }
.proto-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proto-head .muted { margin-left: auto; }
label.proto-head { cursor: pointer; }

.arch { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; }
.arch-box { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.arch-box span { color: var(--text2); font-size: 13px; }
.arch-box.hl { border-color: var(--primary); background: var(--primary-soft); }
.arch-arrow { flex: 0 0 64px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 12px; }
.api-table td { font-size: 13px; }
.method { font: 700 11px var(--mono); padding: 3px 7px; border-radius: 5px; }
.method.get { background: #e3f6f3; color: #0f766e; }
.method.post { background: #e6efff; color: #1d4fd8; }
.method.put { background: #fff0e3; color: #b45309; }
.method.delete { background: var(--bad-soft); color: #b91c1c; }

.explain { padding: 16px 20px; }
.explain-flow { display: flex; gap: 12px; flex-wrap: wrap; }
.explain-flow div { flex: 1; min-width: 200px; display: flex; gap: 10px; align-items: center; color: var(--text2); }
.explain-flow b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }

/* ---- 사용자 화면(로그인·내 이용권) ---- */
body.plain { display: flex; flex-direction: column; min-height: 100vh; }
.plain-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 760px; width: 100%; margin: 0 auto; }
.plain-head .brand { color: var(--text); padding: 0; }
.plain-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.plain-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.login-box { width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.login-box h1 { font-size: 20px; }
.login-box .hint { margin: 0; text-align: center; font-size: 13px; color: var(--muted); background: #f6f8fc; border-radius: 8px; padding: 8px; }
.user-hero { text-align: center; padding: 24px 0 4px; }
.user-hero h1 { font-size: 24px; }
.user-hero p { margin: 6px 0 0; }
.steps { display: flex; gap: 10px; max-width: 560px; margin: 8px auto 0; width: 100%; }
.steps div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; color: var(--text2); }
.steps b { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.my-head { display: flex; justify-content: space-between; align-items: center; }
.my-head h1 { font-size: 22px; }
.my-head p { margin: 2px 0 0; }
.my-plan-row { display: flex; justify-content: space-between; align-items: flex-start; }
.my-plan .big { font-size: 30px; }
.my-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 14px; }
.section-title { font-size: 16px; margin-top: 8px; }
.plain-main > p { margin: -8px 0 0; }
.plain-main > *, .tabs, .tab-panel { min-width: 0; }
.code { max-width: 100%; }
.cc { display: inline-block; font: 700 10.5px/1 var(--mono); padding: 3px 4px; border-radius: 4px; background: #eef1f6; color: #4b5565; vertical-align: 2px; margin-right: 2px; }
.sidebar .cc { background: #1f2937; color: var(--side-text); }

/* ---- 좁은 화면 ---- */
@media (max-width: 1100px) {
    .grid-2, .grid-wide-left { grid-template-columns: 1fr; }
    .proto-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
    .main { margin-left: 0; }
    .menu-btn { display: block; }
    .topbar { padding: 0 16px; }
    .content { padding: 16px 16px 48px; gap: 16px; }
    .card { padding: 16px; }
    .clock { display: none; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .field.check { padding-top: 0; }
    .arch { flex-direction: column; }
    .arch-arrow { justify-content: center; }
    .hbar { grid-template-columns: 110px 1fr 40px; }
    .conn { flex-direction: column; align-items: stretch; }
    .conn .qr { align-self: flex-start; }
    .qr { width: 160px; height: 160px; }
}
@media (max-width: 560px) {
    .proto-cards { grid-template-columns: 1fr; }
    .period, .my-plan-grid { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat b { font-size: 22px; }
    .toolbar > * { flex: 1 1 auto; }
    .bars { gap: 3px; }
}
