* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    background: #0f172a;
    color: white;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.brand-title {
    margin: 0;
    font-size: 1.1rem;
}

.brand-subtitle {
    margin: 0.2rem 0 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.main-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    transition: 0.2s ease;
}

.main-nav a:hover {
    background: #1e293b;
    color: white;
}

.hero {
    margin-top: 2rem;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: #2563eb;
    font-weight: 700;
}

.hero h2 {
    margin: 0;
    font-size: 2rem;
    color: #0f172a;
}

.hero-text {
    margin-top: 1rem;
    max-width: 720px;
    line-height: 1.7;
    color: #475569;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.button,
.btn-primary,
.btn-secondary {
    display: inline-block;
    text-decoration: none;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
    font: inherit;
}

.button-primary,
.btn-primary {
    background: #2563eb;
    color: white;
}

.button-primary:hover,
.btn-primary:hover {
    background: #1d4ed8;
}

.button-secondary,
.btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.button-secondary:hover,
.btn-secondary:hover {
    background: #cbd5e1;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.card {
    display: block;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.button-small {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}

.button-danger {
    background: #dc2626;
    color: white;
    border: none;
    cursor: pointer;
}

.button-danger:hover {
    background: #b91c1c;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    width: min(700px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid #e5e7eb;
}

.modal-small {
    width: min(420px, 100%);
}

.modal-wide {
    width: min(900px, 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: #475569;
}

/* Pagina-panelen */
.page-panel {
    margin-top: 2rem;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid #e5e7eb;
}

.page-panel h2 {
    margin-top: 0;
    color: #0f172a;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.overview-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.overview-sidebar {
    position: sticky;
    top: 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.overview-sidebar h2 {
    margin: 0 0 0.25rem;
}

.overview-main {
    min-width: 0;
}

.sidebar-form {
    display: grid;
    gap: 0.4rem;
}

.sidebar-form label {
    font-weight: 600;
    color: #334155;
}

.sidebar-form select,
.sidebar-form input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.sidebar-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.sidebar-range label {
    display: grid;
    gap: 0.35rem;
}

.sidebar-action {
    width: 100%;
    text-align: center;
}

/* Formulieren */
.form-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0.85rem 1rem;
    align-items: center;
}

.form-grid label {
    font-weight: 600;
    color: #334155;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: #1f2937;
}

.form-grid textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.login-panel {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.form-error {
    padding: 0.75rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
}

/* Inline filter/formulier */
.form-inline {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-inline label {
    font-weight: 600;
}

.form-inline input,
.form-inline select {
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

/* Tabellen */
.app-table-wrapper {
    width: 100%;
    margin-top: 1rem;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
    table-layout: fixed;
}

.app-table th,
.app-table td {
    border: 1px solid #d9d9d9;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.app-table th {
    background: #f5f7fa;
    font-weight: 600;
    color: #0f172a;
}

.app-table tr:nth-child(even) {
    background: #fafafa;
}

.trips-table {
    table-layout: auto;
}

.trips-table th,
.trips-table td {
    vertical-align: middle;
}

.trip-date-column {
    width: 110px;
}

.trip-stand-column {
    width: 120px;
}

.trip-km-column {
    width: 115px;
}

.table-muted {
    display: block;
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.35;
}

.route-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.route-label {
    display: block;
    margin-bottom: 0.15rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.trip-pill {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.trip-pill:hover {
    background: #cbd5e1;
}

.app-table input,
.app-table select,
.app-table textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.app-table textarea {
    min-height: 80px;
    resize: vertical;
}

/* Compacte variant voor bulk */
.app-table-compact th,
.app-table-compact td {
    padding: 0.45rem 0.5rem;
    vertical-align: middle;
}

.app-table-compact input,
.app-table-compact select {
    padding: 0.4rem 0.5rem;
    font-size: 0.92rem;
}

/* Formulier in tabel-look */
.app-form-table {
    width: 100%;
    border: 1px solid #d9d9d9;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    margin-top: 1rem;
}

.app-form-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    border-bottom: 1px solid #e5e7eb;
}

.app-form-row:last-child {
    border-bottom: none;
}

.app-form-label {
    background: #f5f7fa;
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: #0f172a;
}

.app-form-value {
    padding: 0.85rem 1rem;
}

.app-form-value input,
.app-form-value select,
.app-form-value textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.app-form-value textarea {
    min-height: 110px;
    resize: vertical;
}

@media (max-width: 900px) {
    .overview-layout {
        grid-template-columns: 1fr;
    }

    .overview-sidebar {
        position: static;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .app-form-row {
        grid-template-columns: 1fr;
    }

    .app-form-label {
        border-bottom: 1px solid #e5e7eb;
    }

    .page-header {
        align-items: flex-start;
    }

    .route-cell {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
}
.actions-column {
    width: 150px;
    vertical-align: middle !important;
}

.actions-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.actions-cell form {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.actions-cell .button-small,
.actions-cell .button-danger,
.actions-cell .btn-secondary,
.actions-cell .btn-primary {
    width: 115px;
    text-align: center;
}

.app-table th,
.app-table td {
    vertical-align: top;
}

