/*
Theme Name: Members Booking Management
Author: AI Developer
Description: v5.0 - Full JS Separation, DB Logging, Responsive.
Version: 1.4.0
License: GPLv2
*/
:root {
    --primary: #00b533;
    --primary-hover: #009e2c;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --red: #dc2626;
    --orange: #d97706;
    --blue: #2563eb;
    --db-sidebar-width: 260px;
    --db-header-height: 64px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

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

* {
    box-sizing: border-box;
}

/* UTILS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: 0.2s;
    font-size: 0.9rem;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

.w-100 {
    width: 100%;
}

pre {
    background: #f8fafc;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.8rem;
}

/* LAYOUT */
.d-wrapper {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

.d-sidebar {
    width: var(--db-sidebar-width);
    background: #2C3E50;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: width 0.3s ease, min-width 0.3s ease;
    flex-shrink: 0;
    /* Stick to viewport so Logout is always visible */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

/* --- COLLAPSED STATE FIX --- */
/* 1. Force Width */
.d-sidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    flex: 0 0 70px !important;
    overflow: visible !important;
    /* Allow avatar to show cleanly if needed, or use hidden */
}

/* Hide specific elements when collapsed */
.d-sidebar.collapsed .brand-text,
.d-sidebar.collapsed .brand-icon,
.d-sidebar.collapsed .d-nav-item span:last-child {
    display: none !important;
}

/* 3. Show Avatar ONLY when collapsed */
.brand-avatar {
    display: none;
    /* Hidden by default */
}

.d-sidebar.collapsed .brand-avatar {
    display: block !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* Adjust layout for collapsed items */
.d-sidebar.collapsed .d-nav-item {
    justify-content: center !important;
    padding-left: 0;
    padding-right: 0;
}

.d-sidebar.collapsed .d-nav-item .dashicons {
    margin-right: 0 !important;
    font-size: 24px;
}

/* 4. Center the brand box */
.d-sidebar.collapsed .d-brand {
    padding: 10px 0 !important;
    justify-content: center !important;
}

/* 5. Hide Menu Text Labels */
.d-sidebar.collapsed .d-nav-item span:last-child {
    display: none !important;
}

/* 6. Center Menu Icons */
.d-sidebar.collapsed .d-nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.d-sidebar.collapsed .d-nav-item .dashicons {
    margin-right: 0 !important;
    font-size: 20px;
}

/* COMPONENTS */
.d-brand {
    height: var(--db-header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 1.2rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ECF0F1;
}

.d-nav {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    /* Allow nav items to scroll if they overflow */
    padding-bottom: 0;
}

/* Logout pinned at bottom of sidebar */
.d-nav-logout {
    padding: 12px 20px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.d-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #BDC3C7;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
}

.d-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ECF0F1;
}

.d-nav-item.active {
    background: rgba(52, 152, 219, 0.15);
    color: #3498DB;
}

.d-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.d-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* TABLES */
.d-table-wrap {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.d-table {
    width: 100%;
    border-collapse: collapse;
}

.d-table th,
.mbm-table-bs th,
.advanced-table th {
    background: #4099ff;
    padding: 12px 20px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #ffffff;
    border-bottom: 1px solid var(--border);
}

.d-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 0.9rem;
    vertical-align: top;
}

.badge {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.pending {
    background: #ffedd5;
    color: #9a3412;
}

.badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.badge.info {
    background: #eff6ff;
    color: #1e40af;
}

/* BOOKING FORM */
.booking-layout {
    display: flex;
    gap: 30px;
    height: 100%;
}

.booking-left {
    flex: 2;
    overflow-y: auto;
    padding-right: 10px;
}

.booking-right {
    flex: 1;
    min-width: 320px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

/* TIME PICKER */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.time-pill {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: 0.2s;
}

.time-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.time-pill.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* CART */
.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
    position: relative;
}

.cart-del {
    color: var(--red);
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* ADMIN SETTINGS */
.ad-row {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .d-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .d-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 10px;
    }

    .booking-layout {
        flex-direction: column;
    }

    .d-content {
        padding: 20px;
    }
}

/* --- LOGIN PAGE UI (Static & Centered) --- */

/* 1. Page Layout */
body.page-template-page-login .site-header,
body.page-template-page-login footer {
    display: none !important;
}

body.page-template-page-login {
    background: #f4f7fa;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Prevents scrollbars */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 2. Static Background Layer */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind everything */
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    /* No animation properties here */
}

/* Top-Right Green Circle */
.bg-shape.shape-1 {
    width: 400px;
    height: 400px;
    background: #0ac282;
    /* Green */
    top: -120px;
    right: -100px;
    opacity: 0.9;
}

/* Bottom-Left Blue Circle */
.bg-shape.shape-2 {
    width: 400px;
    height: 400px;
    background: #4099ff;
    /* Blue */
    bottom: -120px;
    left: -100px;
    opacity: 0.9;
}

/* Small Green Dot (Right side) */
.bg-shape.shape-3 {
    width: 20px;
    height: 20px;
    background: #0ac282;
    top: 45%;
    right: 15%;
    opacity: 0.8;
}

/* 3. Login Card Container (Centered) */
.auth-main {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 40px;
    text-align: center;
    width: 100%;
    border-top: 3px solid #4099ff;
    /* Blue Top Border */
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.login-title {
    font-size: 24px;
    color: #333;
    font-weight: 500;
    margin-bottom: 30px;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-control {
    width: 100%;
    height: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    transition: 0.3s;
}

.login-control:focus {
    background: #fff;
    border-color: #4099ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 153, 255, 0.1);
}

.login-options {
    display: flex;/* --- KANBAN BOARD --- */
.mbm-kanban-board {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    background: #f4f4f4;
    border-radius: 8px;
    width: 250px;
    min-width: 250px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

.kanban-cards-wrap {
    padding: 10px;
    flex-grow: 1;
}

.kanban-card {
    background: #fff;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: grab;
    border-left: 4px solid #3498db;
    transition: transform 0.2s;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.kanban-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.kanban-card p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.card-meta {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.card-price {
    font-size: 13px;
    color: #e67e22;
    font-weight: bold;
    margin-top: 5px;
}

.kanban-column[data-status="pending_review"] .kanban-card { border-left-color: #f1c40f; }
.kanban-column[data-status="approved"] .kanban-card { border-left-color: #2ecc71; }
.kanban-column[data-status="rejected"] .kanban-card { border-left-color: #e74c3c; }
.kanban-column[data-status="converted"] .kanban-card { border-left-color: #9b59b6; }
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 25px;
    color: #666;
}

.btn-login {
    width: 100%;
    background: #4099ff;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(64, 153, 255, 0.5);
    transition: 0.3s;
}

.btn-login:hover {
    background: #2085fa;
    transform: translateY(-2px);
}

.login-footer {
    margin-top: 25px;
    font-size: 14px;
    color: #333;
}

.login-footer a {
    color: #4099ff;
    text-decoration: none;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bg-shape.shape-1 {
        width: 200px;
        height: 200px;
        top: -50px;
        right: -50px;
    }

    .bg-shape.shape-2 {
        width: 200px;
        height: 200px;
        bottom: -50px;
        left: -50px;
    }

    .bg-shape.shape-3 {
        display: none;
    }
}

/* --- MOBILE SPECIFIC BARS & FIXES --- */
.mobile-top-bar {
    display: none;
}

.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 50px;
        background: white;
        z-index: 1000;
        padding: 0 15px;
        border-bottom: 1px solid #eee;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .mobile-bottom-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: white;
        z-index: 1000;
        padding: 0 15px;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .d-wrapper,
    .d-content {
        padding-top: 50px;
        /* Space for top bar */
        padding-bottom: 80px;
        /* Space for bottom bar */
    }

    /* Sidebar hidden on mobile via drawer transform instead of display:none */

    .duration-flex-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 15px !important;
    }

    .duration-flex-row .btn,
    .duration-flex-row .btn-outline {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        flex: 0 0 40px !important;
        margin: 0 !important;
    }

    .booking-right {
        display: none !important;
    }
}

/* --- ADMINTY DASHBOARD THEME --- */

/* 1. Layout & Variables */
:root {
    --adminty-sidebar: #404E67;
    --adminty-header: #ffffff;
    --adminty-bg: #f4f7fa;
    --card-orange-1: #fe9365;
    --card-orange-2: #feb798;
    --card-green-1: #0ac282;
    --card-green-2: #0df3a3;
    --card-pink-1: #fe5d70;
    --card-pink-2: #fe909d;
    --card-blue-1: #01a9ac;
    --card-blue-2: #01dbdf;
}

body.page-template-page-admin {
    background-color: var(--adminty-bg);
    font-family: 'Open Sans', sans-serif;
}

/* 2. Sidebar (Dark Blue) */
.d-sidebar {
    background: var(--adminty-sidebar) !important;
    color: #fff;
    border: none !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.d-brand {
    background: #364155;
    /* Slightly darker logo area */
    color: #fff;
    height: 70px !important;
    font-size: 20px;
    justify-content: center;
    border-bottom: none !important;
}

.d-nav-item {
    color: #b7c0cd !important;
    border-radius: 0 !important;
    padding: 15px 20px !important;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: 0.3s;
}

.d-nav-item:hover,
.d-nav-item.active {
    background: #3b485f !important;
    color: #fff !important;
    border-left-color: #0ac282;
    /* Green accent */
}

.d-nav-item .dashicons {
    color: inherit;
    margin-right: 10px;
}

/* 3. Top Header (White) */
.admin-header {
    height: 70px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-radius: 5px;
}

/* Always show hamburger on all screen sizes */
#mob_hamburger {
    display: inline-block !important;
    cursor: pointer;
    font-size: 24px;
    color: #404E67;
    margin-right: 10px;
    line-height: 1;
    vertical-align: middle;
}

#mob_hamburger:hover {
    opacity: 0.7;
}

.header-left {
    font-weight: 600;
    color: #404E67;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Brand Responsive Logic */
.brand-name-header {
    display: inline-block;
}

/* Mobile/Tablet: Hide Name if Icon Exists */
@media (max-width: 1024px) {
    .brand-name-header {
        display: none !important;
        /* Force hide name on small screens */
    }

    .brand-icon-header {
        display: block !important;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
}

/* 4. Stat Cards (Colorful Gradients) */
.d-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    border-radius: 5px;
    padding: 25px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

.stat-card p {
    margin: 5px 0 20px;
    font-size: 14px;
    opacity: 0.9;
}

.stat-card .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 10px;
    margin-top: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Gradients */
.bg-orange {
    background: linear-gradient(to right, var(--card-orange-1), var(--card-orange-2));
}

.bg-green {
    background: linear-gradient(to right, var(--card-green-1), var(--card-green-2));
}

.bg-pink {
    background: linear-gradient(to right, var(--card-pink-1), var(--card-pink-2));
}

.bg-blue {
    background: linear-gradient(to right, var(--card-blue-1), var(--card-blue-2));
}

/* 5. Main Content Area */
.d-content {
    background: transparent !important;
    /* Let body bg show */
    padding: 0 30px 30px 30px !important;
}

.content-card {
    background: #fff;
    border-radius: 5px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* --- ADMIN USER DROPDOWN --- */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px;
}

.user-dropdown {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 10px 0;
    animation: fadeIn 0.2s ease-in-out;
}

.user-dropdown.show {
    display: block;
    /* Show when toggled */
    z-index: 1000;
}

/* Dropdown Triangle */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}

.user-dropdown a:hover {
    background: #f4f7fa;
    color: var(--card-blue-1);
}

.user-dropdown .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- PROFILE VIEW UI (Adminty Style) --- */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.profile-header h3 {
    margin: 0;
    color: #404E67;
    font-weight: 600;
}

.profile-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.view-group {
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.view-label {
    font-weight: 700;
    color: #333;
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
}

.view-value {
    color: #666;
    font-size: 14px;
}

.btn-edit-profile {
    background: #01a9ac;
    /* Teal Color */
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.btn-edit-profile:hover {
    background: #01dbdf;
}

/* Password Toggle Area */
.password-area {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-top: 15px;
}

/* --- PROFILE UI (Adminty Style) --- */
.profile-card {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.08);
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f1f1f1;
}

.profile-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #404E67;
}

.btn-icon-edit {
    background: #0ac282;
    /* Teal color from screenshot */
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.btn-icon-edit:hover {
    background: #08a56e;
}

.btn-icon-edit .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* View Grid Layout */
.profile-body {
    padding: 20px 30px;
}

.view-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f1;
}

.view-row:last-child {
    border-bottom: none;
}

.view-col {
    flex: 1;
    display: flex;
}

.view-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    width: 140px;
    /* Fixed width for labels */
}

.view-value {
    color: #666;
    font-size: 14px;
}

/* Edit Form Styles */
.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.full-width {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .view-row {
        flex-direction: column;
        gap: 15px;
    }

    .view-col {
        margin-bottom: 5px;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================= */
/* NEW ADDITIONS: Booking & Sports Config   */
/* ========================================= */

/* --- 1. BOOKING PAGE UI (Centered & Responsive) --- */
.booking-center-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.booking-header {
    text-align: center;
    margin-bottom: 40px;
}

.booking-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.booking-header p {
    font-size: 15px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.booking-layout {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.booking-left {
    flex: 2;
    max-width: 650px;
    width: 100%;
}

.booking-right {
    flex: 1;
    max-width: 400px;
    width: 100%;
    position: sticky;
    top: 20px;
}

/* --- 2. COMPACT ADMIN SPORTS CONFIG --- */

/* Hide Number Spinners */
input.no-spinner::-webkit-outer-spin-button,
input.no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input.no-spinner[type=number] {
    -moz-appearance: textfield;
}

/* Compact Table Headers */
.sport-row-header {
    display: flex;
    font-weight: 700;
    padding: 10px 15px;
    background: #f4f7fa;
    font-size: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #404E67;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e2e8f0;
}

/* Row Container */
.sport-row-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    transition: 0.2s;
}

.sport-row-wrap:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}

/* Main Data Row */
.sport-main-row {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 12px;
}

/* Break Slots Row */
.sport-break-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 15px 10px 55px;
    /* Indented to align with content */
    border-top: 1px dashed #f1f5f9;
    margin-top: 5px;
    padding-top: 8px;
}

/* Compact Inputs */
.compact-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    height: 32px;
    background: #fff;
    box-sizing: border-box;
    transition: 0.2s;
}

.compact-input:focus {
    border-color: #00b533;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 181, 51, 0.1);
}

.compact-input:disabled {
    background: #f8fafc;
    color: #00b533;
    font-weight: 700;
    border-color: #e2e8f0;
}

/* Tiny Action Buttons */
.btn-icon-tiny {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: 0.2s;
}

.btn-icon-tiny:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-icon-tiny .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Break Time Input Chips */
.break-input-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 3px 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.break-input-group input {
    border: none;
    background: transparent;
    font-size: 12px;
    width: 65px;
    color: #333;
    font-family: inherit;
    padding: 0;
    margin: 0;
    text-align: center;
}

.break-input-group input:focus {
    background: #f0fdf4;
    color: #00b533;
    outline: none;
    border-radius: 2px;
}

.break-separator {
    color: #94a3b8;
    font-weight: bold;
}

.break-remove {
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    margin-left: 6px;
    opacity: 0.6;
    transition: 0.2s;
}

.break-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* --- 3. RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {

    /* Stack Booking Page */
    .booking-layout {
        flex-direction: column;
        align-items: center;
    }

    .booking-left,
    .booking-right {
        max-width: 100%;
    }

    .booking-right {
        margin-top: 20px;
    }

    /* Stack Admin Sports Config Row */
    .sport-row-header {
        display: none;
    }

    /* Hide Table Header */

    .sport-row-wrap {
        padding: 15px;
    }

    .sport-main-row {
        flex-wrap: wrap;
        padding: 0;
    }

    /* Force specific widths for mobile grid */
    .sport-main-row>div:nth-child(1) {
        width: 100%;
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
        margin-bottom: 8px;
        font-weight: bold;
        color: #333;
    }

    /* Index ID */

    .sport-main-row>div:nth-child(2) {
        flex: 1 1 100%;
    }

    /* Name Input takes full width */

    .sport-main-row>div:nth-child(3),
    /* Sport Select */
    .sport-main-row>div:nth-child(4) {
        /* Time Inputs */
        flex: 1 1 48%;
    }

    .sport-main-row>div:nth-child(5),
    /* Price */
    .sport-main-row>div:nth-child(6),
    /* Tax */
    .sport-main-row>div:nth-child(7) {
        /* Total */
        flex: 1 1 30%;
    }

    .sport-main-row>div:last-child {
        /* Actions */
        flex: 1 1 100%;
        justify-content: flex-end;
        border-top: 1px dashed #eee;
        padding-top: 10px;
        margin-top: 5px;
    }

    .sport-break-row {
        padding-left: 0;
        margin-top: 15px;
    }
}

/* ========================================= */
/* UI IMPROVEMENTS (Append to bottom)      */
/* ========================================= */

/* 1. BOOKING HERO SECTION */
.booking-center-wrap {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.booking-layout {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.booking-left {
    flex: 2;
    max-width: 650px;
}

.booking-right {
    flex: 1;
    max-width: 400px;
    position: sticky;
    top: 20px;
}

/* 2. CART ITEM FIX (Prevents Overlap) */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9fafb;
}

.cart-item div:first-child {
    flex: 1;
    padding-right: 10px;
}

/* Description area */
.cart-del {
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 10px;
    transition: 0.2s;
}

.cart-del:hover {
    color: #dc2626;
    transform: scale(1.1);
}

/* 3. RESPONSIVE */
@media (max-width: 1024px) {
    .booking-layout {
        flex-direction: column;
    }

    .booking-left,
    .booking-right {
        max-width: 100%;
    }
}

/* ========================================= */
/* NEW UI: SUCCESS/ERROR MODALS & COUPONS   */
/* ========================================= */

/* --- 1. CENTERED MESSAGE MODAL (Success/Error) --- */
.status-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.status-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-modal-card {
    background: #fff;
    width: 100%;
    max-width: 380px;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-modal-overlay.active .status-modal-card {
    transform: scale(1);
}

/* Header Colors */
.modal-header {
    padding: 30px 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-header.success {
    background: #82ce34;
}

.modal-header.error {
    background: #ef4f4f;
}

.modal-icon-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.modal-icon-circle .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.modal-body {
    padding: 30px 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.modal-footer {
    padding: 0 20px 30px;
}

.modal-btn {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    transition: 0.2s;
    color: #fff;
}

.modal-btn.success {
    background: #82ce34;
    box-shadow: 0 5px 15px rgba(130, 206, 52, 0.4);
}

.modal-btn.success:hover {
    background: #6fb823;
    transform: translateY(-2px);
}

.modal-btn.error {
    background: #ef4f4f;
    box-shadow: 0 5px 15px rgba(239, 79, 79, 0.4);
}

.modal-btn.error:hover {
    background: #d63838;
    transform: translateY(-2px);
}


/* --- 2. APPLIED COUPON UI (Cart) --- */
.applied-coupon-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e6fffa;
    border: 1px solid #38b2ac;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 8px;
    font-size: 13px;
    color: #234e52;
}

.applied-coupon-code {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-coupon-btn {
    cursor: pointer;
    color: #e53e3e;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.remove-coupon-btn:hover {
    color: #c53030;
    transform: scale(1.1);
}

/* --- 3. ADMIN COUPON UI --- */
.user-search-result {
    position: absolute;
    background: #fff;
    width: 100%;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 10;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.user-result-item {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 12px;
}

.user-result-item:hover {
    background: #f4f7fa;
    color: var(--card-blue-1);
}

/* ========================================= */
/* PERFECT SUCCESS/ERROR MODAL UI           */
/* ========================================= */

.status-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.status-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-modal-card {
    background: #fff;
    width: 90%;
    max-width: 400px;
    /* Default for alerts */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: scale(0.9);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-modal-card.wide {
    max-width: 850px;
}

.status-modal-card.small {
    max-width: 340px;
}

.status-modal-overlay.active .status-modal-card {
    transform: scale(1);
}

/* Header (Top Half) */
.modal-header {
    padding: 15px 0;
    color: white;
}

.modal-header.success {
    background-color: #dcfce7;
    color: #15803d;
    border-bottom: 1px solid #bbf7d0;
}

.modal-header.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-bottom: 1px solid #fecaca;
}

.modal-header.info {
    background-color: #e0f2fe;
    color: #0369a1;
    border-bottom: 1px solid #bae6fd;
}

.modal-header.warning {
    background-color: #fef9c3;
    color: #a16207;
    border-bottom: 1px solid #fef08a;
}

.modal-icon-box {
    width: 40px;
    height: 40px;
    border: 2px solid currentColor;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.modal-icon-box .dashicons, 
.modal-icon-box i {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Body (Bottom Half) */
.modal-body {
    padding: 10px 20px;
}

.modal-message {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Buttons */
.modal-btn {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-btn.success {
    background-color: #15803d;
}

.modal-btn.success:hover {
    background-color: #166534;
}

.modal-btn.error {
    background-color: #b91c1c;
}

.modal-btn.error:hover {
    background-color: #991b1b;
}

.modal-btn.info {
    background-color: #0369a1;
}

.modal-btn.info:hover {
    background-color: #075985;
}

.modal-btn.secondary {
    background-color: #f1f5f9;
    color: #475569;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.modal-btn.secondary:hover {
    background-color: #e2e8f0;
}

.modal-btn.warning {
    background-color: #a16207;
}

.modal-btn.warning:hover {
    background-color: #854d0e;
}

/* Password Rules List */
.password-rules {
    list-style: none;
    padding: 12px;
    margin: 10px 0;
    background: #f8fafc;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: #64748b;
}

.password-rules li:last-child { margin-bottom: 0; }

.password-rules li.valid {
    color: #10b981;
}

.password-rules li i {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Admin User Search Results */
.user-search-result {
    position: absolute;
    background: #fff;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    z-index: 100;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.user-result-item {
    padding: 8px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.user-result-item:hover {
    background: #f4f7fa;
    color: #00b533;
}

/* Password Rules List */
.password-rules {
    list-style: none;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.password-rules li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.password-rules li:last-child { margin-bottom: 0; }
.password-rules li i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #cbd5e1;
}
.password-rules li.valid { color: #10b981; font-weight: 500; }
.password-rules li.valid i { color: #10b981; }

/* ========================================= */
/* UI UPDATE: SIDEBAR & FILTERS             */
/* ========================================= */

/* --- SIDEBAR TOGGLE (SHRINK) --- */
/* --- SIDEBAR TOGGLE (SHRINK) --- */
/* User's custom block removed - it targeted ul/li which don't exist */

/* --- DASHBOARD STATS (USER) --- */
.stat-box-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #333;
}

.stat-box p {
    margin: 0;
    color: #777;
    font-size: 13px;
}

.stat-sub {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    font-size: 12px;
    color: #555;
}

.stat-sub span {
    display: block;
    font-weight: 600;
    color: #333;
}

/* --- ORDER FILTER BAR --- */
.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.filter-label {
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.filter-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.date-range-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-input {
    padding: 7px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsive */
/* Responsive Sidebar (Mobile/Tablet up to 1024px) */
@media (max-width: 1024px) {
    .d-sidebar {
        position: fixed;
        height: 100vh;
        left: -260px;
        top: 0;
        z-index: 9999;
        width: 260px !important;
        /* Ensure full width on mobile */
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    /* When sidebar is "shown" on mobile, we slide it in */
    /* Note: We use a custom class 'mobile-open' instead of 'collapsed' to avoid conflicts */
    .d-sidebar.mobile-open {
        left: 0;
    }

    /* But if collapsed class exists on mobile, treat it as desktop would - narrow sidebar */
    .d-sidebar.collapsed {
        width: 70px !important;
        min-width: 70px !important;
        left: 0;
        /* Make it visible but narrow */
    }

    /* Force full display of items when NOT collapsed on mobile */
    .d-sidebar:not(.collapsed) .d-nav-item span:not(.dashicons) {
        display: inline !important;
    }

    .d-sidebar:not(.collapsed) .d-nav-item {
        justify-content: flex-start !important;
        padding: 12px 20px !important;
    }

    .d-sidebar:not(.collapsed) .d-brand {
        font-size: 20px !important;
    }

    .d-sidebar:not(.collapsed) .d-brand span:not(.dashicons) {
        display: inline !important;
    }

    /* Main content should be full width */
    .d-main,
    .d-sidebar+.d-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .stat-box-row {
        flex-direction: column;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========================================= */
/* NEW ADVANCED TABLE UI (SaaS Look)        */
/* ========================================= */

.advanced-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Spacing between rows like cards */
    margin-top: -10px;
}

.advanced-table thead th {
    background: transparent;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: #8898aa;
    padding: 10px 20px;
    border: none;
    letter-spacing: 0.5px;
    text-align: left;
}

.advanced-table tbody tr {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.advanced-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.advanced-table td {
    padding: 15px 20px;
    vertical-align: middle;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
    font-size: 13px;
    color: #555;
}

.advanced-table td:first-child {
    border-left: 1px solid #f1f1f1;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.advanced-table td:last-child {
    border-right: 1px solid #f1f1f1;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* --- CELL CONTENT STYLES --- */

/* Customer Info (Avatar + Text) */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e0f2fe;
    /* Light Blue */
    color: #0284c7;
    /* Dark Blue */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-info h5 {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.user-info span {
    font-size: 11px;
    color: #888;
    display: block;
}

/* Product/Sport Info */
.product-info h5 {
    margin: 0;
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.product-info span {
    font-size: 11px;
    color: #777;
}

/* Slot Badges */
.slot-tag {
    display: inline-block;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
    margin: 2px 0;
    border: 1px solid #e5e7eb;
}

/* Status Pills (Matches Screenshot Colors) */
.status-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.status-pill.completed {
    background: #00c292;
    color: #fff;
}

/* Teal */
.status-pill.pending {
    background: #fb9678;
    color: #fff;
}

/* Orange/Red */
.status-pill.failed {
    background: #e46a76;
    color: #fff;
}

/* Red */
.status-pill.processing {
    background: #03a9f3;
    color: #fff;
}

/* Blue */

/* Action Buttons */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
    color: #777;
    cursor: pointer;
    transition: 0.2s;
}

.action-btn:hover {
    background: #03a9f3;
    color: #fff;
    border-color: #03a9f3;
}

/* ==============================================
   BOOKING PAGE - RESPONSIVE LAYOUT
   ============================================== */

/* Desktop layout - side-by-side */
.booking-center-wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.booking-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.booking-left {
    flex: 1.5;
    min-width: 0;
}

.booking-right {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 20px;
}

/* Tablet - still side by side but tighter */
@media (max-width: 1024px) {
    .booking-layout {
        gap: 20px;
    }

    .booking-center-wrap {
        padding: 0 15px;
    }

    .booking-hero h1 {
        font-size: 2rem !important;
    }

    .booking-hero p {
        font-size: 1rem !important;
    }
}

/* Mobile - stack vertically */
@media (max-width: 768px) {
    .booking-center-wrap {
        padding: 0 10px;
    }

    .booking-layout {
        flex-direction: column;
        gap: 20px;
    }

    .booking-left,
    .booking-right {
        width: 100%;
        flex: none;
    }

    .booking-right {
        position: static;
    }

    .booking-hero {
        padding: 30px 15px !important;
        margin-bottom: 20px !important;
    }

    .booking-hero h1 {
        font-size: 1.75rem !important;
    }

    .booking-hero p {
        font-size: 0.95rem !important;
    }

    /* Make form inputs more touch-friendly */
    .form-control,
    .btn {
        min-height: 48px;
        font-size: 16px !important;
        /* Prevents iOS zoom */
    }

    /* Time grid adjustments */
    .time-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .time-pill {
        padding: 10px 5px !important;
        font-size: 0.85rem !important;
    }

    /* Cart items on mobile */
    .cart-item {
        padding: 12px !important;
        font-size: 0.9rem !important;
    }

    /* Buttons on mobile */
    .btn-primary,
    .btn-outline {
        height: 48px !important;
        font-size: 1rem !important;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .booking-hero h1 {
        font-size: 1.5rem !important;
    }

    .booking-hero p {
        font-size: 0.9rem !important;
    }

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

    /* Stack coupon input and button */
    .form-group>div {
        flex-direction: column !important;
    }

    .form-group input+button {
        width: 100% !important;
    }
}

/* ==============================================
   LOGIN / SIGN UP / FORGOT PASSWORD PAGES
   ============================================== */

/* Gradient background only for signup, forgot password, and reset password pages */
.login-body.signup-page,
.login-body.forgot-password-page,
.login-body.reset-password-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Regular login page - simple background */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    padding: 20px;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #3498db;
    top: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: #2ecc71;
    bottom: -200px;
    right: -200px;
    animation: float 30s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #16a085;
    top: 50%;
    right: 10%;
    animation: float 20s ease-in-out infinite;
}

/* Floating animation keyframes */
@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }

    50% {
        transform: translate(60px, 30px) rotate(180deg);
    }

    75% {
        transform: translate(-30px, 60px) rotate(270deg);
    }
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.login-title {
    text-align: center;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px 0;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.login-control:focus {
    outline: none;
    border-color: #4099ff;
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    cursor: pointer;
}

.forgot-link {
    color: #4099ff;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #4099ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover {
    background: #3082e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 153, 255, 0.3);
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.login-footer a {
    color: #4099ff;
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Sign up specific styles */
.signup-name-row {
    display: flex;
    gap: 15px;
}

.signup-name-row .login-input-group {
    flex: 1;
}

/* Message styles */
.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .signup-name-row {
        flex-direction: column;
        gap: 0;
    }

    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }
}

/* Highlight Selected Court/Slot */
.cart-item.selected {
    background-color: #00b050 !important;
    /* User's Requested Green */
    color: #ffffff !important;
    border-color: #00b050 !important;
    border-left-color: #008a3e !important;
}

.cart-item.selected strong,
.cart-item.selected small,
.cart-item.selected div {
    color: #ffffff !important;
}

.cart-item.selected:hover {
    background-color: #009e48 !important;
}

/* Hamburger Menu Cursor Fix */
.dashicons-menu {
    cursor: pointer !important;
}

/* ==============================================
   PROFILE PAGE REDESIGN
   ============================================== */

/* Wrapper handles the columns */
.profile-grid-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-left-col {
    flex: 0 0 300px;
    /* Fixed width for avatar column */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-right-col {
    flex: 1;
    /* Takes remaining space */
}

/* Card Updates */
.d-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    padding: 30px;
    border: 1px solid var(--border);
}

.profile-avatar-card {
    padding: 40px 20px;
}

/* Avatar Styling */
.profile-large-avatar {
    transition: 0.3s;
    background: #f1f1f1;
}

/* Security Section */
.profile-security-card {
    background: #fff5f5;
    /* Subtle red hint for sensitive area */
    border: 1px solid #fed7d7;
}

/* Form Layouts */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row.two-col>* {
    flex: 1;
}

/* Input Styling */
.form-control {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #2d3748;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    transition: 0.2s;
}

.form-control:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Disabled Input State (Read-Only Look) */
.form-control:disabled {
    background: #f7fafc;
    border-color: #edf2f7;
    color: #718096;
    cursor: default;
}

/* Required field override for disabled */
.form-control:disabled:required {
    background: #f7fafc;
}

/* Responsive Profile */
@media (max-width: 1024px) {
    .profile-grid-layout {
        flex-direction: column;
    }

    .profile-left-col {
        flex: none;
        width: 100%;
        flex-direction: row;
        /* Side by side on tablet */
    }

    .profile-left-col>div {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .profile-left-col {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- NEW BUTTON CONFIGURATION (Bootstrap-like Flat UI) --- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none !important;
    line-height: 1.5;
}

.btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Colors */
.btn-primary {
    background-color: #4099ff !important;
    color: #fff !important;
    border-color: #4099ff !important;
}

.btn-secondary {
    background-color: #596670 !important;
    color: #fff !important;
    border-color: #596670 !important;
}

.btn-success {
    background-color: #0ac282 !important;
    color: #fff !important;
    border-color: #0ac282 !important;
}

.btn-danger {
    background-color: #FF5370 !important;
    color: #fff !important;
    border-color: #FF5370 !important;
}

.btn-warning {
    background-color: #FFB64D !important;
    color: #fff !important;
    border-color: #FFB64D !important;
}

.btn-info {
    background-color: #4099ff !important;
    color: #fff !important;
    border-color: #4099ff !important;
}

.btn-light {
    background-color: #f8f9fa !important;
    color: #333 !important;
    border-color: #d6d8db !important;
}

.btn-dark {
    background-color: #343a40 !important;
    color: #fff !important;
    border-color: #343a40 !important;
}

/* Outline Buttons */
.btn-outline {
    background: transparent !important;
    color: #666 !important;
    border: 1px solid #ccc !important;
}

.btn-outline:hover {
    background: #f8f9fa !important;
    color: #333 !important;
}

.btn-outline-danger {
    background: transparent !important;
    color: #FF5370 !important;
    border: 1px solid #FF5370 !important;
}

.btn-outline-danger:hover {
    background-color: #FF5370 !important;
    color: #fff !important;
}

.btn-block,
.w-100 {
    display: block;
    width: 100%;
}

/* Checkout Page Specific Overrides */
#checkout_cart_list .btn,
#checkout-actions .btn {
    padding: 8px 16px;
    font-size: 0.95rem;
}

/* 404 Page Styles */
.error-404-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    /* Very light green bg */
    text-align: center;
    padding: 20px;
}

.error-404-content {
    max-width: 600px;
    width: 100%;
}

.bouncing-ball-wrap {
    position: relative;
    height: 150px;
    width: 100px;
    margin: 0 auto 30px;
}

.bouncing-ball {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 18px 18px, #ffffff, #0ac282);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 20px;
    animation: bounce 1s infinite alternate cubic-bezier(0.5, 0.05, 1, 0.5);
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.1);
}

.ball-shadow {
    width: 60px;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 20px;
    animation: shadow 1s infinite alternate cubic-bezier(0.5, 0.05, 1, 0.5);
}

@keyframes bounce {
    0% {
        top: 0;
        transform: scale(1);
    }

    100% {
        top: 120px;
        transform: scale(1.1, 0.9);
    }
}

@keyframes shadow {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.error-title {
    font-size: 6rem;
    font-weight: 900;
    color: var(--primary);
    margin: 0;
    line-height: 1;
    text-shadow: 2px 2px 0px #abf7b1;
}

.error-subtitle {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 10px 0 15px;
}

.error-text {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 30px;
}

/* --- SLOTS TIMELINE VIEW --- */
.timeline-header-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.timeline-corner {
    width: 200px;
    /* Reduced to match design better */
    flex-shrink: 0;
    font-weight: bold;
    padding: 10px;
    background: #fff;
    position: sticky;
    left: 0;
    z-index: 10;
}

.timeline-hours-track {
    display: flex;
    flex-grow: 1;
    position: relative;
    min-width: 800px;
    /* Force scroll on small screens */
}

.timeline-hour-marker {
    flex: 1;
    text-align: left;
    font-size: 12px;
    color: #888;
    position: relative;
    border-left: 1px dashed #eee;
    padding-left: 5px;
}

.timeline-court-row {
    display: flex;
    margin-bottom: 15px;
    align-items: stretch;
    background: #fff;
    /*border: 1px solid #f0f0f0;*/
    /*border-radius: 8px;*/
}

.timeline-court-info {
    width: 200px;
    flex-shrink: 0;
    padding: 15px;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: sticky;
    /* Sticky left column */
    left: 0;
    background: #fff;
    z-index: 5;
    box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.05);
}

.timeline-court-name {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

.timeline-court-meta {
    font-size: 0.8rem;
    color: #999;
}

.timeline-data-track {
    flex-grow: 1;
    background: #fdfdfd;
    position: relative;
    min-width: 800px;
    height: 60px;
    /* Fixed height for slots */
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    /*Grid lines*/
    background-image: linear-gradient(to right, #f5f5f5 1px, transparent 1px);
    background-size: 6.25% 100%;
    /* 100 / 16 hours = 6.25% if 16 slots. Will adjust in JS */
}

.timeline-block {
    position: absolute;
    top: 10px;
    bottom: 10px;
    background: #e5e7eb;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    overflow: hidden;
    white-space: nowrap;
}

.timeline-block.status-confirmed,
.timeline-block.status-completed,
.timeline-block.status-ordered {
    background: #e5e7eb;
    /* Booked color */
}

.timeline-block.status-mine {
    background: #0ac282;
    /* User's booking */
    color: #fff;
    box-shadow: 0 2px 5px rgba(10, 194, 130, 0.2);
}

.timeline-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Scrollbar for timeline */
#slots_timeline_container::-webkit-scrollbar {
    height: 8px;
}

#slots_timeline_container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#slots_timeline_container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

#slots_timeline_container::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* --- SLOTS VIEW ADDITIONS --- */

/* Free Slot - Interactive */
.timeline-block.status-free {
    background: #ffffff;
    border: 1px dashed #cccccc;
    /* Dashed border to indicate open */
    cursor: pointer;
    z-index: 1;
    /* Below booked slots if overlap, though shouldn't overlap */
    opacity: 0.8;
}

.timeline-block.status-free:hover {
    background: #e6fffa;
    /* Very light green on hover */
    border-color: #0ac282;
    opacity: 1;
    z-index: 10;
}

/* Selected Slot */
.timeline-block.status-free.selected-slot {
    background: #0ac282 !important;
    color: #fff !important;
    border: 1px solid #08a16b !important;
    opacity: 1 !important;
    z-index: 20 !important;
    box-shadow: 0 4px 6px rgba(10, 194, 130, 0.3);
}

.timeline-block.status-free.selected-slot::after {
    content: "✓";
    font-size: 14px;
    font-weight: bold;
    margin-left: 5px;
    color: #fff;
}

/* Booked Slot (Not Mine) */
.timeline-block.status-booked {
    background: #d1d5db;
    /* Gray */
    color: #fff;
    cursor: not-allowed;
    border: 1px solid #9ca3af;
}

/* My Reservation - Ensure Green */
.timeline-block.status-mine {
    background: #0ac282;
    color: #fff;
    border: 1px solid #08a16b;
    z-index: 5;
}

/* Booking Controls inside Timeline */
.slots-booking-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Maintenance / Break Slot */
.timeline-block.status-maintenance {
    background: #e0e0e0;
    border: 1px solid #ccc;
    background-image: repeating-linear-gradient(45deg, #ddd, #ddd 10px, #eee 10px, #eee 20px);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.timeline-block.status-maintenance .dashicons {
    color: #888;
}

/* --- MOBILE APP-LIKE DASHBOARD --- */
.mobile-only-home {
    display: none;
}

.mobile-back-btn {
    display: none;
}

@media (max-width: 768px) {

    #mysidebar,
    #mob_hamburger {
        display: none !important;
    }

    .desktop-only-nav {
        display: none !important;
    }

    /* Keep Brand visible on mobile now */
    .brand-name-header,
    .brand-icon-header {
        display: inline-block !important;
        /* Forces visibility overriding PHP inline style */
    }

    .mob-greeting-panel {
        background: #fff;
        padding: 20px 25px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
        margin-bottom: 25px;
        border-left: 4px solid var(--primary);
    }

    .user-profile .user-avatar {
        display: none !important;
    }

    /* PREVIOUS BOOKINGS MOBILE TABLE FIX */
    .desktop-header,
    .desktop-order-row {
        display: none !important;
    }

    .mobile-header {
        display: table-header-group !important;
    }

    .mobile-order-row {
        display: table-row !important;
    }

    .desktop-only-home {
        display: none !important;
    }

    .mobile-only-home {
        display: block;
        padding-bottom: 20px;
    }

    .responsive-orders-view {
        display: none;
        margin-top: 15px;
    }

    .mobile-back-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 15px;
        color: var(--primary);
        font-weight: 600;
        cursor: pointer;
    }

    .mob-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .mob-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mob-user-info img {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        object-fit: cover;
        background: #e2e8f0;
    }

    .mob-user-info .greeting {
        color: #64748b;
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .mob-user-info .date {
        color: #1e293b;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .mob-actions {
        position: relative;
    }

    .mob-actions .dashicons-bell {
        font-size: 24px;
        color: #64748b;
    }

    .mob-actions::after {
        content: '3';
        position: absolute;
        top: -2px;
        right: -2px;
        background: #ef4444;
        color: white;
        font-size: 10px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--bg-light);
    }

    .mob-section h3 {
        font-size: 1.1rem;
        color: #1e293b;
        margin: 0 0 15px 0;
        font-weight: 700;
    }

    .mob-action-grid {
        display: flex;
        gap: 15px;
    }

    .mob-action-card {
        flex: 1;
        border-radius: 16px;
        padding: 25px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
        gap: 12px;
        cursor: pointer;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s;
    }

    .mob-action-card:active {
        transform: scale(0.96);
    }

    .mob-action-card.mob-bg-green {
        background: #41cc81;
    }

    .mob-action-card.mob-bg-blue {
        background: #4e80fb;
    }

    .mob-action-card .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }

    .mob-action-card span:last-child {
        font-size: 0.95rem;
        font-weight: 600;
        text-align: center;
    }
}

/* --- MOBILE ORDER CARD UI --- */
.mob-order-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
}

.mob-order-header {
    padding: 20px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mob-order-header-left p {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 4px 0;
}

.mob-order-header-left h2 {
    font-size: 1.875rem;
    font-weight: 900;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.mob-order-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.mob-status-badge {
    padding: 4px 12px;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.mob-status-completed {
    background-color: #dcfce7;
    color: #15803d;
}

.mob-status-pending {
    background-color: #fef08a;
    color: #854d0e;
}

.mob-status-failed {
    background-color: #fee2e2;
    color: #b91c1c;
}

.mob-price-block {
    text-align: right;
}

.mob-price-block p:first-child {
    font-size: 0.625rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
}

.mob-price-block p:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.mob-order-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mob-sport-group {
    /* container for a single sport and its courts */
}

.mob-sport-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mob-sport-icon {
    font-size: 1.125rem;
}

.mob-sport-name {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Distinctive branch colors based on index or sport name dynamically but we'll use a generic blue/orange classes */
.mob-court-details {
    padding-left: 12px;
    border-left-width: 2px;
    border-left-style: solid;
    margin-bottom: 12px;
}

.mob-court-details:last-child {
    margin-bottom: 0;
}

.mob-court-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.mob-court-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.mob-court-time-row span:last-child {
    font-weight: 500;
    color: #374151;
}

.mob-order-divider {
    border-top: 1px solid #f9fafb;
    margin: 0;
}

/* Responsive Table Overrides */
@media(max-width: 768px) {

    table.advanced-table .mobile-header,
    table.advanced-table .desktop-header {
        display: none !important;
    }

    table.advanced-table,
    table.advanced-table tbody {
        display: block !important;
    }

    /* Hide the original mobile row */
    tr.mobile-order-row {
        display: none !important;
    }

    /* Show the new card row */
    tr.mobile-order-card-row {
        display: block !important;
        margin-bottom: 20px;
    }

    tr.mobile-order-card-row>td {
        display: block;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }
}

/* ========================================= */
/* ABSOLUTE OVERRIDES FOR SIDEBAR COLLAPSE   */
/* ========================================= */
#mysidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    flex: 0 0 70px !important;
    overflow: hidden !important;
}

#mysidebar.collapsed .d-brand {
    width: 70px !important;
    max-width: 70px !important;
    flex: 0 0 70px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
}

#mysidebar.collapsed .brand-text,
#mysidebar.collapsed .brand-icon {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}
/* --- AJAX Messages --- */
.success-message {
    background: #e8f8f0;
    border: 1px solid #a3dfbe;
    color: #1a7a4a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.error-message {
    background: #fff0f0;
    border: 1px solid #f5b7b7;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Premium Success Overlay --- */
.mbm-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    animation: overlayFadeIn 0.4s ease forwards;
}

.mbm-success-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 320px;
    width: 90%;
    transform: scale(0.8);
    animation: modalScaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.mbm-checkmark-circle {
    width: 80px;
    height: 80px;
    background: #00b533;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
    box-shadow: 0 10px 20px rgba(0, 181, 51, 0.3);
}

.mbm-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.mbm-success-sub {
    font-size: 14px;
    color: #6b7280;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Guest Booking Flow --- */
.guest-form-container {
    display: none;
    animation: slideUp 0.4s ease-out;
}

.mbm-toggle-guest {
    display: block;
    width: 100%;
    background: none;
    border: 1px solid var(--border);
    color: #555;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.mbm-toggle-guest:hover {
    background: #f8f9fa;
    border-color: #ddd;
}

.guest-step-2 {
    display: none;
}

.otp-input-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.otp-digit {
    width: 45px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #f9f9f9;
    transition: 0.3s;
}

.otp-digit:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(64, 153, 255, 0.1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MBM UTILITY CLASSES --- */
.mbm-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}
.mbm-badge.status-completed { background: #dcfce7; color: #166534; }
.mbm-badge.status-pending { background: #fef9c3; color: #854d0e; }
.mbm-badge.status-cancelled { background: #fee2e2; color: #991b1b; }
.mbm-badge.status-failed { background: #fca5a5; color: #7f1d1d; }

.mbm-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.mbm-btn-sm { padding: 4px 10px; font-size: 12px; }
.mbm-btn-outline {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}
.mbm-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.mbm-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    outline: none;
}
.mbm-select:focus { border-color: #3b82f6; }

.mbm-loader {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: mbm-spin 1s linear infinite;
    display: inline-block;
}
@keyframes mbm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mbm-filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.mbm-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Custom Admin Tables & Helpers */
.mbm-table-bs {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    font-size: 14px;
}
.mbm-table-bs thead th {
    background: #f4f7fa;
    color: #404E67;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}
.mbm-table-bs tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.mbm-table-bs tbody tr:nth-child(even) {
    background: #f9fafb;
}
.mbm-table-bs tbody tr:hover {
    background: #f3f4f6;
}

/* Badges & Color Helpers */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
    text-transform: uppercase;
}
.bg-success { background-color: #10b981 !important; color: #fff !important; }
.bg-danger { background-color: #ef4444 !important; color: #fff !important; }
.bg-warning { background-color: #f59e0b !important; color: #000 !important; }
.bg-info { background-color: #3b82f6 !important; color: #fff !important; }
.bg-secondary { background-color: #6b7280 !important; color: #fff !important; }
.bg-primary { background-color: #2563eb !important; color: #fff !important; }

.text-danger { color: #ef4444 !important; }
.text-success { color: #10b981 !important; }
.text-primary { color: #2563eb !important; }
.text-muted { color: #6b7280 !important; }
.fw-bold { font-weight: 700 !important; }
.text-dark { color: #111827 !important; }

/* Grid / Flex Helpers */
.mbm-row { display: flex; flex-wrap: wrap; margin-left: -10px; margin-right: -10px; }
.mbm-col-6 { flex: 0 0 50%; max-width: 50%; padding-left: 10px; padding-right: 10px; box-sizing: border-box; }
.mbm-col-12 { flex: 0 0 100%; max-width: 100%; padding-left: 10px; padding-right: 10px; box-sizing: border-box; }
@media (max-width: 768px) {
    .mbm-col-6 { flex: 0 0 100%; max-width: 100%; }
}

/* ===== NOTIFICATIONS SYSTEM ===== */
.mbm-notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.mbm-notif-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #555;
    font-size: 18px;
    transition: background 0.2s, color 0.2s;
    padding: 0;
}

.mbm-notif-bell:hover {
    background: rgba(0,0,0,0.07);
    color: var(--primary, #00b533);
}

.mbm-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #fff;
    pointer-events: none;
}

.mbm-notif-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 99999;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.mbm-notif-panel.active {
    display: flex;
}

.mbm-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
    flex-shrink: 0;
}

.mbm-notif-mark-read {
    background: none;
    border: none;
    color: var(--primary, #00b533);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
}

.mbm-notif-mark-read:hover {
    text-decoration: underline;
}

.mbm-notif-list {
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

.mbm-notif-list::-webkit-scrollbar { width: 4px; }
.mbm-notif-list::-webkit-scrollbar-track { background: transparent; }
.mbm-notif-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.mbm-notif-group-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary, #00b533);
    letter-spacing: 0.07em;
    padding: 10px 18px 4px;
    text-transform: uppercase;
}

.mbm-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.15s;
    cursor: default;
}

.mbm-notif-item:hover {
    background: #f8faff;
}

.mbm-notif-item.unread {
    background: #f0fdf4;
    border-left: 3px solid var(--primary, #00b533);
}

.mbm-notif-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.mbm-notif-content {
    flex: 1;
    min-width: 0;
}

.mbm-notif-title {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    margin-bottom: 2px;
}

.mbm-notif-msg {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.mbm-notif-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.mbm-notif-footer {
    padding: 10px 18px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    flex-shrink: 0;
}

.mbm-notif-clear-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.mbm-notif-clear-btn:hover {
    background: #fee2e2;
}

.mbm-notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

.mbm-notif-loading {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive: mobile full-width panel */
@media (max-width: 600px) {
    .mbm-notif-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100vw;
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-height: calc(100vh - 60px);
    }
}
