/* ============================================================
   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
============================================================ */
#navbar {
    --navbar-height: 64px;

    /* ⭐ Belangrijk: deze ontbraken → tekst werd zwart */
    --navbar-text-color: white;
    --navbar-text-color-focus: white;
    --navbar-bg-contrast: rgba(255,255,255,0.15);

    height: var(--navbar-height);
    background-color: rgb(48, 110, 115);
    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;
}

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

/* ============================================================
   MENU ITEMS
============================================================ */

.navbar-title {
    color: white;
}

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

.navbar-link {
    color: var(--navbar-text-color);
    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: var(--navbar-text-color-focus);
    background-color: var(--navbar-bg-contrast);
}

/* ============================================================
   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;
}

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

/* ⭐ Overlay */
#navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 9998; /* net onder het menu */
}

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


/* ============================================================
   MENU LIST
============================================================ */
.navbar-links {
    list-style: none;
    background-color: rgb(48, 110, 115);
    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-icon {
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
}

/* ⭐ Iconen altijd wit */
#navbar i,
#navbar .navbar-icon {
    color: white !important;
}

/* ============================================================
   LAYOUT
============================================================ */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-toggle-btn,
#navbar-toggle {
    margin-left: auto;
}

/* Active menu item highlight */
.navbar-active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff !important;
    font-weight: 600;
}

/* ============================================================
   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;
	padding: 15px;
    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;
}