@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --admin-primary: #0f766e;
  --admin-secondary: #f59e0b;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-surface: rgba(255, 255, 255, 0.84);
  --admin-border: rgba(148, 163, 184, 0.2);
  --admin-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

body.admin-body,
body.admin-auth-body {
  font-family: "Manrope", sans-serif;
  color: var(--admin-text);
}

body.admin-body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 20%),
    linear-gradient(180deg, #f3f8fb 0%, #f8fafc 55%, #eef7f4 100%);
  min-height: 100vh;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  color: #fff;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, #0f172a 0%, #112031 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 22px;
}

.admin-brand-logo,
.admin-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  color: var(--admin-primary);
  font-weight: 800;
}

.admin-brand-title {
  font-weight: 800;
}

.admin-brand-subtitle {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.9rem;
}

.sidebar-section-label {
  margin: 22px 0 12px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.menu-link:hover,
.menu-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.menu-link i {
  font-size: 1rem;
}

.content {
  padding: 26px 30px 36px;
}

.topbar,
.panel-card,
.admin-auth-card {
  background: var(--admin-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(16px);
}

.topbar {
  padding: 22px 24px;
  margin-bottom: 22px;
}

.topbar-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--admin-primary);
}

.topbar-title {
  margin: 4px 0 6px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.topbar-subtitle {
  color: var(--admin-muted);
}

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

.panel-card {
  padding: 24px;
  margin-bottom: 22px;
}

.section-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.small-muted {
  color: var(--admin-muted);
  font-size: 0.93rem;
}

.stat-card {
  height: 100%;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.86));
  border: 1px solid var(--admin-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.snapshot-card {
  height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.74);
}

.btn-brand {
  background: var(--admin-primary);
  color: #fff;
  border: none;
}

.btn-brand:hover,
.btn-brand:focus {
  background: #0b5f58;
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.64);
  color: var(--admin-text);
}

.form-control,
.form-select,
.form-control-color {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 11px 14px;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.form-control-color:focus {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: 0 0 0 0.22rem rgba(15, 118, 110, 0.12);
}

.table-responsive {
  overflow-x: auto;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--admin-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dataTables_wrapper .dt-buttons .btn {
  margin-bottom: 8px;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
  align-items: center;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  padding: 8px 10px;
}

.media-card {
  border-radius: 24px;
  border: 1px solid var(--admin-border);
  background: rgba(248, 250, 252, 0.85);
  padding: 18px;
}

.media-preview {
  min-height: 200px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.media-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.media-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tool-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.tool-toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.76);
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--admin-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-panel-card {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.92));
}

.settings-stack-structured {
  display: grid;
  gap: 18px;
}

.settings-brand-card {
  position: sticky;
  top: 24px;
}

.settings-cluster {
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.settings-cluster-emphasis {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

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

.settings-cluster-head .small-muted {
  max-width: 320px;
}

.font-picker-preview {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.9);
}

.font-picker-preview-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admin-muted);
}

.font-picker-preview-name {
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--admin-text);
}

.smtp-settings-grid {
  row-gap: 18px;
}

.smtp-settings-grid > [class*="col-"] {
  display: flex;
}

.smtp-settings-grid .col-md-4,
.smtp-settings-grid .col-md-2,
.smtp-settings-grid .col-md-3,
.smtp-settings-grid .col-md-6 {
  align-items: stretch;
}

.smtp-field-card {
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

.smtp-settings-grid .form-control {
  min-height: 48px;
}

.smtp-panel-card .save-row {
  margin-top: 8px;
}

.smtp-test-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.settings-panel-card .admin-section-head,
.settings-panel-card .settings-cluster-head,
.smtp-panel-card .admin-section-head {
  flex-direction: column;
  align-items: flex-start;
}

.settings-panel-card .admin-section-head .small-muted,
.settings-panel-card .settings-cluster-head .small-muted,
.smtp-panel-card .admin-section-head .small-muted {
  max-width: none;
}

.js-admin-settings-form > .row.g-3 > [class*="col-"],
.js-admin-settings-form .settings-stack > .settings-cluster,
.js-admin-settings-form .settings-cluster .row.g-3 > [class*="col-"],
.js-admin-settings-form .settings-cluster .row.g-4 > [class*="col-"],
.js-email-template-form .row.g-4 > [class*="col-"],
.js-email-template-form .row.g-3 > [class*="col-"],
.js-admin-smtp-form .row.g-3 > [class*="col-"],
.js-admin-test-email-form .row.g-3 > [class*="col-"] {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

.js-admin-settings-form .settings-stack,
.js-admin-settings-form .row.g-3,
.js-email-template-form .row.g-4,
.js-admin-smtp-form .row.g-3 {
  row-gap: 18px;
}

.js-admin-settings-form .settings-brand-card,
.js-admin-settings-form .settings-cluster,
.js-email-template-form .email-preview-panel,
.smtp-panel-card .smtp-field-card,
.smtp-panel-card .smtp-test-panel {
  width: 100%;
}

.js-admin-settings-form .settings-brand-card {
  position: static;
}

.settings-panel-card .tool-toggle-grid {
  grid-template-columns: 1fr;
}

.settings-panel-card .tool-toggle-card {
  justify-content: flex-start;
}

.settings-panel-card .tool-toggle-grid--workspaces {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 0.18rem rgba(220, 38, 38, 0.1) !important;
}

.is-valid {
  border-color: rgba(15, 118, 110, 0.34) !important;
}

.invalid-feedback {
  display: block;
  margin-top: 6px;
  color: #dc2626;
  font-size: 0.84rem;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .settings-brand-card {
    position: static;
  }

  .settings-cluster-head {
    flex-direction: column;
  }

  .settings-cluster-head .small-muted {
    max-width: none;
  }
}

.profile-overview {
  display: grid;
  gap: 18px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--admin-border);
  background: rgba(255, 255, 255, 0.72);
}

.profile-avatar,
.profile-avatar-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(245, 158, 11, 0.16));
  color: var(--admin-primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--admin-primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 18px 0 50px rgba(15, 23, 42, 0.14);
}

.admin-brand,
.menu-link,
.panel-card,
.topbar,
.stat-card,
.snapshot-card,
.media-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel-card {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 250, 0.88));
}

.topbar {
  background:
    radial-gradient(circle at right top, rgba(245, 158, 11, 0.1), transparent 25%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.86));
}

.menu-link:hover,
.menu-link.active,
.panel-card:hover,
.stat-card:hover,
.snapshot-card:hover {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.table-responsive {
  border-radius: 22px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.48);
}

.email-preview-panel {
  position: sticky;
  top: 18px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--admin-border);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
}

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

.email-preview-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admin-primary);
}

.email-preview-select {
  max-width: 240px;
}

.email-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.email-token-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--admin-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.email-preview-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: #fff;
}

body.admin-auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.24), transparent 24%),
    linear-gradient(135deg, #0f172a 0%, #103f3d 45%, #f59e0b 100%);
}

.admin-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 0;
}

.admin-auth-card {
  padding: 28px;
}

.admin-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

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

  .sidebar {
    position: relative;
    height: auto;
    padding: 18px 16px;
  }

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

  .content {
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn,
  .topbar-actions .dropdown,
  .topbar-actions .dropdown .btn {
    width: 100%;
  }

  .email-preview-panel {
    position: static;
  }
}

@media (max-width: 767px) {
  .panel-card,
  .topbar,
  .admin-auth-card {
    border-radius: 22px;
  }

  .panel-card,
  .topbar {
    padding: 18px;
  }

  .profile-summary {
    flex-direction: column;
    text-align: center;
  }

  .media-actions {
    flex-direction: column;
  }

  .media-actions .btn {
    width: 100%;
  }

  .email-preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .email-preview-select {
    max-width: none;
  }

  .email-preview-frame {
    min-height: 500px;
  }
}

:root {
  --admin-primary: #2563eb;
  --admin-secondary: #14b8a6;
  --admin-text: #e5eefb;
  --admin-muted: #93a8c7;
  --admin-panel-text: #0f172a;
  --admin-border: rgba(148, 163, 184, 0.18);
}

body.admin-body,
body.admin-auth-body {
  font-family: "IBM Plex Sans", sans-serif;
}

body.admin-body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.14), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #0b1526 42%, #101d31 100%);
}

.admin-shell {
  grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  overflow: hidden;
  background:
    linear-gradient(180deg, #0f172a 0%, #111c32 48%, #0b1323 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.22);
}

.sidebar-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

.sidebar-glow-a {
  top: -80px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(37, 99, 235, 0.4);
}

.sidebar-glow-b {
  bottom: 40px;
  left: -50px;
  width: 160px;
  height: 160px;
  background: rgba(20, 184, 166, 0.28);
}

.admin-brand {
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-title {
  color: #fff;
  font-size: 1rem;
}

.admin-brand-subtitle,
.sidebar-section-label {
  color: rgba(210, 224, 246, 0.62);
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  gap: 10px;
}

.menu-link {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: rgba(229, 238, 251, 0.82);
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.06);
}

.menu-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(20, 184, 166, 0.2));
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16);
}

.content {
  padding: 24px 26px 34px;
}

.topbar {
  border-radius: 30px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(14, 23, 40, 0.92), rgba(15, 28, 48, 0.86));
  box-shadow: 0 20px 50px rgba(2, 8, 23, 0.24);
}

.topbar-title {
  color: #f8fbff;
}

.topbar-subtitle {
  color: #94a3b8;
}

.topbar-kicker {
  color: #7dd3fc;
  font-family: "IBM Plex Mono", monospace;
}

.topbar-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.topbar-meta-strip span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 0.8rem;
}

.panel-card,
.admin-auth-card {
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.94));
  box-shadow: 0 20px 44px rgba(2, 8, 23, 0.14);
  color: var(--admin-panel-text);
}

.section-title,
.fw-bold,
.fw-semibold,
.table,
.small-muted,
.media-card,
.snapshot-card,
.stat-card,
.profile-summary,
.status-pill,
.email-preview-label {
  color: var(--admin-panel-text);
}

.small-muted,
.topbar-actions .btn-ghost,
.table thead th {
  color: #5b6b84;
}

.stat-card,
.snapshot-card,
.media-card,
.profile-summary,
.tool-toggle-card,
.email-preview-panel {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #ffffff, #f6f8fb);
}

.btn-brand {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.btn-brand:hover,
.btn-brand:focus {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-ghost,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-dark {
  border-radius: 999px;
}

.form-control,
.form-select,
.form-control-color {
  border-radius: 18px;
  background: #fbfdff;
}

.table-responsive {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.email-preview-panel {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff, #f7fafd);
}

.email-preview-frame {
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.settings-stack {
  display: grid;
  gap: 18px;
}

.settings-cluster {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.settings-cluster-head {
  margin-bottom: 14px;
}

body.admin-auth-body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 26%),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 30%),
    linear-gradient(135deg, #08111e 0%, #0f1f36 48%, #0f766e 100%);
}

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

  .sidebar {
    height: auto;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar-meta-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

body.admin-body,
body.admin-auth-body {
  font-family: "Sora", "IBM Plex Sans", sans-serif;
}

body.admin-body {
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.14), transparent 22%),
    radial-gradient(circle at 88% 86%, rgba(45, 212, 191, 0.12), transparent 20%),
    linear-gradient(180deg, #06101d 0%, #0b1324 44%, #10182c 100%);
}

.admin-shell {
  grid-template-columns: 308px minmax(0, 1fr);
  gap: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(7, 14, 26, 0.98) 0%, rgba(11, 20, 36, 0.98) 50%, rgba(8, 14, 26, 0.98) 100%);
}

.sidebar-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-brand {
  flex: 1 1 auto;
  margin-bottom: 0;
  gap: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

.admin-brand-copy {
  min-width: 0;
}

.admin-brand-title {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-brand-subtitle {
  font-size: 0.82rem;
  line-height: 1.35;
}

.sidebar-toggle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-link {
  min-height: 52px;
  gap: 14px;
}

.menu-link i {
  width: 22px;
  text-align: center;
  font-size: 1.05rem;
}

.menu-link__label {
  white-space: nowrap;
}

.content {
  padding: 22px 24px 34px;
}

.topbar {
  padding: 24px 26px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.96), rgba(13, 25, 47, 0.92));
}

.topbar-controls .topbar-kicker {
  margin: 0;
}

.topbar-title {
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
}

.panel-card,
.admin-auth-card {
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.06), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
  box-shadow: 0 24px 50px rgba(2, 8, 23, 0.16);
}

.stat-card,
.snapshot-card,
.media-card,
.profile-summary,
.tool-toggle-card,
.email-preview-panel,
.settings-cluster {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.btn-brand {
  background: linear-gradient(135deg, var(--admin-primary), color-mix(in srgb, var(--admin-primary) 68%, #1d4ed8));
}

.btn-brand:hover,
.btn-brand:focus {
  background: linear-gradient(135deg, color-mix(in srgb, var(--admin-primary) 78%, #111827), color-mix(in srgb, var(--admin-primary) 58%, #1e3a8a));
}

.admin-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 42px;
}

.admin-auth-card {
  overflow: hidden;
}

.admin-auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 0.85fr);
  min-height: 620px;
}

.admin-auth-aside {
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 24%),
    linear-gradient(180deg, #0b1324 0%, #0e1a30 100%);
  color: #f8fbff;
  display: grid;
  align-content: start;
  gap: 24px;
}

.admin-auth-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-auth-brand {
  margin-bottom: 0;
}

.admin-auth-brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.admin-auth-brand-link p {
  color: rgba(219, 234, 254, 0.72);
}

.admin-auth-copy h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

.admin-auth-copy p {
  color: rgba(219, 234, 254, 0.76);
  max-width: 42ch;
}

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

.admin-auth-highlights div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
}

.admin-auth-highlights i {
  font-size: 1.1rem;
  color: #67e8f9;
}

.admin-auth-form-panel {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-brand-logo {
  width: auto;
  height: 42px;
  max-width: 154px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
}

.admin-auth-brand-link .admin-brand-logo {
  height: 48px;
  max-width: 180px;
}

.admin-brand-mark {
  width: 58px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(20, 184, 166, 0.14));
  border: 1px solid rgba(96, 165, 250, 0.22);
}

body.admin-sidebar-collapsed .admin-shell {
  grid-template-columns: 96px minmax(0, 1fr);
}

body.admin-sidebar-collapsed .admin-brand-copy,
body.admin-sidebar-collapsed .sidebar-section-label,
body.admin-sidebar-collapsed .menu-link__label {
  display: none;
}

body.admin-sidebar-collapsed .admin-brand {
  justify-content: center;
  padding-inline: 10px;
}

body.admin-sidebar-collapsed .menu-link {
  justify-content: center;
  padding-inline: 12px;
}

body.admin-sidebar-collapsed .menu-link i {
  width: auto;
}

@media (max-width: 1199px) {
  .admin-auth-layout {
    grid-template-columns: 1fr;
  }

  .admin-auth-aside,
  .admin-auth-form-panel {
    padding: 28px;
  }
}

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

  .sidebar {
    height: auto;
    position: relative;
    padding: 16px;
  }

  body.admin-sidebar-collapsed .sidebar {
    display: none;
  }

  body.admin-sidebar-collapsed .admin-shell {
    grid-template-columns: 1fr;
  }

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

  .topbar {
    padding: 20px;
  }
}

.content > .alert {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(2, 8, 23, 0.12);
}

.admin-section-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  width: 100%;
}

.admin-action-group {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.admin-section-head .section-title,
.admin-section-head .small-muted,
.admin-section-head > div:first-child {
  width: 100%;
}

.admin-section-head > .btn,
.admin-section-head > .admin-action-group {
  margin-top: 2px;
  width: 100%;
}

.admin-section-head > div:first-child {
  display: block !important;
}

.admin-section-head > .admin-action-group .btn {
  width: auto;
}

.admin-section-head > .btn.admin-primary-action,
.admin-section-head > .btn.admin-secondary-action {
  width: fit-content;
}

.panel-card {
  padding: 26px;
}

.panel-card form .form-label {
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.panel-card form .form-control::placeholder,
.panel-card form .form-select {
  color: #7b8aa3;
}

.panel-card textarea.form-control {
  min-height: 120px;
}

.save-row,
.panel-card .mt-3.d-flex.flex-wrap.gap-2 {
  padding-top: 16px;
  margin-top: 18px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.table-responsive {
  border-radius: 24px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(243, 247, 251, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  padding: 14px 16px;
}

.table tbody td {
  padding: 15px 16px;
  border-color: rgba(148, 163, 184, 0.1);
}

.table tbody tr {
  border-radius: 18px;
}

.table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.datatable + .dt-buttons,
.dataTables_wrapper .dt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 999px !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 42px;
  background: #fff;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding-top: 14px;
}

.stat-card--metric {
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.stat-card__icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.14));
  color: #2563eb;
  font-size: 1.2rem;
}

.snapshot-card,
.stat-card,
.profile-summary,
.settings-cluster,
.email-preview-panel,
.media-card {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.settings-stack {
  gap: 20px;
}

.settings-cluster {
  padding: 22px;
}

.settings-cluster-head {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.tool-toggle-card {
  min-height: 58px;
  border-radius: 18px;
}

.profile-summary {
  align-items: flex-start;
  padding: 22px;
}

.profile-avatar,
.profile-avatar-placeholder {
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.media-preview {
  min-height: 240px;
}

.email-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.email-token-list span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 700;
}

.email-preview-frame {
  width: 100%;
  min-height: 560px;
  border: 0;
  background: #fff;
}

body.admin-sidebar-collapsed #adminSidebarToggle i,
body.admin-sidebar-collapsed #adminSidebarToggleMobile i {
  transform: rotate(180deg);
}

@media (max-width: 991px) {
  .panel-card {
    padding: 20px;
  }

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

  .admin-action-group {
    justify-content: flex-start;
  }
}

body.admin-body {
  background:
    radial-gradient(circle at 10% 12%, rgba(56, 189, 248, 0.12), transparent 22%),
    radial-gradient(circle at 88% 90%, rgba(20, 184, 166, 0.1), transparent 20%),
    linear-gradient(180deg, #f4f8fc 0%, #f8fbff 52%, #eef4fb 100%);
  color: #162235;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(247, 250, 254, 0.98) 0%, rgba(240, 245, 252, 0.98) 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.06);
  color: #1e293b;
}

.sidebar a,
.menu-link {
  color: #334155;
}

.admin-brand,
.menu-link {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(148, 163, 184, 0.12);
}

.admin-brand-title,
.menu-link:hover,
.menu-link.active {
  color: #0f172a;
}

.admin-brand-subtitle,
.sidebar-section-label {
  color: #64748b;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(96, 165, 250, 0.18);
}

.menu-link.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(45, 212, 191, 0.12));
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.08);
}

.sidebar-toggle {
  background: rgba(255, 255, 255, 0.82);
  color: #1e293b;
}

.topbar {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 253, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.topbar-title,
.topbar-kicker,
.topbar-subtitle,
.topbar-meta-strip span {
  color: #1e293b;
}

.topbar-meta-strip span {
  background: rgba(59, 130, 246, 0.08);
}

.topbar-actions .btn,
.admin-action-group .btn,
.panel-card .btn,
.dataTables_wrapper .dt-buttons .btn,
.table .btn {
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 14px;
  line-height: 1.2;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topbar-actions .btn,
.admin-theme-toggle {
  padding: 12px 18px;
}

.admin-primary-action {
  padding: 12px 20px !important;
  font-size: 0.95rem !important;
  border-radius: 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--admin-primary) 16%, transparent);
}

.admin-secondary-action {
  padding: 12px 18px !important;
  font-size: 0.92rem !important;
  border-radius: 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.admin-secondary-action:hover {
  background: #ffffff;
  border-color: rgba(59, 130, 246, 0.2);
}

.btn-sm,
.table .btn-sm {
  padding: 9px 14px;
  font-size: 0.9rem;
  border-radius: 12px;
  line-height: 1.2;
}

.admin-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dataTables_wrapper .dt-buttons .btn {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #334155;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dataTables_wrapper .dt-buttons .btn:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.18);
  color: #0f172a;
}

.table .btn-outline-primary,
.table .btn-outline-danger,
.table .btn-outline-secondary {
  border-width: 1px;
}

.table .btn {
  gap: 6px;
}

.table .btn-outline-primary {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
}

.table .btn-outline-primary:hover {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.table .btn-outline-danger {
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 226, 226, 0.7);
}

.table .btn-outline-danger:hover {
  color: #fff;
  background: #dc2626;
  border-color: #dc2626;
}

.btn-ghost,
.btn-outline-secondary,
.btn-outline-dark {
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.btn-ghost:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 1);
  border-color: rgba(59, 130, 246, 0.22);
}

body.admin-theme-dark {
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.14), transparent 22%),
    radial-gradient(circle at 88% 86%, rgba(45, 212, 191, 0.12), transparent 20%),
    linear-gradient(180deg, #06101d 0%, #0b1324 44%, #10182c 100%);
  color: #dbe7f7;
}

body.admin-theme-dark .sidebar {
  background:
    linear-gradient(180deg, rgba(7, 14, 26, 0.98) 0%, rgba(11, 20, 36, 0.98) 50%, rgba(8, 14, 26, 0.98) 100%);
  border-right-color: rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 50px rgba(2, 8, 23, 0.2);
}

body.admin-theme-dark .sidebar a,
body.admin-theme-dark .menu-link,
body.admin-theme-dark .admin-brand-title,
body.admin-theme-dark .topbar-title,
body.admin-theme-dark .topbar-kicker,
body.admin-theme-dark .topbar-subtitle,
body.admin-theme-dark .topbar-meta-strip span {
  color: #e2e8f0;
}

body.admin-theme-dark .admin-brand,
body.admin-theme-dark .menu-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-theme-dark .admin-brand-subtitle,
body.admin-theme-dark .sidebar-section-label {
  color: rgba(210, 224, 246, 0.62);
}

body.admin-theme-dark .menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-theme-dark .menu-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(20, 184, 166, 0.2));
  border-color: rgba(96, 165, 250, 0.28);
}

body.admin-theme-dark .sidebar-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
}

body.admin-theme-dark .topbar {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(13, 23, 40, 0.96), rgba(13, 25, 47, 0.92));
  border-color: rgba(96, 165, 250, 0.12);
  box-shadow: 0 20px 50px rgba(2, 8, 23, 0.24);
}

body.admin-theme-dark .topbar-meta-strip span {
  background: rgba(255, 255, 255, 0.06);
}

body.admin-theme-dark .btn-ghost,
body.admin-theme-dark .btn-outline-secondary,
body.admin-theme-dark .btn-outline-dark,
body.admin-theme-dark .dataTables_wrapper .dt-buttons .btn {
  background: rgba(255, 255, 255, 0.06);
  color: #dbe7f7;
  border-color: rgba(255, 255, 255, 0.08);
}

body.admin-theme-dark .btn-ghost:hover,
body.admin-theme-dark .btn-outline-secondary:hover,
body.admin-theme-dark .btn-outline-dark:hover,
body.admin-theme-dark .dataTables_wrapper .dt-buttons .btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
