/* ==================================
   TASC PAP TRACKER - 2025 DASHBOARD
   Modern, Clean Professional Design
   ================================== */

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.2);
    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px var(--primary-glow);
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    /* Borders */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fc;
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==================================
   DASHBOARD CONTAINER
   ================================== */

.dashboard-container-2025 {
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Animated Background - CLEAN & SUBTLE */
.animated-bg {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.08;
    animation: float 30s ease-in-out infinite;
    will-change: transform;
}

.orb-1 {
    width: 800px;
    height: 800px;
    top: -300px;
    left: -200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    bottom: -250px;
    right: -150px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    animation-delay: 10s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    top: 50%;
    right: 15%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation-delay: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -20px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    75% {
        transform: translate(20px, -30px) scale(1.02);
    }
}

/* ==================================
   HEADER
   ================================== */
/* Logo Styling for The Advocacy Service Center */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    max-width: 200px;
    padding: 0 10px;
}

    .logo-image img {
        width: 100%;
        height: auto;
        display: block;
        filter: brightness(1.2);
    }

.logo-icon-collapsed {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-icon-collapsed img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: brightness(1.2);
    }

/* Toggle button styling */
.toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .toggle-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

    .toggle-btn i {
        font-size: 18px;
    }

/* Collapsed sidebar adjustments */
.sidebar.collapsed {
    width: 80px;
    padding: 16px;
}

    .sidebar.collapsed .sidebar-header {
        flex-direction: column;
        gap: 16px;
    }

    .sidebar.collapsed .nav-item span {
        display: none;
    }

    .sidebar.collapsed .nav-item {
        justify-content: center;
        padding: 12px;
    }

        .sidebar.collapsed .nav-item i {
            margin-right: 0;
        }

/* Animation for smooth transitions */
.sidebar {
    transition: width 0.3s ease;
}

.logo-image, .logo-icon-collapsed {
    transition: all 0.3s ease;
}
.dashboard-header-2025 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow-glow);
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.logo-text span {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-container-modern {
    position: relative;
    width: 100%;
}

    .search-container-modern input {
        width: 100%;
        padding: 12px 45px 12px 45px;
        border: 2px solid var(--gray-200);
        border-radius: var(--radius-full);
        font-size: 14px;
        transition: var(--transition);
        background: white;
    }

        .search-container-modern input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--primary-glow);
        }

    .search-container-modern i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-400);
        font-size: 16px;
    }

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .clear-search:hover {
        background: var(--gray-300);
    }

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
    font-size: 18px;
    position: relative;
}

    .icon-btn:hover {
        background: var(--gray-50);
        border-color: var(--primary);
        color: var(--primary);
        transform: translateY(-2px);
    }

    .icon-btn.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

.notification-btn .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid white;
}

.btn-primary-modern {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
}

    .btn-primary-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 40px var(--primary-glow);
    }

/* ==================================
   LOADING STATE
   ================================== */

.loading-state-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

.loader-modern {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

    .loader-ring:nth-child(1) {
        border-top-color: var(--primary);
        animation-delay: -0.45s;
    }

    .loader-ring:nth-child(2) {
        border-right-color: var(--primary-light);
        animation-delay: -0.3s;
    }

    .loader-ring:nth-child(3) {
        border-bottom-color: var(--primary-dark);
        animation-delay: -0.15s;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================================
   STATS SECTION
   ================================== */

.stats-section-2025 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.stat-card-2025 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

    .stat-card-2025::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary), var(--primary-light));
    }

    .stat-card-2025.stat-primary::before {
        background: linear-gradient(90deg, #6366f1, #818cf8);
    }

    .stat-card-2025.stat-success::before {
        background: linear-gradient(90deg, #10b981, #34d399);
    }

    .stat-card-2025.stat-warning::before {
        background: linear-gradient(90deg, #f59e0b, #fbbf24);
    }

    .stat-card-2025.stat-info::before {
        background: linear-gradient(90deg, #06b6d4, #22d3ee);
    }

    .stat-card-2025:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-2xl);
    }

.stat-icon-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow-glow);
}

.stat-primary .stat-icon {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.trend-up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.stat-sparkline {
    height: 40px;
    opacity: 0.3;
    margin-top: 8px;
}

    .stat-sparkline svg {
        width: 100%;
        height: 100%;
    }

/* ==================================
   STATUS PIPELINE
   ================================== */

.status-pipeline-2025 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

    .pipeline-header h2 {
        font-size: 24px;
        font-weight: 700;
        color: var(--gray-900);
    }

.pipeline-actions {
    display: flex;
    gap: 10px;
}

.filter-chip {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

    .filter-chip:hover {
        border-color: var(--primary);
        background: var(--gray-50);
    }

    .filter-chip.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

.chip-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.pipeline-buckets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.pipeline-bucket {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

    .pipeline-bucket:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary);
    }

    .pipeline-bucket.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
        box-shadow: var(--shadow-glow);
    }

.bucket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bucket-icon {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-600);
}

.pipeline-bucket.active .bucket-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.bucket-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.pipeline-bucket.active .bucket-count {
    color: white;
}

.bucket-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.pipeline-bucket.active .bucket-label {
    color: rgba(255, 255, 255, 0.9);
}

.bucket-progress {
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.pipeline-bucket.active .bucket-progress {
    background: rgba(255, 255, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.pipeline-bucket.active .progress-fill {
    background: white;
}

/* Status-specific colors */
.pipeline-bucket.status-success {
    border-color: var(--success);
}

    .pipeline-bucket.status-success:hover,
    .pipeline-bucket.status-success.active {
        background: var(--success);
    }

.pipeline-bucket.status-warning {
    border-color: var(--warning);
}

    .pipeline-bucket.status-warning:hover,
    .pipeline-bucket.status-warning.active {
        background: var(--warning);
    }

.pipeline-bucket.status-danger {
    border-color: var(--danger);
}

    .pipeline-bucket.status-danger:hover,
    .pipeline-bucket.status-danger.active {
        background: var(--danger);
    }

/* ==================================
   MAIN CONTENT AREA
   ================================== */

.main-content-2025 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
}

    .view-header h2 {
        font-size: 24px;
        font-weight: 700;
        color: var(--gray-900);
    }

.view-controls {
    display: flex;
    gap: 10px;
}

.sort-select {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

    .sort-select:focus {
        outline: none;
        border-color: var(--primary);
    }

.icon-btn-small {
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
}

    .icon-btn-small:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

/* ==================================
   GRID VIEW
   ================================== */

.orders-grid-2025 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.order-card-2025 {
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

    .order-card-2025:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary);
    }

.order-card-header {
    padding: 16px 20px;
    background: var(--gray-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.order-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-status-badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .order-detail i {
        width: 20px;
        color: var(--gray-400);
        font-size: 16px;
        margin-top: 2px;
    }

.detail-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.order-card-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.card-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--gray-700);
}

    .card-action-btn:hover {
        background: var(--gray-100);
        border-color: var(--gray-400);
        transform: translateY(-2px);
    }

    .card-action-btn.primary {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

        .card-action-btn.primary:hover {
            background: var(--primary-dark);
            box-shadow: var(--shadow-glow);
        }

/* ==================================
   LIST VIEW (TABLE)
   ================================== */

.orders-table-container {
    overflow-x: auto;
}

.modern-table-2025 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .modern-table-2025 thead {
        background: var(--gray-50);
    }

    .modern-table-2025 th {
        padding: 16px 20px;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--gray-600);
        border-bottom: 2px solid var(--gray-200);
    }

    .modern-table-2025 tbody tr {
        transition: var(--transition);
        border-bottom: 1px solid var(--gray-100);
    }

        .modern-table-2025 tbody tr:hover {
            background: var(--gray-50);
        }

.table-row-clickable {
    cursor: pointer;
}

.modern-table-2025 td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--gray-700);
}

.table-cell-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--gray-900);
}

.table-cell-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.status-pill {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.time-ago {
    font-size: 13px;
    color: var(--gray-500);
}

.table-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
}

    .action-btn:hover {
        background: var(--gray-100);
        border-color: var(--gray-400);
        color: var(--gray-900);
    }

    .action-btn.primary {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

        .action-btn.primary:hover {
            background: var(--primary-dark);
        }

/* ==================================
   KANBAN VIEW
   ================================== */

.kanban-board-2025 {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    min-width: 300px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.kanban-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-700);
}

.kanban-count {
    background: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.kanban-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

    .kanban-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
}

.card-menu-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

    .card-menu-btn:hover {
        color: var(--gray-700);
    }

.kanban-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.patient-info,
.doctor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-700);
}

    .patient-info i,
    .doctor-info i {
        color: var(--gray-400);
        width: 16px;
    }

.kanban-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--gray-600);
}

/* ==================================
   ANALYTICS VIEW
   ================================== */

.analytics-view-2025 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .analytics-header h2 {
        font-size: 24px;
        font-weight: 700;
        color: var(--gray-900);
    }

.date-range-picker {
    display: flex;
    gap: 8px;
}

.date-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-700);
}

    .date-btn:hover {
        background: var(--gray-50);
        border-color: var(--gray-300);
    }

    .date-btn.active {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.analytics-card {
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

    .analytics-card h3 {
        font-size: 18px;
        font-weight: 700;
        color: var(--gray-900);
        margin-bottom: 20px;
    }

.chart-placeholder {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.donut-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center {
    position: absolute;
    text-align: center;
}

.donut-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
}

.donut-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-700);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.line-chart-placeholder {
    height: 250px;
}

.line-chart {
    width: 100%;
    height: 100%;
}

.metrics-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.metric-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.top-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
}

    .top-item:hover {
        background: var(--gray-100);
    }

.item-rank {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.item-meta {
    font-size: 12px;
    color: var(--gray-500);
}

/* ==================================
   RESPONSIVE DESIGN
   ================================== */

@media (max-width: 1400px) {
    .dashboard-container-2025 {
        margin-left: 80px;
    }
}

@media (max-width: 1200px) {
    .stats-section-2025 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-buckets {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .orders-grid-2025 {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-header-2025 {
        flex-direction: column;
        gap: 20px;
    }

    .header-center {
        margin: 0;
        width: 100%;
        max-width: none;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .kanban-board-2025 {
        flex-direction: column;
    }

    .kanban-column {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .dashboard-container-2025 {
        margin-left: 0;
        padding: 15px;
    }

    .stats-section-2025 {
        grid-template-columns: 1fr;
    }

    .orders-grid-2025 {
        grid-template-columns: 1fr;
    }

    .pipeline-buckets {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .orders-table-container {
        overflow-x: scroll;
    }

    .modern-table-2025 {
        min-width: 800px;
    }
}

/* ==================================
   SCROLLBAR STYLING
   ================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--gray-500);
    }

/* ==================================
   ANIMATIONS
   ================================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.order-card-2025,
.stat-card-2025,
.pipeline-bucket,
.kanban-card,
.analytics-card {
    animation: slideUp 0.4s ease-out;
}

    /* Stagger animation for grid items */
    .order-card-2025:nth-child(1) {
        animation-delay: 0.05s;
    }

    .order-card-2025:nth-child(2) {
        animation-delay: 0.1s;
    }

    .order-card-2025:nth-child(3) {
        animation-delay: 0.15s;
    }

    .order-card-2025:nth-child(4) {
        animation-delay: 0.2s;
    }

    .order-card-2025:nth-child(5) {
        animation-delay: 0.25s;
    }

    .order-card-2025:nth-child(6) {
        animation-delay: 0.3s;
    }

    .stat-card-2025:nth-child(1) {
        animation-delay: 0.05s;
    }

    .stat-card-2025:nth-child(2) {
        animation-delay: 0.1s;
    }

    .stat-card-2025:nth-child(3) {
        animation-delay: 0.15s;
    }

    .stat-card-2025:nth-child(4) {
        animation-delay: 0.2s;
    }

/* ==================================
   UTILITY CLASSES
   ================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.rounded {
    border-radius: var(--radius);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}
/* Fix for main content area with 2025 sidebar */
.page {
    display: flex;
    width: 100%;
}

main {
    flex: 1;
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Adjust margin when sidebar is collapsed */
.sidebar-2025.collapsed ~ main,
body:has(.sidebar-2025.collapsed) main {
    margin-left: 80px;
}

/* Remove any conflicting margin from dashboard container */
.dashboard-container-2025 {
    margin-left: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    main {
        margin-left: 0;
    }

    .sidebar-2025 {
        transform: translateX(-100%);
    }

        .sidebar-2025.mobile-open {
            transform: translateX(0);
        }
}
/* ==================================
   OVERRIDE OLD SIDEBAR STYLES
   
   ================================== */

/* Hide old sidebar if it exists */
.sidebar:not(.sidebar-2025) {
    display: none !important;
}

/* Ensure 2025 sidebar is visible and properly styled */
.sidebar-2025 {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    display: flex !important;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

    .sidebar-2025.collapsed {
        width: 80px;
    }

/* Main content positioning */
main {
    margin-left: 250px !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    background: #f8f9fc;
}

/* When sidebar is collapsed, adjust main content */
body:has(.sidebar-2025.collapsed) main {
    margin-left: 80px !important;
}

/* Remove any padding/margin from .page that might interfere */
.page {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure dashboard container doesn't add extra margin */
.dashboard-container-2025 {
    margin-left: 0 !important;
    padding: 20px;
}




/* Form Validation Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

    .form-label.required::after {
        content: '*';
        color: #ef4444;
        margin-left: 4px;
        font-weight: 700;
    }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

    .form-control:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .form-control.is-invalid {
        border-color: #ef4444;
        background-color: #fef2f2;
        padding-right: 40px;
    }

        .form-control.is-invalid:focus {
            border-color: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
        }

    .form-control.is-valid {
        border-color: #10b981;
        background-color: #f0fdf4;
        padding-right: 40px;
    }

        .form-control.is-valid:focus {
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }

.validation-icon {
    position: absolute;
    right: 12px;
    top: 38px;
    pointer-events: none;
    transition: all 0.2s;
}

    .validation-icon.success {
        color: #10b981;
    }

    .validation-icon.error {
        color: #ef4444;
    }

.validation-message {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.85rem;
    animation: slideDown 0.2s ease-out;
}

    .validation-message.error {
        color: #ef4444;
    }

    .validation-message.success {
        color: #10b981;
    }

    .validation-message i {
        font-size: 0.9rem;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s;
}

/* Search Select Component */
.search-select {
    position: relative;
}

.search-select-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
}

    .search-select-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.search-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.2s;
}

.search-select.open .search-select-icon {
    transform: translateY(-50%) rotate(180deg);
}

.search-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

.search-select-search {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

    .search-select-search input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        font-size: 0.9rem;
    }

        .search-select-search input:focus {
            outline: none;
            border-color: #667eea;
        }

.search-select-options {
    padding: 4px;
}

.search-select-option {
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .search-select-option:hover {
        background: #f1f5f9;
    }

    .search-select-option.selected {
        background: #ede9fe;
        color: #5b21b6;
        font-weight: 500;
    }

    .search-select-option.create-new {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        font-weight: 600;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

        .search-select-option.create-new:hover {
            background: linear-gradient(135deg, #5568d3, #6941a5);
        }

.search-select-option-title {
    font-weight: 600;
    color: #1e293b;
}

.search-select-option-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.search-select-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
}

    .search-select-empty i {
        font-size: 2rem;
        margin-bottom: 8px;
        display: block;
        color: #cbd5e1;
    }

/* Form Summary - shows validation errors at top */
.form-validation-summary {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease-out;
}

    .form-validation-summary.hidden {
        display: none;
    }

.validation-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 12px;
}

    .validation-summary-header i {
        font-size: 1.5rem;
    }

.validation-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .validation-summary-list li {
        padding: 6px 0;
        color: #7f1d1d;
        display: flex;
        align-items: start;
        gap: 8px;
    }

        .validation-summary-list li::before {
            content: '•';
            color: #ef4444;
            font-weight: bold;
            font-size: 1.2rem;
        }

/* Loading overlay for form submission */
.form-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.form-loading-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.form-loading-text {
    color: #475569;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Step indicator for multi-step forms */
.form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

    .form-steps::before {
        content: '';
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        height: 2px;
        background: #e2e8f0;
        z-index: 0;
    }

.form-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.form-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.form-step.active .form-step-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
}

.form-step.completed .form-step-circle {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.form-step-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.form-step.active .form-step-label {
    color: #667eea;
    font-weight: 600;
}

.form-step.completed .form-step-label {
    color: #10b981;
}

/* Responsive */
@media (max-width: 768px) {
    .form-steps {
        flex-wrap: wrap;
        gap: 16px;
    }

        .form-steps::before {
            display: none;
        }

    .search-select-dropdown {
        max-height: 250px;
    }
}
/* ==================================
   REPORTS & SETTINGS CARDS
   ================================== */

.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.filter-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    flex: 1;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

    .filter-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px var(--primary-glow);
    }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.metric-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition);
}

    .metric-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.metric-primary .metric-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.metric-success .metric-icon {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.metric-info .metric-icon {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
}

.metric-warning .metric-icon {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
    font-weight: 500;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 8px;
}

.metric-change {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .metric-change.positive {
        color: var(--success);
    }

    .metric-change.negative {
        color: var(--danger);
    }

    .metric-change.neutral {
        color: var(--gray-600);
    }

.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.chart-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

    .chart-card.large {
        grid-column: span 1;
    }

.chart-header {
    padding: 20px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .chart-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        color: var(--gray-900);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .chart-header h3 i {
            color: var(--primary);
        }

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

    .chart-action-btn:hover {
        background: var(--gray-200);
        color: var(--gray-900);
    }

.chart-body {
    padding: 20px;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
}

    .chart-placeholder i {
        font-size: 48px;
        margin-bottom: 12px;
        opacity: 0.5;
    }

    .chart-placeholder p {
        font-weight: 600;
        margin: 0 0 4px 0;
    }

    .chart-placeholder small {
        font-size: 12px;
    }

.status-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-label {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 14px;
}

.status-count {
    font-size: 12px;
    color: var(--gray-600);
}

.status-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 100px;
}

.status-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: var(--radius-sm);
}

.status-percentage {
    font-weight: 700;
    color: var(--gray-700);
    font-size: 14px;
    min-width: 45px;
    text-align: right;
}

.report-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.section-header {
    padding: 20px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .section-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        color: var(--gray-900);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .section-header h3 i {
            color: var(--primary);
        }

.btn-secondary-small {
    padding: 8px 16px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

    .btn-secondary-small:hover {
        background: var(--gray-200);
    }

.table-container {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

    .modern-table thead {
        background: var(--gray-50);
    }

    .modern-table th {
        padding: 12px 20px;
        text-align: left;
        font-weight: 600;
        color: var(--gray-700);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .modern-table td {
        padding: 16px 20px;
        border-bottom: 1px solid var(--gray-100);
        font-size: 14px;
        color: var(--gray-700);
    }

    .modern-table tbody tr:hover {
        background: var(--gray-50);
    }

.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #e0e7ff;
    color: #4f46e5;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.trend-up {
    color: var(--success);
    font-weight: 600;
    font-size: 13px;
}

.activity-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.activity-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: var(--gray-600);
}

    .activity-meta i {
        font-size: 12px;
    }

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* ==================================
   SETTINGS PAGE STYLES
   ================================== */

.settings-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    min-height: 600px;
    position: relative;
    z-index: 10;
}

.settings-sidebar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

    .settings-nav-item i {
        font-size: 16px;
        color: var(--gray-500);
    }

    .settings-nav-item:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }

        .settings-nav-item:hover i {
            color: var(--primary);
        }

    .settings-nav-item.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: white;
    }

        .settings-nav-item.active i {
            color: white;
        }

.settings-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.settings-section {
    max-width: 900px;
}

.section-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px 0;
}

.section-title p {
    color: var(--gray-600);
    margin: 0 0 30px 0;
}

.settings-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

    .settings-card h3 {
        font-size: 18px;
        font-weight: 700;
        color: var(--gray-900);
        margin: 0 0 20px 0;
    }

.card-subtitle {
    color: var(--gray-600);
    font-size: 14px;
    margin: -10px 0 20px 0;
}

.form-grid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

    .settings-option:last-child {
        border-bottom: none;
    }

.option-info {
    flex: 1;
}

.option-label {
    font-weight: 600;
    color: var(--gray-900);
    display: block;
    margin-bottom: 4px;
}

.option-description {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    border-radius: 26px;
    transition: 0.3s;
}

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        border-radius: 50%;
        transition: 0.3s;
    }

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(22px);
    }

.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .card-header-with-action h3 {
        margin: 0;
    }

.users-table {
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.role-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-manager {
    background: #dbeafe;
    color: #1e40af;
}

.role-viewer {
    background: var(--gray-200);
    color: var(--gray-700);
}

.status-badge.active {
    color: var(--success);
    font-weight: 600;
}

.status-badge.inactive {
    color: var(--gray-500);
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn-small.danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.role-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

    .role-card:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }

.role-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

    .role-header i {
        font-size: 20px;
        color: var(--primary);
    }

    .role-header h4 {
        margin: 0;
        font-size: 16px;
        font-weight: 700;
    }

.role-card p {
    color: var(--gray-600);
    font-size: 13px;
    margin: 0 0 12px 0;
}

.role-stats {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: white;
    border-radius: var(--radius-sm);
}

.log-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

    .log-icon.success {
        background: var(--success);
    }

    .log-icon.warning {
        background: var(--warning);
    }

.log-content {
    flex: 1;
}

.log-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.log-meta {
    font-size: 12px;
    color: var(--gray-600);
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.integration-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

    .integration-card:hover {
        border-color: var(--primary);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.integration-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.integration-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.integration-card p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 16px 0;
}

.integration-status {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .integration-status.connected {
        color: var(--success);
    }

    .integration-status.disconnected {
        color: var(--gray-500);
    }

.integration-card button {
    width: 100%;
}

@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .settings-container {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        position: static;
    }

    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}