:root {
  color-scheme: dark;
  --ss-bg: #070908;
  --ss-panel: #111512;
  --ss-panel-2: #171c18;
  --ss-line: #29322c;
  --ss-text: #f4f7f5;
  --ss-muted: #9aa59e;
  --ss-green: #00ff88;
  --ss-green-soft: rgba(0, 255, 136, .11);
  --ss-red: #ff7783;
  --ss-shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ss-bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ss-text);
  background:
    radial-gradient(circle at 18% -10%, rgba(0, 255, 136, .13), transparent 34rem),
    radial-gradient(circle at 90% 24%, rgba(0, 118, 64, .09), transparent 30rem),
    var(--ss-bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ss-green); color: #031108; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.account-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(7, 9, 8, .84);
  backdrop-filter: blur(18px);
}
.account-nav-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.account-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; letter-spacing: .08em; }
.account-brand img { width: 34px; height: 34px; object-fit: contain; }
.account-brand span { color: var(--ss-green); }
.account-brand.nexus-brand img {
  width: clamp(132px, 18vw, 188px);
  height: 52px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}
.account-links { display: flex; align-items: center; gap: 8px; }
.account-links a, .account-links button { border: 0; background: transparent; color: var(--ss-muted); padding: 9px 12px; text-decoration: none; border-radius: 999px; }
.account-links a:hover, .account-links a:focus-visible, .account-links button:hover, .account-links button:focus-visible { color: var(--ss-text); background: rgba(255,255,255,.06); }

.account-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 96px; }
.account-shell.narrow { width: min(500px, calc(100% - 32px)); }
.eyebrow { margin: 0 0 10px; color: var(--ss-green); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 4.7rem); }
h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2.25rem); }
p.lead { color: #c3ccc6; font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 700px; }
.muted { color: var(--ss-muted); }

.glass-card {
  background: linear-gradient(145deg, rgba(24, 30, 26, .96), rgba(13, 17, 14, .94));
  border: 1px solid var(--ss-line);
  border-radius: 18px;
  box-shadow: var(--ss-shadow);
  padding: clamp(22px, 4vw, 36px);
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stack { display: grid; gap: 18px; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.hidden { display: none !important; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field span { color: #c7d0ca; font-size: .83rem; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--ss-line);
  background: #0b0e0c;
  color: var(--ss-text);
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(0,255,136,.35); border-color: var(--ss-green); }
.field small { margin-top: -2px; color: var(--ss-muted); font-size: .76rem; font-weight: 400; line-height: 1.45; }

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ss-green);
  border-radius: 999px;
  background: var(--ss-green);
  color: #021108;
  text-decoration: none;
  font-weight: 800;
}
.btn:hover { filter: brightness(.92); }
.btn:disabled { cursor: default; opacity: .55; }
.btn.secondary { color: var(--ss-text); background: transparent; border-color: var(--ss-line); }
.btn.secondary:hover { border-color: var(--ss-green); }
.btn.danger { color: #fff; background: #b82031; border-color: #e85665; }
.btn.danger:hover, .btn.danger:focus-visible { filter: none; background: #cf293b; border-color: #ff7783; }
.btn.danger:disabled:hover { background: #b82031; border-color: #e85665; }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: .86rem; }
.btn.apple { border-color: #fff; background: #fff; color: #000; }
.btn.apple svg { width: 17px; height: 17px; margin-top: -2px; }
.btn.google { margin-top: 10px; border-color: #c7cbd1; background: #fff; color: #202124; }
.btn.google:hover, .btn.google:focus-visible { border-color: #9aa0a6; background: #f8f9fa; filter: none; }
.btn.google svg { width: 18px; height: 18px; }
.social-auth { width: 100%; min-height: 46px; }
.text-button { display: block; margin: 12px auto 0; padding: 6px; border: 0; background: transparent; color: var(--ss-muted); text-decoration: underline; }
.text-button:hover, .text-button:focus-visible { color: var(--ss-text); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ss-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; height: 1px; flex: 1; background: var(--ss-line); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.pairing-section { display: grid; gap: 20px; }
.pairing-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.pairing-heading h2, .pairing-heading p { margin-top: 0; }
.pairing-heading .muted { margin-bottom: 0; }
.pairing-count { flex: 0 0 auto; color: var(--ss-green); font-size: .9rem; }
.pairing-members { display: grid; border-top: 1px solid var(--ss-line); }
.pairing-member { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; padding: 11px 0; border-bottom: 1px solid var(--ss-line); }
.pairing-member-email { min-width: 0; color: var(--ss-text); font-weight: 800; overflow-wrap: anywhere; }
.pairing-member-provider { flex: 0 0 auto; color: var(--ss-muted); font-size: .78rem; }
.pairing-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.pairing-form .field { margin: 0; }
.pairing-form .btn { min-height: 46px; }
.pairing-support { margin: 0; }
.pairing-dialog { width: min(620px, calc(100vw - 28px)); }
.pairing-preview-copy { margin: 0 0 8px; color: var(--ss-text); font-weight: 800; }

.notice { display: none; margin: 16px 0; padding: 12px 14px; border-radius: 10px; }
.notice.ok { display: block; color: #8dffc3; border: 1px solid rgba(0,255,136,.35); background: rgba(0,255,136,.08); }
.notice.error { display: block; color: #ffadb4; border: 1px solid rgba(255,119,131,.35); background: rgba(255,119,131,.08); }

.danger-eyebrow { color: var(--ss-red); }
.danger-copy { max-width: 780px; color: #e5bdc1; }
.danger-copy strong { color: #fff; }
.account-footer { margin-top: 24px; text-align: center; }
.account-footer-action { padding: 0; border: 0; background: transparent; color: inherit; text-decoration: underline; }
.account-footer-action:hover, .account-footer-action:focus-visible { color: var(--ss-text); }
.deleted-state { text-align: center; }
.deleted-state .lead { margin: 18px auto 26px; }
.delete-dialog { width: min(680px, calc(100vw - 28px)); }
.delete-dialog .dialog-section { padding-bottom: 0; }
.delete-dialog .dialog-section > .danger-copy { margin: 0 0 22px; color: #e5bdc1; font-size: .95rem; }
.danger-check { border-color: rgba(255, 119, 131, .32); background: rgba(255, 119, 131, .06); }
.danger-check input { accent-color: var(--ss-red); }

.status-pill { display: inline-flex; padding: 5px 10px; border: 1px solid rgba(0,255,136,.32); border-radius: 999px; color: var(--ss-green); background: var(--ss-green-soft); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.price-lockup { display: flex; align-items: baseline; gap: 14px; margin: 22px 0; }
.price-lockup s { color: var(--ss-muted); font-size: 1.25rem; }
.price-lockup strong { color: var(--ss-green); font-size: clamp(2.5rem, 8vw, 4.6rem); line-height: 1; }
.feature-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 11px; }
.feature-list li { position: relative; padding-left: 26px; color: #d0d7d2; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ss-green); font-weight: 900; }

.hero-nexus { padding: clamp(58px, 10vw, 112px) 0 50px; text-align: center; }
.nexus-hero-logo {
  display: block;
  width: min(820px, 100%);
  height: clamp(150px, 27vw, 260px);
  margin: 0 auto 34px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(94, 144, 255, .18);
}
.hero-nexus h1 span { color: var(--ss-green); }
.hero-nexus .lead { margin: 22px auto; }
.nexus-flow { margin-top: 44px; text-align: left; }
.instrument-grid { margin: 42px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.instrument { padding: 22px; border: 1px solid var(--ss-line); border-radius: 15px; background: rgba(17,21,18,.72); }
.instrument strong { color: var(--ss-green); display: block; margin-bottom: 6px; }

.admin-shell { width: min(1160px, calc(100% - 32px)); }
.pre-load { min-height: 55vh; display: grid; place-items: center; color: var(--ss-muted); }
.admin-console { display: grid; gap: 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-head h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.admin-head .muted { margin: 10px 0 0; }
.admin-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.stat { border: 1px solid var(--ss-line); border-radius: 13px; padding: 18px; background: linear-gradient(145deg, rgba(24, 30, 26, .96), rgba(13, 17, 14, .94)); box-shadow: 0 14px 36px rgba(0, 0, 0, .22); }
.stat span { display: block; color: var(--ss-muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 7px; font-size: 1.9rem; line-height: 1.1; }

.admin-panel { background: linear-gradient(145deg, rgba(24, 30, 26, .96), rgba(13, 17, 14, .94)); border: 1px solid var(--ss-line); border-radius: 18px; box-shadow: var(--ss-shadow); overflow: clip; }
.panel-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(21px, 4vw, 30px); cursor: pointer; list-style: none; }
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary-copy { min-width: 0; }
.panel-heading { display: block; color: var(--ss-text); font-size: clamp(1.12rem, 2.4vw, 1.4rem); font-weight: 800; letter-spacing: -.015em; }
.panel-description { display: block; margin-top: 4px; color: var(--ss-muted); font-size: .9rem; }
.panel-toggle { flex: 0 0 auto; min-width: 82px; padding: 6px 10px; border: 1px solid var(--ss-line); border-radius: 999px; color: var(--ss-muted); text-align: center; font-size: .72rem; font-weight: 800; }
.panel-toggle::before { content: "Expand"; }
.admin-panel[open] > .panel-summary { border-bottom: 1px solid var(--ss-line); }
.admin-panel[open] .panel-toggle::before { content: "Collapse"; }
.panel-summary:hover .panel-toggle { color: var(--ss-green); border-color: var(--ss-green); }
.panel-summary:focus-visible { outline: 2px solid var(--ss-green); outline-offset: -3px; }
.panel-content { padding: clamp(21px, 4vw, 30px); }
.admin-warning { margin: 0 0 18px; color: #b8c2bc; font-size: .88rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.codes-wrap { display: none; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--ss-line); }
.codes-wrap.show { display: block; }
.code-output { display: block; width: 100%; min-height: 120px; margin: 0 0 12px; resize: vertical; background: #070a08; color: var(--ss-green); border: 1px solid var(--ss-line); border-radius: 10px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-output:focus { outline: 2px solid rgba(0,255,136,.35); border-color: var(--ss-green); }

.create-account-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; padding: 16px; border: 1px solid rgba(0,255,136,.22); border-radius: 13px; background: rgba(0,255,136,.055); }
.create-account-row strong, .create-account-row span { display: block; }
.create-account-row span { margin-top: 2px; color: var(--ss-muted); font-size: .82rem; }
.user-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 170px auto; gap: 10px; align-items: end; margin-bottom: 20px; }
.user-tools .field { margin: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
.user-table { min-width: 920px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--ss-line); vertical-align: middle; font-size: .88rem; }
th { color: var(--ss-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.table-sort-button { display: inline-flex; align-items: center; gap: 7px; width: 100%; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-align: left; text-transform: inherit; letter-spacing: inherit; }
.table-sort-button::after { content: "↕"; color: #657169; font-size: .82rem; }
.table-sort-button:hover, .table-sort-button:focus-visible { color: var(--ss-green); }
.table-sort-button:focus-visible { outline: 2px solid rgba(0,255,136,.48); outline-offset: 3px; border-radius: 2px; }
th[aria-sort="ascending"] .table-sort-button::after { content: "↑"; color: var(--ss-green); }
th[aria-sort="descending"] .table-sort-button::after { content: "↓"; color: var(--ss-green); }
.user-primary { display: block; color: var(--ss-text); font-weight: 800; }
.user-secondary, .cell-note { display: block; margin-top: 3px; color: var(--ss-muted); font-size: .75rem; }
.empty-row { padding: 28px 12px; color: var(--ss-muted); text-align: center; }
.table-btn { min-height: 36px; padding: 6px 12px; border: 1px solid var(--ss-line); border-radius: 999px; background: transparent; color: var(--ss-text); font-weight: 700; white-space: nowrap; }
.table-btn:hover, .table-btn:focus-visible { color: var(--ss-green); border-color: var(--ss-green); }
.table-btn.danger { color: #ffadb4; border-color: rgba(255,119,131,.42); }
.table-btn:disabled { opacity: .45; cursor: default; }
.admin-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border: 1px solid var(--ss-line); border-radius: 999px; color: #c7d0ca; background: rgba(154,165,158,.1); font-size: .7rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.pill-admin { color: #92ffd0; border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.1); }
.pill-purchase, .pill-full { color: #fff0a8; border-color: rgba(255,214,91,.34); background: rgba(255,214,91,.1); }
.pill-promo, .pill-nexus { color: #c8b4ff; border-color: rgba(150,113,255,.34); background: rgba(150,113,255,.11); }
.pill-active { color: #92ffd0; border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.1); }
.pill-revoked, .pill-expired { color: #ffadb4; border-color: rgba(255,119,131,.35); background: rgba(255,119,131,.09); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; }
.pagination-status { color: var(--ss-muted); font-size: .82rem; }
.pagination-actions { display: flex; gap: 8px; }
.account-state { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; }
.account-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ss-green); }
.account-state.warning::before { background: #ffd65b; }

.support-account-callout { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(22px, 4vw, 34px); border: 1px solid rgba(0,255,136,.24); border-radius: 18px; background: rgba(0,255,136,.055); }
.support-account-callout h2, .support-account-callout p { margin-top: 0; }
.support-account-callout .muted { margin-bottom: 0; }

.support-shell { width: min(1180px, calc(100% - 32px)); }
.support-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 26px 60px; align-items: end; padding: 14px 0 30px; }
.support-intro h1 { max-width: 760px; font-size: clamp(2.65rem, 7vw, 5.4rem); }
.support-intro .lead { margin: 0; }
.support-intro #identity { grid-column: 1 / -1; margin: -12px 0 0; }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.support-form-card { padding: clamp(24px, 4vw, 42px); }
.section-heading { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--ss-line); }
.section-heading .muted { margin: 9px 0 0; }
.support-form-grid { gap: 0 16px; }
.environment-group { margin: 2px 0 22px; padding: 20px; border: 1px solid var(--ss-line); border-radius: 14px; background: rgba(7,9,8,.54); }
.environment-group h3 { margin: 0; font-size: 1rem; }
.environment-group > p { margin: 5px 0 17px; color: var(--ss-muted); font-size: .8rem; }
.environment-group .field { margin-bottom: 0; }
.file-field input[type="file"] { padding: 12px; }
.file-field input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 13px; border: 1px solid var(--ss-line); border-radius: 999px; background: var(--ss-panel-2); color: var(--ss-text); font-weight: 700; }
.file-summary { color: var(--ss-green); font-size: .76rem; }
.support-submit-row { display: flex; align-items: center; gap: 18px; padding-top: 8px; }
.support-submit-row .muted { margin: 0; max-width: 440px; font-size: .8rem; }
.support-confirmation { margin-top: 30px; padding: 24px; border: 1px solid rgba(0,255,136,.38); border-radius: 14px; background: rgba(0,255,136,.075); }
.support-confirmation:focus { outline: 2px solid var(--ss-green); outline-offset: 3px; }
.support-confirmation h2 { font-size: 1.45rem; }
.support-confirmation p:not(.eyebrow) { color: #c7d0ca; }
.support-guide { position: sticky; top: 96px; padding: 26px 0 26px 26px; border-left: 1px solid var(--ss-line); }
.support-guide h2 { font-size: 1.65rem; }
.support-guide ol { list-style: none; counter-reset: guide; margin: 28px 0; padding: 0; display: grid; gap: 24px; }
.support-guide li { position: relative; counter-increment: guide; padding-left: 42px; }
.support-guide li::before { content: counter(guide); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(0,255,136,.4); border-radius: 50%; color: var(--ss-green); font-size: .75rem; font-weight: 800; }
.support-guide strong, .support-guide span { display: block; }
.support-guide span { margin-top: 4px; color: var(--ss-muted); font-size: .84rem; }
.support-privacy-note { padding: 15px; border: 1px solid rgba(255,214,91,.25); border-radius: 11px; color: #d6ca97; background: rgba(255,214,91,.055); font-size: .78rem; }
.support-history { padding-top: 52px; }
.history-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 20px; }
.ticket-history { display: grid; gap: 12px; }
.ticket-card { border: 1px solid var(--ss-line); border-radius: 14px; background: rgba(15,19,16,.88); overflow: clip; }
.ticket-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 21px; cursor: pointer; list-style: none; }
.ticket-summary::-webkit-details-marker { display: none; }
.ticket-summary-main { min-width: 0; }
.ticket-summary-main strong, .ticket-summary-main span { display: block; overflow-wrap: anywhere; }
.ticket-summary-main span { margin-top: 4px; color: var(--ss-muted); font-size: .76rem; }
.support-status { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--ss-line); border-radius: 999px; color: #c7d0ca; font-size: .7rem; font-weight: 800; }
.status-received { color: #c8b4ff; border-color: rgba(150,113,255,.35); background: rgba(150,113,255,.1); }
.status-in_review { color: #fff0a8; border-color: rgba(255,214,91,.35); background: rgba(255,214,91,.08); }
.status-waiting_on_response { color: #ffbe95; border-color: rgba(255,150,88,.35); background: rgba(255,150,88,.08); }
.status-resolved { color: #92ffd0; border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.09); }
.ticket-body { padding: 22px; border-top: 1px solid var(--ss-line); }
.ticket-resolution { margin: 0 0 18px; color: var(--ss-green); font-weight: 800; }
.ticket-comments { display: grid; gap: 10px; margin: 0 0 18px; }
.ticket-comments h3 { margin: 0; color: #e7eee9; font-size: .94rem; }
.ticket-comment { padding: 15px; border: 1px solid rgba(0,255,136,.22); border-radius: 11px; background: rgba(0,255,136,.045); }
.ticket-comment strong, .ticket-comment time { display: block; }
.ticket-comment p { margin: 7px 0; color: #dce6df; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.6; }
.ticket-comment time { color: var(--ss-muted); font-size: .72rem; }
.ticket-comment.customer { border-color: rgba(150,113,255,.28); background: rgba(150,113,255,.06); }
.ticket-reply-form { margin: 0 0 18px; padding: 18px; border: 1px solid rgba(255,150,88,.3); border-radius: 12px; background: rgba(255,150,88,.055); }
.ticket-reply-form h3 { margin: 0; font-size: 1rem; }
.ticket-response-deadline { margin: 6px 0 16px; color: #ffbe95; font-size: .82rem; }
.ticket-reply-form .field { margin-bottom: 12px; }
.ticket-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0; }
.ticket-detail { min-width: 0; padding: 13px; border: 1px solid var(--ss-line); border-radius: 10px; background: #0b0e0c; }
.ticket-detail dt { color: var(--ss-muted); font-size: .72rem; font-weight: 800; }
.ticket-detail dd { margin: 5px 0 0; color: #d6ddd8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
.ticket-sync-warning, .ticket-retry-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 17px; padding: 13px; border: 1px solid rgba(255,214,91,.28); border-radius: 10px; background: rgba(255,214,91,.05); }
.ticket-sync-warning p { margin: 0; color: #d6ca97; font-size: .82rem; }
.ticket-retry-row input { min-width: 0; color: var(--ss-muted); font-size: .78rem; }
.ticket-attachment { color: #9ceec2; font-size: .82rem; }
.ticket-updated { margin: 18px 0 0; color: var(--ss-muted); font-size: .74rem; }
.empty-support-history { padding: 30px; border: 1px dashed var(--ss-line); border-radius: 14px; color: var(--ss-muted); text-align: center; }

.support-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.support-admin-stats .stat { padding: 14px 16px; box-shadow: none; }
.support-admin-stats .stat strong { font-size: 1.55rem; }
.support-tools { display: grid; grid-template-columns: minmax(280px, 1fr) 210px auto; gap: 10px; align-items: end; margin-bottom: 20px; }
.support-tools .field { margin: 0; }
.support-ticket-table { min-width: 880px; }
.table-link { color: var(--ss-green); font-weight: 800; }
.sync-state { color: var(--ss-muted); font-size: .78rem; }
.sync-state.error { color: #ffadb4; }
.support-dialog { width: min(980px, calc(100vw - 28px)); }
.support-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.support-report-grid .detail-card.full { grid-column: 1 / -1; }
.support-report-copy { display: grid; gap: 12px; margin-top: 18px; }
.support-report-block { padding: 17px; border: 1px solid var(--ss-line); border-radius: 11px; background: #0b0e0c; }
.support-report-block h4 { margin: 0 0 7px; color: var(--ss-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.support-report-block p { margin: 0; color: #d6ddd8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.6; }
.support-screenshot-frame:has(.support-screenshot:not([hidden])) { margin-top: 16px; padding: 12px; border: 1px solid var(--ss-line); border-radius: 12px; background: #070a08; }
.support-screenshot { display: block; width: auto; max-width: 100%; max-height: min(68vh, 720px); margin: 0 auto; object-fit: contain; border-radius: 7px; }
.support-screenshot[hidden] { display: none; }
.support-admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.user-dialog { position: fixed; inset: 0; width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 28px); margin: auto; padding: 0; overflow: auto; color: var(--ss-text); background: var(--ss-panel); border: 1px solid var(--ss-line); border-radius: 18px; box-shadow: 0 30px 110px rgba(0,0,0,.72); }
.user-dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(5px); }
.dialog-shell { padding: clamp(21px, 4vw, 34px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--ss-line); }
.dialog-head h2 { font-size: 1.55rem; }
.dialog-head p { margin: 5px 0 0; color: var(--ss-muted); overflow-wrap: anywhere; }
.dialog-close { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--ss-line); border-radius: 50%; background: transparent; color: var(--ss-text); font-size: 1.25rem; line-height: 1; }
.dialog-close:hover, .dialog-close:focus-visible { color: var(--ss-green); border-color: var(--ss-green); }
.dialog-loading { min-height: 320px; display: grid; place-items: center; padding: 30px; color: var(--ss-muted); text-align: center; }
.dialog-loading[hidden] { display: none; }
.dialog-section { padding: 26px 0; border-bottom: 1px solid var(--ss-line); }
.dialog-section:last-child { padding-bottom: 0; border-bottom: 0; }
.dialog-section h3 { margin: 0; font-size: 1.08rem; }
.dialog-section > p { margin: 6px 0 20px; color: var(--ss-muted); font-size: .86rem; }
.check-field { display: flex; align-items: flex-start; gap: 11px; margin: 3px 0 18px; padding: 13px 14px; border: 1px solid var(--ss-line); border-radius: 11px; background: #0b0e0c; cursor: pointer; }
.check-field.full { grid-column: 1 / -1; }
.check-field input { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ss-green); }
.check-field span, .check-field strong, .check-field small { display: block; }
.check-field small { margin-top: 2px; color: var(--ss-muted); font-size: .76rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-card { min-width: 0; padding: 14px; border: 1px solid var(--ss-line); border-radius: 11px; background: #0b0e0c; }
.detail-card.full { grid-column: 1 / -1; }
.detail-card span { display: block; margin-bottom: 4px; color: var(--ss-muted); font-size: .73rem; font-weight: 700; }
.detail-card strong { display: block; overflow-wrap: anywhere; }
.password-reset-tools { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; margin-top: 18px; }
.password-reset-option { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--ss-line); border-radius: 11px; background: #0b0e0c; }
.password-reset-option h4 { margin: 0; font-size: .95rem; }
.password-reset-option > p { margin: 6px 0 15px; color: var(--ss-muted); font-size: .78rem; line-height: 1.5; }
.password-reset-option .form-grid { grid-template-columns: 1fr; }
.password-reset-option .field { margin-bottom: 12px; }
.password-reset-policy { display: grid; gap: 8px; margin: 2px 0 14px; padding: 0; border: 0; }
.password-reset-policy legend { margin-bottom: 8px; color: var(--ss-muted); font-size: .73rem; font-weight: 700; }
.radio-field { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--ss-line); border-radius: 9px; cursor: pointer; }
.radio-field:has(input:checked) { border-color: rgba(0,255,136,.42); background: rgba(0,255,136,.055); }
.radio-field input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--ss-green); }
.radio-field span, .radio-field strong, .radio-field small { display: block; }
.radio-field strong { font-size: .8rem; }
.radio-field small { margin-top: 2px; color: var(--ss-muted); font-size: .72rem; line-height: 1.4; }
.security-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.account-auth-protection { margin: 13px 0 0; color: #d6ca97; font-size: .8rem; }
.admin-delete-account { margin-top: 18px; padding: 18px; border: 1px solid rgba(232,86,101,.38); border-radius: 12px; background: rgba(184,32,49,.08); }
.admin-delete-account h4 { margin: 0 0 7px; color: #ffadb4; font-size: 1rem; }
.admin-delete-account p { margin: 7px 0 14px; color: #d7c7c9; font-size: .82rem; line-height: 1.55; }
.admin-delete-account .field { margin-bottom: 10px; }
.pairing-admin-summary { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 230px) auto; align-items: end; gap: 12px; margin-bottom: 14px; }
.pairing-admin-summary > strong { align-self: center; font-size: .9rem; }
.pairing-limit-field input { min-height: 42px; }
.pairing-admin-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin: 18px 0 8px; padding-top: 18px; border-top: 1px solid var(--ss-line); }
.pairing-admin-form .field { margin: 0; }
.pairing-admin-form .btn { min-height: 46px; }
.pairing-admin-help { margin: 0 0 14px; color: var(--ss-muted); font-size: .78rem; line-height: 1.55; }
.history-list { display: grid; gap: 9px; }
.history-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; border: 1px solid var(--ss-line); border-radius: 11px; background: #0b0e0c; }
.history-row strong, .history-row small { display: block; }
.history-row small, .history-date, .empty-history { color: var(--ss-muted); font-size: .76rem; }
.support-comment-event small { color: #d6ddd8; white-space: pre-wrap; line-height: 1.5; }
.email-diagnostics { margin-top: 14px; }
.email-diagnostic-row { align-items: flex-start; }
.email-diagnostic-row small { color: #d6ddd8; white-space: pre-wrap; line-height: 1.55; }
.email-diagnostic-row.email-status-sent { border-color: rgba(99, 214, 147, .42); }
.email-diagnostic-row.email-status-failed { border-color: rgba(232, 86, 101, .48); }
.email-diagnostic-row.email-status-queued { border-color: rgba(214, 202, 151, .38); }
.history-date { flex: 0 0 auto; text-align: right; }
.empty-history { margin: 0; padding: 14px; border: 1px dashed var(--ss-line); border-radius: 11px; }

@media (max-width: 760px) {
  .account-links .optional { display: none; }
  .account-shell { padding-top: 48px; }
  .grid, .instrument-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .support-admin-stats { grid-template-columns: 1fr 1fr; }
  .split { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .password-reset-tools { grid-template-columns: 1fr; }
  .form-grid .field.full, .form-actions, .check-field.full { grid-column: auto; }
  .user-tools { grid-template-columns: 1fr 1fr; }
  .support-tools { grid-template-columns: 1fr 1fr; }
  .support-tools .search { grid-column: 1 / -1; }
  .user-tools .search { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .pairing-admin-summary { grid-template-columns: 1fr; align-items: stretch; }
  .pairing-admin-form { grid-template-columns: 1fr; align-items: stretch; }
  .support-report-grid { grid-template-columns: 1fr; }
  .support-report-grid .detail-card.full { grid-column: auto; }
  .detail-card.full { grid-column: auto; }
  .history-row { align-items: flex-start; flex-direction: column; }
  .history-date { text-align: left; }
  .support-intro, .support-layout { grid-template-columns: 1fr; }
  .support-intro #identity { grid-column: auto; }
  .support-guide { position: static; padding: 26px 0 0; border-top: 1px solid var(--ss-line); border-left: 0; }
  .ticket-details { grid-template-columns: 1fr; }
  .support-account-callout, .support-submit-row, .ticket-sync-warning, .ticket-retry-row { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .admin-stats, .support-admin-stats, .support-tools, .user-tools { grid-template-columns: 1fr; }
  .create-account-row { align-items: stretch; flex-direction: column; }
  .user-tools .search { grid-column: auto; }
  .support-tools .search { grid-column: auto; }
  .panel-toggle { min-width: 34px; width: 34px; height: 34px; padding: 0; font-size: 0; }
  .panel-toggle::before { content: "+"; font-size: 1rem; line-height: 32px; }
  .admin-panel[open] .panel-toggle::before { content: "−"; }
}
