:root {
  --bg0: #160E28;
  --bg1: rgba(36, 24, 62, 0.72);
  --bg2: #24183E;
  --panel: rgba(36, 24, 62, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --text: #F4F1FF;
  --muted: #C4B8E0;
  --text-faint: #A89CC8;
  --primary: #703BE7;
  --primary-2: #9B6CFF;
  --primary-soft: rgba(112, 59, 231, 0.22);
  --blue: #703BE7;
  --yellow: #F4D03F;
  --peach: #FFB39A;
  --accent: #FFB39A;
  --accent-soft: rgba(255, 138, 61, 0.18);
  --danger: #f2555a;
  --ok: #29c48b;
  --shadow: 0 16px 40px rgba(8, 4, 18, 0.35);
  --shadow-lg: 0 28px 70px rgba(8, 4, 18, 0.45);
  --radius: 24px;
  --radius-lg: 28px;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-line: rgba(255, 255, 255, 0.1);
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font: var(--font-body);
  --surface: rgba(36, 24, 62, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg0) fixed;
  overflow-y: auto;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42vw 32vw at 12% 18%, rgba(112, 59, 231, 0.42), transparent 62%),
    radial-gradient(36vw 28vw at 86% 8%, rgba(255, 179, 154, 0.28), transparent 60%),
    radial-gradient(30vw 24vw at 70% 78%, rgba(244, 208, 63, 0.16), transparent 65%);
  filter: blur(8px);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

[hidden], .is-hidden { display: none !important; }

.bg-grid, .bg-glow { display: none; }

.glass,
.panel.glass,
.pulse-card,
.notif-column,
.chats-block,
.stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

/* Project 2 Huddle auth: split card + four mates */
.auth-shell, .huddle-auth {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 20px;
}
.auth-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.auth-card--split {
  display: flex;
  align-items: stretch;
  max-width: 760px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  padding: 0;
  text-align: left;
  color: #201c3d;
}
.auth-mates {
  flex: 1.2 1 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.mates-stage {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.auth-form-pane, .huddle-form { flex: 1 1 420px; padding: 44px 40px; width: auto; }
.auth-form-pane .field label { color: #5c5678; }
.auth-form-pane .tab { background: #f0edf8; color: #5c5678; }
.auth-form-pane .tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.auth-form-pane .btn-ghost { color: #5c4ad6; background: #f0edf8; }
.auth-caption { font-size: 13.5px; color: var(--text-faint); text-align: center; margin: 0; }
.legal-link { font-size: 12.5px; color: var(--text-faint); text-decoration: none; }
.legal-link:hover { color: var(--muted); text-decoration: underline; }
.auth-logo, .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 18px;
}
.brand-mark.sm { width: 40px; height: 40px; font-size: 0.72rem; margin: 0; }
.auth-form-pane h1 { font-size: 22px; margin: 0 0 6px; color: #201c3d; }
.auth-form-pane p.subtitle { color: #6b6690; font-size: 14px; margin: 0 0 22px; }
.privacy-card {
  max-width: 720px;
  text-align: left;
  background: #fff;
  color: #201c3d;
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
}
.privacy-card h1 { color: #201c3d; }
.privacy-card p { color: #4b4570; line-height: 1.6; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  text-align: left;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid #e8e5fb;
  background: #fff;
  color: #201c3d;
  outline: none;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.field .password-wrap input { padding-right: 46px; }
@media (max-width: 720px) {
  .auth-card--split { flex-direction: column; }
  .auth-form-pane, .huddle-form { padding: 28px 22px; }
}

.auth-screen {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(440px, 100%);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  animation: rise 0.45s ease both;
}
.auth-card.auth-card--split {
  width: min(760px, 100%);
  max-width: 760px;
  padding: 0;
}
.brand { text-align: center; margin-bottom: 8px; }
.brand h1, .brand-inline strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.brand h1 { font-size: 1.7rem; font-weight: 800; }
.brand p { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; width: 100%; }
.pw-toggle, .password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover, .password-toggle:hover,
.pw-toggle.is-active, .password-toggle.is-on { background: var(--surface-soft); color: var(--primary); }

.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.tab {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
}
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
input, textarea, select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #201838;
  color: #F4F1FF;
  padding: 12px 14px;
  font: 500 1rem var(--font-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  color-scheme: dark;
}
select option, select optgroup {
  background: #201838;
  color: #F4F1FF;
}
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: #fff;
  color: #1a1430;
  border-color: #d8d2ea;
  color-scheme: light;
}
html[data-theme="light"] select option {
  background: #fff;
  color: #1a1430;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 600 15px var(--font-body);
  padding: 13px 28px;
  transition: transform .18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .2s ease, opacity .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
a.btn { display: inline-flex; text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.sm { padding: 8px 12px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.35);
}
.btn-accent {
  width: 100%;
  margin-top: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff6b4a);
  box-shadow: 0 8px 18px rgba(255, 139, 106, 0.28);
}
.btn-ghost {
  background: var(--surface-soft);
  color: var(--primary-2);
  border: 0;
}

.form-error, .form-msg { margin: 0; font-weight: 600; }
.form-error { color: var(--danger); }
.auth-banner {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  text-align: center;
}
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  width: calc(100% - 28px);
  margin: 14px auto 0;
  padding: 10px 12px;
}
.app-nav .tab {
  flex: 1 1 120px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s, box-shadow 0.3s;
}
.app-nav .tab:hover { transform: translateY(-1px); }
.app-nav .tab.active { box-shadow: 0 8px 20px rgba(112, 59, 231, 0.28); }
[data-page-panel].is-hidden { display: none !important; }
.panel-enter { animation: panelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-theme="light"] body {
  color: #1a1430;
  background:
    radial-gradient(circle at 12% 8%, rgba(108, 92, 231, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(255, 138, 61, 0.12) 0%, transparent 38%),
    #F4F0FF fixed;
}
html[data-theme="light"] {
  --text: #1a1430;
  --muted: #5c5678;
  --text-faint: #7a7396;
  --bg0: #F4F0FF;
  --panel: rgba(255, 255, 255, 0.72);
}
html[data-theme="light"] .topbar {
  background: rgba(22, 14, 40, 0.86);
  color: #F4F1FF;
}
html[data-theme="light"] .topbar .brand-inline strong,
html[data-theme="light"] .topbar .brand-inline small,
.topbar .brand-inline strong,
.topbar .brand-inline small {
  color: #FFFFFF;
}
html[data-theme="light"] .topbar .token-chip span,
html[data-theme="light"] .topbar .token-chip em,
html[data-theme="light"] .topbar .btn-ghost {
  color: #E8E2FF;
}
.app-screen {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.app-screen .layout { flex: 1 1 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(22, 14, 40, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #F4F1FF;
}
.brand-inline { display: flex; align-items: center; gap: 12px; }
.brand-inline strong { color: #FFFFFF; }
.brand-inline small { display: block; color: #F4F1FF; font-size: 0.88rem; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.token-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}
.topbar .token-chip span,
.topbar .token-chip em { color: #E8E2FF; font-style: normal; font-size: 0.86rem; }
.topbar .token-chip strong { font-size: 1rem; color: #F4D03F; }
.topbar .btn-ghost { color: #F4F1FF; border-color: rgba(255, 255, 255, 0.22); }

.layout {
  display: grid;
  gap: 18px;
  padding: 20px;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: 1.1fr 1fr; }
}

.panel {
  border-radius: var(--radius);
  padding: 18px;
  animation: rise 0.4s ease both;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.hint { color: var(--muted); font-size: 0.92rem; }
.hint a, a { color: var(--primary); }

.stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pulse-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}
.pulse-card {
  padding: 18px 16px;
}
.pulse-card span { display: block; color: var(--muted); font-size: 0.82rem; letter-spacing: .04em; text-transform: uppercase; }
.pulse-card strong { display: block; font-size: 2.1rem; line-height: 1.1; margin: 6px 0 2px; color: var(--yellow); }
.pulse-card em { color: var(--text-faint); font-style: normal; font-size: 0.86rem; }
.pulse-card--accent strong { color: var(--accent); }
.stat-card { padding: 12px; }
.stat-card span { display: block; color: var(--muted); font-size: 0.86rem; margin-bottom: 4px; }
.stat-card strong { font-size: 0.95rem; color: var(--primary); }

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(167, 139, 250, 0.4);
  background: rgba(108, 92, 231, 0.12);
}
.calc-row strong { color: var(--primary); font-size: 1.15rem; }

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.order-actions .btn { width: 100%; }

.packages { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .packages { grid-template-columns: repeat(3, 1fr); } }
.package {
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  gap: 4px;
}
.package strong { font-size: 0.95rem; }
.package span { color: var(--muted); }
.package.active, .package:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.22);
  background: rgba(108, 92, 231, 0.16);
}

.ext-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 4px;
}
.ext-box-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.btn-accent.sm, a.btn-accent.sm {
  width: auto;
  margin-top: 0;
  display: inline-block;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 0.88rem;
}
.install-steps { margin: 0 0 12px 1.1rem; padding: 0; color: var(--muted); }
.install-steps code {
  color: var(--yellow);
  background: rgba(108, 92, 231, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
}
.pair-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.pair-code {
  letter-spacing: 0.12em;
  font-size: 1.05rem;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed #ddd6fe;
  background: rgba(255, 201, 77, 0.08);
  min-width: 9rem;
  text-align: center;
  font-weight: 800;
}

.devices-block { margin-top: 16px; }
.devices-head h3 { margin: 0; font-size: 0.9rem; color: var(--muted); }
.devices-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.devices-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.devices-table th, .devices-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.devices-table th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.devices-table tr:last-child td { border-bottom: 0; }
.devices-table .empty-row td { color: var(--muted); text-align: center; padding: 16px 12px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--primary);
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(108, 92, 231, 0.16);
}
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-pill.online { color: var(--ok); border-color: #a7f3d0; background: #ecfdf5; }
.status-pill.online::before { background: var(--ok); }
.status-pill.paused { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.status-pill.paused::before { background: var(--yellow); }
.status-pill.offline::before { background: var(--danger); }

.download-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 800px) { .download-grid { grid-template-columns: 1fr 1fr; } }
.notif-chip { position: relative; cursor: help; }
.notif-chip[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
}
.notif-chip[data-tooltip]:hover::after,
.notif-chip[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.product-preview {
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}
#parse-status { margin: 0; min-height: 1.1em; }
.order-meta-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .order-meta-grid { grid-template-columns: 1fr 1fr; } }
.order-meta-grid input[readonly] { opacity: 0.85; background: rgba(255, 255, 255, 0.04); }
.product-card { display: grid; gap: 12px; grid-template-columns: 96px 1fr; }
.product-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.product-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.product-card .desc, .product-card .params { color: var(--muted); font-size: 0.92rem; }
.ui-icon { width: 18px; height: 18px; stroke-width: 1.75; vertical-align: -3px; color: var(--primary); }
.site-footer {
  margin: 1.5rem auto;
  max-width: 1100px;
  padding: 1rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

.ticket-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
@media (max-width: 860px) { .ticket-layout { grid-template-columns: 1fr; } }
.ticket-list { display: grid; gap: 8px; margin-bottom: 14px; }
.ticket-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}
.ticket-item.is-active { border-color: var(--primary); background: rgba(108, 92, 231, 0.18); }
.ticket-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .78rem;
  background: var(--bg2);
  color: var(--text);
}
.ticket-badge.open { background: #dbeafe; color: #1d4ed8; }
.ticket-badge.in_progress, .ticket-badge.answered { background: #fef3c7; color: #92400e; }
.ticket-badge.closed { background: #e5e7eb; color: #374151; }
.ticket-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-thread-head h3 { margin: 0; font-size: 1.05rem; }
.ticket-thread { display: grid; gap: 8px; max-height: 320px; overflow: auto; margin: 12px 0; }
.ticket-msg { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); max-width: 88%; }
.ticket-msg.is-mine { margin-left: auto; background: rgba(108, 92, 231, 0.22); border-color: #6c5ce7; }
.ticket-msg.is-admin { margin-right: auto; border-left: 3px solid var(--primary); background: rgba(255, 201, 77, 0.08); }
.ticket-create { margin-top: 8px; display: grid; gap: 8px; }
.ticket-create textarea { min-height: 72px; }
.table-wrap td, .table-wrap th {
  max-width: 220px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.notif-list { margin-top: 12px; display: grid; gap: 8px; }
.notif-column,
.chats-block {
  margin-top: 18px;
  padding: 16px;
}
.notif-column-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.notif-column-head h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.notif-item {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #fde68a;
  background: rgba(255, 201, 77, 0.1);
  display: grid;
  gap: 2px;
}
.notif-item-top { display: flex; justify-content: space-between; gap: 8px; }
.notif-item-top time { opacity: 0.55; font-size: 0.75rem; }
.notif-item.unread { box-shadow: inset 3px 0 0 var(--danger); }
.notif-item.captcha { border-color: #fecdd3; background: rgba(242, 85, 90, 0.12); }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.ops-panel { margin: 14px 0 8px; }
.ops-title { margin: 0 0 10px; font-size: 0.95rem; color: var(--muted); }
.chat-list { display: grid; gap: 8px; margin-top: 8px; }
.chat-empty {
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.chat-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.chat-item:hover { border-color: var(--primary); }
.chat-item strong { display: block; }
.chat-item small { display: block; color: var(--muted); }
.notif-item { position: relative; }
.notif-item a { pointer-events: auto; }
.notif-read {
  margin-top: 8px;
  position: relative;
  z-index: 2;
}
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 4, 18, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 20px;
}
.modal-card h3 { margin: 0 0 10px; }
.modal-card .btn { margin-top: 16px; }

  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar-actions { justify-content: space-between; }
}
