/* Defaults. Admin > Settings > Theme overrides these inline in the page head,
   so every colour below is derived from --sh-navy / --sh-gold. */
:root {
  --sh-navy: #0a1929;
  --sh-navy-900: #102a43;
  --sh-navy-800: #243b53;
  --sh-navy-700: #334e68;
  --sh-navy-100: #d9e2ec;
  --sh-gold: #d4a017;
  --sh-gold-300: #e3b04b;
  --sh-sidebar-width: 260px;
  --sh-sidebar-collapsed: 72px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f0f4f8;
  color: var(--sh-navy-900);
  min-height: 100vh;
}

/* Auth pages */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sh-navy) 0%, var(--sh-navy-800) 50%, var(--sh-navy-700) 100%);
  padding: 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.35);
  padding: 2rem;
}
.auth-card.wide { max-width: 560px; }
.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-brand .logo-mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sh-navy-800), var(--sh-navy));
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sh-gold-300);
  font-size: 1.4rem;
  margin-bottom: .5rem;
}
.auth-brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--sh-navy);
}
.auth-brand p { color: #627d98; font-size: .875rem; margin: .25rem 0 0; }

/* Sidebar layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sh-sidebar-width);
  background: var(--sh-navy);
  color: #bcccdc;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, width .25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.sidebar-brand:hover { color: #fff; }
.sidebar-brand .logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--sh-navy-700), var(--sh-navy));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sh-gold-300);
  flex-shrink: 0;
}
.sidebar-brand span { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.sidebar-brand small { display: block; font-weight: 400; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: #829ab1; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 0;
}
.sidebar-nav .nav-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #627d98;
  padding: .75rem 1.25rem .35rem;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.25rem;
  color: #bcccdc;
  text-decoration: none;
  font-size: .9rem;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.sidebar-nav a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: var(--sh-gold-300);
}
.sidebar-nav a i { font-size: 1.15rem; width: 1.35rem; text-align: center; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
}

.main-content {
  margin-left: var(--sh-sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid #d9e2ec;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.page-body { padding: 1.5rem; }

/* Cards */
.stat-card {
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: .75rem;
  padding: 1.25rem;
  height: 100%;
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 10px 25px -10px rgba(16,42,67,.12); }
.stat-card .stat-label { font-size: .8rem; color: #627d98; margin-bottom: .35rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--sh-navy); }
.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.stat-icon.bg-navy { background: var(--sh-navy-900); color: var(--sh-gold-300); }
.stat-icon.bg-soft-success { background: #d1fae5; color: #047857; }
.stat-icon.bg-soft-warning { background: #fef3c7; color: #b45309; }
.stat-icon.bg-soft-info { background: #dbeafe; color: #1d4ed8; }
.stat-icon.bg-soft-danger { background: #fee2e2; color: #b91c1c; }

.panel {
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: .75rem;
  overflow: hidden;
}
.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.panel-body { padding: 1.25rem; }

.btn-navy {
  background: var(--sh-navy-900);
  border-color: var(--sh-navy-900);
  color: #fff;
}
.btn-navy:hover { background: var(--sh-navy-800); border-color: var(--sh-navy-800); color: #fff; }
.btn-gold {
  background: var(--sh-gold);
  border-color: var(--sh-gold);
  color: var(--sh-navy);
  font-weight: 600;
}
.btn-gold:hover { background: var(--sh-gold-300); border-color: var(--sh-gold-300); color: var(--sh-navy); }

.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #627d98;
  font-weight: 600;
  background: #f8fafc;
  border-bottom-width: 1px;
}

.quick-actions .btn { min-width: 120px; }

/* Mobile sidebar */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,25,41,.5);
  z-index: 1035;
}
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .main-content { margin-left: 0; }
}

/* Auth step indicator */
.step-indicator {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.step-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9e2ec;
}
.step-indicator span.active { background: var(--sh-gold); }
.step-indicator span.done { background: var(--sh-navy-900); }

/* ========== Toastr – Sterling Heritage theme ========== */
#toast-container > div {
  opacity: 1;
  box-shadow: 0 10px 40px -10px rgba(10, 25, 41, 0.35);
  border-radius: 10px;
  padding: 14px 18px 14px 50px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  border: none;
  min-width: 300px;
  max-width: 420px;
}
#toast-container > .toast {
  background-image: none !important;
}
#toast-container > .toast-success {
  background-color: #0f3d2e;
  color: #ecfdf5;
}
#toast-container > .toast-success::before {
  content: "\F26B";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #34d399;
}
#toast-container > .toast-error {
  background-color: #450a0a;
  color: #fef2f2;
}
#toast-container > .toast-error::before {
  content: "\F623";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #f87171;
}
#toast-container > .toast-info {
  background-color: #0c1e3a;
  color: #eff6ff;
}
#toast-container > .toast-info::before {
  content: "\F431";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #60a5fa;
}
#toast-container > .toast-warning {
  background-color: #422006;
  color: #fffbeb;
}
#toast-container > .toast-warning::before {
  content: "\F33B";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #fbbf24;
}
#toast-container > div:hover {
  box-shadow: 0 14px 44px -8px rgba(10, 25, 41, 0.45);
  cursor: pointer;
}
.toast-progress {
  opacity: 0.35;
  height: 3px;
}
#toast-container .toast-close-button {
  color: inherit;
  opacity: 0.7;
  font-weight: 300;
  text-shadow: none;
  font-size: 1.25rem;
}
#toast-container .toast-close-button:hover {
  opacity: 1;
  color: inherit;
}
#toast-container .toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}
#toast-container.toast-top-right {
  top: 16px;
  right: 16px;
}
@media (max-width: 575.98px) {
  #toast-container.toast-top-right {
    top: 12px;
    right: 12px;
    left: 12px;
  }
  #toast-container > div {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- Confirmation modal (replaces native confirm) ---------- */
.sh-confirm {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .35);
}
.sh-confirm-icon {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}
.sh-confirm-icon.is-primary { background: var(--sh-navy-100); color: var(--sh-navy); }
.sh-confirm-icon.is-warning { background: #fef3c7; color: #b45309; }
.sh-confirm-icon.is-danger  { background: #fee2e2; color: #b91c1c; }

.sh-confirm .modal-footer .btn { min-width: 120px; font-weight: 500; }

@media (max-width: 575.98px) {
  .sh-confirm .modal-footer { flex-direction: column-reverse; gap: .5rem; }
  .sh-confirm .modal-footer .btn { width: 100%; margin: 0; }
}

/* ---------- Profile avatars ---------- */
.sh-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sh-navy-100);
  vertical-align: middle;
}
.sh-avatar-fallback {
  background: linear-gradient(135deg, var(--sh-navy-700), var(--sh-navy));
  color: var(--sh-gold-300);
  font-weight: 600;
  letter-spacing: .02em;
}
.sh-avatar-ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--sh-navy-100); }

/* Upload control with a live preview */
.avatar-picker { display: flex; align-items: center; gap: 1rem; }
.avatar-picker .sh-avatar { border: 1px solid #d9e2ec; }
