:root {
  color-scheme: dark;
  --bg: #080d18;
  --bg-soft: #0d1524;
  --surface: rgba(15, 25, 41, .92);
  --surface-2: #111d30;
  --surface-3: #0a1321;
  --line: rgba(159, 181, 211, .13);
  --line-strong: rgba(159, 181, 211, .22);
  --text: #edf3fb;
  --muted: #8b9ab0;
  --dim: #5c6d84;
  --accent: #52f6e2;
  --accent-strong: #36d8cd;
  --danger: #ff8692;
  --warning: #f4c77c;
  --radius: 19px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 13% 4%, rgba(32, 97, 116, .16), transparent 32%),
    radial-gradient(ellipse at 96% 55%, rgba(91, 65, 151, .14), transparent 34%),
    var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; transform: none !important; }
.backdrop-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .14;
  background-image: linear-gradient(rgba(137, 166, 202, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(137, 166, 202, .07) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.glow { position: fixed; z-index: -1; width: 360px; height: 360px; border-radius: 50%; filter: blur(110px); opacity: .10; pointer-events: none; }
.glow-a { top: 18%; left: -260px; background: #55d5b0; }
.glow-b { right: -275px; bottom: 3%; background: #477ecf; }
.topbar {
  height: 78px;
  max-width: 1360px;
  padding: 0 34px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(164, 184, 213, .08);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { filter: drop-shadow(0 0 18px rgba(82, 246, 226, .17)); }
.brand-word { font-size: 15px; line-height: 1; font-weight: 900; letter-spacing: 2px; }
.brand-word small { display: block; margin-top: 6px; color: #71839b; font-size: 8px; font-weight: 750; letter-spacing: 2.3px; }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.security-indicator { color: #9aa9bd; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; display: flex; align-items: center; gap: 9px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 13px rgba(54, 216, 205, .62); }
.topbar-divider { width: 1px; height: 24px; background: var(--line); }
.shell { max-width: 1360px; margin: 0 auto; padding: 52px 34px 42px; }
.hidden { display: none !important; }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: 2.25px; display: flex; align-items: center; gap: 9px; }
.eyebrow > span { width: 22px; height: 1px; background: var(--accent); display: inline-block; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 15px; font-size: clamp(42px, 5.5vw, 68px); line-height: 1.04; font-weight: 850; letter-spacing: -3.6px; }
h1 em { color: var(--accent); font-style: normal; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.55px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 0; }
.login-layout { min-height: calc(100vh - 160px); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: center; gap: clamp(50px, 9vw, 150px); }
.login-copy { max-width: 610px; }
.login-copy h1 { margin-top: 22px; font-size: clamp(54px, 6vw, 78px); }
.login-description { max-width: 500px; color: #9aa9bd; font-size: 15px; line-height: 1.85; margin: 0 0 35px; }
.login-features { display: grid; gap: 18px; }
.login-feature { display: flex; gap: 14px; align-items: center; }
.feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--accent); background: rgba(82, 246, 226, .055); border: 1px solid rgba(82, 246, 226, .17); font-size: 18px; }
.login-feature b, .login-feature small { display: block; }
.login-feature b { font-size: 12px; font-weight: 780; }
.login-feature small { margin-top: 5px; color: #7f91a9; font-size: 10px; }
.login-foot { margin-top: 50px; color: #61728a; font-size: 8px; font-weight: 850; letter-spacing: 2px; }
.foot-mark { display: inline-block; width: 15px; height: 1px; margin: 0 9px 3px 0; background: var(--accent); }
.login-card, .surface, .metric-card, .server-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(17, 29, 48, .95), rgba(10, 18, 32, .97));
  box-shadow: 0 23px 70px rgba(0, 0, 0, .19);
}
.login-card { width: 100%; max-width: 460px; justify-self: end; padding: 35px; border-radius: 25px; }
.login-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.login-card-tag { color: #7f91a9; font-size: 8px; font-weight: 850; letter-spacing: 1.7px; padding-top: 6px; }
.login-card h2 { font-size: 25px; margin-bottom: 8px; }
.login-form { margin-top: 27px; }
label { display: block; margin-bottom: 9px; color: #c3cedd; font-size: 11px; font-weight: 760; }
.input-shell { height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #091321; border: 1px solid var(--line-strong); border-radius: 12px; color: #72869e; }
.input-shell:focus-within { border-color: rgba(82, 246, 226, .6); box-shadow: 0 0 0 3px rgba(82, 246, 226, .07); }
.input-shell input { border: 0; padding: 0; background: transparent; box-shadow: none !important; }
input, select {
  width: 100%;
  min-width: 0;
  height: 45px;
  padding: 0 13px;
  outline: none;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #091321;
  color: var(--text);
  font-size: 12px;
  transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus { border-color: rgba(82, 246, 226, .62); box-shadow: 0 0 0 3px rgba(82, 246, 226, .07); }
input::placeholder { color: #667991; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8294aa 50%), linear-gradient(135deg, #8294aa 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: #0e1a2b; color: var(--text); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 43px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-size: 11px; font-weight: 850; transition: transform .15s, filter .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button-primary { color: #061b1a; background: linear-gradient(105deg, #a5fff6, #4bded2); box-shadow: 0 9px 27px rgba(70, 219, 211, .13); }
.button-full { width: 100%; }
.button-full b { margin-left: auto; font-size: 15px; }
.button-ghost { color: #aebbd0; background: rgba(148, 171, 202, .035); border-color: var(--line); min-height: 34px; font-size: 10px; }
.button-secondary { color: var(--accent); background: rgba(82, 246, 226, .06); border-color: rgba(82, 246, 226, .19); }
.form-error { min-height: 15px; margin: 8px 0 0; color: var(--danger); font-size: 10px; line-height: 1.45; }
.login-card-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: #71839b; font-size: 9px; display: flex; gap: 9px; align-items: center; }
.lock-icon { color: var(--accent); }
.dashboard { animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dashboard-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.dashboard-heading h1 { margin: 15px 0 9px; font-size: clamp(39px, 4.7vw, 57px); }
.heading-copy { font-size: 12px; }
.account-status { display: flex; align-items: center; gap: 11px; min-width: 205px; margin-bottom: 5px; padding: 13px 16px; border: 1px solid rgba(82, 246, 226, .18); border-radius: 13px; background: rgba(82, 246, 226, .045); }
.account-status b, .account-status small { display: block; }
.account-status b { font-size: 8px; letter-spacing: 1.3px; }
.account-status small { margin-top: 5px; color: #8496ad; font-size: 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 37px; }
.metric-card { min-height: 128px; padding: 18px 20px; border-radius: 16px; }
.metric-primary { border-color: rgba(82, 246, 226, .22); background: linear-gradient(145deg, rgba(24, 54, 57, .77), rgba(12, 29, 37, .97)); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: #95a5ba; font-size: 8px; font-weight: 850; letter-spacing: 1.6px; }
.metric-label span { color: var(--accent); font-size: 16px; }
.metric-value { display: block; margin: 13px 0 3px; color: var(--text); font-size: 31px; font-weight: 850; letter-spacing: -1.2px; line-height: 1; }
.metric-value small { color: #8da0b8; font-size: 12px; font-weight: 750; letter-spacing: 0; }
.metric-caption { margin-top: 7px; color: #75869d; font-size: 9px; }
.metric-primary .metric-caption span { color: var(--accent); }
.section-block { margin-bottom: 29px; }
.section-heading, .surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { margin-top: 8px; }
.section-side-note { color: #6e8198; font-size: 9px; }
.servers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.server-card { padding: 17px 19px 14px; border-radius: 16px; }
.server-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.server-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.server-flag { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(159, 181, 211, .07); font-size: 23px; }
.server-title-wrap { min-width: 0; }
.server-name { display: block; font-size: 13px; font-weight: 850; }
.server-location { display: block; margin-top: 4px; color: #8395ac; font-size: 10px; }
.server-state { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; font-size: 9px; font-weight: 750; }
.server-state .status-dot { width: 6px; height: 6px; }
.server-state.offline .status-dot { background: var(--danger); box-shadow: none; }
.server-state.offline { color: var(--danger); }
.server-state.online { color: var(--accent); }
.server-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 17px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.server-detail small, .server-detail b { display: block; }
.server-detail small { margin-bottom: 5px; color: #62758e; font-size: 7px; font-weight: 850; letter-spacing: 1.35px; }
.server-detail b { color: #c8d4e3; font-size: 9px; font-weight: 700; overflow-wrap: anywhere; }
.server-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 11px; }
.server-primary { color: #71859c; font-size: 7px; font-weight: 850; letter-spacing: 1.3px; }
.text-button { padding: 0; border: 0; background: none; color: var(--accent); font-size: 9px; font-weight: 800; }
.server-empty { grid-column: 1/-1; color: var(--muted); padding: 22px; border: 1px dashed var(--line-strong); border-radius: 15px; font-size: 11px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; margin: 0 0 20px; }
.notice-warning { border: 1px solid rgba(244, 199, 124, .25); background: rgba(244, 199, 124, .07); color: #eed19d; }
.notice-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(244, 199, 124, .14); font-size: 11px; font-weight: 900; }
.notice b, .notice small { display: block; }
.notice b { font-size: 10px; }
.notice small { margin-top: 4px; color: #b99d72; font-size: 9px; line-height: 1.5; }
.workspace-grid { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.42fr); gap: 14px; align-items: start; }
.surface { min-width: 0; border-radius: 18px; padding: 22px; }
.section-number { color: #596d85; font-size: 10px; font-weight: 850; letter-spacing: 1px; }
.surface-heading h2 { margin-top: 8px; }
.surface-description { margin: 16px 0 0; max-width: 360px; color: #899bb2; font-size: 10px; line-height: 1.65; }
.create-form { display: grid; gap: 15px; margin-top: 22px; }
.form-field { min-width: 0; }
.form-field > small { display: block; margin-top: 7px; color: #6f829a; font-size: 8px; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.create-form .button-full { margin-top: 2px; }
.create-note { display: flex; gap: 11px; margin-top: 21px; padding: 13px; border: 1px solid rgba(82, 246, 226, .13); border-radius: 12px; background: rgba(82, 246, 226, .045); }
.create-note > span { color: var(--accent); font-size: 16px; }
.create-note p { margin: 0; }
.create-note b, .create-note small { display: block; }
.create-note b { font-size: 9px; }
.create-note small { margin-top: 5px; color: #7c91a8; font-size: 8px; line-height: 1.5; }
.devices-surface { min-height: 445px; }
.devices-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 19px 0 14px; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(290px, 100%); height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(4, 11, 20, .55); color: #70849b; }
.search-box input { height: 34px; border: 0; padding: 0; background: transparent; box-shadow: none !important; font-size: 10px; }
.device-summary { flex: 0 0 auto; color: #71839a; font-size: 8px; }
.devices-list { display: grid; gap: 11px; }
.device-card { min-width: 0; padding: 15px; border: 1px solid rgba(159, 181, 211, .13); border-radius: 14px; background: rgba(5, 13, 24, .58); }
.device-card-head { display: flex; justify-content: space-between; align-items: center; gap: 13px; }
.device-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.device-avatar { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(82, 246, 226, .16); border-radius: 11px; background: rgba(82, 246, 226, .06); font-size: 18px; }
.device-name-block { min-width: 0; }
.device-name { margin: 0; color: #e6edf7; font-size: 12px; font-weight: 850; overflow-wrap: anywhere; }
.device-subline { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; color: #73869f; font-size: 8px; }
.status-badge { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 23px; padding: 0 9px; border: 1px solid transparent; border-radius: 20px; font-size: 8px; font-weight: 800; }
.status-active { color: var(--accent); border-color: rgba(82, 246, 226, .2); background: rgba(82, 246, 226, .07); }
.status-paused { color: #b1bdd0; border-color: rgba(159, 181, 211, .18); background: rgba(159, 181, 211, .06); }
.status-expired, .status-limit { color: var(--danger); border-color: rgba(255, 134, 146, .2); background: rgba(255, 134, 146, .07); }
.device-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 16px; padding: 12px 0; border-top: 1px solid rgba(159, 181, 211, .08); border-bottom: 1px solid rgba(159, 181, 211, .08); }
.device-stat { min-width: 0; }
.device-stat small, .device-stat b { display: block; }
.device-stat small { color: #63768e; font-size: 7px; font-weight: 850; letter-spacing: 1.2px; }
.device-stat-value { margin-top: 5px; color: #c5d1e0; font-size: 9px; font-weight: 750; overflow-wrap: anywhere; }
.device-stat-value.is-warning { color: var(--warning); }
.device-stat-value.is-danger { color: var(--danger); }
.traffic-progress-wrap { margin-top: 11px; }
.progress-header { display: flex; justify-content: space-between; gap: 10px; color: #70839b; font-size: 8px; }
.progress-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: rgba(154, 175, 202, .13); }
.progress-fill { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, #75d4b2, #b0efd8); transition: width .25s; }
.progress-fill.near-limit { background: linear-gradient(90deg, #f0c778, #ff8e98); }
.device-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.action-button { min-height: 30px; padding: 0 10px; border: 1px solid rgba(159, 181, 211, .13); border-radius: 8px; color: #aab8ca; background: #142238; font-size: 8px; font-weight: 800; transition: border-color .15s, color .15s, background .15s; }
.action-button:hover { border-color: rgba(82, 246, 226, .35); color: var(--accent); }
.action-copy { color: #071c19; background: var(--accent); border-color: var(--accent); }
.action-copy:hover { color: #071c19; background: #b1f1dc; }
.action-danger { color: #ff9aa4; background: rgba(255, 134, 146, .06); border-color: rgba(255, 134, 146, .16); }
.action-danger:hover { color: #ffc0c6; border-color: rgba(255, 134, 146, .4); }
.action-toggle { color: #e8ca91; }
.device-uri { display: none; margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #040a12; color: #92b8aa; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; user-select: all; }
.device-uri.visible { display: block; }
.empty-state { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-orbit { width: 53px; height: 53px; display: grid; place-items: center; margin-bottom: 13px; border: 1px solid rgba(82, 246, 226, .2); border-radius: 17px; background: rgba(82, 246, 226, .055); color: var(--accent); font-size: 24px; box-shadow: 0 0 32px rgba(82, 246, 226, .05); }
.empty-state b { color: #d7e1ed; font-size: 12px; }
.empty-state p { max-width: 235px; margin: 7px 0 0; color: #798ca4; font-size: 9px; line-height: 1.6; }
.empty-search { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 10px; }
.dashboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 17px; margin-top: 26px; padding-top: 17px; border-top: 1px solid rgba(159, 181, 211, .09); color: #65778f; font-size: 8px; }
.footer-brand { color: #b6c4d5; font-size: 9px; font-weight: 900; letter-spacing: 1.4px; }
.footer-brand i { margin-left: 5px; color: #687a91; font-size: 7px; font-style: normal; letter-spacing: 1px; }
.edit-dialog { width: min(540px, calc(100% - 28px)); max-width: 540px; padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--text); background: #0d1829; box-shadow: 0 30px 100px rgba(0, 0, 0, .58); }
.edit-dialog::backdrop { background: rgba(2, 7, 14, .78); backdrop-filter: blur(7px); }
.edit-form { padding: 25px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 23px; }
.dialog-heading h2 { margin-top: 8px; font-size: 21px; }
.dialog-heading p { margin-top: 6px; font-size: 9px; }
.dialog-close { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: #aebbd0; background: rgba(159, 181, 211, .04); font-size: 20px; line-height: 1; }
.edit-form .form-field { margin-bottom: 15px; }
.dialog-hint { margin: 1px 0 5px; color: #72849b; font-size: 8px; line-height: 1.55; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.dialog-danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 22px; padding-top: 17px; border-top: 1px solid rgba(255, 134, 146, .15); }
.dialog-danger-zone b, .dialog-danger-zone small { display: block; }
.dialog-danger-zone b { font-size: 9px; }
.dialog-danger-zone small { margin-top: 4px; color: #8192a8; font-size: 8px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 25px; max-width: calc(100% - 30px); padding: 12px 17px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; border: 1px solid rgba(82, 246, 226, .24); border-radius: 12px; color: #e2f5ee; background: #13283a; box-shadow: 0 15px 45px rgba(0, 0, 0, .38); font-size: 10px; font-weight: 750; transition: opacity .2s, transform .2s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast[data-kind="error"] { color: #ffd6d9; border-color: rgba(255, 134, 146, .35); background: #321c2a; }

@media (max-width: 1000px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-grid { grid-template-columns: 1fr; }
  .create-surface { order: 2; }
  .devices-surface { order: 1; }
}
@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 18px; }
  .security-indicator { font-size: 0; gap: 0; }
  .security-indicator .status-dot { width: 7px; height: 7px; }
  .topbar-right { gap: 11px; }
  .shell { padding: 34px 17px 30px; }
  .login-layout { min-height: 0; grid-template-columns: 1fr; gap: 34px; }
  .login-copy h1 { font-size: 53px; letter-spacing: -2.8px; }
  .login-description { font-size: 12px; }
  .login-foot { margin-top: 29px; }
  .login-card { justify-self: stretch; max-width: none; padding: 25px; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-heading h1 { font-size: 42px; letter-spacing: -2.4px; }
  .account-status { margin: 0; }
  .metrics-grid { gap: 9px; margin-bottom: 29px; }
  .metric-card { min-height: 112px; padding: 14px; }
  .metric-value { font-size: 27px; }
  .servers-grid { grid-template-columns: 1fr; }
  .section-side-note { display: none; }
  .surface { padding: 17px; }
  .devices-toolbar { align-items: flex-start; flex-direction: column; }
  .search-box { width: 100%; }
  .device-stats { grid-template-columns: 1fr 1fr; }
  .device-stat:last-child { grid-column: 1/-1; }
  .device-card-head { align-items: flex-start; }
  .device-actions { gap: 6px; }
  .action-button { flex: 1 1 auto; }
  .dashboard-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .edit-form { padding: 19px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .button { width: 100%; }
}
@media (max-width: 390px) {
  .form-row { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 12px; }
  .metric-label { font-size: 7px; }
  .status-badge { font-size: 7px; padding: 0 7px; }
  .device-card { padding: 12px; }
}


/* VEIL subscription controls */
.subscription-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 12px 13px;
  border: 1px solid rgba(82, 246, 226, .17);
  border-radius: 11px;
  background: linear-gradient(105deg, rgba(82, 246, 226, .065), rgba(155, 123, 255, .055));
}
.subscription-copy { min-width: 0; display: grid; gap: 4px; }
.subscription-copy small {
  color: #55dcd3;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.4px;
}
.subscription-copy b { color: #e9f4ff; font-size: 11px; font-weight: 850; }
.subscription-copy span { color: #7e91aa; font-size: 8px; line-height: 1.4; }
.action-copy {
  color: #061b1b;
  background: linear-gradient(110deg, #8efff2, #9b8bff);
  border-color: rgba(82, 246, 226, .55);
}
.action-copy:hover { color: #061b1b; background: #a9fff6; }
.action-danger { color: #ff9aa4; background: rgba(255, 134, 146, .06); border-color: rgba(255, 134, 146, .16); }
@media (max-width: 680px) {
  .subscription-info { align-items: flex-start; }
  .subscription-copy span { font-size: 8px; }
}


/* VEIL Cyber cabinet refresh */
.dashboard-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  overflow-x: auto;
  margin: 0 0 22px;
  padding: 6px;
  border: 1px solid rgba(82, 246, 226, .13);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(9, 19, 33, .92), rgba(18, 21, 43, .84));
  scrollbar-width: thin;
}
.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #91a4bc;
  text-decoration: none;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .35px;
  transition: color .16s, border-color .16s, background .16s;
}
.dashboard-nav a:hover,
.dashboard-nav a:focus-visible {
  color: var(--accent);
  border-color: rgba(82, 246, 226, .22);
  background: rgba(82, 246, 226, .065);
  outline: none;
}
.subscription-policy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 19px;
  padding: 13px 16px;
  border: 1px solid rgba(155, 123, 255, .19);
  border-radius: 13px;
  background: linear-gradient(105deg, rgba(155, 123, 255, .075), rgba(82, 246, 226, .035));
}
.subscription-policy-note .policy-mark {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(155, 123, 255, .28);
  border-radius: 9px;
  color: #c2adff;
  background: rgba(155, 123, 255, .10);
  font-size: 15px;
}
.subscription-policy-note p { margin: 0; }
.subscription-policy-note b,
.subscription-policy-note small { display: block; }
.subscription-policy-note b { color: #dce6f4; font-size: 9px; font-weight: 850; }
.subscription-policy-note small {
  margin-top: 5px;
  color: #8293aa;
  font-size: 8px;
  line-height: 1.6;
}
.metric-card, .server-card, .surface, .login-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.metric-card::after {
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(82, 246, 226, .32), transparent);
  opacity: .7;
}
.metric-primary::after { background: linear-gradient(90deg, transparent, rgba(82, 246, 226, .75), transparent); }
.surface { box-shadow: 0 22px 70px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .018); }
.server-card, .device-card { transition: border-color .18s, background .18s, transform .18s; }
.server-card:hover, .device-card:hover {
  border-color: rgba(82, 246, 226, .25);
  background-color: rgba(10, 22, 36, .82);
}
.server-flag { box-shadow: inset 0 0 18px rgba(82, 246, 226, .035); }
.subscription-info {
  position: relative;
  min-height: 60px;
  border-color: rgba(82, 246, 226, .2);
  background:
    radial-gradient(circle at 100% 0%, rgba(155, 123, 255, .12), transparent 42%),
    linear-gradient(105deg, rgba(82, 246, 226, .065), rgba(11, 22, 38, .45));
}
.subscription-info::before {
  width: 2px;
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  border-radius: 2px;
  content: "";
  background: linear-gradient(180deg, var(--accent), #9b7bff);
}
.action-copy {
  color: #061b1b;
  background: linear-gradient(110deg, #8efff2, #a69aff);
  border-color: rgba(82, 246, 226, .5);
}
.action-copy:hover { color: #061b1b; background: linear-gradient(110deg, #b2fff7, #c1b6ff); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(82, 246, 226, .75);
  outline-offset: 2px;
}
#overview, #servers, #new-device, #devices { scroll-margin-top: 22px; }
@media (max-width: 880px) {
  .dashboard-heading { align-items: flex-start; }
  .dashboard-nav { margin-bottom: 17px; }
}
@media (max-width: 680px) {
  .dashboard-nav { gap: 3px; padding: 5px; }
  .dashboard-nav a { min-height: 33px; padding: 0 10px; font-size: 8px; }
  .subscription-policy-note { padding: 11px 12px; }
  .subscription-copy span { font-size: 8px; }
  .device-actions .action-button { flex: 1 1 calc(50% - 6px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* VEIL readability and touch-target pass */
.eyebrow { font-size: 10px; letter-spacing: 1.7px; }
.security-indicator { font-size: 10px; letter-spacing: 1.1px; }
.muted, .heading-copy { font-size: 13px; }
.login-feature b { font-size: 13px; }
.login-feature small { font-size: 11px; }
.login-card-tag { font-size: 9px; }
label { font-size: 12px; }
input, select { font-size: 13px; }
.button { font-size: 12px; }
.button-ghost { font-size: 11px; }
.form-error { font-size: 11px; }
.login-card-foot { font-size: 10px; }
.account-status b { font-size: 9px; }
.account-status small { font-size: 11px; }
.metric-label { font-size: 10px; letter-spacing: 1.2px; }
.metric-caption { font-size: 11px; }
.section-side-note { font-size: 11px; }
.server-name { font-size: 14px; }
.server-location { font-size: 11px; }
.server-state { font-size: 10px; }
.server-detail small { font-size: 9px; letter-spacing: 1px; }
.server-detail b { font-size: 11px; }
.server-primary { font-size: 9px; letter-spacing: .9px; }
.text-button { font-size: 11px; }
.notice b { font-size: 12px; }
.notice small { font-size: 11px; }
.surface-description { font-size: 12px; }
.form-field > small { font-size: 10px; }
.create-note b { font-size: 11px; }
.create-note small { font-size: 10px; }
.search-box input { font-size: 12px; }
.device-summary { font-size: 10px; }
.device-name { font-size: 14px; }
.device-subline { font-size: 10px; }
.status-badge { font-size: 9px; }
.device-stat small { font-size: 9px; letter-spacing: .9px; }
.device-stat-value { font-size: 11px; }
.progress-header { font-size: 10px; }
.action-button { min-height: 34px; padding: 0 12px; font-size: 10px; }
.device-uri { font-size: 10px; }
.empty-state b { font-size: 14px; }
.empty-state p { font-size: 11px; }
.empty-search { font-size: 11px; }
.dashboard-footer { font-size: 10px; }
.footer-brand i { font-size: 8px; }
.dialog-heading p { font-size: 11px; }
.dialog-hint { font-size: 10px; }
.dialog-danger-zone b { font-size: 11px; }
.dialog-danger-zone small { font-size: 10px; }
.toast { font-size: 12px; }
.dashboard-nav a { font-size: 11px; }
.subscription-copy span { font-size: 10px; }

@media (max-width: 680px) {
  .dashboard-nav a { min-height: 38px; padding: 0 11px; font-size: 10px; }
  .server-details { gap: 8px; }
  .server-card-bottom { align-items: flex-start; flex-wrap: wrap; }
  .device-actions .action-button { min-height: 36px; font-size: 10px; }
  .subscription-copy span { font-size: 10px; }
}
@media (max-width: 420px) {
  .server-details { grid-template-columns: 1fr; }
  .server-detail { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
  .server-detail small { margin: 0; }
  .server-detail b { text-align: right; }
}
