/* Order Tracker - Modern CSS Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --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);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--surface);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-badge {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.user-badge.admin {
    background: var(--success-color);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.nav-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: var(--primary-color);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Main Content */
.main-content {
    background: var(--surface);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-box .subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-info p {
    margin: 5px 0;
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Tables */
.orders-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.orders-table thead {
    background: var(--background);
}

.orders-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.orders-table th:nth-child(1) {
    width: 120px;
    min-width: 120px;
}

.orders-table th:nth-child(2) {
    width: 180px;
    min-width: 180px;
}

.orders-table th:nth-child(3) {
    width: 120px;
    min-width: 120px;
}

.orders-table th:nth-child(6) {
    width: 140px;
    min-width: 140px;
}

.orders-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.orders-table td:nth-child(4) {
    white-space: normal;
    line-height: 1.6;
}

.orders-table tbody tr:hover {
    background: var(--background);
}

.amount {
    font-weight: 600;
    color: var(--primary-color);
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.status-onvolledig {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    color: #78350f;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.status-klaar {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
    color: #064e3b;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.status-factuur-op-te-stellen {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 50%, #f9a8d4 100%);
    color: #831843;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.4);
}

.status-gefactureerd {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    color: #1e3a8a;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.status-verwijderd {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 50%, #fca5a5 100%);
    color: #7f1d1d;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    opacity: 0.85;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Status Filter Buttons */
.status-filter {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-filter-onvolledig {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #78350f !important;
}

.status-filter-onvolledig.active {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%) !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4) !important;
}

.status-filter-klaar {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #064e3b !important;
}

.status-filter-klaar.active {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%) !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4) !important;
}

.status-filter-gefactureerd {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e3a8a !important;
}

.status-filter-factuur-op-te-stellen {
    border-color: #db2777 !important;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%) !important;
    color: #831843 !important;
}

.status-filter-factuur-op-te-stellen.active {
    background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 100%) !important;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.4) !important;
}

.status-filter-gefactureerd.active {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4) !important;
}

.status-filter-verwijderd {
    border-color: #ef4444 !important;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #7f1d1d !important;
}

.status-filter-verwijderd.active {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%) !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4) !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state a {
    color: var(--primary-color);
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Export Section */
.export-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.export-card {
    background: var(--background);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.export-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.export-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.export-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.export-info {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.export-info h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.export-info ul {
    list-style: none;
    padding-left: 0;
}

.export-info li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.export-info li:last-child {
    border-bottom: none;
}

.preview-section {
    margin-top: 20px;
}

.preview-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .main-content {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .export-actions {
        flex-direction: column;
    }

    .export-actions .btn {
        width: 100%;
    }
}
