:root {
    /* Premium Palette based on Delivery Sys Logo */
    --primary-color: #03498b; /* Deep logo blue */
    --primary-hover: #023666;
    --primary-gradient: linear-gradient(135deg, #03498b 0%, #063863 100%);
    
    --secondary-color: #64748b;
    
    --success-color: #10b981; 
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --warning-color: #f59e0b; /* Brand Orange */
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    --danger-color: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --info-color: #0ea5e9;
    --info-bg: rgba(14, 165, 233, 0.1);
    
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #888888;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --sidebar-bg: #0b1f38; /* Deep elegant Navy */
    --sidebar-text: #94a3b8;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-active: #f59e0b; /* Brand Orange for active state */
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Vercel-like extremely soft shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-glow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

/* Base Card Styling */
.card, .stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover, .stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

/* Stat Cards specific */
.stat-card .card-body {
    padding: 1.5rem;
}

.icon-shape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
}
.icon-shape-primary { color: var(--primary-color); }
.icon-shape-success { color: var(--success-color); }
.icon-shape-warning { color: var(--warning-color); }
.icon-shape-danger { color: var(--danger-color); }
.icon-shape i { font-size: 1.2rem !important; }

.stat-card.border-start {
    border-left-width: 0 !important; /* Remove colored left borders for clean look */
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--text-main);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.btn-outline-primary:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms UX Improvement */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    background-color: var(--surface-color);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-size: 0.95rem;
}
.form-control:focus, .form-select:focus {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
    outline: none;
}
.form-label {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}
.badge.bg-success { background-color: var(--success-bg) !important; color: var(--success-color); border: 1px solid rgba(0, 112, 243, 0.2); }
.badge.bg-warning { background-color: var(--warning-bg) !important; color: var(--warning-color); border: 1px solid rgba(245, 166, 35, 0.2); }
.badge.bg-danger { background-color: var(--danger-bg) !important; color: var(--danger-color); border: 1px solid rgba(238, 0, 0, 0.2); }
.badge.bg-info { background-color: var(--info-bg) !important; color: var(--info-color); border: 1px solid rgba(50, 145, 255, 0.2); }
.badge.bg-primary { background-color: #f3f4f6 !important; color: var(--text-main); border: 1px solid #e5e7eb; }
.badge.bg-secondary { background-color: #f5f5f5 !important; color: var(--text-muted); border: 1px solid #e5e5e5; }

/* Table UX Improvement */
.table {
    --bs-table-bg: transparent;
    vertical-align: middle;
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    background: transparent;
    letter-spacing: 0;
}
.table tbody tr {
    transition: background-color 0.15s ease;
}
.table tbody td {
    padding: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table-hover tbody tr:hover {
    background-color: var(--bg-color);
}

/* Top Navigation */
.navbar {
    background-color: var(--bg-color) !important;
    border-bottom: 1px solid var(--border-color);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Sidebar Dark Customization */
.sidebar-col {
    background-color: var(--sidebar-bg) !important;
    border-right: none;
}
.sidebar {
    background-color: var(--sidebar-bg) !important;
    border-right: none;
}

.sidebar .offcanvas-title { color: #ffffff !important; }

.sidebar .nav-link {
    color: var(--sidebar-text) !important;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 0.2rem 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    margin-right: 12px;
    opacity: 0.8;
    color: var(--sidebar-text);
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff !important;
}
.sidebar .nav-link:hover i {
    color: #ffffff;
    opacity: 1;
}

.sidebar .nav-link.active {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--sidebar-active) !important;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--sidebar-active);
}
.sidebar .nav-link.active i {
    color: var(--sidebar-active);
    opacity: 1;
}

/* Mobile specific styling */
.mobile-header {
    background: var(--surface-color) !important;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem !important;
    box-shadow: var(--shadow-sm);
}

.floating-nav {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 999px; /* Pill shape */
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 0.5rem 1rem;
}

.floating-nav .nav-link {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.floating-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
    display: block;
    transition: transform 0.2s ease;
}

.floating-nav .nav-link.active {
    color: var(--surface-color) !important;
    background: var(--primary-color);
}

.floating-nav .nav-link.active i {
    transform: translateY(-2px);
}

.content-area-mobile {
    padding-bottom: 7rem; /* extra space for floating nav */
}

/* Utilities */
.delivery-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: transform 0.15s, box-shadow 0.15s;
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
}
.delivery-card:active {
    transform: scale(0.98);
}
.amount-display {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Pagination specific Vercel UX */
.pagination {
    border-radius: var(--radius-md);
}
.page-link {
    color: var(--text-muted);
    border-color: var(--border-color);
    background-color: var(--surface-color);
    font-weight: 500;
    font-size: 0.85rem;
    margin: 0 2px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.page-link:hover {
    color: var(--text-main);
    background-color: var(--sidebar-hover);
    border-color: var(--border-hover);
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.page-item.disabled .page-link {
    color: #ccc;
    background-color: transparent;
    border-color: transparent;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}
