/* LOG-SIM - Logistics Simulator Theme (Modern Light & Dark Mode) v6.0 */

:root {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --accent-cyan: #0284c7;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-cyan: #38bdf8;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Landing Page Header */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Hero Section */
.hero-section {
    padding: 5rem 2rem 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.hero-title span {
    color: var(--accent-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 0.25rem;
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--accent-primary);
    opacity: 0.85;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.feature-card {
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--accent-primary-hover);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
}

.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* App Dashboard Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 90;
}

.sidebar-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
    padding: 0 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-item button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-item button.active {
    background: var(--accent-primary);
    color: #ffffff;
}

.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.company-badge-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.balance-pill {
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-emerald);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-idle {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.badge-transit {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-primary);
}

.badge-warning {
    background: rgba(217, 119, 6, 0.15);
    color: var(--accent-amber);
}

.badge-success {
    background: rgba(5, 150, 105, 0.15);
    color: var(--accent-emerald);
}

/* Alert Banner */
.alert-banner {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(225, 29, 72, 0.15);
    color: var(--accent-rose);
    border: 1px solid var(--accent-rose);
}

.alert-success {
    background: rgba(5, 150, 105, 0.15);
    color: var(--accent-emerald);
    border: 1px solid var(--accent-emerald);
}

/* Custom Table */
.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th, .custom-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.custom-table th {
    background: var(--bg-input);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.4s ease;
}

#germany-map {
    width: 100%;
    height: 550px;
    border-radius: var(--radius-md);
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* MOBILE RESPONSIVE ADAPTATION */
@media (max-width: 900px) {
    .sidebar {
        left: -260px;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
        box-shadow: var(--shadow-lg);
    }
    
    .main-wrapper {
        margin-left: 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        padding: 3rem 1rem 2rem;
    }

    .content-area {
        padding: 1rem;
    }

    #germany-map {
        height: 380px;
    }
}
