/* ===================================
   Logistics Management System - Main Stylesheet
   =================================== */

/* ===================================
   CSS Variables - UPS-Inspired Color Palette
   =================================== */
:root {
    /* Primary Colors - Orange/Yellow Gradient Theme (Landing Page Colors) */
    --color-primary: #ff6b35;
    --color-primary-dark: #f7931e;
    --color-primary-light: #ff8c5f;
    --color-secondary: #f7931e;
    --color-secondary-dark: #e67e00;
    --color-accent: #ff6b35;
    --color-background: #f8f9fa;
    --color-surface: #ffffff;
    --color-text: #333333;
    --color-text-secondary: #666666;
    
    /* Status Colors - Professional & Clear */
    --color-success: #4CAF50;
    --color-warning: #FFC107;
    --color-danger: #ef4444;
    --color-info: #2196F3;
    
    /* Neutral Colors - Clean Palette */
    --color-gray-light: #f3f4f6;
    --color-gray-medium: #9ca3af;
    --color-gray-dark: #4b5563;
    --color-border: #e5e7eb;
    
    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Roboto', Arial, sans-serif;
    
    /* Font Sizes */
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.375rem;
    --font-size-h3: 1.125rem;
    --font-size-body: 1rem;
    --font-size-small: 0.875rem;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 4px 8px rgba(0, 51, 102, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    color: var(--color-text);
    background: #f8f9fa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    outline: none;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(255, 107, 53, 0.3), 0 2px 4px -1px rgba(255, 107, 53, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 107, 53, 0.4), 0 4px 6px -2px rgba(255, 107, 53, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: linear-gradient(135deg, #f7931e 0%, #e67e00 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(247, 147, 30, 0.3), 0 2px 4px -1px rgba(247, 147, 30, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e67e00 0%, #f7931e 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(247, 147, 30, 0.4), 0 4px 6px -2px rgba(247, 147, 30, 0.3);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Danger Button */
.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-background);
}

.btn-danger:hover:not(:disabled) {
    background-color: #C82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

/* Success Button */
.btn-success {
    background-color: var(--color-success);
    color: var(--color-background);
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Outline Buttons */
.btn-outline-primary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: var(--color-background);
}

/* Button Sizes */
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-small);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===================================
   Form Elements
   =================================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--color-text);
    font-size: var(--font-size-small);
}

.form-label.required::after {
    content: " *";
    color: var(--color-danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-secondary);
    font-size: var(--font-size-body);
    color: var(--color-text);
    background-color: var(--color-background);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: var(--color-surface);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--color-danger);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-small);
    color: var(--color-danger);
}

.form-help {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-small);
    color: var(--color-gray-medium);
}

/* Checkbox and Radio */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: var(--spacing-sm);
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* ===================================
   Card Component
   =================================== */
.card {
    background-color: var(--color-surface);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all var(--transition-normal);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-header {
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-gray-light);
}

.card-title {
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
    border-top: 1px solid var(--color-gray-light);
}

/* Card Variants */
.card-primary {
    border-left: 4px solid var(--color-primary);
}

.card-success {
    border-left: 4px solid var(--color-success);
}

.card-warning {
    border-left: 4px solid var(--color-warning);
}

.card-danger {
    border-left: 4px solid var(--color-danger);
}

.card-info {
    border-left: 4px solid var(--color-info);
}

/* ===================================
   Tables
   =================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-background);
    font-family: var(--font-secondary);
}

.table thead {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.table th,
.table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-light);
}

.table th {
    font-weight: 600;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background-color: var(--color-surface);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================
   Badges & Status Indicators
   =================================== */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-small);
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}

.badge-success {
    background-color: var(--color-success);
    color: var(--color-background);
}

.badge-warning {
    background-color: var(--color-warning);
    color: var(--color-text);
}

.badge-danger {
    background-color: var(--color-danger);
    color: var(--color-background);
}

.badge-info {
    background-color: var(--color-info);
    color: var(--color-background);
}

.badge-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
}

/* ===================================
   Alerts & Notifications
   =================================== */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    background-color: #D4EDDA;
    border-color: var(--color-success);
    color: #155724;
}

.alert-warning {
    background-color: #FFF3CD;
    border-color: var(--color-warning);
    color: #856404;
}

.alert-danger {
    background-color: #F8D7DA;
    border-color: var(--color-danger);
    color: #721C24;
}

.alert-info {
    background-color: #D1ECF1;
    border-color: var(--color-info);
    color: #0C5460;
}

/* ===================================
   Utility Classes
   =================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: var(--color-primary);
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-danger {
    color: var(--color-danger);
}

.text-muted {
    color: var(--color-gray-medium);
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(-1 * var(--spacing-sm));
}

.col {
    flex: 1;
    padding: 0 var(--spacing-sm);
}

/* ===================================
   Loading Spinner
   =================================== */
.spinner {
    border: 3px solid var(--color-gray-light);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: var(--spacing-lg) auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   Page Layout
   =================================== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl);
}

.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-title {
    font-size: var(--font-size-h1);
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    color: var(--color-gray-medium);
    font-size: var(--font-size-body);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.badge-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.badge-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

.badge-success {
    background-color: var(--color-success);
    color: var(--color-background);
}

.badge-danger {
    background-color: var(--color-danger);
    color: var(--color-background);
}

.badge-warning {
    background-color: var(--color-warning);
    color: var(--color-text);
}

.badge-info {
    background-color: #17A2B8;
    color: var(--color-background);
}

/* Report Styles */
.report-filters {
    padding: 0;
}

.report-filters .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.report-results {
    margin-top: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #E0E0E0;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #003366;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.report-summary {
    margin-bottom: 30px;
}

.report-summary h4 {
    margin-bottom: 15px;
    color: #003366;
    font-size: 1.125rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: #F4F6F8;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #E0E0E0;
}

.summary-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #003366;
}

.report-table {
    margin-top: 20px;
}

.report-table h4 {
    margin-bottom: 15px;
    color: #003366;
    font-size: 1.125rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
}

.table thead {
    background: #003366;
    color: #FFFFFF;
}

.table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid #E0E0E0;
    font-size: 0.9375rem;
}

.table tbody tr:hover {
    background: #F4F6F8;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-success {
    color: #28A745;
    font-weight: 600;
}

.text-warning {
    color: #FFC107;
    font-weight: 600;
}

.text-danger {
    color: #DC3545;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-dispatched {
    background: #D1ECF1;
    color: #0C5460;
}

.status-in.transit,
.status-in_transit {
    background: #CCE5FF;
    color: #004085;
}

.status-delivered {
    background: #D4EDDA;
    color: #155724;
}

.status-returned {
    background: #F8D7DA;
    color: #721C24;
}

.btn-secondary {
    background: #6C757D;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #5A6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.btn-secondary i {
    font-size: 0.875rem;
}

/* Sortable table styles */
.table.sortable thead th {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.table.sortable thead th:hover {
    background: #002244;
}

.table.sortable thead th::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    opacity: 0.3;
    font-size: 0.75rem;
}

/* Responsive adjustments for reports */
@media (max-width: 767px) {
    .report-filters .form-row {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.8125rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* User Management Pages Styles */
.driver-info-summary,
.customer-info-summary {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #F4F6F8;
    border-radius: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.driver-info-summary .info-item,
.customer-info-summary .info-item {
    flex: 1;
    min-width: 200px;
}

.driver-info-summary .info-item strong,
.customer-info-summary .info-item strong {
    color: #003366;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.drivers-summary,
.customers-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #E0E0E0;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #F4F6F8;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #E8EEF3;
    transform: translateY(-2px);
}

.stat-item i {
    font-size: 32px;
    color: #003366;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #003366;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    min-width: 40px;
}

.badge-primary {
    background: #003366;
    color: #FFFFFF;
}

.badge-success {
    background: #28A745;
    color: #FFFFFF;
}

.badge-warning {
    background: #FFC107;
    color: #333333;
}

.badge-danger {
    background: #DC3545;
    color: #FFFFFF;
}

.badge-info {
    background: #17A2B8;
    color: #FFFFFF;
}

/* Text Utilities */
.text-muted {
    color: #999;
    font-style: italic;
}

.text-success {
    color: #28A745;
}

.text-warning {
    color: #FFC107;
}

.text-danger {
    color: #DC3545;
}

/* Card Header Flex Layout */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 20px;
}

.alert-info {
    background: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-warning {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEAA7;
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Responsive adjustments for user management */
@media (max-width: 768px) {
    .driver-info-summary,
    .customer-info-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ===================================
   MODERN ADMIN DASHBOARD STYLES
   =================================== */

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Modern Stat Cards */
.stat-card {
    background: linear-gradient(135deg, var(--color-surface) 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    color: #ff6b35;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-card-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-card-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.stat-card-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* Modern Sidebar */
.sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 24px 0;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.sidebar-nav {
    list-style: none;
    padding: 0 12px;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.sidebar-nav-link:hover {
    background: var(--color-gray-light);
    color: var(--color-primary);
    transform: translateX(4px);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    color: #ff6b35;
    font-weight: 600;
}

.sidebar-nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Modern Header/Navbar */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--color-gray-light);
    transition: all 0.2s ease;
}

.navbar-user:hover {
    background: var(--color-border);
}

.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Modern Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 30, 0.15) 100%);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

/* Modern Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    padding: 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-gray-light);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.03) 0%, rgba(247, 147, 30, 0.03) 100%);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Modern Form Inputs */
.form-input,
.form-select,
.form-textarea {
    border: 2px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Modern Alerts */
.alert {
    border-radius: 12px;
    padding: 16px 20px;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: var(--color-warning);
    border-left: 4px solid var(--color-warning);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: var(--color-danger);
    border-left: 4px solid var(--color-danger);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: var(--color-info);
    border-left: 4px solid var(--color-info);
}

/* Page Header Modern Style */
.page-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--color-text-secondary);
    font-size: 15px;
}

/* Modern Button Group */
.btn-group {
    display: inline-flex;
    gap: 8px;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-dark);
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-gray-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
