@font-face {
  font-family: "Vazirmatn";
  src: url("./fonts/vazirmatn-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.ad-eligibility-notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  margin-block: 8px 4px;
  border: 1px solid color-mix(in oklab, var(--gold), var(--line) 42%);
  border-radius: 10px;
  color: var(--text);
  background: linear-gradient(105deg, color-mix(in oklab, var(--gold), transparent 88%), var(--surface));
}

.ad-eligibility-notice > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #8a5700;
  background: color-mix(in oklab, var(--gold), white 38%);
}

.ad-eligibility-notice p { margin: 0; line-height: 1.8; font-weight: 750; }

@font-face {
  font-family: "Vazirmatn";
  src: url("./fonts/vazirmatn-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("./fonts/vazirmatn-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0f0d;
  --bg-2: #111815;
  --surface: rgba(20, 29, 25, .94);
  --surface-2: rgba(255, 255, 255, .065);
  --surface-strong: rgba(26, 39, 33, .98);
  --text: #f4fbf7;
  --muted: #aebbb5;
  --line: rgba(255, 255, 255, .12);
  --brand: #42e68f;
  --brand-2: #16b8a6;
  --accent: #42e68f;
  --warn: #ffd166;
  --danger: #ff6b6b;
  --blue: #55b9f3;
  --gold: #f6bd4f;
  --coral: #ff806d;
  --shadow: 0 12px 30px rgba(0, 0, 0, .2);
  --radius: 8px;
  font-family: Vazirmatn, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.light {
  color-scheme: light;
  --bg: #eef5f1;
  --bg-2: #f7fbf8;
  --surface: rgba(255, 255, 255, .92);
  --surface-2: rgba(6, 19, 15, .06);
  --surface-strong: rgba(255, 255, 255, .98);
  --text: #071410;
  --muted: #5b6b63;
  --line: rgba(6, 19, 15, .13);
  --brand: #0f9f67;
  --brand-2: #0d8f9a;
  --accent: #116d56;
  --shadow: 0 16px 38px rgba(12, 29, 23, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
}

html {
  width: 100%;
  overflow-x: hidden;
}

html,
body,
.app-shell,
[data-view],
.content,
.hero,
.topbar {
  max-inline-size: 100%;
}

.topbar-logout {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  border-radius: 10px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  font-weight: 800;
}

.topbar-logout:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 13%, var(--surface));
}

.topbar-logout svg {
  width: 18px;
  height: 18px;
}

img, input, select, textarea, button {
  max-width: 100%;
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  position: relative;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  width: 100%;
  padding: env(safe-area-inset-top) 14px 0;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(6, 19, 15, .9), rgba(6, 19, 15, .54));
  border-bottom: 1px solid var(--line);
}

html.light .topbar {
  background: linear-gradient(180deg, rgba(247, 251, 248, .94), rgba(247, 251, 248, .68));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
  font: inherit;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #03130c;
  font-size: 13px;
  letter-spacing: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 380px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 11, 8, .32), rgba(6, 19, 15, .42) 40%, var(--bg) 96%),
    linear-gradient(90deg, rgba(6, 19, 15, .1), rgba(6, 19, 15, .5));
}

html.light .hero-shade {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .18) 42%, rgba(238, 245, 241, .96) 98%),
    linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .76) 52%, rgba(255, 255, 255, .88));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  padding: 24px 16px 30px;
  overflow: hidden;
}

html.light .hero-content {
  color: #071410;
  text-shadow: 0 1px 14px rgba(255, 255, 255, .7);
}

.eyebrow {
  color: var(--brand);
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy {
  max-width: 720px;
  width: min(100%, 720px);
  margin-bottom: 18px;
  color: color-mix(in oklab, currentColor, transparent 14%);
  line-height: 1.9;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hero-actions,
.home-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.hero-actions .ghost-btn {
  color: #f7fffb;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .34);
}

html.light .hero-actions .ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, .62);
  border-color: rgba(6, 19, 15, .18);
}

.home-command {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.home-command-card,
.home-lane,
.upload-slot {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-command-card {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.home-command-card strong,
.home-command-card span,
.home-lane strong,
.home-lane span,
.upload-slot strong,
.upload-slot small {
  display: block;
  overflow-wrap: anywhere;
}

.home-command-card strong,
.home-lane strong,
.upload-slot strong {
  color: var(--text);
  font-weight: 950;
}

.home-command-card span,
.home-lane span,
.upload-slot small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.7;
}

.home-lanes,
.upload-grid {
  display: grid;
  gap: 10px;
}

.home-lane {
  min-height: 112px;
  padding: 14px;
  color: var(--text);
  text-align: right;
}

.home-lane:hover {
  border-color: color-mix(in oklab, var(--brand), transparent 42%);
}

.upload-slot {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-2), transparent 35%);
}

.upload-slot.uploaded {
  border-color: color-mix(in oklab, var(--brand), transparent 30%);
  background: color-mix(in oklab, var(--brand), var(--surface) 90%);
}

.upload-slot.processing {
  border-color: color-mix(in oklab, var(--blue), transparent 30%);
  background: color-mix(in oklab, var(--blue), var(--surface) 92%);
}

.upload-slot.failed {
  border-color: color-mix(in oklab, var(--danger), transparent 36%);
}

[data-upload-status] {
  min-height: 20px;
}

[data-upload-status][data-state="processing"] {
  color: var(--blue);
  font-weight: 850;
}

[data-upload-status][data-state="done"] {
  color: var(--brand);
  font-weight: 850;
}

[data-upload-status][data-state="error"] {
  color: var(--danger);
  font-weight: 850;
}

.media-upload-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ad-submit-actions {
  display: grid;
  grid-column: 1 / -1;
  margin-top: 12px;
}

.owner-ad-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-2), transparent 35%);
}

.owner-ad-fields .section-head {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 720px) {
  .owner-ad-fields {
    grid-template-columns: 1fr;
  }
}

.media-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.media-panel-head > div {
  min-width: 0;
}

.media-panel-head h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.media-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

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

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

.documents-upload-grid .upload-slot-wide {
  grid-column: 1 / -1;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.quick-search,
.search-panel,
.surface,
.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  direction: ltr;
}

.quick-search input {
  direction: rtl;
  text-align: right;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
}

input::placeholder, textarea::placeholder { color: color-mix(in oklab, var(--muted), transparent 10%); }
select option { color: #071410; }

.form-field,
.unit-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.form-field > span,
.unit-field > span,
.unit-field > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
}

.form-field.required > span:not(.password-field-wrap)::after,
.unit-field.required > span:first-child::after,
input.required::placeholder,
textarea.required::placeholder,
select.required {
  color: var(--danger);
}

.form-field.required > span:not(.password-field-wrap)::after,
.unit-field.required > span:first-child::after,
.unit-field.required > small:first-of-type::after {
  content: " *";
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
}

.check-line input {
  width: auto;
  min-height: auto;
}

.danger-text {
  color: var(--danger);
}

.password-input-field {
  gap: 4px;
}

.password-guide {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.password-strength {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin-top: -2px;
}

.password-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  height: 7px;
}

.password-strength-bars span {
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted), transparent 72%);
  transition: background .18s ease, transform .18s ease;
}

.password-strength-text {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
}

.password-strength[data-level="weak"] .password-strength-bars span:nth-child(1) {
  background: var(--danger);
  transform: scaleY(1.15);
}

.password-strength[data-level="weak"] .password-strength-text {
  color: var(--danger);
}

.password-strength[data-level="fair"] .password-strength-bars span:nth-child(-n+2) {
  background: var(--warn);
  transform: scaleY(1.15);
}

.password-strength[data-level="fair"] .password-strength-text {
  color: var(--warn);
}

.password-strength[data-level="good"] .password-strength-bars span:nth-child(-n+3) {
  background: var(--blue);
  transform: scaleY(1.15);
}

.password-strength[data-level="good"] .password-strength-text {
  color: var(--blue);
}

.password-strength[data-level="strong"] .password-strength-bars span {
  background: var(--brand);
  transform: scaleY(1.15);
}

.password-strength[data-level="strong"] .password-strength-text {
  color: var(--brand);
}

.otp-form {
  max-width: 360px;
  margin-inline: auto;
  justify-items: stretch;
  text-align: center;
}

.otp-form .otp-phone-field {
  display: none;
}

.otp-form .otp-code-field {
  grid-column: 1 / -1;
}

.otp-form .otp-code-field > span {
  justify-self: center;
  font-size: 12px;
}

.otp-form .otp-code-field input {
  direction: ltr;
  text-align: center;
  font-size: 22px;
  font-weight: 950;
}

.profile-review-actions {
  display: grid;
  margin: -2px 0 12px;
}

.profile-readiness {
  display: block;
  width: 100%;
  text-align: center;
}

.profile-readiness[data-state="error"] { color: var(--danger); }
.profile-readiness[data-state="done"] { color: var(--brand); font-weight: 700; }
#profileForm .field-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }

.subscription-head {
  align-items: center;
}

.expert-subscription-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.expert-subscription-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 12px;
}

.expert-subscription-summary article {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.expert-subscription-summary svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--brand);
}

.expert-subscription-summary strong,
.expert-subscription-summary span { display: block; }
.expert-subscription-summary span { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.expert-subscription-filters { margin-bottom: 4px; }

.expert-subscription-card {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
}

.expert-subscription-card[data-status="needs_revision"],
.expert-subscription-card[data-status="rejected"] { border-inline-start: 5px solid var(--danger); }
.expert-subscription-card[data-status="pending_support_approval"] { border-inline-start: 5px solid var(--warning, #d89614); }
.expert-subscription-card[data-status="completed"] { border-inline-start: 5px solid var(--green); }

.expert-subscription-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.expert-subscription-meta > div {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-2);
}

.expert-subscription-meta strong,
.expert-subscription-meta span {
  display: block;
  overflow-wrap: anywhere;
}

.expert-review-current {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--text);
}

.expert-review-current svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--brand);
}

.expert-review-result {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 18px;
  background: var(--surface-2);
}

.expert-review-result p:last-child {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.expert-result-analysis {
  margin: 14px 0;
  line-height: 2;
  white-space: pre-wrap;
}

.expert-subscription-actions { padding-top: 4px; }
.stage-two-status-card { display: grid; gap: 14px; }
.stage-two-saved-links { padding: 12px; border-radius: 16px; background: var(--surface-2); }

.expert-subscription-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
}

.expert-review-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  counter-reset: review-step;
}

.expert-review-step {
  position: relative;
  min-height: 92px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted);
}

.expert-review-step::before {
  counter-increment: review-step;
  content: counter(review-step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 9px;
  border-radius: 50%;
  background: var(--line);
  color: var(--text);
  font-weight: 800;
}

.expert-review-step strong,
.expert-review-step small {
  display: block;
}

.expert-review-step small {
  margin-top: 4px;
}

.expert-review-step.is-done {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--text);
}

.expert-review-step.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}

.expert-review-step.is-done::before,
.expert-review-step.is-current::before {
  background: var(--accent);
  color: #fff;
}

.activity-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  white-space: pre-wrap;
}

.activity-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .expert-subscription-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expert-subscription-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expert-review-steps { grid-template-columns: 1fr; }
  .expert-review-step { min-height: 0; }
}

@media (max-width: 520px) {
  .expert-subscription-summary { grid-template-columns: 1fr; }
  .expert-subscription-filters { overflow-x: auto; justify-content: flex-start; }
  .expert-subscription-filters button { flex: 0 0 auto; }
}

.debug-otp {
  grid-column: 1 / -1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in oklab, var(--warn), transparent 35%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--warn), transparent 86%);
  color: var(--warn);
  font-weight: 950;
  direction: ltr;
}

.jalali-picker {
  position: absolute;
  z-index: 140;
  width: min(320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--bg-2), black 4%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.jalali-picker-head,
.jalali-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.jalali-picker-head {
  margin-bottom: 10px;
}

.jalali-picker-head button,
.jalali-picker-foot button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.jalali-picker-head strong {
  color: var(--text);
}

.jalali-title-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
}

.jalali-title-btn {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-2), transparent 12%);
  font-weight: 900;
}

.jalali-weekdays,
.jalali-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.jalali-month-grid,
.jalali-year-grid {
  display: grid;
  gap: 6px;
}

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

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

.jalali-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.jalali-days button,
.jalali-month-grid button,
.jalali-year-grid button {
  min-width: 0;
  min-height: 34px;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent;
  overflow-wrap: anywhere;
}

.jalali-days button:hover,
.jalali-month-grid button:hover,
.jalali-year-grid button:hover,
.jalali-month-grid button.active,
.jalali-year-grid button.active {
  border-color: var(--brand);
}

.jalali-picker-foot {
  margin-top: 10px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-btn {
  color: #04120d;
  background: linear-gradient(135deg, var(--brand), #8affbf);
  box-shadow: 0 14px 30px rgba(66, 230, 143, .2);
}

.ghost-btn {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.text-btn {
  color: var(--brand);
  background: transparent;
}

.wide { width: 100%; }

.content {
  width: 100%;
  max-width: 100%;
  padding: 16px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.category-tile {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: right;
}

.category-tile strong {
  font-size: 15px;
}

.category-tile span {
  color: var(--muted);
  font-size: 12px;
}

.category-tile.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand), transparent 35%);
}

.search-workbench {
  display: grid;
  gap: 12px;
}

.search-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.search-head h2 {
  margin-bottom: 4px;
}

.search-head p {
  margin: 0;
  color: var(--muted);
}

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

.search-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-section {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-2), transparent 18%);
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--brand);
  font-weight: 900;
}

.filter-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.filter-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.filter-field.range > span {
  grid-column: 1 / -1;
}

.filter-grid.dense {
  gap: 8px;
}

.profile-primary,
.profile-secondary {
  display: contents;
}

.profile-revision-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid color-mix(in oklab, var(--warn), transparent 52%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--warn), transparent 88%);
}

.profile-revision-panel strong {
  color: var(--text);
}

.profile-revision-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.profile-revision-panel .chip-row {
  gap: 6px;
}

.admin-workspace {
  display: grid;
  gap: 12px;
}

.admin-command {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand), transparent 88%), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow);
}

.admin-command-copy,
.admin-toolbar-copy {
  min-width: 0;
}

.admin-command-copy h2,
.admin-toolbar-copy h2 {
  margin: 0;
}

.admin-command-copy p,
.admin-toolbar-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.admin-command-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.admin-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid color-mix(in oklab, var(--brand), transparent 50%);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--brand), transparent 88%);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.admin-toolbar {
  border-top: 3px solid color-mix(in oklab, var(--brand), transparent 25%);
}

.admin-daily-head {
  margin-bottom: 0;
  border-top: 3px solid color-mix(in oklab, var(--blue), transparent 20%);
}

.admin-daily-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.admin-toolbar-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px;
}

.admin-toolbar-guide span,
.admin-tools-caption {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-toolbar-guide span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sms-event-panel {
  display: grid;
  gap: 14px;
}

.sms-event-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.sms-event-legend span,
.sms-event-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
}

.sms-event-legend svg,
.sms-event-state svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sms-event-legend .is-active,
.sms-event-card.is-active .sms-event-state {
  color: #167744;
}

.sms-event-legend .is-inactive,
.sms-event-card.is-inactive .sms-event-state {
  color: #b42318;
}

.sms-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 10px;
}

.sms-event-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-right: 4px solid #b42318;
  border-radius: 8px;
  background: var(--surface);
}

.sms-event-card.is-active {
  border-right-color: #167744;
}

.sms-event-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sms-event-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sms-event-title strong {
  overflow-wrap: anywhere;
}

.sms-event-title code {
  color: var(--muted);
  direction: ltr;
  font-size: 11px;
  text-align: left;
  overflow-wrap: anywhere;
}

.sms-event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.sms-event-toggle {
  width: 100%;
  margin-top: auto;
}

.expert-payout-page,
.expert-payout-result {
  display: grid;
  gap: 14px;
}

.payout-filter-panel,
.payout-settlement-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.payout-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.payout-summary-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.payout-summary-grid article.is-unpaid {
  border-color: color-mix(in oklab, var(--brand), transparent 45%);
  background: color-mix(in oklab, var(--brand), transparent 92%);
}

.payout-summary-grid span,
.payout-summary-grid small {
  color: var(--muted);
}

.payout-summary-grid strong {
  color: var(--text);
  font-size: 21px;
  overflow-wrap: anywhere;
}

.payout-report-actions {
  justify-content: flex-end;
}

.payout-table {
  min-width: 680px;
}

.payout-table th,
.payout-table td {
  text-align: right;
}

.payout-settlement-box {
  display: grid;
  gap: 12px;
  border-right: 4px solid var(--brand);
}

.payout-settlement-box h3,
.payout-settlement-box p {
  margin: 0;
}

.payout-settlement-box p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 719px) {
  .payout-filter-panel,
  .payout-settlement-box {
    padding: 10px;
  }

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

  .payout-summary-grid strong {
    font-size: 17px;
  }

  .payout-report-actions button {
    width: 100%;
  }
}

.admin-tools-caption {
  display: grid;
  gap: 3px;
  padding: 9px;
}

.admin-tools-caption strong,
.admin-tools-caption span {
  display: block;
}

.admin-tools-caption span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-money-note {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid color-mix(in oklab, var(--gold), transparent 45%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--gold), var(--surface) 90%);
}

.admin-money-note strong,
.admin-money-note span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-money-note strong {
  color: var(--text);
  font-size: 13px;
}

.admin-money-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.sms-vars-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

#smsEventTemplateVars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-user-filters,
.admin-user-tools {
  display: grid;
  gap: 8px;
}

.admin-user-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.admin-user-tools {
  grid-template-columns: 1fr;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

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

.admin-hub {
  display: grid;
  gap: 10px;
}

.admin-hub-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 154px;
  padding: 14px;
  text-align: right;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.admin-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(66, 230, 143, .45);
  background: var(--surface-strong);
}

.admin-hub-card span,
.admin-hub-card strong,
.admin-hub-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-hub-card span {
  font-size: 15px;
  font-weight: 900;
}

.admin-hub-card strong {
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
}

.admin-hub-card small {
  color: var(--muted);
  line-height: 1.7;
}

.admin-hub-card.idle {
  opacity: .78;
}

.admin-hub-card.urgent {
  border-color: color-mix(in oklab, var(--coral), var(--line) 55%);
}

.admin-hub-card.work {
  border-color: color-mix(in oklab, var(--gold), var(--line) 60%);
}

.admin-hub-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: fit-content;
  max-width: 100%;
  margin-top: auto;
  padding: 0 10px;
  border: 1px solid color-mix(in oklab, var(--brand), transparent 55%);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--brand), transparent 88%);
  font-size: 12px;
  font-weight: 900;
}

.admin-hub-card.idle .admin-hub-action {
  border-color: var(--line);
  color: var(--muted);
  background: var(--surface-2);
}

.admin-page {
  margin-bottom: 0;
}

.admin-page .section-head {
  align-items: flex-start;
}

.admin-page .text-btn {
  margin-bottom: 8px;
}

.admin-page-list {
  gap: 12px;
}

.admin-detail {
  display: grid;
  gap: 12px;
}

#adminQueues > .support-user-search-panel,
#adminQueues > .support-queue-map {
  grid-column: 1 / -1;
  width: 100%;
}

.support-eyebrow,
.support-case-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: fit-content;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid color-mix(in oklab, var(--blue), transparent 55%);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--blue), var(--surface) 88%);
  font-size: 11px;
  font-weight: 900;
}

.support-user-identity h2 {
  margin: 8px 0 0;
}

.support-user-identity p,
.support-case-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.support-fast-actions,
.support-case-meta,
.support-security-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.support-case-meta span,
.support-security-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.support-queue-map,
.support-user-command {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.support-fast-actions button {
  justify-content: space-between;
  gap: 8px;
}

.support-fast-actions strong {
  margin-inline-start: auto;
  font-size: 13px;
}

.support-revision-box {
  margin-top: 10px;
}

.check-chip {
  gap: 6px;
  cursor: pointer;
}

.check-chip input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
}

.support-security-strip.locked span:first-child {
  background: color-mix(in oklab, var(--coral), white 32%);
}

.support-case-card {
  display: grid;
  gap: 12px;
}

.profile-completion-warning {
  padding: 10px 12px;
  border: 1px solid color-mix(in oklab, var(--coral), var(--line) 35%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--coral), var(--surface) 90%);
}

.profile-completion-warning strong,
.profile-completion-warning p {
  display: block;
  margin: 0;
  line-height: 1.8;
}

.admin-partial-warning {
  display: grid;
  gap: 4px;
  margin-block: 0 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in oklab, var(--gold), var(--line) 38%);
  border-radius: 10px;
  background: color-mix(in oklab, var(--gold), var(--surface) 91%);
}

.admin-partial-warning strong,
.admin-partial-warning p,
.admin-partial-warning small {
  margin: 0;
  line-height: 1.8;
}

.support-case-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.support-case-head > div {
  min-width: 0;
}

.support-case-head strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.chip.ok {
  border-color: color-mix(in oklab, var(--brand), var(--line) 45%);
}

.chip.warn {
  border-color: color-mix(in oklab, var(--coral), var(--line) 50%);
  color: var(--text);
}

.support-user-command {
  display: grid;
  gap: 12px;
  border-top: 4px solid color-mix(in oklab, var(--blue), transparent 15%);
}

.support-user-identity {
  min-width: 0;
}

.support-security-strip {
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.support-security-strip.locked {
  border-color: color-mix(in oklab, var(--coral), var(--line) 35%);
}

.support-security-strip button {
  margin-inline-start: auto;
}

.support-doc-row,
.support-inline-diff {
  min-width: 0;
}

.admin-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-user-edit {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-user-page {
  width: 100%;
}

.admin-user-page .section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-edit-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.admin-edit-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-edit-field > input,
.admin-edit-field > select,
.admin-edit-field > textarea {
  width: 100%;
}

.admin-edit-field > select[multiple] {
  min-height: 136px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.check-field input {
  inline-size: 18px;
  block-size: 18px;
  flex: 0 0 auto;
}

.admin-user-edit textarea {
  min-height: 88px;
}

.admin-related {
  min-width: 0;
}

.admin-related p {
  overflow-wrap: anywhere;
}

.profile-review-panel {
  display: grid;
  gap: 12px;
}

.review-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.identity-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.identity-review-grid.compact {
  margin: 10px 0;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.identity-review-grid > div,
.change-diff-row {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.identity-review-grid span,
.change-diff-row small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.identity-review-grid strong,
.change-diff-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.change-diff-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.change-diff-row {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

.change-field {
  color: var(--text);
  font-weight: 900;
}

.change-before,
.change-after {
  color: var(--text);
}

.change-after {
  border-inline-start: 3px solid var(--brand);
  padding-inline-start: 8px;
}

.profile-change-history {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.profile-change-history:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.support-detail-fold {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.support-detail-fold summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.support-detail-fold[open] summary {
  margin-bottom: 10px;
}

.admin-edit-fold {
  grid-column: 1 / -1;
}

@media (max-width: 430px) {
  .change-diff-row,
  .identity-review-grid,
  .identity-review-grid.compact {
    grid-template-columns: 1fr;
  }
}

.admin-related-row {
  display: grid;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.admin-related-row:first-of-type {
  border-top: 0;
}

.action-row.compact {
  justify-content: flex-start;
}

.admin-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.admin-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: admin-spin .8s linear infinite;
}

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

.admin-analysis-grid,
.admin-record-grid,
.admin-detail-columns,
.admin-settings-list {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.admin-analysis-panel,
.admin-record-card,
.admin-decision-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-analysis-panel h2,
.admin-decision-box h2 {
  font-size: 17px;
}

.admin-analysis-wide {
  grid-column: 1 / -1;
}

.admin-bars {
  display: grid;
  gap: 12px;
}

.admin-bar-row {
  display: grid;
  gap: 6px;
}

.admin-bar-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.admin-bar-row strong {
  color: var(--text);
}

.admin-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

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

.admin-rate-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-rate-grid strong,
.admin-rate-grid span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-rate-grid strong {
  font-size: 20px;
  color: var(--brand);
}

.admin-rate-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: right;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
}

.admin-activity-list {
  display: grid;
  gap: 0;
}

.admin-activity-row,
.admin-list-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}

.admin-activity-row:last-child,
.admin-list-row:last-child {
  border-bottom: 0;
}

.admin-activity-row > div,
.admin-list-row > div {
  min-width: 0;
}

.admin-activity-row strong,
.admin-activity-row span,
.admin-activity-row small,
.admin-list-row strong,
.admin-list-row span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-activity-row span,
.admin-activity-row small,
.admin-list-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-activity-row > div:last-child {
  flex: 0 0 auto;
  text-align: left;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.admin-result-head {
  margin: 6px 0 12px;
}

.admin-user-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.admin-select-check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-select-check input {
  width: 16px;
  min-height: 16px;
}

.admin-record-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-record-card h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.admin-record-card p {
  margin: 0;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.admin-record-meta {
  color: var(--muted);
  direction: ltr;
  text-align: left;
}

.admin-record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-record-foot > span {
  color: var(--muted);
  font-size: 12px;
}

.admin-kv {
  display: grid;
  grid-template-columns: minmax(90px, .4fr) minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.admin-kv dt,
.admin-kv dd {
  min-width: 0;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.admin-kv dt {
  color: var(--muted);
}

.admin-decision-box {
  margin-top: 14px;
}

.admin-page .admin-analysis-panel,
.admin-page .admin-decision-box {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.ticket-thread {
  display: grid;
  gap: 10px;
}

.ticket-message {
  width: min(88%, 760px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.ticket-message.from-admin {
  margin-right: auto;
  border-color: color-mix(in oklab, var(--brand), transparent 55%);
}

.ticket-message > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-message span {
  color: var(--muted);
  font-size: 12px;
}

.ticket-message p {
  margin: 10px 0 0;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.admin-settings-list {
  margin-top: 14px;
}

.admin-log-list {
  margin-top: 16px;
}

.ltr-text {
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.admin-user-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-user-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
}

.admin-user-card p {
  margin: 6px 0 0;
  color: var(--muted);
  direction: ltr;
  text-align: left;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.metric {
  min-width: 0;
  min-height: 84px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.section-head.compact { margin-bottom: 8px; }

.ad-list, .stack {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.ad-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.ad-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.code {
  color: var(--brand);
  font-weight: 900;
  direction: ltr;
  text-align: left;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.status-pill.status-tone-success {
  color: #087647;
  border-color: color-mix(in srgb, #0da968 42%, var(--line));
  background: color-mix(in srgb, #0da968 12%, var(--surface));
}

.status-pill.status-tone-danger {
  color: #c22d39;
  border-color: color-mix(in srgb, #e04451 46%, var(--line));
  background: color-mix(in srgb, #e04451 12%, var(--surface));
}

.status-pill.status-tone-warning {
  color: #a45e00;
  border-color: color-mix(in srgb, #e69522 48%, var(--line));
  background: color-mix(in srgb, #e69522 13%, var(--surface));
}

.status-pill.status-tone-info {
  color: #1767b2;
  border-color: color-mix(in srgb, #318ce7 44%, var(--line));
  background: color-mix(in srgb, #318ce7 12%, var(--surface));
}

.status-pill.status-tone-pending {
  color: #7659c8;
  border-color: color-mix(in srgb, #8064d7 42%, var(--line));
  background: color-mix(in srgb, #8064d7 12%, var(--surface));
}

.owner-ad-management-card {
  overflow: hidden;
  border-inline-start: 4px solid var(--line);
}

.owner-ad-management-card.status-success { border-inline-start-color: #0da968; }
.owner-ad-management-card.status-danger { border-inline-start-color: #e04451; }
.owner-ad-management-card.status-warning { border-inline-start-color: #e69522; }
.owner-ad-management-card.status-info { border-inline-start-color: #318ce7; }
.owner-ad-management-card.status-pending { border-inline-start-color: #8064d7; }

.ad-services-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-block: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 17%, var(--surface)), color-mix(in srgb, #e4a21a 10%, var(--surface)));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 11%, transparent);
}

.ad-services-callout-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #df9b12);
}

.ad-services-callout p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }

.boost-capacity-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
  color: #087647;
  background: color-mix(in srgb, #0da968 11%, var(--surface));
}

.boost-capacity-note.is-full {
  color: #c22d39;
  background: color-mix(in srgb, #e04451 11%, var(--surface));
}

.copy-code-control {
  appearance: none;
  cursor: pointer;
  direction: ltr;
  font: inherit;
}

.copy-code-control:hover,
.copy-code-control:focus-visible {
  color: var(--brand);
  border-color: var(--brand);
}

.copy-code-control svg { width: 15px; height: 15px; }

@media (max-width: 700px) {
  .ad-services-callout { grid-template-columns: auto minmax(0, 1fr); }
  .ad-services-callout .primary-btn { grid-column: 1 / -1; width: 100%; }
}

.price {
  margin-top: 12px;
  font-weight: 900;
  color: var(--warn);
}

.surface {
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.search-panel {
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
}

.filter-grid,
.form-grid {
  display: grid;
  gap: 9px;
}

#profileForm,
#adForm {
  gap: 12px;
}

#profileForm input,
#profileForm select,
#profileForm textarea,
#adForm input,
#adForm select,
#adForm textarea {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

#profileForm input:focus,
#profileForm select:focus,
#profileForm textarea:focus,
#adForm input:focus,
#adForm select:focus,
#adForm textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 34%, transparent);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}

#profileDetailsBox,
[data-view="post"].content > .surface {
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

#profileForm[data-role-form],
#adForm[data-role-form] {
  position: relative;
}

#profileForm[data-role-form]::before,
#adForm[data-role-form]::before {
  content: "فرم نقش‌محور";
  grid-column: 1 / -1;
  display: inline-flex;
  width: max-content;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--brand);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.media-upload-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--brand) 42%, var(--line));
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, transparent), var(--surface-2));
}

.media-panel-head {
  margin-bottom: 12px;
}

.upload-slot {
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.upload-slot:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.ad-submit-actions {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
}

.ad-submit-readiness {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 700;
}

.ad-submit-actions .primary-btn {
  grid-column: 2;
}

.ad-submit-actions #adMediaCancel {
  grid-column: 1;
  grid-row: 2;
}

.ad-submit-actions .primary-btn:disabled {
  background: #8b929d;
  border-color: #8b929d;
  color: #e8eaed;
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  pointer-events: none;
}

.ad-submit-actions .primary-btn.is-ready:not(:disabled) {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 28%, transparent);
}

.notification-nav {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 5px;
  inset-inline-start: 8px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 10px;
  font-weight: 900;
}

.notification-card.unread {
  border-inline-start: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

[data-owner-ad-fields] .documents-upload-grid {
  display: none;
}

.form-grid > small,
.form-hint,
.form-grid > .file-input,
.form-grid > .file-picker {
  grid-column: 1 / -1;
}

.form-grid > small,
.form-hint {
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 9px 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.panel-tabs button {
  min-width: 0;
  min-height: 66px;
  padding: 8px 6px;
  font-size: 12px;
}

.segmented button {
  min-height: 42px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segmented button.active {
  color: #04120d;
  background: var(--brand);
}

.panel-tabs button span,
.panel-tabs button small {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-tabs button span {
  font-weight: 950;
}

.panel-tabs button small {
  color: color-mix(in oklab, var(--muted), transparent 8%);
  font-size: 10px;
  font-weight: 700;
}

.panel-tabs button.active small {
  color: rgba(4, 18, 13, .72);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e6ff75, var(--brand));
  color: #04120d;
  font-weight: 950;
}

.avatar.has-image {
  overflow: hidden;
  padding: 0;
  background: var(--surface-2);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-upload {
  box-shadow: none;
}

.profile-card h2 { margin-bottom: 4px; }
.profile-card p { margin: 0; color: var(--muted); }

.unit-field input {
  width: 100%;
}

.verification-script {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--brand), var(--surface) 90%);
  color: var(--text);
  line-height: 1.8;
}

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

.profile-action-surface {
  display: grid;
  gap: 14px;
  border-color: color-mix(in oklab, var(--brand), var(--line) 70%);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand), transparent 88%), transparent 62%),
    var(--surface);
}

.profile-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-action-head h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.profile-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-password-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.password-field-wrap {
  position: relative;
  display: block;
}

.password-field-wrap > input {
  width: 100%;
  padding-inline-end: 46px;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.action-row button {
  flex: 1 1 112px;
}

.danger {
  color: var(--danger);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

blockquote {
  margin: 8px 0;
  padding: 8px 10px;
  border-right: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.file-input {
  padding-top: 12px;
  margin-bottom: 8px;
}

.enhanced-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.file-picker {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px dashed color-mix(in oklab, var(--brand), transparent 50%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-2), transparent 18%);
  cursor: pointer;
}

.file-picker:hover {
  border-color: var(--brand);
  background: color-mix(in oklab, var(--brand), var(--surface) 93%);
}

.file-picker-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #092017;
  background: color-mix(in oklab, var(--brand), white 36%);
}

.file-picker-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-picker-copy strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.file-picker-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.file-picker-size {
  min-width: max-content;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 850;
}

.file-picker[data-state="selected"],
.file-picker[data-state="done"] {
  border-style: solid;
  border-color: color-mix(in oklab, var(--brand), transparent 28%);
}

.file-picker[data-state="processing"] {
  border-style: solid;
  border-color: color-mix(in oklab, var(--blue), transparent 30%);
}

.file-picker[data-state="error"] {
  border-color: color-mix(in oklab, var(--danger), transparent 24%);
  background: color-mix(in oklab, var(--danger), var(--surface) 94%);
}

.file-picker[data-state="error"] .file-picker-copy span,
.file-picker[data-state="error"] .file-picker-size {
  color: var(--danger);
}

@media (max-width: 430px) {
  .media-panel-head {
    align-items: flex-start;
  }

  .media-upload-grid,
  .documents-upload-grid {
    grid-template-columns: 1fr;
  }

  .documents-upload-grid .upload-slot-wide {
    grid-column: auto;
  }

  .file-picker {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .file-picker-size {
    grid-column: 2;
    justify-self: start;
  }
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: min(100%, 760px);
  max-height: 86vh;
  transform: translateX(-50%);
  overflow: auto;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: color-mix(in oklab, var(--bg-2), black 6%);
  border: 1px solid var(--line);
  box-shadow: 0 -22px 70px rgba(0, 0, 0, .42);
}

.sheet-handle {
  width: 44px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: var(--line);
}

.sheet .close {
  position: absolute;
  top: 12px;
  left: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 70;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 720px);
  min-height: 48px;
  padding: 13px 16px;
  border-radius: 8px;
  background: #0a2118;
  border: 1px solid rgba(66, 230, 143, .34);
  box-shadow: var(--shadow);
  color: var(--text);
}

html.light .toast {
  background: #ffffff;
  color: var(--text);
  border-color: color-mix(in oklab, var(--brand), transparent 62%);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  transform: translateX(-50%);
  width: 100%;
  max-width: 840px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg), black 10%);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.bottom-nav button {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 56px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.bottom-nav span { font-size: 20px; line-height: 1; }
.bottom-nav small { font-size: 11px; }

.bottom-nav button.active {
  color: #04120d;
  background: linear-gradient(135deg, var(--brand), #8affbf);
}

.empty {
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.mini-card p { margin-bottom: 6px; color: var(--muted); }
.mini-card strong { color: var(--text); }

.player-detail {
  display: grid;
  gap: 12px;
}

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--line);
}

.detail-hero h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.3;
}

.detail-avatar {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.detail-avatar.fallback {
  display: grid;
  place-items: center;
  color: #04120d;
  font-weight: 950;
  background: linear-gradient(135deg, #e6ff75, var(--brand));
}

.detail-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface), transparent 8%);
}

.detail-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.detail-panel-head span {
  color: var(--brand);
  font-weight: 900;
}

.detail-panel-head strong {
  color: var(--text);
  text-align: left;
}

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

.detail-stat {
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.detail-stat span {
  color: var(--muted);
  font-size: 12px;
}

.detail-stat strong {
  color: var(--text);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.detail-grid-2 {
  display: grid;
  gap: 12px;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-list dd {
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.8;
}

.expert-panel {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border-color: color-mix(in oklab, var(--brand), transparent 48%);
}

.empty-expert {
  display: block;
  border-color: var(--line);
}

.score-box {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 112px;
  border-radius: 8px;
  color: #04120d;
  background: linear-gradient(135deg, #ffd166, var(--brand));
}

.score-box.good {
  background: linear-gradient(135deg, #91f7b7, #42e68f);
}

.score-box.basic {
  background: linear-gradient(135deg, #ffd166, #ffef9a);
}

.score-box.excellent {
  background: linear-gradient(135deg, #42e68f, #8affbf);
}

.score-box strong {
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.score-box span {
  margin-top: 6px;
  font-weight: 850;
}

.expert-copy {
  min-width: 0;
}

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

.video-tile {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

.video-tile span {
  color: var(--brand);
  font-weight: 850;
}

.video-tile strong {
  overflow-wrap: anywhere;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: color-mix(in oklab, var(--bg-2), black 6%);
}

.verified {
  color: #04120d;
  background: var(--brand);
}

.hidden { display: none !important; }

.auth-locked .topbar [data-panel],
.auth-locked [data-view]:not([data-view="auth"]) {
  display: none !important;
}

.auth-locked .app-shell {
  max-width: none;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  align-items: stretch;
}

.auth-locked .topbar {
  position: static;
  width: min(calc(100vw - 32px), 620px);
  margin: 24px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-locked [data-view="auth"] {
  width: min(calc(100vw - 32px), 620px);
  margin: 0 auto;
  padding: 0;
  align-self: center;
}

.auth-locked #authBox {
  margin: 0;
  padding: 0 18px 18px;
  overflow: hidden;
}

.auth-home-row {
  display: flex;
  justify-content: flex-start;
  padding: 12px 0 10px;
}

#authBox .auth-tabs,
.auth-locked #authBox .segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: calc(100% + 36px);
  margin: 0 -18px 18px;
  border-radius: 8px 8px 0 0;
}

#authBox .form-grid,
.auth-locked #authBox .form-grid {
  grid-template-columns: 1fr !important;
}

#authBox .form-grid > button,
.auth-locked #authBox .wide {
  grid-column: auto !important;
  width: 100%;
}

.auth-locked #authBox::before {
  content: none;
  display: none;
}

#smsLoginForm .primary-btn,
#otpForm .primary-btn {
  min-height: 48px;
}

.otp-resend-row {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.otp-resend-row strong {
  color: var(--text);
  direction: ltr;
}

#otpResendButton:disabled,
#otpResendButton.is-disabled {
  opacity: .48;
  filter: grayscale(1);
  cursor: not-allowed;
  pointer-events: none;
  color: var(--muted);
}

#otpResendButton:not(:disabled):not(.is-disabled) {
  color: var(--brand-strong);
}

.finance-revenue-transactions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.finance-revenue-transactions > .surface {
  width: 100%;
  margin: 0;
}

.legal-shell {
  min-height: 100vh;
  padding: 24px 16px 120px;
}

.legal-page {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.legal-page h1 {
  margin: 18px 0;
  font-size: 32px;
}

.legal-body {
  color: var(--text);
  line-height: 2.1;
  white-space: normal;
}

.sms-log-card {
  border-inline-start: 4px solid var(--line);
}

.sms-log-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.sms-log-card summary::-webkit-details-marker {
  display: none;
}

.sms-log-card strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sms-log-body {
  margin-top: 10px;
}

.sms-log-card.sms-ok {
  border-inline-start-color: var(--brand);
}

.sms-log-card.sms-ok .status-pill,
.sms-log-card.sms-ok strong svg {
  color: var(--brand);
}

.sms-log-card.sms-failed {
  border-inline-start-color: var(--danger);
}

.sms-log-card.sms-failed .status-pill,
.sms-log-card.sms-failed strong svg {
  color: var(--danger);
}

@media (min-width: 720px) {
  .hero { border-radius: 0 0 16px 16px; }
  .content { padding-inline: 22px; }
  .home-command-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .home-lanes,
  .upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ad-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 520px) and (max-width: 719px) {
  h1 {
    font-size: 36px;
    line-height: 1.08;
  }

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

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

@media (max-width: 430px) {
  h1 {
    font-size: 28px;
    line-height: 1.15;
    max-width: calc(100vw - 32px);
  }

  .hero,
  .hero-content {
    min-height: 380px;
  }

  .hero-content {
    padding-inline: 16px;
    align-items: center;
    text-align: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions button {
    width: 100%;
  }

  .quick-search {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: calc(100vw - 32px);
    overflow: hidden;
  }

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

  .bottom-nav small { font-size: 10px; }
  .bottom-nav span { font-size: 18px; }
  .panel-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-grid { grid-template-columns: 1fr; }
  .search-head {
    align-items: stretch;
    flex-direction: column;
  }
  .role-picker {
    grid-template-columns: 1fr;
  }
  .filter-field.range {
    grid-template-columns: 1fr;
  }
  .detail-hero {
    align-items: flex-start;
  }
  .detail-avatar {
    width: 58px;
    height: 58px;
  }
  .detail-stats,
  .detail-video-grid,
  .detail-actions,
  .expert-panel {
    grid-template-columns: 1fr;
  }
  .score-box {
    min-height: 92px;
  }
}

@media (max-width: 819px) {
  .hero-content {
    align-items: center;
    text-align: center;
    width: 100vw;
    max-width: 100vw;
    margin-inline: auto;
  }

  .hero-copy {
    width: min(320px, calc(100vw - 48px));
    max-width: min(320px, calc(100vw - 48px));
    margin-inline: auto;
    font-size: 14px;
    line-height: 2;
    text-align: center;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions button {
    width: 100%;
  }
}

@media (min-width: 820px) {
  .app-shell {
    max-width: none;
  }

  .topbar,
  .hero,
  .content {
    width: min(calc(100% - 32px), 1440px);
    margin-inline: auto;
  }

  .hero {
    min-height: 360px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .hero-content {
    min-height: 360px;
    padding: 28px;
  }

  .quick-search {
    max-width: 760px;
  }

  .content {
    padding: 22px 28px;
  }

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

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

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

  .role-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .search-toolbar {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .admin-user-filters {
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, 1fr)) auto auto;
  }

  .admin-user-tools {
    grid-template-columns: minmax(180px, .6fr) minmax(220px, 1fr) auto;
  }

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

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

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

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

  .form-grid textarea,
  .form-grid .wide,
  #ticketWorkspace,
  #subscriptionList {
    grid-column: 1 / -1;
  }

  [data-view="post"].content,
  [data-view="profile"].content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
    align-items: start;
    gap: 14px;
  }

  [data-view="post"].content {
    max-width: none;
  }

  [data-view="profile"].content .profile-card,
  [data-view="profile"].content #profileActions {
    grid-column: 1 / -1;
  }

  [data-view="orders"].content {
    max-width: 980px;
  }

  .ad-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .stack {
    gap: 12px;
  }

  #adminQueues > .surface .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet {
    width: min(920px, calc(100% - 64px));
    right: auto;
    left: 32px;
    bottom: 32px;
    transform: none;
    max-height: calc(100vh - 64px);
    border-radius: 8px;
  }

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

  .detail-grid-2 {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

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

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }

  body {
    background: linear-gradient(180deg, var(--bg), var(--bg-2));
  }

  .app-shell {
    padding: 0 104px 32px 32px;
  }

  .topbar {
    width: 100%;
    max-width: none;
    height: 66px;
    padding: 0 18px;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .hero,
  .content {
    width: 100%;
    max-width: none;
  }

  .hero {
    min-height: clamp(360px, 42vh, 560px);
  }

  .hero-content {
    min-height: clamp(360px, 42vh, 560px);
    padding: 32px;
  }

  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 22px;
  }

  .eyebrow,
  .check-line {
    font-size: 17px;
  }

  .category-tile strong {
    font-size: 19px;
  }

  .category-tile span,
  .metric span,
  .chip,
  .status-pill,
  .panel-tabs button,
  .bottom-nav small {
    font-size: 16px;
  }

  .metric strong {
    font-size: 28px;
  }

  .bottom-nav span {
    font-size: 24px;
  }

  .content {
    padding: 24px 0;
  }

  .search-workbench {
    max-width: 1280px;
    margin-inline: auto;
    gap: 14px;
  }

  .search-head {
    align-items: center;
    padding-inline: 2px;
  }

  .role-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }

  .category-tile {
    min-height: 104px;
    padding: 14px;
  }

  .category-tile strong {
    font-size: 18px;
  }

  .category-tile span {
    font-size: 14px;
    line-height: 1.6;
  }

  .search-panel {
    padding: 16px;
  }

  .filter-section {
    padding: 14px;
    margin-bottom: 12px;
  }

  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }

  .filter-grid.dense {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .metric-row,
  .admin-metrics {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .admin-hub {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .ad-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  [data-view="post"].content,
  [data-view="profile"].content {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
    gap: 18px;
  }

  .bottom-nav {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    transform: none;
    width: 84px;
    max-width: none;
    height: 100vh;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(68px, max-content);
    align-content: start;
    gap: 8px;
    padding: 12px 10px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .bottom-nav button {
    min-height: 68px;
  }

  .bottom-nav small {
    font-size: 15px;
  }

  .toast {
    bottom: 32px;
    width: min(520px, calc(100% - 150px));
  }

  [data-view="admin"].content {
    width: 100%;
  }

  [data-view="admin"].content > .section-head,
  [data-view="admin"].content > .panel-tabs,
  [data-view="admin"].content > .admin-metrics,
  [data-view="admin"].content > #adminList {
    width: 100%;
    max-width: none;
    margin-inline: auto;
  }

  #adminQueues {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  #adminQueues > .surface {
    margin-bottom: 0;
  }

  .auth-locked .app-shell {
    padding: 0 32px 32px;
  }

  .auth-locked .topbar {
    width: min(100%, 1120px);
    max-width: 1120px;
    height: 70px;
    margin-top: 22px;
  }

  .auth-locked [data-view="auth"] {
    width: min(100%, 1040px);
    max-width: 1040px;
    margin: clamp(32px, 8vh, 88px) auto 0;
    align-self: start;
    display: block;
  }

  .auth-locked #authBox {
    padding: 30px;
  }

  .auth-locked #authBox .segmented {
    width: min(100%, 720px);
    margin: 0 0 18px auto;
  }

  .auth-locked #authBox .form-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
    gap: 14px;
  }

  .auth-locked #authBox .wide {
    grid-column: auto !important;
  }

  .auth-locked #authBox::before {
    margin-bottom: 18px;
    font-size: 36px;
    text-align: right;
  }
}

/* Submission UX: persistent transfer feedback, a terminal receipt screen, and
   fully readable management tabs on every breakpoint. */
.submission-progress {
  position: fixed;
  z-index: 180;
  inset: 12px 50% auto auto;
  transform: translateX(50%);
  width: min(680px, calc(100vw - 24px));
  padding: 14px 16px 16px;
  border: 1px solid color-mix(in oklab, var(--brand), var(--line) 45%);
  border-radius: 10px;
  background: color-mix(in oklab, var(--surface-strong), transparent 3%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.submission-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.submission-progress-head strong,
.submission-progress-head span { display: block; }
.submission-progress-head span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.submission-progress-head b { color: var(--brand); font-size: 18px; }
.submission-progress.is-error .submission-progress-head b { color: var(--danger); }

.submission-progress-track {
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.submission-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--brand));
  transition: width .18s ease;
}

.submission-progress.is-error .submission-progress-track > span { background: var(--danger); }

.submission-receipt-view {
  min-height: min(620px, calc(100dvh - 150px));
  display: grid;
  place-items: center;
}

.submission-receipt-view.hidden { display: none; }

.submission-receipt {
  width: min(100%, 620px);
  padding: clamp(24px, 6vw, 54px);
  text-align: center;
}

.submission-receipt-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--brand);
  background: color-mix(in oklab, var(--brand), transparent 86%);
}

.submission-receipt-icon .lucide { width: 42px; height: 42px; }
.submission-receipt h1 { margin: 6px 0 10px; font-size: clamp(24px, 5vw, 34px); }
.submission-receipt > p:not(.section-kicker) { margin: 0; color: var(--text); font-size: 16px; line-height: 1.9; }
.submission-receipt > small { display: block; margin: 10px 0 24px; color: var(--muted); line-height: 1.9; }

.admin-workspace .panel-tabs { align-items: stretch; }
.admin-workspace .panel-tabs button { min-height: 94px; height: auto; overflow: visible; }
.admin-workspace .panel-tabs button span,
.admin-workspace .panel-tabs button small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.55;
}

@media (max-width: 719px) {
  .submission-progress { inset-block-start: 8px; padding: 12px; }
  .submission-progress-head { align-items: flex-start; }
  .admin-workspace .panel-tabs { grid-auto-columns: minmax(142px, 1fr); }
}

/* Marketplace cards, detail experience, and dialogs */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ad-card {
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(14, 52, 38, .105), inset 0 0 0 1px var(--line);
}

.ad-card::before {
  display: none;
}

.ad-card-visual {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(17, 121, 205, .08), rgba(15, 167, 108, .45)),
    #dcefe7;
}

.ad-card-visual.staff-visual {
  background:
    linear-gradient(145deg, rgba(243, 185, 66, .52), rgba(255, 117, 101, .2)),
    #f8eee0;
}

.ad-card-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.ad-card-avatar-fallback {
  display: grid;
  place-items: center;
  color: rgba(6, 37, 26, .72);
}

.ad-card-avatar-fallback .lucide {
  width: 54px;
  height: 54px;
}

.ad-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 21, 15, .2), transparent 44%, rgba(4, 21, 15, .64));
  pointer-events: none;
}

.ad-card-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}

.ad-code,
.ad-status,
.ad-type-mark {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 24, 17, .48);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 800;
}

.ad-code {
  direction: ltr;
}

.ad-code .lucide,
.ad-status .lucide,
.ad-type-mark .lucide {
  width: 14px;
  height: 14px;
}

.ad-status {
  color: #092419;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(137, 239, 183, .9);
}

.ad-score,
.ad-type-mark {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 11px;
}

.ad-score {
  min-width: 88px;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 8px;
  color: #122015;
  background: linear-gradient(135deg, #ffe38d, #8cf0b9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

.ad-score .lucide {
  width: 16px;
  height: 16px;
}

.ad-score strong {
  font-size: 21px;
}

.ad-score small {
  font-size: 10px;
  font-weight: 800;
}

.ad-card-content {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.ad-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ad-card-heading > div {
  min-width: 0;
}

.ad-card-category,
.ad-card-owner,
.ad-card-bottom time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.ad-card-category {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
}

.ad-card-category .lucide,
.ad-card-owner .lucide,
.ad-card-bottom time .lucide {
  width: 14px;
  height: 14px;
}

.ad-card h2 {
  margin: 5px 0;
  font-size: 21px;
  line-height: 1.45;
}

.ad-card-owner {
  margin: 0;
  font-size: 12px;
}

.ad-save-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}

.ad-save-btn:hover,
.ad-save-btn.saved {
  color: #e84f62;
  border-color: color-mix(in oklab, #e84f62, transparent 56%);
  background: color-mix(in oklab, #e84f62, var(--surface) 91%);
}

.ad-save-btn.saved .lucide {
  fill: currentColor;
}

.ad-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.ad-card-fact {
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.ad-card-fact > .lucide {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.ad-card-fact > span {
  min-width: 0;
}

.ad-card-fact small,
.ad-card-fact strong {
  display: block;
  overflow-wrap: anywhere;
}

.ad-card-fact small {
  color: var(--muted);
  font-size: 9px;
}

.ad-card-fact strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
}

.ad-card-description {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  line-height: 1.9;
  font-size: 13px;
}

.ad-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ad-card-price small,
.ad-card-price strong {
  display: block;
}

.ad-card-price small {
  color: var(--muted);
  font-size: 10px;
}

.ad-card-price strong {
  margin-top: 3px;
  color: #d98d00;
  font-size: 17px;
}

.ad-card-price strong span {
  font-size: 10px;
}

.ad-card-bottom time {
  flex: 0 0 auto;
  font-size: 10px;
}

.ad-card-actions {
  margin-top: 12px;
}

.ad-card-actions > .action-row {
  margin-top: 0;
}

.ad-view-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-radius: 8px;
  color: #081b13;
  background: linear-gradient(135deg, color-mix(in oklab, var(--brand), white 8%), #67e5a6);
  font-weight: 900;
}

.ad-view-btn:hover .lucide {
  transform: translate(-3px, -3px);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(3, 16, 11, .46);
  backdrop-filter: blur(4px);
}

body.sheet-open,
body.dialog-open,
html.sheet-open,
html.dialog-open {
  overflow: hidden;
}

.sheet {
  z-index: 50;
  width: 100%;
  max-width: none;
  max-height: 94dvh;
  padding: 24px 14px calc(18px + env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: color-mix(in oklab, var(--bg-2), white 2%);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .32);
}

.sheet .close {
  position: sticky;
  z-index: 8;
  top: 0;
  margin-right: auto;
  margin-bottom: -42px;
  background: color-mix(in oklab, var(--surface-strong), transparent 5%);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .1);
}

.player-detail {
  gap: 14px;
  padding-top: 2px;
}

.detail-profile-hero {
  min-width: 0;
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 20px 16px;
  border: 1px solid color-mix(in oklab, var(--brand), transparent 64%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand), transparent 80%), color-mix(in oklab, var(--blue), transparent 87%)),
    var(--surface);
}

.staff-detail-hero {
  border-color: color-mix(in oklab, var(--gold), transparent 54%);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--gold), transparent 83%), color-mix(in oklab, var(--coral), transparent 91%)),
    var(--surface);
}

.detail-profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-profile-identity > div:last-child {
  min-width: 0;
}

.detail-avatar {
  width: 82px;
  height: 82px;
  border: 3px solid rgba(255, 255, 255, .76);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(14, 52, 38, .18);
}

.detail-avatar.fallback .lucide {
  width: 32px;
  height: 32px;
}

.detail-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  direction: ltr;
  font-size: 11px;
  font-weight: 850;
}

.detail-code .lucide {
  width: 13px;
  height: 13px;
}

.detail-profile-hero h1 {
  margin: 4px 0;
  font-size: 24px;
}

.detail-profile-identity p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-profile-identity p .lucide,
.detail-profile-hero .chip .lucide {
  width: 14px;
  height: 14px;
}

.detail-profile-highlight {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-highlight-score span,
.detail-highlight-score strong {
  display: block;
}

.detail-highlight-score span {
  color: var(--muted);
  font-size: 10px;
}

.detail-highlight-score strong {
  margin-top: 3px;
  color: var(--brand);
  font-size: 25px;
}

.detail-highlight-score strong small {
  font-size: 11px;
}

.detail-highlight-score.muted strong {
  color: var(--muted);
  font-size: 14px;
}

.detail-publish-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.detail-publish-date .lucide {
  width: 14px;
  height: 14px;
}

.detail-panel {
  padding: 15px;
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(14, 52, 38, .065);
}

.detail-panel-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.detail-panel-head > span .lucide {
  width: 18px;
  height: 18px;
}

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

.detail-stat {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 9px;
  overflow: hidden;
  padding: 10px;
  background: color-mix(in oklab, var(--surface-2), transparent 12%);
}

.detail-stat-icon {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  align-self: center;
  border-radius: 8px;
  color: #0a251a !important;
  background: color-mix(in oklab, var(--brand), white 44%);
}

.detail-stat-icon .lucide {
  width: 18px;
  height: 18px;
}

.detail-stat.tone-blue .detail-stat-icon { background: color-mix(in oklab, var(--blue), white 47%); }
.detail-stat.tone-gold .detail-stat-icon { background: color-mix(in oklab, var(--gold), white 34%); }
.detail-stat.tone-coral .detail-stat-icon { background: color-mix(in oklab, var(--coral), white 48%); }

.detail-stat > span:not(.detail-stat-icon) {
  margin: 0;
  font-size: 10px;
}

.detail-stat strong {
  font-size: 13px;
}

.detail-list {
  gap: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(105px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.detail-list dt .lucide {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.detail-list dd {
  margin: 0;
  font-size: 13px;
}

.expert-panel {
  border: 1px solid color-mix(in oklab, var(--brand), transparent 44%);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand), transparent 91%), color-mix(in oklab, var(--gold), transparent 93%)),
    var(--surface);
}

.empty-expert {
  display: flex;
  align-items: center;
  gap: 12px;
}

.empty-expert-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}

.empty-expert strong {
  display: block;
  margin-bottom: 4px;
}

.expert-price {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  margin-bottom: 10px;
}

.expert-price > .lucide {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  color: #d98d00;
}

.expert-price span {
  color: var(--muted);
  font-size: 10px;
}

.expert-price strong {
  font-size: 14px;
}

.video-tile {
  position: relative;
  min-height: 128px;
  justify-content: flex-end;
  overflow: hidden;
  padding: 14px;
  border-color: color-mix(in oklab, var(--blue), transparent 66%);
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--blue), transparent 84%), color-mix(in oklab, var(--brand), transparent 88%)),
    var(--surface-2);
}

.video-play {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #071b12 !important;
  background: color-mix(in oklab, var(--brand), white 35%);
}

.video-play .lucide {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.video-tile > span:not(.video-play),
.video-tile small {
  color: var(--muted);
  font-size: 10px;
}

.video-tile:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.video-tile.locked,
.ghost-btn.locked {
  cursor: not-allowed;
  opacity: .76;
  border-style: dashed;
}

.detail-actions {
  z-index: 6;
  bottom: calc(-24px - env(safe-area-inset-bottom));
  margin: 0 -14px -18px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-2), transparent 4%);
  backdrop-filter: blur(16px);
}

.detail-loading {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding-top: 18px;
}

.skeleton {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2), color-mix(in oklab, var(--surface-2), white 10%), var(--surface-2));
  background-size: 220% 100%;
  animation: skeleton-wave 1.3s ease infinite;
}

.skeleton-avatar { width: 76px; height: 76px; grid-row: 1; }
.skeleton-title { width: 54%; height: 24px; margin: 8px 0 12px; }
.skeleton-line { width: 82%; height: 14px; }
.skeleton-panel { grid-column: 1 / -1; height: 150px; }

@keyframes skeleton-wave {
  to { background-position: -220% 0; }
}

.compact-loading {
  min-height: 180px;
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 16, 11, .58);
  backdrop-filter: blur(6px);
}

.app-dialog {
  width: min(100%, 520px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .32);
}

.app-dialog-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 11px;
}

.app-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #092116;
  background: color-mix(in oklab, var(--blue), white 45%);
}

.app-dialog-head h2 {
  margin: 2px 0 3px;
  font-size: 19px;
}

.app-dialog-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
}

.app-dialog-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.app-dialog-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dialog-error {
  color: var(--danger);
}

.app-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.danger-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #d83f53, #ff7565);
  box-shadow: 0 10px 24px rgba(216, 63, 83, .22);
}

.toast {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  color: var(--text);
  background: var(--surface-strong);
  border-color: color-mix(in oklab, var(--brand), transparent 55%);
}

.toast > .lucide {
  color: var(--brand);
}

.toast[data-type="error"] {
  border-color: color-mix(in oklab, var(--danger), transparent 42%);
  box-shadow: 0 14px 32px rgba(216, 63, 83, .16);
}

.toast[data-type="error"] > .lucide {
  color: var(--danger);
}

.toast button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.toast button .lucide {
  width: 16px;
  height: 16px;
}

@media (max-width: 430px) {
  .ad-card-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-profile-identity {
    align-items: flex-start;
  }

  .detail-avatar {
    width: 68px;
    height: 68px;
  }

  .detail-profile-hero h1 {
    font-size: 20px;
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .app-dialog-head {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
  }

  .app-dialog-icon {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 720px) {
  .detail-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-profile-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 24px;
  }

  .detail-profile-highlight {
    min-width: 170px;
    height: 100%;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 0 18px 0 0;
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  .detail-avatar {
    width: 104px;
    height: 104px;
  }
}

@media (min-width: 1024px) {
  .sheet {
    inset: 24px 226px 24px 24px;
    width: auto;
    max-height: none;
    transform: none;
    padding: 28px 24px 24px;
    border-radius: 8px;
  }

  .sheet .close {
    margin-bottom: -40px;
  }

  .detail-actions {
    bottom: -28px;
    margin: 0 -24px -24px;
    padding-inline: 24px;
  }

  .detail-stat {
    min-height: 102px;
  }

}

@media (min-width: 1320px) {
  .ad-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .metric-row {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .admin-metrics {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

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

  #adminQueues > .surface .stack {
    grid-template-columns: 1fr;
  }
}

/* Desktop workspace */
@media (min-width: 1024px) {
  html {
    font-size: 17px;
  }

  body {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  }

  .app-shell {
    padding: 16px 220px 40px 32px;
  }

  .topbar,
  .hero,
  .content {
    width: min(100%, 1280px);
    max-width: 1280px;
    margin-inline: auto;
  }

  .topbar {
    top: 16px;
    height: 64px;
    margin-top: 0;
    padding: 0 14px;
    justify-content: flex-start;
    gap: 10px;
    background: color-mix(in oklab, var(--bg-2), transparent 5%);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .16);
  }

  .topbar .brand {
    order: -1;
    margin-left: auto;
    font-size: 18px;
  }

  .topbar .icon-btn {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: clamp(340px, 38vh, 460px);
    margin-top: 16px;
  }

  .hero-content {
    min-height: clamp(340px, 38vh, 460px);
    padding: 32px 36px;
  }

  .hero-content h1 {
    margin-bottom: 16px;
    font-size: 44px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .quick-search {
    width: min(100%, 720px);
  }

  .content {
    padding: 24px 0 0;
  }

  .admin-command {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px;
  }

  .admin-command-actions {
    justify-content: flex-end;
  }

  .content > .section-head {
    min-height: 46px;
    margin-bottom: 10px;
  }

  .section-head h2,
  .section-head p {
    margin-bottom: 0;
  }

  .surface,
  .search-panel,
  .profile-card,
  .ad-card,
  .metric,
  .admin-hub-card,
  .admin-user-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  }

  .surface {
    padding: 18px;
    margin-bottom: 16px;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  textarea {
    min-height: 96px;
  }

  .primary-btn,
  .ghost-btn,
  .text-btn {
    min-height: 44px;
  }

  .bottom-nav {
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: auto;
    width: 188px;
    height: auto;
    padding: 16px 12px;
    grid-template-columns: 1fr;
    grid-auto-rows: 56px;
    align-content: start;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in oklab, var(--bg-2), black 5%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  }

  .bottom-nav::before {
    content: "FT";
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 8px;
    color: #04120d;
    background: var(--brand);
    font-weight: 950;
    direction: ltr;
  }

  .bottom-nav button {
    min-height: 56px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    place-items: center stretch;
    gap: 10px;
    padding: 0 12px;
    text-align: right;
  }

  .bottom-nav span {
    font-size: 20px;
  }

  .bottom-nav small {
    font-size: 15px;
    font-weight: 850;
  }

  .bottom-nav button.active {
    box-shadow: none;
  }

  .metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .metric {
    min-height: 104px;
    padding: 18px;
  }

  .metric strong {
    font-size: 30px;
  }

  .metric span {
    margin-top: 10px;
    font-size: 15px;
  }

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

  .ad-card {
    min-height: 220px;
    padding: 18px;
  }

  .search-workbench {
    max-width: none;
    gap: 16px;
  }

  .search-head {
    min-height: 54px;
  }

  .role-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .category-tile {
    min-height: 96px;
    padding: 16px;
  }

  .category-tile strong {
    font-size: 17px;
  }

  .category-tile span {
    font-size: 14px;
  }

  .search-panel {
    padding: 20px;
  }

  .search-toolbar {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 10px;
    margin-bottom: 16px;
  }

  .filter-section {
    padding: 16px;
    margin-bottom: 12px;
  }

  .filter-grid,
  .filter-grid.dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  [data-view="search"] > .ad-list {
    margin-top: 18px;
  }

  .panel-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    margin-bottom: 16px;
  }

  .panel-tabs button {
    min-height: 72px;
    font-size: 15px;
  }

  .panel-tabs button small {
    font-size: 11px;
  }

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

  .admin-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  #adminQueues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #adminQueues > .admin-hub,
  #adminQueues > .admin-page,
  #adminQueues > .admin-user-page,
  #adminQueues > .empty {
    grid-column: 1 / -1;
    width: 100%;
  }

  #adminQueues > .surface .stack {
    grid-template-columns: 1fr;
  }

  .admin-user-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-user-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-tools-caption {
    grid-column: 1 / -1;
  }

  .admin-user-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .admin-user-edit {
    gap: 12px;
    padding: 18px;
  }

  [data-view="post"].content,
  [data-view="profile"].content {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .72fr);
    gap: 18px;
  }

  [data-view="profile"].content .profile-card,
  [data-view="profile"].content #profileActions {
    grid-column: 1 / -1;
  }

  [data-view="profile"].content .profile-primary {
    grid-column: 1 / -1;
  }

  .profile-primary,
  .profile-secondary {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 16px;
  }

  .profile-primary > .surface,
  .profile-secondary > .surface {
    margin-bottom: 0;
  }

  .profile-secondary .form-grid {
    grid-template-columns: 1fr;
  }

  .profile-secondary .form-grid textarea,
  .profile-secondary .form-grid .wide {
    grid-column: auto;
  }

  .sheet {
    width: min(900px, calc(100% - 252px));
    left: 32px;
  }

  .auth-locked .app-shell {
    padding: 24px 32px 40px;
  }

  .auth-locked .topbar {
    top: 24px;
  }
}

@media (min-width: 1200px) {
  .role-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

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

  .panel-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

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

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

  [data-view="post"].content,
  [data-view="profile"].content {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr);
  }
}

@media (max-width: 430px) {
  .support-case-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .support-security-strip,
  .support-fast-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .support-security-strip button,
  .support-fast-actions button {
    width: 100%;
  }

  .admin-command-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-role-chip,
  .admin-command-actions .text-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-record-foot,
  .admin-activity-row,
  .admin-list-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-record-foot button {
    width: 100%;
  }

  .ticket-message {
    width: 100%;
  }
}

@media (min-width: 720px) {
  .admin-filter-grid,
  .admin-record-grid,
  .admin-detail-columns,
  .admin-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #adminQueues > .admin-analysis-grid,
  #adminQueues > .admin-toolbar,
  #adminQueues > .admin-wide-page {
    grid-column: 1 / -1;
    width: 100%;
  }

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

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

@media (min-width: 1200px) {
  .admin-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Friendly visual layer */
.lucide {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

button,
a,
input,
select,
textarea {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--blue), transparent 45%);
  outline-offset: 2px;
}

button:active {
  transform: translateY(1px);
}

.primary-btn,
.ghost-btn,
.text-btn,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.text-btn {
  padding-inline: 8px;
}

.primary-btn:hover {
  box-shadow: 0 10px 22px color-mix(in oklab, var(--brand), transparent 72%);
  filter: saturate(1.08);
}

.ghost-btn:hover {
  border-color: color-mix(in oklab, var(--brand), transparent 45%);
  background: color-mix(in oklab, var(--brand), var(--surface) 92%);
}

html.light {
  --bg: #edf6f1;
  --bg-2: #fbfcfb;
  --surface: rgba(255, 255, 255, .96);
  --surface-2: rgba(15, 52, 39, .055);
  --surface-strong: #ffffff;
  --line: rgba(8, 42, 30, .12);
  --shadow: 0 10px 25px rgba(14, 52, 38, .09);
}

html.light body {
  background:
    linear-gradient(rgba(15, 159, 103, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 159, 103, .025) 1px, transparent 1px),
    linear-gradient(180deg, #eff8f3 0%, #fbfcfb 46%, #f1f5f3 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

html.light input,
html.light select,
html.light textarea {
  background: #ffffff;
}

html.light input:hover,
html.light select:hover,
html.light textarea:hover {
  border-color: rgba(15, 159, 103, .34);
}

.brand-copy {
  display: grid;
  gap: 1px;
  text-align: right;
}

.brand-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.icon-btn:hover {
  color: var(--brand);
  border-color: color-mix(in oklab, var(--brand), transparent 50%);
  background: color-mix(in oklab, var(--brand), var(--surface) 90%);
}

.eyebrow,
.title-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow .lucide {
  width: 17px;
  height: 17px;
}

.title-with-icon .lucide {
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.hero-content h1 {
  font-weight: 900;
}

.hero-actions button {
  min-width: 172px;
}

.home-command-card {
  border-right: 4px solid var(--brand);
  box-shadow: 0 8px 22px rgba(14, 52, 38, .08);
}

.home-command-card button span,
.home-command-card .command-icon {
  margin-top: 0;
  color: inherit;
}

.home-command-lead,
.upload-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-command-lead > div,
.upload-head > div,
.lane-copy {
  min-width: 0;
}

.command-icon,
.lane-icon,
.category-icon,
.upload-icon,
.metric-icon,
.admin-hub-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #092017;
  background: color-mix(in oklab, var(--brand), white 38%);
}

.command-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.command-blue,
.lane-blue .lane-icon,
.metric-blue .metric-icon {
  background: color-mix(in oklab, var(--blue), white 28%);
}

.command-coral,
.lane-coral .lane-icon {
  background: color-mix(in oklab, var(--coral), white 28%);
}

.command-gold,
.lane-gold .lane-icon,
.metric-gold .metric-icon {
  background: color-mix(in oklab, var(--gold), white 25%);
}

.command-green,
.lane-green .lane-icon,
.metric-green .metric-icon {
  background: color-mix(in oklab, var(--brand), white 36%);
}

.metric {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.metric > div {
  min-width: 0;
}

.metric .metric-icon {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 8px;
  color: #092017;
}

.metric .metric-icon + div > span {
  margin-top: 7px;
}

.home-lane {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  overflow: hidden;
  box-shadow: 0 7px 20px rgba(14, 52, 38, .075);
}

.home-lane:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  box-shadow: 0 12px 28px rgba(14, 52, 38, .12);
}

.lane-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.home-lane .lane-copy > span {
  margin-top: 5px;
}

.lane-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.home-lane:hover .lane-arrow {
  color: var(--brand);
  transform: translateX(-3px);
}

.category-tile {
  position: relative;
  min-height: 132px;
  justify-content: flex-start;
}

.category-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
}

.category-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--blue), transparent 45%);
}

.category-tile.active .category-icon {
  color: #092017;
  background: color-mix(in oklab, var(--brand), white 28%);
}

.category-tile.active::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand), transparent 82%);
}

.upload-head > div > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.upload-icon-alt {
  background: color-mix(in oklab, var(--blue), white 30%);
}

.upload-slot {
  align-content: start;
  box-shadow: none;
}

.file-input::file-selector-button {
  min-height: 34px;
  margin-left: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

.empty .lucide {
  width: 30px;
  height: 30px;
  color: var(--brand);
}

.empty strong,
.empty span {
  display: block;
}

.empty strong {
  color: var(--text);
}

.empty span {
  font-size: 13px;
  line-height: 1.8;
}

.panel-tabs button {
  flex-direction: column;
  gap: 5px;
}

.panel-tabs .lucide {
  width: 18px;
  height: 18px;
}

.admin-hub-card {
  border-top: 3px solid color-mix(in oklab, var(--blue), transparent 12%);
}

.admin-hub-card.urgent {
  border-top-color: color-mix(in oklab, var(--coral), transparent 8%);
}

.admin-hub-card.work {
  border-top-color: color-mix(in oklab, var(--gold), transparent 8%);
}

.admin-hub-card.idle {
  border-top-color: var(--line);
}

.admin-hub-card:nth-child(3n + 2) {
  border-top-color: color-mix(in oklab, var(--gold), transparent 12%);
}

.admin-hub-card:nth-child(3n + 3) {
  border-top-color: color-mix(in oklab, var(--coral), transparent 12%);
}

.admin-hub-card.urgent,
.admin-hub-card.work,
.admin-hub-card.idle {
  border-top-width: 4px;
}

.admin-hub-card.urgent { border-top-color: color-mix(in oklab, var(--coral), transparent 8%); }
.admin-hub-card.work { border-top-color: color-mix(in oklab, var(--gold), transparent 8%); }
.admin-hub-card.idle { border-top-color: var(--line); }

.admin-hub-top {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  margin: 0 !important;
}

.admin-hub-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.admin-hub-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.admin-hub-card .admin-hub-title {
  font-size: 15px;
  font-weight: 900;
}

.admin-hub-card:hover .admin-hub-arrow {
  color: var(--brand);
  transform: translateX(-3px);
}

.bottom-nav .lucide {
  width: 21px;
  height: 21px;
}

.bottom-nav button.active .lucide {
  stroke-width: 2.5;
}

.profile-card {
  border-right: 4px solid var(--blue);
}

.avatar {
  box-shadow: 0 8px 18px color-mix(in oklab, var(--brand), transparent 72%);
}

@media (max-width: 819px) {
  .app-shell,
  .topbar,
  .hero,
  .hero-content,
  .content,
  .home-command-card,
  .home-lanes,
  .surface {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-content {
    width: 100%;
  }

  .bottom-nav {
    display: flex;
    direction: rtl;
  }

  .bottom-nav button {
    flex: 1 1 0;
  }

  .bottom-nav button.hidden {
    display: none;
  }

  .home-command-card {
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .home-command-card > button,
  .home-command-actions,
  .home-command-actions button {
    width: 100%;
    min-width: 0;
  }

  .primary-btn,
  .ghost-btn,
  .text-btn {
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .brand-copy small {
    display: none;
  }

  .home-lane {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    gap: 10px;
  }

  .lane-icon {
    width: 44px;
    height: 44px;
  }

  .metric {
    min-height: 94px;
    gap: 9px;
    padding: 10px;
  }

  .metric .metric-icon {
    width: 36px;
    height: 36px;
  }

  .metric strong {
    font-size: 21px;
  }

  .category-tile {
    min-height: 116px;
  }

  .panel-tabs button {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small {
    font-size: 11px;
  }

  .home-command-card {
    padding: 18px;
  }

  .bottom-nav {
    background: color-mix(in oklab, var(--bg-2), transparent 3%);
  }

  .bottom-nav::before {
    box-shadow: 0 9px 22px color-mix(in oklab, var(--brand), transparent 70%);
  }

  .bottom-nav button {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .bottom-nav .lucide {
    margin-inline: auto;
  }

  .bottom-nav button:not(.active):hover {
    color: var(--text);
    background: var(--surface-2);
  }

  .panel-tabs button {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep management labels complete after all responsive layers above. */
.admin-workspace .panel-tabs button {
  min-height: 94px;
  height: auto;
  overflow: visible;
}

.admin-workspace .panel-tabs button span,
.admin-workspace .panel-tabs button small {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.55;
}

@media (max-width: 719px) {
  .admin-workspace .panel-tabs {
    grid-auto-columns: minmax(142px, 1fr);
  }
}

/* Refined, colorful experience */
:root {
  --blue: #438cf4;
  --blue-deep: #1559c7;
  --gold: #f3b942;
  --coral: #ff7565;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0 32%, var(--blue) 32% 58%, var(--gold) 58% 78%, var(--coral) 78% 100%);
  pointer-events: none;
}

html.light {
  --text: #0a1813;
  --muted: #607169;
  --line: rgba(8, 42, 30, .105);
  --shadow: 0 12px 28px rgba(15, 49, 37, .085);
}

html.light .topbar {
  background: rgba(250, 253, 251, .88);
  box-shadow: 0 10px 30px rgba(12, 42, 31, .08);
}

.brand-mark,
.bottom-nav::before {
  background: linear-gradient(135deg, var(--brand), color-mix(in oklab, var(--blue), var(--brand) 42%));
}

.primary-btn {
  background: linear-gradient(135deg, #0fa76c, #64e5a3);
  box-shadow: 0 10px 24px rgba(15, 167, 108, .2);
}

.hero {
  box-shadow: 0 18px 46px rgba(16, 52, 39, .13);
}

html.light .hero-shade {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .12) 42%, rgba(238, 246, 241, .9) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .52) 52%, rgba(255, 255, 255, .86));
}

.hero-service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.hero-service-pills span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #f8fffb;
  background: rgba(5, 25, 17, .34);
  backdrop-filter: blur(9px);
  font-size: 12px;
  font-weight: 800;
}

html.light .hero-service-pills span {
  color: #123025;
  border-color: rgba(12, 66, 46, .14);
  background: rgba(255, 255, 255, .72);
}

.hero-service-pills span:nth-child(2) .lucide {
  color: #d58b00;
}

.metric {
  position: relative;
  border: 0;
  box-shadow: 0 10px 24px rgba(14, 52, 38, .085), inset 0 0 0 1px var(--line);
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--brand);
}

.metric-gold::after { background: var(--gold); }
.metric-blue::after { background: var(--blue); }

.service-showcase {
  margin: 8px 0 22px;
}

.service-heading {
  align-items: flex-end;
  margin-bottom: 12px;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}

.service-heading h2 {
  margin: 0;
  font-size: 22px;
}

.service-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.service-grid {
  display: grid;
  gap: 10px;
}

.service-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(14, 52, 38, .1);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--blue);
}

.service-test::before {
  background: linear-gradient(90deg, var(--gold), var(--coral));
}

.service-card-top,
.service-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #071a12;
  background: color-mix(in oklab, var(--blue), white 48%);
  box-shadow: 0 9px 20px color-mix(in oklab, var(--blue), transparent 75%);
}

.service-test .service-icon {
  background: color-mix(in oklab, var(--gold), white 34%);
  box-shadow: 0 9px 20px color-mix(in oklab, var(--gold), transparent 70%);
}

.service-icon .lucide {
  width: 27px;
  height: 27px;
}

.service-tag {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: color-mix(in oklab, var(--blue), transparent 87%);
  font-size: 11px;
  font-weight: 900;
}

.service-test .service-tag {
  color: #a35d00;
  background: color-mix(in oklab, var(--gold), transparent 82%);
}

.service-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.service-card h3 {
  margin: 5px 0 7px;
  font-size: 23px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.service-foot {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.service-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.service-foot .lucide {
  width: 15px;
  height: 15px;
  color: var(--brand);
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--blue), transparent 55%);
  box-shadow: 0 20px 40px rgba(14, 52, 38, .14);
}

.service-test:hover {
  border-color: color-mix(in oklab, var(--gold), transparent 45%);
}

.home-quick-actions {
  margin-bottom: 22px;
}

.home-quick-actions > .section-head {
  margin-bottom: 10px;
}

.home-quick-actions .home-lanes {
  margin-bottom: 0;
}

.home-quick-actions .home-lane {
  min-height: 86px;
  box-shadow: 0 8px 20px rgba(14, 52, 38, .07);
}

.advanced-filters {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface), transparent 5%);
  overflow: hidden;
}

.advanced-filters summary {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
}

.advanced-filters summary::-webkit-details-marker {
  display: none;
}

.advanced-filters summary > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-filters summary > span .lucide {
  color: var(--blue);
}

.advanced-filters summary small {
  color: var(--muted);
}

.details-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.advanced-filters[open] .details-chevron {
  transform: rotate(180deg);
}

.advanced-filters[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.advanced-filter-body {
  padding: 10px;
}

.advanced-filter-body .filter-section:last-child {
  margin-bottom: 0;
}

.category-tile:nth-child(2) .category-icon { background: color-mix(in oklab, var(--gold), transparent 82%); }
.category-tile:nth-child(3) .category-icon { background: color-mix(in oklab, var(--coral), transparent 85%); }
.category-tile:nth-child(4) .category-icon { background: color-mix(in oklab, var(--blue), transparent 86%); }
.category-tile:nth-child(5) .category-icon { background: color-mix(in oklab, var(--brand), transparent 85%); }

.ad-card {
  position: relative;
  overflow: hidden;
  border: 0;
  box-shadow: 0 12px 28px rgba(14, 52, 38, .09), inset 0 0 0 1px var(--line);
}

.ad-card::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--blue));
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 34px rgba(14, 52, 38, .13), inset 0 0 0 1px color-mix(in oklab, var(--brand), transparent 55%);
}

.service-fee-grid {
  margin-top: 14px;
}

.service-fee-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.service-fee-field > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.service-fee-field > span .lucide {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

.amount-text {
  display: block;
  margin-top: 7px;
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.8;
}

.discount-role-picker {
  display: grid;
  gap: 10px;
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.role-check {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.role-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.role-check-all {
  color: var(--brand-strong);
  background: color-mix(in oklab, var(--brand), var(--surface) 88%);
}

.role-check.muted {
  opacity: .45;
}

@media (max-width: 819px) {
  html.light .hero-shade {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .48) 58%, rgba(238, 246, 241, .93) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .46));
  }

  .hero-service-pills {
    justify-content: center;
  }

  .advanced-filters summary {
    grid-template-columns: minmax(0, 1fr) 20px;
  }

  .advanced-filters summary small {
    display: none;
  }
}

@media (min-width: 720px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .service-card {
    min-height: 280px;
    padding: 22px;
  }

  .service-card h3 {
    font-size: 26px;
  }

  .home-quick-actions .home-lanes {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Final authentication and full-width publishing layout */
.auth-panel-head {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.auth-panel-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.auth-panel-brand > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 8px;
  color: #04120d;
  background: var(--brand);
  font-weight: 950;
  direction: ltr;
}

.auth-panel-brand div {
  display: grid;
  gap: 3px;
}

.auth-panel-brand strong {
  font-size: 17px;
}

.auth-panel-brand small {
  color: var(--muted);
  font-size: 12px;
}

.auth-locked [data-view="auth"],
.auth-locked #authBox {
  width: 100%;
  max-width: 100%;
}

#authBox .auth-tabs,
.auth-locked #authBox .segmented {
  width: 100%;
  margin: 18px 0;
  border-radius: 8px;
}

#authBox .form-grid,
.auth-locked #authBox .form-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px;
}

#authBox .form-grid > button,
#authBox .form-grid > .check-line,
#authBox .form-grid > .password-strength,
#authBox .form-grid > .otp-resend-row,
#authBox .form-grid > .debug-otp,
#authBox .form-grid > .auth-form-error {
  width: 100%;
  grid-column: 1 / -1 !important;
}

#authBox .primary-btn {
  min-height: 48px;
}

.auth-change-details {
  justify-content: center;
}

.auth-field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
}

.auth-form-error {
  padding: 10px 12px;
  border: 1px solid color-mix(in oklab, var(--danger), transparent 65%);
  border-radius: 6px;
  background: color-mix(in oklab, var(--danger), transparent 92%);
}

#authBox [aria-invalid="true"] {
  border-color: var(--danger);
}

.sms-log-open {
  padding-inline: 0;
  font-size: 18px;
  font-weight: 900;
}

.sms-log-tools {
  margin-bottom: 16px;
}

.sms-log-results {
  min-width: 0;
}

.profile-card.without-avatar {
  grid-template-columns: 1fr;
}

@media (max-width: 759px) {
  .auth-locked .app-shell {
    width: 100%;
    padding-inline: 0;
    overflow-x: hidden;
  }

  .auth-locked .topbar,
  .auth-locked [data-view="auth"] {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px);
    margin-inline: 16px;
  }

  .auth-locked [data-view="auth"] {
    padding-inline: 0;
  }

  .auth-locked #authBox {
    padding: 0 18px 18px;
  }
}

@media (min-width: 760px) {
  .auth-locked [data-view="auth"] {
    width: min(calc(100vw - 64px), 680px);
    max-width: 680px;
    margin: 40px auto 0;
  }

  .auth-locked #authBox {
    padding: 0 28px 28px;
  }

  .auth-locked #authBox::before {
    display: none;
  }

  [data-view="post"].content {
    display: block;
    width: 100%;
    max-width: none;
  }

  [data-view="post"].content > .surface {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 1024px) {
  .auth-locked .topbar {
    width: min(calc(100vw - 252px), 1000px);
  }
}

/* Quiet UI polish: consistent rhythm across public, profile and admin pages. */
.content {
  padding-inline: clamp(12px, 2vw, 22px);
}

.content > :first-child {
  margin-top: 0;
}

.surface,
.mini-card,
.ad-card,
.admin-analysis-panel,
.admin-record-card,
.admin-decision-box {
  min-width: 0;
}

.surface {
  padding: clamp(14px, 2vw, 20px);
}

.section-head {
  gap: 12px;
}

.section-head > div,
.section-head h2,
.section-head p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.section-head h2 {
  margin-block: 0;
  font-size: 20px;
  line-height: 1.55;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.form-grid,
.filter-grid,
.admin-filter-grid,
.admin-user-edit {
  align-items: start;
  gap: 12px;
}

.form-field,
.unit-field,
.filter-field,
.admin-edit-field {
  min-width: 0;
}

.form-field > span,
.unit-field > span,
.filter-field > span,
.admin-edit-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.form-field input,
.form-field select,
.form-field textarea,
.unit-field input,
.unit-field select,
.unit-field textarea,
.filter-field input,
.filter-field select,
.filter-field textarea,
.admin-edit-field input,
.admin-edit-field select,
.admin-edit-field textarea,
.search-toolbar input,
.search-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.8;
}

.form-grid > .wide,
.filter-grid > .wide,
.admin-filter-grid > .wide,
.admin-user-edit > .wide,
.media-upload-panel,
.ad-submit-actions {
  grid-column: 1 / -1;
}

.primary-btn,
.ghost-btn,
.text-btn {
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-btn .lucide,
.ghost-btn .lucide,
.text-btn .lucide {
  flex: 0 0 auto;
}

.action-row,
.profile-action-buttons,
.hero-actions,
.home-command-actions {
  align-items: stretch;
}

.stack {
  min-width: 0;
  gap: 10px;
}

.ad-list,
.service-grid,
.home-lanes,
.metric-row,
.admin-metrics,
.admin-record-grid,
.admin-detail-columns {
  align-items: stretch;
}

.ad-card,
.mini-card,
.metric,
.service-card,
.home-lane {
  height: 100%;
}

.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-table {
  margin: 0;
}

.profile-action-head,
.support-case-head,
.admin-result-head {
  min-width: 0;
}

.upload-grid,
.media-upload-grid,
.documents-upload-grid,
.video-grid {
  gap: 12px;
}

.upload-slot {
  min-width: 0;
  padding: 12px;
}

.file-picker {
  width: 100%;
}

.segmented {
  overflow-x: auto;
  scrollbar-width: thin;
}

.segmented button {
  min-width: 0;
  padding-inline: 8px;
}

@media (max-width: 719px) {
  .content {
    padding: 14px 12px 0;
  }

  .surface {
    padding: 14px;
  }

  .form-grid,
  .filter-grid,
  .admin-filter-grid,
  .admin-user-edit,
  #profileForm,
  #adForm {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .form-grid > *,
  .filter-grid > *,
  .admin-filter-grid > *,
  .admin-user-edit > * {
    grid-column: 1 / -1 !important;
  }

  .section-head,
  .profile-action-head,
  .support-case-head,
  .admin-result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head > button,
  .section-head > .action-row,
  .profile-action-buttons,
  .profile-action-buttons button,
  .action-row,
  .action-row button,
  .hero-actions button,
  .home-command-actions button {
    width: 100%;
  }

  .action-row button {
    flex-basis: 100%;
  }

  .profile-card {
    align-items: flex-start;
  }

  .panel-tabs {
    display: flex;
  }

  .panel-tabs button {
    flex: 0 0 min(150px, 42vw);
  }

  .search-toolbar,
  .range {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .file-picker {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .file-picker-size {
    grid-column: 2;
    justify-self: start;
  }

  .toast {
    width: calc(100% - 24px);
  }
}

@media (min-width: 720px) {
  .form-grid,
  #profileForm,
  #adForm,
  .admin-user-edit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid,
  .admin-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

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

  .ad-submit-actions {
    max-width: 560px;
    margin-inline: auto;
    margin-top: 8px;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 16px;
  }

  .content {
    padding-block: 22px;
  }

  .surface {
    margin-bottom: 16px;
  }

  [data-view="post"].content,
  [data-view="profile"].content,
  [data-view="support"].content,
  [data-view="admin"].content,
  [data-view="workbench"].content {
    width: min(100%, 1280px);
  }

  .admin-analysis-grid,
  .admin-record-grid,
  .admin-detail-columns {
    gap: 14px;
  }
}

/* Auth is a focused screen. Keep these rules last so generic page breakpoints
   cannot widen it. Profile and auth use separate views. */
body.auth-locked .app-shell {
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: 16px !important;
}

body.auth-locked [data-view="auth"].content {
  display: block;
  width: min(100%, 680px) !important;
  max-width: 680px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

body.auth-locked #authBox {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 719px) {
  body.auth-locked .app-shell {
    padding-inline: 12px !important;
  }

  body.auth-locked .topbar,
  body.auth-locked [data-view="auth"].content {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }

  body.auth-locked #authBox {
    padding-inline: 14px !important;
    overflow: hidden;
  }

  body.auth-locked #authBox .auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  body.auth-locked #authBox .auth-tabs button {
    width: 100%;
    min-width: 0;
    padding-inline: 4px;
    font-size: 13px;
  }
}

/* Internal consoles: one structure, role-aware identity and task colors. */
.admin-workspace {
  --console-accent: var(--blue);
  --console-accent-soft: color-mix(in oklab, var(--console-accent), transparent 88%);
}

.admin-workspace.console-role-support {
  --console-accent: var(--blue);
}

.admin-workspace.console-role-manager {
  --console-accent: var(--gold);
}

.admin-workspace.console-role-super {
  --console-accent: var(--brand);
}

.admin-workspace.console-role-expert {
  --console-accent: var(--coral);
}

.admin-workspace .admin-command {
  position: relative;
  overflow: hidden;
  border-inline-start: 4px solid var(--console-accent);
  background:
    linear-gradient(120deg, var(--console-accent-soft), transparent 58%),
    var(--surface);
}

.admin-workspace .admin-command .title-with-icon > .lucide {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 8px;
  color: var(--text);
  background: var(--console-accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--console-accent), transparent 62%);
}

.admin-workspace .admin-role-chip {
  gap: 7px;
  border-color: color-mix(in oklab, var(--console-accent), transparent 45%);
  background: var(--console-accent-soft);
}

.admin-workspace .admin-role-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--console-accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--console-accent), transparent 78%);
}

.admin-workspace .panel-tabs {
  gap: 6px;
  padding: 6px;
  border-color: color-mix(in oklab, var(--console-accent), var(--line) 70%);
}

.admin-workspace .panel-tabs button {
  --panel-accent: var(--console-accent);
  position: relative;
  border: 1px solid transparent;
  background: transparent;
}

.admin-workspace .panel-tabs button[data-admin-panel="users"],
.admin-workspace .panel-tabs button[data-admin-panel="sms"] {
  --panel-accent: var(--blue);
}

.admin-workspace .panel-tabs button[data-admin-panel="ads"] {
  --panel-accent: var(--coral);
}

.admin-workspace .panel-tabs button[data-admin-panel="operations"],
.admin-workspace .panel-tabs button[data-admin-panel="stats"] {
  --panel-accent: var(--brand);
}

.admin-workspace .panel-tabs button[data-admin-panel="finance"] {
  --panel-accent: var(--gold);
}

.admin-workspace .panel-tabs button[data-admin-panel="system"] {
  --panel-accent: #9b8cff;
}

.admin-workspace .panel-tabs button .lucide {
  color: var(--panel-accent);
}

.admin-workspace .panel-tabs button.active {
  color: var(--text);
  border-color: color-mix(in oklab, var(--panel-accent), transparent 48%);
  background: color-mix(in oklab, var(--panel-accent), transparent 86%);
  box-shadow: inset 0 -3px 0 var(--panel-accent);
}

.admin-workspace .panel-tabs button.active small {
  color: var(--muted);
}

.admin-hub-card {
  --hub-accent: var(--muted);
  border-top-color: var(--hub-accent);
}

.admin-hub-card.hub-blue { --hub-accent: var(--blue); }
.admin-hub-card.hub-coral { --hub-accent: var(--coral); }
.admin-hub-card.hub-green { --hub-accent: var(--brand); }
.admin-hub-card.hub-gold { --hub-accent: var(--gold); }
.admin-hub-card.hub-violet { --hub-accent: #9b8cff; }
.admin-hub-card.hub-slate { --hub-accent: var(--muted); }

.admin-hub-card.hub-blue,
.admin-hub-card.hub-coral,
.admin-hub-card.hub-green,
.admin-hub-card.hub-gold,
.admin-hub-card.hub-violet,
.admin-hub-card.hub-slate {
  border-top-color: var(--hub-accent);
}

.admin-hub-card .admin-hub-icon {
  color: var(--text);
  background: color-mix(in oklab, var(--hub-accent), transparent 76%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--hub-accent), transparent 55%);
}

.admin-hub-card > strong,
.admin-hub-card .admin-hub-arrow {
  color: var(--hub-accent);
}

.admin-hub-card:hover {
  border-color: color-mix(in oklab, var(--hub-accent), transparent 42%);
  border-top-color: var(--hub-accent);
}

.admin-hub-card .admin-hub-action {
  border-color: color-mix(in oklab, var(--hub-accent), transparent 54%);
  background: color-mix(in oklab, var(--hub-accent), transparent 88%);
}

.admin-workspace .support-user-search-panel,
.admin-workspace .support-queue-map,
.admin-workspace .admin-page,
.admin-workspace .admin-daily-head {
  border-inline-start: 3px solid color-mix(in oklab, var(--console-accent), transparent 18%);
}

.admin-workspace .admin-analysis-panel,
.admin-workspace .admin-record-card,
.admin-workspace .admin-decision-box {
  box-shadow: 0 7px 20px rgba(0, 0, 0, .08);
}

.admin-workspace .admin-analysis-panel:nth-child(4n + 1),
.admin-workspace .admin-record-card:nth-child(4n + 1) {
  border-top: 3px solid var(--blue);
}

.admin-workspace .admin-analysis-panel:nth-child(4n + 2),
.admin-workspace .admin-record-card:nth-child(4n + 2) {
  border-top: 3px solid var(--brand);
}

.admin-workspace .admin-analysis-panel:nth-child(4n + 3),
.admin-workspace .admin-record-card:nth-child(4n + 3) {
  border-top: 3px solid var(--gold);
}

.admin-workspace .admin-analysis-panel:nth-child(4n),
.admin-workspace .admin-record-card:nth-child(4n) {
  border-top: 3px solid var(--coral);
}

.admin-workspace .admin-metrics .metric:nth-child(4n + 1) { border-inline-start: 3px solid var(--blue); }
.admin-workspace .admin-metrics .metric:nth-child(4n + 2) { border-inline-start: 3px solid var(--brand); }
.admin-workspace .admin-metrics .metric:nth-child(4n + 3) { border-inline-start: 3px solid var(--gold); }
.admin-workspace .admin-metrics .metric:nth-child(4n) { border-inline-start: 3px solid var(--coral); }

.profile-secondary.hidden {
  display: none !important;
}

@media (max-width: 719px) {
  .admin-workspace {
    gap: 10px;
  }

  .admin-workspace .admin-command {
    padding: 14px 12px;
  }

  .admin-workspace .panel-tabs {
    margin-inline: -2px;
    padding: 5px;
    scroll-snap-type: inline mandatory;
  }

  .admin-workspace .panel-tabs button {
    flex-basis: min(142px, 40vw);
    min-height: 68px;
    scroll-snap-align: start;
  }

  .admin-workspace .admin-hub-card {
    min-height: 144px;
  }
}

@media (min-width: 720px) {
  .admin-workspace .admin-command {
    min-height: 106px;
  }

  .admin-workspace .admin-hub-card {
    min-height: 176px;
  }
}

/* Complete user dossier: shared by support, site manager and super admin. */
.admin-workspace .dossier-page {
  --dossier-tone: var(--console-accent, var(--blue));
  display: grid;
  gap: 14px;
  min-width: 0;
  border-inline-start: 0;
}

.user-dossier-header {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--dossier-tone);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dossier-back-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}

.dossier-back-btn:hover,
.dossier-back-btn:focus-visible {
  border-color: var(--dossier-tone);
  color: var(--dossier-tone);
}

.user-dossier-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in oklab, var(--dossier-tone), transparent 56%);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--dossier-tone), transparent 84%);
}

.user-dossier-avatar .lucide {
  width: 26px;
  height: 26px;
}

.user-dossier-heading {
  min-width: 0;
}

.user-dossier-heading .support-eyebrow {
  gap: 6px;
  color: var(--text);
  border-color: color-mix(in oklab, var(--dossier-tone), transparent 55%);
  background: color-mix(in oklab, var(--dossier-tone), transparent 88%);
}

.user-dossier-heading h2 {
  margin: 7px 0 0;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.user-dossier-heading p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.user-dossier-heading p span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-inline-start: 12px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--line);
}

.user-dossier-state {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 112px;
}

.user-dossier-state small {
  color: var(--muted);
  font-weight: 800;
  text-align: end;
}

.dossier-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.dossier-state-pill.is-active {
  border-color: color-mix(in oklab, var(--brand), transparent 50%);
  color: var(--brand);
  background: color-mix(in oklab, var(--brand), transparent 89%);
}

.dossier-state-pill.is-inactive {
  border-color: color-mix(in oklab, var(--danger), transparent 50%);
  color: var(--danger);
  background: color-mix(in oklab, var(--danger), transparent 90%);
}

.dossier-metric,
.dossier-record {
  --record-tone: var(--blue);
}

.dossier-page .admin-detail-summary {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.dossier-page .tone-blue { --record-tone: var(--blue); }
.dossier-page .tone-green { --record-tone: var(--brand); }
.dossier-page .tone-gold { --record-tone: var(--gold); }
.dossier-page .tone-coral { --record-tone: var(--coral); }
.dossier-page .tone-violet { --record-tone: #9b8cff; }

.dossier-metric {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 11px;
}

.dossier-metric::after {
  background: var(--record-tone);
}

.dossier-metric > span {
  min-width: 0;
  margin: 0;
}

.dossier-metric .dossier-metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--record-tone), transparent 80%);
}

.dossier-metric strong {
  font-size: 22px;
}

.dossier-metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.dossier-command-card {
  border-top-color: var(--dossier-tone);
  box-shadow: var(--shadow);
}

.dossier-command-head,
.dossier-card-head,
.dossier-record-head,
.dossier-section-heading,
.dossier-command-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.dossier-command-head,
.dossier-command-identity {
  justify-content: space-between;
}

.dossier-command-head {
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.dossier-section-heading {
  align-items: flex-start;
}

.dossier-section-heading > div,
.dossier-record-head > div,
.dossier-command-identity > div {
  min-width: 0;
}

.dossier-section-heading strong,
.dossier-record-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.dossier-section-heading p,
.dossier-record-head small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.7;
}

.dossier-section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in oklab, var(--record-tone), transparent 80%);
}

.dossier-command-head .dossier-section-icon {
  --record-tone: var(--dossier-tone);
}

.dossier-command-identity .chip-row {
  justify-content: flex-end;
}

.dossier-decision-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dossier-decision-actions button {
  width: 100%;
  justify-content: center;
}

.dossier-decision-actions .action-correction {
  border-color: color-mix(in oklab, var(--gold), transparent 45%);
  background: color-mix(in oklab, var(--gold), transparent 90%);
}

.dossier-decision-actions .action-blue {
  border-color: color-mix(in oklab, var(--blue), transparent 45%);
  background: color-mix(in oklab, var(--blue), transparent 90%);
}

.dossier-review-layout,
.dossier-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.dossier-review-card,
.dossier-record {
  min-width: 0;
  border-top: 3px solid var(--record-tone);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .065);
}

.dossier-review-layout > :only-child {
  grid-column: 1 / -1;
}

.media-slot-row > span:first-child,
.dossier-video-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.media-slot-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
}

.media-slot-state.has-file {
  color: var(--brand);
  background: color-mix(in oklab, var(--brand), transparent 88%);
}

.media-slot-state.is-empty {
  color: var(--muted);
  background: var(--surface-2);
}

.admin-edit-fold {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--dossier-tone);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-edit-fold > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 12px 14px;
  list-style: none;
}

.admin-edit-fold > summary::-webkit-details-marker {
  display: none;
}

.admin-edit-fold > summary > span:nth-child(2) strong,
.admin-edit-fold > summary > span:nth-child(2) small {
  display: block;
}

.admin-edit-fold > summary > span:nth-child(2) small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.admin-edit-fold .dossier-section-icon {
  --record-tone: var(--dossier-tone);
}

.admin-edit-fold .fold-chevron {
  transition: transform .2s ease;
}

.admin-edit-fold[open] .fold-chevron {
  transform: rotate(180deg);
}

.admin-edit-fold[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.admin-edit-fold .admin-user-edit {
  padding: 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dossier-record-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dossier-record-list {
  display: grid;
  gap: 0;
}

.dossier-record-list > p,
.dossier-security-list > p {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.dossier-record-list > p:first-child,
.dossier-security-list > p:first-child {
  border-top: 0;
}

.dossier-record-list > p .lucide {
  flex: 0 0 auto;
  color: var(--record-tone);
}

.dossier-security-list > p {
  justify-content: space-between;
}

.dossier-security-list span {
  color: var(--muted);
}

.dossier-security-list strong {
  color: var(--text);
  text-align: end;
  overflow-wrap: anywhere;
}

.dossier-video-row {
  padding-block: 10px;
}

@media (max-width: 719px) {
  .user-dossier-header {
    grid-template-columns: 42px 48px minmax(0, 1fr);
    padding: 12px;
  }

  .user-dossier-avatar {
    width: 48px;
    height: 48px;
  }

  .user-dossier-state {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .user-dossier-state small {
    text-align: start;
  }

  .user-dossier-heading h2 {
    font-size: 17px;
  }

  .user-dossier-heading p span:not(:last-child)::after {
    display: none;
  }

  .dossier-command-head,
  .dossier-command-identity,
  .dossier-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .dossier-command-identity .chip-row {
    justify-content: flex-start;
  }

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

  .dossier-decision-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .dossier-page .admin-detail-summary > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .admin-edit-actions,
  .admin-edit-actions button,
  .media-slot-row button,
  .dossier-video-row .action-row,
  .dossier-video-row .action-row > * {
    width: 100%;
  }

  .media-slot-row,
  .dossier-video-row {
    align-items: stretch;
  }
}

@media (min-width: 1024px) {
  .dossier-page .admin-detail-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

/* Home identity and interactive kickoff */
.brand-mark {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 1024px) {
  .bottom-nav::before {
    content: "";
    background: transparent url("./favicon.svg") center / contain no-repeat;
    box-shadow: none;
  }
}

.hero-img {
  object-position: center;
}

.hero-content {
  justify-content: center;
  align-items: flex-start;
}

.hero-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #ecfff6;
  background: rgba(4, 23, 16, .58);
  text-shadow: none;
}

html.light .hero-content .eyebrow {
  color: #073d2a;
  background: rgba(247, 253, 250, .84);
}

.content[data-view="home"] > .metric-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
}

.content[data-view="home"] > .metric-row .metric {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.content[data-view="home"] > .metric-row .metric-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.kickoff-cta {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(111, 255, 223, .32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 45%, rgba(0, 255, 201, .19), transparent 34%),
    radial-gradient(circle at 70% 18%, rgba(105, 78, 255, .2), transparent 37%),
    #020b16;
  box-shadow: 0 24px 64px rgba(1, 12, 25, .32), 0 0 0 1px rgba(93, 255, 221, .08) inset;
  direction: rtl;
}

.kickoff-cta::before,
.kickoff-cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.kickoff-cta::before {
  z-index: 2;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0 17%, rgba(89, 255, 220, .72) 24%, transparent 31% 62%, rgba(161, 112, 255, .58) 70%, transparent 78%) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: .68;
  animation: kickoff-border-orbit 8s linear infinite;
}

.kickoff-cta::after {
  z-index: 1;
  right: -8%;
  bottom: -45%;
  width: 70%;
  height: 85%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 190, .2), rgba(20, 106, 255, .06) 46%, transparent 72%);
  filter: blur(18px);
  animation: kickoff-nebula 5.5s ease-in-out infinite alternate;
}

.kickoff-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: saturate(1.22) contrast(1.08);
  transform: scale(1.015);
  transition: opacity 380ms ease, transform 900ms cubic-bezier(.2, .8, .2, 1), filter 400ms ease;
  direction: ltr;
  touch-action: manipulation;
}

.kickoff-cta.is-ready .kickoff-canvas,
.kickoff-cta.is-kicking .kickoff-canvas,
.kickoff-cta.is-goal .kickoff-canvas {
  opacity: 1;
}

.kickoff-cta.is-kicking .kickoff-canvas {
  filter: saturate(1.64) contrast(1.16) brightness(1.12);
  transform: scale(1.05);
}

.kickoff-cta.is-kicking .kickoff-copy {
  opacity: .26;
  transform: translateX(16px) scale(.975);
  filter: blur(1.5px);
  transition: opacity 260ms ease, transform 520ms cubic-bezier(.18, .86, .2, 1), filter 260ms ease;
}

.kickoff-cta.is-strike .kickoff-copy {
  opacity: 0;
  transform: translateX(28px) scale(.94);
  filter: blur(6px);
}

.kickoff-cta.is-strike::after {
  z-index: 3;
  inset: -16%;
  width: auto;
  height: auto;
  border-radius: 0;
  background: radial-gradient(circle at 34% 53%, rgba(242, 255, 251, .96) 0 1.5%, rgba(103, 255, 229, .72) 5%, rgba(103, 187, 255, .28) 17%, rgba(141, 98, 255, .13) 30%, transparent 52%);
  mix-blend-mode: screen;
  filter: blur(1px);
  animation: kickoff-strike-flash 620ms cubic-bezier(.12, .7, .24, 1) forwards;
}

.kickoff-scene-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 29% 46%, transparent 0 22%, rgba(2, 8, 20, .12) 46%, transparent 70%),
    linear-gradient(90deg, rgba(2, 8, 19, .02) 24%, rgba(2, 10, 21, .2) 55%, rgba(2, 7, 18, .88) 100%),
    linear-gradient(0deg, rgba(1, 5, 14, .62), transparent 56%);
}

html.light .kickoff-scene-shade {
  background:
    radial-gradient(circle at 29% 46%, transparent 0 22%, rgba(2, 17, 24, .08) 48%, transparent 70%),
    linear-gradient(90deg, rgba(2, 12, 23, .01) 24%, rgba(2, 18, 28, .18) 55%, rgba(2, 12, 23, .86) 100%),
    linear-gradient(0deg, rgba(1, 10, 18, .58), transparent 58%);
}

.kickoff-copy {
  position: relative;
  z-index: 4;
  width: min(420px, 48%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 34px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
  transition: opacity 260ms ease, transform 520ms cubic-bezier(.18, .86, .2, 1), filter 260ms ease;
}

.kickoff-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(117, 255, 225, .24);
  border-radius: 999px;
  color: #bfffee;
  background: rgba(4, 22, 35, .48);
  box-shadow: 0 0 24px rgba(35, 255, 207, .12) inset;
  backdrop-filter: blur(7px);
  font-size: 13px;
  font-weight: 900;
  text-shadow: none;
}

.kickoff-copy > strong {
  max-width: 390px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.5;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .68), 0 0 30px rgba(61, 255, 210, .12);
}

.kickoff-copy > span:not(.kickoff-kicker) {
  max-width: 370px;
  color: rgba(239, 255, 248, .88);
  line-height: 1.8;
}

.kickoff-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 235px;
  min-height: 56px;
  padding-inline: 24px;
  margin-top: 7px;
  border: 1px solid rgba(188, 255, 240, .46);
  color: #ffffff;
  background: linear-gradient(110deg, #06a965, #03cda2 54%, #4c7cff);
  box-shadow: 0 14px 32px rgba(0, 207, 152, .3), 0 0 28px rgba(76, 124, 255, .15) inset;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.15px;
  animation: kickoff-button-glow 2.2s ease-in-out infinite;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.kickoff-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -90%;
  left: -35%;
  width: 28%;
  height: 280%;
  background: rgba(255, 255, 255, .58);
  filter: blur(8px);
  transform: rotate(24deg);
  animation: kickoff-button-shine 2.8s ease-in-out infinite;
}

.kickoff-button:not(:disabled):hover {
  filter: brightness(1.12) saturate(1.14);
  transform: translateY(-2px) scale(1.015);
}

.kickoff-button:disabled {
  cursor: wait;
  opacity: .78;
  transform: none;
}

.kickoff-loading {
  content: "";
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .84);
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
}

.kickoff-loading > span {
  width: 27px;
  height: 27px;
  border: 3px solid rgba(255, 255, 255, .28);
  border-top-color: #b9ffda;
  border-radius: 50%;
  animation: kickoff-loader 800ms linear infinite;
}

.kickoff-cta.is-ready .kickoff-loading,
.kickoff-cta.is-fallback .kickoff-loading {
  visibility: hidden;
  opacity: 0;
}

.kickoff-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255, 255, 255, .28);
  background: #0a432d url("./img/pitch-hero.webp") center / cover no-repeat;
}

.kickoff-fallback svg {
  width: 112px;
  height: 112px;
}

.kickoff-cta.is-fallback .kickoff-fallback {
  display: grid;
}

.kickoff-goal-message {
  position: absolute;
  z-index: 6;
  top: 38%;
  left: 48%;
  color: #f7ffdc;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .75), 0 0 18px #fff, 0 0 38px rgba(68, 255, 214, .92), 0 0 72px rgba(124, 86, 255, .82);
  transform: translate(-50%, -50%) scale(.6);
}

.kickoff-cta.is-goal .kickoff-goal-message {
  animation: kickoff-goal-pop 620ms cubic-bezier(.16, 1.4, .32, 1) forwards;
}

.kickoff-cta.is-goal::after {
  animation: kickoff-goal-flash 720ms ease-out forwards;
}

@keyframes kickoff-loader {
  to { transform: rotate(360deg); }
}

@keyframes kickoff-goal-pop {
  0% { opacity: 0; filter: blur(14px); transform: translate(-50%, -50%) scale(.25) rotate(-7deg); }
  58% { opacity: 1; filter: blur(0); transform: translate(-50%, -50%) scale(1.24) rotate(2deg); }
  100% { opacity: 1; filter: blur(0); transform: translate(-50%, -50%) scale(1); }
}

@keyframes kickoff-border-orbit {
  to { transform: rotate(360deg) scale(1.35); }
}

@keyframes kickoff-nebula {
  to { transform: translate(-12%, -8%) scale(1.18); opacity: .72; }
}

@keyframes kickoff-button-shine {
  0%, 34% { transform: translateX(-360%) rotate(24deg); opacity: 0; }
  48% { opacity: .75; }
  68%, 100% { transform: translateX(620%) rotate(24deg); opacity: 0; }
}

@keyframes kickoff-button-glow {
  0%, 100% { box-shadow: 0 14px 32px rgba(0, 207, 152, .3), 0 0 28px rgba(76, 124, 255, .15) inset; }
  50% { box-shadow: 0 17px 40px rgba(0, 230, 172, .48), 0 0 36px rgba(135, 255, 226, .25) inset, 0 0 18px rgba(64, 255, 210, .28); }
}

.admin-metric-filter {
  width: 100%;
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-metric-filter:hover,
.admin-metric-filter:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(7, 31, 23, .14), inset 0 0 0 1px var(--brand);
}

@keyframes kickoff-goal-flash {
  0% { opacity: .3; transform: scale(.8); }
  35% { opacity: 1; background: radial-gradient(circle, rgba(237, 255, 190, .86), rgba(42, 255, 207, .36) 28%, rgba(114, 77, 255, .18) 48%, transparent 72%); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes kickoff-strike-flash {
  0% { opacity: 0; transform: scale(.58); }
  12% { opacity: 1; transform: scale(.88); }
  38% { opacity: .36; transform: scale(1.14); }
  100% { opacity: 0; transform: scale(1.66); }
}

@media (max-width: 719px) {
  .hero {
    min-height: 350px;
  }

  .hero-content {
    justify-content: flex-end;
    align-items: stretch;
  }

  .hero-content .eyebrow {
    align-self: flex-start;
  }

  .hero-actions .ghost-btn {
    width: 100%;
  }

  .content[data-view="home"] > .metric-row {
    gap: 8px;
  }

  .content[data-view="home"] > .metric-row .metric {
    min-height: 88px;
    gap: 8px;
    padding: 10px;
  }

  .content[data-view="home"] > .metric-row .metric-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .kickoff-cta {
    min-height: 500px;
  }

  .kickoff-scene-shade,
  html.light .kickoff-scene-shade {
    background:
      radial-gradient(circle at 48% 34%, transparent 0 22%, rgba(3, 9, 22, .12) 55%, transparent 74%),
      linear-gradient(180deg, rgba(2, 7, 18, .34) 0%, rgba(3, 12, 26, .08) 48%, rgba(2, 7, 18, .78) 100%),
      linear-gradient(90deg, transparent, rgba(4, 9, 25, .36));
  }

  .kickoff-copy {
    width: 100%;
    padding: 20px;
  }

  .kickoff-copy > strong {
    max-width: 320px;
    font-size: 22px;
  }

  .kickoff-button {
    width: min(100%, 250px);
    margin-top: 2px;
  }

  .kickoff-goal-message {
    top: 43%;
    left: 16%;
    font-size: 36px;
  }
}

@media (min-width: 720px) and (max-width: 1023px) {
  .kickoff-cta {
    min-height: 410px;
  }

  .kickoff-copy {
    width: min(400px, 54%);
    padding: 26px;
  }

  .kickoff-copy > strong {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kickoff-canvas,
  .kickoff-button,
  .kickoff-copy,
  .kickoff-cta.is-strike::after,
  .kickoff-cta.is-goal .kickoff-goal-message {
    transition: none;
    animation: none;
  }

  .kickoff-cta.is-goal .kickoff-goal-message {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Unified icon language */
.lucide {
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn .lucide,
.primary-btn > .lucide,
.ghost-btn > .lucide,
.text-btn > .lucide,
button > .lucide {
  width: 18px;
  height: 18px;
}

.icon-btn .lucide {
  transition: color .18s ease, transform .18s ease;
}

.icon-btn:not(:disabled):hover .lucide {
  transform: scale(1.08);
}

.title-with-icon .lucide,
.section-head .lucide,
.advanced-filters summary > span .lucide {
  color: var(--icon-accent, var(--brand));
  filter: drop-shadow(0 3px 6px color-mix(in oklab, var(--icon-accent, var(--brand)), transparent 76%));
}

.panel-tabs button {
  --icon-accent: var(--blue);
}

.panel-tabs button:nth-child(3n + 2) {
  --icon-accent: var(--brand);
}

.panel-tabs button:nth-child(3n) {
  --icon-accent: var(--coral);
}

.panel-tabs .lucide {
  width: 30px;
  height: 30px;
  padding: 6px;
  border: 1px solid color-mix(in oklab, var(--icon-accent), transparent 78%);
  border-radius: 7px;
  color: var(--icon-accent);
  background: color-mix(in oklab, var(--icon-accent), transparent 90%);
}

.panel-tabs button.active .lucide {
  color: #ffffff;
  border-color: transparent;
  background: var(--icon-accent);
  box-shadow: 0 6px 14px color-mix(in oklab, var(--icon-accent), transparent 70%);
}

.bottom-nav button {
  --nav-icon: var(--brand);
}

.bottom-nav button[data-tab="search"],
.bottom-nav button[data-tab="profile"] {
  --nav-icon: var(--blue);
}

.bottom-nav button[data-tab="post"],
.bottom-nav button[data-tab="workbench"] {
  --nav-icon: #0eaa70;
}

.bottom-nav button[data-tab="orders"] {
  --nav-icon: #c88a10;
}

.bottom-nav button[data-tab="support"] {
  --nav-icon: #168ea0;
}

.bottom-nav button[data-tab="notifications"] {
  --nav-icon: #db4e55;
}

.bottom-nav button[data-tab="admin"] {
  --nav-icon: #7559d5;
}

.bottom-nav .lucide {
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid color-mix(in oklab, var(--nav-icon), transparent 80%);
  border-radius: 8px;
  color: var(--nav-icon);
  background: color-mix(in oklab, var(--nav-icon), transparent 90%);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.bottom-nav button.active {
  color: var(--text);
  background: color-mix(in oklab, var(--nav-icon), var(--surface) 89%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--nav-icon), transparent 82%);
}

.bottom-nav button.active .lucide {
  color: #ffffff;
  border-color: transparent;
  background: var(--nav-icon);
  box-shadow: 0 7px 16px color-mix(in oklab, var(--nav-icon), transparent 68%);
  transform: translateY(-1px);
}

.status-success .lucide,
.sms-log-card.is-sent .lucide,
.sms-log-card.is-success .lucide {
  color: #10965f;
}

.status-danger .lucide,
.sms-log-card.is-failed .lucide {
  color: #d84a52;
}

@media (min-width: 1024px) {
  .bottom-nav button {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .bottom-nav .lucide {
    margin-inline: 0;
  }
}

@media (max-width: 430px) {
  .bottom-nav .lucide {
    width: 30px;
    height: 30px;
    padding: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn .lucide,
  .bottom-nav .lucide {
    transform: none !important;
  }
}

/* 2026 unified interface: final component layer */
:root {
  --ui-space-1: 6px;
  --ui-space-2: 10px;
  --ui-space-3: 14px;
  --ui-space-4: 18px;
  --ui-space-5: 24px;
  --ui-control: 46px;
  --ui-content: 1240px;
  --ui-panel-line: color-mix(in oklab, var(--line), var(--brand) 8%);
  --ui-focus: 0 0 0 3px color-mix(in oklab, var(--brand), transparent 72%);
  --ui-shadow-soft: 0 10px 28px rgba(0, 0, 0, .13);
}

html.light {
  --ui-shadow-soft: 0 10px 28px rgba(18, 45, 35, .09);
}

body {
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

.hidden {
  display: none !important;
}

a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
summary {
  touch-action: manipulation;
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: var(--ui-focus);
}

.content {
  width: min(calc(100% - 28px), var(--ui-content));
  margin-inline: auto;
  padding-block: var(--ui-space-5);
}

.content[data-view="home"] {
  padding-top: 18px;
}

.surface,
.mini-card,
.metric,
.admin-command,
.admin-page,
.advanced-filters,
.support-user-command,
.user-dossier-header,
.profile-card {
  border: 1px solid var(--ui-panel-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow-soft);
}

.surface,
.admin-page {
  padding: clamp(14px, 2vw, 24px);
  background: var(--surface);
}

.surface + .surface,
.stack > * + *,
.admin-page + .admin-page {
  margin-top: var(--ui-space-3);
}

.section-head,
.profile-action-head,
.media-panel-head,
.admin-toolbar,
.admin-command,
.dossier-command-head,
.user-dossier-header {
  min-width: 0;
  gap: var(--ui-space-3);
}

.section-head > *,
.profile-action-head > *,
.media-panel-head > *,
.admin-toolbar > *,
.admin-command > *,
.user-dossier-header > * {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  letter-spacing: 0;
  line-height: 1.35;
}

.section-head h2,
.surface > h2,
.title-with-icon {
  margin-top: 0;
}

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

.form-grid > .wide,
.form-grid > textarea,
.form-grid > .check-line,
.form-grid > .form-hint,
.form-grid > .password-strength,
.form-grid > .otp-resend-row,
.form-grid > .debug-otp,
.form-grid > .admin-edit-actions,
.form-grid > .password-otp-row {
  grid-column: 1 / -1;
}

.form-field,
.unit-field,
.admin-edit-field,
.filter-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.form-field > span:first-child,
.unit-field > span:first-child,
.admin-edit-field > span:first-child,
.filter-field > span:first-child {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

:where(.form-grid, .filter-grid, .admin-toolbar, .dialog-form) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.file-picker {
  width: 100%;
  min-width: 0;
  min-height: var(--ui-control);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in oklab, var(--surface-strong), var(--surface-2) 22%);
  color: var(--text);
  padding: 10px 12px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

:where(.form-grid, .filter-grid, .admin-toolbar, .dialog-form) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
  border-color: color-mix(in oklab, var(--brand), var(--line) 58%);
}

:where(.form-grid, .filter-grid, .admin-toolbar, .dialog-form) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--brand);
  background: var(--surface-strong);
  outline: 0;
  box-shadow: var(--ui-focus);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in oklab, var(--muted), transparent 16%);
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: .56;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: color-mix(in oklab, var(--surface-2), transparent 22%);
}

.field-invalid,
[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger), transparent 82%) !important;
}

.form-field.required > span:first-child::after,
.unit-field.required > span:first-child::after,
.admin-edit-field.required > span:first-child::after {
  content: " *";
  color: var(--danger);
}

.primary-btn,
.ghost-btn,
.text-btn,
.icon-btn,
.brand,
.segmented button,
.panel-tabs button,
.dossier-back-btn {
  min-height: 44px;
  border-radius: 7px;
  font-weight: 750;
  letter-spacing: 0;
}

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 14px;
}

.primary-btn {
  box-shadow: 0 8px 18px color-mix(in oklab, var(--brand), transparent 76%);
}

.primary-btn:not(:disabled):hover,
.ghost-btn:not(:disabled):hover,
.text-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.icon-btn,
.dossier-back-btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.action-row,
.profile-actions,
.profile-action-buttons,
.admin-command-actions,
.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.segmented,
.panel-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(130px, 1fr);
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.segmented button,
.panel-tabs button {
  min-width: 0;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  white-space: normal;
}

.segmented button.active,
.panel-tabs button.active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line), 0 4px 12px rgba(0, 0, 0, .08);
}

.chip,
.status-pill,
.dossier-state-pill,
.admin-role-chip {
  border-radius: 7px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
}

.empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

/* Home: preserve images, copy and 3D scene; improve hierarchy only. */
.hero-content {
  width: min(100%, var(--ui-content));
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 42px);
}

.hero-content h1 {
  max-width: 760px;
  margin-block: 0 10px;
  font-size: 48px;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 20px;
}

.content[data-view="home"] > .metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.content[data-view="home"] > .metric-row .metric,
.service-card,
.home-command {
  min-width: 0;
}

.service-grid,
.home-action-grid {
  gap: 14px;
}

.kickoff-cta {
  border-radius: 8px;
  border-color: color-mix(in oklab, var(--brand), var(--line) 52%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}

/* Auth */
.auth-view {
  display: grid;
  place-items: start center;
}

#authBox {
  width: min(100%, 760px);
  padding: clamp(16px, 3vw, 28px);
}

.auth-panel-head {
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs {
  width: 100%;
  margin-bottom: 18px;
  grid-auto-columns: minmax(0, 1fr);
}

#authBox .form-grid {
  max-width: 620px;
  margin-inline: auto;
}

.otp-resend-row {
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

#otpResendButton:disabled {
  color: var(--muted);
  background: color-mix(in oklab, var(--surface-2), transparent 18%);
  pointer-events: none;
  box-shadow: none;
}

.password-field-wrap {
  min-width: 0;
}

.password-field-wrap > input {
  padding-inline-end: 48px !important;
}

.password-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
}

/* Profile */
.profile-card,
.profile-action-surface,
.profile-primary,
.profile-secondary {
  width: 100%;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--surface);
}

.profile-action-surface {
  margin-bottom: 14px;
}

.profile-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.profile-primary > *,
#profileAvatarBox,
#profileDetailsBox,
#documentsBox {
  width: 100%;
}

.approved-profile-view {
  display: grid;
  gap: 16px;
}

.approved-profile-lock {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in oklab, var(--brand), var(--line) 45%);
  border-radius: 8px;
  background: color-mix(in oklab, var(--brand), transparent 92%);
}

.approved-profile-lock p {
  margin: 3px 0 0;
  color: var(--muted);
}

.approved-profile-lock-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--brand);
  background: color-mix(in oklab, var(--brand), transparent 84%);
}

.approved-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.approved-profile-field {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface-strong);
}

.approved-profile-field dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.approved-profile-field dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.approved-profile-media dd {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand);
}

.profile-revision-panel {
  margin-bottom: 14px;
  padding: 14px;
  border-inline-start: 4px solid var(--warn);
  border-radius: 7px;
  background: color-mix(in oklab, var(--warn), transparent 91%);
}

.media-upload-panel,
.upload-slot {
  border-radius: 8px;
}

.upload-slot {
  min-width: 0;
  border: 1px dashed color-mix(in oklab, var(--line), var(--brand) 18%);
  background: color-mix(in oklab, var(--surface-2), transparent 18%);
}

/* Search, ads, support and requests */
.search-layout,
.ad-builder,
.support-layout,
.orders-layout {
  min-width: 0;
}

.filter-grid,
.media-upload-grid,
.dossier-review-layout,
.dossier-record-grid {
  gap: 14px;
}

.category-tile,
.ad-card,
.ticket-card,
.sms-log-card {
  border-radius: 8px;
}

.ad-submit-actions {
  position: sticky;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, 320px);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--surface-strong), transparent 4%);
  box-shadow: var(--ui-shadow-soft);
  backdrop-filter: blur(12px);
}

#ticketWorkspace blockquote {
  margin: 8px 0;
  padding: 10px 12px;
  border-inline-start: 3px solid var(--brand-2);
  border-radius: 7px;
  background: var(--surface-2);
}

/* Notifications */
.notification-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  margin: 0;
  background: var(--surface-strong);
}

.notification-card.unread {
  border-inline-start: 4px solid var(--brand);
  background: color-mix(in oklab, var(--surface-strong), var(--brand) 5%);
}

.notification-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--brand-2);
  background: color-mix(in oklab, var(--brand-2), transparent 86%);
}

.notification-content {
  min-width: 0;
}

.notification-content > strong {
  display: block;
  margin-block: 4px;
}

.notification-content p {
  margin: 4px 0 0;
  color: var(--muted);
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* Management consoles and dossier */
.admin-workspace {
  padding-top: 18px;
}

.admin-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  margin-bottom: 12px;
  background: var(--surface);
}

.console-role-super { --console-accent: #7c62d8; }
.console-role-manager { --console-accent: #168ea0; }
.console-role-support { --console-accent: #0f9f67; }
.console-role-expert { --console-accent: #c88a10; }

.admin-workspace .admin-command,
.admin-workspace .panel-tabs {
  border-color: color-mix(in oklab, var(--console-accent, var(--brand)), var(--line) 65%);
}

.admin-metrics,
.metric-row,
.admin-rate-grid,
.admin-detail-summary {
  gap: 12px;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.admin-list,
.admin-queues,
.admin-related,
.support-user-command {
  min-width: 0;
}

.user-dossier-header {
  display: grid;
  grid-template-columns: 44px 52px minmax(0, 1fr) auto;
  align-items: center;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--surface);
}

.user-dossier-heading p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 5px 0 0;
  color: var(--muted);
}

.dossier-command-card {
  padding: 18px;
  background: var(--surface-strong);
}

.dossier-decision-actions {
  padding-block: 14px;
  border-block: 1px solid var(--line);
}

.revision-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.revision-field-grid .check-chip {
  min-width: 0;
  min-height: 44px;
  justify-content: flex-start;
  background: var(--surface-2);
}

.support-detail-fold {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.support-detail-fold > summary {
  min-height: 52px;
  padding: 12px 14px;
}

.dossier-record-list p,
.dossier-security-list p {
  min-width: 0;
}

.dossier-record-list span,
.dossier-security-list strong {
  overflow-wrap: anywhere;
}

.admin-edit-fold .admin-user-edit {
  padding: 14px;
}

/* Tables, dialogs, sheets, legal and footer */
.table-wrap,
.admin-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.detail-sheet,
.app-dialog-panel,
.jalali-picker {
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}

.toast {
  max-width: min(440px, calc(100vw - 24px));
  border-radius: 8px;
}

.legal-content {
  width: min(calc(100% - 28px), 920px);
  margin-inline: auto;
}

@media (max-width: 1023px) {
  .revision-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-dossier-header {
    grid-template-columns: 44px 52px minmax(0, 1fr);
  }

  .user-dossier-state {
    grid-column: 2 / -1;
  }
}

@media (max-width: 719px) {
  :root {
    --ui-control: 48px;
  }

  .content {
    width: min(calc(100% - 20px), var(--ui-content));
    padding-block: 14px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .surface,
  .admin-page,
  .dossier-command-card {
    padding: 14px;
  }

  .form-grid,
  .approved-profile-fields,
  .revision-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid > * {
    grid-column: 1 !important;
  }

  .section-head,
  .profile-action-head,
  .media-panel-head,
  .admin-command,
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-action-buttons,
  .action-row,
  .admin-command-actions,
  .admin-edit-actions {
    width: 100%;
  }

  .profile-action-buttons > :not(.icon-btn),
  .action-row > :not(.icon-btn),
  .admin-command-actions > :not(.icon-btn),
  .admin-edit-actions > :not(.icon-btn) {
    flex: 1 1 140px;
  }

  .segmented,
  .panel-tabs {
    grid-auto-columns: minmax(118px, 1fr);
  }

  .bottom-nav {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .bottom-nav button {
    flex: 0 0 78px;
    min-width: 78px;
    scroll-snap-align: center;
  }

  .auth-tabs {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-tabs button {
    padding-inline: 6px;
  }

  .approved-profile-lock {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .approved-profile-lock .ghost-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ad-submit-actions {
    grid-template-columns: minmax(0, 1fr) 44px;
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .ad-submit-actions .primary-btn {
    grid-column: 1 / -1;
  }

  .notification-card {
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    gap: 9px;
    padding: 12px;
  }

  .notification-icon {
    width: 42px;
    height: 42px;
  }

  .user-dossier-header {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .user-dossier-avatar {
    display: none;
  }

  .user-dossier-heading,
  .user-dossier-state {
    grid-column: 2;
  }

  .dossier-decision-actions > button {
    width: 100%;
  }

  th,
  td {
    padding: 10px;
  }
}

@media (max-width: 390px) {
  .content {
    width: min(calc(100% - 16px), var(--ui-content));
  }

  .hero-content {
    padding-inline: 12px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .content[data-view="home"] > .metric-row .metric {
    padding: 10px;
  }

  .content[data-view="home"] > .metric-row .metric strong {
    font-size: 24px;
  }

  .notification-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .notification-open {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.auth-locked .app-shell {
    padding: 16px 220px 40px 32px !important;
  }

  body.auth-locked .topbar {
    width: min(100%, 1280px) !important;
    max-width: 1280px !important;
    margin-inline: auto !important;
  }
}

/* Final compact mobile layer. */
@media (max-width: 719px) {
  :root { --ui-control: 44px; }
  body { font-size: 14px; }
  .app-shell { padding-inline: 0; }
  .content { width: min(calc(100% - 16px), var(--ui-content)); padding-block: 10px; }
  .surface,
  .admin-page,
  .dossier-command-card,
  .admin-command,
  .admin-toolbar { padding: 12px; }
  .stack,
  .form-grid,
  .admin-list,
  .admin-queues { gap: 10px; }
  .section-head h2,
  .section-head h3,
  .profile-action-head h3,
  .admin-command h2 { font-size: 17px; line-height: 1.55; }
  .form-field,
  .admin-edit-field,
  .unit-field { gap: 5px; }
  input,
  select,
  textarea,
  button,
  .primary-btn,
  .ghost-btn { min-height: 44px; }
  textarea { min-height: 96px; }
  .hero { min-height: 310px; }
  .hero-content { padding: 14px; gap: 9px; }
  .hero-content h1 { font-size: 27px; line-height: 1.45; }
  .hero-content p { font-size: 13px; line-height: 1.75; }
  .kickoff-cta { min-height: 350px; height: 350px; }
  .kickoff-copy { width: 58%; min-height: 100%; justify-content: flex-end; gap: 6px; padding: 13px 13px 88px; }
  .kickoff-kicker { font-size: 11px; }
  .kickoff-copy > strong { font-size: 18px; line-height: 1.45; }
  .kickoff-copy > span:not(.kickoff-kicker) { font-size: 12px; line-height: 1.55; }
  .kickoff-button { width: 100%; min-width: 0; min-height: 52px; padding-inline: 10px; font-size: 15px; font-weight: 950; }
  .kickoff-goal-message { top: 35%; left: 30%; font-size: 30px; }
  .content[data-view="home"] > .metric-row .metric { min-height: 76px; padding: 9px; }
  .content[data-view="home"] > .metric-row .metric strong { font-size: 22px; }
  .profile-card,
  .notification-card,
  .admin-list-row,
  .mini-card,
  .ticket-message { padding: 11px; }
  .detail-sheet { max-height: calc(100dvh - 72px); }
  .app-dialog-panel { width: calc(100% - 20px); max-height: calc(100dvh - 28px); overflow: auto; }
  .bottom-nav button { flex-basis: 72px; min-width: 72px; min-height: 58px; }
  .bottom-nav button small { font-size: 10px; }
}

@media (max-width: 380px) {
  .kickoff-cta { min-height: 330px; height: 330px; }
  .kickoff-copy { width: 61%; padding: 11px 11px 84px; }
  .kickoff-copy > strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.kickoff-button::before {
  display: none;
}

/* Final management-tab readability override. Keep this at the end of the file. */
.admin-workspace .panel-tabs {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  overflow-x: auto;
  overflow-y: visible;
}

.admin-workspace .panel-tabs button {
  min-height: 94px;
  height: auto;
  overflow: visible;
}

.admin-workspace .panel-tabs button span,
.admin-workspace .panel-tabs button small {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.55;
}

@media (max-width: 719px) {
  .admin-workspace .panel-tabs {
    grid-auto-columns: 152px;
    scroll-snap-type: x proximity;
  }
}
.inactive-account-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 35%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--surface, #fff));
}

.inactive-account-notice p {
  margin: .25rem 0 0;
}

@media (max-width: 560px) {
  .inactive-account-notice {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Unified public footer and document pages */
.site-document-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-document-page .legal-shell {
  width: 100%;
  min-height: 0;
  flex: 1 0 auto;
  padding-bottom: 32px;
}

.about-shell {
  display: block;
}

.about-page {
  overflow: hidden;
}

.about-page-header,
.about-contact {
  scroll-margin-top: 24px;
}

.about-contact {
  padding-top: 28px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.about-contact h2 {
  margin: 8px 0 18px;
  font-size: clamp(22px, 4vw, 28px);
}

.about-support-link {
  width: fit-content;
  margin-top: 22px;
}

.site-footer {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 24px max(16px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-strong) 92%, var(--bg));
  font-size: 13px;
  text-align: initial;
}

body.has-app-nav .site-footer {
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

.site-footer-main {
  direction: rtl;
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: 20px;
  margin-inline: auto;
}

.site-footer-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.site-footer-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.site-footer-brand span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.site-footer-brand strong {
  color: var(--text);
  font-size: 14px;
}

.site-footer-brand small {
  direction: ltr;
  color: var(--muted);
  font-size: 10px;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
}

.site-footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible,
.site-footer-links a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.site-footer .enamad-seal {
  width: 48px;
  height: 48px;
  justify-self: end;
  flex: none;
}

.site-footer .enamad-seal a,
.site-footer .enamad-seal img {
  display: block;
  width: 48px;
  height: 48px;
}

.site-footer .enamad-seal img {
  object-fit: contain;
  cursor: pointer;
}

.site-footer-copy {
  direction: rtl;
  display: flex;
  width: min(1120px, 100%);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  margin: 18px auto 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: right;
}

.site-footer-copy small {
  font-size: 12px;
}

.site-footer-copy a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 560px) {
  .site-document-page .legal-shell {
    padding: 14px 10px 24px;
  }

  .legal-page {
    padding: 16px;
  }

  .legal-page h1 {
    margin-block: 14px;
    font-size: 26px;
  }

  .about-contact {
    padding-top: 22px;
    margin-top: 24px;
  }

  .about-support-link {
    width: 100%;
  }

  .site-footer {
    padding-inline: 14px;
  }

  .site-footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .site-footer-brand {
    grid-column: 1;
  }

  .site-footer .enamad-seal {
    grid-column: 2;
  }

  .site-footer-links {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
  }

  .site-footer-links a {
    width: 100%;
  }

  .site-footer-copy {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
