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

:root {
    --primary: #03543d;
    --primary-dark: #024530;
    --primary-light: #059669;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--primary);
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 60px;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 36px;
    width: auto;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.navbar-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hamburger menu button */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

/* Mobile responsive navbar */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0 1rem;
        height: auto;
        min-height: 60px;
    }

    .navbar-brand {
        flex: 1;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        padding: 0.5rem 0 1rem;
        gap: 0.25rem;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        padding: 0.75rem 1rem;
        border-radius: 4px;
    }

    .navbar-user {
        order: 2;
        gap: 0.5rem;
    }

    .navbar-user span {
        display: none;
    }

    .container {
        padding: 1rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.625rem 0.5rem;
    }

    .actions {
        flex-direction: column;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.table tr:hover {
    background: var(--gray-50);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3, 84, 61, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-bank-rabo {
    background: #f0f4ff;
    color: #ff6600;
    font-size: 0.7rem;
}

.badge-bank-abn {
    background: #e8f5e9;
    color: #004d32;
    font-size: 0.7rem;
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

/* Utilities */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }

/* Actions column */
.actions {
    display: flex;
    gap: 0.5rem;
}

/* Currency */
.currency {
    font-variant-numeric: tabular-nums;
}

/* Print styles */
@media print {
    .navbar, .footer, .btn, .actions, .no-print {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}
