:root {
    --bg-color: #FDFBF7; /* Warm off-white */
    --text-primary: #2C2C2C;
    --text-secondary: #6B7280;
    --card-bg: #FFFFFF;
    --brand-color: #D4A373; /* Soft Gold/Beige */
    --accent-pink: #FFE5EC;
    --accent-blue: #E0F2F1; /* Minty Blue */
    --accent-purple: #F3E5F5;
    --accent-green: #E8F5E9;
    --success-text: #2E7D32;
    --pending-text: #F57C00;
    --border-color: #EEEEEF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    /* Removed box-shadow to match home */
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 800; /* Increased to match Home */
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-area .highlight {
    color: var(--brand-color);
    font-weight: 700;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-primary); /* Changed to primary to match home weight/color logic */
    font-weight: 600; /* Increased to match Home */
    font-size: 1rem; /* Increased to match Home */
    transition: color 0.3s; /* Changed to 0.3s to match Home */
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--brand-color); /* Kept brand color but it functions as the accent */
    /* font-weight: 600; Removed redundant re-declaration */
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFD1DC, #D4A373);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-info .role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Layout */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* KPI Cards */
.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.kpi-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.pastel-blue { background-color: #E3F2FD; color: #1E88E5; }
.pastel-purple { background-color: #F3E5F5; color: #8E24AA; }
.pastel-green { background-color: #E8F5E9; color: #43A047; }
.pastel-orange { background-color: #FFF3E0; color: #FB8C00; }

.kpi-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.kpi-info .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.kpi-info .trend {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.kpi-info .trend.up {
    color: var(--success-text);
    font-weight: 500;
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Booking Table (Wide) | Side Widgets (Narrow) */
    gap: 2rem;
}

/* Common Card Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

/* Booking Table */
.table-responsive {
    overflow-x: auto;
}

.booking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.booking-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.booking-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.booking-table tr:last-child td {
    border-bottom: none;
}

.status {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status.confirmed {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status.pending {
    background-color: #FFF3E0;
    color: #EF6C00;
}

/* Side Widgets */
.side-widgets {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Staff Schedule */
.staff-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.staff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.staff-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.staff-info {
    display: flex;
    flex-direction: column;
}

.staff-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.staff-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.availability {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.availability.available {
    color: var(--success-text);
    background: var(--accent-green);
}

.availability.busy {
    color: #C62828;
    background: #FFEBEE;
}

.availability.partial {
    color: #1565C0;
    background: #E3F2FD;
}

/* Automation Status */
.automation-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.auto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #F5F5F7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.auto-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auto-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.auto-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.auto-status.active {
    color: var(--success-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.auto-status.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--success-text);
    border-radius: 50%;
}

/* Customer Insights */
.insight-stats {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.insight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #FAFAFA;
    border-radius: var(--radius-md);
}

.insight-row .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.insight-row .value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.highlight-text {
    color: var(--brand-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr; /* Stack everything */
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1.5rem;
    }
    
    .dashboard-header {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        text-align: center;
        width: 100%;
        z-index: 99;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .kpi-section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .kpi-section {
        grid-template-columns: 1fr;
    }
    
    .card-header h2 {
        font-size: 1.1rem;
    }
}
