/**
 * SIMDAPENSI V2 - Modern Fresh & Colorful UI Theme
 * Designed for Dinas Pendidikan dan Kebudayaan Kab. Situbondo
 * Framework: AdminLTE 3 / Bootstrap 4 Compatibility Layer
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colorful Brand Gradients */
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --grad-secondary: linear-gradient(135deg, #64748b 0%, #475569 100%);
  --grad-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --grad-info: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  --grad-warning: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --grad-danger: linear-gradient(135deg, #dc2626 0%, #f43f5e 100%);
  --grad-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --grad-pink: linear-gradient(135deg, #db2777 0%, #f43f5e 100%);
  --grad-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --grad-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);

  /* Solid Colors */
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-primary-light: #e0e7ff;
  --color-success: #10b981;
  --color-info: #0ea5e9;
  --color-warning: #f59e0b;
  --color-danger: #f43f5e;
  --color-purple: #8b5cf6;
  
  /* Neutral Palette */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Radius & Shadows */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px -1px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow-primary: 0 8px 20px rgba(79, 70, 229, 0.35);
  --shadow-glow-success: 0 8px 20px rgba(16, 185, 129, 0.35);
  --shadow-glow-info: 0 8px 20px rgba(14, 165, 233, 0.35);
  --shadow-glow-warning: 0 8px 20px rgba(245, 158, 11, 0.35);
  --shadow-glow-danger: 0 8px 20px rgba(244, 63, 94, 0.35);
}

/* Base Typography & Defaults */
body, html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  color: var(--text-main);
  background-color: var(--bg-app) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.content-wrapper {
  background-color: var(--bg-app) !important;
  min-height: calc(100vh - 120px);
}

/* Preloader Modern Upgrade */
.preloader {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader::after {
  content: "";
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-right-color: var(--color-purple);
  animation: modernSpin 0.75s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

@keyframes modernSpin {
  to { transform: rotate(360deg); }
}

/* ========================================================
   NAVBAR MODERN STYLING
======================================================== */
.main-header.navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--text-main) !important;
  border-radius: var(--radius-sm);
  padding: 8px 14px !important;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary) !important;
}

.navbar-nav [data-widget="pushmenu"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #f1f5f9;
  color: var(--text-main) !important;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.navbar-nav [data-widget="pushmenu"]:hover {
  background: var(--color-primary);
  color: #ffffff !important;
  transform: scale(1.05);
}

/* Search bar in navbar */
.form-control-navbar {
  background-color: #f1f5f9 !important;
  border: 1.5px solid transparent !important;
  border-radius: var(--radius-full) !important;
  padding: 8px 16px !important;
  font-size: 0.88rem !important;
  transition: all 0.25s ease;
}

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

.btn-navbar {
  border-radius: var(--radius-full) !important;
  color: var(--text-muted) !important;
}

/* ========================================================
   SIDEBAR MODERN STYLING (Deep Slate Glass & Colorful Icons)
======================================================== */
.main-sidebar {
  background: linear-gradient(180deg, #090d16 0%, #0f172a 40%, #1e1b4b 100%) !important;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* Brand Link */
.brand-link {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 18px 16px !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.brand-link .brand-image {
  float: none !important;
  max-height: 40px;
  width: 40px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 10px !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  margin-left: 0 !important;
}

.brand-link .brand-text {
  font-weight: 800 !important;
  font-size: 1.12rem !important;
  letter-spacing: 0.5px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--grad-primary);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  -webkit-text-fill-color: #ffffff;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

/* User Profile Panel in Sidebar */
.sidebar .user-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px !important;
  margin: 16px 12px 14px 12px !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
}

.sidebar .user-panel:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.sidebar .user-panel .image {
  padding-left: 0 !important;
  position: relative;
}

.sidebar .user-panel .image img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.4);
}

.sidebar .user-panel .info {
  padding: 0 !important;
  overflow: hidden;
}

.sidebar .user-panel .info a {
  color: #f8fafc !important;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .user-panel .user-role-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-top: 2px;
}

/* Sidebar Menu Header */
.sidebar nav .nav-header {
  color: #64748b !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  padding: 16px 16px 6px 18px !important;
}

/* Sidebar Links */
.sidebar nav .nav-pills .nav-link {
  color: #cbd5e1 !important;
  border-radius: var(--radius-md) !important;
  margin: 2px 10px !important;
  padding: 10px 14px !important;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar nav .nav-pills .nav-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  transform: translateX(3px);
}

/* Active Menu Item */
.sidebar nav .nav-pills .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-glow-primary) !important;
}

.sidebar nav .nav-pills .nav-link.active .nav-icon {
  color: #ffffff !important;
}

/* Treeview Submenu styling */
.nav-treeview {
  padding-left: 12px;
  margin-left: 20px;
  border-left: 1.5px dashed rgba(255, 255, 255, 0.15);
  margin-top: 4px;
  margin-bottom: 4px;
}

.nav-treeview .nav-link {
  font-size: 0.86rem !important;
  padding: 7px 12px !important;
  margin: 1px 6px !important;
}

.nav-treeview .nav-link i.nav-icon {
  font-size: 0.65rem !important;
  margin-right: 6px;
}

/* Colorful Icon Accents in Sidebar */
.sidebar .nav-icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.sidebar .nav-link:hover .nav-icon {
  transform: scale(1.15);
}

/* ========================================================
   CONTENT HEADER & BREADCRUMBS
======================================================== */
.content-header {
  padding: 24px 0 16px 0 !important;
}

.content-header h1 {
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.5px;
  margin-bottom: 4px !important;
}

.content-header small {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 500;
}

.breadcrumb {
  background: transparent !important;
  padding: 6px 12px !important;
  border-radius: var(--radius-full);
}

.breadcrumb-item {
  font-size: 0.85rem;
  font-weight: 600;
}

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

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

/* ========================================================
   CARDS & CONTAINERS MODERN OVERHAUL
======================================================== */
.card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  margin-bottom: 24px !important;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-light) !important;
  padding: 18px 24px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0 !important;
}

.card-title i {
  color: var(--color-primary);
}

.card-body {
  padding: 24px !important;
}

/* ========================================================
   DASHBOARD HERO BANNER & STAT WIDGETS
======================================================== */
.hero-welcome-banner {
  background: var(--grad-hero);
  border-radius: var(--radius-xl);
  padding: 30px 34px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-bottom: 28px;
}

.hero-welcome-banner::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-welcome-banner::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: 20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-welcome-banner h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-welcome-banner p {
  font-size: 0.98rem;
  color: #e0e7ff;
  max-width: 680px;
  margin-bottom: 18px;
  line-height: 1.6;
}

.hero-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Stat Cards (Colorful Widgets) */
.stat-card-modern {
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  margin-bottom: 24px;
}

.stat-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.stat-card-modern.card-sky {
  background: var(--grad-info);
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.35);
}

.stat-card-modern.card-emerald {
  background: var(--grad-success);
  box-shadow: 0 10px 25px -4px rgba(5, 150, 105, 0.35);
}

.stat-card-modern.card-amber {
  background: var(--grad-warning);
  box-shadow: 0 10px 25px -4px rgba(217, 119, 6, 0.35);
}

.stat-card-modern.card-purple {
  background: var(--grad-purple);
  box-shadow: 0 10px 25px -4px rgba(124, 58, 237, 0.35);
}

.stat-card-modern .stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-card-modern .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

.stat-card-modern .stat-number sup {
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0;
}

.stat-card-modern .stat-title {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 4px;
}

.stat-card-modern .stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
}

.stat-card-modern .stat-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: gap 0.2s;
}

.stat-card-modern .stat-footer:hover {
  text-decoration: none;
  color: #ffffff;
  opacity: 0.95;
}

.stat-card-modern .stat-footer i {
  transition: transform 0.2s ease;
}

.stat-card-modern:hover .stat-footer i {
  transform: translateX(4px);
}

/* Callout & Note announcement box */
.callout.callout-success {
  background: #f0fdf4 !important;
  border-left: 4px solid var(--color-success) !important;
  border-radius: var(--radius-md);
  padding: 18px 22px !important;
  color: #14532d;
}

.callout.callout-success h4 {
  color: #166534;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* ========================================================
   TABLES & DATATABLES MODERN STYLING
======================================================== */
.table-responsive {
  border-radius: var(--radius-md);
  overflow-x: auto;
}

table.dataTable,
.table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: #334155 !important;
}

.table thead th,
table.dataTable thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  border-top: none !important;
  border-bottom: 2px solid var(--border-color) !important;
  padding: 14px 18px !important;
  vertical-align: middle !important;
}

.table tbody td,
table.dataTable tbody td {
  padding: 14px 18px !important;
  vertical-align: middle !important;
  border-top: 1px solid var(--border-light) !important;
  border-bottom: none !important;
  font-size: 0.92rem;
  transition: background-color 0.15s ease;
}

.table tbody tr:hover,
table.dataTable tbody tr:hover {
  background-color: #f8fafc !important;
}

.table-bordered {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md);
}

/* DataTables Controls (Search & Pagination) */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-full) !important;
  padding: 8px 18px !important;
  font-size: 0.88rem !important;
  outline: none !important;
  transition: all 0.2s ease;
  margin-left: 8px;
  background-color: #ffffff;
}

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

.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  font-size: 0.88rem;
  margin: 0 6px;
}

/* Pagination Pills */
.pagination {
  gap: 4px;
}

.pagination .page-item .page-link {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
  background: var(--grad-primary) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.pagination .page-item .page-link:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ========================================================
   BUTTONS MODERN UPGRADE (Vibrant, Fresh & Colorful)
======================================================== */
.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 6px 13px !important;
  font-size: 0.82rem !important;
  border-radius: var(--radius-sm) !important;
}

.btn-primary {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow-primary) !important;
}

.btn-success {
  background: var(--grad-success) !important;
  color: #ffffff !important;
}
.btn-success:hover {
  box-shadow: var(--shadow-glow-success) !important;
}

.btn-info {
  background: var(--grad-info) !important;
  color: #ffffff !important;
}
.btn-info:hover {
  box-shadow: var(--shadow-glow-info) !important;
}

.btn-warning {
  background: var(--grad-warning) !important;
  color: #ffffff !important;
}
.btn-warning:hover {
  box-shadow: var(--shadow-glow-warning) !important;
}

.btn-danger {
  background: var(--grad-danger) !important;
  color: #ffffff !important;
}
.btn-danger:hover {
  box-shadow: var(--shadow-glow-danger) !important;
}

.btn-secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid var(--border-color) !important;
}
.btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #1e293b !important;
}

/* ========================================================
   FORMS & SELECT2 MODERN STYLING
======================================================== */
.form-control {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-main);
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  outline: none;
}

.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  height: 42px !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center;
  transition: all 0.2s ease;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.select2-dropdown {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
}

/* ========================================================
   MODALS MODERN REDESIGN
======================================================== */
.modal-content {
  border: none !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 20px 26px !important;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.modal-header .close {
  background: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: var(--shadow-sm);
  opacity: 0.8;
  transition: all 0.2s ease;
}

.modal-header .close:hover {
  opacity: 1;
  background: #fee2e2;
  color: var(--color-danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 26px !important;
}

.modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid var(--border-color) !important;
  padding: 16px 26px !important;
}

/* ========================================================
   ALERTS & NOTIFICATIONS
======================================================== */
.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 16px 20px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-left: 4px solid var(--color-success) !important;
}

.alert-danger, .alert-error {
  background: #fff1f2 !important;
  color: #9f1239 !important;
  border-left: 4px solid var(--color-danger) !important;
}

.alert-warning {
  background: #fffbeb !important;
  color: #92400e !important;
  border-left: 4px solid var(--color-warning) !important;
}

/* ========================================================
   FOOTER MODERN STYLING
======================================================== */
.main-footer {
  background: #ffffff !important;
  border-top: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
  font-size: 0.86rem;
  padding: 16px 24px;
}

.main-footer a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline;
}

/* ========================================================
   LOGIN & AUTH PAGE STYLING (Stunning Modern Layout)
======================================================== */
.login-page-modern {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0f172a 50%, #030712 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Floating background glow orbs */
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.login-orb-1 {
  width: 380px;
  height: 380px;
  background: #6366f1;
  top: -100px;
  left: -80px;
}

.login-orb-2 {
  width: 420px;
  height: 420px;
  background: #a855f7;
  bottom: -120px;
  right: -80px;
  animation-delay: -5s;
}

.login-orb-3 {
  width: 250px;
  height: 250px;
  background: #06b6d4;
  top: 50%;
  left: 65%;
  animation-delay: -2s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

.login-card-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
}

.login-glass-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  position: relative;
}

.login-header-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-header-logo img {
  max-height: 75px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.12));
  transition: transform 0.3s ease;
}

.login-header-logo img:hover {
  transform: scale(1.05);
}

.login-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modern-input-group {
  position: relative;
  margin-bottom: 20px;
}

.modern-input-group .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  z-index: 5;
  transition: color 0.2s;
}

.modern-input-group .form-control {
  padding-left: 46px !important;
  height: 48px;
  border-radius: var(--radius-md) !important;
  font-size: 0.95rem;
}

.modern-input-group .form-control:focus + .input-icon {
  color: var(--color-primary);
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  background: var(--grad-primary) !important;
  color: #ffffff !important;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-glow-primary);
  margin-top: 10px;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
}

.login-footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================================
   BADGES & PILLS MODERN UPGRADE
======================================================== */
.badge {
  font-family: inherit;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-primary {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
}

.badge-success {
  background: var(--grad-success) !important;
  color: #ffffff !important;
}

.badge-info {
  background: var(--grad-info) !important;
  color: #ffffff !important;
}

.badge-warning {
  background: var(--grad-warning) !important;
  color: #ffffff !important;
}

.badge-danger {
  background: var(--grad-danger) !important;
  color: #ffffff !important;
}

/* Soft Pill Badges */
.badge-soft-primary {
  background: rgba(79, 70, 229, 0.12) !important;
  color: #4338ca !important;
}

.badge-soft-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #065f46 !important;
}

.badge-soft-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #92400e !important;
}

.badge-soft-danger {
  background: rgba(244, 63, 94, 0.12) !important;
  color: #9f1239 !important;
}

/* ========================================================
   SWEETALERT MODERN OVERRIDES
======================================================== */
.swal-modal {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3) !important;
  padding: 32px !important;
  border: 1px solid var(--border-color);
}

.swal-title {
  font-weight: 800 !important;
  color: #0f172a !important;
  font-size: 1.35rem !important;
  margin-top: 16px !important;
}

.swal-text {
  font-size: 0.95rem !important;
  color: #475569 !important;
  text-align: center !important;
  line-height: 1.6 !important;
}

.swal-footer {
  text-align: center !important;
  margin-top: 24px !important;
}

.swal-button {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 24px !important;
  font-size: 0.92rem !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.swal-button:hover {
  transform: translateY(-2px);
}

.swal-button--confirm {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-glow-primary) !important;
}

.swal-button--confirm.swal-button--danger {
  background: var(--grad-danger) !important;
  box-shadow: var(--shadow-glow-danger) !important;
}

.swal-button--cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid var(--border-color) !important;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

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

