* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Verwijder blauwe gloed bij tikken op iOS */
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    /* Iets lichtere, modernere achtergrond */
    color: #1c1c1e;
    /* Donkergrijs voor betere leesbaarheid */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overscroll-behavior-y: contain;
    /* Voorkom pull-to-refresh van de hele browser view */
}

/* Header */
.header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: env(safe-area-inset-top);
    /* Voor iPhone notch */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 640px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    font-style: italic;
}

.header-action {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
}

.header-action svg {
    width: 24px;
    height: 24px;
}

.header-action.login-button {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}

.header-action.login-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Container */
.main-container {
    flex: 1;
    padding: 0;
    /* Padding wordt per pagina-sectie beheerd */
    padding-bottom: 80px;
    /* Ruimte voor bottom nav */
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem;
    overflow-y: auto;
}

.page.active {
    transform: translateX(0);
    z-index: 100;
}

.page.inactive-left {
    transform: translateX(-30%);
    /* Subtiel effect voor de pagina die verdwijnt */
}


/* Cards */
.card {
    background: white;
    border-radius: 12px;
    /* Iets rondere hoeken */
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-orange {
    background: #fff3e0;
    color: #e65100;
}

.badge-purple {
    background: #f3e5f5;
    color: #6a1b9a;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary, #ff6b35);
}

.stat-label {
    font-size: 0.875rem;
    color: #555;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: #e4e6eb;
    color: #1c1c1e;
}

.btn:active {
    transform: scale(0.97);
    box-shadow: none;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* Success Bar */
.success-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.success-bar-track {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.success-bar-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.success-rate {
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    /* Semi-transparant voor modern effect */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    color: #8e8e93;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-item.active {
    color: #ff6b35;
}

.nav-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Step-by-step form */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #ddd;
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.progress-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s;
}

.progress-label {
    font-size: 0.8rem;
    color: #888;
}

.progress-step.active .progress-number {
    background: #ff6b35;
}

.progress-step.completed .progress-number {
    background: #4caf50;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Procedure Details */
.procedure-details {
    padding: 1rem;
}

.detail-group {
    margin-bottom: 1.5rem;
}

.detail-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ff6b35;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.detail-label {
    color: #555;
}

.detail-value {
    font-weight: 500;
    text-align: right;
}

.detail-notes {
    background: #f9f9f9;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Section Title */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 1rem 1rem 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Search Results */
.no-results {
    text-align: center;
    color: #888;
    padding: 2rem;
}