:root {
    --primary: #1a3c5e;
    --accent: #3498db;
    --text: #2c3e50;
    --white: #ffffff;
    --error: #e74c3c;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
}

.login-page {
    min-height: 100svh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Een verloop dat lijkt op de diepe zee bij nacht */
    background: radial-gradient(circle at top right, #2c3e50, #000000);
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
}

.icon-circle i {
    font-size: 28px;
    color: var(--accent);
}

.login-header h2 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Input velden met iconen */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    transition: color 0.3s;
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #f1f1f1;
    border-radius: 12px;
    font-size: 15px;
    background: #f9f9f9;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--accent);
}

.input-group input:focus + i {
    color: var(--accent);
}

/* Login knop styling */
.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #2980b9;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

/* Foutmelding */
.error-banner {
    display: none;
    background: #fdf0ef;
    color: var(--error);
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 20px;
    border: 1px solid #fadbd8;
    text-align: center;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}


:root {
    --primary-dark: #0f172a;
    --sidebar-bg: #1e293b;
    --accent: #3b82f6;
    --bg-main: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

/* Schermvullende layout */
body, html {
    height: 100%;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    width: 100vw;
    min-height: 100svh;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon { font-size: 24px; color: var(--accent); }
.logo-text { font-size: 20px; font-weight: 700; letter-spacing: 1px; }

.sidebar-company-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active { background-color: var(--accent); }

.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }

.btn-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.welcome h1 { font-size: 32px; color: var(--primary-dark); }
.welcome p { color: var(--text-muted); margin-top: 5px; }

.status-badge {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.status-water { background: #dbeafe; color: #1e40af; }
.status-stalling { background: #fef3c7; color: #92400e; }

/* Grid Layout voor kaarten */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.icon-box.blue { background: #eff6ff; color: #3b82f6; }
.icon-box.orange { background: #fff7ed; color: #f97316; }
.icon-box.green { background: #f0fdf4; color: #22c55e; }

.card-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child { border: none; }

.detail-item span { color: var(--text-muted); font-size: 14px; }
.detail-item strong { color: var(--text-main); font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
    .login-page {
        padding: 20px 12px;
        align-items: stretch;
    }

    .login-container {
        max-width: 100%;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .login-box {
        width: 100%;
        padding: 24px 18px;
        border-radius: 16px;
    }

    .app-container {
        flex-direction: column;
        width: 100%;
        min-height: 100svh;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 10px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sidebar-header {
        padding: 8px 8px 12px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .logo-text {
        font-size: 18px;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        padding: 4px 0 8px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .nav-item {
        margin-bottom: 0;
        padding: 10px 12px;
        border-radius: 10px;
        gap: 8px;
        white-space: nowrap;
        flex: 0 0 auto;
        font-size: 14px;
    }

    .sidebar-footer {
        border-top: none;
        padding: 8px 0 0;
    }

    .btn-logout {
        padding: 10px;
        font-size: 14px;
    }

    .main-content {
        padding: 16px;
        overflow: visible;
    }

    .top-bar {
        margin-bottom: 20px;
    }

    .welcome h1 {
        font-size: 24px;
    }

    .welcome p {
        font-size: 14px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 18px;
        border-radius: 14px;
    }

    .card-head {
        margin-bottom: 16px;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .portal-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .modal-content {
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 420px) {
    .main-content {
        padding: 12px;
    }

    .stat-card {
        padding: 14px;
    }

    .icon-box {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .card-head h3 {
        font-size: 16px;
    }
}

.full-width { width: 100%; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.invoice-table th {
    padding: 15px;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
}

.invoice-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
}

.status-betaald { background: #dcfce7; color: #166534; }
.status-verzonden { background: #fef9c3; color: #854d0e; }
.status-overtijd { background: #fee2e2; color: #991b1b; }

.btn-view {
    background: #f1f5f9;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--accent);
    transition: 0.2s;
}

.btn-view:hover {
    background: var(--accent);
    color: white;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: slideUp 0.3s ease;
}

.btn-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

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

.portal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.portal-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-form-group.full-width {
    grid-column: 1 / -1;
}

.portal-form-group label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.portal-form-group input,
.portal-form-group select,
.portal-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 14px;
}

.portal-textarea {
    resize: vertical;
    min-height: 120px;
}

.portal-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
}

.portal-status-badge.status-nieuw {
    background: #fef3c7;
    color: #92400e;
}

.portal-status-badge.status-wacht_op_prijs_akkoord {
    background: #ffedd5;
    color: #9a3412;
}

.portal-status-badge.status-prijs_akkoord {
    background: #dbeafe;
    color: #1d4ed8;
}

.portal-status-badge.status-wacht_op_datum_akkoord {
    background: #ede9fe;
    color: #6d28d9;
}

.portal-status-badge.status-datum_akkoord {
    background: #e0e7ff;
    color: #3730a3;
}

.portal-status-badge.status-ingepland {
    background: #dbeafe;
    color: #1e40af;
}

.portal-status-badge.status-in_uitvoering {
    background: #ede9fe;
    color: #5b21b6;
}

.portal-status-badge.status-afgerond {
    background: #dcfce7;
    color: #166534;
}

.portal-status-badge.status-gefactureerd {
    background: #d1fae5;
    color: #065f46;
}

.portal-status-badge.status-geannuleerd {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 900px) {
    .portal-form-grid {
        grid-template-columns: 1fr;
    }
}

        /* Toast Meldingen */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #10b981; /* Succes groen */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out forwards;
}

.toast.error {
    background: #ef4444; /* Rood */
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
