/* ========================================
   SGT FLOW - MODERN THEME
   Color Palette:
   - Primary Teal: #2EC4B6
   - Secondary Cyan: #5DD3D0
   - Deep Navy: #001A4D
   - White: #FFFFFF
   - Accent Lime: #C5D93D
   ======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES & ANIMATIONS
   ======================================== */
:root {
    /* Timing functions for smooth animations */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    
    /* Animation durations */
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;
    --duration-slower: 0.8s;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 26, 77, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 26, 77, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 26, 77, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 26, 77, 0.2);
    --shadow-glow: 0 0 20px rgba(46, 196, 182, 0.4);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ========================================
   LIGHT THEME
   ======================================== */
body.light-theme {
    --background-color: #F8FAFB;
    --text-color: #1a2a3a;
    --text-muted: #5a6a7a;
    --card-bg: #ffffff;
    --border-color: rgba(0, 26, 77, 0.1);
    --sidebar-bg: #001A4D;
    --sidebar-hover: #002266;
    --sidebar-active: #2EC4B6;
    --navbar-bg: #001A4D;
    --sidebar-text: #ffffff;
    --navbar-text: #ffffff;
    --input-bg: #ffffff;
    --input-border: rgba(0, 26, 77, 0.15);
    --accent-color: #2EC4B6;
    --secondary-accent: #C5D93D;
    --primary-color: #2EC4B6;
    --primary-color-rgb: 46, 196, 182;
    --accent-color-rgb: 46, 196, 182;
    --secondary-accent-rgb: 197, 217, 61;
    --navy-color: #001A4D;
    --navy-color-rgb: 0, 26, 77;
    --cyan-color: #5DD3D0;
    --cyan-color-rgb: 93, 211, 208;
    
    /* Gradient backgrounds */
    --gradient-primary: linear-gradient(135deg, #2EC4B6 0%, #5DD3D0 100%);
    --gradient-accent: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%);
    --gradient-navy: linear-gradient(135deg, #001A4D 0%, #002266 100%);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
}

/* ========================================
   DARK THEME
   ======================================== */
body.dark-theme {
    --background-color: #0a1628;
    --text-color: #e8eef4;
    --text-muted: #8a9aaa;
    --card-bg: #122236;
    --border-color: rgba(46, 196, 182, 0.15);
    --sidebar-bg: #061020;
    --sidebar-hover: #0d1f35;
    --sidebar-active: #2EC4B6;
    --navbar-bg: #061020;
    --sidebar-text: #e8eef4;
    --navbar-text: #e8eef4;
    --input-bg: #1a2d45;
    --input-border: rgba(46, 196, 182, 0.2);
    --accent-color: #2EC4B6;
    --secondary-accent: #C5D93D;
    --primary-color: #2EC4B6;
    --primary-color-rgb: 46, 196, 182;
    --accent-color-rgb: 46, 196, 182;
    --secondary-accent-rgb: 197, 217, 61;
    --navy-color: #001A4D;
    --navy-color-rgb: 0, 26, 77;
    --cyan-color: #5DD3D0;
    --cyan-color-rgb: 93, 211, 208;
    
    /* Gradient backgrounds */
    --gradient-primary: linear-gradient(135deg, #2EC4B6 0%, #5DD3D0 100%);
    --gradient-accent: linear-gradient(135deg, #C5D93D 0%, #a8c41a 100%);
    --gradient-navy: linear-gradient(135deg, #0a1628 0%, #122236 100%);
    --gradient-card: linear-gradient(180deg, #122236 0%, #0d1a2d 100%);
}

/* ========================================
   BASE STYLES & TRANSITIONS
   ======================================== */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color var(--duration-slow) var(--ease-smooth),
                color var(--duration-slow) var(--ease-smooth);
}

/* Universal smooth transitions */
*, *::before, *::after {
    transition-property: background-color, border-color, color;
    transition-duration: var(--duration-normal);
    transition-timing-function: var(--ease-smooth);
}

/* ========================================
   NAVBAR STYLES
   ======================================== */
.navbar {
    background: var(--gradient-navy);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1030;
    overflow: visible;
}

body.dark-theme #sidebarToggle,
body.dark-theme #userDropdown,
body.dark-theme .navbar .btn-link,
body.dark-theme .navbar .fas,
body.light-theme #sidebarToggle,
body.light-theme #userDropdown,
body.light-theme .navbar .btn-link,
body.light-theme .navbar .fas {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-theme #sidebarToggle:hover,
body.dark-theme #userDropdown:hover,
body.dark-theme .navbar .btn-link:hover,
body.light-theme #sidebarToggle:hover,
body.light-theme #userDropdown:hover,
body.light-theme .navbar .btn-link:hover {
    color: var(--accent-color) !important;
}

/* Remove underlines from navbar buttons */
.navbar .btn-link,
.navbar .btn-link:hover,
.navbar .btn-link:focus,
#theme-toggle,
#theme-toggle:hover,
#theme-toggle:focus,
#notificationDropdown,
#notificationDropdown:hover,
#notificationDropdown:focus {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Fix user dropdown spacing */
#userDropdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    white-space: nowrap;
    overflow: visible !important;
    position: relative;
    line-height: 1.5;
}

#userDropdown .badge {
    margin-left: 2px;
    flex-shrink: 0;
}

/* Ensure dropdown arrow doesn't clip with name */
#userDropdown::after {
    display: inline-block !important;
    content: '' !important;
    border-top: 0.3em solid !important;
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
    position: static !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    flex-shrink: 0 !important;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */
#sidebar-wrapper {
    background: var(--gradient-navy);
    box-shadow: var(--shadow-lg);
    transition: margin var(--duration-slow) var(--ease-out-expo),
                transform var(--duration-slow) var(--ease-out-expo);
    overflow: hidden;
}

#sidebar-wrapper .sidebar-heading,
#sidebar-wrapper .list-group-item,
#sidebar-wrapper .sidebar-subheading,
#sidebar-wrapper a {
    color: white !important;
    transition: all var(--duration-normal) var(--ease-smooth);
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    border: none;
    position: relative;
    overflow: visible;
    border-right: none !important;
    margin-right: 0;
    width: 100%;
}

/* Animated gradient background on hover */
#sidebar-wrapper .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.25) 0%, rgba(93, 211, 208, 0.1) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Accent bar on the left */
#sidebar-wrapper .list-group-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #2EC4B6 0%, #C5D93D 100%);
    border-radius: 0 4px 4px 0;
    transform: translateY(-50%);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

#sidebar-wrapper .list-group-item:hover::before {
    transform: translateX(0);
}

#sidebar-wrapper .list-group-item:hover::after {
    height: 60%;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(46, 196, 182, 0.08);
    color: white !important;
    padding-left: 1.5rem;
}

/* Sidebar item text and icon container */
#sidebar-wrapper .list-group-item i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                color 0.3s ease;
}

#sidebar-wrapper .list-group-item span,
#sidebar-wrapper .list-group-item {
    position: relative;
    z-index: 2;
}

#sidebar-wrapper .list-group-item:hover i {
    transform: scale(1.15) rotate(-5deg);
    color: #C5D93D !important;
}

/* Active sidebar item with accent glow */
#sidebar-wrapper .list-group-item.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: 0 4px 20px rgba(46, 196, 182, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin: 4px 8px;
    width: calc(100% - 16px);
    padding-left: 1.25rem;
}

#sidebar-wrapper .list-group-item.active::before,
#sidebar-wrapper .list-group-item.active::after {
    display: none;
}

#sidebar-wrapper .list-group-item.active i {
    color: white !important;
    animation: activeIconPulse 2s ease-in-out infinite;
}

@keyframes activeIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

Badge animation in sidebar
#sidebar-wrapper .badge {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#sidebar-wrapper .list-group-item:hover .badge {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(197, 217, 61, 0.4);
}

/* Light theme sidebar */
body.light-theme #sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    border-right: none !important;
}

body.light-theme #sidebar-wrapper i,
body.light-theme #sidebar-wrapper .fa,
body.light-theme #sidebar-wrapper .fas,
body.light-theme #sidebar-wrapper .far {
    color: white !important;
}

body.light-theme #sidebar-wrapper .list-group-item:hover i {
    color: #C5D93D !important;
}

/* Dark theme sidebar */
body.dark-theme #sidebar-wrapper .list-group-item {
    border-right: none !important;
    overflow: visible;
}

/* Ensure sidebar notification/message badges are visible in both themes */
#sidebar-wrapper .badge.bg-accent,
#sidebar-wrapper .badge.notification-sidebar-count,
#sidebar-wrapper .badge.unread-count {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.7rem;
    min-width: 20px;
    text-align: center;
    z-index: 1;
    position: relative;
    flex-shrink: 0;
    margin-right: auto;
}

body.dark-theme #sidebar-wrapper .badge.bg-accent,
body.dark-theme #sidebar-wrapper .badge.notification-sidebar-count,
body.dark-theme #sidebar-wrapper .badge.unread-count {
    background: linear-gradient(135deg, #2EC4B6 0%, #5DD3D0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(46, 196, 182, 0.5);
}

/* Sidebar list group */
#sidebar-wrapper .list-group {
    overflow: visible;
}

#sidebar-wrapper .list-group-flush {
    border-right: none !important;
}

/* Sidebar divider with gradient */
.sidebar-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(46, 196, 182, 0.3) 50%, transparent 100%);
    margin: 1rem 1.25rem;
}

/* Sidebar subheading */
.sidebar-subheading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(46, 196, 182, 0.7) !important;
    padding: 0.75rem 1.25rem 0.5rem;
    position: relative;
}

.sidebar-subheading::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #2EC4B6 0%, transparent 100%);
    border-radius: 2px;
}

/* ========================================
   CARD STYLES
   ======================================== */
.card {
    background: var(--gradient-card);
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Featured card with accent border */
.card.featured {
    border-left: 4px solid var(--accent-color);
}

.card.highlight {
    border-top: 4px solid var(--secondary-accent);
}

/* ========================================
   BUTTON STYLES
   ======================================== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-smooth);
}

/* Button ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s var(--ease-out-expo), height 0.6s var(--ease-out-expo);
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Primary button with gradient */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 196, 182, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #26a89c 0%, #4dc4c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 196, 182, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary button */
.btn-secondary {
    background: var(--navy-color);
    border: none;
    color: white;
}

.btn-secondary:hover {
    background: #002266;
    transform: translateY(-2px);
    color: white;
}

/* Outline buttons */
.btn-outline-primary {
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: var(--secondary-accent);
    border: 2px solid var(--secondary-accent);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gradient-accent);
    border-color: var(--secondary-accent);
    color: var(--navy-color);
    transform: translateY(-2px);
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-control, .form-select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 2px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--duration-normal) var(--ease-smooth);
}

.form-control:focus, .form-select:focus {
    background-color: var(--input-bg);
    color: var(--text-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

body.dark-theme .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Form labels */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* ========================================
   DROPDOWN STYLES
   ======================================== */
.dropdown-menu {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    animation: dropdownFadeIn 0.2s ease-out;
    z-index: 1050 !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: var(--text-color);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.dropdown-item:hover, .dropdown-item:focus {
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.15) 0%, transparent 100%);
    color: var(--accent-color);
    padding-left: 1.25rem;
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

/* Dropdown menu container needs proper z-index */
.dropdown {
    position: relative;
}

.dropdown.show .dropdown-menu {
    z-index: 1050 !important;
}

/* Notification dropdown specific */
.notification-menu {
    position: relative;
    overflow: visible;
}

.notification-menu .btn-link {
    overflow: visible;
}

.notification-menu .dropdown-menu {
    z-index: 1050 !important;
}

body.dark-theme .dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .dropdown-item {
    color: var(--text-color);
}

body.dark-theme .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(46, 196, 182, 0.2) 0%, transparent 100%);
    color: var(--accent-color);
}

body.dark-theme .dropdown-item-text {
    color: var(--text-muted);
}

/* ========================================
   TABLE STYLES
   ======================================== */
.table {
    color: var(--text-color);
}

.table thead th {
    background: var(--gradient-navy);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    transition: all var(--duration-normal) var(--ease-smooth);
}

.table tbody tr:hover {
    background-color: rgba(46, 196, 182, 0.08) !important;
    transform: scale(1.005);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

body.dark-theme .table,
body.dark-theme .table td,
body.dark-theme .table th,
body.dark-theme .table tr {
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(46, 196, 182, 0.1) !important;
}

body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(46, 196, 182, 0.05);
}

/* ========================================
   LIST GROUP STYLES
   ======================================== */
.list-group-item {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.list-group-item:hover {
    background-color: rgba(46, 196, 182, 0.08);
    transform: translateX(4px);
}

.list-group-item.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--accent-color);
}

body.dark-theme .list-group-item {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-theme .list-group-item:hover {
    background-color: rgba(46, 196, 182, 0.1);
}

body.dark-theme .list-group-item.active {
    background: var(--gradient-primary);
    color: white;
}

body.dark-theme .list-group-item .text-muted {
    color: var(--text-muted) !important;
}

/* ========================================
   BADGE STYLES
   ======================================== */
.badge {
    font-weight: 500;
    padding: 0.5em 0.85em;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.badge:hover {
    transform: scale(1.05);
}

.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-accent {
    background: var(--gradient-primary) !important;
}

.bg-secondary-accent {
    background: var(--gradient-accent) !important;
    color: var(--navy-color) !important;
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--duration-slow) var(--ease-out-expo);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

body.dark-theme .modal-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .modal-header .btn-close {
    filter: invert(1);
}

/* ========================================
   TOAST & NOTIFICATION STYLES
   ======================================== */
.toast {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.toast-header {
    background: var(--gradient-navy);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

body.dark-theme .toast {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body.dark-theme .toast-header .btn-close {
    filter: invert(1);
}

/* ========================================
   MESSAGE STYLES
   ======================================== */
.message-received {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(46, 196, 182, 0.1) 100%);
    border-left: 3px solid var(--accent-color);
}

.message-sent {
    background: var(--gradient-primary);
    color: white;
}

body.dark-theme .message-received {
    background: linear-gradient(135deg, var(--sidebar-hover) 0%, rgba(46, 196, 182, 0.15) 100%);
}

.message-timestamp {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ========================================
   ALERT STYLES
   ======================================== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    animation: alertSlideIn var(--duration-normal) var(--ease-out-expo);
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.15) 0%, rgba(93, 211, 208, 0.1) 100%);
    color: #1a8a7e;
    border-left: 4px solid var(--accent-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #a71d2a;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(197, 217, 61, 0.2) 0%, rgba(197, 217, 61, 0.1) 100%);
    color: #856404;
    border-left: 4px solid var(--secondary-accent);
}

.alert-info {
    background: linear-gradient(135deg, rgba(93, 211, 208, 0.15) 0%, rgba(46, 196, 182, 0.1) 100%);
    color: #0c5460;
    border-left: 4px solid var(--cyan-color);
}

body.dark-theme .alert-success {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.2) 0%, rgba(93, 211, 208, 0.1) 100%);
    color: #5DD3D0;
}

body.dark-theme .alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #f8b4b4;
}

body.dark-theme .alert-warning {
    background: linear-gradient(135deg, rgba(197, 217, 61, 0.2) 0%, rgba(197, 217, 61, 0.1) 100%);
    color: #C5D93D;
}

body.dark-theme .alert-info {
    background: linear-gradient(135deg, rgba(93, 211, 208, 0.2) 0%, rgba(46, 196, 182, 0.1) 100%);
    color: #5DD3D0;
}

/* ========================================
   THEME TOGGLE STYLES
   ======================================== */
#theme-toggle {
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: none !important;
    background: transparent;
}

#theme-toggle:hover {
    background: rgba(46, 196, 182, 0.2);
    text-decoration: none !important;
}

#theme-toggle:focus {
    text-decoration: none !important;
    outline: none;
    box-shadow: none !important;
}

.moon-icon, .sun-icon {
    font-size: 1.25rem;
}

/* Theme toggle wrapper */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
}

/* ========================================
   SCROLLBAR STYLES
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--background-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #26a89c 0%, #4dc4c1 100%);
}

/* ========================================
   SELECTION STYLES
   ======================================== */
::selection {
    background: rgba(46, 196, 182, 0.3);
    color: var(--text-color);
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        var(--card-bg) 0%,
        rgba(46, 196, 182, 0.1) 50%,
        var(--card-bg) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-accent {
    color: var(--accent-color) !important;
}

.text-secondary-accent {
    color: var(--secondary-accent) !important;
}

.text-navy {
    color: var(--navy-color) !important;
}

.text-cyan {
    color: var(--cyan-color) !important;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-accent {
    background: var(--gradient-accent) !important;
}

.bg-gradient-navy {
    background: var(--gradient-navy) !important;
}

.glow {
    box-shadow: var(--shadow-glow);
}

.glow-hover:hover {
    box-shadow: var(--shadow-glow);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 767.98px) {
    .badge {
        display: inline-block;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        padding: 0.35rem 0.6rem;
    }
}

/* ========================================
   DARK THEME SPECIFIC OVERRIDES
   ======================================== */
body.dark-theme .text-muted,
body.dark-theme .form-text,
body.dark-theme small {
    color: var(--text-muted) !important;
}

body.dark-theme a:hover,
body.dark-theme .btn:hover,
body.dark-theme .nav-link:hover {
    color: var(--accent-color);
}

/* User dropdown in navbar */
body.light-theme .navbar .dropdown-toggle,
body.dark-theme .navbar .dropdown-toggle {
    color: white !important;
}

body.light-theme .navbar .dropdown-toggle:hover,
body.dark-theme .navbar .dropdown-toggle:hover {
    color: var(--accent-color) !important;
}

/* Fix urgent request rows */
body.dark-theme .table-danger,
body.dark-theme tr.table-danger td {
    background-color: rgba(220, 53, 69, 0.25) !important;
    color: #fff !important;
}

body.dark-theme .table-danger:hover td {
    background-color: rgba(220, 53, 69, 0.35) !important;
}
/* ========================================
   NAVBAR ITEMS - RESET & HOVER EFFECTS
   Prevents zoom/scale/jitter bugs
   ======================================== */

/* Kill transitions/transforms/animations on all navbar interactive elements */
.navbar .btn,
.navbar .btn-link,
.navbar .dropdown-toggle,
.navbar .dropdown,
.navbar .notification-menu,
#notificationDropdown,
#theme-toggle,
#userDropdown,
#sidebarToggle,
#notificationDropdown *,
#theme-toggle *,
#userDropdown *,
#sidebarToggle * {
    transition: background 0.25s ease, color 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    animation: none !important;
    outline: none !important;
    outline-offset: 0 !important;
}

/* Kill ::before (shine) and ::after (ripple) on navbar buttons */
.navbar .btn::before,
.navbar .btn-link::before,
#notificationDropdown::before,
#notificationDropdown::after,
#theme-toggle::before,
#theme-toggle::after,
#sidebarToggle::before,
#sidebarToggle::after,
#userDropdown::before {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Re-allow dropdown menu animation only */
.navbar .dropdown-menu {
    animation: dropdownFadeIn 0.2s ease-out !important;
}
.navbar .dropdown-menu.notification-dropdown {
    animation: dropdownSlide 0.2s ease-out !important;
}
#notificationDropdown.has-unread {
    animation: bellWiggle 0.5s ease-in-out !important;
}

/* ---- Common navbar item base ---- */
#notificationDropdown,
#theme-toggle,
#userDropdown {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none !important;
    transform: scale(1) !important;
}

/* ---- Notification Bell ---- */
#notificationDropdown {
    width: 44px;
    height: 44px;
    border-radius: 12px !important;
}
#notificationDropdown:hover {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.2), rgba(197, 217, 61, 0.15)) !important;
    transform: scale(1.1) !important;
}
#notificationDropdown:hover i {
    color: var(--accent-color) !important;
}
#notificationDropdown:active {
    transform: scale(0.95) !important;
}

/* ---- Theme Toggle ---- */
#theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
}
#theme-toggle:hover {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.2), rgba(197, 217, 61, 0.15)) !important;
    transform: scale(1.1) !important;
}
#theme-toggle:hover i {
    color: var(--accent-color) !important;
}
#theme-toggle:active {
    transform: scale(0.95) !important;
}

/* ---- User Dropdown ---- */
#userDropdown {
    display: inline-flex !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    overflow: visible !important;
    white-space: nowrap;
    line-height: 1.5;
    position: relative;
}
#userDropdown:hover {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.2), rgba(197, 217, 61, 0.15)) !important;
    transform: scale(1.05) !important;
}
#userDropdown:hover,
#userDropdown:hover i,
#userDropdown:hover span:not(.badge) {
    color: var(--accent-color) !important;
}
#userDropdown:active {
    transform: scale(0.95) !important;
}

/* Dropdown caret arrow (Bootstrap ::after) - full reset */
#userDropdown::after {
    display: inline-block !important;
    content: '' !important;
    border-top: 0.3em solid !important;
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
    vertical-align: middle !important;
    margin-left: 6px !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border-radius: 0 !important;
    position: static !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    flex-shrink: 0 !important;
}

/* User dropdown parent must not clip */
.navbar .dropdown {
    overflow: visible !important;
    position: relative !important;
}

/* ---- Focus: none for navbar ---- */
#notificationDropdown:focus,
#notificationDropdown:focus-visible,
#theme-toggle:focus,
#theme-toggle:focus-visible,
#userDropdown:focus,
#userDropdown:focus-visible,
#sidebarToggle:focus,
#sidebarToggle:focus-visible,
.navbar .dropdown:focus,
.navbar .dropdown:focus-within,
.navbar .dropdown:focus-visible,
.navbar .dropdown-menu:focus,
.navbar .dropdown-menu:focus-within {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    border-color: transparent !important;
}