/* ============================================
   WORKSHOP DASHBOARD — Keegz Auto Care
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-button: #1a1a1a;
    --text: #ffffff;
    --text-dim: #888888;
    --text-muted: #555555;
    --accent: #00b4d8;
    --accent-glow: rgba(0, 180, 216, 0.25);
    --border: #222222;
    --border-light: #2a2a2a;
    --radius: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* --- Layout --- */
.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* --- Header --- */
.dash-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 3px;
}

.dash-subtitle {
    font-size: 14px;
    color: var(--text-dim);
}

/* --- Filters --- */
.dash-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-button);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--border-light);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* --- Stats --- */
.dash-stats {
    display: flex;
    gap: 16px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 80px;
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}

.stat-pending {
    color: #f0ad4e;
}

.stat-confirmed {
    color: #5cb85c;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* --- Table --- */
.dash-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dash-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}

.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    vertical-align: middle;
}

.booking-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.booking-row:hover {
    background: var(--bg-card);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(240, 173, 78, 0.15);
    color: #f0ad4e;
    border: 1px solid rgba(240, 173, 78, 0.3);
}

.status-confirmed {
    background: rgba(92, 184, 92, 0.15);
    color: #5cb85c;
    border: 1px solid rgba(92, 184, 92, 0.3);
}

.status-completed {
    background: rgba(100, 100, 100, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(100, 100, 100, 0.3);
}

.view-btn {
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-button);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: all 0.2s ease;
}

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

.dash-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 40px 0;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: var(--text-muted);
    transition: color 0.2s ease;
    line-height: 1;
}

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

.modal-title {
    font-size: 20px;
    font-weight: 700;
    padding-right: 32px;
}

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

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-field-full {
    grid-column: 1 / -1;
}

.modal-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-value {
    font-size: 14px;
    color: var(--text-dim);
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-btn-confirm {
    background: rgba(92, 184, 92, 0.15);
    border: 1px solid rgba(92, 184, 92, 0.3);
    color: #5cb85c;
}

.modal-btn-confirm:hover {
    background: rgba(92, 184, 92, 0.25);
}

.modal-btn-complete {
    background: rgba(100, 100, 100, 0.15);
    border: 1px solid rgba(100, 100, 100, 0.3);
    color: var(--text-dim);
}

.modal-btn-complete:hover {
    background: rgba(100, 100, 100, 0.25);
}

.modal-btn-delete {
    background: rgba(220, 50, 50, 0.1);
    border: 1px solid rgba(220, 50, 50, 0.3);
    color: #e55;
}

.modal-btn-delete:hover {
    background: rgba(220, 50, 50, 0.2);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .dash-table th:nth-child(5),
    .dash-table td:nth-child(5) {
        display: none;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }
}
