/* EASEO Signage Intake Portal — Huisstijl
   Strak, functioneel, veel witruimte. Geen frameworks. */

:root {
    --navy: #0F172A;
    --orange: #EA580C;
    --orange-dark: #C2410C;
    --blue: #3B82F6;
    --slate: #334155;
    --slate-light: #64748B;
    --offwhite: #F8FAFC;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --grid-line: #C7D0DB;
    --grid-cell: #DDE3EA;
    --grid-head: #EDF1F6;
    --green: #16A34A;
    --amber: #D97706;
    --red: #DC2626;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--slate);
    background: var(--offwhite);
    line-height: 1.55;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.wrap { flex: 1 0 auto; }

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--white);
    color: var(--slate-light);
    font-size: 0.82rem;
    margin-top: 40px;
}
.site-footer .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    flex-wrap: wrap;
    gap: 8px;
}
.site-footer .o { color: var(--orange); }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--slate-light); }
.site-footer a:hover { color: var(--orange); }

h1, h2, h3, h4 {
    font-family: 'League Spartan', 'Montserrat', sans-serif;
    color: var(--navy);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout --------------------------------------------------------------- */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    background: var(--navy);
    color: var(--white);
    border-bottom: 3px solid var(--orange);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--white);
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--orange); }
.brand small {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-light);
    margin-top: 2px;
}
.user-box {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: #CBD5E1;
}
.user-box strong { color: var(--white); font-weight: 600; }

/* Subnavigatie */
.subnav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.subnav .wrap {
    display: flex;
    gap: 8px;
    height: 48px;
    align-items: center;
}
.subnav a {
    color: var(--slate);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: var(--radius);
}
.subnav a:hover { background: var(--offwhite); text-decoration: none; }
.subnav a.active { background: var(--navy); color: var(--white); }

main.wrap { padding-top: 32px; padding-bottom: 64px; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-head .subtitle { color: var(--slate-light); margin: 0; }

/* ---- Cards & panels ------------------------------------------------------- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    text-decoration: none;
    line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--slate); border-color: var(--border); }
.btn-secondary:hover { background: var(--offwhite); }
.btn-danger { background: var(--white); color: var(--red); border-color: #FCA5A5; }
.btn-danger:hover { background: #FEF2F2; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Forms ---------------------------------------------------------------- */
.form-row { margin-bottom: 20px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

label.field-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.field-hint { font-size: 0.8rem; color: var(--slate-light); margin: 4px 0 0; }

input[type=text], input[type=password], input[type=date],
input[type=email], select, textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--slate);
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
textarea { resize: vertical; min-height: 80px; }

input[type=file] {
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--offwhite);
    cursor: pointer;
}

.field-error { border-color: var(--red) !important; }
.error-text { color: var(--red); font-size: 0.82rem; margin: 6px 0 0; font-weight: 500; }

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ---- Tables (spreadsheet-look: raster, cellen, rijnummers, zebra, frozen) -- */
.table-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--grid-line); border-radius: 4px; }
table.data {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}
table.data th {
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #1E293B;
    background: var(--grid-head);
    font-size: 0.78rem;
    letter-spacing: 0;
    padding: 8px 10px;
    border-right: 1px solid var(--grid-line);
    border-bottom: 2px solid var(--grid-line);
    white-space: nowrap;
    /* Bevroren koprij: blijft staan bij scrollen */
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--grid-line);
}
table.data td {
    padding: 7px 10px;
    border-right: 1px solid var(--grid-cell);
    border-bottom: 1px solid var(--grid-cell);
    vertical-align: middle;
}
/* Zebra-strepen */
table.data tbody tr:nth-child(even) { background: #F4F7FA; }
table.data tbody tr:hover { background: #FFF6E0; }
table.data .num { font-variant-numeric: tabular-nums; }
/* Rijnummer-kolom, als in Excel */
table.data .rownum {
    background: var(--grid-head);
    color: var(--slate-light);
    text-align: center;
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
    width: 38px;
    border: 1px solid var(--grid-line);
    font-weight: 600;
}

/* ---- Badges --------------------------------------------------------------- */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.badge-active { background: #DCFCE7; color: #15803D; }
.badge-planned { background: #DBEAFE; color: #1D4ED8; }
.badge-expired { background: #F1F5F9; color: #64748B; }
.badge-concession { background: #FFEDD5; color: var(--orange-dark); }

/* ---- Stat cards (overzichtsdashboard) ------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--slate-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
}
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,0.1); text-decoration: none; }
.stat-num { font-family: 'League Spartan', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-light); }
.stat-active { border-left-color: var(--green); }
.stat-planned { border-left-color: var(--blue); }
.stat-expired { border-left-color: var(--slate-light); }
.stat-total { border-left-color: var(--orange); }

.concession-line { font-size: 0.85rem; margin: -8px 0 20px; color: var(--slate); }
.concession-line .badge { margin-right: 4px; }

/* Toolbar (filters + zoeken boven de tabel) */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.toolbar-search {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
}
.toolbar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 0.9rem; background: var(--white); }
.toolbar-count { margin-left: auto; color: var(--slate-light); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

/* Dashboard-tabel: statusaccent links per rij, nettere uitlijning */
.data-dashboard tr.row-active td.rownum { border-left: 4px solid var(--green); }
.data-dashboard tr.row-planned td.rownum { border-left: 4px solid var(--blue); }
.data-dashboard tr.row-expired { opacity: 0.72; }
.data-dashboard tr.row-expired:hover { opacity: 1; }
.slide-name { font-weight: 600; color: var(--navy); }
.slide-name:hover { color: var(--orange); text-decoration: none; }

/* Drag-and-drop zone (import) */
.dropzone {
    border: 2px dashed var(--blue);
    border-radius: var(--radius);
    background: #F0F7FF;
    padding: 28px 20px;
    text-align: center;
    color: var(--slate);
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.12s, border-color 0.12s;
}
.dropzone:hover { background: #E6F0FF; }
.dropzone-over { background: #DBEAFE; border-color: var(--orange); }
.dropzone-icon { font-size: 1.6rem; color: var(--blue); line-height: 1; margin-bottom: 6px; }

/* ---- Flash messages ------------------------------------------------------- */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.flash-success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.flash-error { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.flash-info { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }

/* ---- Filters bar ---------------------------------------------------------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filters .form-row { margin-bottom: 0; }
.filters label.field-label { margin-bottom: 4px; }
.filters select, .filters input[type=date] { min-width: 160px; }

/* ---- Login ---------------------------------------------------------------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #1E293B 100%);
    padding: 24px;
}
.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-card .brand { color: var(--navy); font-size: 1.6rem; display: block; margin-bottom: 4px; }
.login-card .brand span { color: var(--orange); }
.login-card .login-sub { color: var(--slate-light); font-size: 0.85rem; margin: 0 0 28px; }
.login-card .btn-primary { width: 100%; }

/* ---- Utility -------------------------------------------------------------- */
.meta-list { list-style: none; padding: 0; margin: 0; }
.meta-list li { display: flex; padding: 8px 0; border-bottom: 1px solid var(--border); }
.meta-list li:last-child { border-bottom: none; }
.meta-list .k { width: 200px; color: var(--slate-light); font-size: 0.85rem; }
.meta-list .v { font-weight: 500; color: var(--navy); }

.empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--slate-light);
}
.muted { color: var(--slate-light); }
.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.85rem; }
.preview-img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #000;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.count-pill {
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 999px;
}
.actions-cell { display: flex; gap: 8px; white-space: nowrap; }

/* ---- Thumbnails (dashboard) ----------------------------------------------- */
.thumb {
    display: block;
    width: 64px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--navy);
    color: var(--orange);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
video.preview-img { display: block; width: 100%; }

/* ---- Tooltip (no-JS, toetsenbord-toegankelijk) ---------------------------- */
.tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--slate-light);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    position: relative;
    vertical-align: middle;
}
.tip:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.tip .tip-box {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: var(--navy);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    z-index: 10;
    transition: opacity 0.12s;
}
.tip:hover .tip-box, .tip:focus .tip-box { visibility: visible; opacity: 1; }

/* ---- Licentiebanner ------------------------------------------------------- */
.license-banner { padding: 8px 0; font-size: .9rem; text-align: center; }
.license-banner .wrap { max-width: 1100px; margin: 0 auto; }
.license-trial   { background: #FEF3C7; color: #92400E; }
.license-expired { background: #FEE2E2; color: #991B1B; }
