:root {
  --bg: #f4f0ff;
  --bg-top: #ebe4ff;
  --stage-bg: linear-gradient(180deg, #ddd6fe 0%, #e9d5ff 18%, #f5f3ff 45%, #faf5ff 100%);
  --sidebar-bg: #ffffff;
  --card: #ffffff;
  --ink: #1e1b4b;
  --muted: #64748b;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --accent-soft: #ede9fe;
  --coral: #e87858;
  --coral-soft: #fff0ea;
  --coral-dark: #c45a3a;
  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #b42318;
  --danger-soft: #fef2f2;
  --success-soft: #ecfdf5;
  --warning-soft: #fffbeb;
  --shadow-sm: 0 2px 8px rgba(30, 27, 75, 0.06);
  --shadow: 0 8px 28px rgba(30, 27, 75, 0.08);
  --shadow-lg: 0 16px 40px rgba(30, 27, 75, 0.12);
  --radius: 14px;
  --radius-lg: 18px;
  --sidebar-width: 232px;
  --mobile-nav-height: 4.35rem;
  --mobile-session-height: 3.25rem;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.45;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stage-bg);
  overflow-x: clip;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Canva-style layout ── */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.65rem 1rem;
}

.sidebar-brand-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-group-toggle:hover,
.sidebar-group.has-active > .sidebar-group-toggle {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-chevron {
  margin-left: auto;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.sidebar-group.is-expanded .sidebar-chevron {
  transform: rotate(0deg);
}

.sidebar-group:not(.is-expanded) .sidebar-chevron {
  transform: rotate(-90deg);
}

.sidebar-subnav {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-group.is-expanded .sidebar-subnav {
  display: flex;
}

.sidebar-sublink {
  padding-left: 2.15rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.sidebar-icon {
  width: 1.35rem;
  text-align: center;
  font-size: 1rem;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.35rem;
  min-width: 0;
}

.sidebar-user > div {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.main-stage {
  flex: 1;
  min-width: 0;
  background: var(--stage-bg);
  min-height: 100vh;
}

.stage-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 2rem 0;
}

.stage-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.home-hero {
  text-align: center;
  padding: 2rem 1.5rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

.home-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.home-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.home-search-wrap {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  padding: 0 1.5rem;
}

.home-search {
  width: 100%;
  padding: 0.9rem 1.15rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow);
  background: #fff;
}

.home-search:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25), var(--shadow);
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.5rem;
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem;
  min-width: 72px;
  transition: transform 0.15s;
}

.category-card:hover {
  transform: translateY(-2px);
}

.category-card.hidden {
  display: none;
}

.category-group {
  flex: 1 1 100%;
  width: 100%;
}

.category-group.hidden {
  display: none;
}

.category-group-label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.category-group-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.5rem;
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cat-color, var(--accent)) 25%, transparent);
}

.category-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.recent-section {
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.recent-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.recent-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.home-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.home-stat-pill {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
}

.home-stat-pill strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.home-stat-pill span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.recent-table-wrap {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.recent-table th,
.recent-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.recent-table th {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: #fafafa;
}

.recent-table tr:last-child td {
  border-bottom: none;
}

.recent-table tr:hover td {
  background: #faf5ff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.topbar,
.nav-wrap,
.tabs {
  display: none !important;
}

/* ── Shell & header ── */

.app-shell {
  max-width: none;
  margin: 0;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-block {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.topbar h1 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.topbar .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 28rem;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--warning-soft);
  color: #92400e;
  border: 1px solid #fde68a;
}

.connection-pill.connected {
  background: var(--success-soft);
  color: var(--accent-dark);
  border-color: #a7f3d0;
}

.connection-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.5rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid rgba(42, 157, 143, 0.2);
  border-radius: 999px;
}

.auth-card {
  flex: 1 1 320px;
  max-width: 680px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.auth-card legend {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 0.25rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  grid-column: 1 / -1;
}

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

/* ── Navigation ── */

.nav-wrap {
  padding: 0.75rem 1.5rem 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  width: fit-content;
  max-width: 100%;
}

.tab {
  border: none;
  background: transparent;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(42, 157, 143, 0.35);
}

.tab-icon {
  margin-right: 0.35rem;
  opacity: 0.85;
}

/* ── Panels ── */

.panel { display: none; padding: 0.5rem 2rem 3rem; }
.panel.active { display: block; animation: fadeIn 0.2s ease; }

#panel-home.panel.active {
  padding-top: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

.panel-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Cards & forms ── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem 1rem;
}

.form-grid h3 { grid-column: 1 / -1; margin: 0 0 0.25rem; }

.form-section-title {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0.25rem;
  padding-top: 0.5rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Author display rules beat the UA [hidden] stylesheet — keep hide/show working. */
.field[hidden],
.checkbox[hidden],
fieldset[hidden],
.form-actions[hidden],
.panel-desc[hidden],
.admin-modal-form [hidden] {
  display: none !important;
}

.field.span-full {
  grid-column: 1 / -1;
}

label.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.field label:not(.checkbox) {
  font-size: 0.88rem;
  font-weight: 700;
}

.field-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.field-hint code {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--accent-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

input, select, textarea {
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcfb;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  width: 100%;
}

input:hover, select:hover, textarea:hover {
  background: #fff;
}

textarea.json-input {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  background: #f8faf9;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

input:invalid:not(:placeholder-shown),
select:invalid {
  border-color: #f87171;
}

/* ── Color picker ── */

.color-picker {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.color-picker-trigger {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.color-picker-swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(30, 27, 75, 0.06);
  pointer-events: none;
  background-color: var(--swatch-color, #c6e3d2);
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.color-picker-swatch.is-empty {
  opacity: 0.65;
}

.color-picker-swatch.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.color-picker-trigger:focus-within .color-picker-swatch {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.color-picker-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  opacity: 0;
}

.color-picker-hex {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

textarea { resize: vertical; min-height: 2.5rem; }

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0;
}

.checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.35rem;
}

.mispronunciation-pending {
  margin-top: 1rem;
}

.mispronunciation-pending-list .item {
  margin-bottom: 0.5rem;
}

.mispronunciation-pending-list .item-head h4 {
  font-size: 0.95rem;
}

/* ── Promo upload highlight ── */

.promo-card {
  border: 2px solid var(--coral);
  background: linear-gradient(180deg, var(--coral-soft) 0%, var(--card) 120px);
  box-shadow: var(--shadow);
}

.promo-card .card-header {
  border-bottom-color: rgba(232, 120, 88, 0.25);
}

.promo-card .card-header h3 {
  color: var(--coral-dark);
}

.drop-zone {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--coral);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.drop-zone:hover,
.drop-zone.dragover {
  background: #fff;
  border-color: var(--coral-dark);
  transform: translateY(-1px);
}

.drop-zone-icon {
  font-size: 2rem;
  line-height: 1;
}

.drop-zone-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--coral-dark);
}

.drop-zone-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.drop-zone-file {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-dark);
  font-family: var(--mono);
  word-break: break-all;
}

.drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.drop-zone.has-file {
  border-style: solid;
  background: var(--success-soft);
  border-color: var(--accent);
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  filter: brightness(0.98);
  box-shadow: var(--shadow-sm);
}

.btn:active:not(:disabled) { transform: scale(0.98); }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #9333ea 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.btn.primary:hover:not(:disabled) {
  filter: brightness(1.03);
}

.btn.danger {
  color: var(--danger);
  border-color: #fecaca;
  background: var(--danger-soft);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn.ghost:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--ink);
}

.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.primary.loading::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

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

/* ── Lists & items ── */

.list-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  margin: 1.25rem 0 0.65rem;
}

.list { display: grid; gap: 0.75rem; }

.item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}

.item:hover { box-shadow: var(--shadow); }

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-transform: lowercase;
}

.badge.inactive {
  background: #f1f5f4;
  color: var(--muted);
}

.badge.ok {
  background: var(--teal-soft);
  color: #0f766e;
}

.badge.placement {
  background: var(--teal-soft);
  color: var(--teal);
}

.badge.scheduled {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.live {
  background: var(--teal-soft);
  color: #0f766e;
}

.badge.expired {
  background: #fee2e2;
  color: #b91c1c;
}

.badge.draft {
  background: #f1f5f4;
  color: var(--muted);
}

.schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.schedule-summary .stat-card {
  padding: 0.75rem 1rem;
}

.schedule-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.schedule-table th,
.schedule-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.schedule-table th {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: #fafcfb;
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-date-group {
  margin-bottom: 1.25rem;
}

.schedule-date-group h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.timezone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.timezone-badge::before {
  content: "🕐";
  font-size: 0.85rem;
  line-height: 1;
}

.scheduling-timezone-note {
  margin: -0.35rem 0 0.75rem;
  max-width: 42rem;
}

.tz-label-suffix {
  font-weight: 700;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ── Stats ── */

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--teal-soft) 100%);
  border-color: rgba(42, 157, 143, 0.25);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.stat-value small {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.stats-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.stats-table th,
.stats-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.stats-table th {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: #f8fbf9;
}

.stats-table tr:last-child td { border-bottom: none; }

.stats-table tr:hover td { background: #f8fbf9; }

.stats-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.stats-table .ctr-high { color: var(--accent-dark); font-weight: 800; }
.stats-table .ctr-low { color: var(--muted); }

/* ── Status & toasts ── */

.status {
  margin: 0.75rem 1.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--warning-soft);
  border: 1px solid #fde68a;
  font-size: 0.88rem;
  animation: fadeIn 0.2s ease;
}

.status.error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.status.ok {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: var(--accent-dark);
}

.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  animation: toastIn 0.25s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.toast.ok {
  border-color: #a7f3d0;
  background: var(--success-soft);
  color: var(--accent-dark);
}

.toast.error {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-dismiss {
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.5;
  padding: 0;
  color: inherit;
}

.toast-dismiss:hover { opacity: 1; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ── Responsive ── */

@media (max-width: 720px) {
  .app-layout {
    flex-direction: column;
  }

  /* Session bar pinned to top when logged in */
  .sidebar-footer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 75;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    padding: 0.55rem 1rem;
    padding-top: max(0.55rem, env(safe-area-inset-top));
    border-top: none;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .sidebar-footer[hidden] {
    display: none !important;
  }

  .sidebar-user {
    min-width: 0;
    flex: 1;
  }

  .sidebar-user > div {
    min-width: 0;
  }

  .session-email {
    max-width: min(14rem, 42vw);
    font-size: 0.75rem;
  }

  #logoutBtn {
    min-height: 44px;
    padding-inline: 0.85rem;
    flex-shrink: 0;
  }

  /* Bottom nav drawer */
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    padding: 0.3rem 0 calc(0.3rem + env(safe-area-inset-bottom));
    border-right: none;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 -6px 24px rgba(30, 27, 75, 0.08);
    z-index: 80;
  }

  .sidebar-brand {
    display: none;
  }

  .sidebar-create {
    flex-shrink: 0;
    width: auto;
    min-width: 4.5rem;
    max-width: 5rem;
    height: auto;
    min-height: calc(var(--mobile-nav-height) - 0.5rem);
    margin: 0.25rem 0 0.25rem 0.45rem;
    padding: 0.4rem 0.35rem;
    border-radius: 12px;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .sidebar-create span {
    display: block;
  }

  .sidebar-nav {
    flex: 1;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    order: 0;
    width: auto;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem 0.35rem 0.25rem 0;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-link {
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    min-width: 4.25rem;
    max-width: 5rem;
    min-height: calc(var(--mobile-nav-height) - 0.5rem);
    padding: 0.35rem 0.4rem;
    font-size: 0.62rem;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  .sidebar-link span:not(.sidebar-icon) {
    display: block;
  }

  .sidebar-link .ui-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .sidebar-group {
    position: static;
    flex: 0 0 auto;
  }

  .sidebar-group-toggle {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    min-width: 4.25rem;
    max-width: 5rem;
    min-height: calc(var(--mobile-nav-height) - 0.5rem);
    padding: 0.35rem 0.4rem;
    font-size: 0.62rem;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  .sidebar-group-toggle span {
    display: block;
  }

  .sidebar-group-toggle .sidebar-chevron {
    display: none;
  }

  .sidebar-subnav {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.35rem);
    z-index: 85;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-group.is-expanded .sidebar-subnav {
    display: none;
  }

  .sidebar-group.is-mobile-open .sidebar-subnav {
    display: flex;
  }

  .sidebar-sublink {
    flex-direction: row;
    justify-content: flex-start;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .main-stage {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.75rem);
  }

  .app-layout:has(.sidebar-footer:not([hidden])) .main-stage {
    padding-top: calc(var(--mobile-session-height) + env(safe-area-inset-top));
  }

  .stage-header,
  .panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .stage-header {
    padding-top: 0.65rem;
    justify-content: flex-start;
  }

  .connection-pill {
    max-width: 100%;
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
    margin-top: 0;
  }

  .home-hero {
    padding: 1.25rem 1rem 0.85rem;
  }

  .home-lead {
    font-size: 0.92rem;
  }

  .home-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 1rem;
    margin-bottom: 1rem;
  }

  .sponsorship-hub {
    padding: 0.85rem 1rem 0;
  }

  .sponsorship-hub-head h2 {
    font-size: 1.35rem;
  }

  .sponsorship-hub .sponsorship-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0;
  }

  .sponsorship-hub .sponsorship-tabs::-webkit-scrollbar {
    display: none;
  }

  .home-tabs::-webkit-scrollbar {
    display: none;
  }

  .home-tab {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }

  .home-search-wrap,
  .category-grid,
  .recent-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .home-search-form {
    padding-left: 0.85rem;
  }

  .home-search-submit {
    width: 44px;
    height: 44px;
  }

  .category-grid {
    gap: 0.85rem 0.65rem;
  }

  .category-group-cards {
    gap: 0.85rem 0.65rem;
  }

  .recent-head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .recent-table th:nth-child(2),
  .recent-table td:nth-child(2),
  .recent-table th:nth-child(4),
  .recent-table td:nth-child(4) {
    display: none;
  }

  .recent-table th,
  .recent-table td {
    padding: 0.75rem 0.65rem;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .recent-row-actions .icon-btn {
    width: 44px;
    height: 44px;
  }

  .btn,
  .btn-sm {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-actions {
    width: 100%;
  }

  .panel-actions .btn {
    flex: 1 1 auto;
  }

  .panel:not(#panel-home) .card {
    padding: 1.15rem 1.1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .color-picker-trigger {
    width: 48px;
    height: 48px;
  }

  .color-picker-hex {
    min-height: 48px;
  }

  .auth-grid { grid-template-columns: 1fr; }

  .item-head {
    flex-direction: column;
    align-items: stretch;
  }

  .website-toolbar {
    top: calc(var(--mobile-session-height) + 0.5rem);
    position: sticky;
    padding: 0.75rem;
  }

  .app-layout:not(:has(.sidebar-footer:not([hidden]))) .website-toolbar {
    top: 0.5rem;
  }

  .website-workflow {
    gap: 0.4rem 0.65rem;
  }

  .website-save-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-value { font-size: 1.45rem; }

  .help-fab {
    right: 1rem;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.85rem);
    width: 48px;
    height: 48px;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.75rem);
  }

  .login-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  .login-shell {
    width: min(100%, 420px);
    margin: auto;
    padding-block: 1rem;
  }

  .login-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .status {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

@media (max-width: 480px) {
  .home-title {
    font-size: 1.55rem;
  }

  .home-search-form .home-search {
    font-size: 0.92rem;
    padding: 0.65rem 0.25rem;
  }

  .home-search-form .home-search::placeholder {
    font-size: 0.82rem;
  }

  .category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 0.35rem;
    max-width: none;
  }

  .category-card {
    min-width: 0;
    width: 100%;
  }

  .category-icon {
    width: 48px;
    height: 48px;
  }

  .category-label {
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
  }

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

  .recent-table thead {
    display: none;
  }

  .recent-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .recent-table tbody tr:last-child {
    border-bottom: none;
  }

  .recent-table td {
    display: block;
    padding: 0;
    border: none;
  }

  .recent-table td:first-child {
    grid-column: 1 / -1;
  }

  .recent-table td:nth-child(2),
  .recent-table td:nth-child(4) {
    display: none;
  }

  .recent-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .recent-table td:last-child {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }

  .recent-table-wrap {
    overflow: visible;
  }

  .recent-table tr:hover td {
    background: transparent;
  }

  .recent-table tbody tr:hover {
    background: #faf5ff;
  }

  .session-email {
    max-width: min(10rem, 38vw);
    font-size: 0.72rem;
  }

  .sidebar-link {
    min-width: 3.85rem;
    font-size: 0.58rem;
  }

  .sidebar-create {
    min-width: 3.85rem;
    font-size: 0.58rem;
  }

  .panel {
    padding-bottom: 2rem;
  }

  .user-admin-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 900px) {
  .two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  .two-col-layout .list-col {
    grid-column: 1 / -1;
  }
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(20, 40, 32, 0.45);
  backdrop-filter: blur(4px);
}

.login-overlay[hidden] {
  display: none;
}

.app-shell.blurred {
  filter: blur(2px);
  pointer-events: none;
}

.login-card {
  width: min(100%, 440px);
  padding: 1.75rem;
  border: none;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.login-brand h2 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
}

.login-brand .panel-desc {
  margin: 0;
}

.btn-lg {
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
}

/* ── Website editor ── */

.website-page-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.website-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
  min-width: 12rem;
}

.website-page-tab {
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.06);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.website-page-tab:hover {
  background: rgba(124, 58, 237, 0.12);
}

.website-page-tab.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.website-new-page {
  margin-bottom: 1rem;
}

.website-editor .code-area {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}

.sections-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.9rem 1rem 1rem;
}

.section-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-card-head .field-label {
  flex: 1;
  min-width: 14rem;
}

.section-card-actions {
  display: flex;
  gap: 0.35rem;
}

.section-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.section-paragraph {
  border: 1px dashed rgba(42, 157, 143, 0.35);
  border-radius: 10px;
  padding: 0.55rem;
  background: rgba(42, 157, 143, 0.04);
}

.html-editor-wrap,
.section-paragraph {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.style-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.3rem;
  border: 1px dashed rgba(42, 157, 143, 0.35);
  border-radius: 10px;
  padding: 0.55rem;
  background: rgba(42, 157, 143, 0.04);
}

.style-toolbar .font-picker {
  position: relative;
  flex: 1 1 12rem;
  min-width: 11rem;
}

.style-toolbar .font-picker-search {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: none;
}

.style-toolbar .font-picker-search:hover {
  background: rgba(124, 58, 237, 0.08);
}

.style-toolbar .font-picker-search:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.font-picker-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  max-height: 14rem;
  overflow: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 27, 75, 0.12);
}

.font-picker-results li {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.font-picker-results li:hover,
.font-picker-results li:focus {
  background: rgba(124, 58, 237, 0.1);
}

.style-toolbar .style-toolbar-select {
  width: auto;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  min-height: 2.15rem;
  min-width: 9.75rem;
  box-shadow: none;
}

.style-toolbar .style-toolbar-select:hover,
.style-toolbar .color-picker-hex:hover,
.style-toolbar .color-picker-trigger:hover .color-picker-swatch {
  background: rgba(124, 58, 237, 0.08);
}

.style-toolbar .style-toolbar-select:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.style-toolbar .color-picker {
  flex: 1;
  min-width: 8.25rem;
  gap: 0.3rem;
}

.style-toolbar .color-picker-trigger {
  width: 2.15rem;
  height: 2.15rem;
}

.style-toolbar .color-picker-swatch,
.style-toolbar .color-picker-native {
  border-radius: 8px;
}

.style-toolbar .color-picker-hex {
  width: auto;
  flex: 1;
  min-height: 2.15rem;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff;
}

.html-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.html-toolbar button {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.html-toolbar button:hover {
  background: rgba(124, 58, 237, 0.08);
}

.html-editor {
  min-height: 4.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  line-height: 1.55;
  outline: none;
}

.html-editor:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.html-editor a {
  color: #7c3aed;
  font-weight: 700;
}

.btn.linkish {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.15rem 0;
  box-shadow: none;
  font-size: 0.82rem;
}

.links-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 2fr) auto;
  gap: 0.45rem;
  align-items: center;
}

@media (max-width: 720px) {
  .link-row {
    grid-template-columns: 1fr;
  }
}

.website-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #fff 100%);
  border: 1px solid rgba(42, 157, 143, 0.25);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.website-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.website-status-item strong {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: none;
}

.website-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0;
}

.workflow-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.workflow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.website-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 5.5rem;
  z-index: 40;
}

.website-editor {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.website-editor[hidden],
.website-new-page[hidden],
#deleteWebsitePage[hidden] {
  display: none !important;
}

.editor-intro {
  margin: 0 0 0.5rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.content-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.content-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: background 0.15s;
}

.content-section > summary::-webkit-details-marker {
  display: none;
}

.content-section > summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.85rem;
  transition: transform 0.15s;
}

.content-section[open] > summary::before {
  transform: rotate(90deg);
}

.content-section > summary:hover {
  background: #f8fbf9;
}

.content-section .section-body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
}

.json-panel {
  background: #f6faf8;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

.json-panel > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.35rem 0;
  list-style: none;
}

.json-panel > summary::-webkit-details-marker {
  display: none;
}

.checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.website-save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
  padding: 1.15rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.website-save-bar .field-hint {
  margin: 0;
}

.create-screen-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 0.5rem;
}

.create-screen-preview {
  width: 130px;
  height: auto;
  border-radius: 18px;
  border: 2px solid rgba(124, 58, 237, 0.35);
  background: #1a1028;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.create-screen-controls {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: min(100%, 280px);
}

.create-screen-controls input[type="file"] {
  max-width: 100%;
}
  flex: 1 1 200px;
  margin: 0;
}

.session-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.session-email {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.legacy-auth {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.legacy-auth summary {
  cursor: pointer;
  color: var(--muted);
}

.user-admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* Phase 2 — Canva visual polish */

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex-shrink: 0;
}

.sidebar-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: calc(100% - 0.5rem);
  margin: 0 0.25rem 0.85rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #9333ea 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s, filter 0.15s;
}

.sidebar-create:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.sidebar-create .ui-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.sidebar-link .ui-icon {
  color: var(--muted);
}

.sidebar-link.active .ui-icon,
.sidebar-link:hover .ui-icon {
  color: var(--accent-dark);
}

.home-tabs {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
}

.home-tab {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.home-tab:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

.home-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.sponsorship-hub {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

.sponsorship-hub[hidden] {
  display: none !important;
}

.sponsorship-hub-head {
  margin-bottom: 0.35rem;
}

.sponsorship-hub-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sponsorship-hub .sponsorship-tabs {
  justify-content: flex-start;
  padding: 0;
  margin-bottom: 0.5rem;
}

.panel.has-hub-nav .panel-head {
  display: none;
}

.panel.has-hub-nav {
  padding-top: 0.25rem;
}

.home-search-form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.35rem 0.45rem 0.35rem 1rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.home-search-icon {
  color: var(--muted);
  width: 1.15rem;
  height: 1.15rem;
}

.home-search-form .home-search {
  flex: 1;
  border: none;
  box-shadow: none;
  padding: 0.75rem 0.35rem;
  background: transparent;
  min-width: 0;
}

.home-search-form .home-search:focus {
  outline: none;
  box-shadow: none;
}

.home-search-submit {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.home-search-submit:hover {
  background: #ddd6fe;
  transform: translateX(1px);
}

.category-icon .ui-icon {
  width: 1.45rem;
  height: 1.45rem;
  color: var(--cat-color, var(--accent));
}

.category-icon {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat-color, var(--accent)) 22%, transparent);
}

.recent-head-actions {
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.recent-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.recent-name-cell strong {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.recent-thumb-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--thumb-color, var(--accent)) 16%, white);
}

.recent-access {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.recent-access .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.recent-row-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.recent-row-actions .icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
}

.recent-row-actions .icon-btn:hover {
  background: var(--accent-soft);
}

.help-fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.4);
  text-decoration: none;
  z-index: 120;
  transition: transform 0.15s, filter 0.15s;
}

.help-fab:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.help-fab .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.panel:not(#panel-home) {
  max-width: 1120px;
}

.panel:not(#panel-home) .panel-head h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 800;
}

.panel:not(#panel-home) .card {
  border: none;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
}

.panel:not(#panel-home) input,
.panel:not(#panel-home) select,
.panel:not(#panel-home) textarea {
  background: #fff;
  border-color: #e5e7eb;
  border-radius: 10px;
}

.panel:not(#panel-home) .card-header {
  border-bottom: none;
  padding-bottom: 0.25rem;
  margin-bottom: 1.15rem;
}

.panel:not(#panel-home) .item {
  border: none;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
}

.badge.placement {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge.ok {
  background: #ecfdf5;
  color: #047857;
}

.login-overlay {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(167, 139, 250, 0.45), transparent 55%),
    linear-gradient(180deg, #ddd6fe 0%, #ede9fe 35%, #f5f3ff 100%);
  backdrop-filter: blur(8px);
}

.login-shell {
  width: min(100%, 420px);
}

.login-card {
  width: 100%;
  padding: 2rem 1.75rem 1.5rem;
  border: none;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.brand-logo-lg {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
}

.login-brand h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-actions {
  justify-content: stretch;
}

.login-actions .btn-lg {
  width: 100%;
}

/* ── Banner preview modal (mirrors SponsorshipCard) ── */

body.banner-preview-open {
  overflow: hidden;
}

.banner-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.banner-preview-overlay[hidden] {
  display: none;
}

.banner-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 75, 0.52);
  backdrop-filter: blur(5px);
}

.banner-preview-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.banner-preview-dialog {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-height: inherit;
  overflow: hidden;
}

.banner-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.banner-preview-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.banner-preview-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.banner-preview-close {
  flex-shrink: 0;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 999px;
}

.banner-preview-stage {
  overflow: auto;
  border-radius: var(--radius);
  padding: 1rem 0.85rem 1.1rem;
  background: linear-gradient(180deg, #9a82d8 0%, #7a5cb8 45%, #6a48a8 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.banner-preview-footnote {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
}

/* In-app SponsorshipCard approximation (components/SponsorshipCard.tsx) */
.app-banner-preview__card {
  --banner-accent: #e855c8;
  --banner-card-bg: rgba(35, 20, 65, 0.85);
  --banner-text: #ffffff;
  --banner-text-muted: rgba(255, 255, 255, 0.82);
  border: 2px solid var(--banner-accent);
  border-radius: 16px;
  padding: 14px;
  background: var(--banner-card-bg);
  box-shadow: 0 10px 28px rgba(15, 5, 35, 0.28);
}

.app-banner-preview__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-banner-preview__pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--banner-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.app-banner-preview__image {
  display: block;
  width: 100%;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.app-banner-preview__title {
  margin: 0;
  color: var(--banner-text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.app-banner-preview__body {
  margin: 0;
  color: var(--banner-text-muted);
  font-size: 15px;
  line-height: 21px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.app-banner-preview__cta {
  color: var(--banner-accent);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 480px) {
  .banner-preview-dialog {
    padding: 0.95rem;
  }

  .banner-preview-stage {
    padding: 0.85rem 0.65rem 0.95rem;
  }
}

/* ── Admin modal forms (user edit, etc.) ── */

.admin-modal-overlay .banner-preview-shell {
  width: min(100%, 440px);
}

.admin-modal-overlay .banner-preview-dialog {
  max-height: min(92vh, 720px);
  overflow: hidden;
}

.admin-modal-form {
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.15rem;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.65rem;
  background: linear-gradient(180deg, transparent, var(--card) 35%);
  z-index: 1;
}

.admin-modal-overlay--wide .banner-preview-shell {
  width: min(100%, 720px);
}

.admin-modal-overlay--wide .banner-preview-dialog {
  max-height: min(92vh, 900px);
  overflow: auto;
}

.app-users-toolbar {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.65rem;
}

.app-users-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.app-users-search-input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}

.app-users-search-input:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.app-users-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.app-users-deleted-toggle {
  margin: 0;
}

.app-users-table-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
}

.app-users-table {
  min-width: 860px;
}

.app-users-table th {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
}

.sort-th {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.45rem 0.5rem;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
}

.sort-th:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--ink);
}

.sort-th.is-active {
  color: var(--accent-dark, #6d28d9);
}

.sort-arrow {
  font-size: 0.75rem;
  opacity: 0.7;
  line-height: 1;
}

.sort-th.is-active .sort-arrow {
  opacity: 1;
}

.app-users-name {
  font-weight: 600;
}

.app-users-sub {
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.app-users-pager {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
}

.app-user-page-title {
  margin-top: 0.75rem;
}

.app-user-page {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.app-user-detail-tabs {
  margin: 0 0 0.25rem;
}

.app-user-tab-panels {
  min-width: 0;
}

.app-user-tab-panel[hidden] {
  display: none;
}

.app-user-tab-card {
  margin: 0;
}

.app-user-tab-card .card-header {
  margin-bottom: 0.85rem;
}

.app-user-tab-card .recent-table-wrap {
  box-shadow: none;
}

.app-user-dl {
  margin: 0;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  background: #fff;
  overflow: hidden;
}

.app-user-dl-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.app-user-dl-row:nth-child(even) {
  background: #fafafa;
}

.app-user-dl-row:last-child {
  border-bottom: none;
}

.app-user-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.app-user-dl dd {
  margin: 0;
  font-size: 0.9rem;
  word-break: break-word;
}

.app-user-empty {
  margin: 0;
  padding: 1rem 0.25rem;
  color: var(--muted);
}

.referral-users-body {
  padding: 0 0 0.5rem;
}

.referral-users-toolbar {
  padding: 0 0 0.85rem;
}

.referral-users-search {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}

.referral-users-search:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.referral-users-body .recent-table-wrap {
  box-shadow: none;
  border-radius: var(--radius-md, 10px);
}

.referral-users-empty {
  padding: 1.25rem 0.25rem;
  color: var(--muted);
  text-align: center;
}

.user-admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.taxonomy-tabs {
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.taxonomy-view[hidden] {
  display: none !important;
}

