/*
  WhatsApp Campaign Manager — Appwrite-style design system (ported from the
  tisquip-dashboard-theme-appwrite reference). No framework: hand-rolled classes.

  Visual language: Appwrite Console ("Pink" design system) — #FAFAFB page +
  white surfaces in light, #19191C page + #1D1D21 surfaces in dark, #EDEDF0 /
  #2D2D31 borders, pink #FD366E accent (identical in both themes), Inter at a
  14px base, 8px radii on controls, 6px badges, 12px cards/dropdowns, 16px
  modals, 48px header, 200→64px sidebar, 40px table rows, 36px (32px sm)
  buttons/inputs, 150–200ms ease-in-out motion everywhere.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #FAFAFB;
  --surface: #FFFFFF;
  --surface-hover: #F4F4F7;
  --text-strong: #2D2D31;
  --text-body: #56565C;
  --text-muted: #97979B;
  --border: #EDEDF0;
  --ring: #ADADB0;                    /* gray focus, never accent */
  --primary: #1B85C5;                 /* CIPF bright blue */
  --primary-hover: #166FA6;
  --primary-active: #115683;
  --on-primary: #FFFFFF;
  --primary-soft: #E3F0F9;            /* tint for icon boxes / avatar chips */
  --success: #10B981;
  --success-text: #0A714F;
  --warning: #FE7C43;
  --warning-text: #61250A;
  --danger: #FF453A;
  --danger-text: #C0271E;
  --info: #A1C4FF;
  --info-text: #274B8F;
  --scrim: rgba(45, 45, 49, 0.48);
  --shadow-lg: 0 4px 6px -2px rgb(16 16 18 / 0.05), 0 12px 16px -4px rgb(16 16 18 / 0.1);
  --radius: 8px;                      /* controls/inputs */
  --radius-badge: 6px;
  --radius-card: 12px;                /* cards/dropdowns */
  --radius-modal: 16px;
  --header-h: 48px;
  --sidebar-w: 200px;
  --sidebar-w-collapsed: 64px;
}

.dark {
  --bg: #19191C;
  --surface: #1D1D21;
  --surface-hover: #2D2D31;
  --text-strong: #EDEDF0;
  --text-body: #C3C3C6;
  --text-muted: #818186;
  --border: #2D2D31;
  --ring: #6E6E74;
  --primary: #1B85C5;                 /* CIPF bright blue — same in both themes */
  --primary-hover: #3D9BD3;
  --primary-active: #2A8DC7;
  --on-primary: #FFFFFF;
  --primary-soft: #14344A;
  --success: #10B981;
  --success-text: #4ADE9F;
  --warning: #FE7C43;
  --warning-text: #FDAA85;
  --danger: #FF453A;
  --danger-text: #FF8A83;
  --info: #A1C4FF;
  --info-text: #CFE1FF;
  --scrim: rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 4px 6px -2px rgb(0 0 0 / 0.3), 0 12px 16px -4px rgb(0 0 0 / 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.063px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  font-weight: 600;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code, .text-code {
  font-family: ui-monospace, 'SF Mono', Monaco, Consolas, monospace;
  font-size: 13px;
}

/* Scrollbars: thin and rounded, like the console */
* {
  scrollbar-width: thin;
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-thumb {
  border-radius: 99999px;
  background: color-mix(in srgb, var(--text-strong) 20%, transparent);
}
::-webkit-scrollbar-track {
  background: transparent;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
  outline-offset: 1px;
}

/* ---------- Typography helpers ---------- */

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-strong);
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

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

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ---------- App shell: sidebar + header ---------- */

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

.sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 200ms ease-in-out;
  overflow: hidden;
}
.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  flex-shrink: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-strong);
  text-decoration: none;
}
.sidebar-brand:hover {
  text-decoration: none;
}

/* CIPF logo artwork — light variant on light surfaces, dark variant in dark mode */
.brand-img-el {
  display: inline-block;
  border: 0;
}
html.dark .brand-img-el.on-light {
  display: none;
}
html:not(.dark) .brand-img-el.on-dark {
  display: none;
}
.sidebar .brand-logo {
  height: 26px;
  width: auto;
}
.sidebar.collapsed .brand-logo {
  display: none !important;
}
.sidebar .brand-icon {
  height: 26px;
  width: auto;
}
.sidebar:not(.collapsed) .brand-icon {
  display: none !important;
}
.sidebar.collapsed .sidebar-label {
  display: none;
}
.sidebar.collapsed .sidebar-brand {
  padding: 0;
  justify-content: center;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
}

.sidebar-group {
  margin-bottom: 20px;
}
.sidebar-group .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  margin-bottom: 6px;
  white-space: nowrap;
}
.sidebar.collapsed .sidebar-group .eyebrow span {
  display: none;
}
.sidebar.collapsed .sidebar-group .eyebrow::after {
  content: "";
  height: 1px;
  width: 16px;
  background: var(--border);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease-in-out, color 150ms ease-in-out;
}
.nav-item:hover {
  background: var(--surface-hover);
  text-decoration: none;
}
.nav-item.active {
  background: var(--surface-hover);
  color: var(--text-strong);
  font-weight: 500;
}
.nav-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.nav-item.active svg {
  color: var(--text-body);
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 150ms ease-in-out;
}
.sidebar-collapse-btn:hover {
  background: var(--surface-hover);
  color: var(--text-body);
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  transition: margin-left 200ms ease-in-out;
}
.main.expanded {
  margin-left: var(--sidebar-w-collapsed);
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 500;
  color: var(--text-strong);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 150ms ease-in-out, border-color 150ms ease-in-out, color 150ms ease-in-out;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn:hover {
  text-decoration: none;
}
.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}
.btn-primary:active:not(:disabled) {
  background: var(--primary-active);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--surface-hover) 80%, var(--text-strong) 8%);
}

.btn-ghost {
  color: var(--text-body);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text-strong);
}

.btn-destructive {
  background: var(--danger);
  color: #fff;
}
.btn-destructive:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 85%, #000);
}

.btn-outline-danger {
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  color: var(--danger-text);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.btn-outline-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
}

.btn-icon {
  width: 36px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 32px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.card-pad {
  padding: 16px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.input, .select, .textarea {
  height: 36px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent);
}
.input::placeholder, .textarea::placeholder {
  color: var(--text-muted);
}
.textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397979B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.field-error {
  font-size: 12px;
  color: var(--danger-text);
}

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

/* ---------- Badges / status pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-badge);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-hover);
  white-space: nowrap;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--text-muted);
  flex-shrink: 0;
}

.badge-success {
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success-text);
}
.badge-success .dot {
  background: var(--success);
}

.badge-warning {
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
  background: color-mix(in srgb, var(--warning) 15%, transparent);
  color: var(--warning-text);
}
.badge-warning .dot {
  background: var(--warning);
}

.badge-danger {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger-text);
}
.badge-danger .dot {
  background: var(--danger);
}

.badge-info {
  border-color: color-mix(in srgb, var(--info) 40%, transparent);
  background: color-mix(in srgb, var(--info) 15%, transparent);
  color: var(--info-text);
}
.badge-info .dot {
  background: var(--info);
}

/* ---------- Tables ---------- */

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

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  padding: 0 12px;
  height: 36px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 0 12px;
  height: 40px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  white-space: nowrap;
}
.table tbody tr {
  transition: background 150ms ease-in-out;
}
.table tbody tr:hover {
  background: var(--surface-hover);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table .cell-strong {
  color: var(--text-strong);
  font-weight: 500;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms ease-in-out;
}
.tab:hover {
  color: var(--text-strong);
}
.tab.active {
  color: var(--text-strong);
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--surface-hover);
  border-radius: var(--radius);
}
.segmented button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease-in-out, color 150ms ease-in-out;
}
.segmented button.active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

/* ---------- Progress ---------- */

.progress {
  height: 8px;
  width: 100%;
  border-radius: 9999px;
  background: var(--surface-hover);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: var(--primary);
  transition: width 200ms ease-in-out;
}
.progress-bar.success {
  background: var(--success);
}
.progress-bar.warning {
  background: var(--warning);
}

/* ---------- Virtualized grids (large member/recipient lists) ---------- */

.vtable {
  width: 100%;
}
.vrow {
  display: grid;
  gap: 12px;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
}
.vbody .vrow:hover {
  background: var(--surface-hover);
}
.vhead {
  height: 36px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vbody {
  max-height: 560px;
  overflow-y: auto;
}
.vrow .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Live logs page ---------- */

.log-body {
  max-height: calc(100vh - 240px);
  min-height: 280px;
  overflow-y: auto;
}
.log-line {
  display: grid;
  grid-template-columns: 110px 56px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
}
.log-line .log-msg {
  font-family: ui-monospace, 'SF Mono', Monaco, Consolas, monospace;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-body);
}

/* ---------- Modal ---------- */

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--scrim);
  animation: fade-in 150ms ease-in-out;
}
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-lg);
  animation: scale-in 200ms ease-in-out;
}
.modal-header {
  padding: 16px 16px 0;
}
.modal-body {
  padding: 8px 16px 16px;
  color: var(--text-body);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Dropdown menu ---------- */

.menu {
  position: absolute;
  z-index: 60;
  min-width: 180px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  animation: scale-in 150ms ease-in-out;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-body);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease-in-out;
}
.menu-item:hover {
  background: var(--surface-hover);
  color: var(--text-strong);
  text-decoration: none;
}
.menu-sep {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}
.menu-anchor {
  position: relative;
  display: inline-flex;
}

/* ---------- Misc ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
}
.empty-state svg {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 14px;
}
.empty-state p {
  margin: 0;
  max-width: 420px;
  color: var(--text-muted);
}

.alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
}
.alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-info {
  border-color: color-mix(in srgb, var(--info) 40%, transparent);
  background: color-mix(in srgb, var(--info) 12%, transparent);
}
.alert-success {
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success-text);
}
.alert-warning {
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  color: var(--warning-text);
}
.alert-danger {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger-text);
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--text-strong) 6%, transparent) 0%,
    color-mix(in srgb, var(--text-strong) 12%, transparent) 50%,
    color-mix(in srgb, var(--text-strong) 6%, transparent) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 16px 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header .subtitle {
  margin-top: 2px;
  color: var(--text-muted);
}

/* ---------- Auth (login) layout ---------- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.auth-logo {
  height: 34px;
  width: auto;
}

/* ---------- Blazor error UI (kept from the template) ---------- */

#blazor-error-ui {
  color-scheme: light only;
  bottom: 0;
  display: none;
  left: 0;
  right: 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 0.7rem 1rem;
  z-index: 1000;
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

@media (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-w-collapsed);
  }
  .sidebar .sidebar-label,
  .sidebar .sidebar-group .eyebrow span {
    display: none;
  }
  .sidebar .brand-logo {
    display: none !important;
  }
  .sidebar:not(.collapsed) .brand-icon {
    display: inline-block !important;
  }
  .sidebar .sidebar-brand {
    padding: 0;
    justify-content: center;
  }
  .main {
    margin-left: var(--sidebar-w-collapsed);
  }
  .content {
    padding: 16px;
  }
}

/* ---------- Animations ---------- */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}
