/* ==========================================================================
   FeastFlow Premium Dashboard CSS
   Shared styles for Customer, Vendor, Driver, and Kitchen Dashboards
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Base & Utility Variables
   -------------------------------------------------------------------------- */
:root {
    --dash-radius: 12px;
    --dash-radius-lg: 16px;
    --dash-radius-sm: 8px;
    --dash-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --dash-transition-fast: all 0.15s ease-in-out;
    --dash-gap: 1.5rem;
    --dash-gap-sm: 1rem;
    
    /* Semantic Colors - Base fallbacks if theme vars are missing */
    --dash-success: #10b981;
    --dash-success-bg: rgba(16, 185, 129, 0.15);
    --dash-warning: #f59e0b;
    --dash-warning-bg: rgba(245, 158, 11, 0.15);
    --dash-danger: #ef4444;
    --dash-danger-bg: rgba(239, 68, 68, 0.15);
    --dash-info: #3b82f6;
    --dash-info-bg: rgba(59, 130, 246, 0.15);
}

/* --------------------------------------------------------------------------
   1. Dashboard Welcome Banner (.dash-welcome)
   -------------------------------------------------------------------------- */
.dash-welcome {
    position: relative;
    width: 100%;
    padding: 2rem;
    border-radius: var(--dash-radius-lg);
    background: linear-gradient(135deg, var(--theme-bg-card), var(--theme-bg-alt));
    border: 1px solid var(--theme-border);
    border-left: 4px solid var(--theme-primary);
    box-shadow: var(--theme-card-shadow);
    margin-bottom: var(--dash-gap);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    transition: var(--dash-transition);
}

.dash-welcome:hover {
    box-shadow: 0 8px 25px -5px rgba(var(--theme-primary-rgb), 0.15), var(--theme-glow);
    transform: translateY(-2px);
}

/* Optional glassmorphism background blur */
@supports (backdrop-filter: blur(10px)) {
    .dash-welcome {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.dash-welcome-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.dash-welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.dash-welcome-subtitle {
    font-size: 1rem;
    color: var(--theme-text-sub);
    margin-bottom: 0;
}

.dash-welcome-cta {
    position: relative;
    z-index: 2;
    margin-left: var(--dash-gap);
    display: inline-flex;
    align-items: center;
    background: var(--theme-primary-grad);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
    transition: var(--dash-transition);
}

.dash-welcome-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.4);
    color: #fff;
}

/* --------------------------------------------------------------------------
   2. Stat Cards (.dash-stat-card)
   -------------------------------------------------------------------------- */
.dash-stat-card {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--dash-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--theme-card-shadow);
    transition: var(--dash-transition);
    position: relative;
    overflow: hidden;
}

/* Glassmorphism effect */
@supports (backdrop-filter: blur(12px)) {
    .dash-stat-card {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background: linear-gradient(145deg, rgba(var(--theme-bg-rgb), 0.7), rgba(var(--theme-bg-rgb), 0.4));
    }
}

.dash-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(var(--theme-primary-rgb), 0.2), 
                var(--theme-glow);
    border-color: rgba(var(--theme-primary-rgb), 0.5);
}

.dash-stat-content {
    flex: 1;
}

.dash-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.dash-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--theme-text);
    line-height: 1.1;
    margin-bottom: 0;
}

.dash-stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--theme-primary-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
    margin-left: 1rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   3. Dashboard Cards (.dash-card)
   -------------------------------------------------------------------------- */
.dash-card {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--theme-card-shadow);
    margin-bottom: var(--dash-gap);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--dash-transition);
}

.dash-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--theme-bg-rgb), 0.3);
}

.dash-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dash-card-title i {
    color: var(--theme-primary);
}

.dash-card-action {
    font-size: 0.875rem;
}

.dash-card-body {
    padding: 1.5rem;
    flex: 1;
}

/* --------------------------------------------------------------------------
   4. Quick Action Grid (.dash-action-grid)
   -------------------------------------------------------------------------- */
.dash-actions-card-body {
    padding: 1.15rem;
}

.dash-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
    width: 100%;
}

.dash-action-item {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--dash-radius-sm);
    padding: 0.875rem 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--theme-text);
    text-decoration: none;
    transition: var(--dash-transition);
    cursor: pointer;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash-action-item:hover {
    border-color: var(--theme-primary);
    background: rgba(var(--theme-primary-rgb), 0.05);
    box-shadow: 0 0 15px rgba(var(--theme-primary-rgb), 0.15);
    transform: translateY(-2px);
    color: var(--theme-primary);
}

.dash-action-icon,
.dash-action-item i {
    font-size: 1.35rem;
    color: var(--theme-primary);
    margin-bottom: 0.45rem;
    transition: var(--dash-transition);
    flex-shrink: 0;
}

.dash-action-item:hover .dash-action-icon,
.dash-action-item:hover i {
    transform: scale(1.1);
}

.dash-action-text,
.dash-action-item span {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
    white-space: normal;
    text-align: center;
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   5. Dashboard Tables (.dash-table)
   -------------------------------------------------------------------------- */
.dash-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.dash-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.dash-table th,
.dash-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.dash-table th {
    background: var(--theme-bg-alt);
    color: var(--theme-text);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--theme-border);
    white-space: nowrap;
}

.dash-table th:first-child {
    border-top-left-radius: var(--dash-radius-sm);
}

.dash-table th:last-child {
    border-top-right-radius: var(--dash-radius-sm);
}

.dash-table tbody tr {
    background: var(--theme-surface);
    transition: var(--dash-transition-fast);
}

.dash-table tbody tr:nth-child(even) {
    background: rgba(var(--theme-bg-rgb), 0.2);
}

.dash-table tbody tr:hover {
    background: rgba(var(--theme-primary-rgb), 0.06);
}

.dash-table td {
    color: var(--theme-text);
    border-bottom: 1px solid var(--theme-border);
    font-size: 0.9375rem;
}

.dash-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-table .text-muted {
    color: var(--theme-text-muted) !important;
}

/* --------------------------------------------------------------------------
   6. Status Badges (.dash-badge-*)
   -------------------------------------------------------------------------- */
.dash-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.dash-badge-pending {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

.dash-badge-active {
    background: rgba(var(--theme-primary-rgb), 0.15);
    color: var(--theme-primary);
    border: 1px solid rgba(var(--theme-primary-rgb), 0.3);
}

.dash-badge-completed {
    background: var(--dash-success-bg);
    color: var(--dash-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dash-badge-cancelled {
    background: var(--dash-danger-bg);
    color: var(--dash-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dash-badge-info {
    background: var(--dash-info-bg);
    color: var(--dash-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* --------------------------------------------------------------------------
   7. Chart Containers (.dash-chart-container)
   -------------------------------------------------------------------------- */
.dash-chart-container {
    background: var(--theme-bg-card);
    border-radius: var(--dash-radius-sm);
    padding: 1rem;
    position: relative;
    width: 100%;
}

.dash-chart-sm {
    height: 180px;
}

.dash-chart-md {
    height: 260px;
}

.dash-chart-lg {
    height: 340px;
}

/* --------------------------------------------------------------------------
   8. Activity/Timeline (.dash-timeline)
   -------------------------------------------------------------------------- */
.dash-timeline {
    position: relative;
    padding-left: 2rem;
    margin: 1rem 0;
}

.dash-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 2px;
    background: var(--theme-border);
}

.dash-timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.dash-timeline-item:last-child {
    margin-bottom: 0;
}

.dash-timeline-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--theme-bg-card);
    border: 2px solid var(--theme-border);
    transition: var(--dash-transition);
}

.dash-timeline-item.active::before {
    border-color: var(--theme-primary);
    background: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.2);
}

.dash-timeline-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.25rem;
}

.dash-timeline-time {
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.dash-timeline-desc {
    font-size: 0.875rem;
    color: var(--theme-text-sub);
    margin: 0;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   9. Empty State (.dash-empty-state)
   -------------------------------------------------------------------------- */
.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--theme-border);
    border-radius: var(--dash-radius);
    background: rgba(var(--theme-bg-rgb), 0.2);
}

.dash-empty-state > i,
.dash-empty-icon {
    font-size: 3rem;
    color: var(--theme-text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.dash-empty-state > h5,
.dash-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.75rem;
}

.dash-empty-state > p,
.dash-empty-desc {
    font-size: 0.9375rem;
    color: var(--theme-text-sub);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.dash-empty-cta .btn {
    background: var(--theme-primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: var(--dash-radius-sm);
    font-weight: 500;
    transition: var(--dash-transition);
}

.dash-empty-cta .btn:hover {
    background: var(--theme-accent);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.3);
}

/* --------------------------------------------------------------------------
   10. Responsive Grid
   -------------------------------------------------------------------------- */
.dash-grid-4,
.dash-grid-3,
.dash-grid-2 {
    display: grid;
    gap: var(--dash-gap);
    margin-bottom: var(--dash-gap);
}

.dash-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.dash-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 1200px) {
    .dash-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .dash-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-welcome {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .dash-welcome-cta {
        margin-left: 0;
        margin-top: 1.5rem;
    }
    
    .dash-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.625rem;
    }
    
    .dash-grid-4,
    .dash-grid-3,
    .dash-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .dash-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .dash-action-item {
        padding: 0.75rem 0.25rem;
    }

    .dash-action-icon,
    .dash-action-item i {
        font-size: 1.15rem;
        margin-bottom: 0.35rem;
    }

    .dash-action-text,
    .dash-action-item span {
        font-size: 0.72rem;
    }
    
    .dash-stat-card {
        padding: 1.25rem;
    }
    
    .dash-stat-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    .dash-action-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dash-action-item {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
        justify-content: flex-start;
        text-align: left;
    }

    .dash-action-icon,
    .dash-action-item i {
        margin-bottom: 0;
    }

    .dash-action-text,
    .dash-action-item span {
        text-align: left;
    }
}

/* --------------------------------------------------------------------------
   11. Driver-specific styles
   -------------------------------------------------------------------------- */
.dash-delivery-card {
    border-left: 4px solid var(--theme-border);
}

.dash-delivery-card.status-active {
    border-left-color: var(--dash-warning);
}

.dash-delivery-card.status-completed {
    border-left-color: var(--dash-success);
}

.dash-availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--theme-text);
}

.dash-availability-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-border);
    position: relative;
}

.dash-availability-dot.online {
    background: var(--dash-success);
}

.dash-availability-dot.online::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid var(--dash-success);
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.dash-delivery-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.dash-delivery-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--theme-border);
    transform: translateY(-50%);
    z-index: 1;
}

.dash-progress-step {
    position: relative;
    z-index: 2;
    background: var(--theme-bg-card);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dash-transition);
}

.dash-progress-step.completed {
    border-color: var(--theme-primary);
    background: var(--theme-primary);
    color: #fff;
}

.dash-progress-step.active {
    border-color: var(--theme-primary);
    background: var(--theme-bg-card);
    box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb), 0.2);
}

/* --------------------------------------------------------------------------
   12. Kitchen-specific styles
   -------------------------------------------------------------------------- */
.dash-kds-wrapper {
    min-height: 80vh;
}

.dash-kds-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--dash-radius);
    overflow: hidden;
    box-shadow: var(--theme-card-shadow);
    transition: var(--dash-transition);
}

.dash-kds-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--theme-primary-rgb), 0.15);
}

/* Status modifier classes — border-top color */
.dash-kds-pending {
    border-top: 4px solid var(--dash-warning);
}

.dash-kds-confirmed {
    border-top: 4px solid var(--dash-info);
}

.dash-kds-preparing {
    border-top: 4px solid var(--theme-primary);
}

.dash-kds-ready {
    border-top: 4px solid var(--dash-success);
}

.dash-kds-header,
.dash-kds-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--theme-border);
    color: #fff;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Status-based header backgrounds */
.dash-kds-pending .dash-kds-card-header {
    background: var(--dash-warning);
    color: #1a1a1a;
}

.dash-kds-confirmed .dash-kds-card-header {
    background: var(--dash-info);
}

.dash-kds-preparing .dash-kds-card-header {
    background: var(--theme-primary);
}

.dash-kds-ready .dash-kds-card-header {
    background: var(--dash-success);
}

.dash-kds-header.new {
    background: var(--dash-info);
}

.dash-kds-header.preparing {
    background: var(--dash-warning);
}

.dash-kds-header.ready {
    background: var(--dash-success);
}

.dash-kds-header.delayed {
    background: var(--dash-danger);
    animation: pulse-bg 2s infinite;
}

@keyframes pulse-bg {
    0% { background: var(--dash-danger); }
    50% { background: #b91c1c; }
    100% { background: var(--dash-danger); }
}

.dash-kds-body,
.dash-kds-card-body {
    flex: 1;
    padding: 1.25rem;
    background: var(--theme-surface);
}

.dash-kds-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--theme-border);
    background: rgba(var(--theme-bg-rgb), 0.3);
    color: var(--theme-text-muted);
    font-size: 0.875rem;
}

.dash-kds-items {
    margin-bottom: 0.5rem;
}

.dash-kds-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--theme-border);
}

.dash-kds-item:last-child {
    border-bottom: none;
}

.dash-kds-qty,
.dash-kds-item-qty {
    background: var(--theme-primary);
    color: #fff;
    min-width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.dash-kds-name {
    flex: 1;
    font-weight: 500;
    color: var(--theme-text);
}

.dash-kds-notes,
.dash-kds-item-note {
    font-size: 0.8rem;
    color: var(--dash-danger);
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--dash-danger-bg);
    border-radius: 4px;
    border-left: 3px solid var(--dash-danger);
}

/* Delivery card (used in driver dashboard) */
.dash-delivery-card {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-left: 4px solid var(--dash-warning);
    border-radius: var(--dash-radius);
    padding: 1.25rem;
    transition: var(--dash-transition);
}

.dash-delivery-card:hover {
    box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.1);
    transform: translateY(-2px);
}

/* Chart container helpers */
.admin-chart-container-300 {
    height: 300px;
    position: relative;
}

.admin-chart-container-240 {
    height: 240px;
    position: relative;
}

.admin-chart-container-230 {
    height: 230px;
    position: relative;
}

@media (max-width: 575.98px) {
    .admin-chart-container-300 {
        height: 220px;
    }
    .admin-chart-container-240 {
        height: 190px;
    }
    .admin-chart-container-230 {
        height: 180px;
    }
}

/* --------------------------------------------------------------------------
   Customer Portal Navigation (.customer-nav-*)
   -------------------------------------------------------------------------- */
.customer-portal-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.6rem;
    border-radius: 50rem;
    vertical-align: middle;
}

.customer-nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.customer-nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.customer-profile-dropdown {
    min-width: 230px;
    border-radius: 12px;
    padding: 0.5rem 0;
}

@media (min-width: 992px) {
    .customer-nav-profile-dropdown {
        position: relative !important;
    }
    .customer-nav-profile-dropdown .customer-profile-dropdown,
    .customer-nav-profile-dropdown .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        margin-top: 0.5rem !important;
    }
    [dir="rtl"] .customer-nav-profile-dropdown .customer-profile-dropdown,
    [dir="rtl"] .customer-nav-profile-dropdown .dropdown-menu-end {
        left: 0 !important;
        right: auto !important;
    }
}

/* Midnight Emerald Theme */
[data-theme="midnight-emerald"] .customer-portal-badge,
body[data-theme="midnight-emerald"] .customer-portal-badge {
    background: rgba(0, 200, 150, 0.12);
    color: #00c896;
    border: 1px solid rgba(0, 200, 150, 0.28);
}

[data-theme="midnight-emerald"] .customer-nav-icon-btn,
body[data-theme="midnight-emerald"] .customer-nav-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

[data-theme="midnight-emerald"] .customer-nav-icon-btn:hover,
body[data-theme="midnight-emerald"] .customer-nav-icon-btn:hover {
    background: rgba(0, 200, 150, 0.15);
    border-color: #00c896;
    color: #00c896;
}

[data-theme="midnight-emerald"] .customer-nav-avatar,
body[data-theme="midnight-emerald"] .customer-nav-avatar {
    background: rgba(0, 200, 150, 0.18);
    color: #00c896;
}

[data-theme="midnight-emerald"] .customer-profile-dropdown,
body[data-theme="midnight-emerald"] .customer-profile-dropdown {
    background: #0d1b1e;
    border: 1px solid rgba(0, 200, 150, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
}

[data-theme="midnight-emerald"] .customer-profile-dropdown .dropdown-item,
body[data-theme="midnight-emerald"] .customer-profile-dropdown .dropdown-item {
    color: #cbd5e1;
    font-weight: 500;
}

[data-theme="midnight-emerald"] .customer-profile-dropdown .dropdown-item:hover,
body[data-theme="midnight-emerald"] .customer-profile-dropdown .dropdown-item:hover {
    background: rgba(0, 200, 150, 0.1);
    color: #00c896;
}

/* Midnight Violet Theme */
[data-theme="midnight-violet"] .customer-portal-badge,
body[data-theme="midnight-violet"] .customer-portal-badge {
    background: rgba(245, 200, 66, 0.12);
    color: #f5c842;
    border: 1px solid rgba(245, 200, 66, 0.28);
}

[data-theme="midnight-violet"] .customer-nav-icon-btn,
body[data-theme="midnight-violet"] .customer-nav-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

[data-theme="midnight-violet"] .customer-nav-icon-btn:hover,
body[data-theme="midnight-violet"] .customer-nav-icon-btn:hover {
    background: rgba(245, 200, 66, 0.15);
    border-color: #f5c842;
    color: #f5c842;
}

[data-theme="midnight-violet"] .customer-nav-avatar,
body[data-theme="midnight-violet"] .customer-nav-avatar {
    background: rgba(245, 200, 66, 0.18);
    color: #f5c842;
}

[data-theme="midnight-violet"] .customer-profile-dropdown,
body[data-theme="midnight-violet"] .customer-profile-dropdown {
    background: #191428;
    border: 1px solid rgba(245, 200, 66, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
}

[data-theme="midnight-violet"] .customer-profile-dropdown .dropdown-item,
body[data-theme="midnight-violet"] .customer-profile-dropdown .dropdown-item {
    color: #cbd5e1;
    font-weight: 500;
}

[data-theme="midnight-violet"] .customer-profile-dropdown .dropdown-item:hover,
body[data-theme="midnight-violet"] .customer-profile-dropdown .dropdown-item:hover {
    background: rgba(245, 200, 66, 0.1);
    color: #f5c842;
}

/* Editorial Light Theme */
[data-theme="editorial-light"] .customer-portal-badge,
body[data-theme="editorial-light"] .customer-portal-badge {
    background: rgba(232, 57, 77, 0.08);
    color: #e8394d;
    border: 1px solid rgba(232, 57, 77, 0.2);
}

[data-theme="editorial-light"] .customer-nav-icon-btn,
body[data-theme="editorial-light"] .customer-nav-icon-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

[data-theme="editorial-light"] .customer-nav-icon-btn:hover,
body[data-theme="editorial-light"] .customer-nav-icon-btn:hover {
    background: rgba(232, 57, 77, 0.08);
    border-color: #e8394d;
    color: #e8394d;
}

[data-theme="editorial-light"] .customer-nav-avatar,
body[data-theme="editorial-light"] .customer-nav-avatar {
    background: rgba(232, 57, 77, 0.12);
    color: #e8394d;
}

[data-theme="editorial-light"] .customer-profile-dropdown,
body[data-theme="editorial-light"] .customer-profile-dropdown {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    color: #1e293b;
}

[data-theme="editorial-light"] .customer-profile-dropdown .dropdown-item,
body[data-theme="editorial-light"] .customer-profile-dropdown .dropdown-item {
    color: #334155;
    font-weight: 500;
}

[data-theme="editorial-light"] .customer-profile-dropdown .dropdown-item:hover,
body[data-theme="editorial-light"] .customer-profile-dropdown .dropdown-item:hover {
    background: rgba(232, 57, 77, 0.06);
    color: #e8394d;
}



.admin-receipt-img {
    max-height: 180px;
    object-fit: contain;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* --------------------------------------------------------------------------
   High-Contrast Form Switches for Dark & Midnight Themes
   -------------------------------------------------------------------------- */
.form-switch-md .form-check-input {
    width: 2.75rem;
    height: 1.5rem;
    cursor: pointer;
}

body[data-theme="midnight-emerald"] .form-switch .form-check-input,
body[data-theme="midnight-violet"] .form-switch .form-check-input,
body[data-theme="dark"] .form-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.38) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    cursor: pointer;
    transition: background-position .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

body[data-theme="midnight-emerald"] .form-switch .form-check-input:hover,
body[data-theme="midnight-violet"] .form-switch .form-check-input:hover,
body[data-theme="dark"] .form-switch .form-check-input:hover {
    border-color: rgba(255, 255, 255, 0.6) !important;
    background-color: rgba(255, 255, 255, 0.22) !important;
}

body[data-theme="midnight-emerald"] .form-switch .form-check-input:checked {
    background-color: #00c896 !important;
    border-color: #00c896 !important;
    background-position: right center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 12px rgba(0, 200, 150, 0.55) !important;
}

body[data-theme="midnight-violet"] .form-switch .form-check-input:checked {
    background-color: #c084fc !important;
    border-color: #f5c842 !important;
    background-position: right center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.55) !important;
}

body[data-theme="dark"] .form-switch .form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    background-position: right center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5) !important;
}

@media (max-width: 991.98px) {
    .customer-nav-profile-dropdown {
        width: 100%;
        position: relative;
    }

    .customer-nav-profile-dropdown .ff-btn-nav-login {
        width: 100%;
        justify-content: space-between;
    }

    .customer-nav-profile-dropdown .customer-profile-dropdown {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
        box-shadow: none !important;
        float: none !important;
    }
}

/* Dining Table Type Badges */
.table-badge-vip {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
}
body[data-theme="midnight-emerald"] .table-badge-vip,
body[data-theme="midnight-violet"] .table-badge-vip,
body[data-theme="dark"] .table-badge-vip {
    background: rgba(245, 158, 11, 0.22) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
}

.table-badge-booth {
    background: rgba(14, 165, 233, 0.14) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
}
body[data-theme="midnight-emerald"] .table-badge-booth,
body[data-theme="midnight-violet"] .table-badge-booth,
body[data-theme="dark"] .table-badge-booth {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.45) !important;
}

.table-badge-outdoor {
    background: rgba(16, 185, 129, 0.14) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
body[data-theme="midnight-emerald"] .table-badge-outdoor,
body[data-theme="midnight-violet"] .table-badge-outdoor,
body[data-theme="dark"] .table-badge-outdoor {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
}

.table-badge-bar {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}
body[data-theme="midnight-emerald"] .table-badge-bar,
body[data-theme="midnight-violet"] .table-badge-bar,
body[data-theme="dark"] .table-badge-bar {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
}

.table-badge-private {
    background: rgba(168, 85, 247, 0.14) !important;
    color: #9333ea !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
}
body[data-theme="midnight-emerald"] .table-badge-private,
body[data-theme="midnight-violet"] .table-badge-private,
body[data-theme="dark"] .table-badge-private {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
}

.table-badge-regular {
    background: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.3) !important;
}
body[data-theme="midnight-emerald"] .table-badge-regular,
body[data-theme="midnight-violet"] .table-badge-regular,
body[data-theme="dark"] .table-badge-regular {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

/* ==========================================================================
   Universal Portal Footer (.portal-footer)
   Consistent footer for Vendor, Driver, Waiter, and Kitchen dashboards
   ========================================================================== */
.portal-footer {
    background-color: var(--theme-bg-card, #111827);
    border-top: 1px solid var(--theme-border, rgba(255, 255, 255, 0.08));
    color: var(--theme-text-muted, #94a3b8);
    font-size: 0.8125rem;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

.portal-footer .portal-footer-brand {
    color: var(--theme-text, #f8fafc);
    font-weight: 700;
}

.portal-footer .portal-footer-sep {
    color: var(--theme-border, rgba(255, 255, 255, 0.2));
    margin: 0 0.35rem;
}

.portal-footer-badge {
    background-color: var(--theme-surface, rgba(255, 255, 255, 0.06)) !important;
    color: var(--theme-text-muted, #94a3b8) !important;
    border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.12)) !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
}

.portal-status-badge {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.portal-status-badge i {
    color: #10b981;
}

.portal-footer-tag {
    color: var(--theme-text-muted, #94a3b8);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* Light theme overrides */
body[data-theme="editorial-light"] .portal-footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

body[data-theme="editorial-light"] .portal-footer .portal-footer-brand {
    color: #0f172a;
}

body[data-theme="editorial-light"] .portal-footer .portal-footer-sep {
    color: #cbd5e1;
}

body[data-theme="editorial-light"] .portal-footer-badge {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
}

body[data-theme="editorial-light"] .portal-status-badge {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

body[data-theme="editorial-light"] .portal-footer-tag {
    color: #64748b;
}

/* Mobile Bottom Nav Spacing Protection */
@media (max-width: 991.98px) {
    .driver-layout .portal-footer,
    .waiter-portal-body .portal-footer,
    .kitchen-portal-body .portal-footer {
        padding-bottom: calc(var(--driver-bottom-nav-height, 60px) + 1.25rem) !important;
    }
}

