/* Dashboard Specific Styles */

/* Screen reader only helper class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Login Section */
.login-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--accent-color) 100%);
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 450px;
    width: 100%;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.login-help {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-cream);
    border-radius: 8px;
    font-size: 0.9rem;
}

.login-help p {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.demo-info {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Dashboard Section */
.dashboard-section {
    min-height: calc(100vh - 70px);
    padding-top: 100px;
    background-color: var(--bg-cream);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

#user-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.role-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.role-badge.admin {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.role-badge.client {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-controls select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Orders Container */
.orders-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow);
    overflow: hidden;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.orders-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
}

.orders-table tbody tr {
    border-bottom: 1px solid var(--accent-color);
    transition: background-color 0.2s ease;
}

.orders-table tbody tr:hover {
    background-color: var(--bg-cream);
}

.orders-table td {
    padding: 1rem;
    color: var(--text-dark);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-in_behandeling {
    background-color: #FFF3CD;
    color: #856404;
}

.status-in_uitvoering {
    background-color: #CCE5FF;
    color: #004085;
}

.status-voltooid {
    background-color: #D4EDDA;
    color: #155724;
}

.status-geannuleerd {
    background-color: #F8D7DA;
    color: #721C24;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-view,
.btn-update {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-view {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-view:hover {
    background-color: var(--text-dark);
}

.btn-update {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-update:hover {
    background-color: var(--secondary-color);
}

.no-orders {
    padding: 3rem;
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 36, 22, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

#modal-title {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.modal-body {
    line-height: 1.8;
}

.modal-body p {
    margin: 0.8rem 0;
    color: var(--text-dark);
}

.modal-body strong {
    color: var(--secondary-color);
}

.update-status-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--accent-color);
}

.update-status-form select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.update-status-form button {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .orders-table {
        font-size: 0.9rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.7rem 0.5rem;
    }

    .login-container {
        padding: 2rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .orders-table {
        font-size: 0.8rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-view,
    .btn-update {
        width: 100%;
        text-align: center;
    }
}

/* Hide client column header for client users */
.client-view #client-header {
    display: none;
}

.client-view .client-column {
    display: none;
}
