/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-gray: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-light: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;

    /* Category Colors */
    --cat-color-1: #ef4444; /* Red */
    --cat-color-2: #f97316; /* Orange */
    --cat-color-3: #eab308; /* Yellow */
    --cat-color-4: #22c55e; /* Green */
    --cat-color-5: #14b8a6; /* Teal */
    --cat-color-6: #3b82f6; /* Blue */
    --cat-color-7: #6366f1; /* Indigo */
    --cat-color-8: #a855f7; /* Purple */
    --cat-color-9: #ec4899; /* Pink */
    --cat-color-10: #6b7280; /* Gray */
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 i {
    font-size: 2.5rem;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Contacts Grid */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Contact Card */
.contact-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.clickable-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.contact-card-body {
    padding: 1.5rem;
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
}

.contact-frequency,
.last-contact {
    font-size: 0.875rem;
    color: var(--text-light);
    display: block;
    margin-top: 0.5rem;
}

/* Progress Container */
.progress-container {
    margin-top: 1rem;
}

.timer-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.timer-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.progress {
    height: 0.5rem;
    background-color: var(--light-gray);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.status-good {
    background: linear-gradient(90deg, var(--success-color), #34d399);
}

.status-warning {
    background: linear-gradient(90deg, var(--warning-color), #fbbf24);
}

.status-danger {
    background: linear-gradient(90deg, var(--danger-color), #f87171);
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.6rem;
}

.action-btn {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    color: #fff !important;
}

.action-btn i {
    color: #fff !important;
    font-size: 1rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 12px;
    height: 12px;
    background-color: var(--danger-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Modal Styles with Higher Z-index */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: brightness(0) invert(1);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.alert-primary {
    background-color: #e0e7ff;
    color: #5b21b6;
}

/* Form Actions */
.modal-footer {
    border: none;
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal-footer op mobile: Opslaan bovenaan (makkelijk bereikbaar met duim),
       Annuleren midden, Verwijderen onder (destructive, weg van duim). DOM-order
       blijft [Verwijderen, Annuleren, Opslaan] voor desktop-layout en tab-order. */
    .modal-footer {
        flex-direction: column-reverse;
    }
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-muted {
    color: var(--text-light);
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

/* Color Picker Styles */
.color-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 4px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.2);
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

/* --- Unified GUI (Vandaag, Overzicht, Contacten, Details) --- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
    background: #8A93A0;
    letter-spacing: 0.2px;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* Gedeelde list-container (Overzicht en Contacten) */
.glist {
    border: 1px solid #E1E5EA;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.glist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #EDF0F3;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.glist-row:last-child { border-bottom: 0; }
.glist-row:hover { background: #F4F6F8; }
.glist-row .who-block {
    min-width: 0;
    flex: 1;
}
.glist-row .who {
    font-size: 15px;
    font-weight: 600;
    color: #151A21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.glist-row .when {
    font-size: 12px;
    color: #5B6470;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.glist-row .right {
    font-size: 12.5px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}
.glist-row .right.late    { color: #B23B32; }
.glist-row .right.soon    { color: #96661A; }
.glist-row .right.planned { color: #2F5F8A; }
.glist-row .right.quiet   { color: #8A93A0; }

/* Bucket-kop in Overzicht */
.overzicht-ghead {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 650;
    color: #151A21;
}
.overzicht-ghead .gdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.overzicht-ghead .gcount {
    color: #5B6470;
    font-weight: 500;
    font-size: 13px;
    margin-left: 4px;
}

/* Vandaag-kaart met avatar */
.vandaag-card {
    background: #ffffff;
    border: 1px solid #E1E5EA;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.vandaag-card .v-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.vandaag-card .v-name {
    font-size: 15px;
    font-weight: 600;
    color: #151A21;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vandaag-card .v-flag {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    color: #B23B32;
    background: #FCF0EF;
    white-space: nowrap;
    flex-shrink: 0;
}
.vandaag-card .v-meta {
    font-size: 12px;
    color: #5B6470;
    margin: 0 0 8px 46px;
}
.vandaag-card .v-attempt {
    font-size: 12px;
    color: #4A5568;
    background: #F1F3F6;
    border-radius: 6px;
    padding: 5px 9px;
    margin: 0 0 8px 46px;
}
.vandaag-card .v-reach {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.vandaag-card .v-reach button {
    flex: 1;
    padding: 8px 0;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid #E1E5EA;
    border-radius: 8px;
    background: #ffffff;
    color: #151A21;
    cursor: pointer;
}
.vandaag-card .v-reach button:disabled {
    color: #8A93A0;
    cursor: not-allowed;
}
.vandaag-card .v-primary {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: #151A21;
    color: white;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Details-modal — nieuwe stijl */
.details-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 16px;
    border-bottom: 1px solid #EDF0F3;
    margin-bottom: 12px;
}
.details-top .modal-name {
    font-size: 17px;
    font-weight: 700;
    color: #151A21;
    line-height: 1.2;
}
.details-top .modal-cat {
    font-size: 12px;
    color: #5B6470;
    margin-top: 2px;
}
.details-flag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #B23B32;
    background: #FCF0EF;
    margin-bottom: 12px;
}
.details-flag.soon    { color: #96661A; background: #FBF4E8; }
.details-flag.planned { color: #2F5F8A; background: #EFF4F9; }
.details-flag.quiet   { color: #5B6470; background: #F1F3F6; }

.details-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #EDF0F3;
    font-size: 13.5px;
}
.details-info-row:last-child { border-bottom: 0; }
.details-info-row .info-label { color: #5B6470; }
.details-info-row .info-value { color: #151A21; font-weight: 500; text-align: right; }
.details-info-row .info-value a { color: #151A21; text-decoration: none; }
.details-info-row .info-value a:hover { text-decoration: underline; }

.details-attempt-line {
    background: #F1F3F6;
    color: #4A5568;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    margin: 12px 0;
}

.details-action-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #EDF0F3;
}
.details-action-label {
    font-size: 11px;
    color: #5B6470;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}
.details-reach-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.details-reach-row button {
    flex: 1;
    padding: 8px 0;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid #E1E5EA;
    border-radius: 8px;
    background: #ffffff;
    color: #151A21;
    cursor: pointer;
}
.details-reach-row button:disabled {
    color: #8A93A0;
    cursor: not-allowed;
}
.details-primary-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: #151A21;
    color: white;
    border: 0;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}

.history-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #EDF0F3;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.history-title { font-size: 13.5px; font-weight: 600; color: #151A21; }
.history-count { font-size: 11.5px; color: #5B6470; }
.history-item {
    display: flex;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid #EDF0F3;
    cursor: pointer;
    border-radius: 6px;
    background: none;
    border-left: 0;
    border-right: 0;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
}
.history-item:last-child { border-bottom: 0; }
.history-item:hover { background: #F4F6F8; }
.history-icon { color: #5B6470; flex-shrink: 0; width: 22px; text-align: center; margin-top: 2px; }
.history-icon.upcoming { color: #2F5F8A; }
.history-body { flex: 1; min-width: 0; }
.history-date { font-weight: 600; color: #151A21; font-size: 13px; }
.history-detail { font-size: 12px; color: #5B6470; margin-top: 1px; }
.history-chevron { color: #C6CCD4; align-self: center; font-size: 16px; }
.history-badge-upcoming {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    color: #2F5F8A;
    background: #EFF4F9;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: 1px;
}
.history-load-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #F4F6F8;
    border: 0;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #151A21;
    cursor: pointer;
}

.details-footer-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #EDF0F3;
}
.details-footer-row button {
    flex: 1;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #E1E5EA;
    background: #ffffff;
    border-radius: 8px;
    color: #151A21;
    cursor: pointer;
}

/* Override globale .btn width: 100% op mobiel voor onze compacte containers */
#category-filters .btn {
    width: auto !important;
    flex-shrink: 0;
    box-shadow: none;
}
#category-filters .btn:hover {
    transform: none;
    box-shadow: none;
}
.vandaag-card .v-reach button,
.details-reach-row button,
.details-footer-row button {
    width: auto !important;
    box-shadow: none;
    padding: 8px 4px;
}
.vandaag-card .v-primary,
.details-primary-btn {
    box-shadow: none;
}
.vandaag-card .v-reach button:hover,
.details-reach-row button:hover,
.details-footer-row button:hover,
.vandaag-card .v-primary:hover,
.details-primary-btn:hover {
    transform: none;
    box-shadow: none;
}
.history-load-more,
.history-load-more:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Reach-knoppen zonder onderliggend gegeven: visueel gedimd,
   maar wél klikbaar zodat we een uitleg-melding kunnen tonen. */
.vandaag-card .v-reach button.is-disabled,
.details-reach-row button.is-disabled {
    color: #8A93A0;
    background: #F4F6F8;
    cursor: pointer;
}

/* Melding onder de reach-row bij ontbrekende gegevens. */
.missing-info {
    font-size: 12.5px;
    color: #4A5568;
    background: #FFF7E6;
    border: 1px solid #F5D9A6;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.missing-info-edit {
    background: #151A21;
    color: white;
    border: 0;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
    width: auto !important;
}
.missing-info-edit:hover {
    transform: none;
    box-shadow: none;
}

/* Consistente heading-weight tussen appbar-title en modal-titles. */
header h1.h5 {
    font-weight: 600;
}

/* --- Slot-zoeker wizard --- */

#slot-wizard-body {
    padding: 8px 4px 16px;
}
.wizard-step-title {
    font-size: 17px;
    font-weight: 700;
    color: #151A21;
    margin: 0 0 4px;
}
.wizard-step-sub {
    font-size: 12.5px;
    color: #5B6470;
    margin: 0 0 16px;
}

.preset-btn {
    display: block;
    width: 100% !important;
    margin-bottom: 10px;
    padding: 14px;
    text-align: left;
    border: 1px solid #E1E5EA;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: none !important;
    transition: background 0.15s ease;
}
.preset-btn:hover { background: #F4F6F8; transform: none !important; }
.preset-btn .preset-icon { font-size: 20px; margin-right: 10px; vertical-align: -2px; }
.preset-btn .preset-title { font-size: 15px; font-weight: 600; color: #151A21; }
.preset-btn .preset-meta { font-size: 12px; color: #5B6470; margin-top: 3px; margin-left: 30px; }

.horizon-box {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #EDF0F3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.horizon-box label { font-size: 13px; color: #5B6470; margin: 0; }
.horizon-choices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.horizon-preset {
    padding: 6px 12px;
    border: 1px solid #E1E5EA;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #5B6470;
    cursor: pointer;
    width: auto !important;
    min-width: 52px;
}
.horizon-preset:hover { background: #F8F9FA; }
.horizon-preset.active {
    background: #0D6EFD;
    color: white;
    border-color: #0D6EFD;
    font-weight: 600;
}
.horizon-custom-label { font-size: 12px; color: #8A93A0; margin-left: 8px; }
.horizon-box input { width: 60px; padding: 5px 6px; border: 1px solid #E1E5EA; border-radius: 6px; font-size: 13px; text-align: right; }
.horizon-unit { font-size: 12px; color: #8A93A0; }

.anders-form label {
    display: block;
    font-size: 12.5px;
    color: #5B6470;
    margin: 12px 0 4px;
    font-weight: 500;
}
.anders-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #E1E5EA;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.fallback-warn {
    background: #FFF7E6;
    border: 1px solid #F5D9A6;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    color: #4A5568;
    margin-bottom: 14px;
}
.fallback-warn button {
    display: inline-block;
    margin-top: 6px;
    background: #151A21;
    color: white;
    border: 0;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: none !important;
    width: auto !important;
}
.fallback-warn button:hover { transform: none !important; }

.wizard-loading {
    text-align: center;
    padding: 30px 0;
    color: #5B6470;
    font-size: 13px;
}
.wizard-loading .spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #E1E5EA;
    border-top-color: #151A21;
    border-radius: 50%;
    animation: slot-spin 0.8s linear infinite;
    margin-bottom: 8px;
}
@keyframes slot-spin { to { transform: rotate(360deg); } }

.wizard-slot {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    border: 1px solid #E1E5EA;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    cursor: pointer;
    background: white;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wizard-slot:hover {
    border-color: #C6CCD4;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.wizard-slot .day-header {
    font-weight: 700;
    font-size: 14px;
    color: #151A21;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #EDF0F3;
}
.wizard-agenda-row {
    display: flex;
    gap: 10px;
    padding: 3px 0;
    font-size: 12.5px;
}
.wizard-agenda-row .time {
    color: #8A93A0;
    white-space: nowrap;
    width: 100px;
    font-variant-numeric: tabular-nums;
}
.wizard-agenda-row .title { color: #5B6470; }
.wizard-agenda-row.proposal {
    background: #FCF0EF;
    border-left: 3px solid #B23B32;
    margin: 4px -14px;
    padding: 6px 11px;
}
.wizard-agenda-row.proposal .time { color: #B23B32; font-weight: 700; }
.wizard-agenda-row.proposal .title { color: #B23B32; font-weight: 600; }
.wizard-agenda-row.empty { color: #8A93A0; font-style: italic; }
.wizard-agenda-row.allday { background: #F1F3F5; border-radius: 4px; }
.wizard-agenda-row.allday .time { color: #6C757D; font-style: italic; }
.wizard-agenda-row.allday .title { color: #495057; }

.wizard-agenda-row.view-only { color: #B0B7BF; font-style: italic; }
.wizard-agenda-row.view-only .time::before { content: "👁 "; font-style: normal; font-size: 12px; margin-right: 2px; }
.wizard-agenda-row.view-only .title { color: #B0B7BF; }

.calendar-settings-status {
    padding: 12px 14px;
    background: #F0F9F0;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.calendar-settings-status a { color: #6C757D; text-decoration: none; font-size: 13px; }
.calendar-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 6px;
    gap: 12px;
}
.calendar-settings-row .cal-name { font-weight: 600; font-size: 14px; }
.calendar-settings-row .cal-sub { font-size: 12px; word-break: break-all; }
.calendar-settings-row select { max-width: 180px; }
.save-indicator {
    display: inline-block;
    width: 18px;
    text-align: center;
    color: #198754;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.25s;
}
.save-indicator.visible { opacity: 1; }
.save-indicator.saving { color: #6C757D; animation: spin 1s linear infinite; }
/* Mislukt opslaan moet niet in het groen van 'gelukt' staan. */
.save-indicator.failed { color: #DC3545; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.wizard-empty {
    padding: 30px 20px;
    text-align: center;
    color: #5B6470;
}
.wizard-empty .empty-title {
    font-weight: 600;
    color: #151A21;
    margin-bottom: 4px;
}

.wizard-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #EDF0F3;
}
.wizard-actions button {
    padding: 9px 14px;
    border: 1px solid #E1E5EA;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: none !important;
    font-family: inherit;
    width: auto !important;
}
.wizard-actions button:hover { background: #F4F6F8; transform: none !important; }
.wizard-actions .primary {
    background: #151A21;
    color: white;
    border-color: #151A21;
    margin-left: auto;
}
.wizard-actions .primary:hover { background: #1E2530; }


/* ===== Contacten importeren uit telefoon ===== */
.import-wizard-progress { margin-top: .15rem; }
.import-wizard-progress .done { color: var(--bs-success); }
.platform-cards { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 576px) { .platform-cards { flex-direction: row; } .platform-cards .platform-card { flex: 1; } }
.platform-card { border: 2px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); padding: 1rem; text-align: center; cursor: pointer; }
.platform-card.auto-detected { border-color: var(--bs-primary-border-subtle, #9ec5fe); }
.platform-card.selected { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle, #e7f1ff); }
.platform-card .emoji { display: block; font-size: 2rem; }
.export-steps { padding-left: 1.25rem; }
.export-steps li { margin-bottom: .5rem; }
.export-hint { color: var(--bs-secondary-color); font-size: .85rem; }
.file-picker .error { color: var(--bs-danger); font-size: .9rem; }
.wizard-loading { text-align: center; padding: 2rem 0; }
.import-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--bs-border-color); border-radius: .5rem; }
.contact-row { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .75rem; border-bottom: 1px solid var(--bs-border-color-translucent); cursor: pointer; }
.contact-row:last-child { border-bottom: 0; }
.contact-row .name { font-weight: 600; }
.contact-row .summary { font-size: .85rem; color: var(--bs-secondary-color); }
.contact-row.dimmed .name, .contact-row.dimmed .summary { color: var(--bs-secondary-color); }
.contact-row .exists-badge { font-size: .7rem; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); border-radius: .25rem; padding: .05rem .4rem; margin-left: .4rem; font-weight: 400; }
