/* ==========================================================================
   ZeemsExpress - High-Readability Enterprise Design System & Stylesheet
   Theme: Professional Navy & Crisp Light-Slate SaaS Design (Strict Purple Ban)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Premium Color Palette (Strict Purple Ban) */
    --bg-primary: #F1F5F9;          /* Premium soft Slate-100 body background */
    --bg-secondary: #FFFFFF;        /* Pure white for card & page panels */
    --bg-surface: #F8FAFC;          /* Clean off-white Slate-50 for hover inputs */
    --bg-surface-hover: #E2E8F0;    /* Slate-200 for interaction highlights */
    
    --border-color: #E2E8F0;        /* Subtle, premium slate borders */
    --border-color-hover: #CBD5E1;   /* Slate-300 on interaction hover */
    
    --text-primary: #0F172A;        /* Obsidian Dark Slate-900 for titles & body */
    --text-secondary: #475569;      /* Muted Slate-600 for secondary text */
    --text-muted: #94A3B8;          /* Slate-400 for inactive/placeholders */
    
    --accent-orange: #FF5722;       /* Vibrant Signal Orange */
    --accent-orange-hover: #E64A19; /* Deep Orange hover */
    --accent-orange-glow: rgba(255, 87, 34, 0.1);
    
    --neon-green: #10B981;          /* Emerald Green (Success states) */
    --neon-green-glow: rgba(16, 185, 129, 0.08);
    
    --warning-yellow: #F59E0B;       /* Warm Amber for delays/alerts */
    --warning-yellow-glow: rgba(245, 158, 11, 0.08);
    
    --info-blue: #0EA5E9;           /* Ocean Info blue */
    --danger-red: #EF4444;          /* Soft Crimson alert red */
    
    /* Layout & Geometry - Premium Modern Rounded Style */
    --border-radius: 6px;           /* Smooth modern rounded corners */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --sidebar-width: 280px;         /* Spacious, readable sidebar */
    --header-height: 70px;
    
    /* Modern SaaS Shadow */
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0,0,0,0.05);
}

/* Light Theme Overrides (Seamless support for visitor site elements) */
[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-surface: #F1F5F9;
    --bg-surface-hover: #E2E8F0;
    
    --border-color: #E2E8F0;
    --border-color-hover: #CBD5E1;
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
}

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.01em;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--accent-orange-hover);
}

/* Standard Monospace Elements */
.font-mono {
    font-family: var(--font-mono) !important;
}

/* Premium Standard Buttons */
.btn {
    border-radius: var(--border-radius) !important;
    font-weight: 500;               /* Clean standard weight */
    text-transform: none;           /* Standard Case */
    letter-spacing: normal;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #FFFFFF;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-orange-hover);
    border-color: var(--accent-orange-hover);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--accent-orange-glow);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

/* High-Legibility Form Controls */
.form-control, .form-select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius) !important;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    transition: all var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    background-color: #FFFFFF;
    border-color: var(--accent-orange);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-orange-glow);
}
.form-control::placeholder {
    color: var(--text-muted);
}

/* Premium Dashboard Card Panels */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) !important;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium), transform var(--transition-medium);
}
.card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-1px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;               /* Semi-bold readable weight */
    font-size: 1rem;
    text-transform: none;           /* Title / Sentence Case */
    color: var(--text-primary);
}

/* Premium Dark Navy Sidebar Shell */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #0F172A !important;     /* High-End Dark Blue (Tailwind Slate-900) */
    border-right: 1px solid #1E293B;
    z-index: 1000;
    transition: transform var(--transition-medium);
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid #1E293B;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    color: #FFFFFF !important;
}
.sidebar-logo span {
    color: var(--accent-orange);
    font-weight: 800;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #94A3B8 !important;               /* Clean Slate-400 */
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    text-transform: none;                    /* Premium clean Title Case */
    transition: all var(--transition-fast);
}
.sidebar-link i {
    font-size: 1.2rem;
    margin-right: 0.85rem;
    color: #64748B;
    transition: color var(--transition-fast);
}
.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    color: #FFFFFF !important;
    background-color: #1E293B !important;    /* Sleek slate overlay */
}
.sidebar-link:hover i, .sidebar-item.active .sidebar-link i {
    color: var(--accent-orange) !important;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid #1E293B;
    background-color: #0B0F19;
}

/* Master Grid Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

/* Metric / Counter Stats Grid (Redesigned) */
.stat-box {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0.25rem 0;
    color: var(--text-primary);
}
.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--bg-surface);
    border-radius: 50%;
    font-size: 1.35rem;
    color: var(--accent-orange);
    transition: transform var(--transition-fast);
}
.stat-box:hover .stat-icon {
    transform: scale(1.05);
}

/* Sleek Delivery timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-left: 0.5rem;
    border-left: 2px solid var(--border-color);
}
.timeline-event {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-event:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    background-color: var(--bg-secondary);
    border: 3px solid var(--border-color);
    border-radius: 50%;
    z-index: 2;
    transition: all var(--transition-fast);
}
.timeline-event.active .timeline-dot {
    border-color: var(--accent-orange);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--accent-orange-glow);
}
.timeline-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}
.timeline-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0.15rem 0;
}
.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Simulated Logs Console (Premium HUD Style) */
.console-box {
    background-color: #0F172A;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #38BDF8; /* Cool cyans instead of harsh greens */
    max-height: 350px;
    overflow-y: auto;
    border-left: 4px solid var(--accent-orange);
}
.console-line {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}
.console-line span.timestamp {
    color: #64748B;
    margin-right: 0.75rem;
}

/* Beautiful Interactive Map Wrapper */
.map-container {
    height: 500px;
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
}

/* Signature Pad Controls */
.sig-canvas {
    background-color: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    cursor: crosshair;
    display: block;
    width: 100%;
    height: 200px;
}

/* Standard Premium Tables */
.table {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.table th {
    background-color: var(--bg-surface) !important;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: none;
    font-size: 0.88rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 1rem;
    background-color: var(--bg-secondary) !important;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.table tr:hover td {
    background-color: var(--bg-surface) !important;
}

/* Premium Rounded Status Badges */
.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem !important; /* Soft pill-shaped badges */
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.badge-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* Public Hero Section */
.hero-section {
    position: relative;
    padding: 8rem 0 6rem;
    background-color: #0F172A;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    color: #FFFFFF;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 87, 34, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
    opacity: 0.3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
.hero-title span {
    color: var(--accent-orange);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94A3B8;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* General Layout helpers */
.text-accent {
    color: var(--accent-orange) !important;
}
.border-accent {
    border-color: var(--border-color) !important;
}

/* Responsive sidebar behaviors */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}
