/* =============================================================
   ELEGANT PROFESSIONAL DESIGN - MINIMAL COLORS
   Online Education Platform - Classy & Refined
   Font: Roboto (Google Material Design)
============================================================= */

/* =============================================================
   1. CSS VARIABLES & ROOT STYLES - REFINED PALETTE
   ============================================================= */
:root {
  /* Elegant Neutral Colors - Professional Palette */
  --primary: #2c3e50;        /* Deep slate blue */
  --primary-light: #34495e;  /* Lighter slate */
  --accent: #3498db;         /* Subtle professional blue */
  --accent-light: #5dade2;   /* Light accent */

  --text-primary: #2c3e50;   /* Dark text */
  --text-secondary: #7f8c8d; /* Muted text */
  --text-light: #95a5a6;     /* Light text */

  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-subtle: #ecf0f1;

  --border: #dee2e6;
  --border-light: #e9ecef;

  /* Minimal accent colors */
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  /* Shadows - Subtle */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);

  /* Border Radius - Subtle */
  --radius-sm: 0.25rem;
  --radius: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;

  /* Transitions */
  --transition: all 0.2s ease;

  /* Typography */
  --font-primary: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sidebar theme palette (required by sidebar CSS) */
  --dark-teal:   #073b4c;
  --ocean-blue:  #118ab2;
  --royal-gold:  #ffd166;
  --emerald:     #06d6a0;
}

/* =============================================================
   2. GLOBAL STYLES & TYPOGRAPHY - ELEGANT
   ============================================================= */
* {
  font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

html {
font-size: 14px;
  scroll-behavior: smooth;
}

@@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings - Roboto Medium/Bold */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: 0.0025em;
}

h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.75rem; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; }
h6, .h6 { font-size: 1rem; }

/* =============================================================
   3. PROFESSIONAL CARD COMPONENTS
   ============================================================= */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
    .card-header.btn-outline-primary{
        color: white !important;
    }

    .card-header.bg-primary-subtle {
        background: rgba(17, 138, 178, 0.08) !important;
        border-bottom: 1px solid rgba(17, 138, 178, 0.15);
    }

    .card-header.bg-primary {
        background: var(--primary);
        color: white;
        border-bottom: none;
    }

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
}

/* =============================================================
   4. REFINED BUTTONS
   ============================================================= */
.btn {
  font-family: var(--font-primary);
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: var(--transition);
  text-transform: none;
  letter-spacing: 0.01em;
}

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

.btn-sm {
  padding: 0.4rem 0.875rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.0625rem;
}

/* Primary button - elegant slate */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: white;
}

/* Success button - muted green */
.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-success:hover {
  background: #229954;
border-color: #229954;
  color: white;
}

/* Info button */
.btn-info {
  background: var(--info);
  border-color: var(--info);
  color: white;
}

.btn-info:hover {
  background: #2980b9;
  border-color: #2980b9;
  color: white;
}

/* Warning button */
.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: white;
}

.btn-warning:hover {
  background: #e67e22;
  border-color: #e67e22;
  color: white;
}

/* Danger button */
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: white;
}

/* Outline buttons */
.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-primary);
}

/* MaterialM Light Action Buttons */
.btn-light-info {
  background: rgba(52, 152, 219, 0.1);
  border: none;
}
.btn-light-info:hover {
  background: rgba(52, 152, 219, 0.2);
  color: var(--info) !important;
}

.btn-light-warning {
  background: rgba(243, 156, 18, 0.1);
  border: none;
}
.btn-light-warning:hover {
  background: rgba(243, 156, 18, 0.2);
  color: var(--warning) !important;
}

.btn-light-danger {
  background: rgba(231, 76, 60, 0.1);
  border: none;
}
.btn-light-danger:hover {
  background: rgba(231, 76, 60, 0.2);
  color: var(--danger) !important;
}

.btn-light-primary {
  background: rgba(44, 62, 80, 0.1);
  border: none;
}
.btn-light-primary:hover {
  background: rgba(44, 62, 80, 0.2);
  color: var(--primary) !important;
}

.btn-light-success {
  background: rgba(39, 174, 96, 0.1);
  border: none;
}
.btn-light-success:hover {
  background: rgba(39, 174, 96, 0.2);
  color: var(--success) !important;
}

/* MaterialM Table Header */
.header-item th {
  font-family: var(--font-primary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
  padding: 0.875rem;
}

/* =============================================================
   5. ELEGANT FORM CONTROLS
   ============================================================= */
.form-control,
.form-select {
  font-family: var(--font-primary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  transition: var(--transition);
  background: var(--bg-white);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.form-label {
  font-family: var(--font-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

/* =============================================================
   6. MINIMAL BADGES
   ============================================================= */
.badge {
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.badge-primary {
  background: var(--primary);
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-info {
  background: var(--info);
  color: white;
}

.badge-secondary {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

/* =============================================================
 7. CLEAN ALERTS
   ============================================================= */
.alert {
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  padding: 1rem 1.25rem;
}

.alert-primary {
background: rgba(52, 73, 94, 0.1);
  border-color: rgba(52, 73, 94, 0.2);
  color: var(--primary);
}

.alert-success {
  background: rgba(39, 174, 96, 0.1);
  border-color: rgba(39, 174, 96, 0.2);
  color: var(--success);
}

.alert-warning {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.2);
  color: var(--warning);
}

.alert-danger {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.2);
  color: var(--danger);
}

.alert-info {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.2);
  color: var(--info);
}

/* =============================================================
   8. PROFESSIONAL TABLES
   ============================================================= */
.table {
  background: white;
  border-radius: var(--radius-lg);
}

.table thead th {
  font-family: var(--font-primary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
  padding: 0.875rem;
}

.table tbody td {
  padding: 0.875rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.table-hover tbody tr:hover {
  background-color: var(--bg-light);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(52, 73, 94, 0.02);
}

/* =============================================================
   9. SUBTLE NAVIGATION
   ============================================================= */
.breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--text-light);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

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

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

/* Nav tabs */
.nav-tabs {
  border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.75rem 1rem;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--accent-light);
  color: var(--accent);
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* =============================================================
   10. REFINED MODAL
   ============================================================= */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-light);
}

.modal-title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* =============================================================
   11. CLEAN DROPDOWN
   ============================================================= */
.dropdown-menu {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.dropdown-item:hover {
  background: var(--bg-light);
  color: var(--accent);
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: var(--border-light);
}

/* =============================================================
   12. PROFESSIONAL PROGRESS
   ============================================================= */
.progress {
  height: 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
}

.progress-bar {
  border-radius: var(--radius-sm);
  background-color: var(--accent);
}

/* =============================================================
   13. ELEGANT PAGINATION
   ============================================================= */
.pagination {
  gap: 0.25rem;
}

.page-link {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.5rem 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  background: white;
}

.page-link:hover {
  background: var(--bg-light);
  border-color: var(--border);
  color: var(--accent);
}

.page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* =============================================================
   14. FONT AWESOME ICONS FIX
   ============================================================= */
.fa, .fas, .far, .fal, .fab, 
.fa-solid, .fa-regular, .fa-light, .fa-brands,
i[class*="fa-"], i[class^="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

.far, .fa-regular {
  font-weight: 400 !important;
}

.fab, .fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* =============================================================
   15. DASHBOARD CARDS - MINIMAL
   ============================================================= */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  margin: 0.5rem 0;
  color: var(--text-primary);
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================================
   16. UTILITY CLASSES
   ============================================================= */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

/*.bg-primary { background-color: var(--primary) !important; }*/
.bg-light { background-color: var(--bg-light) !important; }
.bg-white { background-color: var(--bg-white) !important; }

.border-soft { border: 1px solid var(--border-light) !important; }

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

/* =============================================================
   17. LIST GROUPS
   ============================================================= */
.list-group-item {
  border: 1px solid var(--border-light);
  background: white;
  color: var(--text-primary);
}

.list-group-item:hover {
  background: var(--bg-light);
}

.list-group-item-action.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* =============================================================
   18. RESPONSIVE - MOBILE FRIENDLY
   ============================================================= */

/* --- Tablet (≤991.98px) --- */
@media (max-width: 991.98px) {
  .body-wrapper {
    padding: 16px 12px;
  }

  .body-wrapper > .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
  }

  .page-header-banner {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .page-header-title {
    font-size: 1.15rem;
  }

  .row.g-4 {
    --bs-gutter-x: 0.875rem;
    --bs-gutter-y: 0.875rem;
  }
}

/* --- Mobile (≤767.98px) --- */
@media (max-width: 767.98px) {
  /* Layout */
  .body-wrapper {
    padding: 12px 8px;
  }

  .body-wrapper > .container-fluid {
    padding-left: 6px;
    padding-right: 6px;
  }

  /* Typography */
  h1, .h1 { font-size: 1.6rem; }
  h2, .h2 { font-size: 1.35rem; }
  h3, .h3 { font-size: 1.2rem; }
  h4, .h4 { font-size: 1.1rem; }
  h5, .h5 { font-size: 1rem; }

  /* Page header */
  .page-header-banner {
    padding: 10px 14px;
    margin-bottom: 12px;
  }

  .page-header-title {
    font-size: 1.05rem;
  }

  .page-header-banner .breadcrumb {
    font-size: 0.75rem;
  }

  /* Cards */
  .card-body {
    padding: 1rem;
  }

  .card-header {
    padding: 0.75rem 1rem;
  }

  /* Stat cards */
  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  /* Navbar compact */
  .navbar .navbar-brand,
  .navbar span.navbar-brand {
    font-size: 1rem;
  }

  /* Tables - prevent text-nowrap overflow on tiny screens */
  .table.text-nowrap td,
  .table.text-nowrap th {
    white-space: normal;
  }

  /* Action button groups in tables */
  .btn-group-sm .btn,
  td .btn-sm,
  td .btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
  }

  td .d-flex.gap-1,
  td .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  /* Forms: single column on mobile */
  .row.g-3 > [class*="col-md"],
  .row.g-3 > [class*="col-lg"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Modal: full-width on mobile */
  .modal-dialog:not(.modal-fullscreen) {
    margin: 0.5rem auto;
    max-width: calc(100vw - 1rem);
  }

  /* Sidebar backdrop helper */
  body.sidebar-open {
    overflow: hidden;
  }

  /* Footer compact */
  .footer {
    padding: 0.875rem 0;
    font-size: 0.8125rem;
  }

  /* Topbar/navbar */
  .main-content .navbar {
    padding: 0 0.75rem;
  }

  /* Dropdown menus full-width on tiny screens */
  .dropdown-menu {
    min-width: 200px;
  }

  /* Hide separator dividers in hero stat strip */
  .hstat-div {
    display: none;
  }

  /* Hero stats strip: wrap & center */
  .hero-stats-strip {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hstat {
    flex: 0 0 calc(50% - 0.375rem);
  }

  /* Urgent banner compact */
  .urgent-banner {
    padding: 0.75rem 1rem;
  }

  .urgent-banner .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .urgent-banner .btn {
    width: 100%;
    text-align: center;
  }

  /* Panel heads: stack vertically */
  .panel-head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  /* xcard grid: 2 per row */
  .col-lg-3.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Grids with col-lg-8/4 split: stack */
  .col-lg-8,
  .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Table search header: stack */
  .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }

  /* Card-header: stack title + search input */
  .card-header .d-flex.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }

  .card-header .input-group {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Top-of-view action row (title + Create button) */
  .d-flex.justify-content-between.align-items-center.mb-4 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  .d-flex.justify-content-between.align-items-center.mb-4 .btn,
  .d-flex.justify-content-between.align-items-center.mb-4 a.btn {
    align-self: stretch;
    text-align: center;
  }

  /* Inline form rows in panels */
  .row.g-2 > .col-6,
  .row.g-3 > .col-6,
  .row.g-4 > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .row.g-2 > .col-4,
  .row.g-3 > .col-4,
  .row.g-4 > .col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }

  /* Step indicators and progress bars */
  .progress {
    height: 6px;
  }
}

/* --- Small mobile (≤575.98px) --- */
@media (max-width: 575.98px) {
  /* Typography */
  h1, .h1 { font-size: 1.4rem; }
  h2, .h2 { font-size: 1.2rem; }

  .body-wrapper {
    padding: 8px 4px;
  }

  .body-wrapper > .container-fluid {
    padding-left: 4px;
    padding-right: 4px;
  }

  /* Stat xcards: full width */
  .col-lg-3.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Page header action buttons */
  .page-header-banner .d-flex {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  /* Cards full-width padded */
  .card {
    border-radius: var(--radius);
  }

  .card-body {
    padding: 0.875rem;
  }

  /* Badges wrapping */
  td .badge,
  th .badge {
    font-size: 0.7rem;
  }

  /* Buttons in headers */
  .card-header .btn,
  .panel-head .btn {
    font-size: 0.8125rem;
    padding: 0.3rem 0.65rem;
  }

  /* Chat bubbles full-width */
  .chat-bubble {
    max-width: 92% !important;
  }

  /* Hero greeting */
  .hero-title {
    font-size: 1.4rem;
  }

  .hero-sub {
    font-size: 0.9rem;
  }

  /* hstat: 2 columns */
  .hstat {
    flex: 0 0 calc(50% - 0.375rem);
  }

  /* Modal full-screen feel */
  .modal-dialog {
    margin: 0;
    max-width: 100vw;
    border-radius: 0;
  }

  .modal-content {
    border-radius: 0;
    min-height: 100vh;
  }

  /* Pagination: compact */
  .pagination .page-link {
    padding: 0.3rem 0.55rem;
    font-size: 0.8125rem;
  }

  /* Alert compact */
  .alert {
    padding: 0.65rem 0.875rem;
    font-size: 0.875rem;
  }

  /* Inline stat boxes in test/grading modals */
  .row.g-2 > .col-4,
  .row.g-3 > .col-4,
  .row.g-4 > .col-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

/* =============================================================
   19. PRINT STYLES
   ============================================================= */
@@media print {
  .no-print {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
  }
  
  body {
    background: white !important;
  }
}

/* =============================================================
   END OF ELEGANT STYLES
   ============================================================= */

/* =============================================================
   TOAST NOTIFICATION SYSTEM STYLES
   ============================================================= */

/* Toast container positioning */
.toast-container {
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.5rem;
}

/* Toast header styles */
.toast-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom: none;
    padding: 0.75rem 1rem;
}

/* Toast body styles */
.toast-body {
    font-family: var(--font-primary);
    padding: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Toast animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.showing {
    animation: toastSlideIn 0.3s ease-out;
}

.toast.hide {
    animation: toastSlideOut 0.3s ease-in;
}

/* Toast type specific styles */
.toast-header.bg-success {
    background-color: var(--success) !important;
}

.toast-header.bg-danger {
    background-color: var(--danger) !important;
}

.toast-header.bg-warning {
    background-color: var(--warning) !important;
    color: #212529 !important;
}

.toast-header.bg-info {
    background-color: var(--info) !important;
}

/* Close button for white backgrounds */
.toast-header .btn-close-white {
    filter: brightness(0) invert(1);
}

/* Confirmation toast buttons */
.toast-body .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Position variants */
.toast-container.top-start {
    top: 0;
    left: 0;
}

.toast-container.top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.top-end {
    top: 0;
    right: 0;
}

.toast-container.bottom-start {
    bottom: 0;
    left: 0;
}

.toast-container.bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.bottom-end {
    bottom: 0;
    right: 0;
}

/* Responsive toast adjustments */
@media (max-width: 576px) {
    .toast-container .toast {
        min-width: 280px;
        max-width: calc(100vw - 2rem);
    }
    
    .toast-container.top-center,
    .toast-container.bottom-center {
        left: 1rem;
        right: 1rem;
        transform: none;
    }
}

/* =============================================================
   END OF TOAST STYLES
   ============================================================= */

/* =============================================================
   PROFESSIONAL SIDEBAR - PRO SIDEBAR TEMPLATE INSPIRED
   ============================================================= */

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-white);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidebar collapsed state */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-link span:not(.badge),
.sidebar.collapsed .user-info {
    opacity: 0;
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    text-align: center;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar.collapsed .fas.fa-chevron-down {
    display: none;
}

/* Sidebar Header */
.sidebar-header {
    height: 70px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--ocean-blue) 100%);
    position: relative;
}

.sidebar-brand {
    font-family: var(--font-primary);
    color: white !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-brand:hover {
    color: var(--royal-gold) !important;
    transform: translateX(3px);
}

.sidebar-brand i {
    font-size: 1.75rem;
    margin-right: 0.75rem;
    color: var(--royal-gold);
}

.sidebar-brand span {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Navigation Items */
.sidebar .nav {
    padding: 1rem 0.75rem;
}

.sidebar .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.11rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, rgba(17, 138, 178, 0.1) 0%, rgba(6, 214, 160, 0.1) 100%);
    transition: width 0.3s ease;
    z-index: -1;
}

.sidebar .nav-link:hover::before {
    width: 100%;
}

.sidebar .nav-link:hover {
    background: rgba(17, 138, 178, 0.05);
    color: var(--ocean-blue);
    transform: translateX(5px);
    border-left: 3px solid var(--ocean-blue);
}

.sidebar .nav-link i {
    font-size: 1.125rem;
    margin-right: 0.875rem;
    min-width: 20px;
    text-align: center;
    transition: var(--transition);
}

.sidebar .nav-link:hover i {
    transform: scale(1.1);
    color: var(--ocean-blue);
}

/* Active nav link */
.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(17, 138, 178, 0.15) 0%, rgba(6, 214, 160, 0.1) 100%);
    color: var(--ocean-blue);
    font-weight: 600;
    border-left: 3px solid var(--ocean-blue);
    box-shadow: 0 2px 8px rgba(17, 138, 178, 0.15);
}

.sidebar .nav-link.active i {
    color: var(--ocean-blue);
}

/* Collapsible menu buttons */
.sidebar .nav-link[data-bs-toggle="collapse"] {
    background: transparent;
}

.sidebar .nav-link[data-bs-toggle="collapse"]:not(.collapsed) {
    background: rgba(7, 59, 76, 0.05);
    color: var(--dark-teal);
    font-weight: 600;
}

.sidebar .nav-link[data-bs-toggle="collapse"]:not(.collapsed) .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar .nav-link .fa-chevron-down {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

/* Sub-menu items */
.sidebar .collapse .btn-toggle-nav {
    padding-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar .btn-toggle-nav .nav-link {
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 1rem;
    font-weight: 400;
    position: relative;
}

.sidebar .btn-toggle-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.sidebar .btn-toggle-nav .nav-link:hover::after {
    background: var(--ocean-blue);
    transform: translateY(-50%) scale(1.5);
}

.sidebar .btn-toggle-nav .nav-link.active::after {
    background: var(--emerald);
    transform: translateY(-50%) scale(1.5);
}

.sidebar .btn-toggle-nav .nav-link i {
    font-size: 0.875rem;
    margin-right: 0.625rem;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

/* Avatar Circle */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--ocean-blue) 0%, var(--emerald) 100%);
    box-shadow: 0 3px 10px rgba(17, 138, 178, 0.3);
}

.sidebar-footer .dropdown-toggle {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    width: 100%;
}

.sidebar-footer .dropdown-toggle:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.sidebar-footer .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-footer .user-info strong {
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-info small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sidebar toggle button in header */
.sidebar-toggle-btn {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 10;
    color: var(--text-secondary);
}

.sidebar-toggle-btn:hover {
    background: var(--ocean-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle-btn i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

/* Main Content Adjustment */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 80px;
}

/* Top Navbar */
.main-content .navbar {
    height: 70px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-content .navbar .btn-link {
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.main-content .navbar .btn-link:hover {
    background: var(--bg-light);
    color: var(--ocean-blue);
}

/* Content Area (body-wrapper mirrors MaterialM) */
.content-area,
.body-wrapper {
    flex: 1;
    padding: 24px;
}

.body-wrapper > .container-fluid {
    max-width: 100%;
}

/* MaterialM Page Header Banner */
.page-header-banner {
    background: linear-gradient(135deg, rgba(17,138,178,.08) 0%, rgba(6,214,160,.06) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    padding: 20px 24px;
}

.page-header-title {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.0025em;
}

.page-header-banner .breadcrumb {
    font-family: var(--font-primary);
    font-size: 0.8125rem;
    margin-bottom: 0;
    padding: 0;
}

.page-header-banner .breadcrumb-item,
.page-header-banner .breadcrumb-item a {
    font-weight: 400;
}

/* MaterialM card-body table pattern */
.card.card-body {
    padding: 0;
}

.card.card-body > * {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.card.card-body > .table-responsive {
    padding-left: 0;
    padding-right: 0;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle-btn {
        display: none;
    }
}

/* Tablet and up - show collapse button */
@media (min-width: 768px) {
    .sidebar-header #sidebarClose {
        display: none;
    }
}

/* Badge in sidebar */
.sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
}

/* Divider in sidebar */
.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 0;
}

/* Section title in sidebar */
.sidebar-section-title {
    font-family: var(--font-primary);
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* Smooth scrolling for sidebar */
@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .main-content,
    .sidebar-backdrop {
        transition: none;
    }
}

/* Hover effects enhancement */
.sidebar .nav-link {
    will-change: transform;
}

/* Loading state for sidebar */
.sidebar.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success highlight for nav items */
.sidebar .nav-link.highlight-success {
    animation: highlightSuccess 0.6s ease;
}

@keyframes highlightSuccess {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: rgba(6, 214, 160, 0.2);
    }
}

/* =============================================================
   END OF PROFESSIONAL SIDEBAR STYLES
   ============================================================= */

/* =============================================================
   20. LIVE FEEL - ANIMATIONS & INTERACTIONS
   ============================================================= */

/* ---- Page Entrance Animation ---- */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
    }
}

.content-area {
    animation: pageEnter 0.35s ease both;
}

/* ---- Card stagger entrance ---- */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-animate {
    animation: cardEnter 0.4s ease both;
}

/* ---- Animated counter ---- */
.stat-value[data-target] {
    transition: none;
}

/* ---- Button Ripple ---- */
.btn {
    position: relative;
    overflow: hidden;
}

/* Buttons containing a position-absolute badge (e.g. notification bell)
   must not clip the badge that overflows outside the button bounds */
.btn:has(> .position-absolute.badge),
.btn:has(> .badge.position-absolute) {
    overflow: visible;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleAnim 0.55s linear;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---- Live Clock in Navbar ---- */
#live-clock {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    min-width: 80px;
    text-align: right;
}

/* ---- Notification Pulse ---- */
.notification-pulse {
    position: relative;
}

.notification-pulse .badge {
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    50%       { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(220, 53, 69, 0); }
}

/* ---- Active Nav Link indicator dot ---- */
.sidebar .nav-link.active-page {
    background: linear-gradient(135deg, rgba(17, 138, 178, 0.15) 0%, rgba(6, 214, 160, 0.1) 100%);
    color: #118ab2;
    font-weight: 600;
    border-left: 3px solid #118ab2;
    box-shadow: 0 2px 8px rgba(17, 138, 178, 0.15);
}

.sidebar .nav-link.active-page i {
    color: #118ab2;
}

.sidebar .btn-toggle-nav .nav-link.active-page::after {
    background: #06d6a0;
    transform: translateY(-50%) scale(1.5);
}

/* ---- Typing cursor on page title ---- */
.navbar-brand.typing::after {
    content: '|';
    animation: blink 0.8s step-start infinite;
    color: #118ab2;
    margin-left: 1px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ---- Smooth link hover underline ---- */
.sidebar .nav-link,
.sidebar .btn-toggle-nav .nav-link {
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---- Skeleton loader ---- */
.skeleton {
    background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Footer live pulse dot ---- */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #06d6a0;
    margin-right: 6px;
    animation: liveDotPulse 2s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes liveDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.7); }
}

/* =============================================================
   END OF LIVE FEEL STYLES
   ============================================================= */
