/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
    height: 100%;
    margin: 0;
    color: #111827;
}

body {
    background-color: #f9fafb;
}

/* Navbar */
.navbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px 14px;
    margin: 10px;

    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.navbar-left,
.navbar-right {
    flex: 1;
}

.navbar-center {
    flex: 1;
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.menu-button,
.avatar-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}

.menu-button:hover,
.avatar-button:hover {
    background-color: #e5edff;
    transform: translateY(-1px);
}

.menu-button .material-symbols-outlined {
    font-size: 24px;
    color: #1f2937;
}

.avatar-button img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
}

.dropdown-right {
    right: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #111827;
    padding: 10px 14px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background 0.15s;
}

.dropdown-content a:hover {
    background-color: #f3f4f6;
}

.badge {
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 8px;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 12px 32px;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 10px;
}

.alert {
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;

    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.alert-success {
    border-color: #bbf7d0;
    background-color: #ecfdf3;
    color: #166534;
}

.alert-error {
    border-color: #fecaca;
    background-color: #fef2f2;
    color: #b91c1c;
}

/* Page Header */
.page-header {
    margin: 10px 10px 16px;
    padding: 10px 4px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.subtitle {
    color: #6b7280;
    font-size: 15px;
}

/* Card (generiek) */
.card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    margin: 10px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.card-header {
    padding: 15px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.card-body {
    padding: 20px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table thead {
    background-color: #f3f4f6;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #374151;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.mono {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.text-muted {
    color: #9ca3af;
}

.text-small {
    font-size: 13px;
}

.link {
    color: #2563eb;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Badges */
.badge-role {
    display: inline-block;
    padding: 4px 8px;
    background-color: #eef2ff;
    border-radius: 999px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
    color: #3730a3;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn .material-symbols-outlined {
    font-size: 18px;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-secondary:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-danger:hover {
    background-color: #fecaca;
    border-color: #fca5a5;
    box-shadow: 0 8px 18px rgba(248, 113, 113, 0.35);
    transform: translateY(-1px);
}

.btn-small {
    padding: 5px 10px;
    font-size: 13px;
}

.btn-small .material-symbols-outlined {
    font-size: 16px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;
}

.form-input {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;

    background-color: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.close-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}

.close-button:hover {
    background-color: #e5edff;
    transform: translateY(-1px);
}

.close-button .material-symbols-outlined {
    font-size: 24px;
    color: #111827;
}

.modal-content form {
    padding: 18px 22px 10px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 22px 18px;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

/* Dashboard grid en cards (Sales Dashboard) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 24px 10px 0;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-card:hover {
    border-color: #2563eb;
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.dashboard-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.dashboard-card-disabled:hover {
    transform: none;
    border-color: #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-card-icon {
    width: 70px;
    height: 70px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.dashboard-card-icon .material-symbols-outlined {
    font-size: 40px;
    color: #2563eb;
}

.dashboard-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.dashboard-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 12px;
        margin: 8px;
    }

    .container {
        padding: 10px 10px 24px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button,
    .action-buttons form {
        width: 100%;
    }

    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}
