@import url('tokens.css');
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');
@import url('responsive.css');

/* iPad Formulieren CSS - Geoptimaliseerd voor touch interfaces */

/* Reset en basis styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--canvas);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.info-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-button:hover {
    background-color: var(--surface-2);
}

.info-icon {
    font-size: 20px;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--gold);
    background: var(--navy);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-body ul {
    margin: 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--ink);
}

.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 48px;
    width: auto;
}

#headerTitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.header-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 5px;
    text-align: center;
}

.header-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Formulieren Grid */
.formulieren-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.formulieren-secties {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.formulieren-sectie {
    margin-bottom: 8px;
}

.formulieren-sectie:last-child .formulieren-grid {
    margin-bottom: 0;
}

.formulieren-sectie-titel {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink-2);
    margin: 28px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--line);
    letter-spacing: 0.01em;
}

.formulieren-sectie:first-child .formulieren-sectie-titel {
    margin-top: 0;
}

.formulieren-sectie .formulieren-grid {
    margin-bottom: 12px;
}

.formulieren-secties.reorder-mode {
    outline: 2px dashed var(--primary);
    outline-offset: 8px;
    border-radius: var(--radius-lg);
    padding: 12px;
}

.formulieren-secties.reorder-mode::before {
    content: 'Sleep tegels om de volgorde binnen een categorie aan te passen';
    display: block;
    text-align: center;
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.main-content .page-intro {
    color: var(--ink-2);
}

.formulier-knop {
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid var(--line-2);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    justify-content: center;
}

.formulier-knop:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.formulier-knop:active {
    transform: translateY(-3px) scale(0.98);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.formulier-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.formulier-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
}

.formulier-icon-svg svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.formulier-knop.featured {
    border-color: rgba(var(--primary-rgb), 0.35);
    position: relative;
}

.formulier-knop.featured::after {
    content: 'Bezetting';
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
}

.formulieren-grid.reorder-mode {
    outline: 2px dashed var(--primary);
    outline-offset: 8px;
    border-radius: var(--radius-lg);
    padding: 12px;
    position: relative;
}

.formulieren-grid.reorder-mode::before {
    content: 'Sleep tegels om de volgorde aan te passen';
    display: block;
    text-align: center;
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.formulier-knop.draggable {
    cursor: grab;
}

.formulier-knop.dragging {
    opacity: 0.6;
}

.formulier-knop.over {
    border-color: var(--primary);
    border-style: dashed;
}

@media (min-width: 900px) {
    .formulier-knop.featured {
        grid-column: span 2;
    }
}

.formulier-knop h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

.formulier-knop p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Hub homepage — 3 categorieën */
.main-content--hub {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding-top: 28px;
}

.hub-hero {
    max-width: 1100px;
    margin: 0 auto 24px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: var(--surface-2, #e8ecef);
}

.hub-hero img {
    display: block;
    width: 100%;
    height: clamp(200px, 32vw, 340px);
    object-fit: cover;
    object-position: center 28%;
}

.hub-lead {
    text-align: center;
    font-size: 1.15rem;
    color: var(--ink-2);
    margin: 0 0 28px;
    font-weight: 500;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Hub-tegels bouwen voort op .formulier-knop (werkt ook bij gecachte CSS) */
.hub-knop {
    min-height: 260px;
    padding: 40px 28px;
    border-radius: 24px;
}

.hub-knop:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.hub-knop--formulieren:hover { border-color: var(--domain-form-accent); }
.hub-knop--beveiliging:hover { border-color: var(--domain-bev-accent); }
.hub-knop--beheer:hover { border-color: var(--domain-beh-accent); }

.hub-knop--hub .hub-icon {
    background: color-mix(in srgb, var(--navy) 10%, var(--surface));
    color: var(--navy);
}

.hub-knop--hub:hover { border-color: var(--navy); }

.hub-grid--four {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
    .hub-grid--four {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
    }
}

@media (max-width: 899px) {
    .hub-grid--four {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

.hub-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.hub-icon svg {
    width: 40px;
    height: 40px;
    stroke: currentColor;
    fill: none;
}

.hub-knop--formulieren .hub-icon {
    background: color-mix(in srgb, var(--domain-form-accent) 12%, var(--surface));
    color: var(--domain-form-accent);
}

.hub-knop--beveiliging .hub-icon {
    background: color-mix(in srgb, var(--domain-bev-accent) 14%, var(--surface));
    color: var(--domain-bev-accent-ink);
}

.hub-knop--beheer .hub-icon {
    background: color-mix(in srgb, var(--domain-beh-accent) 12%, var(--surface));
    color: var(--domain-beh-accent);
}

.hub-knop h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px;
}

.hub-knop p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 28ch;
}

/* Subpagina terug-link */
.page-back {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 8px;
}

.page-back:hover {
    text-decoration: underline;
}

.page-intro {
    text-align: center;
    font-size: 1.05rem;
    color: var(--ink-2);
    margin: 0 0 28px;
}

.formulieren-grid--compact {
    max-width: 480px;
    margin: 0 auto;
}

/* Beheerpagina: administratie + receptie naast elkaar */
.beheer-tiles {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.beheer-tiles-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.beheer-tile-wide.formulier-knop.featured {
    grid-column: auto;
}

@media (max-width: 720px) {
    .beheer-tiles-row {
        grid-template-columns: 1fr;
    }
}

.header-content:has(.page-back) {
    flex-wrap: wrap;
    position: relative;
}

.header-content:has(.page-back) .header-right {
    position: absolute;
    top: 0;
    right: 0;
}

.header-left:has(.page-back) {
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1 1 100%;
}

.header-left:has(.page-back) .page-back {
    align-self: flex-start;
}

.header-left:has(.page-back) .logo {
    justify-content: center;
}

.header-left:has(.page-back) > div:has(.header-title) {
    width: 100%;
    text-align: center;
}

@media (max-width: 900px) {
    .main-content--hub {
        padding-top: 16px;
    }

    .hub-hero {
        margin-bottom: 20px;
        border-radius: 16px;
    }

    .hub-hero img {
        height: clamp(160px, 42vw, 240px);
        object-position: center 24%;
    }

    .hub-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .hub-knop {
        min-height: 200px;
        padding: 32px 24px;
    }
}

/* Info Section */

/* Reservering Formulier Specifieke Styling */
.time-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.time-option {
    position: relative;
}

.time-option-label {
    display: block;
    cursor: pointer;
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    background: var(--surface);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.time-option-label:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}

.time-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.time-radio:checked + .time-option-content {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 15px;
    margin: -15px;
}

.time-radio:checked ~ .time-option-label {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-3px);
}

.time-option-content {
    transition: all 0.3s ease;
}

.time-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.time-icon {
    font-size: 1.5rem;
}

.time-option-header strong {
    font-size: 1.2rem;
    font-weight: 600;
}

.time-option-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-range {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.time-radio:checked ~ .time-option-content .time-range {
    color: #fff;
}

.time-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.time-radio:checked ~ .time-option-content .time-description {
    color: var(--ink-2);
}

.time-info {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.time-info p {
    margin: 0;
    color: var(--ink-2);
    font-size: 0.95rem;
}

/* Legacy time blocks (voor backward compatibility) */
.time-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.time-block {
    background: var(--primary);
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: transform 0.3s ease;
}

.time-block:hover {
    transform: translateY(-2px);
}

.time-block strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.rules-section {
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.rules-category {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--surface);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rules-category:last-child {
    margin-bottom: 0;
}

.rules-category h5 {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-category h5::before {
    content: "📋";
    font-size: 1.1rem;
}

.rules-category ul {
    margin: 0;
    padding-left: 20px;
}

.rules-category li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--ink-2);
}

.rules-category li:last-child {
    margin-bottom: 0;
}

.warning-box {
    background: color-mix(in srgb, var(--gauge-full) 90%, var(--surface));
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow-card);
    border: 2px solid var(--gauge-full);
}

.warning-box h4 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-box p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Info boxes */
.info-box {
    background: var(--primary);
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow-primary);
    border: 2px solid var(--accent-ink);
}

.info-box h4 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box p {
    margin: 0;
    font-size: 1rem;
}

/* Light variant for info box on light background */
.info-box.light {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    box-shadow: none;
}

.info-box ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
}

.signature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.signature-column {
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.signature-column h5 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.signature-text {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Responsive design voor signature row */
@media (max-width: 768px) {
    .signature-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .time-blocks {
        grid-template-columns: 1fr;
    }
}
.info-section {
    margin-top: 40px;
}

.info-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 8px 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 25px;
}

.info-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Admin Links */
.admin-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: var(--surface-2);
    border: 2px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
}

.admin-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.admin-link .icon {
    font-size: 1.2rem;
}

.admin-link .text {
    font-size: 1rem;
}

.setup-link {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--accent-ink);
}

.setup-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.admin-panel-link {
    background: var(--accent-soft);
    border-color: var(--line);
    color: var(--accent-ink);
}

.admin-panel-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Responsive Design for Admin Links */
@media (max-width: 768px) {
    .admin-links {
        flex-direction: column;
        align-items: center;
    }
    
    .admin-link {
        width: 100%;
        max-width: 300px;
    }
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 30px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-info p {
    color: var(--text-muted);
    margin: 5px 0;
}

/* Form Styling (voor individuele formulieren) */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    margin-bottom: 30px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 10px;
}

.form-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--line);
    border-radius: 12px;
    font-size: 16px;
    background: var(--surface);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    min-width: 120px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover,
.btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--ink);
    border: 2px solid var(--line);
}

.btn-secondary:hover,
.btn-secondary:active {
    background: var(--line-2);
    border-color: var(--primary);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 40px;
    min-width: 100px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Signature Section */
.signature-section {
    margin: 40px 0;
    padding: 30px;
    background: var(--surface-2);
    border-radius: 15px;
    border: 2px solid var(--line);
}

.signature-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
    text-align: center;
}

.signature-container {
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    position: relative;
    touch-action: none;
    margin: 20px 0;
}

.signature-canvas {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
    /* Apple Pencil optimizations */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* Better touch handling */
    touch-action: none;
    -ms-touch-action: none;
}

.signature-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 15px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
}

.signature-info {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 10px;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--ink);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* File upload styling */
.form-input[type="file"] {
    padding: 10px;
    border: 2px dashed var(--primary);
    background: var(--surface-2);
    cursor: pointer;
}

.form-input[type="file"]:hover {
    background: var(--line-2);
}

/* Help text */
.form-help {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-style: italic;
}

/* Progress indicator */
.progress-section {
    margin-bottom: 40px;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--line);
    z-index: 1;
}

.progress-step.active:not(:last-child):after {
    background: var(--primary);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--line);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    z-index: 2;
    position: relative;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: #fff;
}

.step-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

.progress-step.active .step-title {
    color: var(--primary);
    font-weight: 600;
}

/* Form steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .formulieren-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-card {
        padding: 25px;
    }
    
    .header-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-step:not(:last-child):after {
        display: none;
    }
}

/* iPad specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .formulieren-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important;
    }
    
    .btn {
        min-height: 44px;
    }
}

/* Landscape orientation for iPad */
@media (orientation: landscape) and (max-height: 768px) {
    .header {
        padding: 15px 0;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .formulieren-grid {
        gap: 20px;
    }
    
    .formulier-knop {
        padding: 20px;
        min-height: 150px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .form-actions,
    .signature-controls {
        display: none !important;
    }
    
    body {
        background: var(--surface);
    }
    
    .form-card {
        box-shadow: none;
        border: 1px solid var(--line);
    }
}

/* Huisregels — sectiekoppen (geen inline paars) */
.huisregels-heading {
    color: var(--primary);
    margin-bottom: 15px;
}

.huisregels-heading--section {
    margin: 20px 0 10px 0;
}

/* Form success modal (form-handler.js) */
.form-success-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
}

.form-success-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    text-align: center;
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.form-success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.form-success-title {
    font-family: var(--font-display);
    color: var(--status-gereed);
    margin-bottom: 15px;
}

.form-success-lead {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.form-success-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

.form-success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.form-success-msg--ok {
    color: var(--status-gereed);
    margin: 0 0 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.form-success-msg--warn {
    color: var(--gauge-full);
    margin: 0 0 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.success-message,
.error-message {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
}

.success-message .form-success-backdrop,
.success-message .form-success-card,
.error-message .form-error-backdrop,
.error-message .form-error-card {
    pointer-events: auto;
}

.form-success-ios-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 600;
    word-break: break-word;
}

.form-error-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
}

.form-error-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    padding: 32px 28px;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    text-align: center;
    z-index: 1000;
    max-width: 420px;
    width: 90%;
}

.form-error-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.form-error-text {
    color: var(--ink);
    margin: 0 0 20px;
    line-height: 1.5;
}

.form-error-close {
    min-width: 120px;
}

.language-selector {
    position: relative;
    z-index: 200;
}

.language-dropdown {
    position: relative;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-toggle:hover {
    background: var(--line-2);
    border-color: var(--line);
}

.language-icon {
    font-size: 16px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-options.show .dropdown-arrow {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.language-option:first-child {
    border-radius: 12px 12px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 12px 12px;
}

.language-option:hover {
    background: var(--surface-2);
}

.language-option.active {
    background: var(--primary);
    color: #fff;
}

.language-option.dual {
    border-top: 1px solid var(--line);
}

.language-option .flag {
    font-size: 16px;
    min-width: 24px;
}

.language-option .text {
    flex: 1;
}

.language-divider {
    height: 1px;
    background: var(--line-2);
    margin: 4px 0;
}

/* Dual Language Display Styles */
.primary-lang {
    display: block;
    font-weight: 600;
    color: inherit;
}

.secondary-lang {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.7;
    font-style: italic;
    margin-top: 2px;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.button-text .secondary-lang {
    font-size: 0.75em;
    margin-top: 0;
}

/* Responsive adjustments for language selector */
@media (max-width: 768px) {
    .language-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .language-options {
        min-width: 220px;
        right: -10px;
    }
    
    .language-option {
        padding: 10px 14px;
        font-size: 13px;
    }
}