:root {
  color-scheme: dark;
  --bg: #06100c;
  --bg-deep: #030806;
  --surface: rgba(12, 28, 21, 0.72);
  --surface-solid: #0c1b15;
  --surface-soft: rgba(19, 43, 33, 0.58);
  --surface-light: rgba(240, 248, 243, 0.94);
  --line: rgba(157, 225, 197, 0.13);
  --line-strong: rgba(157, 225, 197, 0.24);
  --text: #edf7f1;
  --muted: #8fa99a;
  --muted-2: #647c6f;
  --emerald: #18b783;
  --emerald-bright: #52e2ac;
  --emerald-dark: #0b7050;
  --amber: #e7bd65;
  --danger: #ec7a78;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "IBM Plex Mono", Consolas, monospace;
  --shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  --radius-lg: 30px;
  --radius: 20px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg-deep); overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -10%, rgba(16, 123, 87, 0.17), transparent 40%),
    radial-gradient(circle at 95% 110%, rgba(18, 98, 73, 0.15), transparent 42%),
    linear-gradient(145deg, #07140f 0%, #040a08 65%, #06100c 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

::selection { color: #02120c; background: var(--emerald-bright); }

:focus-visible {
  outline: 2px solid var(--emerald-bright);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(1px);
}

.ambient-one {
  width: min(54vw, 820px);
  aspect-ratio: 1;
  top: -38vw;
  right: -15vw;
  background: radial-gradient(circle, rgba(27, 184, 130, 0.12), transparent 66%);
}

.ambient-two {
  width: min(48vw, 720px);
  aspect-ratio: 1;
  bottom: -34vw;
  left: -18vw;
  background: radial-gradient(circle, rgba(19, 120, 87, 0.12), transparent 67%);
}

.noise {
  position: fixed;
  z-index: 1;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.eyebrow {
  margin: 0;
  color: var(--emerald-bright);
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 600 19px/1 var(--display);
  letter-spacing: -0.04em;
}

.account-brand svg { width: 27px; height: 27px; overflow: visible; }
.account-brand svg circle:first-child { fill: none; stroke: var(--emerald); stroke-width: 1.7; }
.account-brand .brand-core { fill: var(--emerald); filter: drop-shadow(0 0 7px rgba(41, 213, 154, 0.8)); }
.account-brand em { color: var(--emerald-bright); font-family: var(--serif); font-weight: 500; }

.quiet-link {
  color: var(--muted);
  font-size: 13px;
  transition: color 180ms ease;
}
.quiet-link:hover { color: var(--text); }

.primary-button,
.soft-button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.primary-button {
  position: relative;
  min-height: 52px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 14px;
  color: #ecfff7;
  background: linear-gradient(135deg, #0c7654, #12a675 70%, #19b783);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16), 0 16px 40px rgba(3, 91, 62, 0.26);
  font-weight: 600;
  overflow: hidden;
}

.primary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.15) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.primary-button:hover { transform: translateY(-2px); }
.primary-button:hover::before { transform: translateX(120%); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: wait; opacity: 0.62; transform: none; }
.primary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.soft-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: rgba(17, 45, 34, 0.62);
  font-size: 13px;
  font-weight: 600;
}
.soft-button:hover { border-color: rgba(82, 226, 172, 0.48); background: rgba(23, 67, 49, 0.72); }

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 31, 23, 0.72);
}
.icon-button:hover { border-color: var(--line-strong); background: rgba(23, 61, 45, 0.7); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.field { display: grid; gap: 9px; }
.field > span { color: #c8d9cf; font-size: 12px; font-weight: 500; }
.field small { color: var(--muted-2); font-size: 11px; line-height: 1.5; }
.field code { color: var(--emerald-bright); font-family: var(--mono); }

.field input,
.field textarea,
.promo-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(4, 14, 10, 0.7);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.field input,
.promo-field input { height: 50px; padding: 0 15px; }
.field textarea { padding: 15px; resize: vertical; min-height: 180px; line-height: 1.65; }
.field input::placeholder, .field textarea::placeholder, .promo-field input::placeholder { color: #597064; }
.field input:focus, .field textarea:focus, .promo-field input:focus { border-color: rgba(82, 226, 172, 0.58); background: rgba(6, 20, 14, 0.84); box-shadow: 0 0 0 4px rgba(24, 183, 131, 0.08); }

.form-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.form-message.is-error { color: #f09a97; }
.form-message.is-success { color: var(--emerald-bright); }

/* Authentication */
.auth-page { overflow-x: hidden; }

.auth-header {
  position: relative;
  z-index: 3;
  width: min(1320px, calc(100% - 56px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 56px));
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  padding: 34px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.7fr);
  gap: clamp(54px, 8vw, 130px);
  align-items: center;
}

.auth-story { position: relative; min-height: 610px; padding: 56px 0; display: flex; flex-direction: column; justify-content: center; }
.auth-story h1 { margin: 0 0 22px; max-width: 760px; font: 500 clamp(66px, 7.7vw, 116px)/0.82 var(--serif); letter-spacing: -0.055em; }
.auth-story h1 em { color: var(--emerald-bright); font-weight: 500; }
.auth-lede { width: min(540px, 80%); margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }


.lens-orbit { position: absolute; width: min(36vw, 500px); aspect-ratio: 1; right: -9%; bottom: -14%; opacity: 0.55; pointer-events: none; }
.lens-ring { position: absolute; inset: 0; border: 1px solid rgba(89, 221, 170, 0.13); border-radius: 50%; animation: orbit 16s linear infinite; }
.lens-ring-a::after, .lens-ring-b::after { content: ""; position: absolute; width: 7px; height: 7px; top: 11%; left: 24%; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 18px var(--emerald); }
.lens-ring-b { inset: 17%; animation-duration: 11s; animation-direction: reverse; }
.lens-ring-b::after { top: auto; left: auto; right: 2%; bottom: 25%; width: 4px; height: 4px; }
.lens-core { position: absolute; inset: 32%; border: 1px solid rgba(126, 255, 207, 0.2); border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(205, 255, 237, 0.26), rgba(28, 172, 120, 0.11) 42%, rgba(3, 20, 13, 0.1) 70%); box-shadow: inset 0 0 40px rgba(78, 235, 176, 0.14), 0 0 60px rgba(11, 128, 85, 0.12); backdrop-filter: blur(14px); }
.lens-core span { position: absolute; inset: 43%; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 26px var(--emerald); }

@keyframes orbit { to { transform: rotate(360deg); } }

.auth-card {
  position: relative;
  padding: 11px 34px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17, 41, 31, 0.8), rgba(7, 20, 14, 0.82));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(120, 242, 195, 0.45), transparent); }
.auth-tabs { margin: 0 -22px 30px; padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; border-radius: 18px; background: rgba(2, 10, 7, 0.5); }
.auth-tab { min-height: 43px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 600; transition: 180ms ease; }
.auth-tab.is-active { color: var(--text); background: rgba(23, 57, 43, 0.82); box-shadow: inset 0 1px rgba(255, 255, 255, 0.04); }
.auth-panel h2 { margin: 4px 0 25px; font: 500 39px/1 var(--serif); letter-spacing: -0.025em; }
.auth-panel form { display: grid; gap: 16px; }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-legal { margin: 20px 4px 4px; color: var(--muted-2); font-size: 10px; line-height: 1.55; text-align: center; }

/* Dashboard shell */
.dashboard-page { min-height: 100vh; }
.dashboard-loading { position: fixed; z-index: 20; inset: 0; display: grid; place-content: center; justify-items: center; gap: 28px; background: var(--bg-deep); }
.loading-mark { position: relative; width: 82px; height: 82px; }
.loading-mark i { position: absolute; inset: 0; border: 1px solid rgba(82, 226, 172, 0.27); border-radius: 50%; animation: loading-ring 2s ease-in-out infinite; }
.loading-mark i:nth-child(2) { inset: 12px; animation-delay: -0.7s; }
.loading-mark span { position: absolute; inset: 34px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 25px rgba(82, 226, 172, 0.8); }
@keyframes loading-ring { 50% { transform: scale(0.84); opacity: 0.35; } }

.dashboard-root { position: relative; z-index: 2; min-height: 100vh; }
.dash-header { height: 78px; padding: 0 clamp(18px, 3vw, 46px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(4, 13, 9, 0.7); backdrop-filter: blur(22px); }
.header-center { justify-self: center; display: flex; align-items: center; gap: 12px; }
.edition-label { color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: 0.15em; text-transform: uppercase; }
.service-pill { min-height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; background: rgba(11, 31, 22, 0.78); }
.service-pill i, .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px currentColor; }
.service-pill b { color: #b7cbbf; font: 500 9px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.service-pill.is-live i { background: var(--emerald-bright); }
.service-pill.is-stopped i { background: var(--muted-2); box-shadow: none; }
.service-pill.is-error i { background: var(--danger); }

.account-menu { position: relative; justify-self: end; }
.account-trigger { min-width: 194px; padding: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; text-align: left; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(82, 226, 172, 0.2); border-radius: 11px; color: var(--emerald-bright); background: linear-gradient(145deg, rgba(31, 104, 76, 0.5), rgba(10, 43, 30, 0.6)); font: 600 13px/1 var(--display); }
.account-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.account-copy b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted-2); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-trigger > svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.account-popover { position: absolute; z-index: 20; top: calc(100% + 13px); right: 0; width: 190px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(8, 23, 16, 0.97); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42); backdrop-filter: blur(20px); }
.account-popover a, .account-popover button { width: 100%; height: 38px; padding: 0 11px; display: flex; align-items: center; border: 0; border-radius: 9px; color: #c2d4c9; background: none; cursor: pointer; font-size: 12px; }
.account-popover a:hover, .account-popover button:hover { color: var(--text); background: rgba(45, 97, 73, 0.28); }

.full-view { width: min(1260px, calc(100% - 56px)); min-height: calc(100vh - 78px); margin: 0 auto; }

/* Purchase */
.purchase-view { position: relative; padding: 78px 0 90px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 0.56fr); gap: clamp(60px, 8vw, 130px); align-items: center; }
.purchase-copy { position: relative; z-index: 2; }
.purchase-copy h1 { margin: 0 0 24px; font: 500 clamp(76px, 9.3vw, 142px)/0.78 var(--serif); letter-spacing: -0.055em; }
.purchase-copy h1 em { color: var(--emerald-bright); font-weight: 500; }
.purchase-lede { max-width: 570px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }

.purchase-lens { position: absolute; z-index: 0; width: min(52vw, 760px); aspect-ratio: 1; left: 26%; top: 47%; transform: translate(-50%, -50%); opacity: 0.58; pointer-events: none; }
.pl-orbit { position: absolute; inset: 0; border: 1px solid rgba(89, 221, 170, 0.09); border-radius: 50%; }
.pl-orbit::before, .pl-orbit::after { content: ""; position: absolute; inset: 13%; border: inherit; border-radius: inherit; }
.pl-orbit::after { inset: 27%; }
.pl-glass { position: absolute; inset: 34%; border: 1px solid rgba(125, 255, 206, 0.18); border-radius: 50%; background: radial-gradient(circle at 34% 28%, rgba(214, 255, 238, 0.25), rgba(31, 179, 125, 0.1) 40%, transparent 70%); box-shadow: 0 0 90px rgba(13, 137, 93, 0.13), inset 0 0 45px rgba(69, 237, 175, 0.1); backdrop-filter: blur(12px); }
.pl-glass span { position: absolute; inset: 44%; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 24px var(--emerald); }

.checkout-card { position: relative; z-index: 2; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: linear-gradient(150deg, rgba(22, 50, 39, 0.84), rgba(7, 20, 14, 0.88)); box-shadow: var(--shadow); backdrop-filter: blur(24px); }
.checkout-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 35%); }
.checkout-top { position: relative; z-index: 1; padding-bottom: 26px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.checkout-top > span { font: 500 35px/1 var(--serif); }
.checkout-price { display: grid; justify-items: end; gap: 4px; }
.checkout-price del { color: var(--muted-2); font: 500 13px/1 var(--mono); text-decoration-thickness: 1px; }
.checkout-top strong { display: flex; align-items: baseline; gap: 5px; font: 500 36px/1 var(--display); letter-spacing: -0.05em; }
.checkout-top small { color: var(--muted); font: 500 10px/1 var(--mono); letter-spacing: 0; }
.promo-field { position: relative; z-index: 1; margin-top: 22px; display: grid; gap: 8px; }
.promo-field > span { color: #c8d9cf; font-size: 11px; }
.promo-field > div { position: relative; }
.promo-field input { padding-right: 105px; text-transform: uppercase; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.promo-field button { position: absolute; top: 50%; right: 8px; min-width: 88px; height: 30px; padding: 0 10px; transform: translateY(-50%); border: 0; border-radius: 8px; color: #c8d9cf; background: rgba(255, 255, 255, 0.04); cursor: pointer; font: 600 10px/1 var(--sans); }
.promo-field button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.promo-field button:disabled { opacity: .55; cursor: wait; }
.promo-result { position: relative; z-index: 1; margin-top: 10px; color: var(--emerald-bright); font-size: 11px; }
.promo-result.is-error { color: var(--danger); }
.checkout-button { position: relative; z-index: 1; width: 100%; margin-top: 14px; }
.pending-payment { position: relative; z-index: 1; margin: 18px 0 0; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.pending-payment > div { min-width: 0; display: grid; gap: 4px; }
.pending-payment span { color: var(--muted); font-size: 10px; }
.pending-payment strong { color: var(--text); font-size: 12px; font-weight: 600; }
.pending-payment .payment-link { flex: 0 0 auto; color: var(--emerald-bright); font-size: 10px; font-weight: 600; }
.pending-payment .payment-link:hover { color: #dcf8eb; }
.owner-tool { position: relative; z-index: 1; width: 100%; margin-top: 9px; padding: 11px 16px; border: 1px solid rgba(101, 232, 181, 0.2); border-radius: 12px; color: #bce5d2; background: rgba(45, 212, 191, 0.05); font: 500 10px/1.3 var(--mono); letter-spacing: 0.04em; cursor: pointer; transition: border-color 180ms ease, background 180ms ease, color 180ms ease; }
.owner-tool:hover { border-color: rgba(101, 232, 181, 0.42); color: #e4f7ed; background: rgba(45, 212, 191, 0.1); }
.owner-tool:focus-visible { outline: 2px solid var(--emerald-bright); outline-offset: 3px; }
.checkout-card .form-message { position: relative; z-index: 1; margin-top: 5px; text-align: center; }

/* Telegram setup */
.setup-view { padding: 72px 0 90px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.66fr); gap: clamp(60px, 9vw, 150px); align-items: center; }
.setup-hero h1 { margin: 0 0 23px; font: 500 clamp(76px, 9vw, 136px)/0.78 var(--serif); letter-spacing: -0.055em; }
.setup-hero h1 em { color: var(--emerald-bright); font-weight: 500; }
.setup-hero > p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.setup-guide { margin: 37px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.setup-guide li { padding: 15px 0; display: flex; gap: 14px; border-bottom: 1px solid var(--line); color: #b8ccc0; font-size: 12px; }
.setup-guide span { color: var(--emerald-bright); font: 500 9px/1.7 var(--mono); }
.qr-card { padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(20, 47, 36, 0.82), rgba(6, 19, 13, 0.9)); box-shadow: var(--shadow); text-align: center; }
.qr-frame { min-height: 308px; padding: 22px; display: grid; place-items: center; border: 1px solid rgba(209, 255, 237, 0.14); border-radius: 22px; background: #eef7f1; overflow: hidden; }
.qr-frame svg { width: min(100%, 264px); height: auto; }
.qr-placeholder { display: grid; justify-items: center; gap: 15px; color: #557266; }
.qr-placeholder span { width: 72px; height: 72px; border: 1px solid rgba(9, 91, 62, 0.18); border-radius: 50%; background: radial-gradient(circle, rgba(19, 146, 99, 0.16), transparent 65%); }
.qr-placeholder p { margin: 0; font-size: 11px; }
.qr-state { margin: 14px 0 17px; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.qr-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 9px var(--emerald); }
.qr-card .primary-button { width: 100%; }
.password-form { margin-top: 17px; display: grid; gap: 12px; text-align: left; }

/* Main app */
.app-view { min-height: calc(100vh - 78px); display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.side-nav { position: sticky; top: 0; height: calc(100vh - 78px); padding: 28px 17px 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: rgba(4, 14, 9, 0.46); }
.side-nav nav { display: grid; gap: 5px; }
.side-link { width: 100%; min-height: 45px; padding: 0 13px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 12px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: 12px; transition: 180ms ease; }
.side-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.side-link b { min-width: 21px; height: 20px; display: grid; place-items: center; border-radius: 7px; background: rgba(100, 156, 131, 0.12); color: var(--muted); font: 500 9px/1 var(--mono); }
.side-link:hover { color: #c6d9cd; background: rgba(30, 67, 51, 0.25); }
.side-link.is-active { color: var(--text); border-color: var(--line); background: linear-gradient(100deg, rgba(29, 78, 57, 0.55), rgba(18, 49, 36, 0.28)); box-shadow: inset 3px 0 var(--emerald); }
.side-link.is-active svg { color: var(--emerald-bright); }
.side-plan { padding: 14px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 14px; background: rgba(14, 38, 27, 0.55); }
.side-plan strong { font-size: 12px; }
.side-plan small { color: var(--muted-2); font-size: 9px; }
.side-plan button { margin-top: 5px; padding: 6px 0 0; border: 0; border-top: 1px solid var(--line); color: var(--emerald-bright); background: none; cursor: pointer; font-size: 9px; text-align: left; }

.workspace { min-width: 0; padding: 46px clamp(24px, 4vw, 62px) 80px; }
.workspace-page { width: min(1240px, 100%); margin: 0 auto; }
.page-heading { margin-bottom: 34px; display: flex; justify-content: space-between; align-items: end; gap: 28px; }
.page-heading h1 { margin: 0; font: 500 clamp(42px, 5vw, 66px)/0.95 var(--serif); letter-spacing: -0.035em; }
.page-heading h1 em { color: var(--emerald-bright); font-weight: 500; }
.service-controls { display: flex; align-items: center; gap: 9px; }
.service-controls .soft-button { display: flex; align-items: center; gap: 9px; }
.service-controls .soft-button i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 9px rgba(82, 226, 172, 0.7); }

.setup-banner { margin-bottom: 20px; padding: 19px 21px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid rgba(231, 189, 101, 0.24); border-radius: var(--radius); background: linear-gradient(100deg, rgba(105, 79, 25, 0.18), rgba(25, 48, 37, 0.5)); }
.setup-banner h2 { margin: 0; font: 500 24px/1 var(--serif); }

.metric-grid { display: grid; grid-template-columns: 1.55fr repeat(3, 1fr); gap: 13px; }
.metric-toolbar { margin: -17px 2px 10px; display: flex; justify-content: flex-end; gap: 15px; color: var(--muted-2); font-size: 9px; }
.metric-toolbar button { border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 9px; }
.metric-toolbar button:hover { color: var(--emerald-bright); }
.metric, .panel, .session-row { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(18, 42, 32, 0.66), rgba(7, 20, 14, 0.76)); box-shadow: inset 0 1px rgba(255, 255, 255, 0.02); }
.metric { position: relative; min-height: 155px; padding: 20px; border-radius: var(--radius); overflow: hidden; }
.metric > span, .metric-top span { color: var(--muted); font-size: 10px; }
.metric > strong { margin: 24px 0 7px; display: block; font: 500 clamp(32px, 4vw, 48px)/1 var(--display); letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.metric > small { color: var(--muted-2); font-size: 9px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; }
.metric-uptime { background: linear-gradient(145deg, rgba(20, 76, 54, 0.55), rgba(6, 26, 17, 0.82)); }
.metric-uptime .live-dot { background: var(--emerald-bright); }
.uptime-wave { position: absolute; right: 13px; bottom: 20px; height: 48px; display: flex; align-items: end; gap: 3px; opacity: 0.34; }
.uptime-wave i { width: 2px; height: 15px; border-radius: 5px; background: var(--emerald-bright); animation: wave 1.8s ease-in-out infinite; transform-origin: bottom; }
.uptime-wave i:nth-child(3n) { animation-delay: -.55s; height: 27px; }
.uptime-wave i:nth-child(4n) { animation-delay: -.9s; height: 39px; }
.uptime-wave i:nth-child(5n) { animation-delay: -1.2s; height: 22px; }
@keyframes wave { 50% { transform: scaleY(.36); opacity: .42; } }

.overview-grid { margin-top: 13px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .75fr); gap: 13px; }
.panel { border-radius: var(--radius); }
.activity-panel, .health-panel, .form-panel, .giveaway-form, .giveaway-result, .promo-form, .promo-list-panel { padding: 23px; }
.panel-head { margin-bottom: 21px; display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.panel-head h2 { margin: 0; font: 500 25px/1 var(--serif); }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--emerald-bright); font: 500 8px/1 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.activity-list { min-height: 258px; display: grid; align-content: start; }
.activity-item { padding: 14px 0; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; border-top: 1px solid var(--line); }
.activity-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--emerald-bright); background: rgba(23, 83, 59, .4); font: 500 14px/1 var(--display); }
.activity-copy { min-width: 0; }
.activity-copy b { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-copy p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.activity-item time { color: var(--muted-2); font: 400 8px/1 var(--mono); }
.empty-feed { min-height: 230px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted-2); text-align: center; }
.empty-feed i { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 50%; background: radial-gradient(circle, rgba(34, 136, 97, .13), transparent 70%); }
.empty-feed p { max-width: 240px; margin: 0; font-size: 10px; line-height: 1.6; }
.health-list { margin: 0; }
.health-list > div { padding: 15px 0; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.health-list dt { color: var(--muted); font-size: 10px; }
.health-list dd { margin: 0; color: #c6d9cd; font-size: 10px; text-align: right; }
.health-list dd i { width: 5px; height: 5px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 7px var(--emerald); vertical-align: 1px; }

.settings-form { display: grid; gap: 14px; }
.field-counter { color: var(--muted-2); font: 400 9px/1 var(--mono); }
.form-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 17px 24px; align-items: center; }
.toggle-card { min-height: 65px; display: flex; align-items: center; gap: 13px; cursor: pointer; }
.toggle-card input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { width: 38px; height: 22px; padding: 3px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(4, 14, 10, .8); transition: 180ms ease; }
.toggle-ui i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--muted-2); transition: 180ms ease; }
.toggle-card input:checked + .toggle-ui { border-color: rgba(82, 226, 172, .45); background: rgba(18, 123, 85, .45); }
.toggle-card input:checked + .toggle-ui i { transform: translateX(16px); background: var(--emerald-bright); box-shadow: 0 0 8px rgba(82, 226, 172, .65); }
.toggle-card input:focus-visible + .toggle-ui { outline: 2px solid var(--emerald-bright); outline-offset: 3px; }
.toggle-card > span:last-child { display: grid; gap: 3px; }
.toggle-card b { font-size: 12px; }
.toggle-card small { color: var(--muted-2); font-size: 9px; }
.sticky-save { position: sticky; z-index: 5; bottom: 16px; padding: 12px 13px 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--line-strong); border-radius: 17px; background: rgba(7, 23, 15, .92); box-shadow: 0 16px 45px rgba(0,0,0,.3); backdrop-filter: blur(20px); }
.sticky-save .primary-button { min-height: 45px; }

.session-list { display: grid; gap: 12px; }
.session-row { padding: 17px 19px; display: grid; grid-template-columns: 48px 1fr auto auto; gap: 15px; align-items: center; border-radius: 17px; }
.session-avatar { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(82, 226, 172, .18); border-radius: 15px; color: var(--emerald-bright); background: linear-gradient(145deg, rgba(30, 99, 72, .5), rgba(10, 43, 30, .65)); font: 500 17px/1 var(--display); }
.session-copy { min-width: 0; }
.session-copy b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-copy small { color: var(--muted-2); font-size: 9px; }
.session-state { padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 400 8px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.session-state.is-enabled { color: var(--emerald-bright); border-color: rgba(82, 226, 172, .2); background: rgba(17, 94, 65, .2); }
.row-actions { display: flex; gap: 6px; }
.row-action { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(5, 17, 11, .5); cursor: pointer; }
.row-action:hover { color: var(--text); border-color: var(--line-strong); }
.row-action.is-danger:hover { color: var(--danger); border-color: rgba(236, 122, 120, .25); }
.row-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-state { min-height: 440px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-icon { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 25px; color: var(--emerald-bright); background: radial-gradient(circle, rgba(27, 132, 94, .2), rgba(8, 29, 19, .25)); }
.empty-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h2 { margin: 22px 0 7px; font: 500 30px/1 var(--serif); }
.empty-state p { max-width: 340px; margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.giveaway-message { min-height: 20px; margin: -18px 0 12px; }
.giveaway-grid, .admin-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.giveaway-inbox { padding: 0; overflow: hidden; }
.giveaway-inbox-head { min-height: 64px; margin: 0; padding: 17px 20px; align-items: center; }
.giveaway-inbox-head > span { min-width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid rgba(82, 226, 172, .2); border-radius: 99px; color: var(--emerald-bright); background: rgba(17, 94, 65, .18); font: 500 9px/1 var(--mono); }
.giveaway-list { max-height: min(62vh, 620px); overflow-y: auto; }
.giveaway-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 94px; border-top: 1px solid var(--line); background: rgba(5, 17, 11, .16); transition: background .18s ease; }
.giveaway-item:hover, .giveaway-item.is-active { background: rgba(21, 79, 56, .26); }
.giveaway-select { min-width: 0; padding: 15px 6px 15px 20px; display: grid; gap: 7px; border: 0; color: var(--text); background: none; cursor: pointer; text-align: left; }
.giveaway-select > span { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.giveaway-select b { overflow: hidden; font: 600 11px/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.giveaway-select time { flex: 0 0 auto; color: var(--muted-2); font: 400 8px/1 var(--mono); }
.giveaway-select small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.giveaway-select em { overflow: hidden; color: var(--emerald-bright); font: normal 400 8px/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.giveaway-item-actions { align-self: center; display: flex; align-items: center; }
.giveaway-block, .giveaway-remove { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 10px; color: var(--muted-2); background: none; cursor: pointer; }
.giveaway-block:hover { color: var(--amber); background: rgba(105, 75, 22, .17); }
.giveaway-remove:hover { color: var(--danger); background: rgba(112, 31, 37, .16); }
.giveaway-block:disabled, .giveaway-remove:disabled { cursor: wait; opacity: .45; }
.giveaway-block svg, .giveaway-remove svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.giveaway-list-empty { min-height: 210px; padding: 30px; display: grid; place-content: center; justify-items: center; color: var(--muted-2); text-align: center; }
.giveaway-list-empty i { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 14px rgba(82, 226, 172, .5); }
.giveaway-list-empty p { margin: 13px 0 0; color: var(--muted); font-size: 10px; }
.giveaway-blocklist, .giveaway-manual { border-top: 1px solid var(--line); }
.giveaway-blocklist summary, .giveaway-manual summary { min-height: 48px; padding: 0 20px; display: flex; align-items: center; color: var(--muted); cursor: pointer; font-size: 9px; list-style: none; }
.giveaway-blocklist summary::-webkit-details-marker, .giveaway-manual summary::-webkit-details-marker { display: none; }
.giveaway-blocklist summary b { min-width: 23px; height: 23px; margin-left: auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 99px; color: var(--amber); font: 500 8px/1 var(--mono); }
.giveaway-blocked-list { border-top: 1px solid var(--line); }
.giveaway-blocked-item { min-width: 0; padding: 11px 12px 11px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.giveaway-blocked-item + .giveaway-blocked-item { border-top: 1px solid var(--line); }
.giveaway-blocked-item > div { min-width: 0; }
.giveaway-blocked-item b, .giveaway-blocked-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.giveaway-blocked-item b { color: var(--text); font-size: 10px; }
.giveaway-blocked-item small { margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.giveaway-unblock { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(5, 17, 11, .28); cursor: pointer; font-size: 8px; }
.giveaway-unblock:hover { color: var(--emerald-bright); border-color: rgba(82, 226, 172, .28); }
.giveaway-unblock:disabled { cursor: wait; opacity: .45; }
.giveaway-manual summary::after { content: "+"; margin-left: auto; color: var(--emerald-bright); font: 400 16px/1 var(--mono); }
.giveaway-manual[open] summary::after { content: "-"; }
.giveaway-form { padding: 0 20px 20px; display: grid; gap: 12px; }
.giveaway-form .soft-button { width: 100%; }
.promo-form { display: grid; gap: 17px; }
.promo-form .panel-head { margin-bottom: 2px; }
.giveaway-result { min-height: 430px; position: sticky; top: 92px; }
.giveaway-empty { min-height: 380px; display: grid; place-content: center; justify-items: center; text-align: center; }
.giveaway-empty-mark { width: 60px; height: 60px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 19px; color: var(--emerald-bright); background: rgba(17, 94, 65, .15); }
.giveaway-empty-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.giveaway-empty h2 { margin: 18px 0 7px; font: 500 25px/1.1 var(--serif); }
.giveaway-empty p { max-width: 330px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.giveaway-post { margin: 15px 0 20px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(4, 15, 10, .42); }
.giveaway-post-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.giveaway-post-meta b { font-size: 11px; }
.giveaway-post-meta a { color: var(--emerald-bright); font-size: 9px; }
.giveaway-post-text { max-height: 260px; margin: 13px 0 0; overflow: auto; color: #c6d8cd; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.giveaway-reading { min-height: 96px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 10px; }
.giveaway-reading i { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 13px rgba(82, 226, 172, .58); animation: giveaway-reading-pulse 1.6s ease-in-out infinite; }
@keyframes giveaway-reading-pulse { 50% { transform: scale(.72); opacity: .45; } }
.giveaway-conditions-title { margin: 0 0 9px; color: var(--muted); font: 500 10px/1.4 var(--sans); }
.empty-compact { min-height: 280px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted-2); text-align: center; }
.empty-compact p { max-width: 260px; margin: 0; font-size: 10px; line-height: 1.6; }
.giveaway-channel { padding: 12px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.giveaway-channel input { accent-color: var(--emerald); }
.giveaway-channel label { flex: 1; font-size: 11px; }
.giveaway-channel small { color: var(--muted-2); font-size: 9px; }
.giveaway-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 9px; }
.giveaway-actions .soft-button { min-height: 44px; }
.giveaway-management { margin-left: auto; display: flex; gap: 9px; }
.giveaway-block-button { color: var(--amber); border-color: rgba(231, 189, 101, .18); }
.giveaway-block-button:hover { color: var(--amber); border-color: rgba(231, 189, 101, .34); background: rgba(105, 75, 22, .16); }
.giveaway-delete-button { color: #ef9998; border-color: rgba(236, 122, 120, .18); }
.giveaway-delete-button:hover { color: var(--danger); border-color: rgba(236, 122, 120, .35); background: rgba(112, 31, 37, .17); }
.giveaway-result-line { padding: 11px 0; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: 10px; }
.giveaway-result-line span { color: var(--muted); }
.giveaway-result-empty { color: var(--muted); font-size: 10px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.created-code { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; border: 1px solid rgba(82, 226, 172, .22); border-radius: 13px; background: rgba(17, 89, 62, .2); }
.created-code > span { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.created-code code { color: var(--emerald-bright); font: 500 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.created-code button { border: 0; color: #c5d9cd; background: none; cursor: pointer; font-size: 10px; }
.promo-list { display: grid; }
.promo-item { padding: 13px 0; display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; border-top: 1px solid var(--line); }
.promo-item code { display: block; color: #caddd1; font: 500 10px/1.5 var(--mono); }
.promo-item small { color: var(--muted-2); font-size: 8px; }
.promo-usage { color: var(--muted); font: 400 9px/1 var(--mono); white-space: nowrap; }
.promo-disable { border: 0; color: var(--danger); background: none; cursor: pointer; font-size: 9px; }
.promo-disable:disabled { color: var(--muted-2); cursor: default; }

/* Сведения: состояние машины, клиенты и записи публичного статуса */
.server-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.server-incidents { margin-top: 14px; }
.server-updated { color: var(--muted-2); font: 400 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.metric .live-dot.is-down { background: var(--danger); }
.metric #server-state { font-size: clamp(26px, 3vw, 38px); }

.customer-table { min-height: 258px; display: grid; align-content: start; }
.customer-row { padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 16px; align-items: center; border-top: 1px solid var(--line); }
.customer-row b { display: block; font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-row small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.customer-metrics { color: var(--muted); font: 400 9px/1.6 var(--mono); text-align: right; white-space: nowrap; }
.customer-state { padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: 500 8px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.customer-state.is-live { color: var(--emerald-bright); border-color: rgba(82, 226, 172, .35); }
.customer-state.is-stopped { color: var(--amber); border-color: rgba(231, 189, 101, .3); }
.customer-state.is-error { color: var(--danger); border-color: rgba(236, 122, 120, .32); }
.customer-role { margin-left: 7px; color: var(--emerald-bright); font: 500 8px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

.field select {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(4, 14, 10, 0.7);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.field select:focus { border-color: rgba(82, 226, 172, 0.58); background: rgba(6, 20, 14, 0.84); box-shadow: 0 0 0 4px rgba(24, 183, 131, 0.08); }
.field select option { color: var(--text); background: #0b1f16; }

.incident-item { padding: 13px 0; display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; align-items: center; border-top: 1px solid var(--line); }
.incident-item b { display: block; font-size: 11px; font-weight: 600; }
.incident-item small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.incident-kind { color: var(--muted); font: 400 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.incident-kind[data-kind="outage"] { color: var(--danger); }
.incident-kind[data-kind="maintenance"] { color: var(--amber); }
.incident-remove { border: 0; color: var(--danger); background: none; cursor: pointer; font-size: 9px; }
.incident-remove:disabled { color: var(--muted-2); cursor: default; }

.qr-dialog { width: min(440px, calc(100% - 30px)); padding: 27px; border: 1px solid var(--line-strong); border-radius: 25px; color: var(--text); background: linear-gradient(150deg, #102c20, #07150f); box-shadow: 0 35px 130px rgba(0,0,0,.7); text-align: center; }
.qr-dialog::backdrop { background: rgba(1, 7, 4, .74); backdrop-filter: blur(10px); }
.qr-dialog h2 { margin: 8px 0 6px; font: 500 35px/1 var(--serif); }
.qr-dialog > p:not(.eyebrow) { margin: 0 0 18px; color: var(--muted); font-size: 10px; }
.qr-dialog .qr-frame { min-height: 300px; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(4, 15, 10, .5); cursor: pointer; font-size: 20px; }
.password-dialog { width: min(430px, calc(100% - 30px)); padding: 29px; border: 1px solid var(--line-strong); border-radius: 24px; color: var(--text); background: linear-gradient(150deg, #102c20, #07150f); box-shadow: 0 35px 130px rgba(0,0,0,.7); }
.password-dialog::backdrop { background: rgba(1, 7, 4, .74); backdrop-filter: blur(10px); }
.password-dialog h2 { margin: 8px 0 7px; font: 500 35px/1 var(--serif); }
.password-dialog > p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.password-dialog form { display: grid; gap: 14px; }
.password-dialog .primary-button { width: 100%; margin-top: 3px; }
.password-dialog .form-message { margin-top: 8px; }

.toast-region { position: fixed; z-index: 50; right: 20px; bottom: 20px; width: min(360px, calc(100% - 40px)); display: grid; gap: 9px; pointer-events: none; }
.toast { padding: 14px 16px; display: grid; grid-template-columns: 7px 1fr; gap: 11px; border: 1px solid var(--line-strong); border-radius: 14px; color: #cfe0d6; background: rgba(8, 27, 18, .94); box-shadow: 0 18px 50px rgba(0,0,0,.36); backdrop-filter: blur(18px); font-size: 11px; line-height: 1.5; animation: toast-in 300ms ease both; }
.toast i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--emerald-bright); box-shadow: 0 0 8px var(--emerald); }
.toast.is-error i { background: var(--danger); box-shadow: 0 0 8px rgba(236,122,120,.7); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: 1fr minmax(360px, .8fr); gap: 50px; }
  .auth-story h1 { font-size: clamp(62px, 8vw, 92px); }
  .purchase-view { grid-template-columns: 1fr 380px; gap: 44px; }
  .purchase-copy h1 { font-size: clamp(74px, 9vw, 106px); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-uptime { grid-column: span 2; }
  .metric-grid .metric:last-child { grid-column: span 2; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .auth-header { width: calc(100% - 36px); }
  .auth-shell { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 22px; padding-top: 18px; }
  .auth-story { min-height: auto; padding: 44px 0 26px; }
  .auth-story h1 { font-size: clamp(62px, 13vw, 90px); }
  .auth-lede { width: min(600px, 92%); }
  .lens-orbit { right: -5%; bottom: -40%; }
  .auth-card { width: min(520px, 100%); justify-self: center; }

  .dash-header { grid-template-columns: 1fr auto; }
  .header-center { display: none; }
  .account-trigger { min-width: auto; }
  .account-copy { display: none; }
  .full-view { width: calc(100% - 36px); }
  .purchase-view, .setup-view { grid-template-columns: 1fr; gap: 42px; padding-top: 56px; }
  .purchase-lens { width: 90vw; left: 50%; top: 31%; }
  .purchase-copy h1, .setup-hero h1 { font-size: clamp(74px, 17vw, 116px); }
  .checkout-card, .qr-card { width: min(520px, 100%); justify-self: center; }

  .app-view { display: block; }
  .side-nav { position: fixed; z-index: 15; left: 12px; right: 12px; bottom: 11px; top: auto; width: auto; height: 63px; padding: 7px; display: block; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(6, 21, 14, .93); box-shadow: 0 16px 50px rgba(0,0,0,.48); backdrop-filter: blur(22px); }
  .side-nav nav { grid-template-columns: repeat(5, 1fr); gap: 3px; }
  .side-link { min-height: 47px; padding: 0; display: flex; justify-content: center; gap: 0; }
  .side-link span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .side-link b { display: none; }
  .side-link.is-active { box-shadow: inset 0 -2px var(--emerald); }
  .side-plan { display: none; }
  .workspace { padding: 37px 20px 110px; }
  .giveaway-grid, .admin-grid, .server-grid { grid-template-columns: 1fr; }
  .giveaway-result { position: static; }
}

@media (max-width: 580px) {
  .auth-header { height: 70px; }
  .quiet-link { font-size: 11px; }
  .auth-shell { width: calc(100% - 28px); padding: 5px 0 46px; }
  .auth-story { padding-top: 35px; }
  .auth-story h1 { margin-top: 15px; font-size: clamp(55px, 17vw, 76px); }
  .auth-lede { width: 100%; font-size: 13px; }
  .lens-orbit { display: none; }
  .auth-card { padding: 10px 20px 24px; border-radius: 23px; }
  .auth-tabs { margin-inline: -10px; }

  .dash-header { height: 68px; padding: 0 16px; }
  .account-brand span { font-size: 17px; }
  .avatar { width: 33px; height: 33px; }
  .full-view { width: calc(100% - 28px); min-height: calc(100vh - 68px); }
  .purchase-view, .setup-view { padding: 44px 0 60px; }
  .purchase-copy h1, .setup-hero h1 { font-size: clamp(64px, 21vw, 94px); }
  .purchase-lede, .setup-hero > p:not(.eyebrow) { font-size: 13px; }
  .checkout-card, .qr-card { padding: 20px; border-radius: 23px; }
  .checkout-top > span { font-size: 30px; }
  .pending-payment { align-items: flex-start; flex-direction: column; }
  .qr-frame { min-height: 265px; }

  .workspace { padding: 30px 14px 102px; }
  .page-heading { align-items: start; flex-direction: column; margin-bottom: 25px; }
  .page-heading h1 { font-size: 43px; }
  .service-controls { align-self: stretch; justify-content: end; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-toolbar { margin-top: -11px; }
  .metric { min-height: 135px; padding: 16px; }
  .metric > strong { margin-top: 20px; font-size: 31px; }
  .metric-uptime { grid-column: span 2; }
  .overview-grid { margin-top: 10px; }
  .activity-panel, .health-panel, .form-panel, .giveaway-result, .promo-form, .promo-list-panel { padding: 18px; }
  .giveaway-inbox-head { padding-inline: 16px; }
  .giveaway-select { padding-left: 16px; }
  .giveaway-form { padding-inline: 16px; }
  .giveaway-message { margin-top: -15px; }
  .giveaway-post-meta { align-items: flex-start; flex-direction: column; gap: 7px; }
  .giveaway-actions { align-items: stretch; flex-direction: column; }
  .giveaway-actions .primary-button, .giveaway-actions .soft-button { width: 100%; }
  .giveaway-management { width: 100%; margin-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-banner { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .sticky-save { align-items: stretch; flex-direction: column; padding: 12px; }
  .session-row { grid-template-columns: 42px 1fr auto; padding: 14px; gap: 10px; }
  .session-avatar { width: 42px; height: 42px; border-radius: 13px; }
  .session-state { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .promo-item { grid-template-columns: 1fr auto; }
  .customer-row { grid-template-columns: 1fr auto; }
  .customer-metrics { grid-column: 1 / -1; text-align: left; }
  .incident-item { grid-template-columns: 1fr auto; }
  .promo-disable { grid-column: 1 / -1; justify-self: start; }
  .activity-item { grid-template-columns: 35px 1fr; }
  .activity-item time { display: none; }
  .toast-region { right: 14px; bottom: 84px; width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.cf-turnstile {
  min-height: 65px;
  margin: 4px 0 2px;
}
