/* =========================================================
   Tabelloni Web - stile condiviso (pubblico + gestione)
   App tabelloni orari ferroviari - Facilis Software
   Palette brand: blu #333399 (primario) / arancio #FF6833 (accento)
   ========================================================= */

:root {
    --brand-blue: #333399;
    --brand-blue-dark: #24246b;
    --brand-orange: #FF6833;
    --brand-light: #f5f6f8;
    --brand-muted: #8a8f9c;
}

body {
    background-color: var(--brand-light);
    color: #232630;
}

a {
    text-decoration: none;
}

/* ---------- Header / Navbar ---------- */

.site-header .navbar {
    background-color: var(--brand-blue);
    padding-top: .75rem;
    padding-bottom: .75rem;
    border-bottom: 3px solid var(--brand-orange);
}

.site-header .navbar-brand {
    display: flex;
    align-items: center;
}

.site-header .navbar-brand .brand-logo {
    height: 34px;
    width: auto;
    display: block;
}

.site-header .nav-link {
    color: #dfe1ee;
    font-weight: 500;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.site-header .nav-link.active,
.site-header .nav-link:hover {
    color: var(--brand-orange);
}

.site-header .nav-link.btn-reserved {
    background-color: var(--brand-orange);
    color: #fff;
    border-radius: .35rem;
}

.site-header .nav-link.btn-reserved:hover {
    background-color: #e04f19;
    color: #fff;
}

/* ---------- Hero (pagine pubbliche) ---------- */

.hero {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: #fff;
    padding: 4rem 0;
}

.hero h1 {
    font-weight: 700;
}

.hero .lead {
    color: #c9caeb;
}

.cta-band {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: #fff;
}

.cta-band .lead {
    color: #c9caeb;
}

.hero .clock {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--brand-orange);
    letter-spacing: .05em;
}

/* ---------- Tabellone (board partenze/arrivi in stile Solari) ---------- */

.board {
    background-color: #10121c;
    border: 4px solid var(--brand-blue);
    border-radius: .5rem;
    overflow: hidden;
}

.board .table {
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
    letter-spacing: .04em;
    color: var(--brand-orange);
}

.board .table thead th {
    background-color: var(--brand-blue);
    color: #fff;
    font-family: inherit;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .8rem;
    border: none;
}

.board .table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.board .table tbody td {
    border: none;
    padding-top: .65rem;
    padding-bottom: .65rem;
    vertical-align: middle;
}

.board .status {
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: normal;
    font-weight: 600;
}

.board .status.in-orario { color: #4caf50; }
.board .status.ritardo { color: var(--brand-orange); }
.board .status.soppresso { color: #e74c3c; }
.board .status.arrivato { color: #6ea8fe; }

/* ---------- Fade-in sfasato (effetto movimento) ---------- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-stagger > div {
    opacity: 0;
    animation: fadeInUp .6s ease-out forwards;
}

.fade-in-stagger > div:nth-child(1) { animation-delay: .1s; }
.fade-in-stagger > div:nth-child(2) { animation-delay: .3s; }
.fade-in-stagger > div:nth-child(3) { animation-delay: .5s; }
.fade-in-stagger > div:nth-child(4) { animation-delay: .7s; }

@media (prefers-reduced-motion: reduce) {
    .fade-in-stagger > div {
        animation: none;
        opacity: 1;
    }
}

/* ---------- Mockup telefono (screenshot app) ---------- */

.phone-mockup {
    width: 260px;
    margin: 0 auto;
    border: 10px solid #1a1a2e;
    border-radius: 2.2rem;
    background-color: #10121c;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .35);
    overflow: hidden;
}

.phone-mockup .phone-notch {
    width: 40%;
    height: 18px;
    margin: 0 auto;
    background-color: #1a1a2e;
    border-radius: 0 0 1rem 1rem;
}

.phone-mockup .board {
    border: none;
    border-radius: 0;
}

.phone-mockup .board .table {
    font-size: .7rem;
}

/* ---------- Badge store (download app) ---------- */

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background-color: #10121c;
    color: #fff;
    padding: .55rem 1.1rem;
    border-radius: .5rem;
}

.store-badge i {
    font-size: 1.5rem;
}

.store-badge small {
    display: block;
    font-size: .65rem;
    color: #aaa;
    line-height: 1;
}

.store-badge strong {
    display: block;
    font-size: .95rem;
    line-height: 1.3;
}

.store-badge:hover {
    background-color: #000;
    color: #fff;
}

/* ---------- Passi numerati (come funziona) ---------- */

.step-circle {
    width: 3rem;
    height: 3rem;
    margin: 0 auto .75rem;
    border-radius: 50%;
    background-color: var(--brand-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

/* ---------- Card informative (binari / stazione) ---------- */

.info-card {
    background: #fff;
    border: 1px solid #e6e7eb;
    border-radius: .5rem;
    padding: 1.25rem;
    height: 100%;
}

.info-card .icon {
    width: 3rem;
    height: 3rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background-color: var(--brand-blue);
    margin-bottom: .75rem;
}

/* ---------- Footer ---------- */

.site-footer {
    background-color: var(--brand-blue-dark);
    color: #c9caeb;
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: .875rem;
}

.site-footer a {
    color: #dfe1ee;
}

.site-footer a:hover {
    color: var(--brand-orange);
}

/* ---------- Pagina provvisoria (manutenzione / in arrivo) ---------- */

.maintenance-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: #fff;
}

.maintenance-card {
    max-width: 32rem;
}

.maintenance-logo {
    height: 46px;
    width: auto;
}

.maintenance-card .lead {
    color: #c9caeb;
}

.maintenance-card .btn-outline-light:hover {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.maintenance-footer {
    margin-top: 3rem;
    font-size: .8rem;
    color: #9698c4;
}

/* =========================================================
   Area di gestione (backoffice)
   ========================================================= */

.admin-wrapper {
    display: flex;
    min-height: calc(100vh - 90px);
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background-color: var(--brand-blue-dark);
    color: #dfe1ee;
    padding: 1.25rem 0;
}

.admin-sidebar .nav-link {
    color: #dfe1ee;
    padding: .6rem 1.25rem;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.admin-sidebar .nav-link i {
    width: 1.1rem;
    text-align: center;
    color: var(--brand-orange);
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, .06);
    border-left-color: var(--brand-orange);
    color: #fff;
}

.admin-sidebar .sidebar-heading {
    color: #9698c4;
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .06em;
    padding: 1rem 1.25rem .35rem;
}

.admin-content {
    flex-grow: 1;
    padding: 1.5rem;
    background-color: #f5f6f8;
}

.admin-topbar {
    background-color: #fff;
    border-bottom: 1px solid #e6e7eb;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card {
    background: #fff;
    border-radius: .5rem;
    border: 1px solid #e6e7eb;
    padding: 1.25rem;
    height: 100%;
}

.stat-card .icon {
    width: 3rem;
    height: 3rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background-color: var(--brand-orange);
}

.stat-card .value {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-card .label {
    color: var(--brand-muted);
    font-size: .85rem;
}

#sidebarToggle {
    display: none;
}

@media (max-width: 767.98px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        display: none;
    }

    .admin-sidebar.show {
        display: block;
    }

    #sidebarToggle {
        display: inline-block;
    }
}
