:root {
  --blue: #010ed0;
  --blue-dark: #0a0d31;
  --blue-soft: #e9ebff;
  --ink: #171a22;
  --muted: #68707d;
  --line: #e4e7ec;
  --surface: #ffffff;
  --canvas: #f5f6f8;
  --green: #168a54;
  --green-soft: #e9f7f0;
  --red: #d53d45;
  --red-soft: #fff0f1;
  --amber: #a86705;
  --amber-soft: #fff7e8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 13, 49, .06);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: currentColor; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.brand { height: 104px; padding: 25px 27px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border-bottom: 1px solid #f0f1f4; }
.brand img { width: 180px; height: auto; display: block; }
.brand span { margin: 6px 0 0 44px; font-size: .66rem; letter-spacing: .28em; font-weight: 800; color: var(--blue); }
.nav { padding: 24px 14px; display: grid; gap: 6px; }
.nav > a { min-height: 46px; padding: 0 14px; display: flex; gap: 13px; align-items: center; border-radius: 10px; color: #545b67; font-size: .91rem; font-weight: 650; transition: .18s ease; }
.nav > a:hover { color: var(--blue); background: #f6f7ff; }
.nav > a.active { color: var(--blue); background: var(--blue-soft); box-shadow: inset 3px 0 var(--blue); }
.nav svg { width: 21px; height: 21px; flex: none; }
.nav-label { padding: 27px 14px 7px; color: #9ba1ab; font-size: .68rem; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; padding: 22px 27px; border-top: 1px solid #f0f1f4; color: #9ba1ab; display: grid; gap: 10px; }
.sidebar-foot small { font-size: .69rem; }
.security-note { color: #4f5662; font-size: .73rem; font-weight: 650; }
.security-note span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); margin-right: 8px; }

.shell { min-height: 100vh; margin-left: 260px; }
.topbar { height: 76px; padding: 0 clamp(22px, 3vw, 46px); display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }
.topbar-title { font-size: .83rem; color: #8a9099; font-weight: 650; }
.global-search { width: min(560px, 46vw); margin-left: clamp(8px, 2vw, 34px); position: relative; }
.global-search svg { width: 19px; height: 19px; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #858c98; pointer-events: none; }
.global-search input { width: 100%; height: 44px; padding: 0 46px 0 43px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: var(--surface); font-size: .86rem; }
.global-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1,14,208,.1); }
.global-search input::placeholder { color: #8a919d; }
.global-search kbd { min-width: 23px; height: 23px; padding: 0 6px; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: #858c98; background: var(--canvas); font: 700 .72rem/1 ui-monospace, monospace; pointer-events: none; }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 11px; color: #fff; background: var(--blue-dark); font-weight: 800; font-size: .84rem; }
.avatar.small { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }
.user-copy { display: grid; min-width: 120px; }
.user-copy strong { font-size: .81rem; }
.user-copy span { font-size: .7rem; color: var(--muted); }
.user-copy:hover strong { color: var(--blue); }
.logout-btn, .icon-btn { border: 0; background: transparent; color: #77808c; cursor: pointer; display: grid; place-items: center; }
.logout-btn { width: 34px; height: 34px; margin-left: 4px; }
.logout-btn:hover { color: var(--blue); }
.logout-btn svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }
.menu-btn svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 2; }

.content { width: min(1440px, 100%); margin: 0 auto; padding: 42px clamp(22px, 3.2vw, 52px) 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.page-head.compact { margin-bottom: 22px; }
.page-head h1 { margin: 5px 0 6px; color: var(--blue-dark); font-size: clamp(1.75rem, 2.5vw, 2.42rem); line-height: 1.1; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); font-size: .93rem; }
.eyebrow { color: var(--blue); font-size: .68rem; line-height: 1.2; font-weight: 850; letter-spacing: .18em; }
.eyebrow.light { color: #aeb3ff; }
.btn { min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; font-weight: 750; font-size: .84rem; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(1,14,208,.18); }
.btn.primary:hover { background: #000bb8; box-shadow: 0 10px 22px rgba(1,14,208,.25); }
.btn.secondary { color: var(--blue-dark); background: #fff; border-color: var(--line); }
.btn.secondary:hover { border-color: #bdc2ca; }
.btn.danger { color: #fff; background: var(--red); }
.btn.danger.ghost { color: var(--red); background: transparent; border-color: #f2cdd0; }
.btn.wide { width: 100%; justify-content: space-between; margin-top: 5px; }
.plus { font-size: 1.25rem; font-weight: 400; line-height: 1; }
.back-link { display: inline-block; color: #737b87; font-size: .79rem; font-weight: 700; margin: -12px 0 20px; }
.back-link:hover { color: var(--blue); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; margin-bottom: 22px; }
.stat-card { min-height: 154px; padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -32px; bottom: -45px; width: 110px; height: 110px; border: 18px solid rgba(1,14,208,.035); border-radius: 50%; }
.stat-card.cobalt { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 14px 30px rgba(1,14,208,.22); }
.stat-card.cobalt::after { border-color: rgba(255,255,255,.09); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .75rem; font-weight: 750; }
.stat-card.cobalt .stat-top, .stat-card.cobalt small { color: rgba(255,255,255,.72); }
.stat-top svg { width: 22px; color: var(--blue); }
.stat-top svg.green { color: var(--green); }
.stat-top svg.red { color: var(--red); }
.stat-card strong { margin-top: auto; font-size: 2rem; line-height: 1; letter-spacing: -.03em; }
.stat-card small { margin-top: 7px; color: #858c96; font-size: .72rem; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(285px, .78fr); gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 82px; padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-head h2 { margin: 0 0 4px; color: var(--blue-dark); font-size: 1rem; letter-spacing: -.015em; }
.panel-head p { margin: 0; color: #8b929d; font-size: .75rem; }
.panel-head > a { color: var(--blue); font-size: .75rem; font-weight: 750; }
.panel-head > a span { margin-left: 5px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .79rem; }
th { padding: 11px 18px; background: #fafbfc; color: #969ca5; font-size: .65rem; text-transform: uppercase; letter-spacing: .075em; text-align: left; white-space: nowrap; }
td { padding: 15px 18px; border-top: 1px solid #eef0f3; color: #4d5460; white-space: nowrap; }
tbody tr:hover { background: #fcfcff; }
td small, .device-name + small { display: block; margin-top: 3px; color: #969ca5; font-size: .69rem; }
.device-name { color: var(--blue-dark); font-weight: 780; }
.device-name:hover { color: var(--blue); }
.row-link { color: var(--blue); font-size: 1rem; font-weight: 800; }
.status { min-width: 84px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 20px; font-size: .68rem; font-weight: 750; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.success { color: var(--green); background: var(--green-soft); }
.status.failed { color: var(--red); background: var(--red-soft); }
.status.queued { color: var(--amber); background: var(--amber-soft); }
.status.running { color: var(--blue); background: var(--blue-soft); }
.status.neutral { color: #747c87; background: #f0f1f3; }
.schedule-list { padding: 6px 20px 2px; }
.schedule-item { display: flex; align-items: center; gap: 13px; padding: 15px 2px; border-bottom: 1px solid #eef0f3; }
.schedule-item:hover .schedule-copy strong { color: var(--blue); }
.schedule-item > span:last-child { margin-left: auto; color: var(--blue); }
.schedule-date { width: 45px; height: 49px; flex: none; display: grid; place-content: center; text-align: center; background: var(--blue-soft); border-radius: 9px; color: var(--blue); font-size: .59rem; text-transform: uppercase; }
.schedule-date b { font-size: 1rem; line-height: 1; }
.schedule-copy { min-width: 0; display: grid; }
.schedule-copy strong { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.schedule-copy small { margin-top: 3px; color: #9097a1; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; }
.outline-action { margin: 17px 20px 20px; min-height: 39px; border: 1px dashed #cdd1d9; border-radius: 8px; display: grid; place-items: center; color: var(--blue); font-size: .73rem; font-weight: 750; }
.empty-state { min-height: 250px; padding: 40px 24px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state.full { grid-column: 1/-1; }
.empty-state h3 { margin: 13px 0 4px; font-size: .95rem; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: .79rem; }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 12px; font-size: 1.3rem; }
.empty-compact { padding: 32px 4px; color: var(--muted); font-size: .78rem; text-align: center; }

.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.company-card { min-height: 250px; padding: 22px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.company-card:hover { transform: translateY(-3px); border-color: #c6caff; box-shadow: 0 16px 34px rgba(10,13,49,.1); }
.company-mark { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 12px; font-size: .75rem; font-weight: 850; letter-spacing: .04em; }
.company-mark.large { width: 68px; height: 68px; border-radius: 16px; font-size: 1rem; }
.company-copy { margin-top: 20px; }
.company-copy .tag { color: var(--blue); font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 800; }
.company-copy h2 { margin: 7px 0 7px; color: var(--blue-dark); font-size: 1.13rem; }
.company-copy p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.company-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid #eef0f3; display: flex; justify-content: space-between; color: #868d98; font-size: .72rem; font-weight: 650; }
.company-foot .arrow { color: var(--blue); font-size: 1rem; }
.heading-with-mark { display: flex; align-items: center; gap: 18px; }
.company-heading { align-items: center; }
.mini-stats { margin: -6px 0 22px; display: flex; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.mini-stats > div { flex: 1; padding: 15px 21px; background: #fff; display: flex; align-items: center; justify-content: space-between; }
.mini-stats span { color: var(--muted); font-size: .74rem; }
.mini-stats strong { color: var(--blue-dark); font-size: 1rem; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.table-actions form { margin: 0; }
.icon-action, .text-action { border: 0; background: transparent; color: var(--blue); font-weight: 750; cursor: pointer; }
.icon-action { width: 28px; height: 28px; border: 1px solid #dfe2e8; border-radius: 7px; }
.danger-zone { margin-top: 22px; padding: 18px 20px; border: 1px solid #f0d6d8; border-radius: 11px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.danger-zone strong { font-size: .82rem; }
.danger-zone p { margin: 3px 0 0; color: var(--muted); font-size: .73rem; }

.form-layout { display: grid; gap: 17px; }
.form-section { padding: 25px 28px 28px; display: grid; grid-template-columns: 48px 195px 1fr; gap: 17px; align-items: start; overflow: visible; }
.section-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: .7rem; font-weight: 850; }
.section-intro h2 { margin: 3px 0 5px; color: var(--blue-dark); font-size: .95rem; }
.section-intro p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.field { display: grid; gap: 7px; color: #49515d; font-size: .74rem; font-weight: 720; }
.field > span { min-height: 18px; }
.field em { color: #9ba1aa; font-size: .65rem; font-weight: 500; font-style: normal; }
.field input, .field select, .field textarea, .inline-form select { width: 100%; border: 1px solid #dfe2e7; border-radius: 8px; outline: none; color: var(--blue-dark); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input, .field select { height: 43px; padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1,14,208,.09); }
.field input::placeholder, .field textarea::placeholder { color: #afb4bd; }
.field.span-2, .switch-field.span-2 { grid-column: span 2; }
.field.grow { grid-column: span 1; }
.field.port { max-width: 140px; }
.weekday-row { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-row label input { position: absolute; opacity: 0; }
.weekday-row label span { min-width: 44px; height: 36px; display: grid; place-items: center; border: 1px solid #dfe2e7; border-radius: 8px; color: #737a84; background: #fff; cursor: pointer; font-size: .68rem; }
.weekday-row label input:checked + span { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); font-weight: 800; }
.switch-field { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.switch-field input { position: absolute; opacity: 0; }
.switch { width: 40px; height: 22px; padding: 3px; border-radius: 20px; background: #ccd0d7; transition: .15s; }
.switch::after { content: ""; display: block; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-field input:checked + .switch { background: var(--blue); }
.switch-field input:checked + .switch::after { transform: translateX(18px); }
.switch-field > span:last-child { display: grid; }
.switch-field strong { font-size: .74rem; }
.switch-field small { color: var(--muted); font-size: .66rem; }
.form-actions { padding: 10px 0; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; }

.filter-row { display: flex; gap: 7px; margin: -8px 0 18px; }
.filter { padding: 7px 12px; color: #777f8b; background: #fff; border: 1px solid var(--line); border-radius: 20px; font-size: .71rem; font-weight: 700; }
.filter.active { color: #fff; background: var(--blue-dark); border-color: var(--blue-dark); }
.backup-page-head > form { margin: 0; }
.backup-picker-panel { margin-bottom: 20px; overflow: visible; }
.backup-picker { padding: 22px; display: grid; grid-template-columns: minmax(210px, 1.2fr) minmax(240px, 1.4fr) minmax(170px, .8fr) auto; gap: 14px; align-items: end; }
.backup-picker .btn { height: 43px; }
.backup-context { margin: 0 0 16px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 10px; background: #fff; }
.context-label { color: var(--blue); font-size: .65rem; font-weight: 850; letter-spacing: .13em; }
.backup-context h2 { margin: 5px 0 3px; color: var(--blue-dark); font-size: 1.06rem; }
.backup-context h2 span { margin: 0 9px; color: #adb2bb; font-weight: 400; }
.backup-context p { margin: 0; color: var(--muted); font-size: .75rem; }
.backup-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.backup-actions form { margin: 0; }
.backup-empty-selection { min-height: 260px; }
.retention-panel { max-width: 960px; margin-top: 22px; padding: 22px 24px; display: flex; align-items: end; justify-content: space-between; gap: 30px; overflow: visible; }
.retention-copy { max-width: 590px; }
.retention-copy h2 { margin: 6px 0 4px; color: var(--blue-dark); font-size: 1.04rem; }
.retention-copy p { margin: 0; color: var(--muted); font-size: .76rem; }
.retention-panel form { display: grid; grid-template-columns: 130px auto; align-items: end; gap: 10px; }
.retention-panel .btn { height: 43px; }
.download-link { color: var(--blue); font-size: .71rem; font-weight: 780; }
.detail-strip { margin-bottom: 20px; padding: 18px 22px; display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.detail-strip > div { display: grid; gap: 7px; }
.detail-strip > div > span:first-child { color: #969ca5; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.detail-strip strong, .detail-strip code { font-size: .78rem; }
.config-panel { padding-bottom: 16px; }
.config-panel pre { max-height: 620px; margin: 16px; padding: 20px; overflow: auto; border-radius: 9px; color: #d7dcff; background: var(--blue-dark); font: .75rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre; }
.person { display: flex; align-items: center; gap: 10px; }
.person > span:last-child { display: grid; }
.person strong { color: var(--blue-dark); font-size: .78rem; }
.inline-form select { min-width: 126px; height: 34px; padding: 0 8px; font-size: .7rem; }
.text-action { font-size: .68rem; }
.danger-text { color: var(--red); }
.you-label { color: #9ba1aa; font-size: .68rem; }
.permission-note { margin-top: 16px; color: #6e7580; font-size: .73rem; }

.modal { width: min(500px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(10,13,49,.25); }
.modal::backdrop { background: rgba(10,13,49,.58); backdrop-filter: blur(3px); }
.modal form { padding: 26px; display: grid; gap: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; }
.modal-head h2 { margin: 6px 0 0; color: var(--blue-dark); font-size: 1.35rem; }
.modal-close { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: #777f8a; background: #fff; font-size: 1.3rem; cursor: pointer; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 5px; }
.alert { margin-bottom: 18px; padding: 12px 15px; border-radius: 9px; font-size: .74rem; }
.alert.error { color: #a62d35; background: var(--red-soft); border: 1px solid #f2cdd0; }
.alert.success { color: #087044; background: var(--green-soft); border: 1px solid #c6ead8; }
.account-panel { max-width: 760px; }
.account-form { max-width: 540px; padding: 26px; display: grid; gap: 18px; }
.account-form .alert { margin: 0; }
.account-actions { padding-top: 3px; }
.error-page { min-height: 65vh; display: grid; place-items: center; align-content: center; text-align: center; }
.error-page > strong { color: var(--blue); font-size: 4rem; }
.error-page h1 { margin: 4px 0; color: var(--blue-dark); }
.error-page p { color: var(--muted); }

.vpn-summary { margin-bottom: 22px; padding: 20px 22px; display: flex; align-items: center; gap: 18px; }
.vpn-summary-main { min-width: 0; display: flex; align-items: center; gap: 15px; }
.vpn-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: .78rem; font-weight: 850; letter-spacing: .04em; }
.vpn-summary h2 { margin: 4px 0 3px; font-size: 1rem; }
.vpn-summary p { max-width: 720px; margin: 0; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.vpn-summary-status { margin-left: auto; display: grid; justify-items: end; gap: 5px; }
.vpn-summary-status small { color: var(--muted); font-size: .75rem; }
.vpn-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .7fr); gap: 18px; align-items: start; }
.vpn-side { display: grid; gap: 18px; }
.check-list { margin: 0; padding: 18px 22px 20px; list-style: none; display: grid; gap: 13px; }
.check-list li { padding-left: 24px; position: relative; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 850; }
.vpn-meta { margin: 0; padding: 8px 22px 18px; }
.vpn-meta > div { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.vpn-meta > div:last-child { border: 0; }
.vpn-meta dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.vpn-meta dd { margin: 0; font-size: .84rem; overflow-wrap: anywhere; }
.vpn-test-action { padding: 0 22px 20px; }
.alert.compact { margin: 0 22px 20px; }
.vpn-debug, .vpn-history { margin-top: 18px; }
.vpn-debug pre { max-height: 360px; margin: 0; padding: 20px 22px; overflow: auto; color: #d7dcff; background: var(--blue-dark); font: .78rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; }
.vpn-result { max-width: 460px; white-space: normal; overflow-wrap: anywhere; }
.field input[type="file"] { height: auto; min-height: 46px; padding: 10px 12px; }
.search-heading { align-items: center; }
.search-results { display: grid; gap: 18px; }
.search-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.search-group-head { min-height: 58px; padding: 0 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.search-group-head h2 { margin: 0; font-size: 1rem; }
.search-group-head > span { min-width: 27px; height: 27px; padding: 0 7px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); background: var(--canvas); font-size: .78rem; font-weight: 750; }
.search-list { display: grid; }
.search-result { min-height: 76px; padding: 13px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.result-mark { width: 39px; height: 39px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--blue); background: var(--blue-soft); font-size: .72rem; font-weight: 850; letter-spacing: .04em; }
.result-copy { min-width: 0; display: grid; gap: 4px; }
.result-copy strong { overflow: hidden; color: var(--ink); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.result-copy small { overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.search-result > .status { margin-left: auto; }
.result-arrow { margin-left: auto; color: var(--blue); font-weight: 800; }
.search-result > .status + .result-arrow { margin-left: 0; }

.login-body { min-height: 100vh; background: #fff; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(440px, 46%) 1fr; }
.login-brand-panel { min-height: 100vh; padding: clamp(40px, 6vw, 88px); display: flex; align-items: center; color: #fff; background: var(--blue-dark); position: relative; overflow: hidden; }
.login-brand-inner { max-width: 560px; position: relative; z-index: 2; }
.login-brand-inner > img { width: min(260px, 70%); filter: brightness(0) invert(1); margin-bottom: clamp(70px, 12vh, 130px); }
.login-brand-inner h1 { margin: 15px 0 20px; font-size: clamp(2.4rem, 4vw, 4.35rem); line-height: 1.03; letter-spacing: -.055em; }
.login-brand-inner p { max-width: 470px; margin: 0; color: #b9bed5; font-size: 1rem; line-height: 1.65; }
.login-signal { margin-top: 58px; color: #b9bed5; font-size: .75rem; }
.login-signal span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4fd596; box-shadow: 0 0 0 5px rgba(79,213,150,.12); margin-right: 10px; }
.grid-art { position: absolute; inset: auto -70px -90px auto; width: 420px; height: 420px; opacity: .17; transform: rotate(45deg); background-image: linear-gradient(rgba(222,224,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(222,224,255,.22) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle, #000 10%, transparent 68%); }
.login-form-panel { padding: 45px; display: grid; place-items: center; }
.login-card { width: min(410px, 100%); }
.login-card h2 { margin: 9px 0 7px; color: var(--blue-dark); font-size: 2rem; letter-spacing: -.035em; }
.login-card > .muted { margin: 0 0 32px; color: var(--muted); font-size: .85rem; }
.login-card .field { margin-bottom: 17px; }
.login-card .field input { height: 49px; }
.login-help { margin-top: 24px; color: #9aa0aa; font-size: .68rem; text-align: center; }
.mobile-logo { display: none; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .company-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-section { grid-template-columns: 45px 1fr; }
  .form-section .form-grid { grid-column: 2; }
  .vpn-layout { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(10,13,49,.12); }
  .sidebar.open { transform: translateX(0); }
  .shell { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar-title { display: none; }
  .global-search { width: auto; max-width: none; flex: 1; margin-left: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 28px; }
  .mobile-logo { display: block; margin-bottom: 70px; }
  .mobile-logo img { width: 205px; }
}

@media (max-width: 620px) {
  .content { padding-top: 28px; }
  .topbar { height: 66px; }
  .user-copy { display: none; }
  .topbar { padding-inline: 14px; gap: 8px; }
  .global-search input { padding-right: 14px; }
  .global-search kbd { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head .btn { width: 100%; }
  .stats-grid, .company-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 135px; }
  .form-section { padding: 21px 18px; grid-template-columns: 40px 1fr; }
  .form-section .form-grid { grid-column: 1/-1; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2, .switch-field.span-2 { grid-column: span 1; }
  .form-actions { grid-template-columns: 1fr; }
  .form-actions > span { display: none; }
  .form-actions .btn { width: 100%; }
  .backup-picker { grid-template-columns: 1fr; }
  .backup-picker .btn { width: 100%; }
  .backup-context, .retention-panel { align-items: stretch; flex-direction: column; }
  .backup-actions { align-items: stretch; flex-direction: column; }
  .backup-actions .btn { width: 100%; }
  .retention-panel form { grid-template-columns: 1fr; width: 100%; }
  .detail-strip { grid-template-columns: repeat(2,1fr); }
  .mini-stats { display: grid; }
  .company-heading { align-items: stretch; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .vpn-summary { align-items: stretch; flex-direction: column; }
  .vpn-summary-status { margin-left: 0; justify-items: start; }
  .vpn-summary .btn { width: 100%; }
  .search-result { align-items: flex-start; }
  .search-result > .status { display: none; }
  .result-copy small { white-space: normal; }
}
