/* SANDRA Web Portal Styling */
:root {
    --primary-blue: #002F6C;
    --primary-dark-blue: #0A1C36;
    --primary-yellow: #FFCC00;
    --bg-white: #FFFFFF;
    --bg-light-grey: #F4F5F7;
    --border-grey: #E2E8F0;
    --text-dark: #2D3748;
    --text-light: #718096;
    --text-white: #FFFFFF;
    --alert-red: #D9534F;
    --ok-green: #2ECC71;
    --transition-speed: 0.3s;
    
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-blue: #0F172A;
    --primary-dark-blue: #020617;
    --primary-yellow: #F59E0B;
    --bg-white: #1E293B;
    --bg-light-grey: #0F172A;
    --border-grey: #334155;
    --text-dark: #F1F5F9;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light-grey);
    color: var(--text-dark);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar-sandra {
    background-color: var(--primary-blue);
    border-bottom: 4px solid var(--primary-yellow);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar-sandra .navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-white);
}

.navbar-sandra .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    transition: color var(--transition-speed);
    padding: 0.5rem 1rem;
}

.navbar-sandra .nav-link:hover, 
.navbar-sandra .nav-link.active {
    color: var(--primary-yellow);
}

.nav-search-input {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-white);
    border-radius: 20px;
    padding-left: 1rem;
    transition: width var(--transition-speed);
}

.nav-search-input:focus {
    background-color: var(--bg-white);
    color: #000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.5);
}

/* Base Components & Cards */
.sandra-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-grey);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    overflow: hidden;
}

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

.sandra-header-banner {
    background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--primary-blue) 100%);
    color: var(--text-white);
    padding: 4rem 1rem;
    border-bottom: 6px solid var(--primary-yellow);
}

.sandra-btn-primary {
    background-color: var(--primary-yellow);
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: background-color var(--transition-speed), transform 0.1s;
}

.sandra-btn-primary:hover {
    background-color: #E6B800;
    transform: translateY(-1px);
}

.sandra-btn-primary:active {
    transform: translateY(1px);
}

.sandra-btn-secondary {
    background-color: var(--primary-blue);
    color: var(--text-white);
    font-weight: 500;
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: opacity var(--transition-speed);
}

.sandra-btn-secondary:hover {
    opacity: 0.9;
    color: var(--primary-yellow);
}

/* Badge System */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
}

.status-green {
    background-color: rgba(46, 204, 113, 0.15);
    color: var(--ok-green);
    border: 1px solid var(--ok-green);
}

.status-red {
    background-color: rgba(217, 83, 79, 0.15);
    color: var(--alert-red);
    border: 1px solid var(--alert-red);
}

.status-yellow {
    background-color: rgba(255, 204, 0, 0.15);
    color: #B58B00;
    border: 1px solid var(--primary-yellow);
}

/* Sidebar Navigation */
.sidebar-nav {
    background-color: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-grey);
    padding: 1rem;
}

.sidebar-nav .nav-link {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: var(--bg-light-grey);
    color: var(--primary-blue);
}

/* Station Board Styles */
.station-board-row {
    border-left: 5px solid var(--ok-green);
    transition: background-color 0.2s;
}

.station-board-row.delayed {
    border-left-color: var(--alert-red);
}

/* Digital clock indicator style */
.digital-clock-panel {
    background-color: #020617;
    color: #00FF66;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.3);
}

/* Rail Systems Theme */
.rs-brand-section {
    border-top: 4px solid var(--primary-yellow);
}

/* Network map styling */
.network-svg {
    width: 100%;
    height: auto;
    max-height: 500px;
    border: 1px solid var(--border-grey);
    background-color: var(--bg-white);
    border-radius: 12px;
}

.network-svg line {
    stroke-width: 6;
    stroke-linecap: round;
    transition: opacity 0.3s;
    cursor: pointer;
}

.network-svg circle {
    fill: var(--bg-white);
    stroke: var(--text-dark);
    stroke-width: 3;
    r: 8;
    transition: r 0.3s, fill 0.3s;
    cursor: pointer;
}

.network-svg circle:hover,
.network-svg circle.active {
    r: 12;
    fill: var(--primary-yellow);
}

/* Configurator visualization */
.configurator-canvas {
    background-color: #E2E8F0;
    border-radius: 12px;
    height: 180px;
    position: relative;
    overflow: hidden;
    border: 2px dashed #CBD5E1;
}

/* Form Styles */
.sandra-form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.sandra-form-control {
    border-radius: 8px;
    border: 1px solid var(--border-grey);
    padding: 0.6rem 0.8rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.sandra-form-control:focus {
    box-shadow: 0 0 0 3px rgba(0, 47, 108, 0.25);
    border-color: var(--primary-blue);
    outline: none;
}

/* Ticket QR code */
.qr-container {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    display: inline-block;
    border: 2px solid var(--border-grey);
}

/* Audit logs table */
.audit-table th {
    background-color: var(--primary-blue) !important;
    color: var(--text-white) !important;
}

/* Footer Styling */
footer,
footer p,
footer span,
footer li,
footer div,
footer small {
    color: #e2e8f0 !important;
}

footer a,
footer a.text-muted,
footer .text-muted {
    color: #cbd5e1 !important;
    transition: color var(--transition-speed);
}

footer a:hover,
footer a.text-muted:hover {
    color: var(--primary-yellow) !important;
    text-decoration: underline !important;
}

/* Print View Styles */
@media print {
    .navbar, footer, .sandra-btn-primary, .sandra-btn-secondary, .cookie-consent, #theme-toggle {
        display: none !important;
    }
    body {
        background-color: #fff !important;
        color: #000 !important;
    }
    .sandra-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
