/**
 * Master Hotel Manager & MotoPress Dashboard Stylesheet
 * Version: 1.2.0
 */

:root {
    --primary: #2271b1;
    --sidebar-width: 25%;
    --bg-light: #f0f2f5;
    --border-color: #dcdcde;
    --text-main: #1d2327;
    --text-muted: #646970;
}

/* ==========================================================================
   1. Dashboard Navigation Tabs
   ========================================================================== */
.mphb-dashboard-tabs { 
    display: flex !important; 
    gap: 6px !important; 
    border-bottom: 2px solid #c3c4c7 !important; 
    margin-bottom: 20px !important; 
    overflow-x: auto !important; 
    white-space: nowrap !important; 
    -webkit-overflow-scrolling: touch !important; 
    scrollbar-width: none !important; 
    padding: 4px 2px 0 2px !important;
}
.mphb-dashboard-tabs::-webkit-scrollbar { display: none !important; }
.mphb-dashboard-tabs a { 
    flex-shrink: 0 !important; 
    text-decoration: none !important; 
    padding: 10px 18px !important; 
    font-size: 13px !important; 
    font-weight: 600 !important; 
    color: #646970 !important; 
    border: 1px solid transparent !important; 
    border-bottom: none !important; 
    border-radius: 6px 6px 0 0 !important; 
    background: transparent !important; 
    margin-bottom: -2px !important; 
    transition: all 0.2s ease !important; 
    display: inline-flex !important; 
    align-items: center !important; 
    gap: 6px !important; 
    min-height: 40px !important; 
    touch-action: manipulation !important;
}
.mphb-dashboard-tabs a:hover { color: #2271b1 !important; background: #f6f7f7 !important; }
.mphb-dashboard-tabs a.active { background: #f0f0f1 !important; color: #2271b1 !important; border-color: #c3c4c7 !important; border-bottom-color: #f0f0f1 !important; }

/* ==========================================================================
   2. Master Manager Dashboard Container & Sidebar
   ========================================================================== */
.mphb-manager-dashboard {
    display: flex;
    min-height: 80vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid var(--border-color);
    margin: 20px 0;
}

.dash-sidebar {
    width: var(--sidebar-width);
    background: #f8f9fa;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.dash-sidebar-header {
    padding: 0 24px 20px;
    display: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.dash-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-tab-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-tab-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.dash-tab-link:hover {
    background: #edf2f7;
    color: var(--primary);
}

.dash-tab-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    background: #edf2f7;
}

.dash-tab-link.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    border-left-color: var(--primary);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.02);
}

.dash-tab-panel:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dash-tab-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.dash-tab-logout {
    margin-top: auto;
    color: #d63638 !important;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
}

.dash-tab-logout:hover {
    background: #fdf2f2 !important;
    color: #b32d2e !important;
}

/* Logout Modal */
.logout-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.logout-modal {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.logout-modal-icon {
    font-size: 48px;
    color: #d63638;
    margin-bottom: 20px;
}

.logout-modal h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #1d2327;
}

.logout-modal p {
    color: #646970;
    margin-bottom: 30px;
    line-height: 1.5;
}

.logout-modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm-logout {
    background: #d63638;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    flex: 1;
    transition: all 0.3s ease;
}

.btn-confirm-logout:hover {
    background: #b32d2e;
    transform: translateY(-2px);
}

.btn-cancel-logout {
    background: #f0f2f5;
    color: #1d2327;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    flex: 1;
    transition: all 0.3s ease;
}

.btn-cancel-logout:hover {
    background: #e2e8f0;
}

/* Main Content Area */
.dash-main-content {
    flex: 1;
    padding: 30px;
    background: #fff;
    overflow-x: hidden;
}

.dash-tab-title {
    margin: 0 0 30px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    display: none;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.mphb-error-notice {
    padding: 20px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #1d2327;
    font-weight: 600;
    border-radius: 4px;
}

/* ==========================================================================
   3. Bookings, Payments & Customers Tables
   ========================================================================== */
.mphb-bookings-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    color: #2c3338;
    line-height: 1.5;
    background: #f0f0f1;
    padding: 20px;
    border-radius: 10px;
}
.mphb-bookings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mphb-bookings-header h2 { font-size: 20px; font-weight: 700; color: #1d2327; margin: 0; }
.mphb-count { font-size: 12px; color: #646970; margin-bottom: 10px; }
.mphb-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; background: #fff; padding: 15px; border-radius: 4px; border: 1px solid #c3c4c7; align-items: flex-end; }
.mphb-filters label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: #2c3338; }
.mphb-filters input, .mphb-filters select { padding: 6px 10px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 13px; line-height: 1.4; outline: none; }
.mphb-filters input:focus, .mphb-filters select:focus { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; }
.mphb-btn { padding: 7px 14px; background: #2271b1; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; text-decoration: none; font-size: 13px; }
.mphb-btn:hover { background: #135e96; color: #fff; }
.mphb-btn-clear { background: #f0f0f1; color: #2271b1; border: 1px solid #2271b1; }
.mphb-btn-clear:hover { background: #f6f7f7; color: #135e96; }
.mphb-table-wrap { background: #fff; border: 1px solid #c3c4c7; border-radius: 4px; overflow-x: auto; }
.mphb-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.mphb-table thead th { background: #f6f7f7; border-bottom: 1px solid #c3c4c7; padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; color: #1d2327; white-space: nowrap; }
.mphb-table tbody tr { border-bottom: 1px solid #e6e7e8; transition: background .1s; }
.mphb-table tbody tr:last-child { border-bottom: none; }
.mphb-table tbody tr:hover { background: #f9f9f9; }
.mphb-table td { padding: 12px 14px; vertical-align: top; font-size: 12px; color: #2c3338; }
.mphb-id { color: #2271b1; font-weight: 700; font-size: 13px; text-decoration: none; display: inline-block; padding: 2px 6px; border-radius: 3px; background: rgba(34,113,177,.1); transition: background .2s; }
.mphb-id:hover { background: rgba(34,113,177,.2); }

/* Status badges (WCAG 2.1 AA Compliant - Contrast > 4.5:1, distinct borders & text labels) */
.mphb-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; text-transform: capitalize; border: 1px solid transparent; transition: all 0.15s ease; }
.mphb-badge:hover, .mphb-badge:focus-visible { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); outline: 2px solid transparent; }
.mphb-confirmed { background: #dcfce7; color: #14532d; border-color: #16a34a; }
.mphb-confirmed:hover, .mphb-confirmed:focus-visible { background: #bbf7d0; color: #052e16; border-color: #15803d; }
.mphb-cancelled { background: #fee2e2; color: #7f1d1d; border-color: #dc2626; }
.mphb-cancelled:hover, .mphb-cancelled:focus-visible { background: #fecaca; color: #450a0a; border-color: #b91c1c; }
.mphb-abandoned { background: #fef3c7; color: #78350f; border-color: #d97706; }
.mphb-abandoned:hover, .mphb-abandoned:focus-visible { background: #fde68a; color: #451a03; border-color: #b45309; }
.mphb-pending-payment { background: #e0e7ff; color: #1e1b4b; border-color: #6366f1; }
.mphb-pending-payment:hover, .mphb-pending-payment:focus-visible { background: #c7d2fe; color: #0f0d2b; border-color: #4f46e5; }
.mphb-pending { background: #fef9c3; color: #713f12; border-color: #ca8a04; }
.mphb-pending:hover, .mphb-pending:focus-visible { background: #fef08a; color: #422006; border-color: #a16207; }
.mphb-completed { background: #dbeafe; color: #1e3a8a; border-color: #3b82f6; }
.mphb-completed:hover, .mphb-completed:focus-visible { background: #bfdbfe; color: #172554; border-color: #2563eb; }
.mphb-refunded { background: #f3e8ff; color: #581c87; border-color: #9333ea; }
.mphb-refunded:hover, .mphb-refunded:focus-visible { background: #e9d5ff; color: #3b0764; border-color: #7e22ce; }
.mphb-default { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }
.mphb-default:hover, .mphb-default:focus-visible { background: #e2e8f0; color: #020617; border-color: #64748b; }

/* Dates cell */
.mphb-date-label { color: #646970; font-size: 11px; display: inline-block; width: 58px; }
.mphb-date-val { font-weight: 600; color: #1d2327; }
.mphb-nights { display: inline-block; margin-top: 5px; background: #f0f0f1; border-radius: 10px; padding: 1px 9px; font-size: 11px; color: #646970; }
.mphb-cust-name { font-weight: 700; color: #1d2327; margin-bottom: 2px; }

/* Pagination */
.mphb-pagination { margin-top: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mphb-pagination a, .mphb-pagination span { padding: 8px 12px; background: #fff; border: 1px solid #c3c4c7; border-radius: 4px; color: #2271b1; text-decoration: none; font-size: 13px; font-weight: 500; }
.mphb-pagination a:hover { background: #f0f0f1; border-color: #2271b1; }
.mphb-pagination .current { background: #2271b1; color: #fff; border-color: #2271b1; }

/* Form modal groups */
.mphb-row2 { display: flex; gap: 15px; margin-bottom: 15px; }
.mphb-form-group { margin-bottom: 15px; }
.mphb-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #2c3338; }
.mphb-form-group input, .mphb-form-group select, .mphb-form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid #8c8f94; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.mphb-form-group input:focus, .mphb-form-group select:focus, .mphb-form-group textarea:focus { border-color: #2271b1; outline: none; box-shadow: 0 0 0 1px #2271b1; }

/* Responsive adjustments */
@media (max-width: 991px) {
    .mphb-manager-dashboard {
        flex-direction: column;
    }
    .dash-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
    }
    .dash-tab-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 10px;
    }
    .dash-tab-link {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .dash-tab-link.active {
        border-bottom-color: var(--primary);
    }
}
