/* 
=========================================================
  AH - Dashboard Architecture (Admin & Customer)
========================================================= 
*/

body {
    background-color: #F8FAFC;
    overflow-x: hidden;
}

/* --- Dashboard Layout --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar Navigation --- */
.sidebar {
    width: 280px;
    background-color: var(--color-bg-main);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-item-dash {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item-dash i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
}

.nav-item-dash:hover, .nav-item-dash.active {
    background-color: rgba(27, 94, 32, 0.05);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
}

/* --- Main Content Area --- */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 280px);
}

.topbar {
    background-color: var(--color-bg-main);
    height: 70px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-dark);
    cursor: pointer;
}

.content-area {
    padding: 30px;
    flex: 1;
}

/* --- Dashboard Specific UI Components --- */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(27, 94, 32, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.dashboard-table {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.dashboard-table thead {
    background-color: #F8FAFC;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 24px;
}

.dashboard-table td {
    padding: 16px 24px;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-pending { background: rgba(249, 168, 37, 0.15); color: #F57F17; }
.badge-active { background: rgba(2, 136, 209, 0.15); color: #0288D1; }
.badge-completed { background: rgba(46, 125, 50, 0.15); color: var(--color-success); }
.badge-canceled { background: rgba(211, 47, 47, 0.15); color: var(--color-danger); }

/* Timeline UI */
.booking-timeline {
    position: relative;
    padding-left: 30px;
    margin: 20px 0;
}
.booking-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}
.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-border);
    border: 3px solid white;
}
.timeline-item.active::before {
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.2);
}
.timeline-item.done::before {
    background: var(--color-success);
}

/* Tab Switching (SPA Simulation) */
.tab-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.tab-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .mobile-toggle { display: block; }
    
    /* Overlay */
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999;
        opacity: 0; visibility: hidden; transition: all 0.3s ease;
    }
    .sidebar-overlay.show { opacity: 1; visibility: visible; }
}


/* ========================================== */
/* CUSTOMER PORTAL & LOYALTY SYSTEM           */
/* ========================================== */

.membership-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.membership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
}

.quick-action-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.quick-action-card:hover {
    transform: translateY(-5px);
    filter: brightness(0.95);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.profile-pane {
    animation: fadeIn 0.3s ease;
}

#chatBox::-webkit-scrollbar {
    width: 6px;
}
#chatBox::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.timeline-item.active i {
    animation: bounceRight 1.5s infinite;
}
@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.dashboard-table tbody tr {
    transition: background-color 0.2s ease;
}
.dashboard-table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}
