/* ============================================================
   MODERN THEME - REFINED DESIGN SYSTEM
   Based on contemporary UI patterns and accessibility standards
   ============================================================ */

/* ============================================================
   CSS VARIABLES - REFINED COLOR PALETTE
   ============================================================ */
:root {
    /* Primary Brand Colors - Deep Blue Theme */
    --primary-color: #27983A;
    --primary-color-dark: #165420;
    --primary-color-light: #39DB54;
    --primary-color-lighter: #95d198;
    --primary-color-lightest: #B6F8C1;

    /* Secondary Colors */
    --secondary-color: #39B807;
    --secondary-color-dark: #165420;
    --secondary-color-light: #39B807;
    --secondary-color-lighter: #39B807;

    /* Accent Colors */
    --accent-emerald: #059669;
    --accent-emerald-light: #10b981;
    --accent-emerald-lighter: #d1fae5;

    --accent-amber: #d97706;
    --accent-amber-light: #f59e0b;
    --accent-amber-lighter: #fef3c7;

    --accent-rose: #e11d48;
    --accent-rose-light: #f43f5e;
    --accent-rose-lighter: #fecdd3;

    /* Sidebar Colors */
    --sidebar-bg: #ffffff;
    --sidebar-text: #64748b;
    --sidebar-text-active: #0f172a;
    --sidebar-hover-bg: #f8fafc;
    --sidebar-active-bg: var(--primary-color-lightest);
    --sidebar-border: #e2e8f0;

    /* Neutral Grays - Improved contrast */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Status Colors */
    --success: var(--accent-emerald);
    --warning: var(--accent-amber);
    --danger: var(--accent-rose);
    --info: var(--primary-color-light);

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    /* Border & Shadow - Enhanced depth */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);

    /* Spacing */
    --sidebar-width: 256px;
    --topbar-height: 68px;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /*    Gradient*/
    --auth-gradient: linear-gradient(135deg, #ffffff 0%, #ffffff 60%)
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-700);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 14px;
}

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

/* ============================================================
   LAYOUT - SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 0px solid var(--sidebar-border);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

/* Mobile responsiveness for sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
}

.sidebar-header {
    padding-top: 1.2rem;
    padding-left: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: white;
    color: var(--gray-900);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar-brand {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: white;
    margin: 0;
    letter-spacing: -0.025em;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-weight-medium);
}

/* Navigation */
.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.075em;
    padding: 0.5rem 1.25rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    list-style: none;
    margin: 0 0 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-md);
    margin: 0 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link i {
    width: 20px;
    font-size: 18px;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--primary-color-light);
    transform: translateX(2px);
}

.nav-link:hover i {
    color: var(--primary-color-light);
}

.nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--primary-color-dark);
    font-weight: var(--font-weight-semibold);
}

.nav-link.active i {
    color: var(--primary-color);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--primary-color);
}

.nav-link .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: var(--font-weight-semibold);
}

.badge-new {
    background: var(--accent-emerald);
    color: white;
}

.badge-count {
    background: var(--accent-rose);
    color: white;
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
}

.text-primary {
    --bs-text-opacity: 1;
    color: var(--primary-color) !important;
}

/* Sidebar Footer */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-900);
}

.user-profile:hover {
    background: var(--primary-color);
    color: white;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 16px;
    box-shadow: var(--shadow-sm);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    margin: 0;
}

.user-role {
    font-size: 12px;
    color: white;
    margin: 0;
}

/* ============================================================
   LAYOUT - MAIN CONTENT
   ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Mobile responsiveness for main wrapper */
@media (max-width: 768px) {
    .main-wrapper {
        margin-left: 0;
    }
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--sidebar-border);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.search-box {
    position: relative;
    width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-box i.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.search-box .search-shortcut {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.topbar-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.topbar-icon .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-rose);
    color: white;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   TOPBAR TITLE ALIGNMENT
   ============================================================ */
.topbar-title {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: 0.5rem;
}

.topbar-brand {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: white;
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-wrapper {
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-600);
    margin: 0 0 0.25rem 0;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

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

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.green {
    background: var(--accent-emerald-lighter);
    color: var(--accent-emerald);
}

.stat-icon.blue {
    background: #dbeafe;
    color: #1e40af;
}

.stat-icon.orange {
    background: #ffedd5;
    color: #c2410c;
}

.stat-icon.purple {
    background: #ede9fe;
    color: #6d28d9;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.stat-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), var(--secondary-color-dark));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-light));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--accent-emerald);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 13px;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
}

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

.btn:disabled:hover {
    transform: none !important;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.table-search-container {
    background:white;
    padding-bottom: 1rem;
}

.table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.table thead th {
    background: var(--primary-color);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--gray-700);
}

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

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

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-item {
    display: flex;
}

.pagination .page-link {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    background: white;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

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

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--gray-700);
    background: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-sans);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-lighter);
    background: var(--bg-primary);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-label {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.form-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--gray-700);
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 1rem center/16px 16px;
    appearance: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-sans);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-lighter);
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.input-group .form-control {
    padding-left: 2.75rem;
}

.input-group-icon {
    position: absolute;
    left: 1rem;
    color: var(--gray-400);
    z-index: 10;
    pointer-events: none;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

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

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

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

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

.badge.bg-secondary {
    background: var(--gray-300);
    color: var(--gray-700);
}

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

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #047857;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #b45309;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-body {
    padding: 1.5rem;
}

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

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted {
    color: var(--gray-500) !important;
}

.fw-bold {
    font-weight: 600 !important;
}

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

.rounded {
    border-radius: 8px !important;
}

/* ============================================================
   AUTH PAGES STYLING
   ============================================================ */
.auth-body {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    min-height: 100vh;
    font-family: var(--font-sans);
}

/* Auth page specific overrides */
.auth-body .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-weight: var(--font-weight-medium);
}

.auth-body .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), var(--secondary-color-dark));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-body .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-lighter);
}

.auth-body .card {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
}

/* ============================================================
   SIGNALR CONNECTION STATUS INDICATOR
   ============================================================ */
.signalr-status-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.signalr-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-connected {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 0 3px var(--accent-emerald-lighter);
    animation: pulse-green 2s infinite;
}

.status-reconnecting {
    background-color: var(--accent-amber);
    box-shadow: 0 0 0 3px var(--accent-amber-lighter);
    animation: pulse-amber 1s infinite;
}

.status-disconnected {
    background-color: var(--gray-400);
    box-shadow: 0 0 0 3px var(--gray-200);
}

.signalr-status-text {
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--accent-emerald-lighter);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
    }
}

@keyframes pulse-amber {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--accent-amber-lighter);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(217, 119, 6, 0);
    }
}

/* Real-time update flash animation */
@keyframes flash-update {
    0% {
        background-color: var(--accent-emerald-lighter);
    }
    100% {
        background-color: transparent;
    }
}

.realtime-update-flash {
    animation: flash-update 1s ease-out;
}

/* Toast notifications styling */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.toast-body {
    font-size: 0.9375rem;
    padding: 1rem;
}

/* ============================================================
   SIGNALR REAL-TIME UPDATE STYLES
   ============================================================ */

/* New item highlight with gradient background */
.new-item-highlight {
    background: linear-gradient(90deg, 
        rgba(16, 185, 129, 0.08) 0%, 
        rgba(16, 185, 129, 0.04) 50%, 
        transparent 100%);
    border-left: 3px solid var(--accent-emerald) !important;
    animation: slideInFromLeft 0.5s ease-out, fadeOutHighlight 10s ease-out forwards;
}

/* NEW badge styling */
.new-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.5rem;
    animation: pulseNewBadge 2s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Slide in animation for new items */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-10px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade out highlight after 10 seconds */
@keyframes fadeOutHighlight {
    0%, 90% {
        background: linear-gradient(90deg, 
            rgba(16, 185, 129, 0.08) 0%, 
            rgba(16, 185, 129, 0.04) 50%, 
            transparent 100%);
        border-left-color: var(--accent-emerald);
    }
    100% {
        background: transparent;
        border-left-color: transparent;
    }
}

/* Pulse animation for NEW badge */
@keyframes pulseNewBadge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    }
}

/* ============================================================
   GLOBAL LOADING INDICATOR STYLES
   ============================================================ */

/* Loading indicator overlay - prevents all user interactions */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

/* Loading container for centered content */
.global-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Loading icon with rotation animation */
.global-loading-icon {
    width: 80px;
    height: 80px;
    animation: spinLoad 2s linear infinite;
}

/* Truck Progress Container */
.truck-progress-container {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Truck Track/Road */
.truck-track {
    position: relative;
    height: 50px;
    /*background: linear-gradient(90deg,*/
    /*    rgba(255, 255, 255, 0.05) 0%,*/
    /*    rgba(255, 255, 255, 0.15) 50%,*/
    /*    rgba(255, 255, 255, 0.05) 100%);*/
    /*border-radius: 25px;*/
    /*border: 2px solid rgba(255, 255, 255, 0.25);*/
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Animated truck vehicle */
.truck-vehicle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    animation: driveProgress 2.2s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 0 6px rgba(57, 219, 84, 0.5));
}

/* Truck progress animation - goes to end and comes back */
@keyframes driveProgress {
    0% {
        left: 0;
    }
    50% {
        left: calc(100% - 40px);
    }
    100% {
        left: 0;
    }
}

/* Loading text styling */
.global-loading-text {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Prevent all user interactions when loading is active */
body.loading-active {
    overflow: hidden;
    pointer-events: none;
}

body.loading-active > * {
    pointer-events: none;
}

/* Loading overlay should remain interactive */
body.loading-active .global-loading-overlay {
    pointer-events: auto;
}

/* Spin animation for loading icon */
/*@keyframes spinLoad {*/
/*    from {*/
/*        transform: rotate(0deg);*/
/*    }*/
/*    to {*/
/*        transform: rotate(360deg);*/
/*    }*/
/*}*/

/* ============================================================
   PROFILE DROPDOWN MENU STYLES
   ============================================================ */

.profile-dropdown {
    position: relative;
}

.user-profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    color: inherit;
    transition: opacity 0.2s ease;
}

.user-profile-btn:hover {
    opacity: 0.8;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(39, 152, 58, 0.2);
}

.profile-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(39, 152, 58, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.profile-dropdown-menu {
    min-width: 280px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 0.5rem;
    animation: slideDown 0.15s ease-out;
}

.profile-dropdown-menu .dropdown-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color-lightest), #f0f9f0);
    border-radius: 12px 12px 0 0;
    border: none;
}

.profile-dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    transition: all 0.2s ease;
    font-weight: 500;
}

.profile-dropdown-menu .dropdown-item:hover {
    background-color: var(--primary-color-lightest);
    color: var(--primary-color-dark);
    transform: translateX(2px);
}

.profile-dropdown-menu .dropdown-item i {
    width: 18px;
    color: var(--primary-color);
}

.profile-dropdown-menu .dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.1;
}

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