@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2?v=20260727-performance-1") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2?v=20260727-performance-1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #080a0f;
  --panel: #11141b;
  --panel-2: #151922;
  --line: rgba(255,255,255,.075);
  --muted: #7d8491;
  --text: #f4f6f8;
  --lime: #bbf451;
  --lime-dark: #91c832;
  --green: #60e5ae;
  --red: #ff5f72;
  --cyan: #52d7ff;
  --purple: #9077ff;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 80% -10%, rgba(171,238,76,.075), transparent 28%), var(--bg); font-family: Manrope, system-ui, sans-serif; min-height: 100vh; }
button, a { font: inherit; }
button { color: inherit; }
[hidden], .admin-only, .admin-only[hidden] { display: none !important; }
.boot-loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, rgba(187,244,81,.095), transparent 28%), #080a0f; transition: opacity .28s ease, visibility .28s ease; }
.boot-loader-card { display: grid; place-items: center; gap: 12px; padding: 32px 36px; min-width: min(82vw, 330px); border: 1px solid rgba(187,244,81,.16); border-radius: 26px; background: linear-gradient(145deg, rgba(19,23,31,.92), rgba(10,13,19,.92)); box-shadow: 0 24px 70px rgba(0,0,0,.42), 0 0 42px rgba(187,244,81,.055); text-align: center; }
.boot-loader-card .brand-mark { width: 50px; height: 50px; border-radius: 16px; padding: 0; }
.boot-loader-card .brand-mark svg { width: 31px; height: 31px; }
.boot-loader-card strong { font-size: 20px; letter-spacing: -.02em; }
.boot-loader-card small { color: var(--muted); font-size: 12px; }
.boot-loader-card:after { content: ''; width: 54px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--lime), transparent); animation: bootPulse 1.25s ease-in-out infinite; }
body:not(.app-loading) .boot-loader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes bootPulse { 0%, 100% { opacity: .35; transform: scaleX(.72); } 50% { opacity: 1; transform: scaleX(1); } }
body.admin-enabled .nav-item.admin-only:not([hidden]) { display: flex !important; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; padding: 30px 18px 24px; border-right: 1px solid var(--line); background: rgba(9,11,16,.82); backdrop-filter: blur(18px); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; padding: 4px 10px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .14em; }
.brand small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .18em; margin-top: 2px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--lime); background: linear-gradient(145deg, rgba(35,58,28,.86), rgba(15,22,19,.96)); border: 1px solid rgba(187,244,81,.38); box-shadow: inset 0 0 18px rgba(187,244,81,.045), 0 0 20px rgba(187,244,81,.075); transform: rotate(-5deg); }
.brand-mark svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 2.25; fill: none; stroke-linecap: round; stroke-linejoin: round; transform: rotate(5deg); }
.nav { display: grid; gap: 7px; margin-top: 56px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #777e8b; border-radius: 13px; padding: 12px 13px; display: flex; align-items: center; gap: 13px; text-align: left; font-weight: 700; cursor: pointer; transition: .2s; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: var(--text); background: #1a1e27; box-shadow: inset 3px 0 0 var(--lime); }
.nav-item .icon { width: 22px; height: 22px; color: currentColor; display: grid; place-items: center; }
.nav-item .icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { margin-left: auto; color: #13170c; background: var(--lime); width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; }
.mini-status { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.mini-status small, .mini-status strong { display: block; }
.mini-status small { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.mini-status strong { font-size: 10px; margin-top: 3px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); display: inline-block; }
.user-mini { border: 0; border-top: 1px solid var(--line); background: transparent; padding: 15px 6px 0; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.user-mini span:nth-child(2) { flex: 1; }
.user-mini strong, .user-mini small { display: block; }
.user-mini strong { font-size: 12px; }.user-mini small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #262c38, #171a21); border: 1px solid var(--line); font-weight: 800; color: var(--lime); line-height: 1; text-align: center; }
.content { margin-left: 252px; padding: 54px clamp(28px,5vw,84px) 80px; }
.page { display: none; width: min(100%, 1050px); margin: 0 auto; animation: pageIn .35s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; }
.eyebrow, .label { color: var(--lime); font-weight: 800; font-size: 10px; letter-spacing: .15em; }
h1 { margin: 8px 0 6px; font-size: clamp(29px, 3vw, 42px); letter-spacing: -.045em; line-height: 1.1; }
h2 { letter-spacing: -.025em; }
.page-heading p, .section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.ghost-button, .secondary-button, .primary-button, .text-button { border: 0; cursor: pointer; font-weight: 800; transition: .2s; }
.ghost-button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; }
.secondary-button, .primary-button { border-radius: 11px; padding: 12px 17px; }
.secondary-button { background: #1a1e27; border: 1px solid var(--line); }
.primary-button { background: var(--lime); color: #15190e; box-shadow: 0 7px 22px rgba(187,244,81,.11); }
.primary-button:hover { background: #cdfd71; transform: translateY(-1px); }
.secondary-button:hover { background: #232833; }
.text-button { padding: 0; background: none; color: var(--lime); }
.card { background: linear-gradient(145deg, rgba(19,23,31,.97), rgba(14,17,23,.97)); border: 1px solid var(--line); border-radius: var(--radius); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
.subscription-card, .connect-card { padding: 23px; min-height: 220px; }
.card-top, .card-bottom { display: flex; justify-content: space-between; align-items: center; }
.muted, .card-bottom { color: var(--muted); font-size: 11px; }
.pill { padding: 7px 10px; border-radius: 99px; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.pill.success { color: var(--green); background: rgba(55,219,157,.09); }.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; margin-right: 5px; }
.days { display: flex; align-items: center; gap: 12px; margin-top: 17px; }.days strong { font-size: 59px; line-height: 1; letter-spacing: -.07em; }.days span { color: var(--muted); font-size: 12px; }
.progress { height: 5px; border-radius: 8px; background: #252a33; overflow: hidden; margin: 17px 0 13px; }.progress i { display: block; height: 100%; background: var(--lime); border-radius: inherit; box-shadow: 0 0 12px var(--lime); }
.connect-card { display: flex; flex-direction: column; justify-content: space-between; }.connect-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }.connect-row > div:nth-child(2) { flex: 1; }.connect-row strong, .connect-row small { display: block; }.connect-row small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.server-flag { width: 42px; height: 42px; display: grid; place-items: center; color: #f04f4f; border-radius: 12px; background: #202531; font-weight: 900; font-size: 11px; }
.connect-button { border: 0; border-radius: 12px; padding: 13px 16px; background: var(--lime); color: #11150c; font-size: 11px; font-weight: 800; cursor: pointer; }.connect-button span { display: inline-block; width: 7px; height: 7px; background: #12160d; border-radius: 50%; margin-right: 5px; }.connect-button.connected { color: var(--green); background: rgba(96,229,174,.1); }.connect-button.connected span { background: var(--green); box-shadow: 0 0 8px var(--green); }
.connect-card > p { margin: 0; color: var(--muted); font-size: 10px; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 38px 0 16px; }.section-title h2 { font-size: 21px; margin: 0 0 3px; }
.key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.key-card { border: 1px solid var(--line); border-radius: 17px; background: #10131a; padding: 17px; }
.key-card.frozen { border-color: rgba(255,125,135,.22); opacity: .82; }
.key-head { display: flex; align-items: center; gap: 12px; }.key-icon { width: 40px; height: 40px; border-radius: 11px; background: rgba(187,244,81,.92); color: #12170b; display: grid; place-items: center; font-size: 19px; }.key-icon svg { width: 20px; height: 20px; stroke: #12170b; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }.key-head > div:nth-child(2) { flex: 1; }.key-head strong, .key-head small { display: block; }.key-head strong { font-size: 13px; }.key-head small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.key-traffic { color: var(--lime) !important; font-weight: 800; }
.connection-status { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 999px; padding: 7px 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.connection-status i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; animation: statusGlow 1.8s ease-in-out infinite; }
.connection-status.online { color: var(--green); }
.connection-status.online i { background: var(--green); box-shadow: 0 0 10px var(--green); }
.connection-status.offline { color: var(--red); }
.connection-status.offline i { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes statusGlow { 0%,100% { opacity: .58; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.12); } }
.copy-button { border: 1px solid var(--line); background: #181c24; border-radius: 9px; padding: 8px 10px; cursor: pointer; font-size: 10px; font-weight: 700; }.key-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); }.key-meta b { color: var(--text); }
.home-stack { display: grid; gap: 17px; width: min(100%, 860px); margin: 22px auto 0; }
.account-card { padding: 25px; overflow: hidden; position: relative; }
.account-card:before { content: ''; position: absolute; inset: -90px -70px auto auto; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(187,244,81,.075), transparent 68%); pointer-events: none; }
.account-card-top { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.account-person { display: flex; align-items: center; gap: 16px; min-width: 0; }
.account-avatar { width: 74px; height: 74px; border-radius: 19px; color: var(--text); font-size: 31px; background: linear-gradient(145deg, #252b36, #151923); }
.account-person h1 { margin: 0 0 7px; font-size: clamp(27px, 4vw, 38px); }
.account-person p { margin: 0; color: #a7b2c6; font-size: 14px; font-weight: 700; }
.account-status { border-left: 1px solid rgba(255,255,255,.1); padding-left: 28px; min-width: 0; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-line strong { font-size: 44px; line-height: 1; letter-spacing: -.06em; }
.status-line > span:not(.pill) { color: #a7b2c6; font-weight: 700; }
.pill.danger { color: #ff7c8a; background: rgba(255,95,114,.11); border: 1px solid rgba(255,95,114,.42); letter-spacing: 0; font-size: 11px; }
.pill.success { border: 1px solid rgba(96,229,174,.4); box-shadow: 0 0 12px rgba(55,219,157,.22), inset 0 0 12px rgba(55,219,157,.05); }
.account-status p { margin: 8px 0 18px; color: var(--muted); font-size: 12px; }
.key-summary { display: flex; align-items: center; gap: 9px; color: #aab4c5; font-size: 14px; }
.key-summary svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--lime); stroke: currentColor; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trial-panel { margin-top: 26px; border: 1px solid rgba(187,244,81,.26); border-radius: 20px; padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; position: relative; overflow: hidden; background: rgba(7,10,15,.36); box-shadow: inset 0 0 0 1px rgba(187,244,81,.035), 0 0 18px rgba(187,244,81,.055); }
.trial-panel[hidden] { display: none; }
.trial-panel:before { content: ''; position: absolute; z-index: 3; inset: 0; border-radius: inherit; padding: 1.4px; pointer-events: none; background: conic-gradient(from var(--saber-angle), transparent 0deg, transparent 170deg, rgba(187,244,81,.1) 198deg, rgba(187,244,81,.9) 248deg, rgba(218,255,129,.96) 284deg, rgba(187,244,81,.62) 316deg, transparent 350deg); filter: drop-shadow(0 0 6px rgba(187,244,81,.62)) drop-shadow(0 0 12px rgba(187,244,81,.22)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: saberBorder 3.8s linear infinite; }
.trial-panel:after { display: none; }
.trial-panel > * { position: relative; z-index: 2; }
@property --saber-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes saberBorder { to { --saber-angle: 360deg; } }
.action-icon { width: 48px; height: 48px; border-radius: 15px; background: var(--lime); color: #12170b; display: grid; place-items: center; font-size: 33px; font-weight: 500; box-shadow: 0 0 22px rgba(187,244,81,.15); flex: 0 0 auto; }
.plus-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.action-icon img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.trial-panel strong, .home-key-card strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.trial-panel small, .home-key-card small { display: block; color: #9aa5b6; margin-top: 4px; font-size: 12px; }
.home-key-card { width: 100%; color: var(--text); text-align: left; padding: 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; cursor: pointer; transition: .2s; }
.home-key-card:hover { border-color: rgba(187,244,81,.22); transform: translateY(-1px); }
.home-key-card b { color: #8d97a7; font-size: 30px; font-weight: 400; }
.key-action svg { width: 26px; height: 26px; stroke: #12170b; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.key-action { background: rgba(187,244,81,.95); }
.key-list { display: grid; gap: 12px; }.key-list .key-card { padding: 21px; }.key-actions { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 8px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }.key-actions button { border: 1px solid var(--line); background: #171b23; border-radius: 9px; padding: 8px 11px; font-size: 9px; cursor: pointer; }.key-actions button.danger { color: #ff7d87; margin-left: 0; }
.info-card { margin-top: 20px; padding: 20px; border: 1px solid rgba(187,244,81,.15); background: rgba(187,244,81,.035); border-radius: 16px; display: flex; gap: 13px; align-items: center; }.info-card > span { width: 31px; height: 31px; border-radius: 9px; background: rgba(187,244,81,.1); color: var(--lime); display: grid; place-items: center; font-weight: 800; }.info-card div { flex: 1; }.info-card strong { font-size: 12px; }.info-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.profile-card { padding: 25px; }.profile-main { display: flex; align-items: center; gap: 14px; }.avatar.large { width: 57px; height: 57px; border-radius: 17px; font-size: 20px; }.profile-main h2 { margin: 0; font-size: 18px; }.profile-main p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }.profile-main .pill { margin-left: auto; }.stats { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); }.stats div { border-right: 1px solid var(--line); padding-left: 22px; }.stats div:first-child { padding-left: 0; }.stats div:last-child { border: 0; }.stats span,.stats strong { display: block; }.stats span { color: var(--muted); font-size: 8px; letter-spacing: .08em; }.stats strong { font-size: 15px; margin-top: 5px; }.stats .green { color: var(--green); }
.settings-list { display: grid; gap: 10px; margin-top: 17px; }.settings-list button { border: 1px solid var(--line); background: #11141b; border-radius: 15px; padding: 16px; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }.settings-list button > span:nth-child(2) { flex: 1; }.settings-list strong,.settings-list small { display: block; }.settings-list strong { font-size: 12px; }.settings-list small { color: var(--muted); margin-top: 3px; font-size: 9px; }.settings-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; color: var(--lime); background: rgba(187,244,81,.06); }.settings-list b { color: var(--muted); }
.admin-total-card { padding: 22px; display: grid; gap: 4px; margin-bottom: 14px; }.admin-total-card span, .admin-total-card small { color: var(--muted); font-size: 11px; }.admin-total-card strong { color: var(--lime); font-size: 38px; line-height: 1; letter-spacing: -.06em; }.admin-list { display: grid; gap: 14px; }.admin-user-card { padding: 18px; }.admin-user-head { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }.admin-user-head h3 { margin: 0; font-size: 18px; }.admin-user-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }.admin-user-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }.admin-user-stats span { border: 1px solid var(--line); background: #161b24; border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 800; color: #aab4c5; }.admin-user-stats b { color: var(--lime); }.admin-user-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; margin-top: 13px; }.admin-user-actions input { width: 100%; min-width: 0; border: 1px solid var(--line); background: #090c12; color: var(--text); border-radius: 11px; padding: 11px 12px; outline: none; font-size: 12px; }.admin-user-actions input:focus { border-color: rgba(187,244,81,.55); box-shadow: 0 0 0 3px rgba(187,244,81,.08); }.admin-user-actions button { padding: 11px 13px; font-size: 10px; white-space: nowrap; }.admin-user-actions .danger { grid-column: 1 / -1; color: #ff7d87; background: rgba(255,95,114,.08); border-color: rgba(255,95,114,.22); }.admin-key-list { display: grid; gap: 9px; margin-top: 13px; }.admin-key-row { border: 1px solid var(--line); background: #0d1017; border-radius: 15px; padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }.admin-key-row.paused, .admin-key-row.frozen { border-color: rgba(255,125,135,.24); }.admin-key-main strong, .admin-key-main small { display: block; }.admin-key-main strong { font-size: 13px; }.admin-key-main small { color: var(--muted); font-size: 10px; margin-top: 4px; }.admin-key-main .connection-status { margin-top: 8px; width: max-content; }.admin-key-activity { margin-top: 6px !important; }.admin-key-traffic { color: var(--lime); font-size: 11px; font-weight: 900; margin-top: 6px; }.admin-key-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }.admin-key-actions button { border: 1px solid var(--line); background: #1a1f29; border-radius: 10px; padding: 9px 10px; font-size: 10px; font-weight: 850; cursor: pointer; }.admin-key-actions button.danger { color: #ff7d87; background: rgba(255,95,114,.08); border-color: rgba(255,95,114,.18); }.admin-key-actions button.pause { color: var(--cyan); border-color: rgba(82,215,255,.28); background: rgba(82,215,255,.06); }.admin-empty { color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 16px; padding: 28px 16px; font-size: 12px; }
.admin-key-row { align-items: stretch; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; }
.admin-key-main { align-self: start; }
.admin-key-row > .connection-status { justify-self: end; align-self: start; }
.admin-key-actions { grid-column: 2; grid-row: 2; align-self: end; }
.bottom-nav, .mobile-header { display: none; }
.server-picker { display: grid; gap: 11px; text-align: left; }
.server-option { width: 100%; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17,21,30,.98), rgba(10,14,21,.98)); color: var(--text); border-radius: 18px; padding: 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; text-align: left; cursor: pointer; transition: .2s; }
.server-option:hover, .server-option.recommended { border-color: rgba(187,244,81,.36); box-shadow: 0 0 24px rgba(187,244,81,.045); }
.server-option.selected { border-color: rgba(187,244,81,.76); box-shadow: 0 0 0 1px rgba(187,244,81,.18), 0 0 28px rgba(187,244,81,.08); }
.server-option.selected .server-badge { background: var(--lime); color: #12170b; }
.server-option.disabled { opacity: .55; cursor: not-allowed; }
.server-badge { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: rgba(187,244,81,.1); color: var(--lime); font-size: 11px; font-weight: 900; }
.server-option strong, .server-option small, .server-meta b { display: block; }
.server-option strong { font-size: 15px; }
.server-option small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.server-meta { text-align: right; }
.server-meta b { color: var(--lime); font-size: 11px; margin-bottom: 4px; }
.server-note { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 3px 2px 0; text-align: center; }
.server-create-button { margin-top: 4px; }

.key-card.collapsible, .admin-key-row.collapsible, .admin-user-card { cursor: pointer; }
.key-card.collapsible .key-head { align-items: center; }
.key-card.collapsible .connection-status { margin-left: auto; }
.key-toggle { border: 1px solid rgba(187,244,81,.28); background: rgba(187,244,81,.08); color: var(--lime); border-radius: 12px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 22px rgba(187,244,81,.07); flex: 0 0 auto; }
.key-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s ease; }
.key-card.open .key-toggle svg, .admin-key-row.open .key-toggle svg, .admin-user-card.open > .admin-user-head .key-toggle svg { transform: rotate(180deg); }
.key-card.collapsible .key-actions { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.key-card.collapsible.open .key-actions { display: grid; }
.key-card.collapsible .key-actions button, .admin-key-actions button { border: 1px solid var(--line); background: #1a1f29; border-radius: 10px; padding: 9px 10px; font-size: 10px; font-weight: 850; cursor: pointer; width: 100%; }
.key-card.collapsible .key-actions button.pause { color: #55dfff; border-color: rgba(82,215,255,.46); background: rgba(26,134,168,.16); box-shadow: inset 0 0 18px rgba(82,215,255,.035); }
.key-card.collapsible .key-actions button.danger { color: #ff7482; border-color: rgba(255,95,114,.42); background: rgba(255,65,88,.13); box-shadow: inset 0 0 18px rgba(255,95,114,.035); }
.key-card.collapsible .key-actions button.wide { grid-column: 1 / -1; }

.admin-user-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; justify-content: start; }
.admin-user-head > div:first-child { grid-column: 1 / -1; grid-row: 1; }
.admin-user-head > .admin-user-status { grid-column: 1; grid-row: 2; justify-self: start; margin-top: 10px; }
.admin-user-head > .admin-user-stats { grid-column: 1; grid-row: 3; align-self: center; margin-top: 9px; }
.admin-user-head > .key-toggle { grid-column: 2; grid-row: 2 / 4; justify-self: end; align-self: center; }
.admin-user-details { display: none; }
.admin-user-card.open > .admin-user-details { display: block; }
.admin-user-card { position: relative; }
.admin-user-card > .admin-user-head { padding-bottom: 0; border-bottom: 0; }
.admin-user-head > .admin-user-status { position: absolute; right: 18px; top: 18px; margin-top: 0; }
.admin-user-head > div:first-child { padding-right: 95px; }
.admin-user-card.open > .admin-user-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-user-card .admin-user-stats { justify-content: flex-start; margin-top: 0; }
.admin-key-row { grid-template-columns: 1fr auto auto; grid-template-rows: auto auto; position: relative; padding-right: 118px; }
.admin-key-row > .connection-status { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); }
.admin-key-row > .key-toggle { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); }
.admin-key-row.open > .connection-status, .admin-key-row.open > .key-toggle { top: 25px; transform: none; }
.admin-key-details { display: none; grid-column: 1 / -1; grid-row: 2; padding-top: 13px; margin-top: 12px; border-top: 1px solid var(--line); }
.admin-key-row.open .admin-key-details { display: block; }
.admin-key-actions { margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
.admin-key-actions button.danger { grid-column: 1 / -1; }
.admin-key-row { padding-right: 13px; }
.admin-key-row .admin-key-main { padding-right: 118px; }
.admin-key-row > .connection-status { right: 64px; top: 24px; transform: none; }
.admin-key-row > .key-toggle { right: 13px; top: 18px; transform: none; }
.admin-key-row.open > .connection-status { top: 24px; transform: none; }
.admin-key-row.open > .key-toggle { top: 18px; transform: none; }
.admin-key-details { width: 100%; }
.admin-key-actions { width: 100%; grid-column: 1 / -1; }
body[data-route="admin"] .mobile-header .avatar-button { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); z-index: 100; display: grid; place-items: center; padding: 12px; }.modal-backdrop[hidden] { display: none; }.modal { width: min(100%, 720px); border: 1px solid var(--line); background: #151922; border-radius: 23px; padding: 30px; text-align: center; position: relative; box-shadow: 0 30px 80px #000; }.modal-close { position: absolute; right: 13px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }.modal-icon { width: 52px; height: 52px; margin: 0 auto 15px; border-radius: 16px; background: rgba(187,244,81,.1); color: var(--lime); display: grid; place-items: center; font-size: 22px; }.modal-icon svg { width: 29px; height: 29px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }.modal h2 { margin: 0 0 7px; }.modal p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0 0 20px; }.modal .primary-button { width: 100%; }.modal-extra { display: grid; gap: 10px; margin: 0 0 18px; }.config-preview { max-height: 260px; overflow: auto; text-align: left; white-space: pre-wrap; word-break: break-word; color: #dce4ef; background: #090c12; border: 1px solid var(--line); border-radius: 14px; padding: 13px; font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.modal-actions button { border: 1px solid var(--line); background: #1a1e27; border-radius: 11px; padding: 11px 12px; cursor: pointer; font-size: 10px; font-weight: 800; }.manual-copy { display: grid; gap: 10px; text-align: left; }.manual-copy textarea { width: 100%; min-height: 150px; max-height: 42vh; resize: vertical; border: 1px solid rgba(187,244,81,.22); background: #090c12; color: var(--text); border-radius: 13px; padding: 13px; outline: none; font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }.manual-copy textarea:focus { border-color: rgba(187,244,81,.6); box-shadow: 0 0 0 3px rgba(187,244,81,.08); }.manual-copy small { color: var(--muted); font-size: 10px; line-height: 1.5; }.access-form { display: grid; gap: 10px; text-align: left; }.access-form input { width: 100%; border: 1px solid var(--line); background: #090c12; color: var(--text); border-radius: 13px; padding: 14px 15px; outline: none; font-size: 14px; }.access-form input:focus { border-color: rgba(187,244,81,.55); box-shadow: 0 0 0 3px rgba(187,244,81,.08); }.access-form small { color: var(--muted); font-size: 10px; line-height: 1.5; }.access-form .primary-button:disabled { opacity: .65; cursor: wait; }.qr-wrap { display: grid; place-items: center; gap: 9px; }.qr-image { width: min(86vw, 620px); max-height: 64vh; border-radius: 18px; background: #fff; padding: 12px; border: 1px solid var(--line); object-fit: contain; }.qr-frame-label { color: var(--lime); background: rgba(187,244,81,.08); border: 1px solid rgba(187,244,81,.16); border-radius: 999px; padding: 6px 11px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }.qr-loading { width: 100%; border: 1px dashed var(--line); color: var(--muted); border-radius: 16px; padding: 42px 16px; font-size: 12px; }.qr-loading.error { color: #ff7d87; border-color: rgba(255,125,135,.35); }.toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%,20px); background: var(--text); color: #111; border-radius: 99px; padding: 10px 16px; z-index: 120; font-size: 10px; font-weight: 800; opacity: 0; pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.qr-series-hint { color: var(--muted); font-size: 10px; line-height: 1.45; max-width: 430px; }
.qr-frame-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.qr-frame-controls button { width: 34px; height: 30px; border: 1px solid rgba(187,244,81,.28); border-radius: 999px; background: rgba(187,244,81,.08); color: var(--lime); font-size: 14px; font-weight: 900; cursor: pointer; }
.qr-app-title { color: var(--text); font-size: 18px; font-weight: 850; line-height: 1; margin: 0 0 24px; letter-spacing: -.02em; }
.modal.qr-modal { width: min(100%, 600px); padding: 24px 18px 20px; overflow: hidden; }
.modal.qr-modal .modal-icon,
.modal.qr-modal #modalTitle,
.modal.qr-modal #modalText { display: none; }
.modal.qr-modal .modal-extra { margin: 4px 0 18px; gap: 0; }
.modal.qr-modal .qr-wrap { gap: 0; }
.modal.qr-modal .qr-image { width: min(100%, 540px); max-height: min(72vh, 620px); padding: 9px; border-radius: 18px; }
.modal.qr-modal .primary-button { margin-top: 8px; }
.modal.manual-copy-modal { width: min(100%, 620px); padding: 26px 22px 20px; }
.modal.manual-copy-modal .modal-icon,
.modal.manual-copy-modal #modalTitle { display: none; }
.modal.manual-copy-modal #modalText { display: block; margin: 0 0 14px; font-size: 13px; line-height: 1.45; }
.modal.manual-copy-modal .modal-extra { margin: 0 0 14px; }
.modal.manual-copy-modal .manual-copy { gap: 14px; }
.modal.manual-copy-modal .manual-copy textarea { height: min(52vh, calc((var(--manual-copy-lines, 8) * 1.45em) + 28px)); min-height: 150px; max-height: 52vh; resize: none; overflow: hidden; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
.modal.manual-copy-modal .primary-button { margin-top: 2px; }
.admin-user-actions { grid-template-columns: minmax(0, .92fr) auto auto; }
.admin-user-actions .admin-add-quick { min-width: 56px; padding-inline: 14px; color: var(--green); border-color: rgba(96,229,174,.28); background: rgba(96,229,174,.06); }
.admin-user-actions .admin-create-key { grid-column: 1 / -1; color: var(--green); background: rgba(96,229,174,.08); border-color: rgba(96,229,174,.32); box-shadow: inset 0 0 18px rgba(96,229,174,.035); }
.admin-user-actions .admin-create-key:hover { background: rgba(96,229,174,.12); }
.admin-delete-account { width: 100%; margin-top: 12px; color: #ff7d87; background: rgba(255,95,114,.08); border-color: rgba(255,95,114,.22); }
body.modal-open { overflow: hidden; }

@media (max-width: 820px) {
  body { background: var(--bg); }
  .modal-backdrop { align-items: center; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); overflow: hidden; }
  .modal { width: min(100%, calc(100vw - 20px)); max-height: calc(100vh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; border-radius: 22px; padding: 24px 18px; }
  .modal h2 { font-size: clamp(22px, 8vw, 34px); line-height: 1.05; word-break: break-word; }
  .modal p { font-size: 13px; margin-bottom: 14px; }
  .modal.qr-modal { width: min(100%, calc(100vw - 20px)); max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 20px 14px 16px; overflow: hidden; }
  .modal.qr-modal .modal-extra { margin: 4px 0 15px; }
  .modal.qr-modal .qr-image { width: min(100%, calc(100vw - 48px)); max-height: calc(100svh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 7px; border-radius: 16px; }
  .modal.qr-modal .qr-app-title { font-size: 17px; margin-bottom: 24px; }
  .modal.qr-modal .primary-button { min-height: 54px; }
  .modal.manual-copy-modal { width: min(100%, calc(100vw - 20px)); max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 22px 14px 14px; overflow: hidden; }
  .modal.manual-copy-modal #modalText { font-size: 13px; margin: 0 0 14px; }
  .modal.manual-copy-modal .modal-extra { margin: 0 0 12px; }
  .modal.manual-copy-modal .manual-copy { gap: 12px; }
  .modal.manual-copy-modal .manual-copy textarea { height: min(calc(100svh - 282px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), calc((var(--manual-copy-lines, 8) * 1.45em) + 28px)); min-height: 150px; max-height: calc(100svh - 282px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); font-size: 11px; padding: 12px; }
  .modal.manual-copy-modal .primary-button { min-height: 54px; }
  .manual-copy textarea { min-height: 160px; max-height: 30vh; font-size: 12px; resize: none; }
  .qr-image { width: min(100%, calc(100vw - 58px)); max-height: 46vh; padding: 8px; border-radius: 14px; }
  .sidebar { display: none; }
  .content { margin: 0; padding: calc(74px + env(safe-area-inset-top)) 16px calc(91px + env(safe-area-inset-bottom)); }
  .page { width: 100%; max-width: 560px; }
  .page[data-page="keys"] { margin-inline: auto; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; position: fixed; inset: 0 0 auto; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; z-index: 30; background: rgba(8,10,15,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
  .mobile-header .brand { padding: 0; }.mobile-header .brand-mark { width: 31px; height: 31px; border-radius: 9px; }.mobile-header .brand strong { font-size: 14px; }.mobile-header .avatar-button { border: 0; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3,1fr); position: fixed; z-index: 30; left: 18px; right: 18px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 10px 12px; background: linear-gradient(145deg, rgba(16,22,33,.96), rgba(9,13,20,.96)); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: 0 18px 46px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.03); backdrop-filter: blur(18px); }
  .bottom-nav:has(.admin-only:not([hidden])) { grid-template-columns: repeat(4,1fr); }
  body.admin-enabled .bottom-nav .admin-only:not([hidden]) { display: grid !important; }
  body.keyboard-open .bottom-nav { display: none !important; }
  .bottom-nav button { border: 0; background: none; color: #7b8599; display: grid; gap: 4px; justify-items: center; cursor: pointer; padding: 2px 0; }.bottom-nav button > span { width: 25px; height: 25px; display: grid; place-items: center; line-height: 1; }.bottom-nav svg { width: 25px; height: 25px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }.bottom-nav small { font-size: 9px; font-weight: 700; }.bottom-nav button.active { color: var(--lime); text-shadow: 0 0 12px rgba(187,244,81,.3); }
  .page-heading { margin-bottom: 24px; align-items: flex-end; }.page-heading .ghost-button span { display: none; }
  h1 { font-size: 29px; }.page-heading p { font-size: 11px; }
  .hero-grid, .key-grid { grid-template-columns: 1fr; }
  .home-stack { margin-top: 0; gap: 14px; }
  .account-card { padding: 18px; border-radius: 19px; }
  .account-card-top { grid-template-columns: 1fr; gap: 19px; }
  .account-status { border-left: 0; border-top: 1px solid var(--line); padding: 17px 0 0; }
  .account-avatar { width: 58px; height: 58px; border-radius: 16px; font-size: 25px; }
  .account-person h1 { font-size: 26px; }
  .status-line strong { font-size: 42px; }
  .trial-panel { grid-template-columns: auto 1fr; padding: 15px; }
  .trial-panel .primary-button { grid-column: 1 / -1; width: 100%; }
  .action-icon { width: 48px; height: 48px; border-radius: 15px; }
  .home-key-card { padding: 18px; border-radius: 18px; }
  .subscription-card, .connect-card { min-height: 190px; padding: 20px; }
  .days strong { font-size: 50px; }
  .section-title { margin-top: 30px; }
  .key-grid .key-card:nth-child(2) { display: none; }
  .page[data-page="keys"] .page-heading { align-items: end; }.page[data-page="keys"] .page-heading .primary-button { padding: 11px 12px; font-size: 10px; }
  .info-card { align-items: flex-start; }.info-card .text-button { display: none; }
  .profile-main .pill { display: none; }.stats div { padding-left: 12px; }.stats strong { font-size: 13px; }
  .admin-user-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; }
  .admin-user-actions { grid-template-columns: minmax(0, .88fr) auto auto; }
  .admin-user-actions input { grid-column: auto; }
  .admin-user-actions .admin-create-key { grid-column: 1 / -1; }
  .admin-user-actions .danger { grid-column: 1 / -1; }
  .admin-key-row { grid-template-columns: 1fr; grid-template-rows: auto auto; padding-right: 112px; }
  .admin-key-row > .connection-status { position: absolute; right: 62px; top: 50%; transform: translateY(-50%); }
  .admin-key-row > .key-toggle { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); }
  .admin-key-row.open > .connection-status, .admin-key-row.open > .key-toggle { top: 25px; transform: none; }
  .admin-key-main { grid-column: 1; grid-row: 1; padding-right: 0; }
  .admin-user-status { position: absolute; right: 18px; top: 18px; }
  .admin-user-stats { grid-column: 1; grid-row: 3; justify-content: flex-start; }
  .admin-key-details { grid-column: 1 / -1; grid-row: 2; }
  .admin-key-actions { grid-column: auto; grid-row: auto; align-self: stretch; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .admin-key-actions button { width: 100%; }
  .admin-key-actions button.danger { grid-column: 1 / -1; }
  .key-card.collapsible .key-actions, .key-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-actions button { width: 100%; }
  .key-card.collapsible .key-actions button.wide { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .admin-key-row { padding-right: 13px; }
  .admin-key-row .admin-key-main { padding-right: 112px; }
  .admin-key-row > .connection-status { right: 62px; top: 24px; transform: none; }
  .admin-key-row > .key-toggle { right: 13px; top: 18px; transform: none; }
  .admin-key-row.open > .connection-status { top: 24px; transform: none; }
  .admin-key-row.open > .key-toggle { top: 18px; transform: none; }
  .admin-key-details { width: 100%; }
  .admin-key-actions { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 390px) {
  .connect-row { flex-wrap: wrap; }.connect-button { width: 100%; margin-top: 3px; }
  .info-card { padding: 16px; }
}

.admin-key-row:not(.open) {
  min-height: 76px;
}

.admin-key-row:not(.open) .admin-key-main {
  align-self: center;
}

.admin-key-row.open .admin-key-main {
  align-self: start;
}

.admin-user-card {
  padding-top: 16px;
  padding-bottom: 16px;
}

.admin-user-head {
  row-gap: 6px;
}

.admin-user-head > .admin-user-stats {
  margin-top: 2px;
  transform: translateY(-3px);
}

.admin-user-head > .key-toggle {
  transform: translateY(-5px);
}

.admin-user-card.open > .admin-user-head {
  padding-bottom: 10px;
}

.admin-key-row.open .admin-key-details {
  margin-top: 10px;
  padding-top: 10px;
}

.admin-key-row.open .admin-key-actions {
  margin-top: 0;
}

.key-card.collapsible {
  padding: 15px;
}

.key-card.collapsible .key-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.key-card.collapsible .key-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 0 22px rgba(187,244,81,.13);
}

.key-card.collapsible .key-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.key-card.collapsible .key-title strong {
  font-size: 14px;
  line-height: 1.15;
}

.key-card.collapsible .key-title small {
  font-size: 10px;
  line-height: 1.35;
  margin-top: 0;
}

.key-card.collapsible .key-traffic {
  margin-top: 0;
}

.key-card.collapsible .connection-status,
.key-card.collapsible .key-toggle {
  align-self: center;
}

.key-card.collapsible .connection-status {
  margin-left: 0;
}

@media (max-width: 560px) {
  .key-card.collapsible .key-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 10px;
  }

  .key-card.collapsible .key-icon {
    display: none;
  }
}

/* Server live metrics: two balanced rows on desktop and mobile. */
.admin-health-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-health-metrics > div {
  display: grid;
  align-content: center;
  min-height: 56px;
}

.admin-health-metrics strong {
  overflow: visible;
  text-overflow: clip;
}

/* User header: identity and presence share one real row, so nothing overlaps. */
.admin-user-card > .admin-user-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 10px;
  position: relative;
}

.admin-user-card > .admin-user-head > .admin-user-topline {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 0;
}

.admin-user-identity {
  min-width: 0;
  padding: 0 !important;
}

.admin-user-identity h3,
.admin-user-identity p {
  overflow: hidden;
  margin-right: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-card .admin-user-presence {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  align-self: start;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.admin-user-card > .admin-user-head > .admin-user-stats {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  justify-self: start;
  justify-content: flex-start;
  margin: 0;
  transform: none;
}

.admin-user-card > .admin-user-head > .key-toggle {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: end;
  margin: 0;
  transform: none;
}

@media (max-width: 430px) {
  .admin-user-card > .admin-user-head {
    grid-template-columns: minmax(0, 1fr) 46px;
    column-gap: 8px;
  }

  .admin-user-card > .admin-user-head > .admin-user-topline {
    gap: 6px;
  }

  .admin-user-card .admin-user-last-online {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-key-list .admin-key-row.collapsible > .admin-key-head,
  .admin-key-list .admin-key-row.collapsible.open > .admin-key-head {
    grid-template-columns: minmax(0, 1fr) max-content 46px;
    gap: 6px;
  }
}

/* Admin operations: infrastructure, backups, broadcasts and audit. */
.admin-health-section,
.admin-users-section {
  margin-top: 22px;
}

.admin-section-heading,
.admin-tool-heading,
.admin-health-card-heading,
.admin-health-card-heading > div,
.admin-health-card-heading > div > div {
  display: flex;
  align-items: center;
}

.admin-section-heading,
.admin-tool-heading,
.admin-health-card-heading {
  justify-content: space-between;
  gap: 14px;
}

.admin-section-heading {
  margin-bottom: 12px;
}

.admin-section-heading span,
.admin-tool-heading span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
}

.admin-section-heading h2,
.admin-tool-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.admin-section-heading small,
.admin-tool-heading small {
  color: var(--muted);
}

.admin-health-grid,
.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-health-card,
.admin-tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 21, 30, .92);
}

.admin-health-card {
  padding: 18px;
}

.admin-health-card-heading > div {
  gap: 11px;
  min-width: 0;
}

.admin-health-card-heading > div > div {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}

.admin-health-card-heading strong {
  font-size: 17px;
}

.admin-health-card-heading small {
  color: var(--muted);
}

.admin-health-badge {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(173, 255, 47, .35);
  border-radius: 14px;
  background: rgba(173, 255, 47, .08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.admin-health-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 12px;
}

.admin-health-metrics > div {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 8, 13, .45);
}

.admin-health-metrics span,
.admin-health-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-health-metrics span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.admin-health-metrics strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.admin-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-service-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-service-list span.active {
  border-color: rgba(93, 232, 174, .25);
  background: rgba(93, 232, 174, .08);
  color: #5de8ae;
}

.admin-service-list span.inactive {
  border-color: rgba(255, 86, 113, .25);
  background: rgba(255, 86, 113, .08);
  color: #ff5671;
}

.admin-health-reboot {
  width: 100%;
  margin-top: 13px;
}

.admin-tools-grid {
  margin-top: 14px;
}

.admin-tool-card {
  padding: 18px;
}

.admin-tool-card > p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.admin-audit-card {
  grid-column: 1 / -1;
}

.admin-backup-list,
.admin-broadcast-history,
.admin-audit-list {
  display: grid;
  gap: 8px;
}

.admin-backup-row,
.admin-broadcast-row,
.admin-audit-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 8, 13, .42);
}

.admin-backup-row > div,
.admin-audit-row > div {
  min-width: 0;
  flex: 1;
}

.admin-backup-row strong,
.admin-backup-row small,
.admin-broadcast-row strong,
.admin-broadcast-row small,
.admin-audit-row strong,
.admin-audit-row small {
  display: block;
}

.admin-backup-row strong,
.admin-broadcast-row strong,
.admin-audit-row strong {
  font-size: 12px;
}

.admin-backup-row small,
.admin-broadcast-row small,
.admin-audit-row small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.admin-broadcast-row {
  display: block;
}

.admin-audit-list {
  max-height: 182px;
  overflow: auto;
  scrollbar-color: rgba(173, 255, 47, .3) transparent;
}

.admin-audit-row > i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5de8ae;
  box-shadow: 0 0 12px rgba(93, 232, 174, .5);
}

.admin-audit-row.failed > i {
  background: #ff5671;
  box-shadow: 0 0 12px rgba(255, 86, 113, .5);
}

.admin-mini-button {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(173, 255, 47, .3);
  border-radius: 10px;
  background: rgba(173, 255, 47, .07);
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
}

.admin-broadcast-card select,
.admin-broadcast-card textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(5, 8, 13, .65);
  color: var(--text);
  font: inherit;
}

.admin-broadcast-card select {
  height: 46px;
  margin-top: 13px;
  padding: 0 12px;
}

.admin-broadcast-card textarea {
  min-height: 122px;
  margin-top: 9px;
  padding: 12px;
  resize: vertical;
}

.admin-broadcast-card textarea:focus,
.admin-broadcast-card select:focus {
  border-color: rgba(173, 255, 47, .55);
}

.admin-broadcast-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  margin: 9px 0 13px;
}

.admin-broadcast-actions button {
  min-width: 0;
}

.admin-tool-loading,
.admin-tool-empty {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .admin-health-grid,
  .admin-tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-audit-card {
    grid-column: auto;
  }
}

@media (max-width: 460px) {
  .admin-section-heading h2,
  .admin-tool-heading h2 {
    font-size: 18px;
  }

  .admin-health-card,
  .admin-tool-card {
    padding: 14px;
    border-radius: 19px;
  }

  .admin-health-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-broadcast-actions {
    grid-template-columns: 1fr;
  }
}

.admin-key-row.collapsible {
  min-height: 78px;
  padding: 12px 116px 12px 16px;
  align-items: center;
}

/* Admin dashboard order and compact controls */
.admin-audit-top,
.admin-health-section,
.admin-operations-stack {
  margin-top: 14px;
}

.admin-total-card + .admin-audit-top {
  margin-top: 18px;
}

.admin-total-card {
  display: flex;
  min-height: 76px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.admin-total-card > span {
  max-width: 55%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-total-card > strong {
  flex: 0 0 auto;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -.045em;
  white-space: nowrap;
}

.admin-collapse {
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 21, 30, .92);
}

.admin-collapse-summary {
  display: flex;
  width: 100%;
  min-height: 76px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  list-style: none;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.admin-collapse-summary::-webkit-details-marker {
  display: none;
}

.admin-collapse-summary > span:first-child {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
}

.admin-collapse-summary strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
}

.admin-collapse-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-collapse-arrow {
  position: relative;
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(187, 244, 81, .28);
  border-radius: 12px;
  background: rgba(187, 244, 81, .08);
  color: var(--lime);
  box-shadow: 0 0 22px rgba(187, 244, 81, .07);
  pointer-events: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.admin-collapse.open .admin-collapse-arrow {
  border-color: rgba(187, 244, 81, .38);
  background: rgba(187, 244, 81, .1);
}

.admin-collapse.open .admin-collapse-arrow svg {
  transform: rotate(180deg);
}

.admin-collapse-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.admin-collapse-body[hidden] {
  display: none !important;
}

.admin-collapse-body > .admin-audit-list,
.admin-collapse-body > .admin-health-grid,
.admin-collapse-body > .admin-list {
  margin-top: 14px;
}

.admin-broadcast-counter {
  min-height: 22px;
  margin-top: 10px;
}

.admin-broadcast-counter > div {
  min-height: 1px;
}

.admin-collapse.admin-users-section,
.admin-collapse.admin-health-section {
  margin-top: 14px;
}

@media (max-width: 460px) {
  .admin-total-card {
    min-height: 68px;
    padding: 11px 14px;
  }

  .admin-total-card > span {
    max-width: 52%;
    font-size: 11px;
  }

  .admin-total-card > strong {
    font-size: 27px;
  }

  .admin-collapse-summary {
    min-height: 68px;
    padding: 12px 14px;
  }

  .admin-collapse-summary strong {
    font-size: 17px;
  }

  .admin-collapse-summary small {
    max-width: 245px;
  }

  .admin-collapse-body {
    padding: 0 12px 12px;
  }
}

.admin-operations-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.admin-audit-top {
  width: 100%;
  box-sizing: border-box;
}

.admin-tool-card {
  position: relative;
  isolation: isolate;
}

.admin-tool-card button,
.admin-tool-card select,
.admin-tool-card textarea {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.admin-tool-heading {
  gap: 12px;
  flex-wrap: wrap;
}

.admin-tool-heading > div {
  min-width: 0;
  flex: 1 1 180px;
}

.admin-tool-heading small {
  flex: 0 0 auto;
  line-height: 1.35;
}

.admin-audit-list {
  margin-top: 14px;
}

.admin-audit-row {
  align-items: flex-start;
}

.admin-audit-row > i {
  margin-top: 5px;
}

.admin-audit-row small {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.admin-health-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-health-metrics > div {
  padding: 9px 7px;
  text-align: center;
}

.admin-health-metrics span {
  margin-bottom: 3px;
}

@media (max-width: 460px) {
  .admin-health-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-health-metrics > div {
    padding: 8px 4px;
  }

  .admin-health-metrics strong {
    font-size: 12px;
  }

  .admin-audit-top .admin-tool-heading {
    align-items: flex-start;
  }
}

.admin-key-row.collapsible:not(.open) .admin-key-main {
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 0;
  transform: translateY(-1px);
}

.admin-key-row.collapsible:not(.open) .admin-key-main strong {
  line-height: 1.1;
}

.admin-key-row.collapsible:not(.open) .admin-key-main small,
.admin-key-row.collapsible:not(.open) .admin-key-traffic {
  line-height: 1.25;
  margin-top: 4px;
}

.admin-key-row.collapsible:not(.open) > .connection-status,
.admin-key-row.collapsible:not(.open) > .key-toggle {
  top: 50%;
  transform: translateY(-50%);
}

.admin-key-row.collapsible:not(.open) > .connection-status {
  right: 62px;
}

.admin-key-row.collapsible:not(.open) > .key-toggle {
  right: 14px;
}

.admin-key-row.collapsible.open {
  min-height: 0;
  padding: 14px 16px;
}

.admin-key-row.collapsible.open .admin-key-main {
  padding-right: 118px;
}

.admin-key-row.collapsible.open > .connection-status {
  right: 64px;
  top: 22px;
  transform: none;
}

.admin-key-row.collapsible.open > .key-toggle {
  right: 16px;
  top: 16px;
  transform: none;
}

/* Final admin key-card layout: keep title, status and arrow fixed while details open. */
.admin-key-row.collapsible {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 86px;
  padding: 14px 116px 14px 16px;
  align-items: center;
}

.admin-key-row.collapsible.open {
  min-height: 0;
  padding: 14px 16px;
}

.admin-key-row.collapsible .admin-key-main {
  min-height: 58px;
  padding-right: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: none;
}

.admin-key-row.collapsible.open .admin-key-main {
  padding-right: 116px;
}

.admin-key-row.collapsible > .connection-status,
.admin-key-row.collapsible.open > .connection-status {
  position: absolute;
  right: 64px;
  top: 27px;
  transform: none;
}

.admin-key-row.collapsible > .key-toggle,
.admin-key-row.collapsible.open > .key-toggle {
  position: absolute;
  right: 16px;
  top: 20px;
  transform: none;
}

.admin-key-row.collapsible .admin-key-details {
  margin-top: 10px;
  padding-top: 10px;
}

/* Stable admin key accordion header. Open/closed state must not move the header. */
.admin-key-list .admin-key-row.collapsible,
.admin-key-list .admin-key-row.collapsible.open {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 96px;
  padding: 14px 116px 14px 16px;
}

.admin-key-list .admin-key-row.collapsible .admin-key-main,
.admin-key-list .admin-key-row.collapsible.open .admin-key-main {
  min-height: 66px;
  padding-right: 0;
  align-self: start;
  justify-content: center;
  transform: none;
}

.admin-key-list .admin-key-row.collapsible > .connection-status,
.admin-key-list .admin-key-row.collapsible.open > .connection-status {
  right: 64px;
  top: 29px;
  transform: none;
}

.admin-key-list .admin-key-row.collapsible > .key-toggle,
.admin-key-list .admin-key-row.collapsible.open > .key-toggle {
  right: 16px;
  top: 23px;
  transform: none;
}

.admin-key-list .admin-key-row.collapsible .admin-key-details {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding-top: 10px;
}

/* New stable admin key structure. Header is one fixed row; details never move it. */
.admin-key-list .admin-key-row.collapsible,
.admin-key-list .admin-key-row.collapsible.open {
  display: block;
  min-height: 0;
  padding: 14px 16px;
}

.admin-key-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
}

.admin-key-head .admin-key-main,
.admin-key-row.collapsible.open .admin-key-head .admin-key-main,
.admin-key-row.collapsible:not(.open) .admin-key-head .admin-key-main {
  min-height: 0;
  padding-right: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: none;
}

.admin-key-head .admin-key-main strong {
  line-height: 1.1;
}

.admin-key-head .admin-key-main small,
.admin-key-head .admin-key-traffic {
  line-height: 1.25;
  margin-top: 4px;
}

.admin-key-head > .connection-status,
.admin-key-row.collapsible.open .admin-key-head > .connection-status,
.admin-key-row.collapsible:not(.open) .admin-key-head > .connection-status,
.admin-key-head > .key-toggle,
.admin-key-row.collapsible.open .admin-key-head > .key-toggle,
.admin-key-row.collapsible:not(.open) .admin-key-head > .key-toggle {
  position: static;
  inset: auto;
  transform: none;
  align-self: center;
}

.admin-key-row.collapsible .admin-key-details {
  display: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-key-row.collapsible.open .admin-key-details {
  display: block;
}

/* Final action-grid guard: buttons must stay inside key cards on mobile and desktop. */
.key-card.collapsible .key-actions,
.admin-key-row.collapsible .admin-key-actions {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  gap: 8px;
}

.key-card.collapsible .key-actions {
  display: none;
}

.key-card.collapsible.open .key-actions,
.admin-key-row.collapsible .admin-key-actions {
  display: grid;
}

.key-card.collapsible .key-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.key-card.collapsible .key-actions button,
.admin-key-row.collapsible .admin-key-actions button {
  min-width: 0;
  box-sizing: border-box;
}

.key-card.collapsible .key-actions button.wide,
.admin-key-row.collapsible .admin-key-actions button.danger {
  grid-column: 1 / -1;
}

/* Local visual playground: every main icon/button intentionally uses a different direction. */
.trial-panel .action-icon {
  background: rgba(187,244,81,.075);
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
  font-weight: 650;
}

.home-key-card .action-icon {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.home-key-card .key-action svg {
  stroke: #bbf451;
  filter: drop-shadow(0 0 3px rgba(187,244,81,.42));
}

.account-avatar,
.avatar-button {
  background: linear-gradient(145deg, #242a35, #121720);
  border: 1px solid rgba(255,255,255,.1);
  color: #f4f6f8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.page[data-page="keys"] .page-heading .primary-button,
#newKeyButton {
  background: linear-gradient(145deg, #bbf451, #a5ed3e);
  border: 1px solid rgba(225,255,140,.55);
  color: #12170b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 8px 18px rgba(187,244,81,.07);
}

.key-card.collapsible .key-icon {
  background: linear-gradient(145deg, rgba(187,244,81,.18), rgba(187,244,81,.08));
  border: 1px solid rgba(187,244,81,.36);
  color: var(--lime);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.server-badge {
  background: rgba(187,244,81,.075);
  border: 1px solid rgba(187,244,81,.2);
  color: var(--lime);
}

.server-option:nth-of-type(1) .server-badge {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border-color: rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.server-option:nth-of-type(2) .server-badge {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border-color: rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.server-option:nth-of-type(3) .server-badge {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border-color: rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.server-option.selected .server-badge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

/* Chosen icon direction: dark tile, lime outline, lime symbol. */
.brand-mark,
.action-icon,
.key-icon,
.server-badge,
.nav-count,
.modal-icon,
.info-card > span,
.settings-icon {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.key-action svg,
.key-icon svg,
.modal-icon svg,
.settings-icon svg,
.info-card svg {
  stroke: currentColor;
  filter: none;
}

/* Final name/avatar tiles: old dark style with centered letter. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button,
.user-mini .avatar {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  background: linear-gradient(145deg, #252b36, #151923);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  text-shadow: none;
}

/* Production overrides: compact seven-column traffic calendar and status pulse. */
.profile-device-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.profile-device-status i {
  margin: 0;
  animation: statusGlow 1.8s ease-in-out infinite;
}

.modal.traffic-modal .traffic-weekdays,
.modal.traffic-modal .traffic-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.modal.traffic-modal .traffic-weekdays {
  margin: 3px 1px -2px;
}

.modal.traffic-modal .traffic-weekdays span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.modal.traffic-modal .traffic-day-blank {
  min-height: 45px;
}

.modal.traffic-modal .traffic-day-card {
  position: relative;
  min-width: 0;
  min-height: 47px;
  padding: 12px 2px 4px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
}

.modal.traffic-modal .traffic-day-card span {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 8px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong {
  font-size: 9px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong small {
  font-size: 6px;
}

@media (max-width: 390px) {
  .modal.traffic-modal .traffic-weekdays,
  .modal.traffic-modal .traffic-day-grid {
    gap: 4px;
  }

  .modal.traffic-modal .traffic-day-card,
  .modal.traffic-modal .traffic-day-blank {
    min-height: 43px;
  }
}

/* 2026-07-27 final status and seven-column traffic calendar. */
.profile-device-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.profile-device-status i {
  margin: 0;
  animation: statusGlow 1.8s ease-in-out infinite;
}

.modal.traffic-modal .traffic-weekdays,
.modal.traffic-modal .traffic-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.modal.traffic-modal .traffic-weekdays {
  margin: 3px 1px -2px;
}

.modal.traffic-modal .traffic-weekdays span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.modal.traffic-modal .traffic-day-blank {
  min-height: 45px;
}

.modal.traffic-modal .traffic-day-card {
  position: relative;
  min-width: 0;
  min-height: 47px;
  padding: 12px 2px 4px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
}

.modal.traffic-modal .traffic-day-card span {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 8px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong {
  font-size: 9px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong small {
  font-size: 6px;
}

@media (max-width: 390px) {
  .modal.traffic-modal .traffic-weekdays,
  .modal.traffic-modal .traffic-day-grid {
    gap: 4px;
  }

  .modal.traffic-modal .traffic-day-card,
  .modal.traffic-modal .traffic-day-blank {
    min-height: 43px;
  }
}

/* Final 2026-07-27 layout overrides. */
.modal.traffic-modal .monthly-traffic-total {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 16px 17px;
  text-align: left;
}

.modal.traffic-modal .monthly-traffic-total > div {
  display: grid;
  gap: 7px;
}

.modal.traffic-modal .monthly-traffic-total span,
.modal.traffic-modal .monthly-traffic-total strong {
  display: block;
  margin: 0;
}

.modal.traffic-modal .monthly-traffic-total > b {
  position: absolute;
  top: 13px;
  right: 14px;
}

.modal.traffic-modal .traffic-day-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.modal.traffic-modal .traffic-day-card {
  position: relative;
  min-height: 62px;
  padding: 17px 5px 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
}

.modal.traffic-modal .traffic-day-card span {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 9px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong {
  font-size: 11px;
  line-height: 1;
}

.profile-device-status i {
  animation: statusGlow 1.8s ease-in-out infinite;
}

@media (max-width: 390px) {
  .modal.traffic-modal .traffic-day-grid {
    gap: 6px;
  }

  .modal.traffic-modal .traffic-day-card {
    min-height: 57px;
  }
}

/* 2026-07-27: profile statuses, overview summary and phone traffic calendar. */
.profile-device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-device-status i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: 0;
  border-radius: 50%;
  color: inherit;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: statusGlow 1.8s ease-in-out infinite;
}

.account-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-status-row .status-line,
.account-status-row .key-summary {
  min-width: 0;
}

.account-status-row .key-summary {
  flex: 0 1 auto;
  justify-content: flex-end;
  text-align: right;
  line-height: 1.3;
}

.account-status > p {
  margin-bottom: 0;
}

.monthly-traffic-total {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 16px 17px;
  text-align: left;
}

.monthly-traffic-total > div {
  display: grid;
  gap: 8px;
}

.monthly-traffic-total span,
.monthly-traffic-total strong {
  display: block;
}

.monthly-traffic-total strong {
  margin: 0;
  font-size: clamp(27px, 8vw, 36px);
}

.monthly-traffic-total > b {
  position: absolute;
  top: 13px;
  right: 14px;
}

.traffic-day-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.traffic-day-card {
  position: relative;
  min-height: 64px;
  padding: 16px 5px 7px;
  display: grid;
  place-items: center;
  align-content: center;
}

.traffic-day-card span {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 9px;
  line-height: 1;
}

.traffic-day-card strong {
  font-size: 11px;
  line-height: 1;
}

.traffic-day-card strong small {
  font-size: 7px;
}

.reboot-confirm-modal .modal-icon {
  display: none;
}

.reboot-confirm-modal h2 {
  padding: 0 22px;
}

.reboot-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 9px;
}

.reboot-confirm-actions button {
  min-height: 45px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.reboot-confirm-button {
  border: 1px solid rgba(255,95,114,.34);
  color: #ff8794;
  background: rgba(255,95,114,.09);
}

.reboot-confirm-actions button:disabled {
  opacity: .58;
  cursor: wait;
}

@media (max-width: 820px) {
  .account-status-row {
    gap: 12px;
  }

  .account-status-row .key-summary {
    max-width: 46%;
    font-size: 11px;
  }

  .account-status-row .key-summary svg {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  .modal.traffic-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 19px 12px 13px;
  }

  .modal.traffic-modal h2 {
    margin: 5px 0 15px;
    font-size: clamp(25px, 8.5vw, 34px);
  }

  .traffic-month-grid {
    gap: 7px;
  }

  .traffic-month-card {
    min-height: 67px;
    padding: 10px 4px 8px;
  }

  .traffic-day-grid {
    gap: 7px;
  }

  .traffic-day-card {
    min-height: 61px;
  }
}

@media (max-width: 390px) {
  .account-status-row {
    align-items: flex-start;
  }

  .account-status-row .status-line {
    gap: 7px;
  }

  .account-status-row .status-line strong {
    font-size: 39px;
  }

  .account-status-row .key-summary {
    max-width: 43%;
  }

  .traffic-day-grid {
    gap: 6px;
  }

  .traffic-day-card {
    min-height: 57px;
  }
}

/* Stable responsive metrics and avatars. */
.account-avatar {
  flex: 0 0 74px;
  width: 74px;
  min-width: 74px;
  height: 74px;
  min-height: 74px;
  aspect-ratio: 1;
}

.profile-metric-grid > div {
  display: grid;
  grid-template-rows: minmax(24px, auto) auto;
  align-content: start;
}

.profile-metric-grid span {
  display: flex;
  align-items: flex-start;
  min-height: 24px;
  line-height: 1.25;
}

.profile-metric-grid strong {
  align-self: end;
  margin-top: 7px;
  line-height: 1.1;
}

/* Admin server controls. */
.admin-server-controls {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.admin-server-controls-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px;
}

.admin-server-controls-heading span {
  color: var(--lime);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.admin-server-controls-heading strong {
  color: var(--muted);
  font-size: 10px;
}

.admin-server-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-server-control-grid article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #10151e;
}

.admin-server-control-grid .server-badge {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.admin-server-control-grid article > div {
  min-width: 0;
}

.admin-server-control-grid strong,
.admin-server-control-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-server-control-grid strong {
  color: var(--text);
  font-size: 12px;
}

.admin-server-control-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.admin-server-control-grid button {
  border: 1px solid rgba(82,215,255,.24);
  border-radius: 11px;
  padding: 9px 10px;
  background: rgba(82,215,255,.055);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.admin-server-control-grid button:disabled {
  opacity: .58;
  cursor: wait;
}

/* Compact, phone-first traffic calendar. */
.modal.traffic-modal {
  width: min(100%, 540px);
  max-height: min(88dvh, 780px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 18px;
}

.modal.traffic-modal h2 {
  flex: 0 0 auto;
  margin: 4px 0 16px;
  font-size: clamp(25px, 7vw, 38px);
  line-height: 1;
}

.modal.traffic-modal .modal-extra {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
  padding: 1px;
}

.modal.traffic-modal > .primary-button {
  flex: 0 0 auto;
  margin-top: 14px;
}

.monthly-traffic {
  gap: 10px;
}

.monthly-traffic-total {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 13px 15px;
  border-radius: 15px;
}

.monthly-traffic-total > div {
  min-width: 0;
}

.monthly-traffic-total > b {
  align-self: center;
  padding: 6px 9px;
  border: 1px solid rgba(187,244,81,.2);
  border-radius: 999px;
  color: var(--lime);
  font-size: 10px;
}

.monthly-traffic-total strong {
  margin-top: 4px;
  font-size: clamp(24px, 7vw, 32px);
}

.traffic-month-grid {
  gap: 7px;
}

.traffic-month-card {
  position: relative;
  min-height: 72px;
  gap: 4px;
  padding: 10px 5px 9px;
  border-radius: 13px;
}

.traffic-month-card i {
  position: absolute;
  top: 7px;
  right: 8px;
  color: rgba(147,159,178,.38);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.traffic-month-card span {
  padding-top: 5px;
  font-size: 10px;
}

.traffic-month-card strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
}

.traffic-days-head {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
  border-radius: 14px;
}

.traffic-days-head strong {
  font-size: 14px;
}

.traffic-days-head span {
  font-size: 10px;
}

.traffic-back-button {
  padding: 9px 10px;
  font-size: 9px;
}

.traffic-weekdays,
.traffic-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.traffic-weekdays {
  margin: 3px 1px -3px;
}

.traffic-weekdays span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.traffic-day-blank {
  min-height: 45px;
}

.traffic-day-card {
  min-width: 0;
  min-height: 47px;
  padding: 6px 2px;
  gap: 4px;
  border-radius: 10px;
}

.traffic-day-card span {
  font-size: 9px;
}

.traffic-day-card strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 8px;
  text-overflow: clip;
}

.traffic-day-card strong small {
  margin-left: 1px;
  font-size: 6px;
}

@media (max-width: 640px) {
  .account-avatar {
    flex-basis: 58px;
    width: 58px;
    min-width: 58px;
    height: 58px;
    min-height: 58px;
  }

  .admin-server-control-grid {
    grid-template-columns: 1fr;
  }

  .modal.traffic-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100svh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 20px 13px 14px;
  }

  .modal.traffic-modal h2 {
    margin: 5px 0 15px;
    font-size: clamp(25px, 9vw, 34px);
  }

  .modal.traffic-modal .modal-extra {
    padding: 1px 0;
  }
}

@media (max-width: 370px) {
  .profile-metric-grid {
    gap: 5px;
  }

  .profile-metric-grid > div {
    padding: 10px 7px;
  }

  .profile-metric-grid strong {
    font-size: 10px;
  }

  .traffic-month-card span,
  .traffic-month-card strong {
    font-size: 9px;
  }
}

/* Local profile concept. Kept fully scoped so the rest of the app is unchanged. */
.profile-page-heading { margin-bottom: 22px; }
.profile-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.profile-dashboard > .profile-identity-card,
.profile-dashboard > .profile-subscription-card,
.profile-dashboard > .profile-devices-card {
  grid-column: 1 / -1;
}
.profile-panel {
  padding: 21px;
  min-width: 0;
  overflow: hidden;
}
.profile-panel-heading {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-panel-heading > div { min-width: 0; flex: 1; }
.profile-panel-heading h3 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: -.02em;
}
.profile-label {
  display: block;
  color: var(--lime);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}
.profile-panel-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(187,244,81,.28);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: #19251d;
}
.profile-panel-icon svg,
.profile-device-empty svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-subscription-logo {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.profile-subscription-logo svg {
  width: 27px;
  height: 27px;
}
.profile-status-badge,
.profile-counter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  line-height: 1;
  color: #ff7180;
  background: rgba(255,95,114,.075);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.profile-device-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}
.profile-status-badge.active {
  color: var(--green);
  border-color: rgba(96,229,174,.32);
  background: rgba(96,229,174,.08);
  box-shadow: 0 0 20px rgba(96,229,174,.075);
}
.profile-status-badge {
  animation: subscriptionBadgePulseRed 2.25s ease-in-out infinite;
}
.profile-status-badge.active {
  animation-name: subscriptionBadgePulseGreen;
}
.subscription-pulse.success {
  animation: subscriptionBadgePulseGreen 2.25s ease-in-out infinite;
}
.subscription-pulse.danger {
  animation: subscriptionBadgePulseRed 2.25s ease-in-out infinite;
}
.profile-telegram-badge {
  color: #c8a8ff;
  border: 1px solid rgba(161, 112, 255, .42);
  background: rgba(132, 79, 234, .12);
  box-shadow: 0 0 15px rgba(143, 91, 245, .12);
  animation: telegramBadgePulse 2.5s ease-in-out infinite;
}
@keyframes subscriptionBadgePulseGreen {
  0%, 100% {
    box-shadow: 0 0 7px rgba(96,229,174,.12);
    filter: brightness(.96);
  }
  50% {
    box-shadow: 0 0 18px rgba(96,229,174,.36);
    filter: brightness(1.12);
  }
}
@keyframes subscriptionBadgePulseRed {
  0%, 100% {
    box-shadow: 0 0 7px rgba(255,95,114,.1);
    filter: brightness(.96);
  }
  50% {
    box-shadow: 0 0 18px rgba(255,95,114,.3);
    filter: brightness(1.1);
  }
}
@keyframes telegramBadgePulse {
  0%, 100% {
    border-color: rgba(161,112,255,.32);
    box-shadow: 0 0 8px rgba(143,91,245,.09);
  }
  50% {
    border-color: rgba(190,153,255,.7);
    box-shadow: 0 0 20px rgba(143,91,245,.3);
  }
}
.profile-counter {
  color: var(--lime);
  border-color: rgba(187,244,81,.24);
  background: rgba(187,244,81,.055);
}
.profile-subscription-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 23px;
}
.profile-subscription-summary > div { display: grid; gap: 5px; min-width: 0; }
.profile-subscription-summary strong {
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -.055em;
}
.profile-subscription-summary span,
.profile-note {
  color: var(--muted);
  font-size: 10px;
}
.profile-accent-button {
  border: 1px solid rgba(96,229,174,.34);
  border-radius: 12px;
  padding: 11px 16px;
  color: var(--green);
  background: rgba(96,229,174,.08);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.profile-progress {
  height: 4px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 99px;
  background: #242a34;
}
.profile-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--green));
  transition: width .35s ease;
}
.profile-note { margin: 11px 0 0; line-height: 1.45; }
.profile-server-access {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.profile-server-access-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.profile-server-access-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}
.profile-server-access-head small {
  color: #626a78;
  font-size: 8px;
}
.profile-server-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.profile-server {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(96,229,174,.17);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(96,229,174,.045), rgba(255,255,255,.012));
}
.profile-server-badge {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(187,244,81,.33);
  border-radius: 10px;
  color: var(--lime);
  background: #1b2d1f;
  font-size: 9px;
  font-weight: 900;
}
.profile-server > div:nth-child(2) { min-width: 0; }
.profile-server > div:nth-child(2) strong,
.profile-server > div:nth-child(2) small { display: block; }
.profile-server > div:nth-child(2) strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-server > div:nth-child(2) small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}
.profile-server-metrics {
  display: grid;
  justify-items: end;
  gap: 4px;
  white-space: nowrap;
}
.profile-server-metrics > strong {
  color: var(--lime);
  font-size: 10px;
}
.profile-server-status {
  color: var(--green);
  font-size: 8px;
  font-weight: 900;
}
.profile-server-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
  animation: statusGlow 1.8s ease-in-out infinite;
}
.profile-server.offline {
  border-color: rgba(255,95,114,.14);
  background: rgba(255,95,114,.025);
}
.profile-server.offline .profile-server-metrics > strong,
.profile-server.offline .profile-server-status { color: var(--red); }
.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.profile-metric-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
.profile-metric-grid span,
.profile-metric-grid strong { display: block; }
.profile-metric-grid span { color: var(--muted); font-size: 8px; }
.profile-metric-grid strong {
  margin-top: 6px;
  color: var(--lime);
  font-size: 12px;
  white-space: nowrap;
}
.profile-mini-chart {
  height: 50px;
  margin: 18px 2px 12px;
  display: flex;
  align-items: end;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.profile-mini-chart i {
  flex: 1;
  height: calc(var(--bar) * 42px);
  min-height: 5px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, rgba(187,244,81,.82), rgba(187,244,81,.12));
}
.profile-row-button {
  width: 100%;
  min-height: 39px;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 13px 1px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cbd1db;
  background: transparent;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.profile-row-button b,
.profile-action-list b { color: var(--lime); font-size: 20px; font-weight: 400; }
.profile-device-list { display: grid; gap: 8px; margin: 18px 0 8px; }
.profile-device {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.016);
}
.profile-device-region {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(187,244,81,.33);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: #1b2d1f;
  font-size: 9px;
  font-weight: 900;
}
.profile-device strong,
.profile-device small,
.profile-device-empty strong,
.profile-device-empty small { display: block; }
.profile-device strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-device small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.profile-device-status {
  color: var(--red);
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}
.profile-device-status.online { color: var(--green); }
.profile-device-empty {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--lime);
}
.profile-device-empty > svg {
  box-sizing: content-box;
  padding: 9px;
  border: 1px solid rgba(187,244,81,.28);
  border-radius: 11px;
  background: #19251d;
}
.profile-device-empty strong { color: var(--text); font-size: 11px; }
.profile-device-empty small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-toggle-list,
.profile-action-list { display: grid; gap: 1px; margin-top: 15px; }
.profile-toggle-list button,
.profile-action-list button {
  width: 100%;
  min-height: 53px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 1px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.profile-toggle-list button:last-child,
.profile-action-list button:last-child { border-bottom: 0; }
.profile-toggle-list button > span,
.profile-action-list button > span { min-width: 0; flex: 1; }
.profile-toggle-list strong,
.profile-toggle-list small,
.profile-action-list strong,
.profile-action-list small { display: block; }
.profile-toggle-list strong,
.profile-action-list strong { font-size: 10px; }
.profile-toggle-list small,
.profile-action-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.profile-toggle-list button > i {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #242a34;
  transition: .2s;
}
.profile-toggle-list button > i:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #777f8d;
  transition: .2s;
}
.profile-toggle-list button[aria-pressed="true"] > i {
  border-color: rgba(187,244,81,.4);
  background: rgba(187,244,81,.16);
}
.profile-toggle-list button[aria-pressed="true"] > i:after {
  left: 19px;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(187,244,81,.35);
}

@media (max-width: 720px) {
  .profile-page-heading { margin-bottom: 16px; }
  .profile-dashboard { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .profile-dashboard > .profile-identity-card,
  .profile-dashboard > .profile-subscription-card,
  .profile-dashboard > .profile-devices-card { grid-column: auto; }
  .profile-dashboard .profile-card,
  .profile-dashboard .profile-panel { padding: 18px; border-radius: 20px; }
  .profile-dashboard .profile-main { align-items: center; }
  .profile-dashboard .profile-main h2 { font-size: 16px; }
  .profile-dashboard .profile-main p { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-dashboard .stats { margin-top: 18px; padding-top: 17px; }
  .profile-dashboard .stats div { padding-left: 10px; }
  .profile-dashboard .stats strong { font-size: 12px; }
  .profile-panel-heading h3 { font-size: 14px; }
  .profile-subscription-summary { margin-top: 19px; }
  .profile-subscription-summary strong { font-size: 30px; }
  .profile-metric-grid { gap: 6px; }
  .profile-metric-grid > div { padding: 10px 8px; }
  .profile-metric-grid strong { font-size: 10px; }
  .profile-device { padding: 8px; }
  .profile-server-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 390px) {
  .profile-dashboard .profile-main p { max-width: 160px; }
  .profile-status-badge { min-height: 28px; padding: 0 8px; font-size: 8px; }
  .profile-subscription-summary { align-items: center; }
  .profile-accent-button { padding: 10px 12px; }
  .profile-device-status { font-size: 0; }
  .profile-device-status i { margin-right: 0; }
}

.home-server-card { padding: 20px; }
.home-server-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.home-server-heading > div { display: grid; gap: 4px; }
.home-server-heading strong { font-size: 15px; }
.home-server-heading small { color: var(--muted); font-size: 9px; }
.home-server-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.home-server-item {
  background: linear-gradient(145deg, rgba(96,229,174,.04), rgba(255,255,255,.01));
}

/* Keep the Telegram identity visible on compact profile layouts. */
.profile-identity-card .profile-main > div {
  min-width: 0;
  flex: 1;
}
.profile-identity-card .profile-main {
  position: relative;
  align-items: center;
}
.profile-identity-card .profile-main .pill {
  display: inline-flex !important;
  flex: 0 0 auto;
  position: absolute;
  top: 0;
  right: 0;
}
.profile-identity-card .profile-main h2 {
  padding-right: 105px;
}
.profile-identity-card .profile-main p {
  max-width: none;
  padding-right: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 560px) {
  .home-server-card { padding: 17px; border-radius: 18px; }
  .home-server-heading { align-items: center; }
  .home-server-heading small { max-width: 110px; text-align: right; line-height: 1.35; }
  .home-server-list { grid-template-columns: minmax(0, 1fr); }
  .profile-identity-card .profile-main { gap: 10px; }
  .profile-identity-card .avatar.large {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  .profile-identity-card .profile-main h2 {
    padding-right: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-identity-card .profile-main p {
    max-width: none;
    padding-top: 2px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .profile-identity-card .profile-main .pill {
    padding: 7px 9px;
    font-size: 8px;
  }
}

.modal.user-traffic-modal {
  width: min(92vw, 520px);
}
.modal.user-traffic-modal .modal-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(187,244,81,.28);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: #19251d;
}
.modal.user-traffic-modal .modal-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-traffic-details {
  display: grid;
  gap: 15px;
  text-align: left;
}
.user-traffic-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.user-traffic-summary > div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
.user-traffic-summary span,
.user-traffic-summary strong {
  display: block;
}
.user-traffic-summary span {
  color: var(--muted);
  font-size: 8px;
}
.user-traffic-summary strong {
  margin-top: 7px;
  color: var(--lime);
  font-size: 12px;
  white-space: nowrap;
}
.user-traffic-days {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.012);
}
.user-traffic-days-title {
  margin-bottom: 2px;
  color: #cfd5df;
  font-size: 10px;
  font-weight: 900;
}
.user-traffic-days > div {
  display: grid;
  grid-template-columns: 42px minmax(60px, 1fr) 72px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 8px;
}
.user-traffic-days i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #242a34;
}
.user-traffic-days i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--green));
}
.user-traffic-days strong {
  color: #dbe0e8;
  text-align: right;
  font-size: 9px;
}
@media (max-width: 390px) {
  .user-traffic-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .user-traffic-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .user-traffic-summary strong {
    margin-top: 0;
  }
}


.admin-total-card[data-admin-traffic-monthly] {
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.admin-total-card[data-admin-traffic-monthly]:hover {
  border-color: rgba(187,244,81,.28);
  background: linear-gradient(145deg, rgba(19,25,34,.98), rgba(12,16,23,.98));
  transform: translateY(-1px);
}

.monthly-traffic {
  display: grid;
  gap: 12px;
  text-align: left;
}

.modal.traffic-modal .modal-icon {
  display: none;
}

.modal.traffic-modal h2 {
  margin: 10px 0 18px;
}

.modal.traffic-modal p {
  margin-bottom: 0;
}

.modal.traffic-modal p:empty {
  display: none;
}

.modal.traffic-modal .modal-extra {
  margin-top: 0;
}

.monthly-traffic-total {
  border: 1px solid rgba(187,244,81,.22);
  background: rgba(187,244,81,.055);
  border-radius: 16px;
  padding: 15px 16px;
  display: grid;
  gap: 5px;
}

.monthly-traffic-total span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.monthly-traffic-total strong {
  color: var(--lime);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
}

.monthly-traffic-list {
  display: grid;
  gap: 8px;
}

.monthly-traffic-row {
  border: 1px solid var(--line);
  background: #111721;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.monthly-traffic-row strong {
  color: var(--text);
  font-size: 14px;
}

.monthly-traffic-row b {
  color: var(--lime);
  font-size: 14px;
  white-space: nowrap;
}

.traffic-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.traffic-month-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: #111721;
  border-radius: 15px;
  padding: 13px 8px;
  display: grid;
  gap: 8px;
  text-align: center;
  cursor: pointer;
}

.traffic-month-card.has-traffic {
  border-color: rgba(187,244,81,.34);
  background: linear-gradient(145deg, rgba(27,45,31,.74), rgba(13,17,24,.98));
}

.traffic-month-card span {
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.traffic-month-card strong {
  color: var(--lime);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.traffic-days-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(187,244,81,.22);
  background: rgba(187,244,81,.045);
  border-radius: 16px;
  padding: 12px;
}

.traffic-days-head strong,
.traffic-days-head span {
  display: block;
}

.traffic-days-head strong {
  color: var(--text);
  font-size: 16px;
}

.traffic-days-head span {
  color: var(--lime);
  font-size: 12px;
  font-weight: 850;
  margin-top: 3px;
}

.traffic-back-button {
  border: 1px solid rgba(187,244,81,.34);
  background: #1b2d1f;
  color: var(--lime);
  border-radius: 12px;
  padding: 10px 11px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.traffic-day-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.traffic-day-card {
  min-height: 58px;
  border: 1px solid var(--line);
  background: #111721;
  border-radius: 13px;
  padding: 9px 6px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.traffic-day-card:is(button) {
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.traffic-day-card:is(button):active {
  transform: scale(.97);
}

.traffic-day-card.has-traffic {
  border-color: rgba(187,244,81,.32);
  background: rgba(187,244,81,.055);
}

.traffic-day-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.traffic-day-card strong {
  color: var(--lime);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.traffic-day-users {
  display: grid;
  gap: 8px;
}

.traffic-day-user {
  min-width: 0;
  border: 1px solid var(--line);
  background: #111721;
  border-radius: 15px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.traffic-day-user > div {
  min-width: 0;
}

.traffic-day-user strong,
.traffic-day-user span {
  display: block;
}

.traffic-day-user strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.traffic-day-user span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.traffic-day-user b {
  flex: 0 0 auto;
  color: var(--lime);
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .modal.traffic-modal h2 {
    margin: 10px 0 18px;
  }
}

/* Final NOVA logo: tilted Clean Shield with Core Shield dark fill. */
.brand-mark {
  background: linear-gradient(145deg, rgba(35,58,28,.86), rgba(15,22,19,.96)) !important;
  color: var(--lime) !important;
  border: 1px solid rgba(187,244,81,.38) !important;
  box-shadow: inset 0 0 18px rgba(187,244,81,.045), 0 0 20px rgba(187,244,81,.075) !important;
  transform: rotate(-5deg);
}

.brand-mark svg {
  display: block;
  width: 23px;
  height: 23px;
  stroke: currentColor;
  stroke-width: 2.25;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(5deg);
}

.boot-loader-card .brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.boot-loader-card .brand-mark svg {
  width: 31px;
  height: 31px;
}

/* Release overrides: final avatar and info-card alignment. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button,
.user-mini .avatar {
  background: linear-gradient(145deg, #252b36, #151923) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
  text-shadow: none !important;
}

.info-card {
  align-items: center !important;
}

.info-card > span {
  flex: 0 0 auto;
  align-self: center;
}

.info-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
}

.info-card strong,
.info-card p {
  line-height: 1.25;
}

/* Final avatar override: keep profile/name letters as the old dark tile. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button,
.user-mini .avatar {
  background: linear-gradient(145deg, #252b36, #151923) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
  text-shadow: none !important;
}

/* Keep info cards visually centered on the same horizontal axis. */
.info-card {
  align-items: center !important;
}

.info-card > span {
  flex: 0 0 auto;
  align-self: center;
}

.info-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 36px;
}

.info-card strong,
.info-card p {
  line-height: 1.25;
}

/* Local override: name avatars return to the original dark tile style. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button {
  background: linear-gradient(145deg, #252b36, #151923);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  text-shadow: none;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1px 0 0;
  font-weight: 900;
}

.info-card .key-empty-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .key-card.collapsible .key-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    column-gap: 10px;
  }

  .key-card.collapsible .key-icon {
    display: grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
  }
}

/* Local polish: avatar tiles and key icons use the same calm dark/lime language. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
  text-shadow: 0 0 10px rgba(187,244,81,.22);
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1px 0 0;
  font-weight: 900;
}

.info-card .key-empty-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .key-card.collapsible .key-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    column-gap: 10px;
  }

  .key-card.collapsible .key-icon {
    display: grid;
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
  }
}

.trial-panel .action-icon,
.home-key-card .action-icon,
.key-action,
.server-option.selected .server-badge {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border-color: rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.primary-button,
.connect-button,
#newKeyButton {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

.primary-button:hover,
.connect-button:hover,
#newKeyButton:hover {
  background: linear-gradient(145deg, rgba(50,58,72,.98), rgba(15,19,27,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 18px rgba(187,244,81,.045);
}

.account-avatar,
.avatar-button,
.avatar.large {
  background: linear-gradient(145deg, rgba(42,49,62,.96), rgba(13,17,24,.96));
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 18px rgba(187,244,81,.035);
}

/* Exact regional-badge look: flat dark green tile, thin lime outline, lime symbol. */
.brand-mark,
.action-icon,
.key-icon,
.server-badge,
.nav-count,
.modal-icon,
.info-card > span,
.settings-icon,
.primary-button,
.connect-button,
#newKeyButton,
.trial-panel .action-icon,
.home-key-card .action-icon,
.key-action,
.server-option.selected .server-badge {
  background: #1b2d1f;
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.42);
  box-shadow: none;
  text-shadow: none;
}

.key-action svg,
.key-icon svg,
.modal-icon svg,
.settings-icon svg {
  stroke: currentColor;
  filter: none;
}

.primary-button:hover,
.connect-button:hover,
#newKeyButton:hover {
  background: #203724;
  box-shadow: none;
}

/* Final local unification: exact same tile style as real key-card region badges. */
.brand-mark,
.action-icon,
.trial-panel .action-icon,
.home-key-card .action-icon,
.key-action,
.key-icon,
.key-card .key-icon,
.key-card.collapsible .key-icon,
.server-badge,
.server-option .server-badge,
.server-option.selected .server-badge,
.server-option:nth-of-type(1) .server-badge,
.server-option:nth-of-type(2) .server-badge,
.server-option:nth-of-type(3) .server-badge,
.nav-count,
.modal-icon,
.info-card > span,
.settings-icon {
  background: #1b2d1f;
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.42);
  box-shadow: none;
  text-shadow: none;
}

.primary-button,
.connect-button,
#newKeyButton,
.page[data-page="keys"] .page-heading .primary-button {
  background: #1b2d1f;
  color: var(--lime);
  border: 1px solid rgba(187,244,81,.42);
  box-shadow: none;
  text-shadow: none;
}

.primary-button:hover,
.connect-button:hover,
#newKeyButton:hover,
.page[data-page="keys"] .page-heading .primary-button:hover {
  background: #203724;
  box-shadow: none;
}

.key-action svg,
.key-icon svg,
.modal-icon svg,
.settings-icon svg,
.info-card svg {
  stroke: currentColor;
  filter: none;
}

/* Final name/avatar tiles: old dark style with centered letter. */
.account-avatar,
.profile-main .avatar.large,
.avatar.large,
.avatar-button,
.user-mini .avatar {
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  background: linear-gradient(145deg, #252b36, #151923);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  text-shadow: none;
}

/* Production final cascade: compact seven-column traffic calendar and status pulse. */
.profile-device-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.profile-device-status i {
  margin: 0;
  animation: statusGlow 1.8s ease-in-out infinite;
}

.modal.traffic-modal .traffic-weekdays,
.modal.traffic-modal .traffic-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.modal.traffic-modal .traffic-weekdays {
  margin: 3px 1px -2px;
}

.modal.traffic-modal .traffic-weekdays span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.modal.traffic-modal .traffic-day-blank {
  min-height: 45px;
}

.modal.traffic-modal .traffic-day-card {
  position: relative;
  min-width: 0;
  min-height: 47px;
  padding: 12px 2px 4px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
}

.modal.traffic-modal .traffic-day-card span {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 8px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong {
  font-size: 9px;
  line-height: 1;
}

.modal.traffic-modal .traffic-day-card strong small {
  font-size: 6px;
}

@media (max-width: 390px) {
  .modal.traffic-modal .traffic-weekdays,
  .modal.traffic-modal .traffic-day-grid {
    gap: 4px;
  }

  .modal.traffic-modal .traffic-day-card,
  .modal.traffic-modal .traffic-day-blank {
    min-height: 43px;
  }
}
.key-system-name,
.admin-key-system-name {
  color: #7f8a9c !important;
  font-size: 9px !important;
}

.key-card.collapsible .key-actions .key-rename-button {
  color: var(--lime);
  border-color: rgba(187, 244, 81, .28);
  background: rgba(187, 244, 81, .055);
}

.key-rename-modal .modal-icon,
.key-rename-modal .modal-text {
  display: none;
}

.key-rename-modal .modal-extra {
  width: 100%;
}

.key-rename-form {
  display: grid;
  gap: 13px;
  width: 100%;
}

.key-rename-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.key-rename-form input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(187, 244, 81, .35);
  border-radius: 13px;
  background: #090c12;
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

.key-rename-form input:focus {
  border-color: rgba(187, 244, 81, .72);
  box-shadow: 0 0 0 3px rgba(187, 244, 81, .08);
}

.key-rename-form p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
}

.key-rename-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.key-rename-actions button {
  width: 100%;
}

.key-rename-actions > :only-child {
  grid-column: 1 / -1;
}

/* Compact admin key headers. Details keep their current size when expanded. */
.admin-key-list .admin-key-row.collapsible,
.admin-key-list .admin-key-row.collapsible.open {
  padding: 10px 12px;
}

.admin-key-list .admin-key-head {
  min-height: 54px;
  gap: 8px;
}

.admin-key-list .admin-key-head .admin-key-main {
  gap: 1px;
}

.admin-key-list .admin-key-head .admin-key-main small,
.admin-key-list .admin-key-head .admin-key-traffic {
  margin-top: 2px;
}

.admin-key-list .admin-key-row.collapsible .admin-key-details {
  margin-top: 7px;
  padding-top: 9px;
}

/* The accordion body must never participate in header alignment. */
.admin-key-list .admin-managed-key.collapsible > .admin-key-head,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  width: 100%;
  min-height: 60px;
  height: 60px;
  margin: 0;
  padding: 0;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .admin-key-main,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .admin-key-main {
  align-self: center;
  justify-self: stretch;
  min-height: 0;
  margin: 0;
  padding: 0;
  transform: none;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .key-toggle,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle {
  align-self: center;
  margin: 0;
  transform: none;
}

.key-card.collapsible > .key-head,
.key-card.collapsible.open > .key-head {
  min-height: 48px;
  align-items: center;
  margin: 0;
  transform: none;
}

/* Keep the admin key header at identical coordinates in both accordion states. */
.admin-key-list .admin-key-row.collapsible > .admin-key-head,
.admin-key-list .admin-key-row.collapsible.open > .admin-key-head {
  position: relative;
  display: block;
  height: 60px;
  min-height: 60px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.admin-key-list .admin-key-row.collapsible > .admin-key-head > .admin-key-main,
.admin-key-list .admin-key-row.collapsible.open > .admin-key-head > .admin-key-main {
  position: absolute;
  top: 50%;
  right: 146px;
  left: 0;
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  transform: translateY(-50%) !important;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .connection-status {
  position: absolute;
  top: 50%;
  right: 54px;
  margin: 0;
  transform: translateY(-50%) !important;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .key-toggle,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  margin: 0;
  transform: translateY(-50%) !important;
}

.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle svg {
  transform: rotate(180deg);
}

.key-rename-modal #modalTitle {
  max-width: calc(100% - 42px);
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1.08;
}

.key-rename-actions {
  grid-template-columns: minmax(0, 1fr);
}

/* Stable account summary: it exists in the initial HTML and never shifts after auth. */
.account-status-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(132px, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
}

.account-status-row .key-summary {
  max-width: none;
  justify-self: end;
  justify-content: flex-end;
  margin: 0;
}

/* Last activity sits beside the user status without changing the card grid. */
.admin-user-head {
  position: relative;
}

.admin-user-presence {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-user-presence .admin-user-status {
  position: static;
  margin: 0;
}

.admin-user-last-online {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}

.admin-user-last-online:empty {
  display: none;
}

.admin-user-head > div:first-child {
  padding-right: 180px;
}

/* One immutable admin-key header grid in both accordion states. */
.admin-key-list .admin-managed-key.collapsible,
.admin-key-list .admin-managed-key.collapsible.open {
  padding: 8px 12px;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 38px;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 58px;
  margin: 0;
  padding: 0;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .admin-key-main,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .admin-key-main {
  position: static;
  inset: auto;
  align-self: center;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  transform: none !important;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .key-toggle,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle {
  position: static;
  inset: auto;
  align-self: center;
  justify-self: end;
  margin: 0;
  transform: none !important;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .connection-status,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .connection-status {
  box-sizing: border-box;
  width: 68px;
  justify-content: center;
  padding-right: 7px;
  padding-left: 7px;
}

.admin-key-list .admin-managed-key.collapsible > .admin-key-head > .key-toggle,
.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle {
  width: 38px;
  height: 38px;
  justify-self: end;
}

.admin-key-list .admin-managed-key .admin-key-main.has-display-name {
  padding-top: 3px;
  padding-bottom: 3px;
}

.admin-key-list .admin-managed-key.collapsible.open > .admin-key-head > .key-toggle svg {
  transform: rotate(180deg);
}

.admin-key-main .admin-key-subtitle {
  overflow: hidden;
  font-size: 9px !important;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .admin-user-presence {
    right: 14px;
    gap: 6px;
  }

  .admin-user-head > div:first-child {
    padding-right: 155px;
  }

  .admin-user-last-online {
    font-size: 8px;
  }

  .admin-key-list .admin-managed-key.collapsible > .admin-key-head,
  .admin-key-list .admin-managed-key.collapsible.open > .admin-key-head {
    grid-template-columns: minmax(0, 1fr) 68px 38px;
    gap: 6px;
  }

  .admin-key-main .admin-key-subtitle {
    font-size: 8.5px !important;
  }
}

@media (max-width: 390px) {
  .account-status-row {
    grid-template-columns: minmax(0, auto) minmax(112px, 1fr);
    align-items: center;
    gap: 10px;
  }

  .account-status-row .key-summary {
    max-width: none;
  }
}

@media (min-width: 700px) {
  html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
  }
}
