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

/* =====================
   COLOR TOKENS
   ===================== */
:root {
  --primary: #e35b24;
  /* Fornnax Orange */
  --primary-dark: #c44616;
  --primary-light: #f57e4e;
  --primary-bg: #fff7ed;
  /* orange-50 tint */

  --surface: #f8fafc;
  /* slate-50 */
  --card: #ffffff;

  --text-head: #0f172a;
  /* High-contrast Deep Navy */
  --text-body: #334155;
  /* slate-700 */
  --text-muted: #64748b;
  /* slate-500 */
  --text-subtle: #94a3b8;
  /* slate-400 */

  --border: #e2e8f0;
  /* slate-200 */

  --bs-primary: #e35b24;
  --bs-primary-rgb: 227, 91, 36;
}

/* =====================
   BASE
   ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--surface);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--text-head);
  font-weight: 700;
}

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

.text-subtle {
  color: var(--text-subtle) !important;
}

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

a:hover {
  color: var(--primary-dark);
}

/* =====================
   LAYOUT
   ===================== */
.wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--surface);
}

.main {
  flex: 1;
  background: var(--surface);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* All inner content containers get consistent spacing */
.main>.content,
.main>.container-fluid,
.main>.container,
.dashboard-shell {
  padding: 1.75rem 2rem;
  flex: 1;
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #ffffff !important;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px 0 rgba(15, 23, 42, 0.06);
  padding: 0 1.5rem;
  min-height: 62px;
}

.navbar .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .breadcrumb-item a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.navbar .breadcrumb-item a:hover {
  color: var(--primary);
}

.navbar .breadcrumb-item.active {
  color: var(--text-head);
  font-weight: 600;
  font-size: 0.85rem;
}

.navbar .breadcrumb-item+.breadcrumb-item::before {
  color: var(--text-subtle);
}

.indicator {
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #ef4444;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  /* Slate-900 to Slate-800 - Deep Navy */
  border-right: none;
  box-shadow: 6px 0 24px rgba(15, 23, 42, 0.35);
}

.sidebar-brand {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 1.5rem 1.25rem !important;
  /* more top, less bottom for a smoother visual weight */
  border-bottom: none !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

/* Logo Mode Styling */
/* Logo Mode Styling (Executive Badge) */
.sidebar-brand__logo-wrap {
  width: 100%;
  padding: 0.85rem;
  background: #ffffff;
  /* Frame for logos with hard-baked backgrounds */
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: all 0.25s ease;
}

.sidebar-brand__logo {
  max-width: 125px;
  max-height: 42px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.sidebar-brand:hover .sidebar-brand__logo-wrap {
  transform: translateY(-1px);
}

/* Text Mode Styling (Icon + Site Name) */
.sidebar-brand__text-wrap {
  display: flex !important;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.sidebar-brand__icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sidebar-brand__name {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
}

.sidebar-brand:hover .sidebar-brand__icon {
  transform: scale(1.08) rotate(-3deg);
}

/* Collapsed State Adjustments */
.sidebar.collapsed .sidebar-brand {
  padding: 1.5rem 0.5rem !important;
}

.sidebar.collapsed .sidebar-brand__name {
  display: none !important;
}

.sidebar.collapsed .sidebar-brand__logo {
  max-width: 40px;
}

.sidebar.collapsed .sidebar-brand__icon {
  margin-right: 0;
}

/* Nav group header */
.sidebar-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35) !important;
  padding: 1.5rem 1.5rem 0.5rem;
}

/* Sidebar nav items */
.sidebar-item a.sidebar-link,
.sidebar-item>a {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  margin: 0.15rem 1rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-item a.sidebar-link svg,
.sidebar-item a.sidebar-link i,
.sidebar-item>a svg,
.sidebar-item>a i {
  color: rgba(255, 255, 255, 0.5) !important;
  margin-right: 0.75rem;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sidebar-item a.sidebar-link:hover,
.sidebar-item>a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

.sidebar-item a.sidebar-link:hover svg,
.sidebar-item a.sidebar-link:hover i,
.sidebar-item>a:hover svg,
.sidebar-item>a:hover i {
  color: #ffffff !important;
}

.sidebar-item.active>a.sidebar-link,
.sidebar-item.active>a {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-item.active>a svg,
.sidebar-item.active>a i {
  color: #ffffff !important;
}

/* Sidebar sub-dropdown */
.sidebar-dropdown .sidebar-item a {
  margin: 0.1rem 0.5rem;
  padding: 0.5rem 1rem 0.5rem 2.25rem;
  font-size: 0.82rem;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 1.5rem !important;
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: 0 4px 16px 0 rgba(15, 23, 42, 0.1), 0 2px 6px -2px rgba(15, 23, 42, 0.06) !important;
}

/* Allow Bootstrap bg-* utilities to override the card white background */
.card.bg-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
  border: none !important;
}

.card.bg-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  border: none !important;
}

.card.bg-danger {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  border: none !important;
}

.card.bg-warning {
  background: linear-gradient(135deg, #fbbf24, #d97706) !important;
  border: none !important;
}

.card.bg-info {
  background: linear-gradient(135deg, #38bdf8, #0284c7) !important;
  border: none !important;
}

.card.bg-secondary {
  background: linear-gradient(135deg, #94a3b8, #475569) !important;
  border: none !important;
}

.card.bg-dark {
  background: linear-gradient(135deg, #334155, #0f172a) !important;
  border: none !important;
}

/* Ensure .text-white on cards with bg-* stays white */
.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-danger .card-body,
.card.bg-warning .card-body,
.card.bg-info .card-body,
.card.bg-secondary .card-body,
.card.bg-dark .card-body {
  background: transparent !important;
}

.card.bg-primary *,
.card.bg-success *,
.card.bg-danger *,
.card.bg-warning *,
.card.bg-info *,
.card.bg-secondary *,
.card.bg-dark * {
  color: #fff !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 1.1rem 1.5rem !important;
}

.card-body {
  padding: 1.5rem !important;
}

/* Dashboard card title icon pill */
.dashboard-card__title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-head);
}

.dashboard-card__title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* =====================
   BUTTONS  (uniform 40 px)
   ===================== */
.btn {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.1rem !important;
  min-height: 40px !important;
  line-height: 1.5 !important;
  border-radius: 0.5rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.18s ease;
  box-shadow: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.30) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border-color: var(--primary-dark) !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.40) !important;
}

.btn-outline-primary {
  background: transparent !important;
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn.btn-outline-primary:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.btn-success {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.30) !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #10b981, #047857) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25) !important;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
}

/* =====================
   FORM CONTROLS  (uniform 40 px)
   ===================== */
.form-control,
.form-select,
.input-group-text {
  font-size: 0.875rem !important;
  padding: 0.5rem 0.875rem !important;
  min-height: 40px !important;
  line-height: 1.5 !important;
  border-radius: 0.5rem !important;
  border: 1.5px solid var(--border) !important;
  background: #ffffff !important;
  color: var(--text-body) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
  background: #ffffff !important;
  outline: none !important;
}

.input-group-text {
  background: #f8fafc !important;
  color: var(--text-muted) !important;
}

.form-label {
  font-size: 0.875rem !important;
  font-weight: 600;
  color: var(--text-head);
  margin-bottom: 0.4rem;
}

/* Select2 alignment */
.select2-container .select2-selection--single {
  min-height: 40px !important;
  display: flex !important;
  align-items: center;
  border: 1.5px solid var(--border) !important;
  border-radius: 0.5rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5 !important;
  padding-left: 0.875rem !important;
  color: var(--text-body) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
}

/* DataTables — restore compact sizing */
div.dataTables_wrapper div.dataTables_length select {
  display: inline-block !important;
  min-height: 30px !important;
  height: auto !important;
  padding: 0.2rem 1.5rem 0.2rem 0.5rem !important;
  width: auto !important;
  border-radius: 0.375rem !important;
  font-size: 0.875rem !important;
}

div.dataTables_wrapper div.dataTables_filter input {
  display: inline-block !important;
  min-height: 34px !important;
  height: auto !important;
  padding: 0.3rem 0.75rem !important;
  width: auto !important;
}

/* =====================
   TABLES
   ===================== */
.table {
  color: var(--text-body);
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.table> :not(caption)>*>* {
  padding: 0.875rem 1rem;
  border-bottom-color: var(--border);
  vertical-align: middle;
}

.table thead th {
  color: var(--text-head) !important;
  /* switch from subtle to head color */
  font-weight: 700 !important;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em;
  background: #f1f5f9 !important;
  /* slightly darker but clean tint (slate-100) */
  border-top: none;
  border-bottom: 2px solid var(--border) !important;
  padding: 1rem !important;
}

.table-hover tbody tr {
  transition: background 0.15s;
}

.table-hover tbody tr:hover>* {
  background: var(--primary-bg) !important;
}

/* =====================
   OTD CHIPS
   ===================== */
.otd-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem !important;
  font-weight: 700;
  border-radius: 9999px !important;
  min-height: auto !important;
  line-height: normal !important;
  background: #e0e7ff;
  color: #3730a3;
}

.otd-chip--avg {
  background: linear-gradient(135deg, #34d399, #059669) !important;
  color: #fff !important;
}

/* =====================
   OTD Performance States  (applied by otd-classifier.js)
   ===================== */

/* --- Keyframe animations --- */
@keyframes pulseGreen {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  60% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

@keyframes pulseAmber {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }

  60% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

@keyframes pulseRed {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }

  60% {
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
}

/* OTD chip — >= 75% GREEN */
.otd-chip.otd--good {
  background: linear-gradient(135deg, #bbf7d0, #86efac) !important;
  color: #14532d !important;
  border: 1.5px solid #4ade80 !important;
  animation: pulseGreen 2s ease-in-out infinite;
}

/* OTD chip — 50–74% AMBER */
.otd-chip.otd--warning {
  background: linear-gradient(135deg, #fef9c3, #fde68a) !important;
  color: #78350f !important;
  border: 1.5px solid #fbbf24 !important;
  animation: pulseAmber 2s ease-in-out infinite;
}

/* OTD chip — < 50% RED */
.otd-chip.otd--danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
  color: #7f1d1d !important;
  border: 1.5px solid #f87171 !important;
  animation: pulseRed 1.6s ease-in-out infinite;
}

/* CDR OTD card overrides via JS-applied class */
/* Shared compact layout for all OTD stat cards */
.card.bg-primary.shadow-sm,
.card[class*="otd-card--"] {
  min-width: 90px !important;
  max-width: 120px !important;
  margin-bottom: 0 !important;
  border-radius: 0.6rem !important;
}

.card.bg-primary.shadow-sm .card-body,
.card[class*="otd-card--"] .card-body {
  padding: 0.45rem 0.75rem !important;
  /* tight inner padding */
}

.card.bg-primary.shadow-sm .card-body .small,
.card[class*="otd-card--"] .card-body .small {
  font-size: 0.68rem !important;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.card.bg-primary.shadow-sm .card-body .fs-5,
.card[class*="otd-card--"] .card-body .fs-5 {
  font-size: 1rem !important;
  /* was Bootstrap fs-5 = 1.25rem */
  line-height: 1.2;
}

/* Coloured versions */
.card.otd-card--good {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  border: none !important;
  animation: pulseGreen 2.5s ease-in-out infinite;
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35) !important;
}

.card.otd-card--warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border: none !important;
  animation: pulseAmber 2.5s ease-in-out infinite;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35) !important;
}

.card.otd-card--danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: none !important;
  animation: pulseRed 1.8s ease-in-out infinite;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.35) !important;
}

/* =====================
   BADGES
   ===================== */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3em 0.7em;
  border-radius: 0.375rem;
}

/* =====================
   DASHBOARD EMPTY STATE
   ===================== */
.dashboard-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
  background: #f8fafc;
  border: 1.5px dashed var(--border);
  border-radius: 0.75rem;
  margin: 1rem;
}

/* =====================
   PAGE HEADER  (dashboard-shell top title)
   ===================== */
.page-title {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-head);
  margin-bottom: 0.2rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* =====================
   AUTH PAGES
   ===================== */
.login_page {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
  min-height: 100vh;
}

.login_page .card {
  border-radius: 1rem !important;
  border: none !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.login_page .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 1.5rem 1.5rem 1rem;
  /* Removed !important and reduced height */
}

.login_page .card-header h1 {
  color: var(--text-head) !important;
  font-weight: 800;
}

.login_page .card-header p,
.login_page .card-header .lead {
  color: var(--text-muted) !important;
}

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =====================
   #liveToast — Custom Flash Toast
   ===================== */
#liveToast {
  min-width: 300px;
  max-width: 380px;
  border-radius: 0.875rem !important;
  border: none !important;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.14), 0 4px 12px -4px rgba(0, 0, 0, 0.08) !important;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  opacity: 1 !important;

  /* Shared base — light neutral before type class is applied */
  background: #fff;
  border-left: 5px solid #94a3b8;
}

/* LEFT accent bar + background per state */
#liveToast.bg-success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
  border-left-color: #22c55e !important;
  color: #14532d !important;
}

#liveToast.bg-danger {
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%) !important;
  border-left-color: #ef4444 !important;
  color: #7f1d1d !important;
}

#liveToast.bg-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%) !important;
  border-left-color: #f59e0b !important;
  color: #78350f !important;
}

/* Title inside toast */
#liveToast .toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

#liveToast.bg-success .toast-title {
  color: #15803d !important;
}

#liveToast.bg-danger .toast-title {
  color: #dc2626 !important;
}

#liveToast.bg-warning .toast-title {
  color: #b45309 !important;
}

/* Body message text */
#liveToast .toast-text {
  font-size: 0.825rem;
  line-height: 1.45;
}

#liveToast.bg-success .toast-text {
  color: #166534;
}

#liveToast.bg-danger .toast-text {
  color: #991b1b;
}

#liveToast.bg-warning .toast-text {
  color: #92400e;
}

/* Close button */
#liveToast .btn-close {
  opacity: 0.5;
  filter: none;
}

#liveToast.bg-success .btn-close,
#liveToast.bg-danger .btn-close,
#liveToast.bg-warning .btn-close {
  filter: none;
  /* keep original dark X */
}

#liveToast .btn-close:hover {
  opacity: 1;
}

/* Toast body row */
#liveToast .d-flex {
  align-items: center;
}

#liveToast .toast-body {
  padding: 0.875rem 1rem;
  flex: 1;
}

/* =====================
   TOASTR  — Premium Styling
   ===================== */
#toast-container>div {
  border-radius: 0.75rem !important;
  padding: 1rem 1.25rem 1rem 1rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -5px rgba(0, 0, 0, 0.08) !important;
  opacity: 1 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.875rem !important;
  min-width: 300px !important;
  max-width: 380px !important;
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  border-left: 4px solid transparent;
}

/* SUCCESS */
#toast-container>.toast-success {
  background: #f0fdf4 !important;
  border-left-color: #22c55e !important;
  color: #14532d !important;
}

#toast-container>.toast-success .toast-title {
  color: #15803d !important;
  font-weight: 700 !important;
}

#toast-container>.toast-success .toast-message {
  color: #166534 !important;
}

#toast-container>.toast-success::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f058';
  color: #22c55e;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ERROR */
#toast-container>.toast-error {
  background: #fff1f2 !important;
  border-left-color: #ef4444 !important;
  color: #7f1d1d !important;
}

#toast-container>.toast-error .toast-title {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

#toast-container>.toast-error .toast-message {
  color: #991b1b !important;
}

#toast-container>.toast-error::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f057';
  color: #ef4444;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* WARNING */
#toast-container>.toast-warning {
  background: #fffbeb !important;
  border-left-color: #f59e0b !important;
  color: #78350f !important;
}

#toast-container>.toast-warning .toast-title {
  color: #d97706 !important;
  font-weight: 700 !important;
}

#toast-container>.toast-warning .toast-message {
  color: #92400e !important;
}

#toast-container>.toast-warning::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f071';
  color: #f59e0b;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* INFO */
#toast-container>.toast-info {
  background: #eff6ff !important;
  border-left-color: #3b82f6 !important;
  color: #1e3a5f !important;
}

#toast-container>.toast-info .toast-title {
  color: #2563eb !important;
  font-weight: 700 !important;
}

#toast-container>.toast-info .toast-message {
  color: #1e40af !important;
}

#toast-container>.toast-info::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f05a';
  color: #3b82f6;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Close button */
#toast-container>div .toast-close-button {
  color: inherit !important;
  opacity: 0.4;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  top: 0.25rem !important;
}

#toast-container>div .toast-close-button:hover {
  opacity: 0.75 !important;
}

/* =====================
   SWEETALERT2  — Premium Styling
   ===================== */
.swal2-popup {
  border-radius: 1rem !important;
  padding: 2rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.9rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.20) !important;
  border: 1px solid var(--border) !important;
}

.swal2-title {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  color: var(--text-head) !important;
  padding-bottom: 0.5rem !important;
}

.swal2-html-container,
.swal2-content {
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* Icon circle colors */
.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(34, 197, 94, 0.25) !important;
}

.swal2-icon.swal2-success [class^=swal2-success-line] {
  background: #22c55e !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
}

.swal2-icon.swal2-error [class^=swal2-x-mark-line] {
  background: #ef4444 !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.swal2-icon.swal2-info {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
}

.swal2-icon.swal2-question {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Action Buttons */
.swal2-actions {
  gap: 0.75rem !important;
  margin-top: 1.5rem !important;
}

.swal2-confirm.swal2-styled {
  background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.5rem !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
  border: none !important;
  transition: all 0.2s ease !important;
}

.swal2-confirm.swal2-styled:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45) !important;
}

.swal2-cancel.swal2-styled {
  background: #f1f5f9 !important;
  color: var(--text-body) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.5rem !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.swal2-cancel.swal2-styled:hover {
  background: #e2e8f0 !important;
  color: var(--text-head) !important;
}

.swal2-deny.swal2-styled {
  background: linear-gradient(135deg, #f87171, #dc2626) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  padding: 0.6rem 1.5rem !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.30) !important;
  border: none !important;
}

/* Input inside SweetAlert (for input prompts) */
.swal2-input {
  border: 1.5px solid var(--border) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  padding: 0.6rem 1rem !important;
  color: var(--text-body) !important;
  height: auto !important;
}

.swal2-input:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* Backdrop tint */
.swal2-container.swal2-backdrop-show {
  background: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: blur(4px) !important;
}

/* =====================
   SEAMLESS INPUT GROUPS
   ===================== */
.input-group-seamless {
  border: 1.5px solid var(--border) !important;
  border-radius: 0.5rem !important;
  overflow: hidden;
  transition: all 0.2s ease;
  background: white !important;
  display: flex !important;
  align-items: center !important;
}

.input-group-seamless:focus-within {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(227, 91, 36, 0.15) !important;
}

.input-group-seamless .form-control,
.input-group-seamless .input-group-text {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.input-group-seamless .input-group-text {
  padding-right: 0 !important;
  padding-left: 1.1rem !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: fit-content !important;
}

.input-group-seamless .form-control {
  padding-left: 0.75rem !important;
}

.input-group-seamless .form-control:focus {
  box-shadow: none !important;
}

.input-group-seamless .toggle-hide-show {
  padding-right: 1.1rem !important;
  padding-left: 0.75rem !important;
  color: var(--text-muted) !important;
  cursor: pointer;
}

/* Fix browser autocomplete background */
.input-group-seamless input:-webkit-autofill,
.input-group-seamless input:-webkit-autofill:hover, 
.input-group-seamless input:-webkit-autofill:focus, 
.input-group-seamless input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px white inset !important;
  -webkit-text-fill-color: var(--text-body) !important;
  transition: background-color 5000s ease-in-out 0s;
}