@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&display=swap");
:root {
  --bg: #f4efe5;
  --ink: #1f2933;
  --muted: #5b6570;
  --brand: #006d77;
  --accent: #ee9b00;
  --card: rgba(255, 252, 245, 0.94);
  --line: rgba(31, 41, 51, 0.12);
  --danger: #a63d40;
  --success: #1f7a4d;
  --sidebar: #17313a;
  --sidebar-muted: rgba(247, 251, 252, 0.72);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.1);
  --shadow-strong: 0 20px 52px rgba(15, 23, 42, 0.14);
}

body[data-theme="dark"] {
  --bg: #0f1720;
  --ink: #e6edf3;
  --muted: #9aa7b5;
  --brand: #3cc4cf;
  --accent: #f7b547;
  --card: rgba(14, 23, 34, 0.9);
  --line: rgba(148, 163, 184, 0.18);
  --danger: #ff8f8f;
  --success: #59d39b;
  --sidebar: #081118;
  --sidebar-muted: rgba(226, 232, 240, 0.78);
  --shadow-soft: 0 16px 42px rgba(2, 8, 23, 0.34);
  --shadow-strong: 0 24px 60px rgba(2, 8, 23, 0.46);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at top left,
      rgba(238, 155, 0, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(0, 109, 119, 0.22),
      transparent 30%
    ),
    linear-gradient(135deg, #f6f1e8 0%, #f1e8d8 52%, #efe8dc 100%);
  transition:
    background 0.24s ease,
    color 0.24s ease;

  /* SweetAlert2 theme tweaks to match site visuals */
  .swal2-popup {
    font-family: Inter, Verdana, Geneva, sans-serif;
    border-radius: var(--radius-lg) !important;
    background: linear-gradient(
      180deg,
      rgba(255, 252, 245, 0.98),
      rgba(255, 250, 242, 0.98)
    ) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink) !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 22px !important;
    max-width: 520px !important;
  }
  .swal2-title {
    font-weight: 800;
    color: var(--ink) !important;
  }
  .swal2-html-container {
    color: var(--muted) !important;
    font-weight: 500;
    margin-top: 6px;
  }
  .swal2-actions {
    display: flex !important;
    gap: 10px !important;
    justify-content: center;
    margin-top: 18px !important;
  }
  .swal2-popup .primary-btn {
    padding: 10px 18px;
    font-weight: 700;
    font-size: 18px;
  }
  .swal2-popup .secondary-btn {
    padding: 10px 18px;
    font-weight: 700;
  }
  .swal2-toast {
    background: rgba(255, 252, 245, 0.96) !important;
    border: 1px solid rgba(31, 41, 51, 0.08) !important;
    color: var(--ink) !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12) !important;
  }
  .swal2-icon.swal2-warning {
    color: var(--accent) !important;
  }
  .swal2-icon.swal2-success {
    color: var(--success) !important;
  }
  .swal2-popup .modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 999px;
  }
}

body[data-theme="dark"] {
  background:
    radial-gradient(
      circle at top left,
      rgba(247, 181, 71, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(60, 196, 207, 0.16),
      transparent 30%
    ),
    linear-gradient(135deg, #071018 0%, #0d1620 48%, #101d2b 100%);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .icon-btn,
body[data-theme="dark"] .admin-notifications,
body[data-theme="dark"] .admin-theme-toggle,
body[data-theme="dark"] .admin-profile-summary,
body[data-theme="dark"] .admin-profile-menu,
body[data-theme="dark"] .admin-notification-panel,
body[data-theme="dark"] .page-loader-panel,
body[data-theme="dark"] table,
body[data-theme="dark"] .asset-preview,
body[data-theme="dark"] .upload-card,
body[data-theme="dark"] .upload-preview,
body[data-theme="dark"] .empty-state-panel {
  background: rgba(15, 23, 35, 0.92);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] select {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23e6edf3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E")
      calc(100% - 16px) 50% / 18px 18px no-repeat,
    rgba(15, 23, 35, 0.92);
}

body[data-theme="dark"] .admin-search,
body[data-theme="dark"] .country-code-trigger,
body[data-theme="dark"] .country-code-panel,
body[data-theme="dark"] .listing-custom-select-trigger,
body[data-theme="dark"] .listing-custom-select-panel,
body[data-theme="dark"] .listing-custom-select-option,
body[data-theme="dark"] .profile-subscription-grid div {
  background: rgba(15, 23, 35, 0.92);
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .country-code-search {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239aa7b5' stroke-width='1.6'%3E%3Ccircle cx='8.5' cy='8.5' r='4.75'/%3E%3Cpath d='m12.2 12.2 4.1 4.1' stroke-linecap='round'/%3E%3C/svg%3E")
      no-repeat 15px center / 18px 18px,
    rgba(15, 23, 35, 0.96);
}

body[data-theme="dark"] .country-code-option:hover,
body[data-theme="dark"] .country-code-option.is-selected,
body[data-theme="dark"] .listing-custom-select-option:hover,
body[data-theme="dark"] .listing-custom-select-option.is-selected,
body[data-theme="dark"] .admin-profile-menu-item:hover,
body[data-theme="dark"] .admin-profile-menu-item:focus-within {
  background: linear-gradient(
    135deg,
    rgba(60, 196, 207, 0.12),
    rgba(247, 181, 71, 0.08)
  );
}

body[data-theme="dark"] .upload-card,
body[data-theme="dark"] .empty-state-cell {
  background:
    linear-gradient(135deg, rgba(60, 196, 207, 0.08), rgba(247, 181, 71, 0.08)),
    rgba(15, 23, 35, 0.92);
}

body[data-theme="dark"] th {
  background: linear-gradient(
    90deg,
    rgba(60, 196, 207, 0.14),
    rgba(247, 181, 71, 0.08)
  );
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

body[data-theme="dark"] tbody tr:nth-child(odd) {
  background: rgba(60, 196, 207, 0.04);
}

body[data-theme="dark"] tbody tr:hover {
  background: rgba(60, 196, 207, 0.08);
}

body[data-theme="dark"] .modal-backdrop,
body[data-theme="dark"] .page-loader {
  background: rgba(2, 8, 23, 0.74);
}

body[data-theme="dark"] .swal2-popup,
body[data-theme="dark"] .swal2-toast {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 35, 0.98),
    rgba(10, 18, 28, 0.98)
  ) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

body[data-theme="dark"] .swal2-title,
body[data-theme="dark"] .swal2-html-container {
  color: var(--ink) !important;
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px;
}
.hero-card,
.login-card,
.toolbar-card,
.metric-card,
.chart-card,
.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.hero-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
}
.hero-copy {
  padding: 56px;
  background: linear-gradient(
    160deg,
    rgba(0, 109, 119, 0.95),
    rgba(15, 76, 92, 0.96)
  );
  color: #f7fbfc;
}
.hero-panel,
.login-card {
  padding: 40px;
}
.eyebrow,
.sidebar-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 700;
}
h1,
.sidebar-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
}
h3 {
  margin: 0 0 16px;
}
.lede,
.results-copy,
.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}
.hero-copy .lede {
  color: rgba(247, 251, 252, 0.84);
}
.form-grid,
.stack-form,
.toolbar-grid {
  display: grid;
  gap: 18px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
label:has([required]) > span::after,
label:has(.is-required)::after {
  content: " *";
  color: var(--danger);
}
input,
select,
textarea,
button,
a {
  font: inherit;
}
input,
select,
textarea {
  font-weight: 500;
  width: 100%;
  border: 1px solid rgba(31, 41, 51, 0.16);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  min-height: 58px;
  background: rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
select {
  padding-right: 46px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231f2933' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E")
      calc(100% - 16px) 50% / 18px 18px no-repeat,
    rgba(255, 255, 255, 0.9);
}
select option {
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
}
select:hover {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231f2933' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E")
      calc(100% - 16px) 50% / 18px 18px no-repeat,
    rgba(255, 255, 255, 0.96);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(0, 109, 119, 0.18);
  border-color: var(--brand);
}
textarea {
  min-height: 140px;
  resize: vertical;
}
input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-field {
  gap: 10px;
}
.upload-card {
  position: relative;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px dashed rgba(0, 109, 119, 0.35);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(0, 109, 119, 0.08), rgba(238, 155, 0, 0.08)),
    rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
}
.upload-card::before {
  content: "Upload";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(0, 109, 119, 0.12);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.upload-card:hover {
  border-color: rgba(0, 109, 119, 0.6);
  transform: translateY(-1px);
}
.upload-card:focus-within {
  outline: 2px solid rgba(0, 109, 119, 0.18);
  border-color: var(--brand);
}
.upload-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.upload-card-copy strong {
  font-size: 0.98rem;
  color: var(--ink);
}
.upload-card-copy small {
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}
.upload-preview {
  display: none;
  grid-template-columns: minmax(0, 160px) 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(0, 109, 119, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}
.upload-preview.is-visible {
  display: grid;
}
.upload-preview-media {
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 109, 119, 0.06);
}
.upload-preview-image {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}
.upload-preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 84px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 109, 119, 0.12);
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.upload-preview-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.upload-preview-copy strong,
.upload-preview-copy small {
  word-break: break-word;
}
.upload-preview-clear {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}
.password-field {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
  align-items: center;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(31, 41, 51, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--brand);
}
.split-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.phone-field {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.country-code-picker {
  position: relative;
  min-width: 0;
}
.country-code-trigger,
.country-code-search,
.country-code-option {
  font-family:
    "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Verdana, Geneva,
    sans-serif;
}
.country-code-trigger {
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 109, 119, 0.16);
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(250, 248, 242, 0.96)
  );
  color: var(--ink);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.country-code-trigger:hover {
  border-color: rgba(0, 109, 119, 0.34);
  transform: translateY(-1px);
}
.country-code-picker.is-open .country-code-trigger {
  border-color: var(--brand);
  box-shadow:
    0 0 0 4px rgba(0, 109, 119, 0.12),
    0 18px 36px rgba(15, 23, 42, 0.1);
}
.country-code-trigger-flag,
.country-code-option-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(31, 41, 51, 0.05);
  box-shadow: inset 0 0 0 1px rgba(31, 41, 51, 0.06);
}
.country-code-trigger-flag img,
.country-code-option-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.country-code-trigger-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.country-code-trigger-label {
  color: rgba(91, 101, 112, 0.88);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.country-code-trigger-name,
.country-code-option-name {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.country-code-trigger-name {
  font-size: 0.98rem;
}
.country-code-trigger-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.country-code-trigger-code,
.country-code-option-code {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}
.country-code-trigger-code {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 109, 119, 0.1);
  color: var(--brand);
  font-weight: 800;
}
.country-code-trigger-caret {
  color: var(--muted);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.country-code-trigger-caret svg {
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}
.country-code-picker.is-open .country-code-trigger-caret svg {
  transform: rotate(180deg);
}
.country-code-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 109, 119, 0.1);
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.16),
    0 8px 20px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  backdrop-filter: blur(14px);
}
.country-code-search-wrap {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(31, 41, 51, 0.08);
  background: linear-gradient(
    180deg,
    rgba(0, 109, 119, 0.05),
    rgba(255, 255, 255, 0)
  );
}
.country-code-search {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 16px 12px 44px;
  border-color: rgba(31, 41, 51, 0.1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235b6570' stroke-width='1.6'%3E%3Ccircle cx='8.5' cy='8.5' r='4.75'/%3E%3Cpath d='m12.2 12.2 4.1 4.1' stroke-linecap='round'/%3E%3C/svg%3E")
      no-repeat 15px center / 18px 18px,
    rgba(249, 250, 251, 0.96);
}
.country-code-options {
  max-height: min(320px, 50vh);
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.country-code-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.country-code-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.country-code-option-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.country-code-option-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.country-code-option-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 41, 51, 0.06);
  font-weight: 800;
  color: #405261;
}
.country-code-option-check {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0;
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.country-code-option-check::before {
  content: "✓";
  font-size: 0.78rem;
  font-weight: 800;
}
.country-code-option:hover,
.country-code-option.is-selected {
  background: linear-gradient(
    135deg,
    rgba(0, 109, 119, 0.09),
    rgba(238, 155, 0, 0.06)
  );
}
.country-code-option:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(0, 109, 119, 0.08);
}
.country-code-option.is-selected {
  box-shadow: inset 0 0 0 1px rgba(0, 109, 119, 0.18);
}
.country-code-option.is-selected .country-code-option-check {
  opacity: 1;
  transform: scale(1);
}
.country-code-option.is-selected .country-code-option-code {
  background: rgba(0, 109, 119, 0.14);
  color: var(--brand);
}
.country-code-option[hidden] {
  display: none;
}
.country-code-empty {
  padding: 18px 14px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.toolbar-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.toolbar-card {
  padding: 15px 24px;
  margin-bottom: 20px;
}
.primary-btn,
.secondary-btn,
.ghost-link,
.table-link,
.danger-btn,
.pagination-link,
.sidebar-link,
.modal-close {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary-btn,
.table-link,
.pagination-link.active {
  background: linear-gradient(135deg, var(--accent), #ca6702);
  color: #fffdf8;
  font-weight: 700;
}
.secondary-btn,
.pagination-link,
.modal-close {
  background: rgba(31, 41, 51, 0.06);
  color: var(--ink);
  font-weight: 700;
}
.danger-btn {
  background: rgba(166, 61, 64, 0.12);
  color: var(--danger);
  font-weight: 700;
  padding: 10px 16px;
}
.table-link {
  padding: 10px 16px;
}
.ghost-link {
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #f7fbfc;
  background: transparent;
}
.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}
.notice.success {
  background: rgba(31, 122, 77, 0.12);
  color: var(--success);
}
.notice.error {
  background: rgba(166, 61, 64, 0.12);
  color: var(--danger);
}
.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1400;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  box-shadow: 0 18px 44px rgba(31, 41, 51, 0.16);
  background: rgba(255, 252, 245, 0.98);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: toast-enter 0.22s ease-out;
}
.toast-copy {
  display: grid;
  gap: 4px;
}
.toast-copy strong {
  font-size: 0.95rem;
}
.toast-copy span {
  color: var(--muted);
  line-height: 1.5;
}
.toast-success {
  border-left: 5px solid var(--success);
}
.toast-error {
  border-left: 5px solid var(--danger);
}
.toast-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.toast-close:hover {
  background: rgba(31, 41, 51, 0.06);
}
.toast.is-leaving {
  animation: toast-leave 0.24s ease forwards;
}
.page-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.34);
  backdrop-filter: blur(4px);
  z-index: 1200;
}
.page-loader.is-active {
  display: flex;
}
.page-loader-panel {
  min-width: 180px;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px 28px;
  background: rgba(255, 252, 245, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(31, 41, 51, 0.18);
  font-weight: 700;
}
.page-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(0, 109, 119, 0.16);
  border-top-color: var(--brand);
  border-right-color: var(--accent);
  animation: loader-spin 0.75s linear infinite;
}
body.is-loading {
  cursor: progress;
}
body.is-loading .page-loader {
  display: flex;
}
@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pill.success {
  background: rgba(31, 122, 77, 0.12);
  color: var(--success);
}
.status-pill.error {
  background: rgba(166, 61, 64, 0.12);
  color: var(--danger);
}
.admin-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 0;
}
.login-card {
  width: min(520px, calc(100% - 24px));
}

/* —— Admin login (split card) —— */
.login-page-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 40px);
  box-sizing: border-box;
}
.login-page-card {
  --login-border-width: 3px;
  --login-radius-outer: calc(var(--radius-xl) + 4px);
  --login-radius-inner: calc(var(--radius-xl) + 1px);
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  border-radius: var(--login-radius-outer);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: none;
  padding: var(--login-border-width);
  box-sizing: border-box;
  box-shadow:
    var(--shadow-strong),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  background: transparent;
}
.login-page-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--login-radius-outer);
  transform-origin: 50% 50%;
  background: conic-gradient(
    from 0deg,
    #0d9488,
    #ee9b00,
    #22d3ee,
    #818cf8,
    #0f766e,
    #f59e0b,
    #14b8a6,
    #0d9488
  );
  animation: login-border-spin 8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .login-page-card::before {
    animation: none;
  }
}
@keyframes login-border-spin {
  to {
    transform: rotate(360deg);
  }
}
.login-page-brand {
  position: relative;
  padding: clamp(28px, 5vw, 48px);
  color: #f7fbfc;
  background: linear-gradient(155deg, #0a4f52 0%, #0d3d45 42%, #0a161c 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  z-index: 1;
  border-radius: var(--login-radius-inner) 0 0 var(--login-radius-inner);
}
.login-page-brand-glow {
  position: absolute;
  inset: -40% -20% auto -30%;
  height: 85%;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(238, 155, 0, 0.35),
    transparent 55%
  );
  pointer-events: none;
}
.login-page-brand-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: 28rem;
}
.login-page-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
.login-page-logo {
  width: 40px;
  height: auto;
  display: block;
}
.login-page-brand-name {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 251, 252, 0.72);
}
.login-page-brand-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-page-brand-lede {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(247, 251, 252, 0.78);
}
.login-page-brand-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(247, 251, 252, 0.88);
}
.login-page-brand-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-page-brand-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ca6702);
  box-shadow: 0 0 0 3px rgba(238, 155, 0, 0.25);
}
.login-page-panel {
  padding: clamp(28px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 1;
  border-radius: 0 var(--login-radius-inner) var(--login-radius-inner) 0;
  background: linear-gradient(
    180deg,
    rgba(255, 252, 245, 0.98) 0%,
    rgba(255, 250, 242, 0.99) 100%
  );
}
.login-page-panel-header {
  display: grid;
  gap: 8px;
}
.login-page-panel .eyebrow.login-page-eyebrow {
  margin: 0;
}
.login-page-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.login-page-lede {
  font-size: 0.94rem;
  line-height: 1.55;
}
.login-page-form {
  gap: 20px;
}
.login-field .login-field-label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-page-form input::placeholder {
  color: rgba(91, 101, 112, 0.55);
}
.login-page-submit {
  width: 100%;
  margin-top: 4px;
  padding: 16px 22px;
  font-size: 1rem;
  box-shadow: 0 14px 28px rgba(202, 103, 2, 0.28);
}
.login-page-footnote {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.login-page-links {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
}
.login-page-secondary-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.login-page-secondary-link:hover {
  text-decoration: underline;
}
.login-page-verify-email {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.5;
}
.login-page-verify-email strong {
  color: var(--ink);
  word-break: break-all;
}
@media (max-width: 840px) {
  .login-page-card {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-page-brand {
    min-height: auto;
    padding: 28px 24px 24px;
    border-radius: var(--login-radius-inner) var(--login-radius-inner) 0 0;
  }
  .login-page-panel {
    border-radius: 0 0 var(--login-radius-inner) var(--login-radius-inner);
  }
  .login-page-brand-list {
    display: none;
  }
  .login-page-brand-title {
    font-size: 1.35rem;
  }
}
@media (max-width: 480px) {
  .login-page-shell {
    padding: 12px;
  }
  .login-page-panel {
    padding: 22px 18px;
  }
}
.admin-shell-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  align-items: start;
  gap: 0;
  transition: grid-template-columns 0.26s ease;
}
.admin-sidebar {
  background: linear-gradient(
    180deg,
    rgba(23, 49, 58, 0.98),
    rgba(10, 22, 29, 0.98)
  );
  color: #f7fbfc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  width: 280px;
  transition:
    width 0.26s ease,
    padding 0.26s ease;
}
.sidebar-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}
.sidebar-brand-image {
  width: 100%;
  max-width: 60px;
  height: 50px;
  margin: 0 auto;
  /* border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  padding: 12px; */
}
.sidebar-title {
  color: #f7fbfc;
  font-size: 1.3rem;
  margin-bottom: 0;
}
.sidebar-nav {
  display: grid;
  gap: 8px;
}
.sidebar-group {
  display: grid;
  gap: 8px;
}
.sidebar-group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.sidebar-group-header-joined {
  gap: 0;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.sidebar-group-link {
  min-width: 0;
}
.sidebar-group-header-joined .sidebar-group-link {
  background: transparent;
  border-radius: 14px;
  flex: 1 1 auto;
}
.sidebar-group-trigger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}
.sidebar-group-trigger-integrated {
  width: 42px;
  height: 42px;
  margin-left: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.sidebar-group-trigger:hover,
.sidebar-group-trigger:focus-visible,
.sidebar-group-trigger.active {
  background: linear-gradient(
    135deg,
    rgba(238, 155, 0, 0.95),
    rgba(202, 103, 2, 0.92)
  );
  color: #fffdf8;
  transform: translateX(2px);
}
.sidebar-group-caret {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}
.sidebar-group-caret svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-group.is-open .sidebar-group-caret {
  transform: rotate(180deg);
}
.sidebar-submenu {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    transform 0.22s ease,
    padding-top 0.22s ease;
}
.sidebar-group.is-open .sidebar-submenu {
  max-height: 420px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 4px;
}
.sidebar-group.is-open .sidebar-group-header-joined {
  background: rgba(255, 255, 255, 0.07);
}
.sidebar-sublink {
  min-height: 44px;
  padding-block: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-muted);
  padding: 12px 14px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}
.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-action:hover,
.sidebar-action:focus-visible {
  background: linear-gradient(
    135deg,
    rgba(238, 155, 0, 0.95),
    rgba(202, 103, 2, 0.92)
  );
  color: #fffdf8;
  transform: translateX(2px);
}
.sidebar-link-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-link-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-collapse-toggle .sidebar-link-icon svg {
  width: 18px;
  height: 18px;
}
.sidebar-link-label {
  min-width: 0;
  white-space: nowrap;
  opacity: 1;
  max-width: 220px;
  overflow: hidden;
  transition:
    opacity 0.18s ease,
    max-width 0.22s ease;
}
.sidebar-link.active {
  background: linear-gradient(
    135deg,
    rgba(238, 155, 0, 0.95),
    rgba(202, 103, 2, 0.92)
  );
  color: #fffdf8;
}
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.sidebar-action {
  width: 100%;
}
.admin-main {
  padding: 24px;
  min-width: 0;
}
.admin-topbar {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.admin-topbar.admin-topbar-surface {
  position: relative;
  align-items: center;
  gap: 28px;
  padding: 15px 24px;
  border-radius: 30px;
  border: 1px solid rgba(160, 125, 66, 0.12);
  background:
    radial-gradient(circle at 16% 30%, rgba(255, 255, 255, 0.78), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(238, 155, 0, 0.12), transparent 22%),
    linear-gradient(110deg, rgba(255, 250, 242, 0.98), rgba(247, 239, 223, 0.98) 46%, rgba(244, 235, 217, 0.98) 100%);
  box-shadow:
    0 22px 46px rgba(69, 52, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: visible;
}
.admin-topbar.admin-topbar-surface::after {
  content: "";
  position: absolute;
  inset: auto 22px 0 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 125, 66, 0.18), transparent);
  pointer-events: none;
}

/* Topbar actions: search and notifications */
.admin-topbar-meta {
  min-width: 0;
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
}
.admin-topbar-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}
.admin-topbar-actions-cluster {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(31, 41, 51, 0.08);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 2;
}
.admin-topbar .eyebrow {
  margin-bottom: 0;
  color: #d48300;
  letter-spacing: 0.2em;
}
.admin-topbar h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
  color: #13283a;
}
.admin-topbar .lede {
  margin: 0;
  max-width: 720px;
  font-size: 1.02rem;
  color: #556270;
  line-height: 1.6;
}
.admin-theme-toggle {
  width: 98px;
  min-width: 98px;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}
.admin-theme-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(0.99);
}
.admin-theme-switch-shell {
  display: inline-flex;
  width: 100%;
}
.admin-theme-switch-track {
  position: relative;
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: #444447;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 24px rgba(15, 23, 42, 0.14);
}
.admin-theme-switch-thumb {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    transform 0.22s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
  overflow: hidden;
}
.admin-theme-switch-thumb-dark {
  transform: translateX(0);
}
.admin-theme-switch-thumb-light {
  transform: translateX(54px);
}
.admin-theme-switch-icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.admin-theme-switch-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #121212;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-theme-switch-icon-sun {
  opacity: 1;
  transform: scale(1);
}
.admin-theme-switch-icon-moon {
  opacity: 0;
  transform: scale(0.7);
}
body[data-theme="dark"] .admin-theme-switch-track {
  background: linear-gradient(180deg, #fbfbfa, #f1efe9);
}
body[data-theme="dark"] .admin-theme-switch-thumb {
  background: #fff;
}
body[data-theme="dark"] .admin-theme-switch-icon-sun {
  opacity: 0;
  transform: scale(0.7);
}
body[data-theme="dark"] .admin-theme-switch-icon-moon {
  opacity: 1;
  transform: scale(1);
}
.admin-search {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.admin-search input {
  border: 0;
  background: transparent;
  padding: 6px 8px;
  width: 220px;
  font: inherit;
  outline: none;
}
.admin-search input::placeholder {
  color: var(--muted);
}
.admin-notifications {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition:
    transform 0.16s ease,
    color 0.16s ease;
}
.admin-notifications svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.admin-notifications:hover {
  transform: translateY(-1px);
  color: var(--brand);
}
.admin-notification-menu {
  position: relative;
  flex-shrink: 0;
}
.admin-notification-bell {
  cursor: pointer;
  position: relative;
  color: var(--ink);
}
.admin-notification-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff6b6b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 0 0 3px var(--bg);
}
.admin-notification-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(92vw, 360px);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  z-index: 80;
}
.admin-notification-panel-header,
.admin-notification-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(248, 250, 252, 0.95);
}
.admin-notification-panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-notification-list {
  max-height: 360px;
  overflow-y: auto;
}
.admin-notification-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.admin-notification-item.is-unread {
  background: rgba(13, 148, 136, 0.06);
}
.admin-notification-item-copy {
  display: grid;
  gap: 4px;
}
.admin-notification-item-copy strong {
  color: var(--ink);
}
.admin-notification-item-copy span,
.admin-notification-item small,
.admin-notification-empty,
.notification-table-message {
  color: var(--muted);
}
.admin-notification-item small {
  white-space: nowrap;
}
.admin-notification-empty {
  padding: 18px 16px;
}
.admin-notification-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.notification-table-message.is-unread {
  color: var(--ink);
  font-weight: 600;
}
.admin-profile-summary {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 41, 51, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: inherit;
  text-decoration: none;
}
.admin-profile-avatar {
  width: 46px;
  height: 46px;
  border-radius: 100%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  font-weight: 800;
}
.admin-profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-profile-avatar-fallback {
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.admin-profile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
}
.admin-profile-copy strong,
.admin-profile-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-profile-copy strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}
.admin-profile-copy small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.15;
}

/* Admin profile dropdown menu */
.admin-profile-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  cursor: pointer;
}
body[data-theme="dark"] .admin-notifications,
body[data-theme="dark"] .admin-profile-summary {
  background: rgba(8, 17, 24, 0.3);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body[data-theme="dark"] .admin-notification-badge {
  box-shadow: 0 0 0 3px #0f1720;
}
body[data-theme="dark"] .admin-topbar.admin-topbar-surface {
  border-color: rgba(92, 138, 160, 0.16);
  background:
    radial-gradient(circle at 18% 26%, rgba(60, 196, 207, 0.12), transparent 24%),
    radial-gradient(circle at 84% 22%, rgba(247, 181, 71, 0.1), transparent 18%),
    linear-gradient(125deg, rgba(13, 22, 32, 0.96), rgba(18, 28, 40, 0.96) 48%, rgba(20, 34, 48, 0.98) 100%);
  box-shadow:
    0 24px 48px rgba(2, 8, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body[data-theme="dark"] .admin-topbar.admin-topbar-surface::after {
  background: linear-gradient(90deg, transparent, rgba(92, 138, 160, 0.22), transparent);
}
body[data-theme="dark"] .admin-topbar-actions-cluster {
  background: rgba(8, 17, 24, 0.54);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow:
    0 16px 34px rgba(2, 8, 23, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body[data-theme="dark"] .admin-topbar .eyebrow {
  color: #f7b547;
}
body[data-theme="dark"] .admin-topbar h2 {
  color: #f3f7fb;
}
body[data-theme="dark"] .admin-topbar .lede {
  color: #a8b4c3;
}
.admin-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  min-width: 220px;
  background: rgba(255, 252, 245, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: grid;
  gap: 8px;
}
.admin-profile-menu[hidden] {
  display: none;
}
.admin-profile-menu-item {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.admin-profile-menu-item:hover,
.admin-profile-menu-item:focus-within {
  background: linear-gradient(
    135deg,
    rgba(0, 109, 119, 0.06),
    rgba(238, 155, 0, 0.03)
  );
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(0, 109, 119, 0.08);
}
.admin-profile-menu-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #37505a;
}
.admin-profile-menu-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-profile-menu-button {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  width: 100%;
  text-align: left;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.mobile-nav-toggle,
.sidebar-backdrop {
  display: none;
}
.mobile-nav-toggle {
  border: 0;
  border-radius: 18px;
  background: rgba(31, 41, 51, 0.08);
  width: 52px;
  height: 52px;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.12);
}
.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

.admin-topbar h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2vw, 2.05rem);
}
.admin-topbar .lede {
  line-height: 1.5;
  font-size: 0.96rem;
}

@media (min-width: 961px) {
  body.sidebar-collapsed .admin-shell-layout {
    grid-template-columns: 92px 1fr;
  }
  body.sidebar-collapsed .admin-sidebar {
    padding: 20px 10px;
    width: 92px;
    align-items: center;
  }
  body.sidebar-collapsed .sidebar-brand-image {
    max-width: 44px;
    height: 72px;
  }
  body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    width: 100%;
    gap: 0;
  }
  body.sidebar-collapsed .sidebar-link-icon {
    margin: 0 auto;
  }
  body.sidebar-collapsed .sidebar-link-label,
  body.sidebar-collapsed .sidebar-kicker,
  body.sidebar-collapsed .sidebar-title {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
  }
  body.sidebar-collapsed .sidebar-submenu {
    padding-left: 0;
    width: 100%;
  }
  body.sidebar-collapsed .sidebar-group-header {
    grid-template-columns: 1fr;
  }
  body.sidebar-collapsed .sidebar-group-caret {
    display: none;
  }
  body.sidebar-collapsed .sidebar-collapse-toggle .sidebar-link-icon {
    margin: 0;
  }
  body.sidebar-collapsed .sidebar-footer {
    width: 100%;
  }
  body.sidebar-collapsed .sidebar-collapse-toggle .sidebar-link-icon {
    transform: rotate(180deg);
  }
}

.toolbar-actions {
  padding-top: 15px;
}

.pagination-bar {
  margin-top: 15px;
  margin-bottom: 15px;
  justify-content: center;
}

.listing-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 360px);
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 15px 24px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
}

.listing-header-summary {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.listing-header-summary-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
}

.listing-header-summary-value {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.listing-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
  background: var(--card);
}

.listing-header-page {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

.listing-filter-label {
  display: grid;
  gap: 10px;
  align-content: start;
}

.listing-filter-label > span,
.listing-page-size-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.2;
}

.listing-custom-select {
  position: relative;
}

.listing-custom-select-native {
  display: none;
}

.listing-custom-select-trigger {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid rgba(31, 41, 51, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.listing-custom-select-trigger:hover {
  transform: translateY(-1px);
}

.listing-custom-select.is-open .listing-custom-select-trigger,
.listing-custom-select-trigger:focus-visible {
  outline: 2px solid rgba(0, 109, 119, 0.18);
  border-color: var(--brand);
}

.listing-custom-select-trigger-value {
  min-width: 0;
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-custom-select-trigger-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.listing-custom-select.is-open .listing-custom-select-trigger-icon {
  transform: rotate(180deg);
}

.listing-custom-select-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.listing-custom-select-options {
  max-height: 280px;
  padding: 6px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
}

.listing-custom-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.listing-custom-select-option:hover {
  background: rgba(31, 41, 51, 0.05);
}

.listing-custom-select-option.is-selected {
  font-weight: 700;
  background: rgba(0, 109, 119, 0.08);
}

.listing-custom-select-option-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-page-size {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0;
}

.listing-page-size-control {
  width: min(190px, 100%);
  margin: 0;
}

.listing-page-size-shell {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
}

.listing-page-size-label {
  font-size: 0.76rem;
}

.listing-page-size-select {
  min-height: 40px;
  font-weight: 700;
}

.listing-page-size-panel {
  min-width: 100%;
}

.section-actions,
.toolbar-actions,
.row-actions,
.pagination-bar,
.table-meta,
.modal-actions,
.modal-header {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.section-actions {
  margin-bottom: 18px;
  justify-content: flex-end;
}
.section-actions .primary-btn {
  box-shadow: 0 10px 22px rgba(202, 103, 2, 0.24);
}
.table-meta {
  justify-content: space-between;
  margin: 0;
  gap: 10px 18px;
}

.table-meta .results-copy:first-child {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.table-meta .results-copy:last-child {
  color: var(--muted);
}
.pagination-pages {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.pagination-nav,
.pagination-number,
.pagination-ellipsis {
  min-width: 42px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
}
.pagination-nav {
  min-width: 64px;
}
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 41, 51, 0.55);
  font-weight: 700;
}
.pagination-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.row-actions form {
  margin: 0;
}
.action-icon-btn {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.action-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.action-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.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;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.metric-card {
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  border-radius: 14px;
}
.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}
.metric-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.metric-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(31, 41, 51, 0.06);
}
.metric-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.metric-card.accent-a {
  border-top: 6px solid #0f766e;
  color: #0f766e;
}
.metric-card.accent-b {
  border-top: 6px solid #ca6702;
  color: #ca6702;
}
.metric-card.accent-c {
  border-top: 6px solid #7c3aed;
  color: #7c3aed;
}
.metric-card.accent-d {
  border-top: 6px solid #1d4ed8;
  color: #1d4ed8;
}
.metric-card .metric-label,
.metric-card .metric-value {
  color: var(--ink);
}
.metric-value {
  margin: 10px 0 0;
  font-size: 2rem;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.chart-card {
  margin-top: 20px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.chart-card-wide {
  margin-bottom: 18px;
}
.chart-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.chart-card-heading-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chart-card-heading-main h3 {
  margin: 0;
}
.chart-card-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(
    135deg,
    rgba(24, 173, 163, 0.16),
    rgba(24, 173, 163, 0.08)
  );
  color: #128e86;
  box-shadow: inset 0 0 0 1px rgba(24, 173, 163, 0.08);
}
.chart-card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
}
.chart-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 49, 58, 0.08);
  overflow: hidden;
}
.chart-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #006d77, #ee9b00);
}
.trend-chart {
  width: 100%;
  height: auto;
  display: block;
}
.trend-area {
  fill: url(#trend-fill);
}
.trend-line {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-chart circle {
  fill: #fff;
  stroke: #ca6702;
  stroke-width: 2.5;
}
.trend-chart text {
  fill: #64748b;
  font-size: 12px;
}
.donut-chart-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
}
.donut-chart {
  width: 120px;
  height: 120px;
}
.donut-track {
  fill: none;
  stroke: rgba(23, 49, 58, 0.08);
  stroke-width: 14;
}
.donut-chart path {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}
.donut-total {
  fill: #17313a;
  font-size: 20px;
  font-weight: 700;
}
.donut-subtitle {
  fill: #64748b;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.donut-legend {
  display: grid;
  gap: 10px;
}
.donut-legend-item {
  text-transform: capitalize;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
}
.donut-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.86);
  min-width: 720px;
}
th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.93rem;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(0, 109, 119, 0.12);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
tbody tr:hover {
  background: rgba(0, 109, 119, 0.04);
}
/* Subtle zebra striping and improved header visuals for tables */
tbody tr:nth-child(odd) {
  background: rgba(15, 118, 110, 0.02);
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(15, 118, 110, 0.1),
    rgba(238, 155, 0, 0.05)
  );
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(31, 41, 51, 0.06);
  padding: 14px 16px;
}

/* Round the top corners of the table header inside the rounded wrapper */
table thead th:first-child {
  border-top-left-radius: 12px;
}
table thead th:last-child {
  border-top-right-radius: 12px;
}

/* Improve primary button hover */
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}
.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 28px 20px;
}
.empty-state-cell {
  background:
    radial-gradient(circle at top, rgba(13, 148, 136, 0.09), transparent 55%),
    linear-gradient(
      180deg,
      rgba(244, 247, 249, 0.92),
      rgba(255, 255, 255, 0.98)
    );
}
.empty-state-panel {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 24px 20px;
  border: 1px dashed rgba(13, 148, 136, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 12px 32px rgba(15, 23, 42, 0.06);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #0f766e;
  background: linear-gradient(
    135deg,
    rgba(20, 184, 166, 0.18),
    rgba(234, 179, 8, 0.12)
  );
  border: 1px solid rgba(13, 148, 136, 0.16);
}
.empty-state-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-state-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1rem;
}
.empty-state-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}
.modal-backdrop.is-open {
  display: flex;
}
.modal-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
  padding: 24px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-card-wide {
  width: min(760px, 100%);
}
.asset-preview-modal {
  width: min(960px, 100%);
}
.modal-header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-header h3 {
  margin: 0;
  min-width: 0;
}
.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.modal-actions {
  justify-content: flex-end;
  margin-top: 8px;
}
.asset-preview {
  border: 1px solid rgba(31, 41, 51, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}
.asset-preview-image-wrap {
  display: grid;
  place-items: center;
  padding: 18px;
  min-height: 320px;
}
.asset-preview-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
}
.asset-preview-document-wrap {
  min-height: 70vh;
}
.asset-preview-document {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #fff;
}
.subscription-pricing-shell {
  display: grid;
  gap: 28px;
}
.subscription-dashboard-shell {
  padding-top: 28px;
  padding-bottom: 40px;
}
.subscription-dashboard-topbar {
  margin-bottom: 24px;
}
.subscription-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.subscription-dashboard-profile {
  min-width: 240px;
}
.subscription-hero-card {
  margin-bottom: 24px;
}
.subscription-hero-panel {
  display: grid;
  align-content: center;
}
.subscription-summary-card {
  padding: 22px;
}
.subscription-summary-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.profile-subscription-card {
  margin-bottom: 20px;
}
.profile-subscription-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.profile-subscription-grid div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 41, 51, 0.08);
}
.profile-subscription-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-subscription-actions {
  justify-content: flex-start;
  margin-top: 20px;
}
.subscription-page-card {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 32px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.subscription-pricing-header {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px 24px 12px;
  text-align: center;
}
.subscription-pricing-eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f8db0;
}
.subscription-pricing-header h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  line-height: 1.2;
  color: #1583a3;
  text-transform: uppercase;
}
.subscription-pricing-header h3::after {
  content: "";
  display: block;
  width: min(420px, 100%);
  height: 3px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(21, 131, 163, 0.08),
    rgba(21, 131, 163, 0.95),
    rgba(21, 131, 163, 0.08)
  );
}
.subscription-pricing-header p:last-child {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}
.subscription-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.subscription-plan-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: 100%;
}
.subscription-plan-card.is-current {
  box-shadow: var(--shadow-strong);
}
.subscription-plan-card.is-disabled {
  opacity: 0.78;
}
.subscription-plan-card-head {
  align-items: flex-start;
}
.subscription-plan-head-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}
.subscription-current-pill {
  white-space: nowrap;
}
.subscription-pricing-body {
  display: grid;
  align-content: start;
  gap: 10px;
}
.subscription-plan-frequency {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.subscription-plan-range {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}
.subscription-pricing-features {
  width: 100%;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
}
.subscription-pricing-features li {
  position: relative;
  padding-left: 24px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #5f6d78;
}
.subscription-pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(31, 41, 51, 0.08);
}
.subscription-pricing-actions {
  display: grid;
  gap: 12px;
  align-content: end;
}
.subscription-pricing-paypal {
  min-height: 42px;
}
.subscription-pricing-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(163, 174, 184, 0.14);
  color: #6f7d88;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}
.subscription-pricing-current {
  background: rgba(31, 122, 77, 0.12);
  color: var(--success);
}
@media (max-width: 1200px) {
  .metric-grid,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-main {
    padding: 20px;
  }
  .subscription-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .admin-shell-layout {
    grid-template-columns: 1fr;
    position: relative;
  }
  .admin-sidebar {
    padding: 18px;
    gap: 18px;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, calc(100vw - 48px));
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    z-index: 1002;
    overflow-y: auto;
    box-shadow: 24px 0 48px rgba(10, 22, 29, 0.28);
  }
  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .sidebar-brand {
    justify-items: center;
  }
  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .sidebar-submenu {
    padding-left: 0;
  }
  .admin-main {
    padding: 16px;
  }
  .upload-preview {
    grid-template-columns: 1fr;
  }
  .mobile-nav-toggle,
  .sidebar-backdrop {
    display: block;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(17, 24, 39, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 1001;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-copy,
  .hero-panel,
  .login-card,
  .toolbar-card,
  .chart-card,
  .metric-card,
  .modal-card {
    padding: 24px;
  }
  .modal-card-wide {
    width: min(100%, 760px);
  }
  .asset-preview-modal {
    width: min(100%, 960px);
  }
  .toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .subscription-dashboard-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .subscription-pricing-header {
    padding-top: 16px;
  }
  .subscription-pricing-grid {
    grid-template-columns: 1fr;
  }
  .profile-subscription-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .chart-card-heading {
    flex-direction: column;
  }
  .donut-chart-wrap {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  table {
    min-width: 640px;
  }
}
@media (max-width: 640px) {
  .listing-header {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }
  .listing-header-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .listing-header-page {
    font-size: 0.9rem;
  }
  .listing-page-size {
    justify-content: stretch;
  }
  .listing-page-size-control {
    width: 100%;
  }
  .listing-custom-select-trigger {
    min-height: 56px;
  }
  .table-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .toast-stack {
    top: auto;
    right: 10px;
    bottom: 12px;
    left: 10px;
    width: auto;
  }
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 24px 0;
  }
  .hero-copy,
  .hero-panel,
  .login-card,
  .toolbar-card,
  .chart-card,
  .metric-card,
  .modal-card,
  .admin-sidebar,
  .admin-main {
    padding: 14px;
  }
  .phone-field,
  .password-field,
  .toolbar-grid,
  .metric-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .country-code-panel {
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    border-radius: 20px;
  }
  .country-code-trigger {
    min-height: 54px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 12px;
  }
  .country-code-trigger-meta {
    gap: 8px;
  }
  .country-code-trigger-code {
    padding-inline: 10px;
    font-size: 0.84rem;
  }
  .country-code-option {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }
  .country-code-option-meta {
    grid-column: 2;
    justify-content: space-between;
  }
  .sidebar-nav {
    grid-template-columns: 1fr;
  }
  .sidebar-submenu {
    padding-left: 10px;
  }
  .admin-topbar {
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .admin-topbar.admin-topbar-surface {
    padding: 16px;
    gap: 18px;
    border-radius: 24px;
  }
  .admin-topbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }
  .admin-topbar-actions-cluster {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 24px;
    flex-wrap: wrap;
  }
  .admin-profile-summary {
    min-width: 0;
    width: min(100%, 320px);
    max-width: 100%;
  }
  .mobile-nav-toggle {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
  .sidebar-link,
  .primary-btn,
  .secondary-btn,
  .ghost-link,
  .pagination-link {
    width: 100%;
  }
  .admin-topbar h1 {
    font-size: 1.3rem;
  }
  .admin-topbar h2 {
    font-size: 1.9rem;
  }
  .admin-topbar .lede {
    font-size: 0.92rem;
  }
  .admin-profile-copy small {
    font-size: 0.78rem;
  }
  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }
  .modal-card,
  .modal-card-wide {
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: calc(100vh - 12px);
    overflow-y: auto;
  }
  .asset-preview-document-wrap,
  .asset-preview-document {
    min-height: 50vh;
  }
  .table-meta,
  .pagination-bar,
  .row-actions,
  .toolbar-actions,
  .modal-actions,
  .modal-header {
    align-items: stretch;
    flex-direction: column;
  }
  .table-wrap {
    border-radius: 22px;
  }
  table {
    min-width: 560px;
  }
  th,
  td {
    padding: 12px;
    font-size: 0.92rem;
  }
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-leave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

/* Table Header Sorting */
th:has(.listing-sort-icon) {
  cursor: pointer;
  user-select: none;
}
th[data-sort-dir="asc"] .listing-sort-icon {
  transform: rotate(180deg);
}

/* Comprehensive Mobile Responsiveness Fixes */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  .shell {
    padding: 16px !important;
    width: 100% !important;
  }
  .admin-main {
    padding: 16px !important;
    width: 100vw !important;
    overflow-x: hidden;
  }
  .admin-shell-layout {
    width: 100vw;
    overflow-x: hidden;
  }
  .hero-card, .login-page-card, .toolbar-card, .metric-card, .chart-card {
    border-radius: 16px !important;
  }
  .hero-copy, .hero-panel, .login-page-panel {
    padding: 24px 16px !important;
  }
  .form-grid, .stack-form, .toolbar-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .phone-field {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  /* .table-wrap {
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  } */
  .modal-card {
    width: calc(100% - 32px) !important;
    margin: 16px !important;
    padding: 20px 16px !important;
  }
  .split-field {
    grid-template-columns: 1fr !important;
  }
  .modal-actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  .primary-btn, .secondary-btn, .danger-btn {
    width: 100%;
    margin-bottom: 8px;
  }
  h1, .sidebar-title {
    font-size: 2rem !important;
  }
  .listing-header {
    grid-template-columns: 1fr !important;
    gap: 16px;
    padding: 16px 16px !important;
  }
  .listing-header-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
  }
  .listing-page-size {
    justify-content: space-between;
  }
  .admin-topbar {
    padding: 16px !important;
  }
  body.sidebar-open {
    overflow: hidden;
  }
}

/* Hide sidebar brand or stack elements when collapsed */
body.sidebar-collapsed .sidebar-brand {
    flex-direction: column !important;
    gap: 8px !important;
}
body.sidebar-collapsed .sidebar-brand-image {
    display: none !important; /* The image shows hide completely if no space, or let's just make it smaller */
}
body.sidebar-collapsed .sidebar-collapse-toggle {
    margin: 0 auto;
}
body.sidebar-collapsed .sidebar-brand-text {
    display: none !important;
}
