/* ==========================================================================
   nxsvs client portal - layered on style.css
   ========================================================================== */

.portal-main { padding-top: calc(var(--nav-h) + 24px); min-height: 70vh; padding-bottom: 96px; }
.portal .footer-slim { padding: 28px 0; }
.portal .footer-slim .footer-bottom { padding-top: 0; }

/* Portal sub-navigation */
.portal-bar { border-bottom: 1px solid var(--line); background: var(--surface); margin-bottom: 40px; }
.portal-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 52px; }
.portal-nav { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.portal-nav a { padding: 15px 14px; font-size: 14px; font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .3s, border-color .3s; }
.portal-nav a:hover { color: var(--text); }
.portal-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.portal-user { font-size: 13px; color: var(--text-3); white-space: nowrap; }

/* Flash messages */
.flashes { margin-bottom: 24px; display: grid; gap: 10px; }
.flash { padding: 14px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; border: 1px solid transparent; }
.flash ul { padding-left: 18px; list-style: disc; display: grid; gap: 4px; }
.flash-ok { background: rgba(127, 231, 210, .18); color: #0b6b62; border-color: rgba(11, 107, 98, .15); }
.flash-err { background: rgba(220, 38, 38, .07); color: #b91c1c; border-color: rgba(185, 28, 28, .15); }
.flash-info { background: var(--brand-soft); color: var(--brand-strong); border-color: rgba(37, 99, 235, .15); }
.flash-warn { background: rgba(245, 158, 11, .09); color: #92400e; border-color: rgba(180, 83, 9, .18); }

/* Auth cards */
.auth-wrap { max-width: 520px; margin: 24px auto 0; }
.auth-wrap.wide { max-width: 760px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.auth-card h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.05; margin-top: 16px; }
.auth-card .lead { color: var(--text-2); font-size: 16px; margin: 16px 0 26px; }
.auth-card .form { padding-top: 0; }
.auth-alt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.text-link { color: var(--brand-strong); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 10px 0 18px; cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--brand); }
.consent-box { border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 20px 6px; margin: 6px 0 24px; }
.consent-box legend { padding: 0 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.consent-box .check { margin: 8px 0 12px; }
.consent-box .check.optional { color: var(--text-3); }

.steps-list { counter-reset: step; display: grid; gap: 12px; margin: 22px 0; }
.steps-list li { position: relative; padding-left: 38px; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.steps-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; font-weight: 600; display: grid; place-items: center; color: var(--text-2); background: var(--surface); }
.steps-list li.done::before { content: "\2713"; background: var(--brand); border-color: var(--brand); color: #fff; }
.steps-list li.current::before { border-color: var(--brand); color: var(--brand-strong); }
.steps-list b { color: var(--text); }

/* Page header inside the portal */
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.page-title h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; line-height: 1.05; margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-title .muted { margin-top: 8px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--brand-strong); }

/* Tiles, blocks, cards */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 40px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; transition: border-color .3s, transform .5s var(--ease-out); }
a.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile-hot { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tile-num { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.tile-label { display: block; margin-top: 8px; font-size: 13px; color: var(--text-3); }

.block { margin-bottom: 40px; }
.block-title { font-size: 20px; letter-spacing: -.02em; margin-bottom: 16px; }
.sub-title { font-size: 16px; margin: 24px 0 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-col > *, .service-card, .block { min-width: 0; }
.narrow-col { max-width: 820px; }
.aside .steps-list { margin-top: 8px; }
.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; margin-bottom: 40px; }
.empty h2 { font-size: 24px; letter-spacing: -.02em; }
.empty p { color: var(--text-2); max-width: 520px; margin: 12px auto 22px; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .3s, transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.service-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .25); }
.service-card-head { display: flex; justify-content: space-between; align-items: center; }
.service-card-head .icon { width: 24px; height: 24px; color: var(--brand); stroke-width: 1.5; }
.service-card h3 { font-size: 18px; letter-spacing: -.015em; }
.service-card .link-arrow { margin-top: 10px; }
.mini { display: grid; gap: 4px; margin-top: 4px; font-size: 13px; }
.mini div { display: flex; gap: 10px; }
.mini dt { color: var(--text-3); width: 44px; flex-shrink: 0; }
.mini dd { margin: 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

.detail-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.detail-list div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.detail-list dt { color: var(--text-3); }
.detail-list dd { margin: 0; }
.detail-list.compact div { grid-template-columns: 120px 1fr; padding: 8px 0; }
.note-box { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; font-size: 14.5px; color: var(--text-2); }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.badge-ok { background: rgba(127, 231, 210, .25); color: #0b6b62; }
.badge-info { background: var(--brand-soft); color: var(--brand-strong); }
.badge-warn { background: rgba(245, 158, 11, .15); color: #92400e; }
.badge-muted { background: var(--surface-2); color: var(--text-3); }
.badge-err { background: rgba(220, 38, 38, .12); color: #b91c1c; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table.small { font-size: 13.5px; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.small { font-size: 12.5px; }
.muted { color: var(--text-3); }

/* Forms inside the portal */
.portal .form { padding-top: 0; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.f-static { padding: 8px 0 12px; font-size: 16px; }
.f-input.inline { width: auto; min-width: 200px; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 14px; background: var(--surface); }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form .f-input { flex: 1 1 200px; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 14px; background: var(--surface); }
.admin-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 8px; }
.btn-danger { background: transparent; color: #b91c1c; border-color: rgba(185, 28, 28, .35); }
.btn-danger:hover { background: rgba(220, 38, 38, .06); border-color: #b91c1c; }
.actions-form .action-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.review-box { background: var(--surface); border: 1px solid var(--brand); border-radius: var(--radius); padding: 24px; box-shadow: 0 0 0 3px var(--brand-soft); }
.review-box.danger { border-color: rgba(185, 28, 28, .4); box-shadow: 0 0 0 3px rgba(220, 38, 38, .06); }
.review-box .check-list { margin-top: 6px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.order-card .admin-form { border: 0; padding: 18px 0 0; background: none; border-top: 1px solid var(--line); border-radius: 0; margin-top: 18px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

/* Privacy cards */
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.privacy-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.privacy-card h3 { font-size: 16px; margin-bottom: 8px; }
.privacy-card p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.privacy-card .check { margin: 0; }
.privacy-card.danger { border-color: rgba(185, 28, 28, .25); }

/* Ticket thread */
.thread { display: grid; gap: 12px; margin-bottom: 28px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.msg-staff { border-color: rgba(37, 99, 235, .3); background: #fbfcff; }
.msg-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.msg-body { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }

@media (max-width: 1080px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .portal-main { padding-top: calc(var(--nav-h) + 8px); }
  .portal-bar { margin-bottom: 28px; }
  .portal-user { display: none; }
  .auth-card { padding: 26px 20px; }
  .two-col, .service-grid, .privacy-grid, .form-row.three { grid-template-columns: 1fr; }
  .detail-list div { grid-template-columns: 1fr; gap: 2px; }
  .page-title { align-items: flex-start; }
}
@media (max-width: 480px) {
  .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 16px; }
  .tile-num { font-size: 24px; }
}

/* ==========================================================================
   Sign-in - full-bleed split: form on the left, picture on the right
   ========================================================================== */

/* The nav is taller than --nav-h on a notched phone, so both the offset and
   the panel height are measured from the same value. */
.portal-bare { --nav-total: calc(var(--nav-h) + env(safe-area-inset-top)); }
.portal-bare .portal-main { padding-top: var(--nav-total); padding-bottom: 0; min-height: 0; }

.signin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  min-height: calc(100vh - var(--nav-total));
  min-height: calc(100svh - var(--nav-total));
  background: var(--surface);
}

/* ---- Left: the form ---- */
.signin-form {
  display: flex;
  padding: 56px var(--gutter) 48px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  border-right: 1px solid var(--line);
}
/* auto on all four sides: centres while the form is shorter than the panel,
   and stops centring - rather than clipping the top - once it is taller. */
.signin-inner { width: 100%; max-width: 392px; margin: auto; }
.signin-wide .signin-inner { max-width: 588px; }
.signin-wide { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
/* The picture stays put while a long form scrolls past it. */
.signin-wide .signin-aside { position: sticky; top: var(--nav-total); height: calc(100svh - var(--nav-total)); }

.signin-head { margin-bottom: 30px; }
.signin-head h1 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.035em; line-height: 1.02; margin-top: 16px; }
.signin-sub { margin-top: 12px; color: var(--text-2); font-size: 15px; line-height: 1.55; }

.signin .flash { margin-bottom: 20px; }
.flash-note { display: block; margin-top: 6px; font-size: 13px; opacity: .85; }
.flash-action { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 13.5px; color: inherit; border-bottom: 1px solid currentColor; }

.signin-fields { padding-top: 4px; }
.signin-fields .f-field { margin-bottom: 22px; }

/* "Show" shares the label's row and its typography, so the two sit on one
   baseline and the field keeps a single clean underline. */
.f-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.f-label-row label { margin-bottom: 4px; }
.pass-toggle {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); transition: color .3s;
}
.pass-toggle:hover, .pass-toggle:focus-visible { color: var(--brand-strong); }

.caps-warn {
  margin: -14px 0 18px;
  font-size: 12.5px; color: #b45309;
  display: flex; align-items: center; gap: 8px;
}
.caps-warn::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
/* display:flex above outranks the browser's [hidden] rule, so say it here:
   without this the Caps Lock line shows on every page load. */
.caps-warn[hidden], .pass-toggle[hidden] { display: none; }

.signin-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 24px; flex-wrap: wrap;
  margin: 4px 0 26px;
}
.check-inline { margin: 0; align-items: center; font-size: 13.5px; }
.check-inline input { margin-top: 0; }
.signin-row .text-link { font-size: 13.5px; white-space: nowrap; }

.signin-fields .btn-block { justify-content: center; padding-top: 16px; padding-bottom: 16px; }
.btn.is-busy .icon { display: none; }

/* Three steps, so nobody wonders what happens after they press the button. */
.signup-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 28px; }
.signup-steps li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-3); }
.signup-steps span {
  width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-family: var(--mono); font-size: 10px; font-weight: 600;
}
.signup-steps .current { color: var(--text); }
.signup-steps .current span { background: var(--brand); border-color: var(--brand); color: #fff; }

.f-opt { font-family: var(--font); font-size: 10.5px; letter-spacing: 0; text-transform: none; color: var(--text-3); opacity: .8; }

/* Password strength: four steps, coloured only once it is actually usable. */
.pw-meter { margin: -8px 0 20px; }
.pw-bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--line-2); transition: width .35s var(--ease-out), background .35s; }
.pw-meter[data-level="1"] .pw-bar span { background: #dc2626; }
.pw-meter[data-level="2"] .pw-bar span { background: #d97706; }
.pw-meter[data-level="3"] .pw-bar span { background: var(--brand); }
.pw-meter[data-level="4"] .pw-bar span { background: #0b8f7d; }
.pw-text { margin-top: 7px; font-size: 12.5px; color: var(--text-3); }
.pw-meter[hidden] { display: none; }

.signin-fields .consent-box { margin: 4px 0 24px; }
.signin-note { margin-top: 14px; line-height: 1.5; }

.signin-alt { margin-top: 24px; font-size: 13.5px; color: var(--text-2); }
.signin-dot { margin: 0 8px; color: var(--line-2); }

.signin-foot {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.signin-foot a { color: var(--text-3); transition: color .3s; }
.signin-foot a:hover { color: var(--text-2); }

/* ---- Right: the picture ---- */
.signin-aside {
  position: relative; overflow: hidden;
  background: var(--dark);
  display: flex; align-items: flex-end;
  min-height: 320px;
}
/* Declared only where the panel is actually shown. Below that breakpoint the
   aside is display:none, so the browser never requests the file - which is the
   whole point of using a background here instead of an <img>. */
.signin-photo { display: none; }
@media (min-width: 981px) {
  .has-photo .signin-photo {
    display: block;
    position: absolute; inset: 0;
    background-image: var(--login-photo);
    background-size: cover;
    background-position: center;
  }
}
/* Dark wash under the caption only, so the picture keeps its own contrast
   at the top and the text stays readable at the bottom. */
.signin-aside::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 68%;
  background: linear-gradient(to top, rgba(11, 18, 32, .92) 0%, rgba(11, 18, 32, .72) 38%, rgba(11, 18, 32, 0) 100%);
}
.signin-aside-body {
  position: relative; z-index: 1;
  padding: 48px 56px calc(48px + env(safe-area-inset-bottom));
  max-width: 520px;
}
.signin-mark { width: 44px; height: auto; margin-bottom: 22px; opacity: .92; }
.signin-quote {
  color: #fff; font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.25; letter-spacing: -.025em; font-weight: 500;
}
.signin-points { margin-top: 26px; display: grid; gap: 11px; }
.signin-points li {
  display: flex; align-items: flex-start; gap: 11px;
  color: var(--dark-text); font-size: 14px; line-height: 1.5;
}
.signin-points .icon {
  width: 15px; height: 15px; flex-shrink: 0; margin-top: 4px;
  color: var(--signal);
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* No photo uploaded yet: a plain hairline grid on the brand dark, which is
   deliberate enough to ship as-is. */
.signin-noimage .signin-aside {
  background:
    linear-gradient(var(--dark-line) 1px, transparent 1px) 0 0 / 100% 72px,
    linear-gradient(90deg, var(--dark-line) 1px, transparent 1px) 0 0 / 72px 100%,
    radial-gradient(120% 90% at 78% 8%, var(--dark-2) 0%, var(--dark) 62%);
}
.signin-noimage .signin-aside::after { display: none; }

/* ---- Narrower screens ---- */
@media (max-width: 1180px) {
  .signin-form { padding-left: 32px; padding-right: 32px; }
  .signin-aside-body { padding: 40px 40px calc(40px + env(safe-area-inset-bottom)); }
}

@media (max-width: 1100px) {
  .signin-wide { grid-template-columns: 1fr; }
  .signin-wide .signin-aside { display: none; }
  .signin-wide .signin-form { border-right: 0; }
}

@media (max-width: 980px) {
  /* The picture is decorative; on one column the form should own the screen. */
  .signin { grid-template-columns: 1fr; }
  .signin-aside { display: none; }
  .signin-form { border-right: 0; justify-content: center; padding: 44px var(--gutter) 40px; }
  .signin-inner { max-width: 420px; }
}

@media (max-width: 560px) {
  .signin-form { padding: 32px 20px 36px; }
  .signin-inner { margin-top: 0; }
  .signup-steps { gap: 6px 16px; margin-bottom: 22px; }
  .signin { min-height: auto; }
  .signin-head { margin-bottom: 24px; }
  .signin-row { margin-bottom: 22px; }
  .signin-foot { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .signin .btn, .signin .btn .icon, .pass-toggle { transition: none; }
}

/* ==========================================================================
   Control panel - server list, activity feed
   ========================================================================== */

.block-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head .block-title { margin-bottom: 0; }

/* Segmented filter, same mono label type as the form fields */
.seg { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); }
.seg-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--pill);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  white-space: nowrap; transition: background .25s, color .25s;
}
.seg-btn span { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--text-3); }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-on { background: var(--text); color: #fff; }
.seg-btn.is-on span { color: rgba(255, 255, 255, .6); }

/* State dot */
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--line-2); }
.dot-ok   { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.dot-off  { background: var(--text-3); }
.dot-warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.dot-idle { background: var(--line-2); }
.dot-busy { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); animation: dot-pulse 1.8s var(--ease-inout) infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- Server rows ---- */
.ctl-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ctl-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 150px minmax(0, 1fr) auto;
  align-items: center; gap: 20px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  transition: background .25s;
}
.ctl-row:first-child { border-top: 0; }
.ctl-row:hover { background: var(--surface-2); }
.ctl-row[hidden] { display: none; }

.ctl-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ctl-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.ctl-icon .icon { width: 18px; height: 18px; color: var(--text-2); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ctl-name { min-width: 0; }
.ctl-label { display: block; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-label:hover { color: var(--brand-strong); }
.ctl-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ctl-state { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ctl-status { font-size: 13.5px; color: var(--text-2); text-transform: capitalize; }
.ctl-auto {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-strong); background: var(--brand-soft); padding: 3px 6px; border-radius: 4px;
}

.ctl-addr { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; max-width: 100%; }
/* The address is a button because clicking it copies; it must not look like one. */
.copy {
  max-width: 100%; text-align: left; font-size: 13px; color: var(--text-2);
  border-bottom: 1px dashed var(--line-2); padding-bottom: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .25s, border-color .25s;
}
.copy code { font-family: var(--mono); font-size: 12.5px; }
.copy:hover { color: var(--brand-strong); border-bottom-color: var(--brand); }
.copy-sub { font-size: 12.5px; color: var(--text-3); }
.copy.copied { color: #0b8f7d; border-bottom-color: #0b8f7d; }
.copy.copied::after { content: " copied"; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.copy.copy-failed { color: #b45309; border-bottom-color: #b45309; }

.ctl-actions { display: flex; align-items: center; gap: 14px; justify-self: end; }
.ctl-power { display: flex; gap: 8px; }
.btn-xs { padding: 8px 13px; font-size: 12.5px; }
.ctl-manage { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-strong); white-space: nowrap; }
.ctl-manage .icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease-out); }
.ctl-manage:hover .icon { transform: translateX(3px); }
.ctl-empty { margin-top: 16px; color: var(--text-3); font-size: 14px; }

.tile-num.tone-ok { color: #0b8f7d; }

/* ---- Activity feed ---- */
.feed { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.feed-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 15px 22px; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-item .dot { margin-top: 7px; }
.feed-line { font-size: 14.5px; line-height: 1.45; }
.feed-line b { font-weight: 600; }
.feed-note { margin-top: 3px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.feed-meta { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.feed-meta time { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

/* ---- Narrower screens ---- */
@media (max-width: 1080px) {
  .ctl-row { grid-template-columns: minmax(0, 1.4fr) 130px minmax(0, 1fr); row-gap: 14px; }
  .ctl-actions { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 720px) {
  .ctl-row { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
  .ctl-state, .ctl-addr { padding-left: 52px; }
  .ctl-addr { gap: 4px; }
  .ctl-actions { padding-left: 52px; justify-content: space-between; width: 100%; }
  .seg { width: 100%; overflow-x: auto; }
  .feed-item { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .feed-meta { grid-column: 2; }
}

@media (max-width: 480px) {
  .ctl-state, .ctl-addr, .ctl-actions { padding-left: 0; }
  .ctl-actions { flex-wrap: wrap; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot-busy { animation: none; }
  .ctl-manage .icon { transition: none; }
}

/* ==========================================================================
   Launch form - create a VPS
   ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.launch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.launch-main { display: grid; gap: 16px; min-width: 0; }

/* Numbered steps, hairline boxes rather than heavy cards */
.lx-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lx-step.is-bad { border-color: rgba(185, 28, 28, .45); }
.lx-head { display: flex; align-items: center; gap: 13px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lx-num {
  width: 23px; height: 23px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--text); color: #fff;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
}
.lx-head h2 { font-size: 15.5px; letter-spacing: -.015em; }
.lx-body { padding: 22px; display: grid; gap: 18px; }
.lx-body > .f-field:last-child, .lx-body > .check:last-child { margin-bottom: 0; }
.lx-narrow { max-width: 320px; }
.lx-note { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.lx-row { display: grid; gap: 10px; }
.lx-row .check { margin: 0; }
.f-hint { margin-top: 7px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.f-hint code, .lx-body code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
textarea.f-mono { font-family: var(--mono); font-size: 13px; line-height: 1.6; }

/* Radio tiles */
.lx-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.lx-choices legend {
  padding: 0 0 10px; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}
.lx-choices.cols-2 { grid-template-columns: 1fr 1fr; }
.lx-choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.lx-choices legend { grid-column: 1 / -1; }

.pick { position: relative; display: block; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick-body {
  display: block; padding: 13px 15px;
  border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.pick:hover .pick-body { border-color: var(--text-3); }
.pick input:checked + .pick-body { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); background: var(--brand-soft); }
.pick input:focus-visible + .pick-body { outline: 2px solid var(--brand); outline-offset: 2px; }
.pick-title { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.pick-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.pick.is-off { cursor: not-allowed; }
.pick.is-off .pick-body { opacity: .5; background: var(--surface-2); }
.pick-tag {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line-2); padding: 2px 5px; border-radius: 4px;
}
.pick-tag.tag-brand { color: var(--brand-strong); background: var(--brand-soft); border-color: rgba(37, 99, 235, .22); }

/* Size table */
.lx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lx-table thead th {
  padding: 0 10px 9px; text-align: left; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.lx-table td, .lx-table tbody th { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.lx-table tbody th { font-weight: 600; }
.lx-table tbody tr:last-child td, .lx-table tbody tr:last-child th { border-bottom: 0; }
.lx-table tbody tr:hover { background: var(--surface-2); }
.lx-table tbody tr:has(input:checked) { background: var(--brand-soft); }
.lx-table tr[hidden] { display: none; }
.lx-table input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.lx-table label { cursor: pointer; }
.ta-r { text-align: right !important; }
.nowrap { white-space: nowrap; }

.lx-callout {
  padding: 14px 16px; border-radius: 11px; font-size: 13.5px; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.lx-callout b { color: var(--text); }
.lx-adv summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--brand-strong); padding: 4px 0; }
.lx-adv summary::marker { color: var(--text-3); }
.lx-adv[open] summary { margin-bottom: 14px; }

/* Sticky summary */
.launch-side { position: sticky; top: calc(var(--nav-h) + 16px); min-width: 0; }
.lx-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.lx-summary h2 { font-size: 15.5px; letter-spacing: -.015em; margin-bottom: 16px; }
.lx-sum-list { display: grid; gap: 0; font-size: 13px; }
.lx-sum-list div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lx-sum-list dt { color: var(--text-3); }
.lx-sum-list dd { margin: 0; overflow-wrap: anywhere; }

.lx-cost { margin: 18px 0; }
.lx-cost ul { display: grid; gap: 7px; }
.lx-cost li { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--text-2); }
.lx-cost li b { font-weight: 500; color: var(--text); white-space: nowrap; }
.lx-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line-2);
}
.lx-total span { font-size: 13px; color: var(--text-2); }
.lx-total b { font-size: 24px; letter-spacing: -.03em; }
.lx-vat { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.lx-summary .btn-block { justify-content: center; padding-top: 15px; padding-bottom: 15px; }
.lx-summary .form-note { margin-top: 12px; line-height: 1.5; }

@media (max-width: 1080px) {
  .launch { grid-template-columns: 1fr; }
  /* The summary moves to the top so the price is visible before scrolling. */
  .launch-side { position: static; order: -1; }
  .lx-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
  .lx-summary h2 { grid-column: 1 / -1; }
  .lx-summary .btn-block, .lx-summary .form-note { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .lx-choices.cols-2, .lx-choices.cols-3 { grid-template-columns: 1fr; }
  .lx-body { padding: 18px; }
  .lx-head { padding: 14px 18px; }
  .lx-summary { grid-template-columns: 1fr; }
  .lx-table thead { display: none; }
  .lx-table tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .lx-table tbody td, .lx-table tbody th { border: 0; padding: 0; }
  .lx-table tbody th { grid-column: 2; }
  .lx-table tbody td:last-child { grid-row: 1; grid-column: 3; font-weight: 600; }
  /* vCPU / RAM / storage / transfer read as one line under the name */
  .lx-table tbody td:nth-child(3)::after { content: " vCPU"; }
  .lx-table tbody td:nth-child(3), .lx-table tbody td:nth-child(4),
  .lx-table tbody td:nth-child(5), .lx-table tbody td:nth-child(6) {
    grid-row: 2; grid-column: 2; display: inline; font-size: 12.5px; color: var(--text-3);
  }
  .lx-table tbody td:nth-child(4)::before,
  .lx-table tbody td:nth-child(5)::before,
  .lx-table tbody td:nth-child(6)::before { content: " · "; }
}

/* ==========================================================================
   Admin build queue
   ========================================================================== */

.build { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.build-stalled { border-color: rgba(245, 158, 11, .5); box-shadow: 0 0 0 3px rgba(245, 158, 11, .08); }
.build-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.build-head h2 { font-size: 19px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.build-head .muted { margin-top: 5px; font-size: 13px; }
.build-price { font-size: 19px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.build-price small { font-size: 12px; font-weight: 400; color: var(--text-3); }

.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-bottom: 16px; }
.build-grid .detail-list div { padding: 8px 0; }
.build-grid code { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

.build-pre {
  margin-top: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--dark); color: var(--dark-text);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; white-space: pre; -webkit-overflow-scrolling: touch;
}
.build-note { margin: 4px 0 16px; font-size: 13.5px; color: var(--text-2); }

.build-form { padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--line); }
.build-form .f-field { margin-bottom: 18px; }
.build .flash { margin-bottom: 16px; }

@media (max-width: 720px) {
  .build-grid { grid-template-columns: 1fr; gap: 0; }
  .build { padding: 18px; }
}

/* ==========================================================================
   Public status page
   ========================================================================== */

.st-wrap { max-width: 900px; padding-bottom: 40px; }

.st-banner {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 24px 26px; margin-bottom: 40px;
  border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius);
  background: var(--surface);
}
.st-banner.tone-ok   { border-left-color: #10b981; }
.st-banner.tone-warn { border-left-color: #f59e0b; }
.st-banner.tone-busy { border-left-color: var(--brand); }
.st-banner .dot { width: 10px; height: 10px; }
.st-banner h1 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.025em; }
.st-banner p { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.st-banner time { font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* Component rows with the 90-day strip */
.st-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.st-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) 150px minmax(0, 1.5fr) 74px;
  align-items: center; gap: 18px; padding: 16px 22px; border-top: 1px solid var(--line);
}
.st-row:first-child { border-top: 0; }
.st-label { display: block; font-weight: 600; letter-spacing: -.01em; }
.st-detail { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.st-state { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); }

.st-strip { display: flex; gap: 2px; align-items: stretch; height: 26px; }
.st-tick { flex: 1 1 0; min-width: 2px; border-radius: 1px; background: #10b981; }
.tick-ok   { background: #10b981; }
.tick-warn { background: #f59e0b; }
.tick-bad  { background: #dc2626; }
.st-uptime { text-align: right; }
.st-uptime b { display: block; font-size: 14px; letter-spacing: -.02em; }
.st-uptime span { display: block; font-size: 10.5px; color: var(--text-3); }

.st-legend { margin-top: 12px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-legend .st-tick { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 2px; }

/* Incidents */
.st-incident { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid #f59e0b; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 12px; }
.st-incident.st-planned { border-left-color: var(--brand); }
.st-incident h3 { font-size: 17px; letter-spacing: -.02em; }
.st-incident header .muted { margin-top: 5px; font-size: 13px; }
.st-updates { margin-top: 18px; display: grid; gap: 16px; }
.st-updates li { padding-left: 16px; border-left: 2px solid var(--line); }
.st-u-state { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.st-updates p { margin-top: 5px; font-size: 14.5px; line-height: 1.55; }
.st-updates time { display: block; margin-top: 5px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }

.st-history { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.st-history li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 14px; }
.st-history li:first-child { border-top: 0; }
.st-history .muted { margin-left: 8px; font-size: 12.5px; }
.st-history time { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.st-clean { padding: 26px; text-align: center; color: var(--text-3); font-size: 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); }

.st-foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.st-foot p + p { margin-top: 5px; font-size: 12.5px; }

@media (max-width: 860px) {
  .st-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; }
  .st-strip { grid-column: 1 / -1; }
  .st-uptime { grid-row: 1; grid-column: 2; text-align: right; }
  .st-state { grid-column: 1; }
  .st-name { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .st-banner { grid-template-columns: auto 1fr; padding: 18px; }
  .st-banner time { grid-column: 2; }
  .st-row { padding: 16px 18px; }
  /* 90 ticks will not fit; show the last 45 days rather than a smear. */
  .st-tick:nth-child(-n+45) { display: none; }
}

.st-inline { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.st-inline .f-input { padding: 6px 0; font-size: 13px; }
.st-inline .f-input:not(select) { min-width: 0; }

.table tr.is-paused { opacity: .55; }
.mono-cell { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; max-width: 260px; }

/* Health meters on the service page */
.meter { display: block; height: 3px; margin-top: 10px; border-radius: 2px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 2px; transition: width .6s var(--ease-out); }
.meter-ok   { background: #10b981; }
.meter-warn { background: #f59e0b; }
.meter-bad  { background: #dc2626; }
.meter-idle { background: var(--line-2); }
.tile-num.tone-warn { color: #b45309; }
.tile-num.tone-bad  { color: #b91c1c; }
.tile-sub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }

.st-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.st-group-head .block-title { margin-bottom: 0; }
.st-group-state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.st-row.st-unmonitored .st-label { color: var(--text-2); }
.st-strip-empty { border-bottom: 1px dashed var(--line-2); align-self: center; height: 0; }

/* ==========================================================================
   Game servers
   ========================================================================== */

.lx-warn {
  padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
  color: #92400e; background: rgba(245, 158, 11, .09); border: 1px solid rgba(245, 158, 11, .3);
}
.lx-warn[hidden] { display: none; }

.connect-steps { counter-reset: cs; display: grid; gap: 10px; margin: 0; }
.connect-steps[hidden] { display: none; }
.connect-steps li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); list-style: none; }
.connect-steps li::before {
  counter-increment: cs; content: counter(cs);
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  background: var(--brand); color: #fff;
}
.connect-steps b { color: var(--text); }
.connect-steps code, .connect-card code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }

.connect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.connect-card { padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--text-2); }
.connect-card b { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--text); }
@media (max-width: 760px) { .connect-grid { grid-template-columns: 1fr; } }

/* Connection panel on a game server's own page */
.join-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, #0e2350, var(--dark));
  color: #fff; margin-bottom: 16px;
}
.join-box .join-label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8fb6ff; }
.join-box .join-addr { display: block; margin-top: 4px; font-family: var(--mono); font-size: 20px; letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.join-box .copy { color: #fff; border-bottom-color: rgba(255, 255, 255, .35); font-size: 13px; }
.join-box .copy:hover { color: #bcd4ff; border-bottom-color: #bcd4ff; }

/* Free trial on the create page */
.lx-table tr.is-locked { opacity: .4; }
.lx-table tr.is-locked:hover { background: none; }
.lx-trial-note { margin: 0 0 10px; padding: 9px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; color: var(--brand-strong); background: var(--brand-soft); border: 1px solid rgba(37, 99, 235, .18); }
.lx-trial-note[hidden] { display: none; }
.trial-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #92400e; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .35); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; margin-bottom: 16px; background: rgba(245, 158, 11, .07); border: 1px solid rgba(245, 158, 11, .3); }
.trial-banner b { display: block; font-size: 15px; }
.trial-banner span { font-size: 13.5px; color: var(--text-2); }
.trial-banner.is-ended { background: rgba(220, 38, 38, .06); border-color: rgba(220, 38, 38, .25); }
.trial-size { display: grid; gap: 4px; padding: 14px 16px; border-radius: 11px; background: var(--brand-soft); border: 1px solid rgba(37, 99, 235, .2); }
.trial-size[hidden], [data-paid-size][hidden] { display: none; }
.trial-size b { font-size: 14.5px; }
.trial-size span { font-size: 13px; color: var(--text-2); }

/* ---------------- Game server: live card ---------------- */
.gs-live { position: relative; }
.gs-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.gs-state { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gs-state b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.gs-state .dot { width: 10px; height: 10px; }
.gs-power { display: flex; gap: 8px; flex-wrap: wrap; }
.gs-power [hidden] { display: none; }
.gs-tiles { grid-template-columns: repeat(5, 1fr); margin-bottom: 14px; }
.gs-tiles .tile { padding: 18px 18px; min-width: 0; }
.gs-tiles .tile-num { font-size: 26px; overflow-wrap: anywhere; }
.gs-tiles .tile-num.gs-net { font-size: 16px; line-height: 1.3; font-family: var(--mono); letter-spacing: 0; }
.gs-tiles .tile-label .muted { font-size: 12px; }
.gs-tiles .tile-sub { overflow-wrap: anywhere; }
.gs-note { margin: 0 0 12px; }
.gs-note[hidden] { display: none; }
.gs-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 12px; color: var(--text-3); }
.gs-pulse { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: dot-pulse 1.8s var(--ease-inout) infinite; }
.join-box .join-meta { display: block; margin-top: 6px; font-size: 12.5px; color: #b9c8e4; overflow-wrap: anywhere; }
@media (max-width: 1080px) {
  .gs-tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .gs-tiles { grid-template-columns: repeat(2, 1fr); }
  .gs-power { width: 100%; }
  .gs-power .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .gs-pulse { animation: none; }
}
.ctl-players { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: #0b8f7d; background: rgba(16, 185, 129, .1); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ctl-players[hidden] { display: none; }
.build-stage { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }

/* ---- Dashboard: one section per kind of server ---- */
.ctl-section { margin-bottom: 32px; }
.ctl-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--pill); vertical-align: 3px;
}
.ctl-none { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.ctl-none p { flex: 1; margin: 0; font-size: 14px; color: var(--text-2); }
.ctl-links { display: flex; gap: 12px; font-size: 13px; white-space: nowrap; }
.ctl-links a { color: var(--text-2); border-bottom: 1px solid var(--line-2); transition: color .25s, border-color .25s; }
.ctl-links a:hover { color: var(--brand-strong); border-bottom-color: var(--brand); }
.ctl-foot { margin: -12px 0 40px; }
@media (max-width: 560px) {
  .ctl-none { flex-wrap: wrap; }
  .ctl-none p { flex-basis: calc(100% - 54px); }
}

/* ---- Bots: connect step and service page ---- */
.bot-connect { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bot-token-row { display: flex; gap: 10px; align-items: center; }
.bot-token-row .f-input { flex: 1; min-width: 0; }
.bot-check { min-height: 1.4em; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.bot-check.is-ok { color: #0b8f7d; }
.bot-check.is-bad { color: #b45309; }
.bot-chats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bot-chats[hidden] { display: none; }
.bot-chat {
  display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; text-align: left;
  font-size: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); transition: border-color .25s;
}
.bot-chat:hover { border-color: var(--brand); }
.bot-chat span { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.kv-rows { display: grid; gap: 8px; margin: 10px 0; }
.kv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.bot-notes { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
[data-runtime][hidden], [data-git-fields][hidden] { display: none; }
@media (max-width: 560px) {
  .bot-connect { padding: 18px; }
  .bot-token-row { flex-wrap: wrap; }
  .kv-row { grid-template-columns: 1fr; }
}
