/* QBill — Dashboard Styles */
/* Rule: No custom CSS media queries. Bootstrap 5 handles all responsive layouts. */

.dashboard-wrapper {
    background-color: var(--qb-cream);
    min-height: 100vh;
}

/* Sidebar */
.dash-sidebar {
    width: clamp(200px, 15vw, 230px);
    background-color: var(--qb-cream-surface);
    border-right: 1px solid var(--qb-border);
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-logo {
    height: clamp(34px, 2.8vw, 40px);
    width: auto;
    object-fit: contain;
}
.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.26rem 0.65rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.79rem;
    color: var(--qb-espresso-muted);
    text-decoration: none;
    margin-bottom: 0.05rem;
    transition: all 0.2s ease;
}
.dash-nav-item:hover {
    color: var(--qb-terracotta);
    background-color: var(--qb-peach-light);
}
.dash-nav-item.active {
    background-color: var(--qb-terracotta);
    color: var(--qb-white);
    box-shadow: 0 4px 10px rgba(185, 83, 50, 0.25);
}
.dash-nav-item.active i {
    color: var(--qb-white);
}

/* Dashboard Topbar */
.dash-topbar {
    background-color: var(--qb-cream-surface);
    border-bottom: 1px solid var(--qb-border);
    padding: 0.35rem 1.25rem;
}
.branch-pill {
    background-color: var(--qb-peach-light);
    border: 1px solid var(--qb-border);
    border-radius: 8px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--qb-espresso);
    cursor: pointer;
}
.notification-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--qb-peach-light);
    border: 1px solid var(--qb-border);
    color: var(--qb-espresso);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.notification-btn:hover {
    background-color: var(--qb-peach);
}
.notification-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: var(--qb-terracotta);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
}

/* Stat Cards (Themed per reference) */
.stat-widget {
    border-radius: 10px;
    padding: 0.4rem 0.65rem;
    border: 1px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
.stat-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(50, 28, 23, 0.06);
}
.stat-widget-sales {
    background-color: #FFF6EE;
    border-color: #FDE2CD;
}
.stat-widget-orders {
    background-color: #EFF8FF;
    border-color: #D2EAFF;
}
.stat-widget-tables {
    background-color: #FEFCE8;
    border-color: #FEEAA0;
}
.stat-widget-kot {
    background-color: #FEF2F2;
    border-color: #FECACA;
}
.stat-widget-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.stat-val {
    font-size: clamp(1.1rem, 1.35vw, 1.3rem);
    font-weight: 800;
    color: var(--qb-espresso);
    line-height: 1.1;
    margin-top: 0.1rem;
}
.stat-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--qb-espresso-muted);
}

/* Dashboard Cards Common */
.dash-card {
    background-color: var(--qb-white);
    border: 1px solid var(--qb-border);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}
.dash-card-header {
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid var(--qb-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Live Orders Table */
.order-table th {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--qb-espresso-muted);
    padding: 0.24rem 0.55rem;
    background-color: var(--qb-cream-alt);
    border-bottom: 1px solid var(--qb-border-light);
}
.order-table td {
    padding: 0.2rem 0.55rem;
    font-size: 0.76rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--qb-border-light);
}
.order-table tr:last-child td {
    border-bottom: none;
}
.order-icon-box {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background-color: var(--qb-peach-light);
    color: var(--qb-terracotta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Status Badges */
.badge-status-new {
    background-color: #FDE8E8;
    color: #9B1C1C;
    border: 1px solid #F8B4B4;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
    display: inline-block;
}
.badge-status-prep {
    background-color: #FEF08A;
    color: #854D0E;
    border: 1px solid #FDE047;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
    display: inline-block;
}
.badge-status-ready {
    background-color: #DEF7EC;
    color: #03543F;
    border: 1px solid #BCF0DA;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.68rem;
    padding: 0.1rem 0.45rem;
    display: inline-block;
}

/* Table Status Tiles */
.table-tile {
    border-radius: 6px;
    padding: 0.18rem 0.1rem;
    text-align: center;
    font-size: 0.68rem;
    line-height: 1.1;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.table-tile-occupied {
    background-color: #DCFCE7;
    border-color: #BBF7D0;
    color: #15803D;
}
.table-tile-available {
    background-color: #F3F4F6;
    border-color: #E5E7EB;
    color: #4B5563;
}
.table-tile-reserved {
    background-color: #FEE2E2;
    border-color: #FECACA;
    color: #B91C1C;
}

/* Quick Action Tiles */
.quick-action-card {
    background-color: #FFF8F3;
    border: 1px solid #F6E6DA;
    border-radius: 8px;
    padding: 0.25rem 0.25rem;
    text-align: center;
    color: var(--qb-espresso);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.2s ease;
}
.quick-action-card:hover {
    background-color: var(--qb-peach-light);
    border-color: var(--qb-terracotta);
    color: var(--qb-terracotta);
    transform: translateY(-2px);
}
.quick-action-icon {
    font-size: 1rem;
    color: var(--qb-terracotta);
    margin-bottom: 0.05rem;
}
.quick-action-text {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
}

/* Popular Items List */
.popular-item-row {
    padding: 0.18rem 0;
    border-bottom: 1px solid var(--qb-border-light);
}
.popular-item-row:last-child {
    border-bottom: none;
}
.popular-rank-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #E86328;
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.popular-thumb {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Sales Overview Chart */
.chart-tooltip-badge {
    position: absolute;
    top: 8px;
    right: 28%;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 5px;
    padding: 1px 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
    line-height: 1.1;
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================================
   Web Dashboard Layout & Styling (Strictly Scoped to .web-dash-page Only)
   ========================================================================== */
body.web-dash-page {
    min-height: 100vh;
    background-color: var(--qb-cream);
}
.web-dash-page .dash-topbar {
    padding: 0.35rem 1.5rem;
}
.web-dash-page .dash-main-content {
    padding-top: 0.5rem !important;
    padding-bottom: 1rem !important;
}

/* Date & Time Controls */
.web-dash-page .date-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px !important;
}

/* 4 Summary Stat Cards */
.web-dash-page .stat-widget {
    border-radius: 12px;
    padding: 0.5rem 0.85rem;
    border: 1px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px !important;
}
.web-dash-page .stat-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(50, 28, 23, 0.08);
}
.web-dash-page .stat-widget-sales {
    background-color: #FFF6EF;
    border-color: #FDE6D5;
}
.web-dash-page .stat-widget-sales .stat-widget-icon {
    background-color: #FDE1CE;
    color: #EA580C;
}
.web-dash-page .stat-widget-orders {
    background-color: #EFF7FF;
    border-color: #DBEAFF;
}
.web-dash-page .stat-widget-orders .stat-widget-icon {
    background-color: #D6EBFF;
    color: #2563EB;
}
.web-dash-page .stat-widget-tables {
    background-color: #FEFCE8;
    border-color: #FEF3C7;
}
.web-dash-page .stat-widget-tables .stat-widget-icon {
    background-color: #FEEDB6;
    color: #D97706;
}
.web-dash-page .stat-widget-kot {
    background-color: #FEF2F2;
    border-color: #FEE2E2;
}
.web-dash-page .stat-widget-kot .stat-widget-icon {
    background-color: #FED4D4;
    color: #EF4444;
}
.web-dash-page .stat-widget-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.web-dash-page .stat-widget-icon svg {
    width: 20px;
    height: 20px;
}
.web-dash-page .stat-val {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--qb-espresso);
    line-height: 1.15;
    margin: 0.05rem 0;
}
.web-dash-page .stat-lbl {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--qb-espresso-muted);
}
.web-dash-page .stat-subtext {
    font-size: 0.68rem;
    line-height: 1.2;
}

/* Horizontal Quick Actions Bar */
.web-dash-page .quick-actions-card {
    padding: 0.35rem 0.85rem !important;
}
.web-dash-page .quick-actions-bar-row {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    max-width: 100%;
}
.web-dash-page .quick-actions-bar-row::-webkit-scrollbar {
    display: none;
}
.web-dash-page .quick-action-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.2rem 0.65rem;
    border-radius: 8px;
    flex: 1 1 auto;
    min-width: max-content;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: var(--qb-espresso);
    text-decoration: none;
}
.web-dash-page .quick-action-bar-item:hover {
    background-color: var(--qb-peach-light);
    transform: translateY(-2px);
    color: var(--qb-terracotta);
}
.web-dash-page .quick-action-bar-icon {
    font-size: 1.2rem;
    color: var(--qb-terracotta);
    margin-bottom: 0.15rem;
    display: inline-block;
    transition: transform 0.2s ease;
}
.web-dash-page .quick-action-bar-item:hover .quick-action-bar-icon {
    transform: scale(1.08);
}
.web-dash-page .quick-action-bar-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--qb-espresso);
    white-space: nowrap;
}
.web-dash-page .quick-action-bar-divider {
    width: 1px;
    height: 28px;
    background-color: var(--qb-border-light);
    margin: 0 0.15rem;
    flex-shrink: 0;
}

/* Dash Cards Common */
.web-dash-page .dash-card {
    border-radius: 12px;
    border: 1px solid var(--qb-border);
    background-color: var(--qb-white);
}
.web-dash-page .dash-card-header {
    padding: 0.45rem 0.95rem;
    border-bottom: 1px solid var(--qb-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Order Table */
.web-dash-page .order-table th {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--qb-espresso-muted);
    padding: 0.32rem 0.75rem;
    background-color: var(--qb-cream-alt);
    border-bottom: 1px solid var(--qb-border-light);
}
.web-dash-page .order-table td {
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--qb-border-light);
}
.web-dash-page .order-table tr:last-child td {
    border-bottom: none;
}
.web-dash-page .order-icon-box {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background-color: var(--qb-peach-light);
    color: var(--qb-terracotta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Table Tiles */
.web-dash-page .table-tile {
    border-radius: 7px;
    padding: 0.28rem 0.2rem;
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.web-dash-page .table-tile-occupied {
    background-color: #DCFCE7;
    border-color: #BBF7D0;
    color: #15803D;
}
.web-dash-page .table-tile-available {
    background-color: #F3F4F6;
    border-color: #E5E7EB;
    color: #4B5563;
}
.web-dash-page .table-tile-reserved {
    background-color: #FEE2E2;
    border-color: #FECACA;
    color: #B91C1C;
}
.web-dash-page .table-tile-status {
    font-size: 0.62rem;
    margin: 0.05rem 0;
}
.web-dash-page .table-tile-seats {
    font-size: 0.62rem;
    height: 12px;
}

/* Popular Items */
.web-dash-page .popular-item-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--qb-border-light);
}
.web-dash-page .popular-item-row:last-child {
    border-bottom: none;
}
.web-dash-page .popular-rank-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--qb-terracotta);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.web-dash-page .popular-thumb {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Mobile Dashboard Compact Specifics (Scoped to Mobile Dashboard Only) */
body.mobile-dash-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
}
.mobile-dash-page .container-fluid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.mobile-dash-page .stat-widget {
    padding: 0.45rem 0.55rem;
}
.mobile-dash-page .stat-val {
    font-size: 1.1rem;
}
.mobile-dash-page .order-table th,
.mobile-dash-page .order-table td {
    padding: 0.2rem 0.25rem;
    font-size: 0.68rem;
}
.mobile-dash-page .overflow-x-auto::-webkit-scrollbar {
    display: none;
}
