:root {
  --bg: #fcfcfd;
  --panel: #ffffff;
  --panel-soft: #f9fafc;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --shadow: 0 18px 50px rgba(16, 24, 40, 0.09);
  --shadow-soft: 0 10px 28px rgba(16, 24, 40, 0.07);
  --brand: #0126a5;
  --brand-ink: #0126a5;
  --accent: #fa580b;
  --movie: #0126a5;
  --movie-accent: #fa580b;
  --turf: #0f5132;
  --turf-accent: #1fbf75;
  --event: #7a1f37;
  --event-accent: #ff5c7a;
  --finance: #123c69;
  --ok: #14804a;
  --warn: #b54708;
  --danger: #b42318;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

::selection {
  color: #ffffff;
  background: var(--accent);
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #ffffff;
}

.auth-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 56px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(250, 88, 11, 0.24), transparent 32%),
    linear-gradient(145deg, #0126a5, #07195f),
    #0126a5;
}

.auth-art::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), transparent);
}

.auth-art::after {
  position: absolute;
  right: -18%;
  bottom: -24%;
  width: 54%;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: rgba(250, 88, 11, 0.22);
  filter: blur(3px);
}

.auth-story {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.brand-lockup img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
}

.brand-kicker {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-name {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.auth-story h1 {
  max-width: 620px;
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-story p {
  max-width: 500px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 600;
}

.auth-domain-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}

.auth-domain-tile {
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.auth-domain-tile strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 13px;
}

.auth-domain-tile span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.login-card {
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-logo {
  display: none;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 24px;
}

.login-card h2 {
  margin: 0;
  color: var(--brand-ink);
  font-size: 28px;
  line-height: 1.18;
  font-weight: 900;
}

.login-card p {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 650;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: #344054;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 47, 168, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-span {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.check-row input {
  width: 16px;
  height: 16px;
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  color: var(--danger);
  background: #fffbfa;
  font-size: 13px;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(15, 47, 168, 0.24);
}

.btn.accent {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(250, 88, 11, 0.22);
}

.btn.ghost {
  border-color: var(--line);
  background: #ffffff;
}

.btn.danger {
  color: #ffffff;
  background: var(--danger);
}

.btn.full {
  width: 100%;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #c9d3e4;
  background: var(--brand);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-head {
  padding: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
}

.sidebar-brand strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.sidebar-brand span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.org-card {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.org-card strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.org-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 750;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.nav-section {
  margin: 18px 10px 8px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #c9d3e4;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.nav button:hover,
.nav button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.09);
}

.nav button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.sidebar-actions {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.main {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(228, 231, 236, 0.92);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}

.breadcrumb {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.menu-btn {
  display: none;
}

.content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-in 180ms ease-out;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
}

.section-head p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 650;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.panel.pad {
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 900;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.metric-card.dark {
  color: #ffffff;
  background: linear-gradient(145deg, var(--brand), #07195f);
  border-color: rgba(255, 255, 255, 0.08);
}

.metric-card.movie {
  color: #ffffff;
  background:
    linear-gradient(145deg, #0126a5, #07195f),
    var(--movie);
  border-color: rgba(250, 88, 11, 0.28);
}

.metric-card.turf {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(15, 81, 50, 0.98), rgba(7, 45, 34, 0.98)),
    var(--turf);
  border-color: rgba(31, 191, 117, 0.28);
}

.metric-card.event {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(122, 31, 55, 0.98), rgba(44, 37, 74, 0.98)),
    var(--event);
  border-color: rgba(255, 92, 122, 0.28);
}

.metric-label {
  margin: 0 0 12px;
  color: inherit;
  opacity: 0.68;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  margin: 0;
  font-size: 31px;
  line-height: 1.1;
  font-weight: 950;
}

.metric-note {
  margin: 12px 0 0;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.domain-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.domain-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 20px;
  color: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.domain-card.movie {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 2px, transparent 2px 15px),
    linear-gradient(145deg, #281937, #0c101a);
}

.domain-card.turf {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(145deg, #0e5a38, #062d25);
  background-size: 34px 34px, auto;
}

.domain-card.event {
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.16), transparent 18%),
    linear-gradient(145deg, #8b233e, #26375f);
}

.domain-card h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 950;
}

.domain-card .domain-kpi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.domain-card .domain-kpi div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.domain-card span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.domain-card strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
}

.progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.split-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.split-row:last-child {
  border-bottom: 0;
}

.split-row strong {
  font-size: 13px;
}

.split-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th {
  padding: 13px 14px;
  color: #475467;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px;
  border-bottom: 1px solid #edf0f5;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.record h4 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 650;
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.media-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: #ffffff;
  background: #182230;
  font-size: 22px;
  font-weight: 950;
}

.media-thumb.movie {
  aspect-ratio: 2 / 3;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 2px, transparent 2px 14px),
    var(--movie);
}

.media-thumb.event {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 20%),
    linear-gradient(145deg, var(--event), #26375f);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-body {
  padding: 14px;
}

.media-body h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-body p {
  min-height: 36px;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.media-meta strong {
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  color: #344054;
  background: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.ok {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.badge.warn {
  color: #b54708;
  border-color: #fedf89;
  background: #fffaeb;
}

.badge.danger {
  color: #b42318;
  border-color: #fecdca;
  background: #fffbfa;
}

.badge.movie {
  color: #4a1d72;
  border-color: #ead7ff;
  background: #f7edff;
}

.badge.turf {
  color: #067647;
  border-color: #abefc6;
  background: #ecfdf3;
}

.badge.event {
  color: #c01048;
  border-color: #ffc8d5;
  background: #fff1f3;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.domain-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.domain-switch button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #475467;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.domain-switch button.active {
  color: #ffffff;
  background: var(--brand);
}

.tab-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475467;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.tab-btn.active {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

.subview {
  display: none;
}

.subview.active {
  display: block;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 14px;
}

.error-note {
  padding: 12px 14px;
  border: 1px solid #fecdca;
  border-radius: var(--radius);
  color: #b42318;
  background: #fffbfa;
  font-size: 13px;
  font-weight: 750;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight {
  padding: 12px 13px;
  border: 1px solid #f2f4f7;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: #ffffff;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.bar {
  flex: 1;
  min-width: 8px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--accent), #ffb088);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 13, 27, 0.64);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(100%, 680px);
  max-height: min(90vh, 820px);
  overflow: auto;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(8, 13, 27, 0.32);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.modal-body {
  padding: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  padding: 13px 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: var(--radius);
  color: #ffffff;
  background: #101828;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--ok);
}

.loading-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #d0d5dd;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mobile-overlay {
  display: none;
}

@media (max-width: 1180px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domain-strip,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 24px;
    background: #09173d;
  }

  .login-logo {
    display: block;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(86vw, 300px);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(8, 13, 27, 0.54);
  }

  .menu-btn {
    display: inline-flex;
  }

  .topbar {
    padding: 14px 16px;
  }

  .content {
    padding: 18px 16px 28px;
  }

  .date-pill {
    display: none;
  }
}

@media (max-width: 720px) {
  .grid.cols-2,
  .grid.cols-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .record {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .record > .record-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .record > .record-actions .btn {
    width: 100%;
  }

  .auth-panel {
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }
}
