/* ============================
   ALGEMENE STYLING
============================ */

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden; /* voorkomt horizontaal scrollen */
}

* {
    max-width: 100%;
    box-sizing: border-box;
}

.page-content {
    padding: 20px;
    padding-bottom: 80px; /* ruimte voor footer */
}

h1 {
    margin-bottom: 20px;
    white-space: normal;
    overflow-wrap: break-word;
}

/* ============================
   BESTELLINGEN
============================ */

#orders {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 100%;
}

.order-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.order-info {
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn-row {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.btn-gereed {
    background: #28a745;
}

.btn-manco {
    background: #dc3545;
}
.btn-onderweg {
    background-color: #007bff;
    color: white;
}
.btn-onderweg:hover {
    background-color: #0066d6;
}

/* ============================
   POPUP (iPhone-proof)
============================ */

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* onder viewer, boven topbar/footer */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


/* ============================
   LOGIN PAGINA
============================ */

.login-body {
    background: #F5F5F5;
    font-family: system-ui, sans-serif;
    color: #002B45;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.login-card {
    background: #FFFFFF;
    padding: 32px;
    border-radius: 12px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    border-top: 4px solid #FF6A00;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.login-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-subtitle {
    color: #607080;
    margin-bottom: 24px;
}

.login-label {
    text-align: left;
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    margin-bottom: 16px;
    font-size: 1rem;
}

.login-input:focus {
    border-color: #FF6A00;
    box-shadow: 0 0 0 2px rgba(255,106,0,0.15);
    outline: none;
}

.login-button {
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    background: #002B45;
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.login-button:hover {
    background: #FF6A00;
}

.login-footer {
    text-align: center;
    padding: 16px;
    font-size: 0.8rem;
    color: #8A96A3;
}

/* ============================
   HEADERBALK (2-regel layout)
============================ */

.topbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: #002B45;
    color: white;
    padding: 14px 20px;
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999; /* onder popup */
}


.topbar-title {
    flex: 1 0 100%;       /* Titel op eigen regel */
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: normal;
}

/* Uitlogknop links onder de titel */
.logout-button {
    background: #FF6A00;
    color: white;
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    order: 2;             /* onder de titel */
    margin-left: 0;       /* links */
}

.logout-button:hover {
    background: #ff7f26;
    transform: translateY(-2px);
}

/* ============================
   FOOTERBALK
============================ */

.footerbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #002B45;
    color: white;
    text-align: center;
    padding: 12px 0;
    font-size: 0.85rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 9998; /* onder popup, onder viewer */
}

/* ============================
   LOGIN — RESPONSIVE FIX
============================ */

.login-card {
    width: 100%;
    max-width: 420px; /* iets ruimer voor moderne telefoons */
    padding: 32px;
    border-radius: 12px;
}

/* Mobiel optimalisatie */
@media (max-width: 600px) {

    .login-wrapper {
        padding: 20px;
        min-height: 100vh;
    }

    .login-card {
        max-width: 100%;      /* BELANGRIJK: vult hele breedte */
        padding: 24px;        /* iets compacter op mobiel */
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    }

.login-logo img {
    width: 100% !important;
    height: auto;
    max-width: none !important; /* BELANGRIJK: laat opschalen toe */
    display: block;
}


    .login-title {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .login-subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .login-input {
        font-size: 1rem;
        padding: 12px;
    }

    .login-button {
        padding: 14px;
        font-size: 1rem;
    }
}
.footer-logo {
    height: 22px;
    width: auto;
    vertical-align: middle;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer-logo-link:hover .footer-logo {
    opacity: 1;
}
@media (max-width: 600px) {
    .footer-logo {
        height: 14px; /* kleiner op mobiel */
        opacity: 0.85;
    }
}
/* ============================
   kleuren looptijd dashboard
============================ */
.looptijd-green {
    color: #2ecc71; /* groen */
    font-weight: bold;
}

.looptijd-orange {
    color: #f39c12; /* oranje */
    font-weight: bold;
}

.looptijd-red {
    color: #e74c3c; /* rood */
    font-weight: bold;
}
.order-card.onderweg {
    border-left: 6px solid #007bff;
    background-color: #f0f7ff;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.status-onderweg {
    background-color: #007bff;
    color: white;
}
.foto-indicator {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f0f0f0;
    border-radius: 6px;
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    user-select: none;
}

.foto-indicator:hover {
    background: #e0e0e0;
}

.foto-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999999; /* hoogste laag */
}

.foto-viewer.show {
    display: flex;
}

.foto-viewer-content {
    position: relative;
    z-index: 10000000; /* extra zekerheid */
}

.foto-viewer-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    user-select: none;
}

.foto-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.foto-viewer-nav {
    margin-top: 12px;
    text-align: center;
}

.foto-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.foto-thumb:hover,
.foto-thumb.active {
    opacity: 1;
}
