/* ========================================
   eLMS - Modern Design System
   Based on Professional School Management Theme
   Updated: 2026-02-11
   ======================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
@import url("lms-back-cancel-btn.css");

/* ========================================
   CSS VARIABLES - COLOR PALETTE
   ======================================== */
:root {
  /* Primary Colors - Professional Navy Blue */
  --primary-color: #0a2e5c;
  --primary-dark: #082346;
  --primary-darker: #061b33;
  --primary-light: #0d3a6b;
  
  /* Background Colors */
  --bg-main: #f5f5f5;
  --bg-white: #ffffff;
  --bg-light: #fafafa;
  --bg-card: #ffffff;
  
  /* Text Colors */
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* Border Colors */
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  
  /* Status Colors */
  --success-color: #56ab2f;
  --success-bg: #e8f5e9;
  --danger-color: #eb3349;
  --danger-bg: #ffebee;
  --warning-color: #f7971e;
  --warning-bg: #fff8e1;
  --info-color: #2196F3;
  --info-bg: #E3F2FD;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */
* {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 0.875rem;
}

a {
  text-decoration: none !important;
  color: inherit;
  transition: var(--transition-base);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   TYPOGRAPHY - STANDARDIZED SYSTEM
   ======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

h1, .h1 { font-size: 1.75rem; }  /* 24.5px */
h2, .h2 { font-size: 1.5rem; }   /* 21px */
h3, .h3 { font-size: 1.25rem; }  /* 17.5px */
h4, .h4 { font-size: 1.1rem; }   /* 15.4px */
h5, .h5 { font-size: 1rem; }     /* 14px */
h6, .h6 { font-size: 0.875rem; } /* 12.25px */

p, .text-base {
  font-size: 0.875rem;  /* 12.25px */
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.text-xs {
  font-size: 0.75rem !important;  /* 10.5px */
  line-height: 1.4;
}

.text-sm {
  font-size: 0.8125rem !important;  /* 11.375px */
  line-height: 1.5;
}

.text-lg {
  font-size: 1rem !important;  /* 14px */
  line-height: 1.6;
}

.text-xl {
  font-size: 1.125rem !important;  /* 15.75px */
  line-height: 1.5;
}

.text-2xl {
  font-size: 1.25rem !important;  /* 17.5px */
  line-height: 1.4;
}

.text-3xl {
  font-size: 1.5rem !important;  /* 21px */
  line-height: 1.3;
}

/* Font Weights */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Text Colors */
.text-primary-color { color: var(--text-primary) !important; }
.text-secondary-color { color: var(--text-secondary) !important; }
.text-muted-color { color: var(--text-muted) !important; }

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

::-webkit-scrollbar-track {
  background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-white);
  border-radius: 6px;
  border: 2px solid var(--bg-light);
  box-shadow: var(--shadow-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: #f0f0f0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-white) var(--bg-light);
}

/* ========================================
   NAVBAR - Modern Professional Style (DEPRECATED - Using Sidebar)
   ======================================== */
.navbar-mod {
  background-color: var(--primary-color) !important;
  color: var(--text-white) !important;
  box-shadow: 0 2px 8px rgba(10, 46, 92, 0.15);
  padding: 0.75rem 0;
}

/* ========================================
   SIDEBAR - Modern Clean Design
   ======================================== */
.app-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #0D47A1;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-main-content {
  margin-left: 280px;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  background: var(--bg-main);
  padding: 0;
}

/* Top Navbar with Toggle */
.top-navbar {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  /* Above sidebar (1000) and heavy z-index page cards; below Bootstrap modal backdrop (1050) */
  z-index: 1040;
  transition: left 0.3s ease;
}

.top-navbar-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.top-navbar-refresh-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.top-navbar-refresh-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.top-navbar-refresh-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

/* Help dropdown — modern, on-brand (navy + blue accents) */
.top-navbar-help-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
}

.top-navbar-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem 0.4rem 0.55rem;
  border: 1px solid rgba(10, 46, 92, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--text-white);
  background: var(--primary-color);
  box-shadow:
    0 2px 8px rgba(10, 46, 92, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.top-navbar-help-btn:hover {
  background: var(--primary-color);
  filter: brightness(1.04);
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.top-navbar-help-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.top-navbar-help-btn-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-white);
}

.top-navbar-help-btn-icon-wrap svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.top-navbar-help-btn-label {
  color: var(--text-white);
}

.top-navbar-help-btn-chevron {
  flex-shrink: 0;
  stroke: currentColor;
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0.1rem;
}

.top-navbar-help-dropdown:hover .top-navbar-help-btn-chevron,
.top-navbar-help-dropdown.is-open .top-navbar-help-btn-chevron {
  transform: rotate(180deg);
}

.top-navbar-help-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  padding-top: 8px;
  margin: 0;
  min-width: 17.5rem;
  max-width: 20rem;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 1200;
}

.top-navbar-help-panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
}

.top-navbar-help-panel-inner {
  overflow: hidden;
  background: var(--bg-white);
  border: 1px solid rgba(10, 46, 92, 0.1);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 6px -1px rgba(10, 46, 92, 0.06),
    0 20px 40px -12px rgba(10, 46, 92, 0.18);
}

.top-navbar-help-header {
  padding: 1rem 1.1rem 0.85rem;
  background: var(--primary-color);
  color: var(--text-white);
  position: relative;
}

.top-navbar-help-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25) 30%,
    rgba(255, 255, 255, 0.25) 70%,
    transparent
  );
}

.top-navbar-help-header-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}

.top-navbar-help-header-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.top-navbar-help-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-white);
}

.top-navbar-help-header-sub {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.top-navbar-help-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #f4f7fb;
}

.top-navbar-help-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  color: var(--text-primary) !important;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.top-navbar-help-item:hover {
  transform: translateX(2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-md);
}

.top-navbar-help-item:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.top-navbar-help-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  color: var(--primary-color);
  background: #eef2f7;
  box-shadow: none;
  border: 1px solid #dbe4ef;
}

.top-navbar-help-item-icon svg {
  stroke: currentColor;
}

.top-navbar-help-item--support .top-navbar-help-item-icon,
.top-navbar-help-item--manual .top-navbar-help-item-icon,
.top-navbar-help-item--docs .top-navbar-help-item-icon {
  background: #eef2f7;
  color: var(--primary-color);
  box-shadow: none;
  border: 1px solid #dbe4ef;
}

.top-navbar-help-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.top-navbar-help-item-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.top-navbar-help-item-desc {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-secondary);
  font-weight: 500;
}

.top-navbar-help-item-arrow {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.top-navbar-help-item:hover .top-navbar-help-item-arrow {
  color: #2563eb;
  transform: translateX(2px);
}

/* Desktop: open on hover */
@media (min-width: 1025px) {
  .top-navbar-help-dropdown:hover .top-navbar-help-panel {
    display: block;
    animation: topNavbarHelpIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
}

/* Mobile / tablet: tap to open */
@media (max-width: 1024px) {
  .top-navbar-help-panel.show {
    display: block;
    animation: topNavbarHelpIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  .top-navbar-help-btn {
    padding: 0.4rem 0.7rem 0.4rem 0.5rem;
  }
}

@keyframes topNavbarHelpIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-navbar-help-panel,
  .top-navbar-help-panel.show {
    animation: none !important;
  }
  .top-navbar-help-item:hover {
    transform: none;
  }
  .top-navbar-help-btn-chevron {
    transition: none;
  }
}

/* Help documentation / manual cards — match companies list hover affordance */
.help-topic-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.help-topic-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
.help-topic-card:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.top-navbar-session-pill {
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1e40af;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  white-space: nowrap;
}

.top-navbar-bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.5rem;
  margin: 0 0 0 0.125rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #2563eb;
  text-decoration: none !important;
  font: inherit;
  line-height: normal;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.top-navbar-bell-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.top-navbar-bell-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.top-navbar-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.top-navbar-bell-icon {
  stroke: currentColor;
}

.top-navbar-bell-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.28rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
}

.top-navbar-bell-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.125rem;
}

.top-navbar-bell-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 6px;
  margin: 0;
  min-width: 17rem;
  max-width: 22rem;
  max-height: 20rem;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 1200;
}

.top-navbar-bell-panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
}

.top-navbar-bell-panel-scroll {
  max-height: 20rem;
  overflow-y: auto;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

/* Desktop: panel on hover only (clicks on the bell do nothing). Keyboard: focus-visible on bell. */
@media (min-width: 1025px) {
  .top-navbar-bell-dropdown:hover .top-navbar-bell-panel,
  .top-navbar-bell-dropdown:has(.top-navbar-bell-btn:focus-visible) .top-navbar-bell-panel {
    display: block;
  }
}

/* Mobile / tablet: panel opens only when toggled (see index / base script) */
@media (max-width: 1024px) {
  .top-navbar-bell-dropdown:hover .top-navbar-bell-panel,
  .top-navbar-bell-dropdown:focus-within .top-navbar-bell-panel {
    display: none;
  }

  .top-navbar-bell-dropdown.is-open .top-navbar-bell-panel {
    display: block;
  }
}

.top-navbar-bell-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  text-decoration: none !important;
  color: #111827 !important;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.top-navbar-bell-item:last-child {
  border-bottom: none;
}

.top-navbar-bell-item:hover {
  background: #f9fafb;
}

.top-navbar-bell-item-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2563eb;
}

.top-navbar-bell-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.top-navbar-bell-item-sub {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-navbar-bell-dashboard {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  color: #2563eb !important;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.top-navbar-bell-dashboard:hover {
  background: #f3f4f6;
}

.top-navbar-bell-empty {
  margin: 0;
  padding: 1rem 0.85rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

.top-navbar .sidebar-toggle-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  transition: all 0.3s ease;
}

.top-navbar .sidebar-toggle-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Sidebar Header */
.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.brand-text {
  flex: 1;
  transition: opacity 0.3s ease, width 0.3s ease;
}

.brand-name {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.brand-plan {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn svg {
  transition: transform 0.3s ease;
}

/* Sidebar Search */
.sidebar-search {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.3s ease, padding 0.3s ease;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.5rem 2.25rem 0.5rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: var(--transition-base);
}

.sidebar-search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-search-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.search-shortcut {
  position: absolute;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
  font-family: monospace;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.nav-icon {
  flex-shrink: 0;
  transition: margin 0.3s ease;
}

.nav-text {
  flex: 1;
  transition: opacity 0.3s ease, width 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
}

.nav-shortcut {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: monospace;
  opacity: 0;
  transition: var(--transition-base);
}

.nav-item:hover .nav-shortcut {
  opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

/* Limit excessive spacing on tall screens */
@media (min-height: 900px) {
  .sidebar-nav {
    flex: 0 1 auto;
    max-height: calc(100vh - 400px);
  }
  
  .sidebar-footer {
    margin-top: 2rem;
  }
}

/* Even taller screens */
@media (min-height: 1100px) {
  .sidebar-nav {
    max-height: calc(100vh - 450px);
  }
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.footer-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.footer-icon {
  flex-shrink: 0;
}

.footer-text {
  flex: 1;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

/* Sidebar User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition-base);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info {
  flex: 1;
  min-width: 0;
  transition: opacity 0.3s ease, width 0.3s ease;
  overflow: hidden;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.logout-btn svg {
  stroke: currentColor;
}

.user-menu-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu-btn:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

/* ========================================
   COLLAPSED SIDEBAR STATE
   ======================================== */
.app-sidebar {
  transition: width 0.3s ease;
}

.app-sidebar.collapsed {
  width: 70px;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-text,
.app-sidebar.collapsed .nav-shortcut,
.app-sidebar.collapsed .user-info,
.app-sidebar.collapsed .user-avatar,
.app-sidebar.collapsed .sidebar-search-input,
.app-sidebar.collapsed .search-shortcut {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  display: none;
}

.app-sidebar.collapsed .sidebar-search {
  padding: 0.75rem 0.5rem;
  display: flex;
  justify-content: center;
}

.app-sidebar.collapsed .search-input-wrapper {
  width: 48px;
  height: 40px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: background 0.3s ease;
  cursor: pointer;
}

.app-sidebar.collapsed .search-input-wrapper:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-sidebar.collapsed .search-icon {
  position: static;
  margin: 0;
  width: 20px;
  height: 20px;
}

.app-sidebar.collapsed .sidebar-header {
  flex-direction: column;
  padding: 1rem 0.75rem;
  gap: 0.5rem;
  align-items: center;
}

.app-sidebar.collapsed .sidebar-brand {
  width: 100%;
  justify-content: center;
  gap: 0;
  flex: 0;
}

.app-sidebar.collapsed .sidebar-toggle-btn {
  width: 48px;
  height: 32px;
  border-radius: 6px;
}

.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0.75rem;
  gap: 0;
  margin: 0 auto;
  width: 48px;
}

.app-sidebar.collapsed .nav-icon {
  margin: 0;
}

.app-sidebar.collapsed .nav-badge {
  display: none;
}

.app-sidebar.collapsed .sidebar-user {
  justify-content: center;
  padding: 0.75rem;
  gap: 0;
  margin: 0 auto;
  width: 48px;
}

.app-sidebar.collapsed .logout-btn {
  opacity: 1;
  display: flex;
  width: auto;
  pointer-events: auto;
  margin: 0;
  padding: 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.app-sidebar.collapsed .logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Adjust main content when sidebar is collapsed */
.app-sidebar.collapsed ~ .top-navbar {
  left: 70px;
}

.app-sidebar.collapsed ~ .top-navbar ~ .app-main-content {
  margin-left: 70px;
}

.app-main-content {
  transition: margin-left 0.3s ease;
}

/* Tooltip styles for collapsed sidebar */
.app-sidebar.collapsed .nav-item {
  position: relative;
}

.app-sidebar.collapsed .nav-item:hover::after,
.app-sidebar.collapsed .search-input-wrapper:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  margin-left: 0.5rem;
  font-size: 0.875rem;
  z-index: 1000;
  pointer-events: none;
  animation: tooltipFadeIn 0.2s ease;
}

.app-sidebar.collapsed .search-input-wrapper {
  position: relative;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Responsive Sidebar */
/* Tablets and smaller laptops (768px - 1024px) */
@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 1001;
  }
  
  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }
  
  .top-navbar {
    left: 0 !important;
  }
  
  .app-main-content {
    margin-left: 0 !important;
  }
  
  /* Ensure overlay is visible when sidebar is open */
  #sidebarOverlay {
    z-index: 1000;
  }
  
  /* Don't apply collapsed state on tablets/mobile */
  .app-sidebar.collapsed {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .app-sidebar.collapsed.show {
    transform: translateX(0);
  }

  /*
   * Desktop "collapsed" hides labels (icon rail). On ≤1024px the drawer must always
   * show full labels — the global .collapsed rules still matched and hid .nav-text.
   * Reset collapsed chrome to match the expanded sidebar layout.
   */
  .app-sidebar.collapsed .brand-text,
  .app-sidebar.collapsed .nav-text,
  .app-sidebar.collapsed .nav-shortcut,
  .app-sidebar.collapsed .user-info,
  .app-sidebar.collapsed .sidebar-search-input,
  .app-sidebar.collapsed .search-shortcut {
    display: revert !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  /* img.user-avatar: avoid overflow:visible (Chrome view-transitions / replaced-element warning) */
  .app-sidebar.collapsed .user-avatar {
    display: revert !important;
    opacity: 1 !important;
    width: 50px !important;
    height: 50px !important;
    max-width: none !important;
    overflow: hidden !important;
    pointer-events: auto !important;
  }

  .app-sidebar.collapsed .sidebar-search {
    padding: 1rem !important;
    display: block !important;
    justify-content: initial !important;
  }

  .app-sidebar.collapsed .search-input-wrapper {
    width: 100% !important;
    height: auto !important;
    justify-content: flex-start !important;
    background: transparent !important;
    cursor: text !important;
  }

  .app-sidebar.collapsed .search-icon {
    position: absolute !important;
    left: 0.75rem !important;
    margin: 0 !important;
  }

  .app-sidebar.collapsed .sidebar-header {
    flex-direction: row !important;
    align-items: center !important;
    padding: 1.25rem 1rem !important;
    gap: unset !important;
  }

  .app-sidebar.collapsed .sidebar-brand {
    width: auto !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    flex: 1 !important;
  }

  .app-sidebar.collapsed .sidebar-toggle-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .app-sidebar.collapsed .nav-item {
    justify-content: flex-start !important;
    padding: 0.625rem 0.75rem !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .app-sidebar.collapsed .nav-icon {
    margin: 0 !important;
  }

  .app-sidebar.collapsed .sidebar-user {
    justify-content: flex-start !important;
    padding: 0.75rem !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .app-sidebar.collapsed .logout-btn {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .app-sidebar.collapsed .nav-item:hover::after,
  .app-sidebar.collapsed .search-input-wrapper:hover::after {
    content: none !important;
    display: none !important;
  }
}

/* Mobile phones (below 768px) */
@media (max-width: 768px) {
  .app-sidebar {
    width: 280px;
  }
}

/* ========================================
   BUTTONS - Modern Glassmorphism Design
   ======================================== */
.btn {
  border-radius: 6px !important;
  padding: 0.55rem 1.25rem !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: none !important;
  line-height: 1.5 !important;
  /* TEST: If you see this comment in browser inspector, CSS is loading */
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-white) !important;
  text-transform: uppercase !important; /* TEST MARKER */
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--text-white) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

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

.btn-outline-primary:hover {
  background-color: rgba(10, 46, 92, 0.05) !important;
  border-color: var(--primary-dark) !important;
  color: var(--primary-dark) !important;
  transform: translateY(-2px) !important;
}

.btn-outline-dark {
  background: rgba(241, 245, 249, 0.6) !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
}

.btn-outline-dark:hover {
  background: rgba(230, 240, 255, 0.8) !important;
  color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

.btn-outline-light {
  background: rgba(248, 250, 252, 0.6) !important;
  color: var(--text-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--primary-color) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

.btn-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.85rem !important;
}

.btn-lg {
  padding: 0.55rem 1.5rem !important;
  font-size: 0.875rem !important;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ========================================
   CARDS - Modern White Cards with Shadows
   ======================================== */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  overflow: visible;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover) !important;
}

/* Ensure card with active dropdown appears on top */
.card:has(.dropdown-menu.show) {
  position: relative;
  z-index: 10000;
}

.card-body {
  overflow: visible;
}

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

.card-header.bg-primary,
.card-header.bg-dark {
  background: var(--primary-color) !important;
  color: var(--text-white) !important;
  border-bottom: none !important;
}

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

.card-footer.bg-primary,
.card-footer.bg-dark {
  background: var(--primary-color) !important;
  color: var(--text-white) !important;
  border-top: none !important;
}

.card-body {
  padding: 1rem;
  font-size: 0.8125rem;
}

.card-title {
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin-bottom: 0.5rem !important;
}

/* Stats Cards - Override for gradient backgrounds */
.stats-card {
  background: none !important;
}

/* Course Cards - Special Styling */
.cd {
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color);
  background: var(--bg-white) !important;
}

.cd:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl) !important;
}

.cd .card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
  color: var(--text-white) !important;
  border: none !important;
}

.cd .card-footer {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%) !important;
  color: var(--text-white) !important;
  border: none !important;
}

/* ======================================== 
   DROPDOWN MENUS - Bootstrap Override
   ======================================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  transition: var(--transition-base);
}

.dropdown-toggle:hover {
  background: rgba(10, 46, 92, 0.05);
}

.dropdown-menu {
  position: absolute;
  min-width: 220px;
  padding: 0.5rem 0;
  margin: 0.5rem 0 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 46, 92, 0.15);
  z-index: 9999;
}

.dropdown-menu.show {
  display: block;
  z-index: 9999;
}

.dropdown-item,
.dropdown-menu li a,
.dropdown-menu li .dropdown-item {
  display: flex;
  align-items: center;
  width: calc(100% - 1rem);
  padding: 0.75rem 1.25rem;
  clear: both;
  font-weight: 500;
  color: var(--text-primary);
  text-align: inherit;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  border-radius: 8px;
  margin: 0 0.5rem;
  transition: var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9375rem;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  color: var(--primary-color);
  background-color: rgba(10, 46, 92, 0.05);
  transform: translateX(4px);
}

.dropdown-item:active,
.dropdown-menu li a:active {
  color: var(--text-white);
  background-color: var(--primary-color);
}

.dropdown-item svg,
.dropdown-item .bi,
.dropdown-menu li a svg,
.dropdown-menu li a .bi {
  margin-right: 0.75rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.dropdown-divider {
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid var(--border-light);
}

/* Dropdown Menu Animations */
@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   FORMS - Modern Input Styling
   ======================================== */
.form-control,
.form-select,
.searchbar {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.5rem 0.875rem !important;
  font-size: 0.8125rem !important;
  transition: var(--transition-base);
  background-color: var(--bg-white) !important;
  color: var(--text-primary) !important;
}

.form-control:focus,
.form-select:focus,
.searchbar:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(10, 46, 92, 0.1) !important;
  outline: none !important;
}

.form-control:hover,
.form-select:hover {
  border-color: var(--primary-light) !important;
}

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

.form-border {
  border: 2px solid var(--primary-color) !important;
}

/* ========================================
   TABLES - Modern Professional Tables
   ======================================== */
.table {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead:not(.table-light) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--text-white);
}

.table thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.875rem !important;
}

.table thead:not(.table-light) th {
  border: none;
}

.table tbody tr {
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
  background-color: rgba(10, 46, 92, 0.02);
}

.table tbody td {
  padding: 0.875rem !important;
  vertical-align: middle !important;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.table tbody tr:last-child {
  border-bottom: none;
}

th,
td {
  vertical-align: middle !important;
}

/* ========================================
   BADGES - Modern Status Indicators
   ======================================== */
.badge {
  font-weight: 500 !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 50px !important;
  font-size: 0.6875rem !important;
  letter-spacing: 0.3px;
}

.badge.bg-primary {
  background: var(--info-bg) !important;
  color: var(--info-color) !important;
}

.badge.bg-success {
  background: var(--success-bg) !important;
  color: var(--success-color) !important;
}

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

.badge.bg-warning {
  background: var(--warning-bg) !important;
  color: var(--warning-color) !important;
}

/* ========================================
   SHADOWS - Utility Classes
   ======================================== */
.shadow {
  box-shadow: var(--shadow-md) !important;
}

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

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

.login-shadow {
  box-shadow: var(--shadow-xl);
}

/* ========================================
   BREADCRUMBS - Modern Navigation
   ======================================== */
.breadcrumb {
  background: var(--bg-white) !important;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1.25rem !important;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
}

.breadcrumb-item {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
}

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

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

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */
.alert {
  border-radius: var(--radius-md) !important;
  border: none !important;
  padding: 1rem 1.25rem !important;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

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

.alert-success {
  background: var(--success-bg) !important;
  color: var(--success-color) !important;
}

.alert-warning {
  background: var(--warning-bg) !important;
  color: var(--warning-color) !important;
}

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

/* ========================================
   CONTAINERS & SPACING
   ======================================== */
.container {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.container-announcement {
  max-width: 40vw;
  min-width: 380px;
}

.margin-mod {
  padding-top: 4.5rem;
}

.margin-p-bottom {
  margin-bottom: 0.5rem !important;
}

.margin-p-top {
  margin-top: 0.5rem !important;
}

/* ========================================
   PROFILE & SPECIAL ELEMENTS
   ======================================== */
.profile {
  width: 50%;
  min-width: fit-content;
  height: 40vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.timer {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  color: var(--primary-color);
}

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */
.login {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(10, 46, 92, 0.05) 0%, rgba(33, 150, 243, 0.05) 100%);
}

.login-heading {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.btn-login {
  font-size: 0.9rem;
  letter-spacing: 0.05rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

/* ========================================
   GRADIENT BACKGROUNDS
   ======================================== */
.liner-gradient-sky {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2196F3 100%);
}

.liner-gradient-margo {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.gradBg {
  background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
  color: var(--primary-color);
}

/* ========================================
   BROADCAST MESSAGES - Modern Style
   ======================================== */
.rounded.border-warning,
.rounded.border-success,
.rounded.border-primary {
  background: var(--bg-white) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 1.5rem !important;
}

.rounded.border-warning .fw-bold,
.rounded.border-success .fw-bold,
.rounded.border-primary .fw-bold {
  color: var(--primary-color) !important;
}

.rounded a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-base);
}

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

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

.rounded hr {
  border-color: var(--border-light) !important;
  opacity: 1 !important;
}

/* ========================================
   UTILITIES
   ======================================== */
.inline-icons {
  vertical-align: bottom;
}

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

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.border-primary-custom {
  border-color: var(--primary-color) !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .card {
    border-radius: var(--radius-sm) !important;
    margin-bottom: 1rem !important;
  }
  
  .card-header,
  .card-footer {
    padding: 1rem !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
  }
  
  .navbar-brand {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 576px) {
  .profile {
    width: 90%;
    height: auto;
    min-height: 30vh;
  }
  
  .container-announcement {
    min-width: 100%;
    max-width: 100%;
  }
  
  .cd {
    width: 100% !important;
    margin: 1rem 0 !important;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease;
}

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

.animate-slide-in {
  animation: slideIn 0.4s ease;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
  }
  
  .card:hover {
    transform: none !important;
  }
  
  .navbar,
  .btn,
  .breadcrumb {
    display: none !important;
  }
}

/* ========================================
   DROPDOWN FIX - MAXIMUM SPECIFICITY OVERRIDE
   Applied at end of file to ensure highest priority
   ======================================== */
ul.dropdown-menu {
  background-color: #ffffff !important;
  color: #2c3e50 !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(10, 46, 92, 0.15) !important;
  padding: 0.5rem 0 !important;
  min-width: 220px !important;
}

ul.dropdown-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

ul.dropdown-menu li a.dropdown-item {
  display: flex !important;
  align-items: center !important;
  padding: 0.75rem 1.25rem !important;
  color: #2c3e50 !important;
  background-color: transparent !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  border-radius: 8px !important;
  margin: 0 0.5rem !important;
  width: calc(100% - 1rem) !important;
}

ul.dropdown-menu li a.dropdown-item:hover {
  color: #0a2e5c !important;
  background-color: rgba(10, 46, 92, 0.05) !important;
  transform: translateX(4px) !important;
}

ul.dropdown-menu li a.dropdown-item svg,
ul.dropdown-menu li a.dropdown-item .bi {
  color: #0a2e5c !important;
  margin-right: 0.75rem !important;
  flex-shrink: 0 !important;
}

/* Mobile Responsive */

/* ========================================
   USER TYPE SPECIFIC STYLES
   ======================================== */
/* Hide gamification nav for coaches */
body[data-user-type="coach"] .gamification-nav-section {
  display: none !important;
}

/* Hide certificates nav for coaches */
body[data-user-type="coach"] .certificates-nav-section {
  display: none !important;
}
