:root {
    --ink: #17202b;
    --muted: #687386;
    --line: #dfe4ea;
    --surface: #ffffff;
    --surface-soft: #f5f7f9;
    --navy: #19334d;
    --navy-deep: #10263a;
    --teal: #178477;
    --teal-soft: #e8f5f2;
    --blue: #2f6fed;
    --blue-soft: #edf3ff;
    --amber: #bd7415;
    --amber-soft: #fff5df;
    --danger: #b83a45;
    --danger-soft: #fff0f1;
    --shadow: 0 18px 55px rgba(26, 42, 57, .11);
    --radius: 18px;
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #edf1f4;
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #edf1f4; }
body { min-height: 100vh; margin: 0; background: #edf1f4; color: var(--ink); line-height: 1.55; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.skip-link:focus { transform: translateY(0); }

.topbar { position: sticky; z-index: 30; top: 0; height: 72px; border-bottom: 1px solid rgba(255,255,255,.09); background: var(--navy-deep); color: #fff; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; width: min(1440px, 100%); height: 100%; margin: 0 auto; padding: 0 30px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; }
.brand__mark { display: flex; align-items: flex-end; gap: 3px; width: 34px; height: 34px; padding: 7px 6px; border-radius: 9px; background: linear-gradient(145deg, #24a494, #13756b); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand__mark span { display: block; width: 6px; border-radius: 2px 2px 1px 1px; background: #fff; }
.brand__mark span:nth-child(1) { height: 17px; opacity: .95; }
.brand__mark span:nth-child(2) { height: 21px; opacity: .8; }
.brand__mark span:nth-child(3) { height: 14px; opacity: .65; }
.brand__text { display: grid; line-height: 1.15; }
.brand__text strong { max-width: 330px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.brand__text small { margin-top: 4px; color: #a9bdca; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.version-badge, .user-chip { padding: 5px 9px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; color: #cfe1eb; font-size: 12px; font-weight: 700; }
.topbar__account { display: flex; gap: 10px; align-items: center; }
.topbar__account form { margin: 0; }

.guest-body { background: radial-gradient(circle at 10% 8%, rgba(23,132,119,.13), transparent 31%), radial-gradient(circle at 91% 18%, rgba(47,111,237,.09), transparent 26%), #edf1f4; }
.guest-shell { width: min(100%, 1080px); min-height: calc(100vh - 126px); margin: 0 auto; padding: 52px 24px 34px; }
.guest-content { width: 100%; }
.guest-footer { padding: 0 20px 26px; color: #7a8492; font-size: 12px; text-align: center; }

.install-card, .login-card, .error-card { overflow: hidden; width: min(100%, 830px); margin: 0 auto; border: 1px solid rgba(22,48,69,.08); border-radius: 24px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
.install-card { padding: 42px 48px 44px; }
.install-card__header { margin-bottom: 28px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.install-card h1, .login-card h1, .error-card h1, .page-header h1 { margin-bottom: 10px; color: var(--navy-deep); font-size: clamp(26px, 4vw, 36px); line-height: 1.22; letter-spacing: -.035em; }
.install-card__header p, .login-card__form > p, .page-header p { margin: 0; color: var(--muted); font-size: 14px; }

.install-steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0 0 34px; padding: 0; list-style: none; }
.install-steps::before { position: absolute; z-index: 0; top: 16px; right: 10%; left: 10%; height: 2px; background: #e1e7eb; content: ""; }
.install-steps li { position: relative; z-index: 1; display: grid; place-items: center; gap: 6px; color: #9aa3ae; }
.install-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #dfe5e9; border-radius: 50%; background: #fff; font-size: 12px; font-weight: 800; }
.install-steps li small { font-size: 11px; font-weight: 700; }
.install-steps li.is-current { color: var(--teal); }
.install-steps li.is-current > span { border-color: var(--teal); background: var(--teal); color: #fff; box-shadow: 0 0 0 5px var(--teal-soft); }
.install-steps li.is-complete { color: #398d83; }
.install-steps li.is-complete > span { border-color: #74b6ad; background: #eaf6f4; color: var(--teal); }

.check-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.check-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 66px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.check-row:last-child { border-bottom: 0; }
.check-row strong { display: block; font-size: 13px; }
.check-row p { overflow-wrap: anywhere; margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px currentColor; }
.status-dot--pass { background: var(--teal); color: rgba(23,132,119,.13); }
.status-dot--warning { background: #df982b; color: rgba(223,152,43,.14); }
.status-dot--fail { background: var(--danger); color: rgba(184,58,69,.13); }
.status-label { min-width: 44px; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; text-align: center; }
.status-label--pass { background: var(--teal-soft); color: #147468; }
.status-label--warning { background: var(--amber-soft); color: #9a5c0c; }
.status-label--fail { background: var(--danger-soft); color: var(--danger); }

.form-stack { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 18px; }
.form-grid--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field { display: grid; gap: 7px; }
.field > span:first-child { color: #334354; font-size: 13px; font-weight: 750; }
.field em { color: #8993a1; font-size: 10px; font-style: normal; font-weight: 700; }
.field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #cad3db; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(23,132,119,.12); }
.field input:user-invalid { border-color: var(--danger); }
.field small { color: #7a8593; font-size: 11px; line-height: 1.5; }
.field small code, .notice-box code { padding: 1px 4px; border-radius: 4px; background: #edf1f4; color: #33485b; }
.field--compact { max-width: 180px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 65px; }
.password-field button { position: absolute; top: 50%; right: 8px; height: 30px; padding: 0 9px; transform: translateY(-50%); border: 0; border-radius: 7px; background: #edf2f4; color: #526170; font-size: 11px; font-weight: 800; cursor: pointer; }
.password-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: -8px; }
.password-meter > span { height: 4px; border-radius: 999px; background: #e1e6ea; transition: background .2s; }
.password-meter > span.is-on { background: var(--amber); }
.password-meter[data-score="3"] > span.is-on, .password-meter[data-score="4"] > span.is-on { background: var(--teal); }
.password-meter small { grid-column: 1 / -1; color: #808b98; font-size: 10px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 780; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(47,111,237,.25); outline-offset: 2px; }
.button:disabled { opacity: .46; cursor: not-allowed; }
.button--primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(23,132,119,.2); }
.button--primary:hover:not(:disabled) { background: #11776c; }
.button--secondary { border-color: #cfd8df; background: #fff; color: #344657; }
.button--quiet { border-color: rgba(255,255,255,.17); background: transparent; color: #d9e6ed; }
.button--small { min-height: 32px; padding: 0 11px; font-size: 11px; }
.button--wide { width: 100%; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.form-actions--split { justify-content: space-between; }
.form-actions--center { justify-content: center; }
.form-hint { flex: 1; margin: 0; font-size: 12px; }
.form-hint--success { color: var(--teal); }
.form-hint--danger { color: var(--danger); }

.alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 12px; font-weight: 650; }
.alert button { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.alert--danger { border-color: #f0c8cc; background: var(--danger-soft); color: #972f39; }
.alert--success { border-color: #bee1dc; background: var(--teal-soft); color: #126b62; }
.notice-box { padding: 16px 18px; border: 1px solid #d9e2e8; border-radius: 12px; background: #f7f9fa; }
.notice-box strong { display: block; margin-bottom: 7px; color: #344657; font-size: 12px; }
.notice-box p, .notice-box ul { margin: 0; color: var(--muted); font-size: 11px; }
.notice-box ul { display: grid; gap: 4px; padding-left: 18px; }
.notice-box--important { border-color: #c9dedb; background: #f0f8f6; }
.connection-summary { display: flex; gap: 13px; align-items: center; margin-bottom: 22px; padding: 12px 15px; border-radius: 10px; background: var(--teal-soft); }
.connection-summary div { display: grid; }
.connection-summary strong { font-size: 12px; }
.connection-summary small { color: #46756f; font-size: 11px; }

.install-card--finish { text-align: center; }
.finish-mark { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 22px; border-radius: 22px; background: var(--teal-soft); color: var(--teal); font-size: 34px; font-weight: 900; transform: rotate(-4deg); }
.install-card--finish > p { color: var(--muted); font-size: 14px; }
.finish-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; }
.finish-grid div { display: grid; gap: 3px; padding: 16px 10px; border-right: 1px solid var(--line); }
.finish-grid div:last-child { border-right: 0; }
.finish-grid strong { font-size: 11px; }
.finish-grid span { color: var(--teal); font-size: 12px; font-weight: 800; }
.install-card--finish .notice-box { text-align: left; }

.login-card { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 500px; }
.login-card__visual { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 42px; background: linear-gradient(155deg, #173b50, #0e2437); color: #fff; }
.login-card__visual::before { position: absolute; top: -80px; left: -90px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.018); content: ""; }
.login-card__visual p { position: relative; z-index: 1; margin: 28px 0 0; color: #d7e7ee; font-size: 20px; font-weight: 700; line-height: 1.5; letter-spacing: -.02em; }
.shelf-illustration { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 7px; height: 130px; padding: 0 10px 10px; border-bottom: 9px solid #966b46; }
.shelf-illustration span { display: block; width: 36px; border-radius: 4px 4px 1px 1px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.17); }
.shelf-illustration span:nth-child(1) { height: 90px; background: #2d8d80; }
.shelf-illustration span:nth-child(2) { height: 110px; background: #cf8b38; }
.shelf-illustration span:nth-child(3) { width: 29px; height: 80px; background: #5d7f9b; }
.shelf-illustration span:nth-child(4) { height: 119px; background: #8a5360; transform: rotate(4deg); transform-origin: bottom; }
.shelf-illustration span:nth-child(5) { width: 30px; height: 99px; background: #d1b870; }
.login-card__form { align-self: center; padding: 52px 50px; }
.login-card__form .form-stack { margin-top: 28px; }
.security-note { margin: 18px 0 0; color: #7e8996; font-size: 10px; text-align: center; }
.security-note span { margin-right: 5px; color: var(--teal); }

.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); width: min(1440px, 100%); min-height: calc(100vh - 72px); margin: 0 auto; }
.sidebar { display: flex; position: sticky; top: 72px; flex-direction: column; justify-content: space-between; height: calc(100vh - 72px); padding: 28px 18px 20px; border-right: 1px solid #d7dee4; background: #f7f9fa; }
.sidebar__nav { display: grid; gap: 5px; }
.nav-item { display: flex; gap: 11px; align-items: center; min-height: 43px; padding: 0 13px; border-radius: 9px; color: #5d6977; font-size: 13px; font-weight: 700; text-decoration: none; }
.nav-item:hover { background: #edf2f4; color: var(--navy); }
.nav-item.is-active { background: var(--teal-soft); color: #126e64; }
.nav-icon { display: grid; place-items: center; width: 22px; height: 22px; font-size: 15px; }
.sidebar__version { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 9px; background: #edf1f3; color: #7a8591; font-size: 10px; }
.sidebar__version strong { color: #4b5c6c; }
.main-content { width: 100%; max-width: 1210px; padding: 42px 44px 70px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.page-header h1 { margin-bottom: 7px; font-size: 32px; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.metric-card { display: flex; gap: 16px; align-items: center; min-height: 126px; padding: 22px; border: 1px solid #dfe4e8; border-radius: var(--radius); background: #fff; box-shadow: 0 7px 25px rgba(25,45,60,.045); }
.metric-card__icon { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 19px; font-weight: 900; }
.metric-card__icon--green { background: var(--teal-soft); color: var(--teal); }
.metric-card__icon--blue { background: var(--blue-soft); color: var(--blue); }
.metric-card__icon--amber { background: var(--amber-soft); color: var(--amber); }
.metric-card__icon--muted { background: #eef1f4; color: #768291; }
.metric-card div { display: grid; }
.metric-card small { color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-card strong { color: var(--navy-deep); font-size: 22px; letter-spacing: -.025em; }
.metric-card p { margin: 3px 0 0; color: #8a949e; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.panel { padding: 26px; border: 1px solid #dfe4e8; border-radius: var(--radius); background: #fff; box-shadow: 0 7px 25px rgba(25,45,60,.04); }
.panel__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel h2 { margin: 0; color: var(--navy-deep); font-size: 18px; letter-spacing: -.02em; }
.panel--accent { overflow: hidden; border: 0; background: linear-gradient(150deg, #173b50, #10283b); color: #fff; box-shadow: 0 12px 35px rgba(16,38,58,.19); }
.panel--accent .eyebrow { color: #55c4b6; }
.panel--accent h2 { margin-bottom: 12px; color: #fff; font-size: 22px; }
.panel--accent > p { color: #c2d2db; font-size: 12px; }
.readiness-list { display: grid; }
.readiness-list > div { display: grid; grid-template-columns: auto 145px 1fr; gap: 14px; align-items: center; min-height: 55px; border-bottom: 1px solid #e7ebee; }
.readiness-list > div:last-child { border-bottom: 0; }
.readiness-list strong { font-size: 12px; }
.readiness-list small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mini-roadmap { display: grid; gap: 10px; margin: 25px 0 0; padding: 0; list-style: none; }
.mini-roadmap li { display: flex; gap: 10px; align-items: center; color: #dce8ee; font-size: 11px; }
.mini-roadmap span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: rgba(255,255,255,.09); color: #76d1c6; font-size: 10px; font-weight: 800; }
.panel--form { max-width: 780px; }

.metric-grid--four { grid-template-columns: repeat(4, 1fr); }
.metric-card--compact { min-height: 108px; padding: 18px; }
.metric-card--compact .metric-card__icon { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.library-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 20px; margin-bottom: 20px; }
.scan-monitor { min-width: 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; background: #eef1f4; color: #65717e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-pill--queued { background: var(--amber-soft); color: #945a0d; }
.status-pill--running { background: var(--blue-soft); color: #285fc9; }
.status-pill--completed { background: var(--teal-soft); color: #126f65; }
.status-pill--failed { background: var(--danger-soft); color: var(--danger); }
.scan-progress { position: relative; overflow: hidden; height: 5px; margin: -3px 0 16px; border-radius: 999px; background: #edf0f3; }
.scan-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); }
.scan-progress.is-active span { width: 38%; animation: scan-progress 1.4s ease-in-out infinite; }
@keyframes scan-progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(365%); } }
.scan-message { min-height: 20px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.scan-counters { display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; }
.scan-counters > div { display: grid; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--line); text-align: center; }
.scan-counters > div:last-child { border-right: 0; }
.scan-counters small { color: var(--muted); font-size: 9px; }
.scan-counters strong { color: var(--navy-deep); font-size: 16px; }
.scan-meta { display: grid; gap: 10px; }
.scan-meta > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 11px; }
.scan-meta small { color: var(--muted); font-weight: 700; }
.scan-meta code, .scan-meta span { overflow-wrap: anywhere; color: #3e5061; }
.safety-panel { background: linear-gradient(155deg, #f7fbfa, #fff); }
.safety-panel h2 { margin-bottom: 16px; line-height: 1.35; }
.safety-list { display: grid; gap: 12px; margin: 0 0 22px; padding: 0; list-style: none; }
.safety-list li { display: flex; gap: 9px; color: #596979; font-size: 11px; line-height: 1.55; }
.safety-list span { flex: 0 0 auto; color: var(--teal); font-weight: 900; }
.text-link { color: var(--teal); font-size: 11px; font-weight: 800; text-decoration: none; }
.history-panel { min-width: 0; }
.history-panel .panel__header > small { color: var(--muted); font-size: 9px; }
.table-scroll { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.history-table th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: left; }
.history-table td { padding: 12px 10px; border-bottom: 1px solid #edf0f2; color: #465767; }
.history-table tr:last-child td { border-bottom: 0; }

.diagnostic-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.diagnostic-summary > div { display: grid; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.diagnostic-summary small { color: var(--muted); font-size: 10px; font-weight: 700; }
.diagnostic-summary strong { margin: 3px 0; color: var(--navy-deep); font-size: 16px; }
.diagnostic-summary span { overflow: hidden; color: #86919d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.text-pass { color: var(--teal) !important; }
.text-warning { color: var(--amber) !important; }
.diagnostic-panel { margin-bottom: 18px; }
.check-list--compact .check-row { min-height: 57px; }
.path-value { font-family: "SFMono-Regular", Consolas, monospace; }
.cron-panel > p { color: var(--muted); font-size: 12px; }
.cron-panel > p code { padding: 1px 4px; border-radius: 4px; background: #edf1f4; }
.command-label { display: block; margin: 14px 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.copy-field { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid #d6dee4; border-radius: 10px; background: #f7f9fa; }
.copy-field code { flex: 1; overflow: auto; color: #32485a; font-size: 11px; white-space: nowrap; }

.version-panel { max-width: 800px; }
.version-comparison { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; margin-bottom: 24px; }
.version-comparison > div { display: grid; padding: 18px; border-radius: 12px; background: var(--surface-soft); text-align: center; }
.version-comparison small { color: var(--muted); font-size: 10px; }
.version-comparison strong { color: var(--navy); font-size: 22px; }
.version-comparison > span { color: #9ba5ae; }
.empty-state { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 12px; }
.empty-state--success { background: var(--teal-soft); }
.empty-state > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--teal); font-weight: 900; }
.empty-state strong { font-size: 13px; }
.empty-state p { margin: 2px 0 0; color: #5e7e7a; font-size: 11px; }
.migration-list { display: grid; gap: 7px; }
.migration-list > div { display: flex; gap: 15px; padding: 11px 13px; border-radius: 8px; background: var(--surface-soft); font-size: 11px; }
.update-notice { margin-bottom: 16px; }

.error-card { padding: 70px 40px; text-align: center; }
.error-code { display: inline-block; margin-bottom: 10px; color: var(--teal); font-size: 64px; font-weight: 900; letter-spacing: -.06em; }
.error-card p { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; overflow-x: auto; width: 100%; height: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid #d7dee4; }
    .sidebar__nav { display: flex; min-width: max-content; }
    .nav-item { min-height: 38px; }
    .sidebar__version { display: none; }
    .main-content { padding: 30px 24px 60px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-grid--four { grid-template-columns: repeat(2, 1fr); }
    .metric-card { min-height: 105px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .library-grid { grid-template-columns: 1fr; }
    .login-card { grid-template-columns: 1fr; width: min(100%, 570px); }
    .login-card__visual { display: none; }
}

@media (max-width: 640px) {
    .topbar { height: 64px; }
    .topbar__inner { padding: 0 16px; }
    .brand__text strong { max-width: 190px; }
    .app-shell { min-height: calc(100vh - 64px); }
    .guest-shell { padding: 26px 12px 24px; }
    .install-card { padding: 30px 20px 32px; border-radius: 18px; }
    .install-card h1, .login-card h1, .error-card h1 { font-size: 25px; }
    .install-steps li small { display: none; }
    .install-steps { margin-bottom: 28px; }
    .form-grid--2 { grid-template-columns: 1fr; }
    .field--compact { max-width: none; }
    .form-actions--split { align-items: stretch; }
    .button { min-height: 44px; }
    .check-row { grid-template-columns: auto 1fr; }
    .check-row .status-label { display: none; }
    .finish-grid { grid-template-columns: 1fr; }
    .finish-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
    .finish-grid div:last-child { border-bottom: 0; }
    .login-card__form { padding: 38px 24px; }
    .main-content { padding: 26px 16px 50px; }
    .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
    .page-header h1 { font-size: 28px; }
    .metric-card { padding: 18px; }
    .metric-grid--four { grid-template-columns: 1fr; }
    .metric-card--compact { min-height: 94px; }
    .panel { padding: 20px; }
    .readiness-list > div { grid-template-columns: auto 1fr; padding: 11px 0; }
    .readiness-list small { grid-column: 2; }
    .diagnostic-summary { grid-template-columns: 1fr; }
    .scan-counters { grid-template-columns: repeat(3, 1fr); }
    .scan-counters > div:nth-child(3) { border-right: 0; }
    .scan-counters > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .scan-meta > div { grid-template-columns: 1fr; gap: 2px; }
    .copy-field { align-items: stretch; flex-direction: column; }
    .version-comparison { gap: 8px; }
    .version-comparison > div { padding: 14px 8px; }
    .version-comparison strong { font-size: 17px; }
    .topbar__account .user-chip { display: none; }
}
