/* ==============================================
   Youduku Brandguide v1.0 — Style System
   Font: DM Sans / Inter
   Primary: #D44B37 (Duku Rood)
   ============================================== */

@import url('/fonts/fonts.css');

:root {
    /* Primaire kleuren */
    --primary: #D44B37;
    --primary-hover: #B53E2D;
    --primary-pressed: #8F3023;
    /* Donkerder rood voor achtergronden met witte tekst — WCAG AA 4.8:1 contrast */
    --primary-bg: #C04030;
    --primary-light: #FEF2F0;
    --primary-100: #FCDDD8;
    --primary-200: #F5B5AB;
    --primary-300: #ED8C7D;
    --primary-400: #E56350;
    --primary-800: #6A231A;

    /* Neutrale kleuren */
    --white: #FFFFFF;
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F5F5;
    --neutral-200: #E5E5E5;
    --neutral-300: #D4D4D4;
    --neutral-400: #A3A3A3;
    --neutral-500: #6B7280;
    --neutral-600: #4B5563;
    --neutral-700: #374151;
    --neutral-900: #1A1A1A;

    /* Semantische kleuren */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Aliassen */
    --bg-main: var(--neutral-50);
    --bg-sidebar: var(--white);
    --bg-card: var(--white);
    --bg-header: rgba(255, 255, 255, 0.92);
    --bg-input: var(--neutral-50);
    --bg-hover: var(--neutral-100);
    --text-main: var(--neutral-900);
    --text-muted: var(--neutral-500);
    --text-body: var(--neutral-600);
    --text-on-primary: var(--white);
    --border: var(--neutral-200);
    --border-accent: var(--neutral-300);
    --border-focus: var(--primary);

    /* Schaduwen */
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -2px rgba(0,0,0,0.03);

    /* Spacing (8px grid) */
    --radius: 8px;
    --radius-lg: 16px;
}

/* ==============================================
   Reset & Base
   ============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* WCAG — Focus states voor toetsenbordnavigatie */
*:focus-visible {
    outline: 2px solid #D44B37;
    outline-offset: 2px;
}

/* Verberg focus ring bij muisklikken */
*:focus:not(:focus-visible) {
    outline: none;
}

body {
    font-family: 'DM Sans', 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'DM Sans', 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
}

/* ==============================================
   Auth Overlay
   ============================================== */

.auth-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--neutral-50);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-overlay.hidden { display: none; }

.auth-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: slideUp 0.35s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.logo-large-img {
    width: 140px;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.auth-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.login-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.login-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all 0.2s;
    color: var(--text-main);
}

.login-group input:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 75, 55, 0.1);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    background: #FEF2F2;
    padding: 10px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid #FECACA;
}

.login-footer {
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ==============================================
   Layout
   ============================================== */

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon { font-size: 24px; }

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--neutral-900);
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -8px;
    padding: 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-200) transparent;
}

nav::-webkit-scrollbar {
    width: 4px;
}

nav::-webkit-scrollbar-track {
    background: transparent;
}

nav::-webkit-scrollbar-thumb {
    background: var(--neutral-200);
    border-radius: 4px;
}

nav::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-300);
}

.nav-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--neutral-400);
    padding: 16px 16px 4px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border: none;
    background: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.nav-item:hover svg,
.nav-item.active svg {
    opacity: 1;
}

.nav-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.nav-item.active {
    background-color: var(--primary-bg);
    color: var(--text-on-primary);
    box-shadow: 0 2px 8px rgba(212, 75, 55, 0.25);
}

/* AI Chat nav-item highlight */
.nav-item.nav-ai-chat {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    border: 1px solid var(--primary-100);
}

.nav-item.nav-ai-chat:hover {
    background: var(--primary-100);
    color: var(--primary-hover);
}

.nav-item.nav-ai-chat.active {
    background-color: var(--primary-bg);
    color: var(--text-on-primary);
    border-color: var(--primary-bg);
}

.logout-item {
    color: var(--danger) !important;
}

.logout-item:hover {
    background-color: #FEF2F2 !important;
}

.nav-spacer { flex-grow: 1; }

.sidebar-footer {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--neutral-400);
    flex-shrink: 0;
}

.sidebar-footer .logout-item {
    margin-bottom: 8px;
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-main);
}

.top-bar {
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.top-bar h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-bg);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ==============================================
   Views
   ============================================== */

.view {
    padding: 32px;
    animation: fadeIn 0.25s ease-out;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* ==============================================
   Dashboard Stats
   ============================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-card .amount {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.stat-card .amount.highlight { color: var(--primary); }
.stat-card .amount.warning { color: var(--warning); }

.trend {
    font-size: 12px;
    font-weight: 600;
}

.trend.positive { color: var(--success); }
.trend.negative { color: var(--danger); }

/* ==============================================
   Tables
   ============================================== */

.table-container {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: var(--neutral-50);
    padding: 12px 24px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

td {
    padding: 12px 24px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background-color: var(--neutral-50); }

/* Acties-kolom altijd zichtbaar */
td:last-child, th:last-child {
    position: sticky;
    right: 0;
    background-color: var(--bg-card);
    white-space: nowrap;
    z-index: 1;
}

tr:hover td:last-child {
    background-color: var(--neutral-50);
}

th:last-child {
    background-color: var(--neutral-50);
}

/* Lange tekst afkappen */
td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

td:last-child {
    max-width: none;
    overflow: visible;
}

/* Sorting Headers */
th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

th[data-sort]:hover {
    color: var(--text-main);
    background-color: var(--neutral-100);
}

th[data-sort].sort-asc::after {
    content: ' \25B2';
    font-size: 0.7em;
    position: absolute;
    right: 8px;
    color: var(--primary);
}

th[data-sort].sort-desc::after {
    content: ' \25BC';
    font-size: 0.7em;
    position: absolute;
    right: 8px;
    color: var(--primary);
}

/* ==============================================
   Badges (Statussen per brandguide)
   ============================================== */

.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.02em;
}

.badge.concept  { background: var(--neutral-200); color: var(--neutral-700); }
.badge.success  { background: #DCFCE7; color: #166534; }
.badge.info     { background: #DBEAFE; color: #1E40AF; }
.badge.warning  { background: #FEF3C7; color: #92400E; }
.badge.danger   { background: #FEE2E2; color: #991B1B; }

/* ==============================================
   Buttons
   ============================================== */

.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-family: inherit;
    min-width: 120px;
}

.btn-primary {
    background-color: var(--primary-bg);
    color: var(--text-on-primary);
    box-shadow: 0 1px 3px rgba(212, 75, 55, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(212, 75, 55, 0.3);
}

.btn-primary:active {
    background-color: var(--primary-pressed);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
}

.btn-danger {
    background-color: #FEF2F2;
    color: var(--danger);
    border: 1px solid transparent;
}

.btn-danger:hover {
    background-color: #FEE2E2;
    border-color: #FECACA;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    min-width: auto;
}

/* ==============================================
   View Header
   ============================================== */

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-header h3 {
    font-size: 20px;
    color: var(--text-main);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==============================================
   Reports
   ============================================== */

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.report-card {
    background-color: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.report-card h4 {
    margin-bottom: 24px;
    font-size: 18px;
    color: var(--primary);
}

.report-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-main);
}

.report-row span:first-child { color: var(--text-muted); }

.report-row.total {
    font-weight: 700;
    font-size: 18px;
    padding-top: 8px;
    color: var(--primary);
    border-top: 1px solid var(--border);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
}

.note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
    font-style: italic;
}

/* VAT Table */
.vat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.vat-table th, .vat-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.vat-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--neutral-50);
}

.vat-table .spacer-row td {
    padding: 4px;
    border-bottom: none;
}

.vat-table .total-row td {
    border-top: 2px solid var(--border-accent);
    font-weight: 700;
    color: var(--primary);
}

/* ==============================================
   OCR Status
   ============================================== */

.ocr-status {
    background-color: #DBEAFE;
    border: 1px solid #BFDBFE;
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #1E40AF;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--info);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==============================================
   Financial Dashboard
   ============================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.finance-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.finance-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
}

.finance-section.full-width { grid-column: span 2; }

.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--text-body);
}

.finance-table th,
.finance-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    color: var(--text-main);
}

.finance-table th {
    background: var(--neutral-50);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.finance-table td.amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
}

.finance-table tr:last-child td { border-bottom: none; }

.finance-table tr.total-row td {
    border-top: 2px solid var(--border-accent);
    font-weight: 700;
    color: var(--primary);
}

.finance-table tr.sub-header th {
    background: var(--primary-light);
    color: var(--primary);
}

.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }

/* ==============================================
   Forms
   ============================================== */

.form-group { margin-bottom: 16px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    background-color: var(--white);
    color: var(--text-main);
    font-family: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 75, 55, 0.1);
}

input::placeholder { color: var(--neutral-400); }

/* ==============================================
   Dashboard Tips / Inzichten
   ============================================== */
.dashboard-tips {
    margin-bottom: 16px;
}
.tip-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.tip-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 3px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tip-card--high { border-left-color: #D44B37; }
.tip-card--medium { border-left-color: #F59E0B; }
.tip-card--low { border-left-color: #3B82F6; }
.tip-card__title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}
.tip-card__body {
    font-size: 13px;
    color: var(--text-muted, #555);
    line-height: 1.45;
}
.tip-card__actions {
    margin-top: 6px;
}
.tip-card__actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* ==============================================
   Modals
   ============================================== */

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large { max-width: 800px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--neutral-400);
    cursor: pointer;
    transition: color 0.15s;
}

.close-btn:hover { color: var(--text-main); }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ==============================================
   PDF Preview Modal
   ============================================== */

.pdf-preview-content {
    max-width: 900px !important;
    height: 85vh;
    padding: 0 !important;
}

.pdf-preview-content .modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--neutral-100);
}

@media (max-width: 768px) {
    .pdf-preview-content {
        max-width: 100% !important;
        height: 95vh;
        margin: 8px;
        border-radius: 12px;
    }
}

/* ==============================================
   Items Editor (Invoice/Expense)
   ============================================== */

.items-editor {
    margin-top: 24px;
    padding: 20px;
    background-color: var(--neutral-50);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.items-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.inv-grid-header,
.inv-grid-row {
    display: grid !important;
    grid-template-columns: 60px 3fr 120px 1fr 1fr 70px 30px !important;
    gap: 10px;
}

.exp-grid-header,
.exp-grid-row {
    display: grid !important;
    grid-template-columns: 2fr 120px 1fr 1fr 40px !important;
    gap: 12px;
}

.items-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 12px;
    align-items: center;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================
   Settings
   ============================================== */

.settings-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.settings-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.settings-card h4 {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.logo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--neutral-50);
    border-radius: var(--radius);
    border: 2px dashed var(--neutral-300);
}

.logo-preview {
    width: 150px;
    height: 150px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Entities List */
.entities-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==============================================
   Backup & Data Management
   ============================================== */

.backup-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.backup-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.backup-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.backup-info { flex: 1; }

.backup-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 15px;
}

.backup-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.backup-info-box {
    background: #DBEAFE;
    border: 1px solid #BFDBFE;
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 8px;
}

.backup-info-box strong {
    color: #1E40AF;
    display: block;
    margin-bottom: 12px;
}

.backup-info-box ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-main);
}

.backup-info-box li {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}

/* ==============================================
   Drop Zone
   ============================================== */

.drop-zone {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.drop-content {
    text-align: center;
    border: 3px dashed var(--primary);
    padding: 48px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.drop-content .icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.drop-content p {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

/* ==============================================
   AI Chat View
   ============================================== */

.ai-chat-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    height: 540px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.ai-chat-header {
    padding: 16px 20px;
    background: var(--primary-bg);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header .ai-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.ai-chat-header strong {
    font-size: 16px;
    display: block;
}

.ai-chat-header .ai-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--neutral-50);
}

.ai-msg-bot {
    align-self: flex-start;
    background: var(--white);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 12px 12px 12px 2px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid var(--border);
}

.ai-msg-user {
    align-self: flex-end;
    background: var(--primary-bg);
    color: var(--white);
    padding: 10px 14px;
    border-radius: 12px 12px 2px 12px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.6;
}

.ai-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--white);
}

.ai-chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--neutral-50);
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
}

.ai-chat-input-area input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 75, 55, 0.1);
    background: var(--white);
}

.ai-quick-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-quick-btn {
    background: var(--white);
    color: var(--text-body);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.ai-quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ==============================================
   FAQ View
   ============================================== */

.faq-hero {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary-pressed) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
}

.faq-hero h2 {
    color: var(--white);
    margin: 0 0 8px 0;
    font-size: 24px;
}

.faq-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
    line-height: 1.6;
}

.faq-section-title {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 18px;
}

.faq-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.faq-feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.faq-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.faq-feature-card .feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.faq-feature-card h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
}

.faq-feature-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.faq-accordion details {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow 0.15s;
}

.faq-accordion details[open] {
    box-shadow: var(--shadow);
}

.faq-accordion summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-accordion summary::after {
    content: '+';
    font-size: 18px;
    color: var(--neutral-400);
    transition: transform 0.2s;
}

.faq-accordion details[open] summary::after {
    content: '-';
}

.faq-accordion .faq-answer {
    padding: 0 18px 16px;
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
}

.faq-accordion .faq-answer ul {
    padding-left: 20px;
    margin: 8px 0;
}

.faq-accordion .faq-answer li {
    margin-bottom: 4px;
}

.faq-contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.faq-contact-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.faq-contact-card p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ==============================================
   Documents
   ============================================== */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.document-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid var(--border);
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.document-preview {
    height: 140px;
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.document-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-icon {
    font-size: 40px;
    color: var(--neutral-400);
}

.document-info { padding: 16px; }

.document-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-size: 14px;
}

.document-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.document-actions {
    display: flex;
    gap: 8px;
}

.document-actions button {
    flex: 1;
    font-size: 12px;
    padding: 6px;
}

/* ==============================================
   OCR & Attachments
   ============================================== */

.ocr-preview-section {
    background: var(--neutral-900);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.ocr-preview-section h4 {
    margin-top: 0;
    color: var(--success);
    font-size: 14px;
}

#ocr-preview-data {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    color: var(--neutral-400);
    line-height: 1.6;
    white-space: pre-wrap;
}

.ocr-auto-filled {
    background-color: #DCFCE7 !important;
    border-color: var(--success) !important;
    position: relative;
}

.ocr-missing-field {
    background-color: #FEF3C7 !important;
    border-color: var(--warning) !important;
}

.attachments-list {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    background: var(--neutral-50);
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.attachment-icon { font-size: 18px; margin-right: 10px; }

.attachment-details { flex: 1; overflow: hidden; }

.attachment-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: var(--text-main);
}

.attachment-size {
    font-size: 11px;
    color: var(--text-muted);
}

.attachment-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
}

.attachment-delete:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==============================================
   Custom Scrollbar
   ============================================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neutral-400); }

/* ==============================================
   Responsive
   ============================================== */

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .finance-section.full-width { grid-column: span 1; }
    .backup-card { flex-direction: column; align-items: flex-start; }
    .backup-card button, .backup-card label { width: 100%; }
    .settings-grid { grid-template-columns: 1fr; }
}

/* --- Hamburger knop (alleen mobile) --- */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    margin-right: 8px;
    cursor: pointer;
    color: var(--text-main);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn svg { width: 24px; height: 24px; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1499;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.open { display: block; }

@media (max-width: 768px) {
    /* Sidebar als slide-in drawer i.p.v. display:none */
    .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80%;
        max-width: 300px;
        z-index: 1500;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
    }

    .sidebar.open { transform: translateX(0); }

    .hamburger-btn { display: inline-flex; }

    .content { padding-bottom: 70px; }
    .view { padding: 16px; }
    .top-bar { padding: 0 16px; height: 56px; }
    .top-bar h2 { font-size: 17px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .form-row { grid-template-columns: 1fr !important; }
    .budgetcoach-alerts { flex-direction: column; }
    .view-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .header-actions { width: 100%; flex-wrap: wrap; }
    .header-actions .btn { flex: 1; min-width: 0; font-size: 12px; padding: 10px 12px; }
    .report-grid { grid-template-columns: 1fr; }
    .report-card { padding: 20px; }

    /* --- Responsive tabellen --- */
    .hide-mobile { display: none !important; }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 8px 12px;
        font-size: 13px;
    }

    td:last-child {
        white-space: nowrap;
    }

    td .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
        min-width: auto;
    }

    /* --- Responsive modals (full screen, fixed bottom action bar) --- */
    .modal {
        align-items: stretch;
        justify-content: stretch;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        max-height: none;
        border-radius: 0;
        margin: 0;
        padding: 16px;
        /* Reserveer ruimte onderaan voor vaste action bar (~76px) + safe-area */
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        overflow: visible;
    }

    .modal-large {
        max-width: 100%;
    }

    /* Fixed action/footer bar onderaan viewport — altijd zichtbaar, ook bij lange formulieren */
    .modal-actions,
    .modal-footer {
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        margin-top: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
        z-index: 2100;
    }

    .modal-actions .btn,
    .modal-footer .btn {
        width: 100%;
        min-height: 44px;
    }

    /* Tap targets ≥44px conform Apple HIG / Material */
    .close-btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn,
    .btn-sm,
    .nav-item,
    button[type="submit"] {
        min-height: 44px;
    }

    /* Voorkom horizontale scroll in formulieren */
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* --- Factuur/uitgave items editor (stacked op mobiel) --- */
    .inv-grid-header,
    .exp-grid-header {
        display: none !important;
    }

    .inv-grid-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        margin-bottom: 8px;
        grid-template-columns: none !important;
    }

    .exp-grid-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        margin-bottom: 8px;
        grid-template-columns: none !important;
    }

    .inv-grid-row input,
    .inv-grid-row select,
    .exp-grid-row input,
    .exp-grid-row select {
        width: 100% !important;
    }

    .inv-grid-row .btn-remove,
    .exp-grid-row .btn-remove {
        align-self: flex-end;
    }

    /* --- Dashboard grid stacked --- */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .finance-section.full-width {
        grid-column: span 1;
    }

    /* --- AI Chat container full height --- */
    .ai-chat-container {
        height: calc(100vh - 130px);
        border-radius: 0;
    }

    /* --- Settings grid stacked --- */
    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* --- Alert pills stacked --- */
    .alert-pill {
        min-width: 0;
        flex-direction: column;
        gap: 8px;
    }

    .alert-actions {
        margin-left: 0;
        width: 100%;
    }

    /* --- FAQ cards --- */
    .faq-cards { grid-template-columns: 1fr 1fr; }

    .faq-hero {
        padding: 20px;
    }

    .faq-hero h2 {
        font-size: 20px;
    }

    /* --- Documents grid --- */
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }

    .faq-cards {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }
}

/* ==============================================
   Mobile Bottom Navigation
   ============================================== */

.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--neutral-900);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        height: 64px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        align-items: center;
        justify-content: space-around;
        box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: var(--neutral-500);
        font-family: 'DM Sans', sans-serif;
        font-size: 10px;
        font-weight: 500;
        cursor: pointer;
        padding: 8px 4px;
        min-width: 56px;
        position: relative;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-btn svg {
        width: 22px;
        height: 22px;
        transition: color 0.15s;
    }

    .mobile-nav-btn.active {
        color: var(--primary);
    }

    .mobile-nav-btn .mobile-badge {
        position: absolute;
        top: 2px;
        right: 8px;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        background: var(--primary);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        font-family: 'JetBrains Mono', monospace;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        line-height: 1;
    }
}

/* Mobile "Meer" overlay */
.mobile-more-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-more-overlay.open {
    display: block;
}

.mobile-more-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--neutral-900);
    border-radius: 16px 16px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 0) 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-more-overlay.open .mobile-more-sheet {
    transform: translateY(0);
}

.mobile-more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-more-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.mobile-more-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-more-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.mobile-more-list {
    padding: 8px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-more-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    background: none;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-more-item:hover,
.mobile-more-item:active {
    background: rgba(255, 255, 255, 0.06);
}

.mobile-more-item svg {
    width: 20px;
    height: 20px;
    color: var(--neutral-500);
    flex-shrink: 0;
}

.mobile-more-item.logout-item {
    color: var(--danger);
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    border-radius: 0 0 10px 10px;
}

.mobile-more-item.logout-item svg {
    color: var(--danger);
}

/* ==============================================
   Budgetcoach Alerts
   ============================================== */
.budgetcoach-alerts {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.alert-pill {
    flex: 1;
    min-width: 220px;
    padding: 16px 20px;
    border-radius: 8px;
    background: #1A1A1A;
    border-left: 4px solid transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #e5e5e5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-pill .alert-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 13px;
}

.alert-pill .alert-text {
    flex: 1;
}

.alert-pill .alert-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    opacity: 0.7;
}

.alert-pill .alert-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
}

.alert-pill--red {
    border-left-color: #D44B37;
}
.alert-pill--red .alert-icon {
    background: rgba(212, 75, 55, 0.15);
    color: #D44B37;
}

.alert-pill--yellow {
    border-left-color: #F59E0B;
}
.alert-pill--yellow .alert-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.alert-pill--green {
    border-left-color: #10B981;
}
.alert-pill--green .alert-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.alert-pill--blue {
    border-left-color: #3B82F6;
}
.alert-pill--blue .alert-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

/* Alert actieknoppen */
.alert-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.alert-action {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    color: #e5e5e5;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.alert-action:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}

.alert-dismiss {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    background: none;
    color: rgba(255,255,255,0.25);
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.alert-dismiss:hover {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.06);
}

/* ==============================================
   AI Consent Modal
   ============================================== */

.ai-consent-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    backdrop-filter: blur(4px);
}

.ai-consent-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.ai-consent-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.ai-consent-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-body);
    margin-bottom: 24px;
}

.ai-consent-card a {
    color: var(--primary);
    text-decoration: underline;
}

.ai-consent-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Coach badge in nav */
.coach-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--primary-bg);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 0 5px;
    margin-left: 6px;
    line-height: 1;
}

/* ==========================================================================
   Duku Logo Icon
   ========================================================================== */
.duku-logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   FAQ Search
   ========================================================================== */
.faq-search-wrap {
    position: relative;
    max-width: 480px;
    margin: 20px auto 0;
}
.faq-search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    transition: border-color 0.2s;
}
.faq-search-wrap input:focus {
    outline: none;
    border-color: #D44B37;
    box-shadow: 0 0 0 3px rgba(212, 75, 55, 0.1);
}
.faq-feature-card[onclick] { cursor: pointer; }

/* ==========================================================================
   Workflow Steps (landing page)
   ========================================================================== */
.workflow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
}
.workflow-step {
    flex: 0 1 260px;
    text-align: center;
    padding: 24px 20px;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
}
.workflow-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #D44B37;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 12px;
}
.workflow-step h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 8px;
}
.workflow-step p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}
.workflow-arrow {
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin-top: 48px;
}
@media (max-width: 768px) {
    .workflow-steps {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .workflow-step { flex: none; width: 100%; max-width: 320px; }
    .workflow-arrow { transform: rotate(90deg); margin: 0; padding: 0; }
}

/* ==============================================
   Paywall Overlay
   ============================================== */
#paywall-overlay {
    position: fixed;
    inset: 0;
    background: #F5F5F5;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
}

.paywall-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.paywall-logo {
    height: 40px;
    margin-bottom: 24px;
}

.paywall-title {
    font-size: 24px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 12px 0;
}

.paywall-text {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 28px 0;
}

.paywall-price {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.paywall-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #1A1A1A;
}

.paywall-period {
    font-size: 15px;
    color: #888;
}

.paywall-cta {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #D44B37;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.paywall-cta:hover {
    background: #B53E2D;
}

.paywall-cta:active {
    background: #8F3023;
}

.paywall-sub {
    font-size: 13px;
    color: #999;
    margin: 16px 0 0 0;
}

/* Past Due Banner */
#past-due-banner {
    background: #FEF2F2;
    border: 1px solid #D44B37;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 16px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #1A1A1A;
}

#past-due-banner button {
    background: #D44B37;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

#past-due-banner button:hover {
    background: #B53E2D;
}

@media (max-width: 480px) {
    .paywall-card {
        padding: 32px 24px;
    }
    #past-due-banner {
        flex-direction: column;
        text-align: center;
        margin: 12px 12px 0 12px;
    }
}
