/* ===========================================================
   ROOT VARIABELEN
============================================================ */
:root {
    --bg: #eef2f7;
    --tile-bg: #abf2f5;
    --tile-hover: rgb(48, 110, 115);
    --tile-text: black;
    --tile-text-hover: #fff;

    --navbar-bg-color: rgb(48, 110, 115);
    --navbar-text-color: white;
    --navbar-text-color-focus: white;
    --navbar-bg-contrast: LightSeaGreen;
}

/* ============================================================
   GLOBAL RESET
============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: white;
    color: black;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    width: 100%;
    text-align: center;
}

/* ============================================================
   GENERIC ALIGNMENT CLASSES
============================================================ */
.td-left   { text-align: left; }
.td-right  { text-align: right; }
.td-center { text-align: center; }

/* ============================================================
   TABEL BASIS
============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

thead th {
    background: rgb(48, 110, 115);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #2a5f63;
}

th.td-center {
    text-align: center !important;
}


tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #f5f7ff;
}

tbody tr:nth-child(even) {
    background: #fafafa;
}

td {
    padding: 6px 12px;
    vertical-align: middle;
}

/* ============================================================
   ROUTES TABEL
============================================================ */
.routes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.95rem;
}

.routes-table thead th {
    background: rgb(48, 110, 115);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.routes-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.15s ease;
}

.routes-table tbody tr:hover {
    background: #f5f7ff;
}

.routes-table td {
    padding: 10px 12px;
    vertical-align: top;
}

.col-rit {
    width: 120px;
    font-weight: bold;
    white-space: nowrap;
}

.col-inst a {
    display: block;
}

.rit-link {
    color: rgb(48, 110, 115);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rit-link:hover {
    color: #669EE2;
}

.inst-link {
    color: #333;
    text-decoration: none;
    line-height: 1.4;
}

.inst-link:hover {
    color: rgb(48, 110, 115);
}
.button1 {
  background-color: rgb(48, 110, 115); 
  border: none;
  border-radius: 4px;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  transition-duration: 0.4s;
  width: 100%;
}
.button1:hover {
  background-color: #669EE2; /* blauw */
  color: white;
}
/* ============================================================
   ORDER KNOPPEN
============================================================ */
.order-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.icon-btn.order-up,
.icon-btn.order-down {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(48, 110, 115);
    color: white;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.icon-btn.order-up:hover,
.icon-btn.order-down:hover {
    background-color: #669EE2;
    color: white;
}

/* ============================================================
   NAVBAR (originele versie)
============================================================ */
#navbar {
    --navbar-height: 64px;

    height: var(--navbar-height);
    background-color: rgb(48, 110, 115); /* ⭐ jouw originele kleur */
    left: 0;
    right: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

/* ⭐ Dit is de regel die ontbrak */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#navbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
}

.navbar-title {
    color: white;
}

.navbar-item {
    margin: 0.4em;
    width: 100%;
}

.navbar-link {
    color: white; /* ⭐ originele tekstkleur */
    text-decoration: none;
    display: flex;
    font-weight: 400;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.4em 0.8em;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.navbar-link:is(:focus, :hover) {
    color: white;
    background-color: rgba(255,255,255,0.15); /* ⭐ originele hover */
}

/* MENU VISIBILITY */
#navbar-menu {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    z-index: 9999;
    transition: opacity 0.2s ease;
}

#navbar-toggle[aria-expanded="true"] ~ #navbar-menu {
    opacity: 1;
    visibility: visible;
}

/* OVERLAY */
#navbar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 9998;
}

#navbar-toggle[aria-expanded="true"] ~ #navbar-overlay {
    opacity: 1;
    visibility: visible;
}

/* MENU LIST */
.navbar-links {
    list-style: none;
    background-color: rgb(48, 110, 115); /* ⭐ originele kleur */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.8rem;
    padding: 0.8rem;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* ICONS */
#navbar i,
#navbar .navbar-icon {
    color: white !important; /* ⭐ originele iconkleur */
}


/* ============================================================
   QR SCAN
============================================================ */
#scan-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
}

#scan-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 380px;
    height: 120px;
    transform: translate(-50%, -50%);
    border: 3px solid #00ff00;
    border-radius: 10px;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

#reader {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

#scan-status-overlay {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#scan-status-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   ADMIN / TILES
============================================================ */
.tile {
    background: rgb(48, 110, 115);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.tile-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px;
}

.tile-icon {
    font-size: 28px;
    color: white;
    margin-bottom: 8px;
    display: block;
}

.tile-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.tile:active {
    transform: scale(0.97);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    background: lightseagreen;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 22px;
    padding: 20px;
}

.admin-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.admin-icon i {
    font-size: 42px;
    color: rgb(48, 110, 115);
    margin-bottom: 14px;
}

/* ============================================================
   BREDE ACTIEKNOPPEN (Volgorde opslaan / Open route in Maps)
============================================================ */
.action-btn {
    background: rgb(48, 110, 115);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;               /* ⭐ volle breedte */
    display: flex;
    align-items: center;
    justify-content: center;   /* ⭐ icon + tekst centreren */
    gap: 10px;
    transition: background 0.25s ease;
}

.action-btn:hover {
    background: #669EE2;
    color: white;
}

.action-btn i {
    font-size: 1.3rem;
}
/* ============================================================
   Strakke FontAwesome chevrons (zonder button-look)
============================================================ */
.order-up,
.order-down {
    font-size: 22px;
    color: rgb(48, 110, 115);
    cursor: pointer;
    display: inline-block;
    padding: 4px;
    transition: color 0.2s ease, transform 0.1s ease;
}

.order-up:hover,
.order-down:hover {
    color: #669EE2;
    transform: scale(1.15);
}

/* FontAwesome fix: voorkom fallback icons */
i.fa-solid,
i.fa-regular,
i.fa-brands {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
    background-color: rgb(48, 110, 115);
    color: white;
    font-weight: 400;
}

/* ============================================================
   LOGIN TABEL OVERRIDE (voorkomt 100% breedte)
============================================================ */
.login-table {
    width: 340px !important;        /* compacte breedte */
    margin: 60px auto !important;   /* centreren */
    border-radius: 10px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

/* cellen */
.login-table td {
    padding: 8px;
    vertical-align: middle;
}

/* titel */
.login-table th h1 {
    margin: 0;
    padding-bottom: 15px;
    font-size: 22px;
    font-weight: normal;
    text-align: center;
}

/* inputs */
.login-table input[type="text"],
.login-table input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
}

/* login knop */
.login-table .button1 {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
}
.login {
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
    margin: 100px auto;
}
.login h1 {
    background-color: rgb(48, 110, 115); 
	color: white;
	border:1px solid white;
    text-align: center;
    font-size: 32px;
    padding: 20px 0 20px 0;
    border-bottom: 1px solid #dee0e4;
    border-radius:8px;
}
.login form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 20px;
}
.login form label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgb(48, 110, 115);
    color: #ffffff;
    border-radius:8px;
}
.login form input[type="password"], .login form input[type="text"], .login form [type="email"] {
    width: 310px;
    height: 40px;
    border: 1px solid #dee0e4;
    margin-bottom: 20px;
    padding: 0 15px;
    border-radius:8px;
}
.login form input[type="submit"] {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: rgb(48, 110, 115);
    border: 0;
    cursor: pointer;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.2s;
    border-radius:8px;
}
.login form input[type="submit"]:hover {
  background-color: #669EE2;
    transition: background-color 0.2s;
    border-radius:8px;
}
.login form td {
    vertical-align: top;
}
.error { color: red; margin-bottom: 10px; }
.success { color: green; margin-bottom: 10px; }
.navtop {
	background-color: rgb(48, 110, 115);
	height: 60px;
	width: 100%;
	border: 0;
}

/* ============================================================
   MODERN GLASS-EFFECT OVERLAY (Stijl B)
============================================================ */

/* Achtergrond */
#overlayBg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Basis voor beide overlays */
#saveOverlay,
#errorOverlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 28px 40px;
    border-radius: 18px;
    backdrop-filter: blur(14px);
    background: rgba(248, 249, 249, 0.767);
    box-shadow: 0 10px 30px rgba(108, 104, 104, 0.35);
    font-size: 14px;
    font-weight: 400;
    color: black;
    text-shadow: 0 1px 3px rgb(105, 114, 114);
    z-index: 99999;
    opacity: 0;
    display: none;
    transition: opacity 0.35s ease;
}

/* Succes */
#saveOverlay {
    border: 2px solid rgb(48, 110, 115);
}

/* Fout */
#errorOverlay {
    border: 2px solid rgba(255,80,80,0.55);
}
/* GRID */
.inst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 15px;
}

/* CARD */
.inst-card {
    position: relative;
    display: block;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    height:80px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    transition: transform .2s ease, box-shadow .2s ease;
}

/* BACKGROUND GLOW */
.inst-card-bg {
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(135deg, #0078ff44, #00c6ff44);
    opacity: 0;
    transition: opacity .25s ease;
}

/* CONTENT */
.inst-card-content {
    position: relative;
    z-index: 2;
    padding: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;        /* horizontaal centreren */
    justify-content: center;    /* verticaal centreren */
    text-align: center;
}

/* PNG IMAGE */
.inst-img {
    height: 30px;
    object-fit: contain;
    margin-bottom: 8px;
    transition: transform .25s ease;
}

.inst-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    margin-bottom: 12px;
}

/* TITLE */
.inst-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}


/* HOVER EFFECTS */
.inst-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.inst-card:hover .inst-card-bg {
    opacity: 1;
}

.inst-card:hover .inst-img {
    transform: translateY(-3px);
}

/* MOBIEL GRID OPTIMALISATIE */
@media (max-width: 480px) {

    /* 3 kaarten per rij */
    .inst-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        padding: 12px;
    }

    /* compactere kaart */
    .inst-card {
        height: 70px;
        border-radius: 10px;
    }

    /* logo blijft 40px */
    .inst-img {
        height: 40px;
        margin-bottom: 6px;
    }

    .inst-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        color: inherit;
        margin-bottom: 20px;
    }
    .inst-card-bg {
        color: transparent;
    }
    /* titel iets kleiner */
    .inst-title {
        font-size: 0.9rem;
        line-height: 1.15;
    }

    /* subtielere hover voor touch */
    .inst-card:hover {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    }
}
#legend .item:hover {
    opacity: 0.7;
}
.legend-under-map {
    margin-top: 15px;
    padding: 10px 14px;
    background: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    font-size: 15px;
}

.legend-under-map .item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

.legend-under-map .item:hover {
    opacity: 0.7;
}

.legend-under-map .colorbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #00000033;
}
.legend-reset-btn {
    margin-top: 10px;
    padding: 8px 14px;
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.legend-reset-btn:hover {
    background: #005fcc;
}
/* =========================================================
   LOGIN OVERZICHT
   ========================================================= */

/* Wrapper */
.login-overzicht {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hoofdtabel compact en gecentreerd */
.login-overzicht table.center {
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Klikbare hoofdregel */
.login-summary {
    cursor: pointer;
}

.login-summary:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* Chevron open/dicht */
.login-chevron {
    width: auto;
    min-width: 12px;
    margin-right: 3px;
    font-size: 12px;
}

/* Detailregel */
.login-detail > td {
    padding: 0;
}

/* Ruimte rondom details */
.login-detail-container {
    padding: 8px 20px 15px 40px;
}

/* Detailtabel compact en gecentreerd */
.login-detail-table {
    width: auto;
    min-width: 300px;
    margin: 0 auto;
    border-collapse: collapse;
}

.login-detail-table th,
.login-detail-table td {
    padding: 4px 15px;
    white-space: nowrap;
}

.login-detail-table th {
    font-weight: bold;
    border-bottom: 1px solid #ccc;
}

.login-detail-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.04);
}

.login-detail-noresults {
    padding: 10px;
}


/* =========================================================
   MOBIEL
   ========================================================= */

@media screen and (max-width: 600px) {
    .login-filters select,
    .login-filters button {
        font-size: 16px;
        margin: 3px 1px;
    }
}
/* Chevron en jaar altijd op dezelfde regel */
.login-summary td:first-child {
    white-space: nowrap;
}