* {
  box-sizing: border-box;
}

:root {
  --sidebar-width: 250px;
  --bg: #eef5f3;
  --sidebar: #0f172a;
  --sidebar-soft: #1e293b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(219, 234, 254, 0.7), transparent 32%),
    radial-gradient(circle at bottom left, rgba(220, 252, 231, 0.75), transparent 30%),
    var(--bg);
  color: var(--text);
}

/* ===== SIDEBAR HEADER ===== */

.topbar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 126px;
  background: linear-gradient(180deg, #111827, #0f172a);
  color: white;
  padding: 22px 18px 14px;
  z-index: 30;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.topbar p {
  margin: 5px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.4;
}

.topbar #refreshBtn {
  width: 100%;
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.95);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
  font-size: 12px;
}

/* ===== SIDEBAR NAV ===== */

.tabs {
  position: fixed;
  left: 0;
  top: 126px;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 14px;
  background: linear-gradient(180deg, #0f172a, #111827);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  z-index: 25;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.tabs::-webkit-scrollbar {
  width: 6px;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  padding: 11px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: normal;
  transition: 0.18s ease;
}

.tab-btn::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  flex: 0 0 auto;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.tab-btn.active::before {
  background: white;
}

/* ===== MAIN LAYOUT ===== */

.layout {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.card h3 {
  margin-top: 22px;
  margin-bottom: 10px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ===== BUTTONS ===== */

button {
  border: 0;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: 0.18s ease;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

button.secondary {
  background: #64748b;
}

button.secondary:hover {
  background: #475569;
}

button.danger {
  background: #dc2626;
}

button.danger:hover {
  background: #b91c1c;
}

button.success {
  background: #16a34a;
}

button.success:hover {
  background: #15803d;
}

/* ===== OVERVIEW ===== */

#overviewTab {
  min-height: calc(100vh - 48px);
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.65), transparent 34%),
    radial-gradient(circle at bottom right, rgba(187, 247, 208, 0.65), transparent 34%),
    rgba(255, 255, 255, 0.78);
}

#overviewTab h2 {
  font-size: 26px;
}

#overviewTab h2::after {
  content: "System health and reconciliation summary";
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

#overview {
  margin-top: 20px;
}

#overview.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(165px, 1fr));
  gap: 14px;
}

#overview .stat {
  position: relative;
  min-height: 128px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  cursor: pointer;
  transition: 0.2s ease;
}

#overview .stat.good,
#overview .stat.warning,
#overview .stat.danger,
#overview .stat.info {
  background: rgba(255, 255, 255, 0.88);
}

#overview .stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.13);
  border-color: #cbd5e1;
}

#overview .stat::before {
  content: "";
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 10px;
  margin-bottom: 12px;
  background: #e2e8f0;
}

#overview .stat::after {
  content: "›";
  position: absolute;
  top: 13px;
  right: 15px;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
}

#overview .stat.good::before {
  background: linear-gradient(135deg, #bbf7d0, #22c55e);
}

#overview .stat.warning::before {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

#overview .stat.danger::before {
  background: linear-gradient(135deg, #fecaca, #ef4444);
}

#overview .stat.info::before {
  background: linear-gradient(135deg, #bfdbfe, #3b82f6);
}

#overview .stat-label {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  max-width: 88%;
}

#overview .stat-value {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 96%;
}

#overview .learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 11px;
  padding: 6px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: white;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.05);
}

#overview .learn-more:hover {
  background: #f8fafc;
  color: #2563eb;
}

/* fallback old overview style */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f9fafb;
}

.stat.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stat.warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.stat.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.stat.info {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stat-label {
  color: #6b7280;
  font-size: 13px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 6px;
}

/* ===== PAYMENT OPTIONS ===== */

.payment-option-viewer {
  display: grid;
  gap: 16px;
  margin: 18px 0 20px;
}

.payment-option-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f8fafc;
  padding: 18px;
}

.payment-option-details {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px);
  gap: 18px;
  align-items: center;
}

.payment-option-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}

.payment-option-amount {
  font-size: 34px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 10px;
}

.payment-option-details p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 10px;
}

.bank-note {
  color: #92400e !important;
  font-weight: 900;
}

.qr-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: white;
  text-align: center;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.qr-image {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: white;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1 / 1;
  border: 1px dashed #94a3b8;
  border-radius: 14px;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.checkbox-row input {
  width: auto;
}

.checkbox-row label {
  font-weight: 800;
  color: #334155;
}

/* ===== FORMS ===== */

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

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font: inherit;
  outline: none;
  transition: 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
  background: white;
}

textarea {
  min-height: 90px;
  grid-column: 1 / -1;
  resize: vertical;
}

pre {
  margin-top: 14px;
  background: #0f172a;
  color: #d1fae5;
  padding: 14px;
  border-radius: 16px;
  overflow: auto;
  max-height: 260px;
  font-size: 13px;
}

.inline-message {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e40af;
  font-weight: 700;
}

.modal-dialog {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.modal-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: white;
}

.modal-card h3 {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== FILTERS ===== */

.muted {
  color: var(--muted);
  margin-top: -4px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(auto-fit, minmax(150px, auto));
  gap: 10px;
  margin: 16px 0;
  align-items: center;
}

/* ===== REPORTS / EXPORT ===== */

.report-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.report-controls label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-actions {
  align-items: center;
}

.report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 14px 0 16px;
}

.report-summary-grid .stat {
  min-height: 92px;
}

/* ===== TABLES ===== */

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:hover td {
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

/* ===== STATUS BADGES ===== */

.status {
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
}

.status-VERIFIED {
  background: #dcfce7;
  color: #166534;
}

.status-PENDING {
  background: #fef3c7;
  color: #92400e;
}

.status-MISMATCH,
.status-DUPLICATE,
.status-REJECTED {
  background: #fee2e2;
  color: #991b1b;
}

.status-REVIEWING {
  background: #dbeafe;
  color: #1e40af;
}

/* ===== ACTION BUTTONS ===== */

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-buttons button {
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 10px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1250px) {
  #overview.stats-grid {
    grid-template-columns: repeat(3, minmax(165px, 1fr));
  }
}

@media (max-width: 980px) {
  #overview.stats-grid {
    grid-template-columns: repeat(2, minmax(165px, 1fr));
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 100%;
  }

  .topbar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px;
  }

  .topbar #refreshBtn {
    max-width: 180px;
  }

  .tabs {
    position: sticky;
    top: 0;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
    z-index: 50;
  }

  .tab-btn {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .layout {
    margin-left: 0;
    padding: 16px;
  }

  .card {
    border-radius: 20px;
    padding: 18px;
  }

  #overview.stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CUSTOMER PAYMENT PORTAL ===== */

.customer-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.8), transparent 34%),
    radial-gradient(circle at bottom right, rgba(237, 233, 254, 0.7), transparent 32%),
    #f8fbff;
  color: #0f172a;
}

.customer-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 28px 18px;
  background:
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.32), transparent 34%),
    linear-gradient(180deg, #0b1225 0%, #0f1d3d 52%, #0b1225 100%);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  box-shadow: 16px 0 45px rgba(15, 23, 42, 0.18);
  z-index: 40;
}

.customer-sidebar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  background-image: radial-gradient(rgba(96, 165, 250, 0.26) 1px, transparent 1px);
  background-size: 12px 12px;
  mask-image: linear-gradient(transparent, black);
  pointer-events: none;
}

.customer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
}

.customer-brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.32);
}

.customer-brand-mark svg {
  width: 27px;
  height: 27px;
}

.customer-brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.customer-brand p {
  margin: 4px 0 0;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 700;
}

.customer-brand-lockup {
  align-items: flex-start;
  flex-direction: column;
  gap: 14px;
}

.customer-brand-lockup .customer-brand-mark {
  width: 154px;
  height: 154px;
  border-radius: 28px;
  padding: 0;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.34);
}

.customer-brand-lockup .brand-logo-img,
.customer-brand-lockup .brand-logo-fallback {
  padding: 0;
}

.customer-brand-lockup h1 {
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.customer-brand-lockup p {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.customer-nav {
  display: grid;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.customer-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  padding: 13px 14px;
  border-radius: 14px;
  background: transparent;
  color: #dbeafe;
  font-size: 14px;
  text-align: left;
  box-shadow: none;
}

.customer-nav-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.customer-nav-btn.active {
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.34);
  border-color: rgba(255, 255, 255, 0.12);
}

.customer-nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: currentColor;
}

.customer-nav-icon svg {
  width: 20px;
  height: 20px;
}

.customer-help-card {
  margin-top: auto;
  padding: 20px 16px;
  border-radius: 20px;
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(15, 23, 42, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.customer-help-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  color: #dbeafe;
}

.customer-help-icon svg {
  width: 38px;
  height: 38px;
}

.customer-help-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.customer-help-card p {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

.customer-help-card button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.28);
  font-size: 12px;
}

.customer-shell {
  margin-left: 238px;
  min-height: 100vh;
  padding: 34px 46px;
}

.customer-section {
  display: none;
  max-width: 1220px;
  margin: 0 auto;
  animation: customerFadeIn 0.22s ease both;
}

.customer-section.active {
  display: block;
}

@keyframes customerFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customer-page-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.customer-title-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #2563eb;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #dbeafe;
}

.customer-title-icon svg {
  width: 26px;
  height: 26px;
}

.customer-page-header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.customer-page-header p {
  margin: 7px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}

.customer-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: start;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
  background: rgba(236, 253, 245, 0.9);
  border: 1px solid #bbf7d0;
  padding: 8px 11px;
  border-radius: 999px;
}

.customer-card,
.customer-info-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.payment-selection-card {
  padding: 18px;
  margin-bottom: 16px;
}

.payment-selection-card > label {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.payment-selection-card > select {
  height: 44px;
  background: #ffffff;
}

.customer-payment-option-card {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background:
    radial-gradient(circle at top left, rgba(237, 233, 254, 0.65), transparent 24%),
    rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.customer-payment-policy-card,
.customer-course-warning {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  padding: 14px 15px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 28%),
    linear-gradient(180deg, #fff7ed, #fffbeb);
  color: #7c2d12;
}

.customer-payment-policy-card {
  margin-top: 16px;
}

.customer-payment-policy-icon,
.customer-course-warning-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.22);
}

.customer-payment-policy-card strong,
.customer-course-warning strong {
  display: block;
  margin-bottom: 4px;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 1000;
}

.customer-payment-policy-card p,
.customer-course-warning span {
  margin: 0;
  color: #9a3412;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 700;
}

.customer-option-summary {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(170px, 220px) minmax(150px, 190px);
  gap: 18px;
  align-items: stretch;
}

.customer-option-main {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 15px;
  align-items: start;
  min-width: 0;
}

.customer-option-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #7c3aed;
  border-radius: 999px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
}

.customer-option-icon svg {
  width: 23px;
  height: 23px;
}

.customer-option-main h2 {
  margin: 3px 0 8px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.customer-option-main p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 600;
}

.customer-instruction-box {
  grid-column: 1 / -1;
  margin-top: 10px;
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef2ff, #f8fbff);
  border: 1px solid #dbeafe;
}

.customer-instruction-box strong {
  color: #1d4ed8;
  font-size: 13px;
}

.customer-instruction-box span {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.customer-course-warning {
  grid-column: 1 / -1;
}

.customer-amount-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  border-left: 1px solid #e2e8f0;
  text-align: center;
}

.customer-amount-card span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.customer-amount-card strong {
  color: #10b981;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.customer-amount-card em {
  color: #059669;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 6px 10px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.customer-qr-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.customer-qr-card div {
  display: grid;
  gap: 3px;
  width: 100%;
  border-radius: 12px;
  padding: 10px;
  color: #5b21b6;
  background: #f5f3ff;
}

.customer-qr-card strong {
  font-size: 12px;
}

.customer-qr-card span {
  color: #7c3aed;
  font-size: 11px;
  font-weight: 900;
}

.customer-qr-image {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
}

.customer-qr-placeholder,
.customer-empty-state {
  display: grid;
  place-items: center;
  min-height: 132px;
  width: 100%;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}

.customer-details-card {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 246, 255, 0.98));
}

.customer-section-title {
  margin-bottom: 16px;
}

.customer-section-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-mini-icon {
  color: #2563eb;
  font-size: 15px;
  line-height: 1;
}

.customer-section-title h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.customer-section-title p {
  margin: 7px 0 0 28px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.customer-payment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
}

.customer-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.customer-field span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.customer-field small {
  color: #64748b;
  line-height: 1.4;
  font-size: 11px;
  font-weight: 600;
}

.customer-field input,
.customer-field select {
  background: white;
  height: 44px;
  border-color: #d7e0ee;
  border-radius: 12px;
  font-size: 13px;
}

.customer-file-field input[type="file"] {
  padding: 8px;
  cursor: pointer;
}

.customer-file-preview {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.74);
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.customer-file-preview img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.customer-file-preview div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-file-preview strong {
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-file-preview span {
  color: #64748b;
}

.customer-file-chip {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
}

.customer-submit-wrap {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e2e8f0;
}

.customer-submit-wrap button {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.customer-submit-wrap button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.customer-submit-wrap p {
  margin: 0;
  color: #64748b;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.customer-result {
  display: none;
  margin-top: 14px;
  padding: 14px 15px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 13px;
}

.customer-result strong,
.customer-result span {
  display: block;
}

.customer-result span {
  margin-top: 5px;
  color: inherit;
  opacity: 0.9;
}

.customer-result.info,
.customer-result.success,
.customer-result.error {
  display: block;
}

.customer-result.info {
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}

.customer-result.success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.customer-result.error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.customer-info-panel {
  padding: 28px;
}

.customer-info-panel h1 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.customer-info-panel p,
.customer-steps,
.customer-faq-list p {
  color: #475569;
  line-height: 1.65;
  font-weight: 600;
}

.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.customer-info-grid > div,
.customer-contact-card,
.customer-faq-list details,
.customer-steps li {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fbff;
  padding: 16px;
}

.customer-info-grid h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.customer-info-grid p {
  margin: 0;
  font-size: 13px;
}

.customer-steps {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style-position: inside;
}

.customer-contact-card {
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin-top: 18px;
}

.customer-contact-card span {
  color: #2563eb;
  font-weight: 900;
}

.customer-faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.customer-faq-list summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 900;
}

.customer-faq-list p {
  margin: 9px 0 0;
  font-size: 13px;
}


.customer-thank-you-section {
  max-width: 980px;
}

.customer-thank-you-card {
  padding: 26px;
  display: grid;
  gap: 20px;
  background:
    radial-gradient(circle at top right, rgba(220, 252, 231, 0.85), transparent 28%),
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.76), transparent 26%),
    rgba(255, 255, 255, 0.94);
}

.customer-thank-you-hero {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: start;
}

.customer-thank-you-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #2563eb);
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.24);
  font-size: 24px;
  font-weight: 1000;
}

.customer-eyebrow {
  margin: 0 0 7px;
  color: #15803d;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-thank-you-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.customer-thank-you-hero p:not(.customer-eyebrow) {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.customer-thank-you-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-thank-you-detail {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #dbeafe;
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.92);
}

.customer-thank-you-detail.full-span {
  grid-column: 1 / -1;
}

.customer-thank-you-detail dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-thank-you-detail dd {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  word-break: break-word;
}

.customer-next-steps {
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
}

.customer-next-steps h2 {
  margin: 0 0 12px;
  color: #1e3a8a;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.customer-next-steps ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 21px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.customer-thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-thank-you-actions button {
  min-height: 44px;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 900;
}

.customer-thank-you-policy {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid #fed7aa;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 34%),
    linear-gradient(180deg, #fff7ed, #fffbeb);
}

.customer-thank-you-policy-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
}

.customer-thank-you-policy strong {
  display: block;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 1000;
}

.customer-thank-you-policy p {
  margin: 5px 0 0;
  color: #9a3412;
  line-height: 1.55;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 1050px) {
  .customer-shell {
    padding: 26px;
  }

  .customer-option-summary {
    grid-template-columns: 1fr;
  }

  .customer-amount-card {
    border-left: 0;
    border-top: 1px solid #e2e8f0;
  }

  .customer-payment-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .customer-thank-you-card {
    padding: 18px;
  }

  .customer-thank-you-hero {
    grid-template-columns: 1fr;
  }

  .customer-thank-you-details {
    grid-template-columns: 1fr;
  }

  .customer-thank-you-actions {
    flex-direction: column;
  }

  .customer-thank-you-actions button {
    width: 100%;
  }

  .customer-thank-you-policy {
    grid-template-columns: 1fr;
  }

  .customer-sidebar {
    position: static;
    width: 100%;
    padding: 18px;
  }

  .customer-help-card {
    display: none;
  }

  .customer-nav {
    grid-template-columns: repeat(5, minmax(max-content, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .customer-nav-btn {
    min-width: max-content;
    justify-content: center;
  }

  .customer-shell {
    margin-left: 0;
    padding: 18px;
  }

  .customer-page-header {
    grid-template-columns: 1fr;
  }

  .customer-security-pill {
    justify-self: start;
  }

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

  .customer-option-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .customer-page-header h1 {
    font-size: 25px;
  }

  .customer-card,
  .customer-info-panel {
    border-radius: 18px;
  }

  .customer-payment-option-card,
  .customer-details-card,
  .payment-selection-card {
    padding: 14px;
  }
}

/* ===== ADMIN PORTAL REDESIGN RESCUE ===== */
.admin-page {
  --sidebar-width: 248px;
  --admin-main-pad: 28px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(219, 234, 254, 0.85), transparent 34%),
    radial-gradient(circle at bottom left, rgba(220, 252, 231, 0.76), transparent 31%),
    #f8fbff;
}

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

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 24px 16px 18px;
  background:
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.32), transparent 35%),
    linear-gradient(180deg, #0b1225 0%, #0f1d3d 52%, #0b1225 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  box-shadow: 16px 0 45px rgba(15, 23, 42, 0.18);
  z-index: 40;
  transition: width 0.22s ease, padding 0.22s ease;
}

.admin-sidebar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background-image: radial-gradient(rgba(96, 165, 250, 0.22) 1px, transparent 1px);
  background-size: 12px 12px;
  mask-image: linear-gradient(transparent, black);
  pointer-events: none;
}

.admin-page .topbar {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  padding: 0 0 18px;
  background: transparent;
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.32);
}

.admin-brand-mark svg {
  width: 27px;
  height: 27px;
}

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

.admin-brand-copy h1,
.admin-page .topbar h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: white;
}

.admin-brand-copy p,
.admin-page .topbar p {
  margin: 5px 0 0;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-refresh,
.admin-page .topbar #refreshBtn {
  width: 100%;
  margin-top: 16px;
  min-height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
  font-size: 12px;
}

.admin-page .tabs {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  flex: 1 0 auto;
  padding: 0;
  background: transparent;
  border-right: 0;
  gap: 8px;
  overflow: visible;
  z-index: 2;
}

.admin-page .tab-btn,
.admin-side-link,
.admin-collapse-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: #dbeafe;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: none;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.admin-page .tab-btn::before {
  display: none;
}

.admin-page .tab-btn:hover,
.admin-side-link:hover,
.admin-collapse-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.admin-page .tab-btn.active,
.admin-side-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
  border-color: rgba(255, 255, 255, 0.14);
}

.tab-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.tab-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-page .tab-btn.active .tab-icon,
.admin-side-link.active .tab-icon,
.admin-page .tab-btn:hover .tab-icon,
.admin-side-link:hover .tab-icon {
  color: white;
}

.admin-sidebar-footer {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding: 12px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.13);
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.admin-user-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-user-copy strong {
  color: white;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-copy span {
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
}

.admin-user-caret {
  color: #bfdbfe;
}

.admin-collapse-btn {
  color: #cbd5e1;
}

.admin-page .layout,
.admin-shell {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: var(--admin-main-pad);
  display: block;
  transition: margin-left 0.22s ease;
}

.admin-page .card {
  width: 100%;
  min-height: calc(100vh - (var(--admin-main-pad) * 2));
  border-radius: 24px;
  border: 1px solid rgba(219, 227, 239, 0.92);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  padding: 24px;
}

.admin-page .tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.admin-page .tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.admin-page .tab-panel.panel-enter {
  animation: adminPanelEnter 0.22s ease both;
}

@keyframes adminPanelEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-page .section-heading,
.overview-header,
.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-page h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.admin-page .muted {
  margin: 5px 0 0;
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
}

.admin-page button,
.gradient-primary,
.gradient-success,
.soft-button,
.soft-success,
.soft-danger,
.kebab-button {
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: none;
}

.gradient-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.gradient-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.16);
}

.soft-button,
button.secondary {
  background: linear-gradient(180deg, #f8fafc, #e8eef7);
  border-color: #dbe3ef;
  color: #334155;
}

.soft-success,
button.success {
  background: linear-gradient(180deg, #ecfdf5, #bbf7d0);
  border-color: #a7f3d0;
  color: #047857;
}

.soft-danger,
button.danger {
  background: linear-gradient(180deg, #fff1f2, #fecaca);
  border-color: #fecaca;
  color: #b91c1c;
}

.soft-success:disabled,
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.admin-page input,
.admin-page select,
.admin-page textarea {
  min-height: 43px;
  background: #ffffff;
  border-color: #d7e0ee;
  border-radius: 13px;
  font-size: 13px;
}

.admin-page label {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.admin-page label span,
.payment-option-editor label > span,
.admin-submit-form label > span {
  display: inline-block;
  margin-bottom: 7px;
}

.admin-submit-form,
.payment-option-editor {
  display: grid;
  gap: 14px;
}

.admin-submit-form fieldset {
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 246, 255, 0.98));
  padding: 18px;
  margin: 0;
}

.admin-submit-form legend {
  padding: 0 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.form-row.two-cols,
.option-editor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 12px;
}

.admin-submit-form fieldset > label,
.admin-submit-form .form-row + label {
  display: block;
  margin-top: 12px;
}

.file-drop,
.compact-file-drop {
  display: grid !important;
  gap: 7px;
  padding: 14px;
  border: 1px dashed #bfcaDA;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.file-drop input[type="file"] {
  background: white;
  min-height: auto;
}

.file-drop strong {
  color: #0f172a;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-footer,
.option-editor-actions,
.report-actions,
.compact-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-footer {
  justify-content: flex-start;
}

.inline-message {
  margin-top: 0;
  border-radius: 14px;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.inline-message[data-tone="success"] {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.inline-message[data-tone="error"] {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.payment-option-editor {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid #dbe3ef;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 246, 255, 0.98));
}

.payment-option-editor textarea {
  min-height: 92px;
}

.payment-options-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.payment-option-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.payment-option-main h3 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.payment-option-main strong {
  display: block;
  color: #059669;
  font-size: 20px;
  margin-bottom: 6px;
}

.payment-option-main p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.payment-option-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.option-qr-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: #f1f5f9;
  color: #475569;
}

.option-qr-pill.uploaded {
  background: #dcfce7;
  color: #166534;
}

.table-wrap,
.compact-table-wrap {
  border-color: #d2dbea;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.admin-page th,
.admin-page td {
  padding: 10px 11px;
  border-bottom: 1px solid #d8e0ec;
  font-size: 13px;
  vertical-align: middle;
}

.admin-page th {
  color: #475569;
  background: #f4f7fb;
  font-size: 11px;
  letter-spacing: 0.055em;
}

.admin-page tr:hover td {
  background: #f8fbff;
}

.filter-bar,
.compact-filter-bar {
  grid-template-columns: minmax(240px, 1fr) repeat(auto-fit, minmax(130px, auto));
  gap: 9px;
  margin: 15px 0;
}

.compact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.compact-actions button,
.kebab-panel button,
.admin-page .action-buttons button {
  min-height: 31px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 11px;
}

.kebab-menu {
  position: relative;
  display: inline-flex;
}

.kebab-button {
  min-width: 34px;
  background: linear-gradient(180deg, #ffffff, #eef2f7);
  color: #334155;
  border-color: #dbe3ef;
  padding: 6px 9px;
}

.kebab-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 168px;
  display: none;
  padding: 7px;
  border-radius: 14px;
  background: white;
  border: 1px solid #dbe3ef;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  z-index: 90;
}

.kebab-menu:hover .kebab-panel,
.kebab-menu:focus-within .kebab-panel {
  display: grid;
  gap: 5px;
}

.kebab-panel button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  color: #334155;
  background: transparent;
}

.kebab-panel button:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

.detail-grid-card,
.compact-detail-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fbff;
  color: #475569;
  font-weight: 700;
}

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

.detail-grid div {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: white;
}

.detail-grid dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-grid dd {
  margin: 5px 0 0;
  color: #0f172a;
  font-weight: 800;
}

.report-controls {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
}

.report-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.report-summary-grid .stat,
.report-stat {
  min-height: 78px;
  padding: 13px;
  border-radius: 17px;
}

.report-date-card .stat-value {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.date-range-line {
  display: grid;
  gap: 2px;
}

.date-range-line small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.date-range-line strong {
  color: #0f172a;
  font-size: 14px;
  white-space: nowrap;
}

#overviewTab {
  min-height: calc(100vh - (var(--admin-main-pad) * 2));
}

#overview.stats-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

#overview .stat {
  min-height: 104px;
  padding: 13px;
}

#overview .stat::before {
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
}

#overview .stat-label {
  font-size: 12px;
}

#overview .stat-value {
  font-size: 11px;
}

#overview .learn-more {
  margin-top: 8px;
  padding: 5px 9px;
}

.overview-insights {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.overview-insight-card {
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px;
}

.overview-insight-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.overview-list,
.attention-grid,
.exception-list {
  display: grid;
  gap: 8px;
}

.overview-list-item,
.attention-tile,
.exception-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid #dbe3ef;
  background: #f8fbff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.attention-tile[data-attention="pending"] {
  background: #fffbeb;
  border-color: #fde68a;
}

.attention-tile[data-attention="mismatch"] {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.attention-tile[data-attention="duplicate"] {
  background: #fff1f2;
  border-color: #fecdd3;
}

.attention-tile[data-attention="oldPending"] {
  background: #fff7ed;
  border-color: #fed7aa;
}

.status {
  padding: 5px 9px;
  font-size: 11px;
}

.modal-dialog {
  border-radius: 22px;
}

.modal-card {
  border-radius: 22px;
}

.admin-sidebar-collapsed .admin-sidebar {
  --sidebar-width: 82px;
  width: 82px;
  padding-left: 12px;
  padding-right: 12px;
}

.admin-sidebar-collapsed .layout,
.admin-sidebar-collapsed .admin-shell {
  margin-left: 82px;
}

.admin-sidebar-collapsed .admin-brand-copy,
.admin-sidebar-collapsed .admin-link-text,
.admin-sidebar-collapsed .admin-user-copy,
.admin-sidebar-collapsed .admin-user-caret,
.admin-sidebar-collapsed .admin-refresh {
  display: none;
}

.admin-sidebar-collapsed .admin-brand,
.admin-sidebar-collapsed .tab-btn,
.admin-sidebar-collapsed .admin-side-link,
.admin-sidebar-collapsed .admin-collapse-btn {
  justify-content: center;
}

.admin-sidebar-collapsed .admin-user-card {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 10px;
}

.admin-sidebar-collapsed .admin-collapse-btn span:first-child {
  transform: rotate(180deg);
}

.customer-security-pill {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 1250px) {
  #overview.stats-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .overview-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
  }

  .admin-page .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar-footer {
    display: none;
  }

  .admin-page .layout,
  .admin-shell,
  .admin-sidebar-collapsed .layout,
  .admin-sidebar-collapsed .admin-shell {
    margin-left: 0;
    padding: 16px;
  }

  .admin-page .card {
    min-height: auto;
    border-radius: 20px;
    padding: 18px;
  }

  .form-row.two-cols,
  .option-editor-row,
  .report-controls {
    grid-template-columns: 1fr;
  }

  #overview.stats-grid {
    grid-template-columns: 1fr;
  }

  .payment-option-row {
    grid-template-columns: 1fr;
  }

  .payment-option-meta {
    justify-items: start;
  }
}

/* ===== OVERVIEW RESCUE: scoped customer-style admin dashboard ===== */
#overviewTab .overview-shell {
  min-height: calc(100vh - 96px);
}

#overviewTab h2::after {
  display: none !important;
  content: none !important;
}

#overviewTab .overview-header {
  align-items: center;
  margin-bottom: 18px;
}

#overviewTab .overview-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

#overviewTab .overview-header .muted {
  margin-top: 7px;
  font-size: 14px;
  color: #64748b;
}

#overview.stats-grid.overview-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(185px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

#overview .stat.overview-card {
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "icon arrow"
    "label arrow"
    "value arrow"
    "hint arrow";
  align-content: start;
  justify-items: start;
  min-height: 112px;
  padding: 16px;
  text-align: left !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,251,255,0.9)) !important;
  border: 1px solid #dbe3ef !important;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  color: #0f172a;
}

#overview .stat.overview-card::before,
#overview .stat.overview-card::after {
  display: none !important;
  content: none !important;
}

#overview .overview-card-icon {
  grid-area: icon;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 11px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

#overview .stat.good .overview-card-icon {
  background: linear-gradient(135deg, #86efac, #22c55e);
}

#overview .stat.warning .overview-card-icon {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

#overview .stat.danger .overview-card-icon {
  background: linear-gradient(135deg, #fca5a5, #ef4444);
}

#overview .stat.info .overview-card-icon,
#overview .stat:not(.good):not(.warning):not(.danger) .overview-card-icon {
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
}

#overview .overview-card-arrow {
  grid-area: arrow;
  align-self: start;
  justify-self: end;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  transition: 0.18s ease;
}

#overview .stat.overview-card:hover .overview-card-arrow {
  background: #dbeafe;
  color: #2563eb;
  transform: translateX(2px);
}

#overview .stat.overview-card .stat-label {
  grid-area: label;
  display: block;
  max-width: 100%;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

#overview .stat.overview-card .stat-value {
  grid-area: value;
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1;
}

#overview .stat.overview-card .overview-card-hint {
  grid-area: hint;
  display: block;
  margin-top: 9px;
  color: #8da0ba;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

#overview .stat.overview-card:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe !important;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

#overviewInsights.overview-insights {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

#overviewInsights .insight-panel {
  min-height: 210px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

#overviewInsights .insight-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#overviewInsights .insight-panel-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

#overviewInsights .ghost-button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #2563eb;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

#overviewInsights .ghost-button:hover {
  color: #1d4ed8;
  text-decoration: underline;
  transform: none;
}

#overviewInsights .insight-list,
#overviewInsights .attention-grid {
  display: grid;
  gap: 8px;
}

#overviewInsights .insight-row,
#overviewInsights .exception-row,
#overviewInsights .attention-grid > button {
  width: 100%;
  min-height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  background: rgba(248, 251, 255, 0.92) !important;
  box-shadow: none;
  color: #334155;
  text-align: left;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

#overviewInsights .insight-row:hover,
#overviewInsights .attention-grid > button:hover {
  border-color: #c7d2fe;
  background: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

#overviewInsights .insight-row span,
#overviewInsights .exception-row span,
#overviewInsights .attention-grid > button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#overviewInsights .insight-row strong {
  flex: 0 0 auto;
}

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

#overviewInsights .attention-grid > button strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

#overviewInsights .attention-pending {
  background: linear-gradient(180deg, #fffbeb, #fef3c7) !important;
  border-color: #fde68a !important;
}

#overviewInsights .attention-mismatch {
  background: linear-gradient(180deg, #f8fafc, #e2e8f0) !important;
  border-color: #cbd5e1 !important;
}

#overviewInsights .attention-duplicate {
  background: linear-gradient(180deg, #fff1f2, #fee2e2) !important;
  border-color: #fecdd3 !important;
}

#overviewInsights .attention-old-pending {
  background: linear-gradient(180deg, #fff7ed, #fed7aa) !important;
  border-color: #fdba74 !important;
}

#overviewInsights .exception-row {
  background: #ffffff !important;
  color: #334155;
}

#overviewInsights .exception-row strong {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 14px;
}

#overviewInsights .empty-state.small {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
  background: rgba(248, 251, 255, 0.7);
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.overview-focus {
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.overview-focus-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.overview-focus-header h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.overview-focus-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.focus-summary-card {
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #f8fbff;
}

.focus-summary-card span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.focus-summary-card strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

@media (max-width: 1250px) {
  #overview.stats-grid.overview-card-grid {
    grid-template-columns: repeat(3, minmax(185px, 1fr));
  }

  #overviewInsights.overview-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #overview.stats-grid.overview-card-grid {
    grid-template-columns: 1fr;
  }

  #overviewInsights .attention-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin authentication and user management */
body.admin-page:not(.admin-authenticated) .admin-sidebar,
body.admin-page:not(.admin-authenticated) .admin-shell {
  display: none;
}

.admin-auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.20), transparent 32%),
    linear-gradient(135deg, #061224 0%, #0f2746 50%, #0b172a 100%);
}

.admin-auth-gate[hidden] {
  display: none !important;
}

.admin-auth-card {
  width: min(460px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.30);
}

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

.admin-auth-brand h1 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.admin-auth-brand p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.admin-auth-form {
  display: grid;
  gap: 14px;
}

.admin-auth-form h2 {
  margin: 0;
  color: #0f172a;
  font-size: 21px;
}

.full-width {
  width: 100%;
}

.admin-user-logout {
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.admin-user-logout:hover {
  background: rgba(255, 255, 255, 0.20);
  color: #ffffff;
}

.admin-user-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: #f8fbff;
}

.three-cols {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.form-action-cell {
  display: flex;
  align-items: end;
}

.mini-text {
  font-size: 11px;
}

@media (max-width: 900px) {
  .three-cols {
    grid-template-columns: 1fr;
  }
}


/* Auth polish: black minimalist login and six-box code entry */
body.admin-page:not(.admin-authenticated) {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 14%, rgba(59, 130, 246, 0.24), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(124, 58, 237, 0.18), transparent 30%),
    linear-gradient(135deg, #020617 0%, #07111f 48%, #030712 100%);
}

.admin-auth-gate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(59, 130, 246, 0.26), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(124, 58, 237, 0.20), transparent 30%),
    linear-gradient(135deg, #020617 0%, #07111f 48%, #030712 100%);
}

.admin-auth-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 74%);
}

.admin-auth-form[hidden] {
  display: none !important;
}

.admin-auth-card {
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.admin-auth-brand {
  justify-content: center;
  text-align: left;
  margin-bottom: 26px;
}

.admin-auth-brand .admin-brand-mark {
  color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
}

.admin-auth-copy {
  display: grid;
  gap: 6px;
  text-align: center;
  margin-bottom: 4px;
}

.admin-auth-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.admin-auth-footnote {
  margin: -2px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.otp-code-label {
  display: grid;
  gap: 10px;
}

.otp-code-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.otp-code-box {
  height: 54px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  border: 1px solid #d7e2f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.otp-code-box:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.admin-user-copy strong {
  line-height: 1.1;
}

.admin-user-copy span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-actions .soft-danger,
.compact-actions .soft-button {
  white-space: nowrap;
}

/* Official Freight Courses 101 logo support */
.brand-logo-wrap {
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
}

.brand-logo-img,
.brand-logo-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.brand-logo-fallback {
  color: currentColor;
}


/* Smooth modal, review, and toast support */
.wide-modal-dialog {
  width: min(780px, calc(100vw - 32px));
}

.compact-modal-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
  font-size: 13px;
}

.compact-modal-card input,
.compact-modal-card select,
.compact-modal-card textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  background: #ffffff;
  color: #0f172a;
}

.compact-modal-card textarea {
  resize: vertical;
  min-height: 118px;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 40px));
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  animation: toastIn 0.18s ease-out;
}

.toast-card[data-tone="success"] {
  border-color: #bbf7d0;
}

.toast-card[data-tone="error"] {
  border-color: #fecaca;
}

.toast-card[data-tone="warning"] {
  border-color: #fde68a;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.toast-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.toast-content strong {
  font-size: 13px;
  line-height: 1.35;
}

.toast-content span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.toast-close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.toast-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.customer-review-dialog {
  width: min(760px, calc(100vw - 32px));
}

.customer-review-card {
  gap: 16px;
  background:
    radial-gradient(circle at top right, rgba(219, 234, 254, 0.9), transparent 28%),
    #ffffff;
}

.customer-review-heading {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}

.customer-review-heading-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
  font-weight: 1000;
}

.customer-review-heading h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.customer-review-heading p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.customer-review-details {
  display: grid;
  gap: 12px;
}

.customer-review-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-review-item {
  margin: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.customer-review-item.full-span {
  grid-column: 1 / -1;
}

.customer-review-item dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-review-item dd {
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  word-break: break-word;
}

.customer-final-warning {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid #fed7aa;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.24), transparent 34%),
    linear-gradient(180deg, #fff7ed, #fffbeb);
}

.customer-final-warning-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-weight: 1000;
}

.customer-final-warning strong {
  display: block;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 1000;
}

.customer-final-warning p {
  margin: 5px 0 0;
  color: #9a3412;
  line-height: 1.5;
  font-size: 12px;
  font-weight: 700;
}

.customer-review-agreement {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #dbeafe;
  border-radius: 15px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.customer-review-agreement input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #2563eb;
}

.customer-review-actions .gradient-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .customer-review-grid-inner {
    grid-template-columns: 1fr;
  }

  .customer-review-heading,
  .customer-final-warning,
  .customer-payment-policy-card,
  .customer-course-warning {
    grid-template-columns: 1fr;
  }

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

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

/* Customer Side Portal manager */
.portal-management-shell {
  display: grid;
  gap: 18px;
}

.portal-manager-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.portal-tabbed-card {
  overflow: hidden;
}

.portal-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.portal-card-heading h3 {
  margin: 0;
  color: var(--text);
}

.portal-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.portal-main-subnav {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(12px);
}

.portal-subnav button {
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(240, 253, 244, 0.78);
  color: #166534;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.portal-subnav button.active,
.portal-subnav button:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.22);
  transform: translateY(-1px);
}

.portal-panels {
  position: relative;
  display: block;
}

.portal-panel {
  display: grid;
  gap: 16px;
  opacity: 1;
  transform: translateY(0);
}

.portal-panel[hidden] {
  display: none !important;
}

.portal-panel.is-entering {
  animation: portalPanelIn 0.24s ease both;
}

.portal-panel.is-leaving {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  animation: portalPanelOut 0.2s ease both;
}

.portal-panel-heading {
  border: 1px solid rgba(22, 163, 74, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.9), rgba(255, 255, 255, 0.92));
}

.portal-panel-heading h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1rem;
}

@keyframes portalPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes portalPanelOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.99);
  }
}

.portal-content-form {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: 16px;
  background: rgba(248, 250, 252, 0.85);
}

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

.portal-content-list {
  display: grid;
  gap: 12px;
}

.portal-content-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.portal-content-item.is-hidden {
  opacity: 0.72;
  background: rgba(248, 250, 252, 0.9);
}

.portal-content-preview {
  width: 88px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(226, 232, 240, 0.6);
  overflow: hidden;
  font-size: 12px;
  text-align: center;
}

.portal-thumb {
  width: 100%;
  height: 70px;
  object-fit: cover;
}

.portal-content-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.portal-content-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portal-content-title-row h4,
.portal-content-copy p {
  margin: 0;
}

.portal-content-copy small {
  color: var(--muted);
}

.small-empty-state {
  padding: 16px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.86);
}

/* Public customer portal dynamic content */
.customer-announcements {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.customer-announcement-card {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.12);
}

.customer-announcement-card span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.customer-announcement-card h2,
.customer-announcement-card p {
  margin: 0 0 8px;
}

.customer-announcement-card a,
.customer-video-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  border-radius: 999px;
  padding: 9px 13px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.customer-announcement-media,
.customer-about-item.has-media {
  min-width: 0;
}

.customer-about-dynamic,
.customer-contact-list {
  display: grid;
  gap: 16px;
}

.customer-about-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.customer-about-item.has-media {
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  align-items: center;
}

.customer-about-item h2,
.customer-about-item p {
  margin-top: 0;
}

.customer-about-media {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
}

@media (max-width: 760px) {
  .portal-form-grid,
  .portal-content-item,
  .customer-announcement-card,
  .customer-about-item.has-media {
    grid-template-columns: 1fr;
  }

  .portal-content-preview {
    width: 100%;
  }
}


/* Settings and Help Support panels */
.settings-support-panel {
  overflow: hidden;
}

.settings-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.settings-card,
.help-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.settings-card h3,
.help-card h3 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.settings-card label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.settings-card input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  background: #ffffff;
  color: #0f172a;
}

.settings-card input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.security-card {
  align-content: start;
}

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

.settings-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.settings-detail-list dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-detail-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  text-align: right;
}

.settings-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.help-card span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: 12px;
  font-weight: 900;
}

.help-card p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
  font-weight: 700;
}

@media (max-width: 720px) {
  .settings-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .settings-detail-list div {
    display: grid;
    justify-content: stretch;
  }

  .settings-detail-list dd {
    text-align: left;
  }
}

.payment-option-next-step {
  margin-top: 10px !important;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  word-break: break-word;
}

.payment-option-next-step.empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8 !important;
}

.customer-next-step-preview {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.customer-next-step-preview strong {
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.customer-next-step-preview span {
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.customer-thank-you-actions a.customer-next-step-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.22);
}

.customer-thank-you-actions a.customer-next-step-link[hidden] {
  display: none;
}

.payment-option-editor small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.payment-option-systeme-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.payment-option-systeme-card strong {
  color: #0f172a;
}

.check-row.systeme-check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  min-height: 44px;
}

.check-row.systeme-check-row input[type="checkbox"] {
  width: auto;
  min-height: auto;
  transform: scale(1.08);
}

.check-row.systeme-check-row span {
  margin: 0 !important;
  color: #334155;
  font-weight: 800;
  font-size: 12px;
}

.modal-check-row {
  margin: 4px 0;
}

.payment-option-systeme-status {
  margin-top: 8px !important;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  word-break: break-word;
}

.payment-option-systeme-status.empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8 !important;
}
