@font-face { font-family: Manrope; src: url('/static/fonts/Manrope-Variable.ttf') format('truetype'); font-style: normal; font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #101a36;
  --muted: #6e7c9b;
  --blue: #1767f5;
  --blue-dark: #1055d4;
  --blue-soft: #edf4ff;
  --line: #e2eaf5;
  --canvas: #f7faff;
  --green: #0ca66b;
  --shell: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.section-shell, .header-inner, .footer-inner { width: min(var(--shell), calc(100% - 64px)); margin-inline: auto; }

.site-header { position: relative; z-index: 5; background: rgba(255,255,255,.94); border-bottom: 1px solid #edf1f7; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 54px; }
.brand { flex: none; color: #101a36; font-size: 27px; font-weight: 800; letter-spacing: -.075em; }
.brand-dot { color: var(--blue); }
.main-nav { display: flex; align-items: center; gap: 38px; color: #43516e; font-size: 14px; font-weight: 600; }
.main-nav a, .header-login { transition: color .18s ease; }
.main-nav a:hover, .header-login:hover { color: var(--blue); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 700; }
.header-actions .header-logout { margin: 0; }
.header-login { color: #34415e; }
.button { display: inline-flex; min-height: 48px; justify-content: center; align-items: center; gap: 12px; padding: 0 22px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #2275ff, #135be8); box-shadow: 0 9px 20px rgba(23,103,245,.19); }
.button-primary:hover { background: linear-gradient(135deg, #1767f5, #0c4fce); box-shadow: 0 12px 25px rgba(23,103,245,.25); }
.button-outline { color: var(--blue); border-color: #b9d0ff; background: #fff; }
.button-outline:hover { background: #f6f9ff; }
.button-small { min-height: 42px; padding-inline: 20px; border-radius: 11px; }
.button-large { min-height: 58px; min-width: 230px; border-radius: 13px; font-size: 16px; }
.button-large span { font-size: 20px; font-weight: 500; }
.menu-toggle, .mobile-nav { display: none; }

.hero { position: relative; display: grid; grid-template-columns: .94fr 1.06fr; align-items: center; gap: 24px; min-height: 540px; padding-block: 54px 42px; }
.hero::before { position: absolute; z-index: -1; top: 0; left: 48%; right: calc((var(--shell) - 100vw) / 2); height: 100%; content: ""; background: radial-gradient(ellipse at 52% 50%, #edf7ff 0, rgba(243,249,255,.7) 38%, rgba(255,255,255,0) 75%); }
.hero-copy { position: relative; z-index: 1; padding: 12px 0 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; color: #07875b; background: #e8fbf4; border: 1px solid #c9f4e3; border-radius: 99px; font-size: 13px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #16b87a; box-shadow: 0 0 0 4px rgba(22,184,122,.11); }
.status-dot-amber { background: #e6a328; box-shadow: 0 0 0 4px rgba(230,163,40,.13); }
.hero h1 { max-width: 700px; margin: 28px 0 18px; font-size: clamp(43px, 5vw, 66px); line-height: 1.08; letter-spacing: -.065em; font-weight: 800; }
.hero h1 span { white-space: nowrap; }
.hero-lead { max-width: 520px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 30px; }
.text-link { color: var(--blue); font-size: 15px; font-weight: 800; }
.text-link span { margin-left: 6px; font-size: 21px; vertical-align: -1px; }
.hero-note { display: flex; align-items: center; gap: 9px; margin-top: 25px; color: #7a87a2; font-size: 12px; font-weight: 600; }
.note-icon { display: grid; width: 19px; height: 19px; place-items: center; color: var(--green); background: #eafaf3; border-radius: 50%; font-size: 12px; }

.network-art { position: relative; min-width: 0; height: 455px; overflow: visible; }
.network-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.globe-glow { position: absolute; inset: 11% 3% 8%; border-radius: 50%; background: radial-gradient(ellipse at 53% 50%, rgba(85,182,255,.15), rgba(85,182,255,.02) 64%, transparent 70%); filter: blur(8px); }
.server-node { position: absolute; display: flex; align-items: center; gap: 11px; min-width: 158px; padding: 12px 15px; background: rgba(255,255,255,.94); border: 1px solid rgba(221,233,248,.8); border-radius: 13px; box-shadow: 0 12px 32px rgba(50,95,153,.13); }
.server-node b, .server-node small, .security-card b, .security-card small { display: block; }
.server-node b { color: #172442; font-size: 13px; }
.server-node small { margin-top: 3px; color: #8390a9; font-size: 10px; }
.server-node i { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #17bd7d; }
.node-flag { display: grid; width: 29px; height: 29px; place-items: center; background: #f2f6fb; border-radius: 50%; font-size: 17px; }
.node-moscow { top: 12%; left: 17%; }
.node-germany { top: 36%; right: -1%; }
.server-stack { position: absolute; display: flex; flex-direction: column; gap: 3px; width: 43px; height: 50px; padding: 7px 6px; border: 1px solid #348bed; border-radius: 5px; background: linear-gradient(145deg,#55bbfa,#2373dc); box-shadow: 0 12px 22px rgba(30,108,218,.25), 0 0 0 9px rgba(66,165,244,.09); transform: skewY(-8deg); }
.server-stack span { height: 9px; border: 1px solid rgba(255,255,255,.42); border-radius: 2px; background: linear-gradient(90deg,rgba(13,71,163,.62),rgba(30,124,227,.48)); }
.server-stack b { position: absolute; right: 9px; bottom: 11px; width: 3px; height: 3px; border-radius: 50%; background: #9df7db; box-shadow: 0 0 5px #9df7db; }
.stack-one { top: 47%; left: 43%; }
.stack-two { top: 57%; right: 22%; transform: scale(.86) skewY(-8deg); }
.security-card { position: absolute; right: 16%; bottom: 9%; display: flex; align-items: center; gap: 13px; padding: 15px 18px; background: rgba(255,255,255,.96); border: 1px solid #e2ebf7; border-radius: 14px; box-shadow: 0 12px 36px rgba(50,95,153,.12); }
.security-card b { max-width: 160px; color: #172442; font-size: 12px; }
.security-card small { margin-top: 4px; color: #8995ac; font-size: 10px; }
.security-icon { display: grid; width: 38px; height: 38px; place-items: center; color: white; background: linear-gradient(145deg,#34d399,#0fa66f); border-radius: 12px; font-size: 20px; font-weight: 800; }
.art-caption { position: absolute; bottom: 2%; left: 42%; color: #92a4bf; font-size: 10px; letter-spacing: .04em; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-block: 14px 80px; }
.feature-card { min-height: 190px; padding: 25px 28px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.88); box-shadow: 0 10px 28px rgba(31,69,117,.035); }
.feature-icon { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 18px; color: var(--blue); background: #eef5ff; border-radius: 50%; }
.icon-speed { font-size: 36px; font-weight: 800; line-height: 1; }
.feature-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.feature-card h2 { margin: 0 0 7px; font-size: 17px; letter-spacing: -.035em; }
.feature-card p { max-width: 310px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.how-section { padding-block: 30px 92px; }
.section-heading { margin-bottom: 30px; }
.section-heading h2, .support-section h2 { margin: 9px 0 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.055em; }
.section-kicker { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { min-height: 155px; padding: 22px 24px; border-radius: 14px; background: #f7faff; border: 1px solid #e8eef8; }
.step-number { color: #83a9ed; font-size: 13px; font-weight: 800; }
.step-card h3 { margin: 19px 0 7px; font-size: 16px; }
.step-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.plans-section { padding: 82px 0 92px; background: linear-gradient(180deg,#f8fbff,#f3f8ff); border-top: 1px solid #eef3fa; border-bottom: 1px solid #eaf0f8; }
.section-heading-centered { text-align: center; }
.section-heading-centered h2 { margin: 12px 0 8px; font-size: clamp(31px, 4vw, 44px); }
.section-heading-centered p { margin: 0; color: var(--muted); font-size: 15px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 18px; margin-top: 38px; }
.plan-card { position: relative; display: flex; flex-direction: column; min-height: 310px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgba(33,76,128,.045); }
.plan-card-featured { border-color: #a9c7ff; box-shadow: 0 14px 38px rgba(23,103,245,.1); }
.plan-badge { position: absolute; top: 18px; right: 18px; padding: 6px 10px; color: #1767f5; background: #edf4ff; border-radius: 50px; font-size: 10px; font-weight: 800; }
.plan-card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.04em; }
.plan-description { min-height: 38px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.plan-price { margin: 23px 0 17px; font-size: 34px; font-weight: 800; letter-spacing: -.06em; }
.plan-price span { font-size: 14px; font-weight: 700; letter-spacing: 0; }
.plan-details { display: grid; gap: 10px; padding: 16px 0; margin: 0 0 18px; border-block: 1px solid #edf1f7; list-style: none; }
.plan-details li { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.plan-details b { color: #243452; }
.plan-button { width: 100%; margin-top: auto; }
.plans-empty { max-width: 450px; padding: 36px; margin: 32px auto 0; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.empty-spark { display: block; margin-bottom: 12px; color: var(--blue); font-size: 25px; }
.plans-empty b { font-size: 17px; }
.plans-empty p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.support-section { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 70px; }
.support-section p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.site-footer { background: #fff; border-top: 1px solid #edf1f7; }
.footer-inner { min-height: 78px; display: flex; align-items: center; gap: 25px; color: #8792a8; font-size: 11px; }
.brand-footer { font-size: 21px; }
.footer-inner > span:last-child { margin-left: auto; }
.maintenance-card { width: min(660px, calc(100% - 40px)); margin: 100px auto; padding: 48px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 18px 55px rgba(31,69,117,.08); }
.maintenance-card h1 { margin: 24px 0 10px; font-size: 42px; letter-spacing: -.06em; }
.maintenance-card p { color: var(--muted); line-height: 1.75; }

/* Shared customer and admin screens */
.app-page, .admin-page { min-height: 100vh; background: #f6f9fe; }
.app-main { min-height: calc(100vh - 155px); padding-block: 38px 72px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin: 9px 0 0; font-size: clamp(30px,4vw,40px); letter-spacing: -.06em; }
.back-link { color: #7c8ba7; font-size: 12px; font-weight: 700; }
.mobile-account-link { display: none; color: var(--blue); font-size: 13px; font-weight: 800; }
.app-footer { background: #fff; border-top: 1px solid var(--line); }
.app-footer > div { min-height: 76px; display: flex; align-items: center; gap: 20px; color: #8792a8; font-size: 11px; }
.app-footer > div > span:last-child { margin-left: auto; }
.notice { padding: 13px 16px; margin: 0 0 20px; border: 1px solid; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.notice-success { color: #08754f; background: #edfbf5; border-color: #c7f1df; }
.notice-error { color: #a33838; background: #fff2f1; border-color: #f5d1cd; }
.notice-warning { color: #8c6214; background: #fff9eb; border-color: #f2e2b6; }
.form-card, .content-card { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 12px 34px rgba(31,69,117,.045); }
.auth-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(320px, .75fr); gap: 28px; align-items: stretch; max-width: 950px; margin: 30px auto; }
.auth-layout-plans { display: block; max-width: 1280px; margin: 38px auto 54px; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 465px; padding: 35px; color: #fff; border-radius: 18px; background: radial-gradient(circle at 82% 22%,rgba(104,188,255,.45),transparent 32%),linear-gradient(145deg,#1657d7,#173779 70%,#142750); }
.auth-aside::after { position: absolute; right: -35px; bottom: -95px; width: 300px; height: 300px; content: ""; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.035),0 0 0 75px rgba(255,255,255,.025); }
.auth-aside h2 { position: relative; z-index: 1; max-width: 360px; margin: 0; font-size: 34px; line-height: 1.13; letter-spacing: -.06em; }
.auth-aside p { position: relative; z-index: 1; max-width: 340px; color: rgba(255,255,255,.76); font-size: 14px; line-height: 1.7; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand-dot { color: #71d4ff; }
.auth-aside-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.84); font-size: 11px; }
.auth-card { padding: 34px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 45px rgba(31,69,117,.065); }
.auth-card-plans { padding: 42px 46px; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.06em; }
.auth-subtitle { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field { display: grid; gap: 7px; margin: 15px 0; }
.field label, .field-label { color: #34425f; font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea, .select-control { width: 100%; min-height: 46px; padding: 11px 13px; color: var(--ink); background: #fbfcff; border: 1px solid #dce5f1; border-radius: 10px; outline: 0; font: inherit; font-size: 13px; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #76a4ff; box-shadow: 0 0 0 3px rgba(23,103,245,.1); }
.field-hint { color: #8995aa; font-size: 11px; line-height: 1.5; }
.form-submit { width: 100%; margin-top: 9px; }
.form-bottom { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.form-bottom a { color: var(--blue); font-weight: 800; }
.auth-card .field:has(.plan-choice) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auth-card-plans .field:has(.plan-choice) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.auth-card .field:has(.plan-choice) > .field-label { grid-column: 1 / -1; }
.plan-choice { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-content: start; align-items: start; column-gap: 9px; row-gap: 6px; min-height: 96px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.auth-card-plans .plan-choice { display: flex; min-height: 270px; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border-radius: 15px; }
.plan-choice:has(input:checked) { border-color: #86afff; background: #f3f7ff; }
.plan-choice input { grid-row: 1 / span 2; width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 2px 0 0; accent-color: var(--blue); }
.plan-choice strong { margin: 0; font-size: 11px; line-height: 1.4; }
.plan-choice small { grid-column: 2; display: block; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.plan-choice-heading { display: flex; align-items: center; gap: 10px; }
.auth-card-plans .plan-choice-heading input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.auth-card-plans .plan-choice-heading strong { color: var(--ink); font-size: 16px; }
.plan-duration { color: var(--muted); font-size: 13px; }
.plan-traffic { color: #1d5cc5; font-size: 18px; font-weight: 800; }
.auth-card-plans .plan-choice small { color: #71809b; font-size: 12px; line-height: 1.6; }
.plan-price { margin-top: auto; color: var(--ink); font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.consent-list { display: grid; gap: 12px; margin: 20px 0 10px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.consent-list legend { padding: 0 5px; color: #34425f; font-size: 12px; font-weight: 800; }
.consent-item { display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: start; gap: 9px; color: #53627f; font-size: 11px; line-height: 1.55; cursor: pointer; }
.consent-item input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--blue); }
.consent-item a { color: var(--blue); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.registration-account-summary { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 12px 14px; color: #53627f; background: #f7faff; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; }
.registration-account-summary strong { color: var(--ink); overflow-wrap: anywhere; }
.registration-step-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; }
.registration-step-actions .button { min-height: 44px; padding-inline: 14px; font-size: 11px; }
.auth-card-plans .registration-step-actions { align-items: center; margin-top: 28px; }
.auth-card-plans .registration-step-actions .button-primary { min-width: 280px; min-height: 54px; font-size: 14px; }
.legal-draft { max-width: 760px; margin: 42px auto; }
.legal-draft h2 { margin: 8px 0 14px; font-size: 25px; letter-spacing: -.04em; }
.legal-draft p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.account-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.account-top > form { display: none; }
.account-email { color: var(--muted); font-size: 13px; }
.account-overview { display: grid; grid-template-columns: 1.2fr .8fr .9fr; align-items: center; gap: 18px; padding: 24px; background: linear-gradient(105deg,#f3fff9,#fff 55%); border: 1px solid #cdeedc; border-radius: 17px; }
.subscription-state { display: flex; align-items: center; gap: 13px; }
.state-icon { display: grid; flex: none; width: 44px; height: 44px; place-items: center; color: #fff; background: linear-gradient(145deg,#37cf90,#0ca66b); border-radius: 50%; font-size: 22px; font-weight: 800; }
.subscription-state strong { display: block; color: #089362; font-size: 17px; }
.subscription-state small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.metric { padding-left: 20px; border-left: 1px solid #e4eee8; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 5px; font-size: 21px; letter-spacing: -.04em; }
.progress-track { height: 7px; overflow: hidden; margin-top: 9px; background: #e8edf5; border-radius: 99px; }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg,#1767f5,#42a5ff); border-radius: inherit; }
.account-section { margin-top: 30px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 15px; }
.section-title-row h2 { margin: 0; font-size: 21px; letter-spacing: -.05em; }
.muted-link { color: var(--blue); font-size: 12px; font-weight: 800; }
.connection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.connection-card { display: flex; flex-direction: column; min-height: 205px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 10px 28px rgba(31,69,117,.035); }
.connection-head { display: flex; align-items: center; gap: 10px; }
.connection-flag { display: grid; width: 35px; height: 35px; place-items: center; background: #f1f5fb; border-radius: 50%; font-size: 19px; }
.connection-head h3 { margin: 0; font-size: 14px; }
.connection-state { display: flex; align-items: center; gap: 6px; margin: 9px 0 13px 45px; color: #0b9a66; font-size: 10px; }
.connection-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-left: 45px; }
.connection-tags span { padding: 6px 9px; color: #60718e; background: #edf4ff; border-radius: 7px; font-size: 9px; font-weight: 800; }
.connection-direct { margin: 4px 0 10px 45px; color: #1767f5; font-size: 10px; font-weight: 800; }
.connection-card .button { width: 100%; min-height: 39px; margin-top: auto; font-size: 11px; }
.empty-state { padding: 24px; color: var(--muted); background: #fff; border: 1px dashed #cfdaea; border-radius: 14px; text-align: center; font-size: 12px; line-height: 1.7; }
.subscription-link-card { padding: 21px 24px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.subscription-link-card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.04em; }
.subscription-link-card p { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; min-width: 0; padding: 12px; color: #35435e; background: #f8faff; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 12px; }
.copy-row button { flex: none; }
.queue-note { margin-top: 15px; padding: 13px 16px; color: #765311; background: #fff9eb; border: 1px solid #f0e2bd; border-radius: 11px; font-size: 12px; line-height: 1.55; }
.inline-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; vertical-align: middle; }
.inline-form select, .inline-form input:not([type="hidden"]) { min-width: 0; min-height: 34px; padding: 6px 10px; color: #3b4966; background: #fbfcff; border: 1px solid #dce5f1; border-radius: 8px; font: inherit; font-size: 11px; }
.inline-form select { max-width: 100%; }
.inline-form > span { flex: 1 1 130px; min-width: 0; }
.admin-page .inline-form select, .admin-page .inline-form input:not([type="hidden"]) { font-size: var(--admin-type-small, 12px); }
.admin-two-column .content-card .inline-form { display: flex; width: 100%; }
.admin-two-column .content-card .inline-form select { flex: 1 1 auto; }

/* Admin console */
.admin-page { background: #f6f8fc; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 3; display: flex; width: 238px; flex-direction: column; padding: 25px 16px 18px; background: #fff; border-right: 1px solid #e7edf5; }
.admin-sidebar .brand { padding: 0 12px 27px; }
.admin-label { padding: 0 12px 12px; color: #98a3b6; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; color: #66748e; border-radius: 10px; font-size: 12px; font-weight: 700; }
.admin-nav a.active { color: #145de0; background: #edf4ff; }
.nav-mark { width: 8px; height: 8px; border: 1.8px solid currentColor; border-radius: 3px; }
.admin-nav a.active .nav-mark { background: currentColor; box-shadow: 0 0 0 4px rgba(23,103,245,.1); }
.sidebar-bottom { margin-top: auto; }
.admin-status { display: flex; align-items: center; gap: 8px; padding: 13px 12px; color: #78869f; font-size: 10px; }
.admin-status span { line-height: 1.45; }
.admin-status i { width: 7px; height: 7px; background: #16b87a; border-radius: 50%; }
.sidebar-logout { display: flex; justify-content: space-between; width: 100%; padding: 13px 12px; color: #8a96aa; background: transparent; border: 0; border-top: 1px solid #edf1f7; text-align: left; font-size: 11px; cursor: pointer; }
.admin-content { min-height: 100vh; margin-left: 238px; }
.admin-topbar { height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0 34px; color: #8a96aa; background: #fff; border-bottom: 1px solid #e7edf5; font-size: 11px; }
.admin-topbar span span { padding: 0 7px; color: #c1cad8; }
.admin-topbar a { color: #63728e; font-weight: 700; }
.admin-main { max-width: 1420px; padding: 32px 34px 60px; margin: auto; }
.admin-page-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.admin-page-title h1 { margin: 7px 0 0; font-size: 30px; letter-spacing: -.06em; }
.admin-avatar { display: grid; width: 38px; height: 38px; place-items: center; color: #1767f5; background: #e9f1ff; border-radius: 50%; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.stat-card { padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.stat-card span { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin-top: 10px; font-size: 26px; letter-spacing: -.05em; }
.stat-foot { margin-top: 8px; color: #91a0b6; font-size: 9px; }
.admin-section { margin-top: 25px; }
.subscription-settings { max-width: 1120px; }
.subscription-settings-section { padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.subscription-setting { padding: 13px 15px; margin: 15px 0; background: #f8faff; border: 1px solid var(--line); border-radius: 11px; }
.subscription-app-card { min-width: 0; padding: 15px; background: #fbfcff; border: 1px solid var(--line); border-radius: 11px; }
.subscription-app-card h3 { margin: 0 0 5px; font-size: 14px; }
.subscription-app-card > .field-hint { margin: 0 0 12px; }
.subscription-app-card .switch-label { margin-bottom: 4px; }
.subscription-settings details.subscription-setting summary { color: #52617d; font-size: 11px; font-weight: 700; cursor: pointer; }
.subscription-app-tabs { display: flex; gap: 7px; padding: 5px; margin: 16px 0; background: #f1f5fb; border: 1px solid #e6edf7; border-radius: 11px; width: fit-content; }
.subscription-app-tab { min-height: 38px; min-width: 104px; padding: 0 18px; color: #63728e; background: transparent; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.subscription-app-tab.is-active { color: #1767f5; background: #fff; border-color: #dbe7f7; box-shadow: 0 2px 7px rgba(25,55,100,.07); }
.subscription-app-tab:focus-visible { outline: 3px solid rgba(23,103,245,.2); outline-offset: 2px; }
.subscription-app-panel { padding: 18px; background: linear-gradient(180deg,#fbfcff 0%,#f8faff 100%); border: 1px solid var(--line); border-radius: 13px; }
.subscription-app-panel[hidden] { display: none !important; }
.subscription-app-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.subscription-app-panel-head h3 { margin: 0 0 4px; font-size: 15px; }
.subscription-app-panel-head .field-hint { margin: 0; }
.subscription-announcement-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.subscription-announcement-rule { min-width: 0; padding: 14px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #dbe5f3; border-radius: 11px; box-shadow: 0 3px 10px rgba(30,55,95,.025); }
.subscription-announcement-rule:nth-child(1) { border-top-color: #36bd8a; }
.subscription-announcement-rule:nth-child(2) { border-top-color: #e2a63c; }
.subscription-announcement-rule:nth-child(3) { border-top-color: #eb8d43; }
.subscription-announcement-rule:nth-child(4) { border-top-color: #de7373; }
.subscription-announcement-rule:nth-child(5) { border-top-color: #8898b1; }
.subscription-announcement-rule:nth-child(6) { border-top-color: #6b9cf1; }
.subscription-rule-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.subscription-rule-heading label { color: #42516d; font-size: 11px; font-weight: 800; }
.subscription-announcement-rule textarea { display: block; box-sizing: border-box; width: 100%; min-height: 82px; padding: 11px 12px; color: #30415e; background: #fbfcff; border: 1px solid #e0e8f3; border-radius: 9px; outline: 0; font-family: inherit; font-size: 12px; line-height: 1.55; resize: vertical; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.subscription-announcement-rule textarea:focus { background: #fff; border-color: #76a4ff; box-shadow: 0 0 0 3px rgba(23,103,245,.09); }
.subscription-announcement-rule textarea::placeholder { color: #9aa7bb; }
.subscription-announcement-rule .announce-variable-list { gap: 6px; margin-top: 10px; }
.subscription-announcement-rule .announce-variable { padding: 6px 8px; background: #f8faff; }
.subscription-rule-heading { min-height: 20px; margin-bottom: 9px; }
.subscription-rule-heading label { font-size: 12px; }
.subscription-rule-heading .announce-counter { padding: 2px 7px; background: #f2f5fa; border-radius: 99px; font-size: 10px; }
.subscription-routing-panel { padding: 13px; margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.subscription-routing-panel h4 { margin: 0 0 12px; font-size: 12px; }
.subscription-routing-panel .field:last-child { margin-bottom: 0; }
.subscription-setting .field { margin-bottom: 0; }
.subscription-setting > .field-hint { margin: 5px 0 0; }
.subscription-settings-section .admin-form-grid > .field { align-content: start; }
.subscription-settings-section .admin-form-grid > .field > label { display: flex; align-items: flex-end; min-height: 34px; line-height: 1.35; }
.subscription-settings .admin-form-actions { margin-top: 20px; }
.announce-editor { margin-top: 12px; }
.announce-editor textarea { min-height: 76px; resize: vertical; }
.announce-editor-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.announce-counter { color: #8995aa; font-size: 11px; white-space: nowrap; }
.announce-counter.is-near-limit { color: #c47b00; }
.announce-variable-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.announce-variable { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #f7faff; color: #1764f5; font: inherit; font-size: 12px; cursor: pointer; }
.announce-variable small { color: #8995aa; font-size: 10px; }
.announce-variable:hover { border-color: #9abaff; background: #eef4ff; }
.emoji-picker { position: relative; display: inline-block; margin-top: 10px; }
.emoji-picker-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; border: 1px solid #d9e4f2; border-radius: 10px; padding: 0 12px; background: linear-gradient(180deg,#fff,#f5f8fd); color: #365273; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 5px rgba(36,63,101,.06); transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.emoji-picker-trigger:first-letter { font-size: 16px; }
.emoji-picker-trigger:hover { border-color: #9abaff; background: #f5f8ff; box-shadow: 0 5px 13px rgba(39,90,166,.12); transform: translateY(-1px); }
.emoji-picker-trigger:focus-visible { outline: 0; border-color: #6d9cff; box-shadow: 0 0 0 3px rgba(23,103,245,.14); }
.emoji-picker-menu { position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); display: grid; grid-template-columns: repeat(8, 36px); gap: 6px; padding: 11px; min-width: 326px; border: 1px solid #d8e3f1; border-radius: 15px; background: rgba(255,255,255,.98); box-shadow: 0 18px 38px rgba(34,61,102,.2); }
.emoji-picker-menu[hidden] { display: none; }
.emoji-choice { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: 9px; background: #f6f8fc; color: #203b60; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; transition: background .12s ease,border-color .12s ease,transform .12s ease,box-shadow .12s ease; }
.emoji-choice:hover { border-color: #aac4f2; background: #eaf1ff; box-shadow: 0 4px 10px rgba(46,92,166,.14); transform: translateY(-2px) scale(1.04); }
.emoji-choice:focus-visible { outline: 0; border-color: #6d9cff; box-shadow: 0 0 0 3px rgba(23,103,245,.14); }
.announce-collapse { margin: 0; }
.announce-collapse > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; color: var(--ink); font-size: 13px; font-weight: 700; }
.announce-collapse > summary::-webkit-details-marker { display: none; }
.announce-collapse > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border: 1px solid #c7d7ec; border-radius: 50%; color: #1764f5; font-size: 15px; }
.announce-collapse[open] > summary::before { content: '−'; }
.announce-collapse > summary > span:first-of-type { flex: 1; }
.announce-collapse-content { padding-top: 10px; }
.announce-preview { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbff; }
.announce-preview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.announce-preview-head strong { margin-right: auto; font-size: 12px; }
.announce-preview-head label { color: #8995aa; font-size: 11px; }
.announce-preview-head select { width: auto; min-width: 180px; padding: 7px 28px 7px 10px; font-size: 12px; }
.announce-preview > p { margin: 10px 0 5px; color: #24334d; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.announce-preview > .field-hint { display: block; }
@media (max-width: 640px) { .announce-editor-meta { align-items: flex-start; } .announce-preview-head { align-items: flex-start; } .announce-preview-head strong { flex-basis: 100%; } .announce-preview-head select { min-width: 0; flex: 1 1 100%; } .subscription-app-panel-head { align-items: flex-start; flex-direction: column; } .subscription-announcement-grid { grid-template-columns: minmax(0,1fr); } .subscription-app-panel { padding: 12px; } .subscription-app-tabs { width: 100%; } .subscription-app-tab { flex: 1; } }
@media (max-width: 640px) { .emoji-picker-menu { grid-template-columns: repeat(8, 32px); min-width: 294px; padding: 9px; gap: 5px; } .emoji-choice { width: 32px; height: 32px; font-size: 18px; } }
.admin-section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 13px; }
.admin-section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.035em; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
.admin-table th { padding: 12px 15px; color: #8a97ad; background: #fbfcfe; border-bottom: 1px solid #edf1f7; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-table td { padding: 13px 15px; color: #3b4966; border-bottom: 1px solid #f0f3f8; font-size: 11px; }
.admin-table tr:last-child td { border-bottom: 0; }
.table-primary { color: #1b2946; font-weight: 800; }
.table-secondary { display: block; margin-top: 4px; color: #91a0b6; font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: #63728e; background: #f0f3f8; border-radius: 99px; font-size: 9px; font-weight: 800; }
.badge::before { width: 5px; height: 5px; content: ""; background: currentColor; border-radius: 50%; }
.badge-green { color: #078459; background: #eaf9f2; }
.badge-red { color: #b14a4a; background: #fff0ef; }
.badge-blue { color: #1767f5; background: #edf4ff; }
.action-cell { display: flex; align-items: center; gap: 6px; }
.small-button { min-height: 30px; padding: 0 9px; color: #1767f5; background: #f2f6ff; border: 1px solid #e0eaff; border-radius: 7px; font-size: 9px; font-weight: 800; cursor: pointer; }
.small-button-danger { color: #b14a4a; background: #fff5f4; border-color: #f5dfdd; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.admin-form-grid .field { margin: 0; }
.admin-form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.admin-form-actions .button { min-height: 40px; font-size: 11px; }
.admin-two-column { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 17px; align-items: start; }
.admin-subtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-subtabs a { padding: 8px 12px; color: #6a7892; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 800; }
.admin-subtabs a.active { color: #1767f5; background: #edf4ff; border-color: #d9e7ff; }
.switch-label { display: inline-flex; align-items: center; gap: 7px; color: #64728d; font-size: 10px; }
.switch-label input { accent-color: var(--blue); }
.auth-main { min-height: calc(100vh - 145px); padding-block: 48px 72px; }
.search-row { display: flex; align-items: center; gap: 10px; }
.search-row input { flex: 1; min-width: 0; min-height: 40px; padding: 10px 12px; background: #fbfcff; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 12px; }
.search-row .button { min-height: 40px; font-size: 11px; }
.details-row td { padding: 0 !important; background: #fbfcfe; }
.details-row details { padding: 0 15px 12px; }
.details-row summary { color: #1767f5; cursor: pointer; font-size: 10px; font-weight: 800; }
.access-manager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 13px; }
.access-manager > div { min-width: 0; padding: 12px; background: #fff; border: 1px solid #e9eef6; border-radius: 10px; }
.access-manager > div > b { display: block; margin-bottom: 9px; color: #465470; font-size: 10px; }
.assignment-item, .assignment-add { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.assignment-item > span { flex: 1; min-width: 0; color: #53617b; font-size: 9px; }
.assignment-item small { color: #9aa5b7; }
.assignment-add select { flex: 1; min-width: 0; height: 30px; padding: 0 7px; color: #53617b; background: #fff; border: 1px solid #e0e7f0; border-radius: 7px; font: inherit; font-size: 9px; }
.server-admin-card { margin-bottom: 13px; padding: 20px; }
.server-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.server-name-line { display: flex; align-items: center; gap: 9px; }
.server-name-line h3 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.balancer-row { display: grid; gap: 10px; padding: 13px 0; margin-top: 13px; border-top: 1px solid #edf1f7; color: #697791; font-size: 10px; }
.balancer-summary,.balancer-strategy-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.balancer-summary .badge { display: inline-flex; width: fit-content; }
.balancer-panel { display: grid; gap: 13px; margin-top: 14px; padding: 16px; border: 1px solid #e0eaf7; border-radius: 13px; background: #f8faff; }
.balancer-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.balancer-panel-head > div { display: grid; gap: 3px; }
.balancer-panel-head strong { color: #263a5a; font-size: 13px; }
.balancer-panel-head > .badge { flex: none; }
.balancer-panel-body { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; padding-top: 12px; border-top: 1px solid #e2ebf7; }
.balancer-toggle-form { flex: none; }
.balancer-traffic { display: grid; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2ebf7; }
.balancer-outbound-form { display: grid; gap: 9px; padding-top: 12px; border-top: 1px solid #e2ebf7; }
.balancer-outbound-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #5b6b84; font-size: 11px; }
.balancer-outbound-list { display: flex; flex-wrap: wrap; gap: 7px; }
.balancer-outbound-option { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #dce7f5; border-radius: 8px; background: #fff; color: #34445f; font-size: 11px; cursor: pointer; }
.balancer-outbound-option input { margin: 0; accent-color: #1765f5; }
.balancer-traffic-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.balancer-traffic-actions .field-hint { margin: 0; }
.balancer-traffic-head, .balancer-traffic-row { display: grid; grid-template-columns: minmax(0,1fr) 44px auto; align-items: center; gap: 10px; font-size: 11px; }
.balancer-traffic-head { grid-template-columns: minmax(0,1fr) auto; color: #5b6b84; }
.balancer-traffic-head span:last-child { text-align: right; white-space: nowrap; }
.balancer-traffic-row { color: #34445f; }
.balancer-traffic-row b { color: #1765f5; text-align: right; }
.balancer-traffic-row span:last-child { color: #7d8ba1; text-align: right; white-space: nowrap; }
.balancer-row > .badge { display: inline-flex; width: fit-content; }
.balancer-strategy-form { padding: 10px 12px; border: 1px solid #e4ebf5; border-radius: 10px; background: #f8faff; }
.balancer-strategy-form label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #53637d; }
.balancer-strategy-form select { min-height: 30px; padding: 0 9px; border: 1px solid #d8e3f1; border-radius: 8px; background: #fff; color: #30415e; font: inherit; font-size: 11px; }
.balancer-settings { margin-top: 18px; padding: 14px 16px; border: 1px solid #e2eaf5; border-radius: 12px; background: #f8faff; }
.balancer-settings summary { cursor: pointer; color: #304d7b; font-weight: 800; }
.balancer-settings .admin-form-grid { margin-top: 12px; }
.balancer-row code { color: #596986; font-size: 9px; }
.endpoint-list { padding-top: 12px; border-top: 1px solid #edf1f7; }
.endpoint-list-head { box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 46px; padding: 10px 13px; margin-bottom: 0; color: #234879; background: #f1f6ff; border: 1px solid #bdd4ff; border-radius: 12px; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.endpoint-list-head::-webkit-details-marker { display: none; }
.endpoint-list-head:hover { background: #e8f1ff; border-color: #8fb5ff; box-shadow: 0 3px 12px rgba(35, 103, 236, .09); }
.endpoint-list-head:focus-visible { outline: 3px solid rgba(35, 103, 236, .3); outline-offset: 2px; }
.endpoint-list-head::before { content: '⌄'; display: grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; color: #fff; background: #2167ec; border-radius: 7px; font-size: 15px; line-height: 1; transform: rotate(-90deg); transition: transform .16s ease; }
.endpoint-list[open] > .endpoint-list-head::before { transform: rotate(0deg); }
.endpoint-summary { color: #71809a; font-size: 10px; font-weight: 600; }
.endpoint-click-hint { margin-left: auto; color: #3568b4; font-size: 10px; font-weight: 600; white-space: nowrap; }
.endpoint-list[open] > .endpoint-list-head .endpoint-click-hint { display: none; }
.endpoint-count { display: grid; flex: 0 0 22px; min-width: 22px; height: 22px; margin-left: 0; place-items: center; color: #315c9b; background: #dce9ff; border-radius: 50%; font-size: 10px; font-weight: 800; }
.endpoint-list > .endpoint-row:first-of-type { margin-top: 9px; }
.admin-table .table-sort { padding: 0; color: inherit; background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.admin-table .table-sort:hover { color: #1767f5; }
.endpoint-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f1f4f8; }
.endpoint-row > div > b { color: #34425f; font-size: 10px; }
.endpoint-row .table-secondary { margin-top: 4px; }
.endpoint-row form { margin: 0; }
.queue-admin { grid-column: 1/-1; padding: 12px; background: #f9fbff; border: 1px solid #e6edf7; border-radius: 9px; }
.queue-admin > b { display: block; color: #596986; font-size: 10px; }

.admin-search { display: flex; align-items: center; gap: 10px; }
.admin-search input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 10px 13px; color: var(--ink); background: #fbfcff; border: 1px solid var(--line); border-radius: 9px; outline: 0; font: inherit; font-size: 12px; }
.admin-search input:focus { border-color: #76a4ff; box-shadow: 0 0 0 3px rgba(23,103,245,.1); }
.admin-search .button { min-height: 44px; }
.admin-two-column.user-settings-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); }
.user-settings-grid > .content-card { min-width: 0; }
.user-settings-grid > .content-card:first-child > form:not(.inline-form) { display: block; margin-bottom: 12px; }
.user-settings-grid > .content-card:first-child > .inline-form { display: flex; width: 100%; flex-wrap: wrap; margin-top: 9px; }
.user-settings-grid > .content-card:first-child > .inline-form select { flex: 1 1 220px; }
.server-edit-form { padding: 15px; margin-top: 12px; background: #fbfcff; border: 1px solid var(--line); border-radius: 12px; }
.server-edit-form > .field { min-width: 0; }
.server-edit-form > button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .admin-page { width: 100%; overflow-x: hidden; }
  
  .app-main { padding-block: 25px 50px; }
  .mobile-account-link { display: block; margin-left: auto; }
  .app-footer > div { width: calc(100% - 40px); flex-wrap: wrap; gap: 8px 14px; padding-block: 15px; }
  .app-footer > div > span:last-child { margin-left: 0; }
  .auth-layout { grid-template-columns: 1fr; gap: 13px; margin-top: 12px; }
  .auth-layout-plans { display: block; margin-top: 12px; }
  .auth-main { padding-top: 25px; }
  .auth-aside { min-height: 180px; padding: 23px; }
  .auth-aside h2 { max-width: 270px; font-size: 27px; }
  .auth-aside p { max-width: 320px; margin: 10px 0; font-size: 12px; }
  .auth-aside-foot { font-size: 10px; }
  .auth-card { padding: 24px; }
  .auth-card-plans { padding: 26px 22px; }
  .auth-card-plans .field:has(.plan-choice) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .auth-card-plans .plan-choice { min-height: 230px; padding: 15px; }
  .auth-card-plans .registration-step-actions { align-items: stretch; }
  .registration-step-actions { flex-direction: column-reverse; }
  .registration-step-actions .button { width: 100%; }
  .registration-account-summary { flex-direction: column; }
  .account-top > form { display: block; }
  .account-top { align-items: flex-start; flex-direction: column; }
  .account-overview { grid-template-columns: 1fr 1fr; gap: 18px 10px; padding: 19px; }
  .subscription-state { grid-column: 1/-1; }
  .metric { padding-left: 12px; }
  .metric strong { font-size: 18px; }
  .connection-grid { grid-template-columns: 1fr; }
  .connection-card { min-height: 175px; }
  .copy-row { flex-direction: column; }
  .copy-row .button { width: 100%; }
  .admin-sidebar { position: sticky; top: 0; inset: 0 0 auto; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 9px 15px; border-right: 0; border-bottom: 1px solid #e7edf5; }
  .admin-sidebar .brand { padding: 0; font-size: 22px; }
  .admin-label, .sidebar-bottom, .admin-nav .nav-mark { display: none; }
  .admin-nav { display: flex; gap: 3px; margin-left: auto; }
  .admin-nav a { min-height: 36px; padding: 0 8px; font-size: 9px; }
  .admin-content { margin-left: 0; }
  .admin-topbar { height: 48px; padding: 0 18px; font-size: 9px; }
  .admin-main { padding: 23px 16px 45px; }
  .admin-subtabs { width: 100%; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .admin-subtabs::-webkit-scrollbar { display: none; }
  .admin-subtabs a { flex: 0 0 auto; white-space: nowrap; }
  .admin-page-title h1 { font-size: 26px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 22px; }
  .admin-two-column { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .access-manager { grid-template-columns: 1fr; }
  .assignment-item { flex-wrap: wrap; }
  .assignment-item > span { flex-basis: 100%; }
  .server-admin-card { padding: 15px; }
  .server-admin-card .balancer-panel { margin-top: 14px; padding: 13px; }
  .server-admin-card .balancer-panel-head { align-items: flex-start; }
  .server-admin-card .balancer-panel-body { display: grid; gap: 10px; align-items: stretch; }
  .server-admin-card .balancer-panel-body > form { width: 100%; min-width: 0; }
  .server-admin-card .balancer-panel-body .small-button { width: 100%; max-width: 100%; white-space: normal; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form { display: grid; grid-template-columns: 1fr; gap: 9px; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form label { display: grid; gap: 6px; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form select { width: 100%; min-width: 0; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form .small-button { width: fit-content; }
  .server-admin-card .balancer-panel-head > .badge { margin-top: 0; }
  .server-admin-card .endpoint-list { max-width: 100%; overflow: hidden; }
  .server-admin-card .server-name-line h3 { max-width: 100%; overflow-wrap: anywhere; }
  .server-admin-card .server-software-versions { line-height: 1.55; }
  .server-admin-card .server-admin-actions { display: flex; flex-wrap: wrap; gap: 7px; }
  .server-admin-card .server-admin-actions > form { flex: 1 1 145px; min-width: 0; }
  .server-admin-card .server-admin-actions .small-button { width: 100%; }
  .endpoint-row form { grid-column: 2; }
}

@media (max-width: 1080px) {
  :root { --shell: 960px; }
  .header-inner { gap: 36px; }
  .main-nav { gap: 24px; }
  .hero { grid-template-columns: 1fr 1fr; min-height: 500px; }
  .hero h1 { font-size: clamp(40px, 5.1vw, 55px); }
  .hero h1 span { white-space: normal; }
  .network-art { height: 400px; }
  .node-moscow { left: 5%; }
  .node-germany { right: -3%; }
  .security-card { right: 6%; }
}
@media (max-width: 760px) {
  
  .section-shell, .header-inner, .footer-inner { width: min(100% - 40px, 560px); }
  .header-inner { min-height: 68px; gap: 18px; }
  .brand { font-size: 25px; }
  .main-nav, .header-actions { display: none; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 10px; margin-left: auto; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
  .menu-toggle span { display: block; width: 100%; height: 2px; background: #233454; border-radius: 2px; }
  .mobile-nav { position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px rgba(31,69,117,.07); }
  .mobile-nav.is-open { display: grid; }
  .mobile-nav a { padding: 12px 6px; color: #43516e; font-size: 14px; font-weight: 700; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding-block: 42px 20px; }
  .hero::before { left: -20px; right: -20px; height: 60%; }
  .hero h1 { margin-top: 23px; font-size: clamp(39px, 9.2vw, 56px); line-height: 1.07; }
  .hero h1 span { white-space: normal; }
  .hero-lead { font-size: 15px; line-height: 1.7; }
  .hero-actions { flex-wrap: wrap; gap: 18px; margin-top: 24px; }
  .button-large { min-width: 190px; min-height: 54px; }
  .hero-note { margin-top: 18px; font-size: 11px; }
  .network-art { width: 100%; height: min(78vw, 390px); min-height: 285px; margin-top: 4px; transform: scale(.98); transform-origin: center top; }
  .server-node { min-width: 133px; padding: 9px 11px; gap: 8px; }
  .server-node b { font-size: 11px; }
  .server-node small { font-size: 9px; }
  .node-moscow { top: 10%; left: 3%; }
  .node-germany { top: 35%; right: 0; }
  .stack-one { top: 46%; left: 42%; }
  .stack-two { top: 56%; right: 20%; }
  .security-card { right: 5%; bottom: 7%; padding: 11px 12px; gap: 9px; }
  .security-card b { max-width: 130px; font-size: 10px; }
  .security-card small { font-size: 9px; }
  .security-icon { width: 32px; height: 32px; border-radius: 10px; }
  .art-caption { bottom: 0; left: 39%; font-size: 9px; }
  .features { grid-template-columns: 1fr; gap: 12px; padding-block: 8px 56px; }
  .feature-card { min-height: 0; display: grid; grid-template-columns: 52px 1fr; column-gap: 15px; padding: 18px; }
  .feature-icon { grid-row: span 2; width: 48px; height: 48px; margin: 0; }
  .icon-speed { font-size: 32px; }
  .feature-card h2 { align-self: end; margin: 2px 0 4px; font-size: 15px; }
  .feature-card p { font-size: 12px; }
  .how-section { padding-block: 8px 64px; }
  .section-heading h2, .support-section h2 { font-size: 30px; }
  .steps-grid { grid-template-columns: 1fr; gap: 10px; }
  .step-card { min-height: 0; padding: 18px; }
  .step-card h3 { margin-top: 11px; }
  .plans-section { padding-block: 60px; }
  .section-heading-centered h2 { font-size: 32px; }
  .section-heading-centered p { font-size: 13px; line-height: 1.6; }
  .plans-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .plan-card { min-height: 0; padding: 23px; }
  .support-section { align-items: flex-start; flex-direction: column; padding-block: 54px; }
  .footer-inner { min-height: 92px; flex-wrap: wrap; gap: 7px 16px; padding-block: 18px; }
  .footer-inner > span:last-child { margin-left: 0; }
  .maintenance-card { padding: 30px 24px; margin-block: 65px; }
  .maintenance-card h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (max-width: 420px) {
  .auth-card .field:has(.plan-choice) { grid-template-columns: 1fr; }
  .auth-card .field:has(.plan-choice) > .field-label { grid-column: auto; }
  .auth-card-plans .field:has(.plan-choice) { grid-template-columns: 1fr; }
}

/* v1.7 admin management forms */
.server-create-tools { margin-top: 18px; }
.server-create-tools > summary { display: inline-flex; align-items: center; cursor: pointer; }
.server-create-tools[open] > summary { margin-bottom: 16px; }
.server-create-tools .admin-two-column { margin-top: 10px; }
.server-edit { margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1f7; }
.server-edit > summary, .admin-table details > summary { color: #1767f5; cursor: pointer; font-size: 12px; font-weight: 700; }
.server-edit form, .admin-table details form.content-card { margin-top: 12px; }
.admin-table details form.content-card { min-width: 270px; padding: 14px; }
.admin-table .action-cell { flex-wrap: wrap; align-items: flex-start; }
.admin-table .action-cell > details { position: relative; }
.admin-table .action-cell > details[open] { z-index: 2; }
.admin-table .action-cell > details[open] form.content-card { position: absolute; right: 0; top: 24px; width: min(420px, 78vw); background: #fff; box-shadow: 0 18px 48px #14264a24; border: 1px solid #dce6f6; border-radius: 14px; }
.admin-table .action-cell > details[open] form:not(.content-card) { position: absolute; right: 0; top: 24px; width: min(330px, 78vw); padding: 14px; background: #fff; box-shadow: 0 18px 48px #14264a24; border: 1px solid #dce6f6; border-radius: 14px; }

/* v1.9 consistent admin actions and centered edit dialogs */
.admin-table .action-cell { align-items: center; flex-wrap: nowrap; gap: 6px; }
.admin-table .action-cell .small-button { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 10px; white-space: nowrap; }
.plan-create-tools { margin: 0; }
.plan-create-tools > summary { display: flex; align-items: center; gap: 22px; list-style: none; cursor: pointer; }
.plan-create-tools > summary::-webkit-details-marker { display: none; }
.plan-create-tools > summary:focus-visible { outline: 2px solid #8db4ff; outline-offset: 4px; border-radius: 8px; }
.plan-create-tools[open] > summary { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid #edf1f7; }
.plan-rules-summary { display: grid; gap: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.plan-rules-summary strong { color: var(--ink); font-size: 14px; }
.plan-create-chevron { margin-left: auto; color: var(--blue); font-size: 17px; transition: transform .18s ease; }
.plan-create-tools[open] .plan-create-chevron { transform: rotate(180deg); }
.plan-create-tools .maintenance-body { max-width: 820px; }
.plan-create-tools .maintenance-body h2 { margin-top: 0; }
.plan-create-tools .admin-form-actions { margin-top: 17px; }
.plan-create-tools .admin-form-actions .button { min-height: 42px; }
.plan-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.plan-name-line .badge { flex: none; }
.admin-dialog { width: min(610px, calc(100% - 32px)); max-width: none; max-height: min(88vh, 820px); padding: 0; overflow: auto; color: var(--ink); background: #fff; border: 1px solid #dce6f6; border-radius: 16px; box-shadow: 0 24px 80px rgba(16,35,72,.22); }
.admin-dialog-user { width: min(940px, calc(100% - 32px)); max-height: min(92vh, 940px); }
.user-edit-dialog { display: grid; gap: 14px; padding: 24px; }
.user-edit-tabs { display: flex; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.user-edit-tabs button { min-height: 38px; padding: 0 14px; color: var(--muted); background: #f7f9fd; border: 1px solid var(--line); border-radius: 9px; font: inherit; cursor: pointer; }
.user-edit-tabs button[aria-selected="true"] { color: var(--blue); background: #edf4ff; border-color: #cbdcff; font-weight: 700; }
.user-edit-tab-panel[hidden] { display: none !important; }
.user-profile-form { display: grid; gap: 12px; }
.user-access-help { margin-top: -5px; }
.user-profile-form .admin-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.user-traffic-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; }
.user-traffic-card h3 { margin: 0 0 5px; font-size: 13px; }
.user-traffic-card strong { display: block; color: var(--ink); font-size: 16px; }
.user-traffic-card .field-hint { display: block; margin-top: 4px; }
.user-next-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px 16px; }
.user-next-plan h3 { margin: 0 0 4px; font-size: 13px; }
.user-next-plan .inline-form { flex: 1 1 460px; max-width: 620px; margin: 0; }
.user-next-plan .inline-form select { flex: 1 1 240px; }
.user-edit-footer { margin-top: 2px; padding-top: 13px; border-top: 1px solid var(--line); }
.user-edit-access > h3 { margin: 3px 0 9px; font-size: 14px; }
.user-edit-access .user-settings-grid { grid-template-columns: minmax(0, 1fr); }
.user-edit-access .content-card { padding: 16px; }
.user-edit-access .content-card > h3 { margin: 0 0 10px; font-size: 13px; }
.user-access-notice { margin: 0 0 12px; }
.user-edit-access .access-manager { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 14px; }
.user-edit-access .access-manager > div { min-width: 0; }
.user-edit-access .assignment-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 9px 0; border-top: 1px solid #edf1f7; }
.user-edit-access .assignment-item > span { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.user-edit-access .assignment-item .small-button { white-space: nowrap; }
@media (max-width: 760px) {
  
  .user-edit-dialog { padding: 18px; }
  .user-profile-form .admin-form-grid, .user-edit-access .user-settings-grid { grid-template-columns: 1fr; }
  .user-traffic-card { align-items: flex-start; flex-direction: column; }
  .user-next-plan { align-items: stretch; flex-direction: column; }
}
.admin-dialog::backdrop { background: rgba(15,27,51,.42); backdrop-filter: blur(2px); }
.admin-dialog-compact { width: min(480px, calc(100% - 32px)); }
.admin-dialog-form { display: grid; gap: 13px; padding: 24px; }
.admin-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 5px; }
.admin-dialog-head h2 { margin: 0; font-size: 21px; letter-spacing: -.045em; }
.admin-dialog-head p, .dialog-help { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.dialog-help { margin: 0; }
.dialog-x { display: grid; flex: none; width: 34px; height: 34px; place-items: center; color: #65738c; background: #f5f7fb; border: 1px solid var(--line); border-radius: 9px; font-size: 21px; line-height: 1; cursor: pointer; }
.dialog-checks { display: flex; flex-wrap: wrap; gap: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding-top: 5px; }
.dialog-actions .button, .dialog-actions .small-button { min-height: 40px; font-size: 11px; }
.dialog-actions .small-button { padding-inline: 15px; }
.dialog-actions .button-small { min-height: 40px; }
@media (max-width: 1080px) {
  .admin-table .action-cell { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  
  .admin-dialog-form { padding: 19px; }
  .admin-dialog-head h2 { font-size: 18px; }
  .dialog-actions { justify-content: stretch; }
  .dialog-actions > * { flex: 1 1 auto; }
}

/* v1.10 fix the plan editor without changing the working user editor */
dialog.admin-dialog-plan { box-sizing: border-box; width: min(640px, calc(100vw - 32px)); min-width: 0; max-width: calc(100vw - 32px); overflow-x: hidden; }
.admin-dialog-plan .admin-dialog-form { box-sizing: border-box; width: 100%; min-width: 0; }
.admin-dialog-plan .admin-dialog-form > * { box-sizing: border-box; min-width: 0; max-width: 100%; }
.admin-dialog-plan .admin-form-grid { width: 100%; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.admin-dialog-plan .admin-form-grid .field { min-width: 0; }
.admin-dialog-plan .field input, .admin-dialog-plan .field select, .admin-dialog-plan .field textarea { min-width: 0; max-width: 100%; }
.admin-dialog-plan .notice { overflow-wrap: anywhere; }
.maintenance-details { min-width: 0; padding: 0; }
.maintenance-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 88px; padding: 20px 24px; list-style: none; cursor: pointer; }
.maintenance-summary::-webkit-details-marker { display: none; }
.maintenance-summary-main { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.maintenance-summary-main h2 { margin: 0; font-size: 16px; letter-spacing: -.035em; }
.maintenance-summary-action { color: #1767f5; font-size: 10px; font-weight: 800; white-space: nowrap; }
.maintenance-summary-action > span { display: inline-block; margin-left: 5px; transition: transform .16s ease; }
.maintenance-details[open] .maintenance-summary { border-bottom: 1px solid #edf1f7; }
.maintenance-details[open] .maintenance-summary-action > span { transform: rotate(180deg); }
.maintenance-body { padding: 20px 24px 24px; }
.maintenance-body .field { margin-top: 12px; }
.sync-help { margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0e4c4; }
.sync-help > summary { color: #1767f5; cursor: pointer; font-size: 11px; font-weight: 800; }
.sync-help p { color: #6e7c9b; font-size: 11px; line-height: 1.6; }
.sync-help code { display: inline-block; max-width: 100%; margin-top: 5px; padding: 5px 7px; overflow-wrap: anywhere; color: #42516d; background: #f5f7fb; border-radius: 5px; font-size: 10px; }
@media (max-width: 760px) {
  
  .admin-dialog-plan .admin-form-grid { grid-template-columns: 1fr; }
  .maintenance-summary { min-height: 76px; padding: 17px; }
  .maintenance-body { padding: 17px; }
}

/* v1.15 overview sync and node status */
.sync-dashboard { min-width: 0; }
.sync-dashboard > .admin-section-head { margin-bottom: 5px; }
.sync-report-list { display: grid; gap: 0; margin-top: 16px; border-top: 1px solid #edf1f7; }
.sync-report-row { display: grid; grid-template-columns: minmax(145px,170px) minmax(0,1fr); align-items: center; gap: 8px; padding: 14px 0; border-bottom: 1px solid #edf1f7; }
.admin-page .sync-dashboard .sync-report-list > .sync-report-row {
  border-bottom: 2px solid #b9d4f6;
}
html[data-theme="dark"] .admin-page .sync-dashboard .sync-report-list > .sync-report-row {
  border-bottom-color: #557cae;
}
.sync-node-row, .sync-job-row { grid-template-columns: minmax(145px,170px) minmax(150px,190px) minmax(0,1fr); gap: 12px; }
.sync-node-columns { display: grid; grid-template-columns: minmax(145px,170px) minmax(150px,190px) minmax(0,1fr); gap: 12px; padding: 8px 0; color: #8794aa; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #edf1f7; }
.sync-report-status { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; min-width: 0; }
.sync-report-title { display: grid; justify-items: start; align-content: center; gap: 6px; min-width: 0; color: #263653; font-size: 11px; }
.sync-report-title-node { align-items: start; }
.sync-node-row .sync-report-title { grid-column: 1; }
.sync-node-row .sync-report-status { grid-column: 2; }
.sync-node-row .sync-report-meta, .sync-job-row .sync-report-meta { grid-column: 3; }
.sync-job-row .sync-report-title { grid-column: 1; }
.sync-job-row .sync-report-status { grid-column: 2; }
.sync-report-name { display: grid; gap: 3px; min-width: 0; }
.sync-report-name b { font-size: 11px; line-height: 1.35; }
.sync-report-name small { color: #8794aa; font-size: 10px; line-height: 1.35; }
.sync-report-title > .badge { white-space: nowrap; }
.sync-report-meta { min-width: 0; color: #6e7c96; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.sync-report-message { margin-top: 3px; color: #55647f; }
.sync-report-detail { display: grid; gap: 2px; margin-top: 5px; color: #8794aa; }
.sync-report-meta .sync-report-detail { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.sync-report-detail span { overflow-wrap: anywhere; }
.sync-report-error { margin-top: 5px; color: #b14a4a; }
.sync-dashboard-foot { margin-top: 13px; padding-top: 11px; color: #91a0b6; border-top: 1px solid #edf1f7; font-size: 9px; line-height: 1.6; }
.badge-amber { color: #9a5a05; background: #fff5df; }
.badge-gray { color: #71809a; background: #f0f3f8; }
@media (max-width: 760px) {
  
  .sync-report-row { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .sync-report-meta, .sync-node-row .sync-report-meta, .sync-job-row .sync-report-meta { grid-column: 1 / -1; }
  .sync-node-row .sync-report-title, .sync-node-row .sync-report-status, .sync-job-row .sync-report-title, .sync-job-row .sync-report-status { grid-column: 1; }
}

/* SEYRO Admin typography scale — project 1.2.11 */
.admin-page {
  --admin-type-caption: 11px;
  --admin-type-small: 12px;
  --admin-type-body: 14px;
  --admin-type-lead: 16px;
  --admin-type-section: 18px;
  --admin-type-dialog: 20px;
  --admin-type-metric: 26px;
  --admin-type-page: 30px;
  font-size: var(--admin-type-body);
}
.admin-page .admin-label,
.admin-page .admin-table th,
.admin-page .badge,
.admin-page .small-button,
.admin-page .admin-form-actions .button,
.admin-page .search-row .button,
.admin-page .admin-subtabs a,
.admin-page .admin-status,
.admin-page .sidebar-logout,
.admin-page .admin-topbar,
.admin-page .stat-card span,
.admin-page .stat-foot,
.admin-page .admin-table td,
.admin-page .table-secondary,
.admin-page .switch-label,
.admin-page .details-row summary,
.admin-page .admin-table details > summary,
.admin-page .access-manager > div > b,
.admin-page .assignment-item > span,
.admin-page .assignment-add select,
.admin-page .balancer-row,
.admin-page .balancer-row code,
.admin-page .endpoint-list-head,
.admin-page .endpoint-row > div > b,
.admin-page .queue-admin > b,
.admin-page .admin-dialog-head p,
.admin-page .dialog-help,
.admin-page .dialog-actions .button,
.admin-page .dialog-actions .small-button,
.admin-page .maintenance-summary-action,
.admin-page .sync-help > summary,
.admin-page .sync-help p,
.admin-page .sync-report-title,
.admin-page .sync-report-name b { font-size: var(--admin-type-small); }
.admin-page .admin-nav a { font-size: var(--admin-type-small); }
.admin-page .admin-table .action-cell .small-button { font-size: var(--admin-type-caption); }
.admin-page .admin-table th,
.admin-page .badge,
.admin-page .small-button,
.admin-page .endpoint-list-head span { font-size: var(--admin-type-caption); }
.admin-page .field input,
.admin-page .field select,
.admin-page .field textarea,
.admin-page .select-control,
.admin-page .notice { font-size: var(--admin-type-body); }
.admin-page .field-hint,
.admin-page .sync-help code,
.admin-page .sync-report-name small,
.admin-page .sync-report-meta,
.admin-page .sync-dashboard-foot { font-size: var(--admin-type-caption); }
.admin-page .server-name-line h3 { font-size: var(--admin-type-lead); }
.admin-page .admin-section-head h2 { font-size: var(--admin-type-section); }
.admin-page .admin-dialog-head h2 { font-size: var(--admin-type-dialog); }
.admin-page .stat-card strong { font-size: var(--admin-type-metric); }
.admin-page .admin-page-title h1 { font-size: var(--admin-type-page); }

@media (max-width: 760px) {
  
  .admin-page .admin-nav a,
  .admin-page .admin-topbar { font-size: var(--admin-type-small); }
  .admin-page .admin-page-title h1 { font-size: var(--admin-type-metric); }
}

/* Keep the admin navigation and page actions readable on narrow screens. */
@media (max-width: 760px) {
  .admin-page .admin-sidebar {
    display: flex;
    height: auto;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px 9px;
  }
  .admin-page .admin-sidebar .brand {
    align-self: flex-start;
    padding: 0;
    font-size: 22px;
    line-height: 1;
  }
  .admin-page .admin-nav {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
  }
  .admin-page .admin-nav a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
  }
  .admin-page .admin-content { width: 100%; min-width: 0; }
  .admin-page .admin-topbar {
    box-sizing: border-box;
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 16px;
  }
  .admin-page .admin-topbar > span {
    flex: 1 1 130px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .admin-page .admin-topbar > a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
/* 1.2.18 overview: compact online metric and collapsible Xray report */
.admin-page .stat-online { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #62718d; font-size: var(--admin-type-caption); line-height: 1.4; }
.stat-online-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #10a674; }
.stat-online.is-unavailable .stat-online-dot { background: #9aa6b8; }
.stat-online.is-demo .stat-online-dot { background: #3478f6; }
.stat-online.is-demo { color: #62718d; }
.admin-page .online-refresh-button { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; margin: -2px 0 -2px 1px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8291aa; cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.admin-page .online-refresh-button:hover { background: #edf3ff; color: #1765f5; }
.admin-page .online-refresh-button:focus-visible { outline: 2px solid #1765f5; outline-offset: 1px; }
.admin-page .online-refresh-button:disabled { cursor: wait; opacity: .65; }
.online-refresh-button svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.online-refresh-button.is-refreshing svg { animation: online-refresh-spin .8s linear infinite; }
@keyframes online-refresh-spin { to { transform: rotate(360deg); } }
.sync-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sync-details { flex: 1; min-width: 0; }
.sync-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; list-style: none; cursor: pointer; }
.sync-summary::-webkit-details-marker { display: none; }
.sync-summary-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.sync-summary-main h2 { margin: 0; font-size: var(--admin-type-section, 18px); letter-spacing: -.035em; }
.sync-summary-main small { color: #8794aa; font-size: var(--admin-type-small, 12px); }
.sync-summary-action { display: inline-flex; align-items: center; gap: 5px; color: #1767f5; font-size: var(--admin-type-caption, 11px); font-weight: 800; white-space: nowrap; }
.sync-summary-action i { display: inline-block; font-style: normal; transition: transform .16s ease; }
.sync-details[open] .sync-summary-action i { transform: rotate(180deg); }
.sync-action-expanded { display: none; }
.sync-details[open] .sync-action-collapsed { display: none; }
.sync-details[open] .sync-action-expanded { display: inline; }
.sync-details-body { padding-top: 8px; }
.sync-details-body > .field-hint { margin-top: 4px; }
.sync-servers-link { display: flex; justify-content: flex-end; margin-top: 10px; white-space: nowrap; }
@media (max-width: 760px) {
  
  .sync-dashboard-head { align-items: flex-start; }
  .sync-summary { align-items: flex-start; flex-direction: column; padding-block: 5px; }
  .sync-summary-main { gap: 7px; }
  .sync-summary-main small { flex-basis: 100%; }
  .sync-servers-link { font-size: 10px; }
}

/* 1.2.22 compact, independently expandable overview cards */
.overview-dashboard-grid { align-items: start; }
.overview-dashboard-grid > .maintenance-details,
.overview-dashboard-grid > .sync-dashboard { box-sizing: border-box; min-height: 82px; }
.overview-dashboard-grid > .maintenance-details { padding: 0; }
.overview-dashboard-grid .maintenance-summary { min-height: 56px; padding: 12px 20px; box-sizing: content-box; }
.overview-dashboard-grid > .sync-dashboard { padding: 12px 20px; }
.overview-dashboard-grid .sync-dashboard-head { width: 100%; }
.overview-dashboard-grid .sync-summary { min-height: 56px; }
.admin-page .maintenance-summary-main h2,
.admin-page .sync-summary-main h2 { font-size: var(--admin-type-section); }
.admin-page .maintenance-summary-action,
.admin-page .sync-summary-action { font-size: var(--admin-type-small); }
.admin-page .stat-online { font-size: var(--admin-type-small); }
.admin-page .stat-online span { color: #10b981; }

@media (max-width: 1080px) {
  .overview-dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .overview-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
   .admin-two-column.user-settings-grid { grid-template-columns: 1fr; } .admin-search { align-items: stretch; } }

/* The sidebar leaves less room for account details before the phone breakpoint. */
@media (max-width: 1080px) {
  .admin-two-column.user-settings-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Match the stable admin layouts for users and server management. */
.server-edit > summary,
.endpoint-edit > summary { display: inline-flex; padding: 5px 0; color: var(--blue); cursor: pointer; font-size: var(--admin-type-small); font-weight: 700; }
.endpoint-edit:not(.server-edit) { grid-column: 1 / -1; margin: 0 0 8px; }
.endpoint-edit form { max-width: 100%; padding: 14px; background: #fbfcff; border: 1px solid var(--line); border-radius: 10px; }
.server-edit form { max-width: 680px; }
.server-edit form + form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.server-admin-head > form { flex: none; margin: 0; }
.server-admin-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 18px; }
.server-admin-head > div:first-child { grid-column: 1; grid-row: 1; }
.server-admin-head > .provisioning-status { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: 880px; min-width: 0; box-sizing: border-box; }
.server-admin-head > .server-admin-actions { grid-column: 2; grid-row: 1; }
.server-admin-actions { display: flex; flex: none; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.server-admin-actions > form { margin: 0; }
.server-admin-actions > form, .server-admin-actions > .server-reinstall { flex: 0 0 auto; }
.server-admin-actions > .server-reinstall > summary, .server-admin-actions > button.small-button { box-sizing: border-box; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 0; min-height: 30px; padding: 0 9px; font-size: 9px; white-space: nowrap; }
.server-reinstall { position: relative; }
.server-reinstall > summary { list-style: none; }
.server-reinstall > summary::-webkit-details-marker { display: none; }
.server-reinstall[open] { z-index: 2; }
.server-reinstall[open] > .provisioning-status { position: absolute; top: calc(100% + 7px); right: 0; width: min(560px, calc(100vw - 40px)); max-width: min(560px, calc(100vw - 40px)); box-shadow: 0 14px 36px rgba(22, 43, 77, .16); }
.server-admin-head > div { min-width: 0; }
.server-admin-head .table-secondary { color: var(--muted); font-size: var(--admin-type-small); }
.server-create-tools > .admin-two-column > .content-card { min-width: 0; }
.server-create-tools .admin-form-actions { justify-content: flex-start; }
.admin-table .action-cell { flex-wrap: wrap; }
.admin-table .action-cell > form { margin: 0; }
.user-settings-grid > .content-card:first-child { align-self: start; }
.user-settings-grid .access-manager { grid-template-columns: 1fr 1fr; }
.users-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 14px; color: var(--muted); font-size: 11px; }
.users-pagination .is-disabled { opacity: .45; pointer-events: none; }
@media (max-width: 760px) {
  
  .admin-subtabs { flex-wrap: wrap; }
  .server-admin-head { grid-template-columns: minmax(0, 1fr) auto; }
  .server-admin-head > div:first-child { grid-column: 1; grid-row: 1; }
  .server-admin-head > .provisioning-status { grid-column: 1 / -1; grid-row: 2; }
  .server-admin-head > form, .server-admin-head > .server-admin-actions { grid-column: 2; grid-row: 1; }
  .provisioning-status code { overflow-wrap: anywhere; }
  .server-create-tools .admin-two-column { grid-template-columns: 1fr; }
  .endpoint-list-head { flex-wrap: wrap; }
  .endpoint-summary-groups { flex-basis: 100%; margin-left: 22px; }
  .endpoint-row { grid-template-columns: minmax(0,1fr) auto; }
  .endpoint-row > form { grid-column: 2; }
  .user-settings-grid .access-manager { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  
  .plan-create-tools > summary { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .plan-rules-summary { flex: 1 1 100%; order: 2; }
  .plan-create-chevron { margin-left: auto; }
}


#users-table tr[data-user-details] { height: 0; }
#users-table tr[data-user-details] > td { height: 0; padding: 0; border: 0; }
.admin-search select { flex: 0 0 220px; min-width: 0; min-height: 44px; padding: 10px 13px; color: var(--ink); background: #fbfcff; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 12px; }
@media (max-width: 760px) {
   .admin-search select { flex: 1 1 auto; } }

.state-filter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.state-filter-options .small-button { display: flex; align-items: center; justify-content: center; min-height: 52px; text-align: center; }
.state-sort-trigger { margin-left: 4px; }
@media (max-width: 520px) { .state-filter-options { grid-template-columns: 1fr; } }

.endpoint-summary-groups { display: flex; flex-direction: column; gap: 3px; margin-left: 8px; color: #71809a; font-size: 10px; font-weight: 500; }
.endpoint-summary-group b { color: #4e5d79; font-weight: 800; }

/* Online users dialog */
.admin-page .online-count-open { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.admin-page .online-count-open:hover { color: #1765f5; text-decoration: underline; text-underline-offset: 3px; }
.admin-page .online-count-open:focus-visible { outline: 2px solid #1765f5; outline-offset: 3px; border-radius: 3px; }
.online-users-dialog { box-sizing: border-box; width: min(480px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: min(80vh, 680px); padding: 22px; border: 1px solid #dce6f6; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(16,35,72,.22); }
.online-users-dialog::backdrop { background: rgba(15,27,51,.46); backdrop-filter: blur(2px); }
.online-users-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.online-users-dialog-head h2 { margin: 0; font-size: 20px; letter-spacing: -.035em; }
.online-users-dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.online-users-state { margin: 16px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.online-users-list { display: grid; gap: 7px; max-height: 48vh; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.online-users-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; font-size: 13px; overflow-wrap: anywhere; }
.online-users-list small { flex: none; color: var(--muted); font-size: 11px; }
@media (max-width: 600px) { .online-users-dialog { padding: 18px; } .online-users-dialog-head h2 { font-size: 18px; } }

.provisioning-status { min-width: 230px; max-width: 440px; padding: 12px 14px; border: 1px solid #f3dfb5; border-radius: 12px; background: #fffaf0; }
.provisioning-status > .field-hint { margin: 7px 0; }
.provision-cancel-form { margin: 8px 0 0; }
@media (max-width: 700px) { .provisioning-status { width: 100%; min-width: 0; max-width: none; } }

/* v1.3.26: keep OUT provisioning compact until explicitly opened */
.out-provision-launcher { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0 24px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.out-provision-launcher > div { display: grid; gap: 4px; min-width: 0; }
.out-provision-launcher strong { color: var(--ink); font-size: 14px; }
.out-provision-launcher span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.out-setup-hub { margin: 20px 0 30px; padding: 20px; background: linear-gradient(180deg,#fff,#f8faff); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 28px rgba(31,61,105,.06); }
.out-setup-header { margin: 0 0 16px; }
.out-setup-collapsible > .out-setup-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.out-setup-collapsible > .out-setup-header::-webkit-details-marker { display: none; }
.out-setup-toggle::before { content: '+'; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid #cbdcf2; border-radius: 9px; color: #1767f5; font-size: 20px; }
.out-setup-collapsible[open] .out-setup-toggle::before { content: '−'; }
.out-setup-collapsible > .out-setup-methods { padding-top: 16px; }
.out-setup-header h2 { margin: 0 0 5px; color: var(--ink); font-size: 18px; letter-spacing: -.025em; }
.out-setup-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.out-setup-methods { display: grid; grid-template-columns: minmax(250px,.78fr) minmax(0,1.22fr); gap: 14px; align-items: stretch; }
.out-setup-methods > * { box-sizing: border-box; min-width: 0; margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.out-setup-methods .out-provision-launcher { min-height: 100%; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 24px; }
.out-setup-methods .out-provision-launcher .button { align-self: flex-start; }
.out-setup-methods .server-create-tools > summary { display: flex; width: 100%; min-height: 64px; box-sizing: border-box; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; background: #f7faff; border: 1px solid #e1eaf6; border-radius: 11px; cursor: pointer; text-align: left; }
.out-setup-manual-summary > span:first-child { display: grid; gap: 4px; min-width: 0; }
.out-setup-manual-summary strong { color: var(--ink); font-size: 14px; }
.out-setup-manual-summary small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.out-setup-manual-summary > .button { flex: 0 0 auto; white-space: nowrap; }
.out-setup-methods .server-create-tools[open] > summary { margin-bottom: 14px; }
.out-setup-methods .server-create-tools .admin-two-column { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); margin-top: 0; }
.out-setup-methods .server-create-tools .admin-two-column > .content-card { padding: 16px; }
dialog.admin-dialog-provision { box-sizing: border-box; width: min(860px, calc(100vw - 32px)); min-width: 0; max-width: calc(100vw - 32px); max-height: min(92vh, 920px); overflow-x: hidden; }
.out-provision-form { box-sizing: border-box; width: 100%; min-width: 0; }
.out-provision-form > *, .out-provision-form .field, .out-provision-form .admin-form-grid { min-width: 0; max-width: 100%; }
.out-provision-form .field input, .out-provision-form .field select { box-sizing: border-box; min-width: 0; max-width: 100%; }
.out-provision-form .admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.out-provision-ports { display: grid; gap: 13px; }
.out-provision-ports h3 { margin: 0; color: var(--ink); font-size: 15px; }
.out-provision-ports > div:first-child p { margin: 4px 0 0; }
.out-provision-port-group { display: grid; gap: 9px; padding: 13px; background: #f8faff; border: 1px solid var(--line); border-radius: 11px; }
.out-provision-port-group > strong { color: var(--ink); font-size: 12px; }
.out-provision-port-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) {
  .out-provision-launcher { align-items: stretch; flex-direction: column; padding: 15px; }
  .out-provision-launcher .button { width: 100%; }
  .out-setup-hub { padding: 14px; }
  .out-setup-methods, .out-setup-methods .server-create-tools .admin-two-column { grid-template-columns: minmax(0,1fr); }
  .out-setup-methods .out-provision-launcher { min-height: 0; margin: 0; padding: 16px; }
  .out-setup-methods .out-provision-launcher .button { align-self: stretch; }
  .out-setup-methods .server-create-tools > summary { align-items: flex-start; flex-direction: column; }
  .out-setup-manual-summary > .button { width: 100%; text-align: center; }
  dialog.admin-dialog-provision { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: 94vh; }
  .out-provision-form .admin-form-grid, .out-provision-port-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .out-provision-form .admin-form-grid, .out-provision-port-grid { grid-template-columns: minmax(0, 1fr); }
  .out-provision-port-group { padding: 11px; }
}


/* v1.3.27: make SSH host-key verification instructions readable */
.ssh-fingerprint-help { display: grid; gap: 7px; margin: 12px 0 14px; padding: 12px 13px; color: #6d5a32; background: #fffdf7; border: 1px solid #f1e2bf; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.ssh-fingerprint-help strong { color: #57451f; font-size: 12px; }
.ssh-fingerprint-help code { display: block; max-width: 100%; overflow-x: auto; padding: 9px 10px; color: #24324b; background: #f2f5fa; border: 1px solid #e1e8f2; border-radius: 7px; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.subscription-settings-intro { margin: 0 0 4px; }
.subscription-common-panel .admin-section:first-child { padding-top: 10px; }
.subscription-app-panel > .subscription-app-panel-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.subscription-app-panel-head h2 { margin: 0 0 4px; font-size: 18px; }
.subscription-routing-details { margin-top: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.subscription-routing-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.subscription-routing-details > summary::-webkit-details-marker { display: none; }
.subscription-routing-details > summary::after { content: '+'; color: var(--blue); font-size: 18px; line-height: 1; }
.subscription-routing-details[open] > summary::after { content: '−'; }
.subscription-routing-details > summary small { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400; }
.subscription-routing-panel { margin: 0 12px 12px; }
@media (max-width: 640px) { .subscription-routing-details > summary { align-items: flex-start; flex-wrap: wrap; } .subscription-routing-details > summary small { flex-basis: 100%; margin-left: 0; order: 2; } .subscription-routing-details > summary::after { margin-left: auto; } }
/* Match subscription settings sections to the framed surfaces used throughout admin. */
.subscription-settings { background: #fff; border-color: var(--line); }
.subscription-settings-intro { padding: 12px 14px; margin: 0 0 14px; color: #596b88; background: #f4f8ff; border: 1px solid #e2ebf8; border-radius: 10px; line-height: 1.55; }
.subscription-settings > .subscription-app-tabs { margin: 0 0 14px; }
.subscription-settings .subscription-app-panel { padding: 16px; background: #f5f8fd; border: 1px solid #dfe8f5; border-radius: 14px; }
.subscription-settings .subscription-common-panel { padding: 12px; }
.subscription-settings .subscription-settings-section { padding: 18px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 12px rgba(31,69,117,.035); }
.subscription-settings .subscription-settings-section .admin-section-head { padding-bottom: 11px; margin-bottom: 12px; border-bottom: 1px solid #edf1f7; }
.subscription-settings .subscription-settings-section .field-hint { line-height: 1.55; }
.subscription-settings .subscription-app-panel > .subscription-app-panel-head { padding: 14px 16px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.subscription-settings .subscription-app-panel-head h2 { font-size: 16px; }
.subscription-settings .subscription-app-panel > .subscription-announcement-grid { padding: 2px; }
.subscription-settings .subscription-routing-details { background: #fff; border-color: #dfe8f5; }
.subscription-settings .admin-form-actions { padding-top: 14px; margin-top: 14px; border-top: 1px solid #e8eef7; }
@media (max-width: 640px) {
  .subscription-settings .subscription-app-panel { padding: 10px; }
  .subscription-settings .subscription-common-panel { padding: 9px; }
  .subscription-settings .subscription-settings-section { padding: 13px; }
  .subscription-settings .subscription-app-panel > .subscription-app-panel-head { padding: 12px; }
}
/* 1.3.43: use the same full content width and single-card hierarchy as other admin pages. */
.subscription-settings { width: 100%; max-width: none; padding: 0; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.subscription-settings-intro { padding: 0; margin: 0 0 14px; color: #8292ab; background: transparent; border: 0; border-radius: 0; }
.subscription-settings > .subscription-app-tabs { margin: 0 0 18px; }
.subscription-settings > .subscription-app-panel { padding: 0; margin: 0; background: transparent; border: 0; border-radius: 0; }
.subscription-settings .subscription-common-panel { padding: 0; }
.subscription-settings .subscription-settings-section { padding: 20px 24px; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 12px 34px rgba(31,69,117,.045); }
.subscription-settings .subscription-settings-section:last-child { margin-bottom: 0; }
.subscription-settings .subscription-settings-section .admin-section-head { padding: 0 0 13px; margin: 0 0 13px; border-bottom: 1px solid #e8eef7; }
.subscription-settings .subscription-app-panel > .subscription-app-panel-head { padding: 0 0 15px; margin: 0 0 4px; background: transparent; border: 0; border-bottom: 1px solid #e8eef7; border-radius: 0; }
.subscription-settings .subscription-app-panel-head h2 { font-size: 18px; }
.subscription-settings .subscription-announcement-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; padding: 0; }
.subscription-settings .subscription-announcement-rule { padding: 14px 0; background: transparent; border: 0; border-bottom: 1px solid #e8eef7; border-radius: 0; box-shadow: none; }
.subscription-settings .subscription-announcement-rule:nth-child(n) { border-top: 0; }
.subscription-settings .subscription-rule-heading { margin-bottom: 8px; }
.subscription-settings .subscription-routing-details { margin-top: 0; background: #fff; border: 0; border-top: 1px solid #e8eef7; border-radius: 0; }
.subscription-settings .subscription-routing-details > summary { padding: 15px 0 0; }
.subscription-settings .subscription-routing-panel { padding: 12px 16px; margin: 12px 0 0; background: #f7faff; border: 1px solid var(--line); border-radius: 11px; }
.subscription-settings .admin-form-actions { padding-top: 0; margin-top: 16px; border: 0; }
@media (max-width: 760px) {
  .subscription-settings .subscription-settings-section { padding: 16px; }
  .subscription-settings .subscription-announcement-grid { grid-template-columns: minmax(0,1fr); }
}
.subscription-settings > .subscription-app-panel[data-app-panel="happ"],
.subscription-settings > .subscription-app-panel[data-app-panel="incy"] { padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 12px 34px rgba(31,69,117,.045); }
@media (max-width: 760px) {
  .subscription-settings > .subscription-app-panel[data-app-panel="happ"],
  .subscription-settings > .subscription-app-panel[data-app-panel="incy"] { padding: 15px; }
}

/* v1.3.44: server tabs and creation actions use the subscription-settings visual language */
.admin-page .admin-subtabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  padding: 5px;
  margin: 0 0 16px;
  background: #f1f5fb;
  border: 1px solid #e6edf7;
  border-radius: 14px;
}
.admin-page .admin-subtabs a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #63728e;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.admin-page .admin-subtabs a:hover { color: var(--blue); background: rgba(255,255,255,.58); }
.admin-page .admin-subtabs a.active {
  color: var(--blue);
  background: #fff;
  border-color: #dbe7f7;
  box-shadow: 0 2px 7px rgba(25,55,100,.07);
}
.admin-page .admin-subtabs a:focus-visible { outline: 3px solid rgba(23,103,245,.2); outline-offset: 2px; }
.admin-page .server-create-tools > summary {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
  list-style: none;
}
.admin-page .out-setup-methods .server-create-tools > summary { min-height: 64px; padding: 10px 12px; font-size: 12px; }
.admin-page .server-create-tools > summary::-webkit-details-marker { display: none; }
.admin-page .out-provision-launcher > .button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .admin-page .admin-subtabs { display: flex; width: 100%; }
  .admin-page .admin-subtabs a { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
  .admin-page .out-provision-launcher > .button { width: 100%; white-space: normal; }
}

/* 1.3.45: explanatory note sits below the General / Happ / INCY tabs. */
.subscription-settings-intro {
  margin: 0 0 16px;
  padding: 12px 15px;
  color: #667894;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.55;
}

/* 1.3.45: match the compact server-page actions and subscription info blocks. */
.admin-page .plan-create-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  padding-right: 34px;
}
.admin-page .plan-create-summary > .button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
  white-space: nowrap;
}
.admin-page .plan-rules-summary {
  flex: none;
  min-width: 0;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.admin-page .plan-rules-summary strong { font-size: 13px; }
.admin-page .plan-create-chevron { position: absolute; top: 12px; right: 4px; margin: 0; }
.admin-page .admin-search .button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .admin-page .plan-create-summary { gap: 12px; }
  .admin-page .plan-create-summary > .button { flex: 0 1 auto; }
  .admin-page .plan-rules-summary { flex-basis: auto; order: 0; }
}

/* 1.3.49: compact tariff action and expandable protocol port groups. */
.plan-create-launcher { margin: 0 0 28px; }
.plan-create-launcher > .button { min-height: 42px; padding: 0 18px; border-radius: 11px; font-size: 13px; }
.plan-rules-copy { display: grid; gap: 4px; margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.plan-rules-copy strong { color: var(--ink); font-size: 13px; }
.out-provision-ports { display: block; overflow: hidden; background: #f8faff; border: 1px solid var(--line); border-radius: 11px; }
.out-provision-ports > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; cursor: pointer; list-style: none; }
.out-provision-ports > summary::-webkit-details-marker { display: none; }
.out-provision-ports > summary:focus-visible { outline: 2px solid #8db4ff; outline-offset: -3px; }
.out-provision-ports-summary > span:first-child { display: grid; gap: 4px; }
.out-provision-ports-summary strong { color: var(--ink); font-size: 14px; }
.out-provision-ports-summary small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.out-provision-ports-toggle::before { content: '+'; color: var(--blue); font-size: 20px; line-height: 1; }
.out-provision-ports[open] .out-provision-ports-toggle::before { content: '−'; }
.out-provision-ports-content { display: grid; gap: 12px; padding: 0 13px 13px; }
@media (max-width: 760px) {
  .plan-create-launcher > .button { width: auto; max-width: 100%; }
  .out-provision-ports > summary { align-items: flex-start; }
  .out-provision-ports-toggle { flex: none; }
}

/* Shared mobile visibility for the synchronization table headings. */
@media (max-width: 760px) { .sync-node-columns { display: none; } }


/* Manual server creation dialog */
.manual-add-launcher { min-height: 100%; }
.manual-add-dialog { position: fixed; inset: 0; margin: auto; }
.manual-add-dialog .user-edit-dialog { width: 100%; }
.manual-add-dialog .manual-add-panel { padding-top: 18px; }
.manual-add-dialog .manual-add-panel form { display: grid; gap: 12px; }
.manual-add-dialog .admin-form-actions { margin-top: 4px; }
@media (max-width: 760px) { .manual-add-launcher { min-height: 0; } }

.server-software-versions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.server-software-versions b { color: var(--ink); font-weight: 700; }

.node-maintenance-status { flex-basis: 100%; color: #9a5a05; font-size: 11px; line-height: 1.45; }
.node-maintenance-status.is-done { color: #08734b; }
.node-maintenance-status.is-failed { color: #a32332; }
.node-maintenance-hint { color: var(--muted); font-size: 10px; line-height: 1.4; }

.node-maintenance-hint { display: block; flex-basis: 100%; margin-top: 3px; }

dialog.node-update-dialog { position: fixed; inset: 0; margin: auto; }

.auto-endpoint-form { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin:12px 0; padding:14px; background:#f7faff; border:1px solid #e1eaf6; border-radius:12px; }
.auto-endpoint-form strong,.auto-endpoint-form .field-hint { flex-basis:100%; }
.auto-endpoint-form select,.auto-endpoint-form input { min-height:40px; border:1px solid #d6e1f0; border-radius:9px; padding:7px 10px; background:#fff; }
.auto-endpoint-form label { display:grid; gap:4px; }
@media (max-width:700px) { .auto-endpoint-form { align-items:stretch; flex-direction:column; } }

/* Full-width rows keep update messages and long action labels from squeezing server details. */
.server-admin-card .server-admin-head { grid-template-columns: minmax(0, 1fr); }
.server-admin-card .server-admin-head > div:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
.server-admin-card .server-admin-head > .server-admin-actions { grid-column: 1; grid-row: 2; min-width: 0; max-width: 100%; }
.server-admin-card .server-admin-head > .node-maintenance-status { grid-column: 1; grid-row: 3; min-width: 0; padding: 10px 12px; border: 1px solid var(--border, #dce5f2); border-radius: 10px; overflow-wrap: anywhere; }
.server-admin-card .server-admin-head > .provisioning-status { grid-column: 1; grid-row: 4; }
.server-admin-card .server-software-versions { min-width: 0; overflow-wrap: anywhere; }
.server-admin-card .server-admin-actions > form { max-width: 100%; }
.server-admin-card .server-admin-actions .small-button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .server-admin-card .server-admin-actions { justify-content: flex-start; }
}
.auto-endpoint { margin: 10px 0; }
.auto-endpoint > summary { display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; color: var(--blue); cursor: pointer; font-size: var(--admin-type-small); font-weight: 700; list-style: none; }
.auto-endpoint > summary::-webkit-details-marker { display: none; }
.auto-endpoint > summary::before { content: '+'; display: inline-grid; width: 18px; height: 18px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; line-height: 1; }
.auto-endpoint[open] > summary::before { content: '−'; }
.auto-endpoint[open] > .auto-endpoint-form { margin-top: 4px; }
html[data-theme="dark"] .admin-page .auto-endpoint > summary { color: #80adff; }

.admin-page .dashboard-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.admin-page .online-stat-card { display: flex; flex-direction: column; min-width: 0; }
.online-stat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.admin-page .online-stat-head .online-refresh-button { width: 30px; height: 30px; flex-basis: 30px; margin: 0; border: 1px solid #c7d9f4; border-radius: 8px; color: #1765f5; }
.online-node-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 8px; margin: 12px 0; }
.online-node-cell { min-width: 0; text-align: center; }
.admin-page .online-node-cell span { overflow-wrap: anywhere; font-size: var(--admin-type-caption,12px); }
.online-node-cell b { display: block; margin-top: 3px; font-size: 16px; font-weight: 600; }
.admin-page .online-stat-card .online-count-open { margin-top: auto; align-self: flex-start; color: #1765f5; font-size: 12px; }
#online-coverage-state:empty { display: none; }
#online-coverage-state:not(:empty) { margin-bottom: 8px; }
html[data-theme="dark"] .admin-page .online-stat-card .online-count-open { color: #80adff; }
html[data-theme="dark"] .admin-page .online-stat-head .online-refresh-button { color: #80adff; border-color: #536d94; }
@media (max-width: 1150px) { .admin-page .dashboard-stats { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 760px) { .admin-page .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 420px) { .admin-page .dashboard-stats { grid-template-columns: minmax(0,1fr); } }

.provision-auth-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.provision-auth-fields[hidden] { display: none !important; }
.provision-auth-fields textarea { width: 100%; min-height: 150px; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.provisioning-live-log { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e9f3; }
.provisioning-live-log > summary { color: #2465df; cursor: pointer; font-weight: 600; }
.provisioning-live-log ol { display: grid; gap: 5px; max-height: 180px; overflow: auto; padding: 8px 0 0 20px; margin: 0; }
.provisioning-live-log li { padding-left: 2px; }
.provisioning-live-log time { margin-right: 8px; color: #7a8da9; font-size: 11px; }

.server-admin-card .server-admin-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px 18px; }
.server-admin-card .server-admin-head > div:first-child { grid-column:1; grid-row:1; }
.server-admin-card .server-admin-head > .server-admin-actions { grid-column:2; grid-row:1; align-self:start; }
.server-admin-card .server-admin-head > .provisioning-status { grid-column:1 / -1; }
.server-admin-card .server-admin-actions .small-button,
.server-admin-card .server-admin-actions > .server-reinstall > summary { min-height:36px; padding:0 13px; font-size:11px; white-space:nowrap; }
.server-card-tabs { display:flex; flex-wrap:wrap; gap:5px; width:max-content; max-width:100%; padding:5px; margin:15px 0 0; border-radius:11px; background:#f1f5fb; }
.server-card-tab { padding:9px 14px; border:0; border-radius:8px; background:transparent; color:#667894; font:600 12px/1.4 Inter,Segoe UI,Arial,sans-serif; cursor:pointer; }
.server-card-tab.is-active { background:#fff; color:#145de0; box-shadow:0 2px 8px rgba(23,43,72,.08); }
.server-card-tab-panels { padding-top:12px; }
.server-card-tab-panel[hidden] { display:none !important; }
.server-card-tab-panel > .server-edit { margin-top:0; padding-top:0; border-top:0; }
.server-card-tab-panel > .balancer-panel { margin-top:0; }
.server-card-overview-summary { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:12px 0; border-bottom:1px solid #e6edf6; }
.server-card-overview-summary > span { color:#71819b; font-size:12px; }
html[data-theme="dark"] .server-card-tabs { background:#192b45; }
html[data-theme="dark"] .server-card-tab.is-active { background:#293d5a; color:#9cbcff; }
html[data-theme="dark"] .server-card-overview-summary { border-color:#2a3850; }
@media(max-width:700px){.server-card-tabs{width:100%;box-sizing:border-box}.server-card-tab{flex:1 1 auto;text-align:center;padding:9px 8px}.server-card-tab-panels{padding-top:10px}}

.server-card-tab-panel .server-admin-actions { justify-content:flex-start; }
.server-card-tab-panel .server-admin-actions > form { margin:0; }
.server-card-maintenance-actions { width:fit-content; max-width:100%; }
.server-card-maintenance-actions > form { flex:0 0 auto; }
.server-card-maintenance-actions > .server-reinstall { flex:0 0 auto; }
@media(max-width:760px){.server-admin-card .server-admin-head{grid-template-columns:minmax(0,1fr);}.server-admin-card .server-admin-head > div:first-child{grid-column:1;grid-row:1}.server-admin-card .server-admin-head > .server-admin-actions{grid-column:1;grid-row:2;justify-content:flex-start}.server-admin-card .server-admin-head > .provisioning-status{grid-column:1 / -1}.server-card-maintenance-actions{width:100%}.server-card-maintenance-actions > .server-reinstall{flex:1 1 145px;min-width:0}.server-card-maintenance-actions > .server-reinstall > summary{width:100%;white-space:normal;text-align:center}}

/* Compact balancer controls and treat each endpoint as one expandable unit. */
.balancer-panel-body { grid-template-columns:max-content max-content; justify-content:start; }
.balancer-strategy-form { width:fit-content; max-width:100%; justify-self:start; }
.balancer-outbound-form > .small-button { justify-self:start; width:fit-content; min-width:0; }
.balancer-traffic { gap:5px; }
.balancer-traffic-row { min-height:24px; }
.endpoint-row:has(+ .endpoint-edit) { margin-top:10px; padding:14px; background:#fff; border:1px solid #e2eaf4; border-bottom:0; border-radius:12px 12px 0 0; }
.endpoint-edit { min-width:0; padding:0 14px 9px; margin:0 0 10px; background:#fff; border:1px solid #e2eaf4; border-top:0; border-radius:0 0 12px 12px; }
.endpoint-edit > summary { padding:7px 0; font-size:12px; }
.endpoint-edit form { margin:6px 0 0; }
.endpoint-edit textarea { min-height:170px; font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; }
@media(max-width:760px){
  .server-admin-card .balancer-panel-body { grid-template-columns:minmax(0,1fr); }
  .server-admin-card .balancer-panel-body .balancer-strategy-form { width:100%; }
  .server-admin-card .balancer-outbound-form > .small-button { width:fit-content; }
  .endpoint-row:has(+ .endpoint-edit) { grid-template-columns:minmax(0,1fr) auto; padding:12px; }
  .endpoint-edit { padding-inline:12px; }
}

/* Unified server card: consistent type scale and surfaces across all tabs. */
.server-admin-card { padding:22px; border-radius:18px; box-shadow:0 8px 26px rgba(28,55,94,.045); }
.server-admin-card .server-admin-head { gap:8px 20px; padding-bottom:16px; border-bottom:1px solid #e8eef6; }
.server-admin-card .server-name-line { gap:10px; min-height:34px; }
.server-admin-card .server-name-line h3 { font-size:18px; line-height:1.25; letter-spacing:-.035em; }
.server-admin-card .server-admin-head > div:first-child > .table-secondary { margin-top:3px; font-size:12px; }
.server-admin-card .server-software-versions { display:flex; flex-wrap:wrap; gap:5px 16px; margin-top:8px; font-size:11px; line-height:1.55; }
.server-card-tabs { gap:4px; padding:5px; margin:16px 0 0; border:1px solid #e5ecf5; border-radius:12px; }
.server-card-tab { min-height:38px; padding:9px 15px; font-size:12px; }
.server-card-tab-panels { padding-top:16px; }
.server-card-overview-summary { gap:8px 12px; padding:14px 0; }
.server-card-overview-summary > strong { color:#243650; font-size:14px; }
.server-card-overview-summary > span:not(.badge) { color:#667894; font-size:12px; line-height:1.5; }
.balancer-panel { gap:0; padding:18px; border-color:#e2eaf4; border-radius:14px; background:#f8faff; }
.balancer-panel-head { align-items:center; padding-bottom:14px; border-bottom:1px solid #e2eaf4; }
.balancer-panel-head strong { font-size:14px; }
.balancer-panel-body { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:center; gap:12px 14px; padding:14px 0 0; border:0; }
.balancer-outbound-form { grid-column:1 / -1; width:100%; padding-top:14px; border-top:1px solid #e2eaf4; }
.balancer-strategy-form { gap:10px; }
.balancer-strategy-form label { font-size:12px; }
.balancer-strategy-form select { min-height:36px; font-size:12px; }
.balancer-outbound-head,.balancer-traffic-head,.balancer-traffic-row { font-size:12px; }
.balancer-outbound-option { min-height:36px; padding:8px 11px; font-size:12px; }
.balancer-traffic { gap:9px; margin-top:16px; padding-top:15px; border-color:#e2eaf4; }
.balancer-traffic-row { min-height:28px; }
.endpoint-list { padding-top:0; border-top:0; }
.endpoint-list-head { min-height:48px; padding:10px 14px; color:#314766; background:#f6f8fc; border-color:#dfe7f1; border-radius:12px; font-size:12px; }
.endpoint-list-head:hover { background:#eff4fb; border-color:#cbd9eb; box-shadow:none; }
.endpoint-row { gap:14px; padding:15px 4px; border-color:#e8eef6; }
.endpoint-row > div > b { color:#243650; font-size:12px; }
.endpoint-row .table-secondary { margin-top:5px; font-size:11px; line-height:1.5; }
.endpoint-edit { padding-bottom:12px; }
.endpoint-edit > summary { font-size:12px; }
.endpoint-edit form { padding:16px; border-radius:12px; }
.auto-endpoint-form { gap:12px; padding:16px; border-radius:12px; }
.server-edit { margin-top:0; padding-top:0; border-top:0; }
.server-edit > summary { font-size:12px; }
.server-edit form { max-width:none; padding:16px; border:1px solid #e2eaf4; border-radius:12px; background:#f8faff; }
.server-card-maintenance-actions { gap:10px; }
@media(max-width:760px){
  .server-admin-card { padding:16px; border-radius:15px; }
  .server-admin-card .server-admin-head { padding-bottom:13px; }
  .server-card-tabs { width:100%; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
  .server-card-tabs::-webkit-scrollbar { display:none; }
  .server-card-tab { flex:0 0 auto; }
  .balancer-panel { padding:14px; }
  .balancer-panel-body { grid-template-columns:minmax(0,1fr); }
  .balancer-panel-body > form,.balancer-outbound-form { grid-column:1; width:100%; min-width:0; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form { display:grid; width:100%; }
  .server-admin-card .balancer-panel-body .balancer-strategy-form .small-button { width:fit-content; }
  .endpoint-row { grid-template-columns:minmax(0,1fr) auto; }
}

/* Automatic IN dialog keeps installer and protocol forms in one consistent layout. */
.in-auto-dialog-content { gap:14px; }
.in-auto-panel { min-width:0; padding-top:4px; }
.in-auto-panel > .admin-dialog-form { padding:0; }
.in-auto-panel .dialog-actions { padding-top:8px; }
.endpoint-row { grid-template-columns:minmax(0,1fr) auto auto auto; }
.endpoint-delete-form .small-button-danger { white-space:nowrap; }
@media(max-width:760px){.endpoint-row{grid-template-columns:minmax(0,1fr) auto}.endpoint-row > form{grid-column:2}.in-auto-dialog-content{padding:18px}}

/* Compact server help with a readable responsive modal. */
.servers-topbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.servers-topbar .admin-subtabs { margin:0; }
.server-help-button { flex:none; min-height:42px; display:inline-flex; align-items:center; gap:8px; }
.server-help-button > span { font-size:16px; line-height:1; }
dialog.server-help-dialog { width:min(720px,calc(100vw - 32px)); max-height:min(88vh,760px); }
.server-help-content { display:grid; gap:18px; padding:24px; }
.server-help-content .admin-dialog-head { padding-bottom:12px; border-bottom:1px solid var(--line); }
.server-help-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.server-help-item { display:flex; align-items:flex-start; gap:12px; min-width:0; padding:16px; background:#f7f9fd; border:1px solid #e1e9f5; border-radius:13px; }
.server-help-item-wide { grid-column:1/-1; }
.server-help-step { display:grid; flex:none; width:30px; height:30px; place-items:center; color:#1767f5; background:#eaf1ff; border-radius:9px; font-size:10px; font-weight:800; }
.server-help-item h3 { margin:2px 0 6px; color:var(--ink); font-size:13px; }
.server-help-item p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.server-help-port-example { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:12px; color:var(--muted); font-size:11px; }
.server-help-port-example span:not([aria-hidden]) { display:inline-flex; align-items:center; gap:8px; padding:8px 10px; background:#fff; border:1px solid #dce6f6; border-radius:9px; }
.server-help-port-example b { color:var(--ink); font-variant-numeric:tabular-nums; }
@media(max-width:760px){.servers-topbar{align-items:stretch;flex-direction:column}.servers-topbar .admin-subtabs{width:100%;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.servers-topbar .admin-subtabs::-webkit-scrollbar{display:none}.server-help-button{align-self:flex-end}.server-help-grid{grid-template-columns:1fr}.server-help-item-wide{grid-column:auto}.server-help-content{padding:18px}.server-help-port-example{align-items:stretch;flex-direction:column}.server-help-port-example > span[aria-hidden]{display:none}}/* confirmation dialog styles */

/* OUT disable confirmation */
dialog.out-disable-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));padding:26px;border-radius:18px}
.out-disable-dialog h2{margin:0 0 8px;font-size:21px;letter-spacing:-.035em}
.out-disable-dialog>p{margin:14px 0 0;color:var(--muted);line-height:1.55}
.out-disable-pools{display:grid;gap:8px;margin:18px 0 0;padding:0;list-style:none}
.out-disable-pools li{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;background:#f5f8ff;border:1px solid #dce6f6;border-radius:11px}
.out-disable-pools li span{color:var(--muted);text-align:right}
.out-disable-warning{padding:12px 14px;color:#895600!important;background:#fff8e9;border:1px solid #f2dda9;border-radius:11px}
.out-disable-dialog .admin-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
html[data-theme="dark"] .out-disable-pools li{background:#1b2c45;border-color:#354b69}
html[data-theme="dark"] .out-disable-warning{color:#ffd783!important;background:#382f1c;border-color:#67552d}
@media(max-width:560px){dialog.out-disable-dialog{padding:20px}.out-disable-pools li{flex-direction:column}}
