
/* ── BOTTOM NAV (hidden on desktop) ── */
.bottom-nav {
    display: none;
}

/* HAMBURGER — hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    transition: color 0.3s ease;
}
.hamburger:hover{
    color: var(--blue-light);
}

/* DRAWER OVERLAY */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* DRAWER */
.drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--blue-dark);
    z-index: 400;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--blue-mid);
}
.drawer.open {
    right: 0;
}
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawer-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem;
    transition: color 0.2s ease;
}
.drawer-close:hover {
    color: var(--blue-light);
}
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-muted);
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}
.drawer-nav a:hover {
    background: var(--blue-mid);
    color: var(--text-inverse);
}
.drawer-nav a.active {
    background: var(--blue-accent);
    color: var(--text-inverse);
}
.drawer-nav a i {
    font-size: 1.3rem;
}
.drawer-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--blue-mid);
}

/* RESPONSIVE — show hamburger, hide desktop nav */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .emergency-btn { display: none; }
    .hamburger { display: block; }
}

@media (max-width: 1024px){
    .page-layout{
         grid-template-columns: 240px minmax(0, 1fr);
    }
    header {
        gap: 2em;
    }
    h2 {
        font-size: 1.7em;
    }
}

@media (max-width: 768px) {

    /* HEADER */
    header {
        height: 70px;
        padding: 0 1.2rem;
    }
    .hamburger { display: block; }
    header nav {
        display: none;
    }
    header > div > button {
        display: none;
    }

    /* PAGE LAYOUT — stack sidebar above form */
    .page-layout {
        grid-template-columns: 1fr;
        padding-top: 70px;
        height: auto;
        overflow: visible;
    }

    /* INFO SIDEBAR — becomes a compact banner */
    .info {
        position: relative;
        height: auto;
        padding: 1.2rem;
        gap: 1rem;
    }
    .info-header h2 {
        margin: 1rem 0;
        font-size: clamp(1.1rem, 4vw, 1.5rem);
    }
    .info-main {
        display: none;
    }

    /* MAIN CONTENT */
    .main-content {
        min-height: 100vh;
        overflow-y: visible;
        padding: 1.2rem;
        padding-bottom: 90px;
    }
    .form-search input {
        width: 100%;
    }
    .track-content {
        padding: 1rem;
    }
    .track-results-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .track-results-main {
        padding: 1rem;
    }

    /* BOTTOM NAV — show on mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 200;
        background: var(--blue-dark);
        border-top: 1px solid var(--blue-mid);
    }
    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.6rem 0.4rem 0.8rem;
        gap: 0.2rem;
        text-decoration: none;
        color: var(--text-muted);
        font-family: 'DM Sans', sans-serif;
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: color 0.2s ease;
        border-top: 2px solid transparent;
    }
    .bottom-nav a .nav-icon {
        font-size: 1.3rem;
    }
    .bottom-nav a.active {
        color: var(--blue-light);
        border-top: 2px solid var(--blue-accent);
    }
    .bottom-nav a:hover {
        color: var(--blue-light);
    }
}

/*  MOBILE — 480px and below */
@media (max-width: 480px) {

    /* HEADER */
    header {
        height: 60px;
        padding: 0 1rem;
    }

    /* PAGE LAYOUT */
    .page-layout {
        padding-top: 60px;
    }

    /* INFO BANNER — even more compact */
    .info {
        padding: 1rem;
    }
    .info-header h2 {
        font-size: 1.1rem;
        margin: 0.6rem 0;
    }
    .divider {
        height: 4px;
    }

    /* MAIN CONTENT */
    .main-content {
        padding: 1rem;
        padding-bottom: 90px;
        gap: 1rem;
    }

    .address > .form-upload > label {
        display: none;
    }

    /* FORM */
    .form-upload {
        margin-bottom: 0.6rem;
    }
    .form-upload input,
    .form-upload select,
    .form-upload textarea {
        font-size: 0.85rem;
        height: 40px;
    }
    .form-upload textarea {
        height: 80px;
    }
    .upload-photo {
        height: 70px;
    }

    /* BUTTONS */
    .primary {
        width: auto;
        padding: 0.8rem;
        font-size: 0.8rem;
    }

    /* TRACK PAGE */
    .track-header {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    .track-fields {
        flex-direction: column;
        gap: 0.2rem;
        margin-bottom: 0.8rem;
    }
    .track-info {
        font-size: 0.85rem;
    }

    /* STATUS BADGE */
    .status-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
}




@media (max-width: 768px) {

    .admin-content {
        padding-top: 70px;
        padding-bottom: 90px;
    }


    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    .admin-left {
        width: 100%;
        flex-direction: column;
    }
    .admin-left input,
    .admin-left select {
        width: 100%;
    }

    
    .dispatch-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    .card-num {
        font-size: 2rem;
    }

    
    .dispatch-visual {
        padding: 1rem;
    }
    .dispatch-table thead th,
    .dispatch-table tbody td {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    
    .assign-cell {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }
    .assign-cell input {
        width: 100%;
        min-width: 120px;
    }
    .assign-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .admin-content {
        padding-top: 60px;
    }

    /* STAT CARDS — single column on small phones */
    .dispatch-cards {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    .dispatch-card {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .card-num {
        font-size: 1.8rem;
    }
    .card-info {
        font-size: 0.75rem;
    }

    /* TABLE font size */
    .dispatch-table thead th,
    .dispatch-table tbody td {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }
}
/* ── BOTTOM NAV — PWA only ── */
.bottom-nav {
    display: none;
}

@media (display-mode: standalone) and (max-width: 768px){
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 200;
        background: var(--blue-dark);
        border-top: 1px solid var(--blue-mid);
    }

    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.6rem 0.4rem 0.8rem;
        gap: 0.25rem;
        text-decoration: none;
        color: var(--text-muted);
        font-family: 'DM Sans', sans-serif;
        font-size: 0.65rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-top: 2px solid transparent;
        transition: color 0.2s ease;
    }

    .bottom-nav a i {
        font-size: 1.3rem;
    }

    .bottom-nav a.active {
        color: var(--blue-light);
        border-top: 2px solid var(--blue-accent);
    }

    .bottom-nav a:hover {
        color: var(--blue-light);
    }

    /* push page content up so it doesn't hide behind the nav */
    .main-content {
        padding-bottom: 90px;
    }

    .admin-content {
        padding-bottom: 90px;
    }
}