/* ============================================================
   EVENTS BY SANCOSCO — RESTNTRIP NAVY + CRIMSON PORTAL THEME
   Shared brand with RestNTrip (accent red + deep navy)
   ============================================================ */

:root {
    /* Brand Colors */
    --primary-navy: #0B1F3A;
    --accent-red: #B22222;
    --bg-light: #F8F9FB;
    --card-bg: #FFFFFF;
    --text-main: #1F2937;
    --border-color: #E7E7E7;

    /* Legacy aliases (used throughout portal CSS) */
    --ebs-black: var(--primary-navy);
    --ebs-charcoal: #122A4A;
    --ebs-panel: #163053;
    --ebs-panel-2: #1A3A5F;
    --ebs-line: rgba(178, 34, 34, 0.18);
    --ebs-line-soft: rgba(11, 31, 58, 0.08);
    --ebs-gold: var(--accent-red);
    --ebs-gold-bright: #D04545;
    --ebs-ivory: #F8F9FB;
    --ebs-ivory-dim: #6B7280;
    --ebs-serif: "Playfair Display", Georgia, serif;
    --ebs-sans: "Inter", "Poppins", system-ui, sans-serif;
}

/* ---------- Base ---------- */
body {
    background: #F8F9FA !important;
    color: #2B2D42 !important;
    font-family: var(--ebs-sans);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #2B2D42;
}

a { color: var(--ebs-gold); }
a:hover { color: var(--ebs-gold-bright); }

p, span, label, small, .text-muted, .form-label {
    color: #64748B !important;
}

.sidebar-nav .nav-link span,
.header-nav .nav-profile span {
    color: inherit !important;
}

.header-nav .nav-profile span {
    color: var(--ebs-ivory) !important;
}

hr { border-color: var(--ebs-line); }

::selection { background: var(--ebs-gold); color: #ffffff; }

/* ---------- Header ---------- */
.header {
    background: linear-gradient(180deg, #0B1B3D 0%, #0A1733 100%) !important;
    border-bottom: 1px solid var(--ebs-line);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.55) !important;
}

.header .toggle-sidebar-btn { color: var(--ebs-gold); }
.header .logo img { max-height: 44px; }
.header .logo span { color: var(--ebs-gold-bright); }

.header-nav .nav-icon { color: var(--ebs-ivory-dim); }
.header-nav .nav-profile { color: var(--ebs-ivory); }
.header-nav .nav-profile span { color: var(--ebs-ivory) !important; }
.header-nav .badge-number { background: var(--ebs-gold) !important; color: #ffffff; }

/* ---------- Sidebar ---------- */
.sidebar {
    background: linear-gradient(180deg, #0B1B3D 0%, #09142C 100%) !important;
    border-right: 1px solid var(--ebs-line-soft);
    box-shadow: none !important;
}

.sidebar-nav .nav-item { margin-bottom: 2px; }

.sidebar-nav .nav-link {
    background: transparent !important;
    color: var(--ebs-ivory-dim) !important;
    border-radius: 6px;
    letter-spacing: 0.4px;
    font-weight: 400;
    transition: all 0.25s ease;
}

.sidebar-nav .nav-link i { color: var(--ebs-gold) !important; }

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:not(.collapsed) {
    background: rgba(168, 28, 36, 0.10) !important;
    color: var(--ebs-gold-bright) !important;
}

.sidebar-nav .nav-content a {
    color: var(--ebs-ivory-dim) !important;
}
.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
    color: var(--ebs-gold-bright) !important;
}
.sidebar-nav .nav-content a i { color: var(--ebs-gold); }

.sidebar-nav .nav-heading { color: var(--ebs-gold); }

/* ---------- Main content / page titles ---------- */
.main { background: #F8F9FA; }

.pagetitle h1 {
    color: #2B2D42;
    font-family: var(--ebs-serif);
    font-weight: 600;
    font-size: 30px;
}

.breadcrumb .breadcrumb-item a { color: var(--ebs-gold); }
.breadcrumb .breadcrumb-item.active { color: var(--ebs-ivory-dim); }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--ebs-ivory-dim); }

/* ---------- Cards ---------- */
.card {
    background: #ffffff !important;
    border: 1px solid rgba(168, 28, 36, 0.28) !important;
    box-shadow: 0 10px 28px rgba(20, 16, 10, 0.06) !important;
    border-radius: 10px;
}

.card-title {
    color: #2B2D42 !important;
    font-family: var(--ebs-serif);
    font-size: 20px;
}

.card-header, .card-footer {
    background: #FFFFFF !important;
    border-color: rgba(168, 28, 36, 0.2) !important;
    color: #2B2D42;
}

/* Dashboard info cards */
.info-card .card-icon {
    background: rgba(168, 28, 36, 0.12) !important;
    color: var(--ebs-gold) !important;
}
.info-card h6 { color: var(--ebs-ivory) !important; }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-custom,
.btn-verify-otp {
    background: linear-gradient(135deg, #A81C24 0%, #C43A42 100%) !important;
    border: 1px solid var(--ebs-gold) !important;
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.6px;
}

.btn-primary:hover,
.btn-custom:hover,
.btn-verify-otp:hover {
    background: linear-gradient(135deg, #8F171E 0%, #A81C24 100%) !important;
    border-color: var(--ebs-gold-bright) !important;
    color: #ffffff !important;
}

.btn-secondary {
    background: #F1F5F9 !important;
    border: 1px solid rgba(168, 28, 36, 0.45) !important;
    color: #2B2D42 !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: #E2E8F0 !important;
    border-color: var(--ebs-gold) !important;
    color: #2B2D42 !important;
}

/* Secondary on dark panels (modals / sidebar shells) */
.modal-content .btn-secondary,
.sidebar .btn-secondary {
    background: transparent !important;
    border: 1px solid var(--ebs-line) !important;
    color: var(--ebs-ivory) !important;
}
.modal-content .btn-secondary:hover,
.sidebar .btn-secondary:hover {
    background: rgba(168, 28, 36, 0.16) !important;
    color: var(--ebs-gold-bright) !important;
}

.btn-outline-primary {
    border-color: var(--ebs-gold) !important;
    color: var(--ebs-gold) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background: var(--ebs-gold) !important;
    color: #ffffff !important;
}

.btn-danger { border: none; }

/* ---------- Forms ---------- */
.form-label {
    display: block;
    margin-bottom: 0.45rem !important;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-group,
.admin-form-field {
    margin-bottom: 1.15rem;
}

.card-body > form > .mb-3,
.card-body form .mb-3 {
    margin-bottom: 1.15rem !important;
}

.card-body form .row.mb-3,
.card-body form .row.g-3 {
    --bs-gutter-y: 1rem;
}

.form-control,
.form-select,
textarea.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: #ffffff !important;
    border: 1px solid rgba(168, 28, 36, 0.35) !important;
    color: #2B2D42 !important;
    border-radius: 6px;
    min-height: 42px;
}

#seo-fields-card .card-body {
    padding-top: 1.15rem;
}
#seo-fields-card .row.g-3 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.1rem;
}
.admin-spaced-form .admin-form-field {
    margin-bottom: 1.25rem;
}

.form-control::placeholder { color: rgba(109, 100, 86, 0.7) !important; }

.form-control:focus,
.form-select:focus {
    border-color: var(--ebs-gold) !important;
    box-shadow: 0 0 0 0.2rem rgba(168, 28, 36, 0.18) !important;
    background: #ffffff !important;
    color: #2B2D42 !important;
}

.form-select option { background: #ffffff; color: #2B2D42; }

.input-group-text {
    background: #FFFFFF !important;
    border: 1px solid rgba(168, 28, 36, 0.35) !important;
    color: var(--ebs-gold) !important;
}

.form-check-input { background-color: #0f0d0a; border-color: var(--ebs-line); }
.form-check-input:checked { background-color: var(--ebs-gold); border-color: var(--ebs-gold); }

/* ---------- Tables / DataTables ---------- */
.table,
table.dataTable {
    color: #2B2D42 !important;
    border-color: rgba(168, 28, 36, 0.18) !important;
    background: transparent !important;
}

.table > :not(caption) > * > * {
    background: transparent !important;
    color: #2B2D42 !important;
    border-bottom-color: rgba(168, 28, 36, 0.15) !important;
}

.table thead th,
table.dataTable thead th {
    color: #8B1E24 !important;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(168, 28, 36, 0.28) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: rgba(168, 28, 36, 0.04) !important;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(168, 28, 36, 0.1) !important;
    color: #2B2D42 !important;
}

.table-hover > tbody > tr:hover a:not(.btn) {
    color: #7A1419 !important;
}

.portal-with-public-header .table-hover > tbody > tr:hover > * {
    color: #2B2D42 !important;
}

.portal-with-public-header .table-hover > tbody > tr:hover .fw-semibold,
.portal-with-public-header .table-hover > tbody > tr:hover td {
    color: #2B2D42 !important;
}

table.dataTable tbody tr { background: transparent !important; }

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
div.dt-container .dt-info,
div.dt-container .dt-length,
div.dt-container .dt-search,
div.dt-container .dt-paging {
    color: var(--ebs-ivory-dim) !important;
}

div.dt-container .dt-paging .dt-paging-button {
    color: var(--ebs-ivory-dim) !important;
}
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button:hover {
    background: var(--ebs-gold) !important;
    border-color: var(--ebs-gold) !important;
    color: #2B2D42 !important;
}

/* ---------- Pagination (Bootstrap) ---------- */
.pagination .page-link {
    background: var(--ebs-panel) !important;
    border-color: var(--ebs-line) !important;
    color: var(--ebs-ivory-dim) !important;
}
.pagination .page-item.active .page-link {
    background: var(--ebs-gold) !important;
    border-color: var(--ebs-gold) !important;
    color: #2B2D42 !important;
}

/* ---------- Modals / dropdowns ---------- */
.modal-content {
    background: var(--ebs-panel) !important;
    border: 1px solid var(--ebs-line) !important;
    color: var(--ebs-ivory);
    border-radius: 12px;
}
.modal-header {
    border-color: var(--ebs-line) !important;
    padding: 1.1rem 1.35rem;
}
.modal-body {
    padding: 1.35rem 1.35rem 0.5rem;
}
.modal-footer {
    border-color: var(--ebs-line) !important;
    padding: 1rem 1.35rem 1.25rem;
}
.modal-title { color: var(--ebs-gold-bright) !important; font-family: var(--ebs-serif); }
.modal-content .form-label,
.modal-content label,
.modal-content .modal-body,
.modal-content p,
.modal-content .form-text {
    color: #F8F9FA !important;
}
.modal-content .form-label {
    margin-bottom: 0.5rem !important;
}
.modal-content .admin-form-field,
.modal-content .form-group,
.modal-content form > .row {
    margin-bottom: 1.05rem;
}
.modal-content form > .row:last-of-type {
    margin-bottom: 0.35rem;
}
.modal-content .form-actions {
    margin-top: 1.35rem;
    margin-bottom: 0.85rem;
}
.modal-content .text-muted,
.modal-content small {
    color: #b7ad99 !important;
}
.btn-close { filter: invert(0.8) sepia(1) saturate(3) hue-rotate(5deg); }

/* intl-tel-input inside admin modals */
.modal-content .iti {
    width: 100%;
    display: block;
}
.modal-content .iti__flag-container {
    z-index: 5;
}
.modal-content .iti input.form-control {
    width: 100%;
    padding-left: 92px !important;
    min-height: 44px;
}
.modal-content .iti__selected-flag {
    padding: 0 10px 0 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px 0 0 6px;
}
.modal-content .input-group:has(.iti) {
    display: block;
}
.modal-content .input-group:has(.iti) .iti {
    width: 100%;
}

.dropdown-menu {
    background: var(--ebs-panel-2) !important;
    border: 1px solid var(--ebs-line) !important;
}

/* Dark menus: white text/icons, black on hover */
.dropdown-menu .dropdown-item {
    color: #ffffff !important;
}
.dropdown-menu .dropdown-item i,
.dropdown-menu .dropdown-item .bi {
    color: #ffffff !important;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active {
    background: rgba(242, 216, 150, 0.92) !important;
    color: #2B2D42 !important;
}
.dropdown-menu .dropdown-item:hover i,
.dropdown-menu .dropdown-item:focus i,
.dropdown-menu .dropdown-item:active i,
.dropdown-menu .dropdown-item.active i,
.dropdown-menu .dropdown-item:hover .bi,
.dropdown-menu .dropdown-item:focus .bi,
.dropdown-menu .dropdown-item:active .bi,
.dropdown-menu .dropdown-item.active .bi {
    color: #2B2D42 !important;
}
.dropdown-menu .dropdown-item.text-danger {
    color: #f3b4b4 !important;
}
.dropdown-menu .dropdown-item.text-danger i,
.dropdown-menu .dropdown-item.text-danger .bi {
    color: #f3b4b4 !important;
}
.dropdown-menu .dropdown-item.text-danger:hover,
.dropdown-menu .dropdown-item.text-danger:focus {
    background: rgba(255, 235, 235, 0.95) !important;
    color: #8b1e1e !important;
}
.dropdown-menu .dropdown-item.text-danger:hover i,
.dropdown-menu .dropdown-item.text-danger:focus i {
    color: #8b1e1e !important;
}
.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-header h6,
.dropdown-menu .dropdown-header span {
    color: var(--ebs-gold-bright) !important;
}
.dropdown-menu .dropdown-footer a { color: var(--ebs-gold-bright) !important; }
.dropdown-menu .dropdown-footer a:hover { color: #ffffff !important; }
.dropdown-divider { border-color: var(--ebs-line-soft); }

.notifications .notification-item:hover,
.messages .message-item:hover { background: rgba(242, 216, 150, 0.92) !important; }
.notifications .notification-item h4,
.notifications .notification-item p {
    color: #ffffff !important;
}
.notifications .notification-item:hover h4,
.notifications .notification-item:hover p {
    color: #2B2D42 !important;
}

/* ---------- Alerts / badges ---------- */
.alert-success {
    background: rgba(168, 28, 36, 0.12) !important;
    border-color: var(--ebs-gold) !important;
    color: var(--ebs-gold-bright) !important;
}
.alert-danger {
    background: rgba(180, 60, 60, 0.15) !important;
    border-color: rgba(220, 90, 90, 0.5) !important;
    color: #e8a3a3 !important;
}
.badge.bg-primary { background: var(--ebs-gold) !important; color: #ffffff !important; }

/* ---------- Nav tabs ---------- */
.nav-tabs { border-bottom: 1px solid var(--ebs-line); }
.nav-tabs .nav-link {
    color: var(--ebs-ivory-dim);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    color: var(--ebs-gold-bright) !important;
    background: transparent !important;
    border: none;
    border-bottom: 2px solid var(--ebs-gold);
}

/* ---------- Footer / misc ---------- */
.footer {
    background: var(--ebs-black) !important;
    border-top: 1px solid var(--ebs-line-soft) !important;
    color: var(--ebs-ivory-dim) !important;
}
.footer .copyright, .footer .credits { color: var(--ebs-ivory-dim) !important; }

.back-to-top {
    background: var(--ebs-gold) !important;
}
.back-to-top i { color: #ffffff !important; }

/* ============================================================
   AUTH PAGES (login / signup / OTP / reset)
   ============================================================ */
.auth-wrapper {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(168, 28, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(168, 28, 36, 0.06) 0%, transparent 50%),
        var(--ebs-black) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

.auth-card {
    background: var(--ebs-panel) !important;
    border: 1px solid var(--ebs-line) !important;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
}

.auth-left {
    position: relative;
    background:
        linear-gradient(180deg, rgba(10, 9, 8, 0.08) 20%, rgba(10, 9, 8, 0.88) 100%),
        url('../web/img/auth-event.jpg') center / cover no-repeat !important;
    border-right: 1px solid var(--ebs-line-soft);
    min-height: 260px;
}

.auth-left .overlay-text {
    background: rgba(10, 9, 8, 0.68) !important;
    width: 100%;
    left: 0 !important;
    text-align: center;
    color: var(--ebs-gold-bright) !important;
    font-family: var(--ebs-serif);
    font-size: 24px;
    line-height: 1.45;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.auth-right { background: var(--ebs-panel) !important; }

.auth-right .logo img,
.authencation-screens-logo img {
    width: auto !important;
    height: auto !important;
    max-height: 90px !important;
    max-width: 70% !important;
}

.auth-tabs .nav-link {
    color: var(--ebs-ivory-dim) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
}

.auth-tabs .nav-link.active {
    color: var(--ebs-gold-bright) !important;
    border-bottom: 2px solid var(--ebs-gold) !important;
}

.auth-right .forgot a { color: var(--ebs-gold); font-size: 13px; }

/* OTP boxes */
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-box {
    width: 48px; height: 54px;
    text-align: center;
    font-size: 22px;
    color: var(--ebs-gold-bright) !important;
    background: #0f0d0a !important;
    border: 1px solid var(--ebs-line) !important;
}
.otp-box:focus { border-color: var(--ebs-gold) !important; }

.resend-code-link { color: var(--ebs-gold) !important; }
.title-text { color: var(--ebs-gold-bright) !important; font-family: var(--ebs-serif); }

/* ---------- Select2 dark ---------- */
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ebs-ivory) !important; }
.select2-dropdown { background: var(--ebs-panel-2) !important; border-color: var(--ebs-line) !important; color: #ffffff; }
.select2-container--default .select2-results__option--selectable {
    color: #ffffff !important;
}
.select2-container--default .select2-results__option--selectable:hover,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(242, 216, 150, 0.92) !important;
    color: #2B2D42 !important;
}
.select2-search--dropdown .select2-search__field {
    background: #0f0d0a !important;
    border-color: var(--ebs-line) !important;
    color: #ffffff !important;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #09142C; }
::-webkit-scrollbar-thumb { background: rgba(168, 28, 36, 0.35); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168, 28, 36, 0.6); }

/* ============================================================
   DASHBOARD 2.0 — PROFESSIONAL PANEL POLISH
   ============================================================ */

/* ---------- Sidebar refinements ---------- */
.sidebar {
    padding: 18px 14px;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.sidebar-nav .nav-heading {
    color: rgba(168, 28, 36, 0.75) !important;
    font-size: 10px;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    font-weight: 600;
    margin: 18px 8px 6px;
}

.sidebar-nav .nav-link {
    font-size: 13.5px;
    padding: 10px 12px;
    border-left: 2px solid transparent;
    border-radius: 8px;
}

.sidebar-nav .nav-link i {
    font-size: 15px;
    margin-right: 10px;
}

.sidebar-nav .nav-link:not(.collapsed) {
    background: linear-gradient(90deg, rgba(168, 28, 36, 0.18) 0%, rgba(168, 28, 36, 0.05) 100%) !important;
    border-left-color: var(--ebs-gold);
    color: var(--ebs-gold-bright) !important;
    font-weight: 500;
}

.sidebar-nav .nav-link.collapsed { color: var(--ebs-ivory-dim) !important; }

.sidebar-nav .nav-link:hover {
    background: rgba(168, 28, 36, 0.10) !important;
    color: var(--ebs-gold-bright) !important;
    transform: translateX(2px);
}

.sidebar-nav .nav-link .bi-chevron-down {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-link:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-nav .nav-content {
    padding: 4px 0 8px 12px;
}

.sidebar-nav .nav-content a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    margin-bottom: 2px;
}

.sidebar-nav .nav-content a i {
    font-size: 7px;
    margin-right: 10px;
}

.sidebar-nav .nav-content a.active {
    background: rgba(168, 28, 36, 0.12);
    color: var(--ebs-gold-bright) !important;
    font-weight: 500;
}

/* Profile initials + gold dropdown icons */
.profile-avatar-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.profile-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A81C24 0%, #8B1E24 100%);
    color: #2B2D42 !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(242, 216, 150, 0.45);
    flex-shrink: 0;
}

.header-nav .profile.dropdown-menu .dropdown-item i,
.header-nav .dropdown-menu.profile .dropdown-item i {
    color: #ffffff !important;
    font-size: 16px;
}

.header-nav .profile.dropdown-menu .dropdown-item:hover i,
.header-nav .profile.dropdown-menu .dropdown-item:focus i,
.header-nav .dropdown-menu.profile .dropdown-item:hover i,
.header-nav .dropdown-menu.profile .dropdown-item:focus i {
    color: #2B2D42 !important;
}

/* ---------- Page title / subtitle / quick actions ---------- */
.dash-subtitle {
    color: #8a8070 !important;
    font-size: 13.5px;
    margin: 2px 0 0;
}

.dash-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-quick-actions .btn { border-radius: 8px; padding: 7px 14px; }

/* ---------- KPI stat cards ---------- */
.stat-card { overflow: hidden; position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; }

.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, #A81C24 0%, #D45A60 60%, transparent 100%);
    opacity: 0.85;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(20, 16, 10, 0.12) !important;
}

.stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 18px;
}

.stat-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(168, 28, 36, 0.16) 0%, rgba(168, 28, 36, 0.06) 100%);
    border: 1px solid rgba(168, 28, 36, 0.30);
    color: var(--ebs-gold);
    font-size: 22px;
}

.stat-label {
    color: #8a8070 !important;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.stat-value {
    color: #2B2D42;
    font-family: var(--ebs-serif);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.stat-hint { color: #a29a8a !important; font-size: 12px; }

.stat-card-mini .stat-value { font-size: 24px; }
.stat-card-mini .stat-icon { width: 44px; height: 44px; font-size: 18px; }

.stat-card-alert::after { background: linear-gradient(90deg, #b8863b 0%, #e0a94e 60%, transparent 100%); }
.stat-card-alert .stat-icon {
    background: rgba(224, 169, 78, 0.14);
    border-color: rgba(224, 169, 78, 0.45);
    color: #b8863b;
}

/* ---------- Chart cards ---------- */
.dash-chart-card .card-title span {
    color: #a29a8a !important;
    font-family: var(--ebs-sans);
    font-size: 13px;
    font-weight: 400;
}

.dash-chart-card .apexcharts-canvas { margin: 0 auto; }

/* ---------- Dashboard tables ---------- */
.dash-table { margin-bottom: 0; }

.dash-table thead th {
    font-size: 11px !important;
    letter-spacing: 1.4px;
    white-space: nowrap;
    padding: 10px 12px;
}

.dash-table tbody td {
    padding: 12px;
    font-size: 13.5px;
    white-space: nowrap;
    vertical-align: middle;
}

.dash-table tbody tr { transition: background 0.2s ease; }

.dash-table a { color: #8B1E24; text-decoration: none; }
.dash-table a:hover { color: var(--ebs-gold); }

.dash-link {
    font-family: var(--ebs-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ebs-gold);
    text-decoration: none;
    letter-spacing: 0.4px;
}
.dash-link:hover { color: #8B1E24; }
.dash-link i { font-size: 12px; }

/* ---------- Status pills ---------- */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(168, 28, 36, 0.12);
    border: 1px solid rgba(168, 28, 36, 0.35);
    color: #8B1E24 !important;
    line-height: 1.5;
    white-space: nowrap;
}

.status-pill.status-confirmed,
.status-pill.status-completed,
.status-pill.status-paid,
.status-pill.status-converted {
    background: rgba(74, 148, 90, 0.10);
    border-color: rgba(74, 148, 90, 0.40);
    color: #3d7a4d !important;
}

.status-pill.status-payment_pending,
.status-pill.status-pending,
.status-pill.status-quoted,
.status-pill.status-contacted {
    background: rgba(224, 169, 78, 0.12);
    border-color: rgba(224, 169, 78, 0.45);
    color: #a3722c !important;
}

.status-pill.status-cancelled,
.status-pill.status-failed,
.status-pill.status-rejected,
.status-pill.status-closed {
    background: rgba(190, 74, 74, 0.10);
    border-color: rgba(190, 74, 74, 0.40);
    color: #a34a4a !important;
}

/* ---------- Activity feed (vendor enquiries etc.) ---------- */
.dash-activity-item {
    display: flex;
    gap: 14px;
    padding: 13px 4px;
    border-bottom: 1px solid rgba(168, 28, 36, 0.14);
}
.dash-activity-item:last-child { border-bottom: none; }

.dash-activity-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(168, 28, 36, 0.10);
    border: 1px solid rgba(168, 28, 36, 0.28);
    color: var(--ebs-gold);
    font-size: 16px;
}

.dash-activity-item .fw-semibold { color: #2B2D42; font-size: 14px; }
.dash-activity-meta { color: #8a8070 !important; font-size: 12.5px; margin-top: 2px; }
.dash-activity-time { color: #a29a8a !important; font-size: 11.5px; margin-top: 3px; }

/* ---------- Upcoming event rows (customer) ---------- */
.dash-event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(168, 28, 36, 0.14);
}
.dash-event-item:last-child { border-bottom: none; }

.dash-event-item .fw-semibold { color: #2B2D42; text-decoration: none; font-size: 15px; }
.dash-event-item a.fw-semibold:hover { color: #8B1E24; }

.dash-event-date {
    flex: 0 0 auto;
    width: 62px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(168, 28, 36, 0.35);
    background: linear-gradient(180deg, rgba(168, 28, 36, 0.12) 0%, rgba(168, 28, 36, 0.04) 100%);
    padding: 8px 4px;
}

.dash-event-date .day {
    display: block;
    font-family: var(--ebs-serif);
    font-size: 24px;
    font-weight: 700;
    color: #8B1E24;
    line-height: 1;
}

.dash-event-date .month {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8a8070 !important;
    margin-top: 3px;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767px) {
    .stat-value { font-size: 24px; }
    .dash-quick-actions { width: 100%; }
    .pagetitle { flex-direction: column; align-items: flex-start !important; }
}

/* ============================================================
   PHASE 1 — TABLES, ACTIONS, BUSINESS CARDS, 5-COL DASH
   ============================================================ */

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll .table {
    min-width: 720px;
    margin-bottom: 0;
}

.dt-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #2B2D42;
}

.dt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(168, 28, 36, 0.35);
    flex-shrink: 0;
}

.btn-action-menu {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(168, 28, 36, 0.35) !important;
    color: #8B1E24 !important;
    box-shadow: none !important;
}

.btn-action-menu:hover,
.btn-action-menu:focus,
.btn-action-menu.show {
    background: rgba(168, 28, 36, 0.16) !important;
    border-color: var(--ebs-gold) !important;
    color: #2B2D42 !important;
}

.dt-actions .dropdown-menu {
    min-width: 180px;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(20, 16, 10, 0.16) !important;
}

.dt-actions .dropdown-item {
    border-radius: 6px;
    font-size: 13px;
    padding: 8px 12px;
    color: #ffffff !important;
}

.dt-actions .dropdown-item i,
.dt-actions .dropdown-item .bi {
    color: #ffffff !important;
}

.dt-actions .dropdown-item:hover,
.dt-actions .dropdown-item:focus {
    color: #2B2D42 !important;
    background: rgba(242, 216, 150, 0.92) !important;
}

.dt-actions .dropdown-item:hover i,
.dt-actions .dropdown-item:focus i,
.dt-actions .dropdown-item:hover .bi,
.dt-actions .dropdown-item:focus .bi {
    color: #2B2D42 !important;
}

.dt-actions .dropdown-item.text-danger {
    color: #f3b4b4 !important;
}

.dt-actions .dropdown-item.text-danger i {
    color: #f3b4b4 !important;
}

.dt-actions .dropdown-item.text-danger:hover,
.dt-actions .dropdown-item.text-danger:focus {
    color: #8b1e1e !important;
    background: rgba(255, 235, 235, 0.95) !important;
}

.dt-actions .dropdown-item.text-danger:hover i,
.dt-actions .dropdown-item.text-danger:focus i {
    color: #8b1e1e !important;
}

.status-select {
    min-width: 110px;
    max-width: 140px;
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    background: #FFFFFF !important;
}

/* Business cards — 5 per row on wide screens */
.business-card-grid {
    display: flex;
    flex-wrap: wrap;
}

.business-card-col {
    flex: 0 0 20%;
    max-width: 20%;
}

@media (max-width: 1399.98px) {
    .business-card-col { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (max-width: 991.98px) {
    .business-card-col { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 575.98px) {
    .business-card-col { flex: 0 0 100%; max-width: 100%; }
}

.biz-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.biz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(20, 16, 10, 0.12) !important;
}

.biz-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1a1612;
}

.biz-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.biz-card:hover .biz-card-media img { transform: scale(1.04); }

.biz-card-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: rgba(10, 9, 8, 0.78);
    color: var(--ebs-gold-bright) !important;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(168, 28, 36, 0.35);
}

.biz-card-body { padding: 14px 14px 16px; }

.biz-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.biz-card-title {
    font-family: var(--ebs-serif);
    font-size: 17px;
    font-weight: 600;
    color: #2B2D42 !important;
    margin: 0;
    line-height: 1.25;
}

.biz-card-meta {
    margin: 8px 0 12px;
    font-size: 12.5px;
    color: #8a8070 !important;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.biz-card-meta i { color: var(--ebs-gold); margin-top: 2px; }

.biz-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.biz-card-price {
    font-size: 12px;
    font-weight: 600;
    color: #8B1E24 !important;
}

/* 5-up KPI rows */
.kpi-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}

.kpi-row > [class*="col"] {
    padding-left: 8px;
    padding-right: 8px;
}

.row-cols-kpi > * {
    flex: 0 0 25%;
    max-width: 25%;
    width: 25%;
}

@media (max-width: 1199.98px) {
    .row-cols-kpi > * { flex: 0 0 50%; max-width: 50%; width: 50%; }
}
@media (max-width: 767.98px) {
    .row-cols-kpi > * { flex: 0 0 50%; max-width: 50%; width: 50%; }
}
@media (max-width: 420px) {
    .row-cols-kpi > * { flex: 0 0 100%; max-width: 100%; width: 100%; }
}

.stat-card .card-body { padding: 16px 14px; }
.stat-value { font-size: 24px; }
.stat-icon { width: 44px; height: 44px; font-size: 18px; }

.settings-tabs .nav-link {
    color: #64748B !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
}

.settings-tabs .nav-link.active {
    color: #8B1E24 !important;
    border-bottom-color: var(--ebs-gold) !important;
    background: transparent !important;
}

.branding-preview {
    width: 120px;
    height: 64px;
    object-fit: contain;
    border: 1px solid rgba(168, 28, 36, 0.28);
    border-radius: 8px;
    background: #FFFFFF;
    padding: 6px;
}

/* Customer portal shell */
.customer-portal-shell {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 40%, #ffffff 100%);
    min-height: 100vh;
}

.customer-topnav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 28, 36, 0.22);
}

.customer-topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.customer-brand img { height: 42px; width: auto; }

.customer-nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 12px;
}

.customer-nav-links a {
    color: #4c4336;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.customer-nav-links a.active,
.customer-nav-links a:hover { color: #8B1E24; }

.customer-nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(168, 28, 36, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4c4336;
    text-decoration: none;
}

.customer-icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
}

.customer-profile-btn {
    text-decoration: none;
}

.customer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.message-thread {
    max-height: 480px;
    overflow-y: auto;
}

/* Toasts — bottom-right, above footer */
#toast-container,
.flasher-container,
.toast-bottom-right {
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 99999 !important;
}

#toast-container > div,
#toast-container .toast {
    opacity: 1 !important;
    box-shadow: 0 12px 32px rgba(20, 16, 10, 0.18) !important;
}

/* Booking detail UI */
.booking-detail-shell .booking-hero {
    background: linear-gradient(135deg, #2B2D42 0%, #2a2218 55%, #3d3120 100%);
    color: #F8F9FA;
    border: 1px solid rgba(168, 28, 36, 0.28);
}

.booking-eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #A81C24 !important;
}

.booking-number {
    font-family: var(--ebs-serif);
    color: #fff !important;
    font-size: 1.75rem;
    margin: 0;
}

.booking-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(168, 28, 36, 0.25);
    color: #F8F9FA !important;
    font-size: 12px;
}

.booking-total-box .booking-total-value {
    font-family: var(--ebs-serif);
    font-size: 1.6rem;
    color: #D45A60 !important;
    line-height: 1.1;
}

.booking-panel {
    border: 1px solid rgba(168, 28, 36, 0.18);
    box-shadow: 0 8px 28px rgba(20, 16, 10, 0.06);
}

.booking-section-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8B1E24 !important;
    margin-bottom: 14px;
}

.booking-fact {
    margin-bottom: 12px;
}

.booking-fact .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a8070 !important;
    margin-bottom: 2px;
}

.booking-fact .value {
    display: block;
    color: #2B2D42 !important;
    font-weight: 500;
}

.booking-price-lines {
    display: grid;
    gap: 10px;
}

.booking-price-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #4c4336 !important;
}

.booking-price-line strong {
    color: #2B2D42 !important;
}

.booking-price-line.total {
    padding-top: 8px;
    border-top: 1px dashed rgba(168, 28, 36, 0.35);
    font-size: 15px;
}

.booking-price-line.highlight {
    background: rgba(168, 28, 36, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
}

.booking-pay-box {
    border: 1px solid rgba(168, 28, 36, 0.28);
    border-radius: 10px;
    padding: 14px;
    background: #FFFFFF;
}

.booking-timeline {
    display: grid;
    gap: 12px;
}

.booking-timeline-item {
    padding-left: 12px;
    border-left: 2px solid rgba(168, 28, 36, 0.45);
}

.status-pill.status-pending {
    background: rgba(168, 28, 36, 0.14);
    color: #6d4f12 !important;
    border: 1px solid rgba(168, 28, 36, 0.45);
}

/* Toggle switches (staff roles, permissions) */
.ebs-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ebs-toggle-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.ebs-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    border: 1px solid rgba(168, 28, 36, 0.22);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.ebs-toggle:has(input:checked) {
    border-color: rgba(168, 28, 36, 0.55);
    background: rgba(168, 28, 36, 0.08);
}

.ebs-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ebs-toggle-track {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d8d0c4;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.ebs-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.ebs-toggle input:checked + .ebs-toggle-track {
    background: var(--ebs-gold);
}

.ebs-toggle input:checked + .ebs-toggle-track .ebs-toggle-thumb {
    transform: translateX(20px);
}

.ebs-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ebs-toggle-label {
    font-weight: 600;
    color: #2B2D42 !important;
    font-size: 14px;
}

.ebs-toggle-hint {
    font-size: 12px;
    color: #8a8070 !important;
}

.ebs-toggle-grid-compact .ebs-toggle {
    padding: 10px 12px;
}

.ebs-toggle-grid-compact .ebs-toggle-label {
    font-size: 13px;
}

/* Messages inbox + chat */
.messages-inbox-card,
.messages-chat-card {
    border: 1px solid rgba(168, 28, 36, 0.18) !important;
    box-shadow: 0 8px 28px rgba(20, 16, 10, 0.06);
    overflow: hidden;
}

.messages-inbox-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(168, 28, 36, 0.12);
    transition: background 0.15s ease;
}

.messages-inbox-item:last-child {
    border-bottom: 0;
}

.messages-inbox-item:hover {
    background: rgba(168, 28, 36, 0.08);
}

.messages-inbox-item.is-unread {
    background: rgba(168, 28, 36, 0.05);
}

.messages-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #A81C24 0%, #8B1E24 100%);
    color: #2B2D42 !important;
    font-weight: 700;
    font-size: 14px;
}

.messages-inbox-body {
    flex: 1;
    min-width: 0;
}

.messages-inbox-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.messages-inbox-name {
    color: #2B2D42 !important;
    font-size: 15px;
}

.messages-inbox-time {
    color: #8a8070 !important;
    font-size: 12px;
    white-space: nowrap;
}

.messages-inbox-preview {
    display: block;
    color: #6b6358 !important;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.messages-inbox-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.messages-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ebs-gold);
}

.messages-inbox-chevron {
    color: #A81C24 !important;
    font-size: 14px;
}

.messages-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.messages-empty-state i {
    font-size: 2.2rem;
    color: #A81C24;
    margin-bottom: 12px;
}

.messages-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 28, 36, 0.15);
    background: #FFFFFF;
}

.messages-thread {
    min-height: 360px;
    max-height: 520px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f5ef;
}

.message-row {
    display: flex;
    margin-bottom: 12px;
}

.message-row.is-mine {
    justify-content: flex-end;
}

.message-row.is-theirs {
    justify-content: flex-start;
}

.message-bubble {
    max-width: min(78%, 560px);
    padding: 10px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(168, 28, 36, 0.18);
    box-shadow: 0 2px 8px rgba(20, 16, 10, 0.04);
}

.message-row.is-mine .message-bubble {
    background: linear-gradient(135deg, #2a2218 0%, #2B2D42 100%);
    border-color: rgba(168, 28, 36, 0.35);
}

.message-row.is-mine .message-bubble-meta,
.message-row.is-mine .message-body {
    color: #F8F9FA !important;
}

.message-bubble-meta {
    font-size: 11px;
    color: #8a8070 !important;
    margin-bottom: 4px;
}

.message-body {
    color: #2B2D42 !important;
    white-space: pre-wrap;
    word-break: break-word;
}

.messages-composer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 16px 20px;
    border-top: 1px solid rgba(168, 28, 36, 0.15);
    background: #ffffff;
}

.messages-composer textarea {
    flex: 1;
    resize: none;
}

/* Customer portal — always white header */
.customer-topnav {
    background: #ffffff !important;
    backdrop-filter: none !important;
    box-shadow: 0 1px 0 rgba(168, 28, 36, 0.18);
}

.customer-portal-shell .customer-topnav .dropdown-menu {
    background: #ffffff !important;
    border-color: rgba(168, 28, 36, 0.25);
}

.customer-profile-btn .profile-initials {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.customer-main .pagetitle {
    margin-bottom: 1rem;
}

.customer-main .booking-detail-shell {
    margin-top: 0;
}

.customer-main .booking-detail-shell .booking-hero .card-body {
    padding: 1.1rem 1.25rem;
}

.customer-main .booking-panel .card-body {
    padding: 1.1rem 1.25rem;
}

.customer-main .booking-fact {
    margin-bottom: 10px;
}

.customer-main .booking-detail-shell .row {
    --bs-gutter-y: 0.75rem;
}

/* WhatsApp-style chat app */
.customer-main.customer-main--chat,
.portal-main.customer-main--chat {
    max-width: none;
    padding: 0 !important;
    margin: 0 !important;
    background: #f3efe6;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.portal-main.customer-main--chat .portal-container {
    max-width: none;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

body.is-chat-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

body.is-chat-page .portal-main.customer-main--chat {
    flex: 1 1 auto;
    min-height: 0;
}

.chat-app {
    display: grid;
    grid-template-columns: 340px 1fr;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    max-height: none;
    background: #f8f5ef;
    border-top: 1px solid rgba(168, 28, 36, 0.18);
    overflow: hidden;
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid rgba(168, 28, 36, 0.18);
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #1a1612 0%, #12100d 100%);
    border-bottom: 1px solid rgba(168, 28, 36, 0.28);
    flex-shrink: 0;
}

.chat-sidebar-title {
    font-size: 1.15rem;
    margin: 0;
    color: #f5e6c8 !important;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
}

.chat-sidebar-sub {
    margin: 0;
    font-size: 12px;
    color: rgba(245, 230, 200, 0.72) !important;
}

.chat-new-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-sidebar-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.chat-thread-item:hover {
    background: rgba(168, 28, 36, 0.08);
}

.chat-thread-item.is-active {
    background: rgba(168, 28, 36, 0.14);
    border-left: 3px solid #A81C24;
    padding-left: 13px;
}

.chat-thread-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(168, 28, 36, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-thread-item.is-unread .chat-thread-preview {
    font-weight: 600;
    color: #2B2D42 !important;
}

.chat-thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #A81C24 0%, #8B1E24 100%);
    color: #2B2D42 !important;
    font-weight: 700;
}

.chat-thread-body {
    flex: 1;
    min-width: 0;
}

.chat-thread-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.chat-thread-top strong {
    color: #2B2D42 !important;
    font-size: 14px;
}

.chat-thread-top time {
    font-size: 11px;
    color: #8a8070 !important;
    white-space: nowrap;
}

.chat-thread-preview {
    display: block;
    font-size: 13px;
    color: #6b6358 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-thread-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-sidebar-empty,
.chat-main-empty {
    text-align: center;
    padding: 48px 24px;
    color: #8a8070 !important;
}

.chat-sidebar-empty i,
.chat-main-empty-icon {
    font-size: 2.5rem;
    color: #A81C24;
    margin-bottom: 12px;
}

.chat-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(248, 245, 239, 0.92) 0%, rgba(248, 245, 239, 0.88) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a24a' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-main-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #1a1612 0%, #12100d 100%);
    border-bottom: 1px solid rgba(168, 28, 36, 0.28);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.chat-main-header .chat-thread-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
    border: 2px solid rgba(168, 28, 36, 0.45);
}

.chat-main-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-main-header-info strong {
    color: #f5e6c8 !important;
    font-size: 15px;
}

.chat-main-header-info span {
    font-size: 12px;
    color: rgba(245, 230, 200, 0.7) !important;
}

.chat-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f5e6c8 !important;
    text-decoration: none;
    border: 1px solid rgba(168, 28, 36, 0.35);
    background: rgba(168, 28, 36, 0.08);
}

.chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px 12px;
    min-height: 0;
    scroll-behavior: smooth;
}

.chat-message-row {
    display: flex;
    margin-bottom: 8px;
}

.chat-message-row.is-outgoing {
    justify-content: flex-end;
}

.chat-message-row.is-incoming {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: min(72%, 520px);
    padding: 10px 14px 8px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(26, 22, 18, 0.08);
}

.chat-message-row.is-incoming .chat-bubble {
    background: #ffffff;
    border-top-left-radius: 4px;
    border: 1px solid rgba(168, 28, 36, 0.16);
}

.chat-message-row.is-outgoing .chat-bubble {
    background: linear-gradient(135deg, #f0ddb0 0%, #e8cf96 100%);
    border-top-right-radius: 4px;
    border: 1px solid rgba(138, 111, 52, 0.22);
}

.chat-bubble-text {
    margin: 0 0 4px;
    color: #1a1612 !important;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.5;
}

.chat-bubble-time {
    display: block;
    text-align: right;
    font-size: 10px;
    color: #6b6358 !important;
}

.chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 18px;
    background: #ffffff;
    border-top: 1px solid rgba(168, 28, 36, 0.2);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -4px 16px rgba(26, 22, 18, 0.06);
}

.chat-composer textarea {
    flex: 1;
    resize: none;
    border-radius: 24px;
    border: 1px solid rgba(168, 28, 36, 0.28);
    padding: 11px 18px;
    min-height: 46px;
    max-height: 120px;
    background: #FFFFFF;
    color: #1a1612;
    font-size: 14px;
    line-height: 1.4;
}

.chat-composer textarea:focus {
    outline: none;
    border-color: #A81C24;
    box-shadow: 0 0 0 3px rgba(168, 28, 36, 0.15);
    background: #fff;
}

.chat-send-btn {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4b05c 0%, #a88432 100%);
    color: #1a1208 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(168, 132, 50, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, #e0bc68 0%, #b8923f 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(168, 132, 50, 0.4);
}

.chat-sidebar-footer {
    padding: 8px 12px;
    border-top: 1px solid rgba(168, 28, 36, 0.1);
}

/* Admin shell chat height */
body.admin-chat-page #main.customer-main--chat,
#main.customer-main--chat {
    padding-top: 12px;
    padding-bottom: 12px;
}

#main .chat-app {
    height: calc(100vh - 90px);
    min-height: 480px;
    max-height: calc(100vh - 90px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(168, 28, 36, 0.18);
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .chat-app {
        grid-template-columns: 1fr;
    }

    .chat-app.has-active-chat .chat-sidebar {
        display: none;
    }

    .chat-app:not(.has-active-chat) .chat-main {
        display: none;
    }
}

/* Star rating widget */
.star-rating-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.star-rating-stars {
    display: inline-flex;
    gap: 6px;
}

.star-rating-star {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 1.75rem;
    color: #d8d0c4;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease, color 0.12s ease;
}

.star-rating-star.is-active,
.star-rating-star:hover {
    color: #A81C24;
    transform: scale(1.05);
}

.star-rating-label {
    font-weight: 600;
    color: #6d4f12 !important;
}

.review-card {
    border: 1px solid rgba(168, 28, 36, 0.25);
}

.customer-bookings-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8B1E24 !important;
}

/* Customer portal + public header hybrid */
.portal-with-public-header {
    background: #f8f5ef;
}

.portal-with-public-header #siteHeader {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(10, 9, 8, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(168, 28, 36, 0.22);
    padding: 14px 0;
}

.portal-with-public-header .portal-dash-nav {
    position: sticky;
    top: 72px;
    z-index: 1035;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(200, 161, 90, 0.18);
    box-shadow: 0 4px 16px rgba(20, 16, 10, 0.04);
    margin-bottom: 0;
}

body.is-chat-page .portal-with-public-header .portal-dash-nav,
body.is-chat-page .portal-dash-nav {
    position: relative;
    top: auto;
}

.portal-with-public-header .portal-dash-nav .customer-topnav-inner,
.portal-container,
.portal-container-inner {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.portal-with-public-header .portal-dash-nav .customer-topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.portal-with-public-header .portal-dash-nav .customer-nav-links {
    margin-left: 0;
}

.portal-with-public-header .portal-dash-nav .customer-nav-actions {
    margin-left: auto;
}

.portal-main {
    padding: 28px 0 64px;
    background: #f8f5ef;
}

.portal-with-public-header .portal-dash-nav .customer-brand {
    display: none;
}

.explore-vendors-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(200, 161, 90, 0.2);
}

.explore-vendors-intro {
    text-align: center;
    margin-bottom: 28px;
}

.explore-vendors-intro h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.4rem;
    color: #111111;
    margin: 8px 0 12px;
}

.explore-vendors-intro .sub {
    max-width: 720px;
    margin: 0 auto;
    color: #64748B;
}

.portal-with-public-header .portal-dash-nav .customer-nav-links a {
    color: #2a241c;
    font-weight: 600;
}

.portal-with-public-header .portal-dash-nav .customer-nav-links a:hover,
.portal-with-public-header .portal-dash-nav .customer-nav-links a.active {
    color: #7A1419;
}

.portal-with-public-header .site-footer,
.portal-with-public-header footer {
    margin-top: 0;
}

.portal-with-public-header .portal-main:not(.customer-main--chat) {
    min-height: 40vh;
}

.portal-with-public-header .stat-card,
.portal-with-public-header .card {
    border-radius: 16px;
    border: 1px solid rgba(200, 161, 90, 0.15);
    box-shadow: 0 8px 24px rgba(20, 16, 10, 0.04);
    background: #ffffff;
}

/* Customer dropdowns: white menu → black text, dark gold hover */
.customer-portal-shell .dropdown-menu,
.portal-with-public-header .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(200, 161, 90, 0.28) !important;
    box-shadow: 0 12px 32px rgba(20, 16, 10, 0.12) !important;
}

.customer-portal-shell .dropdown-menu .dropdown-item,
.portal-with-public-header .dropdown-menu .dropdown-item {
    color: #111111 !important;
}

.customer-portal-shell .dropdown-menu .dropdown-item i,
.customer-portal-shell .dropdown-menu .dropdown-item .bi,
.portal-with-public-header .dropdown-menu .dropdown-item i,
.portal-with-public-header .dropdown-menu .dropdown-item .bi {
    color: #8B1E24 !important;
}

.customer-portal-shell .dropdown-menu .dropdown-item:hover,
.customer-portal-shell .dropdown-menu .dropdown-item:focus,
.customer-portal-shell .dropdown-menu .dropdown-item:active,
.customer-portal-shell .dropdown-menu .dropdown-item.active,
.portal-with-public-header .dropdown-menu .dropdown-item:hover,
.portal-with-public-header .dropdown-menu .dropdown-item:focus,
.portal-with-public-header .dropdown-menu .dropdown-item:active,
.portal-with-public-header .dropdown-menu .dropdown-item.active {
    background: rgba(200, 161, 90, 0.14) !important;
    color: #8B1E24 !important;
}

.customer-portal-shell .dropdown-menu .dropdown-item:hover i,
.customer-portal-shell .dropdown-menu .dropdown-item:hover .bi,
.portal-with-public-header .dropdown-menu .dropdown-item:hover i,
.portal-with-public-header .dropdown-menu .dropdown-item:hover .bi {
    color: #8B1E24 !important;
}

.customer-portal-shell .dropdown-menu .dropdown-header,
.portal-with-public-header .dropdown-menu .dropdown-header {
    color: #8B1E24 !important;
}

.customer-portal-shell .dropdown-menu .dropdown-divider,
.portal-with-public-header .dropdown-menu .dropdown-divider {
    border-color: rgba(200, 161, 90, 0.2) !important;
}

.customer-portal-shell .dropdown-menu .text-muted,
.portal-with-public-header .dropdown-menu .text-muted {
    color: #64748B !important;
}

@media (max-width: 991.98px) {
    .portal-with-public-header .portal-dash-nav {
        top: 64px;
    }

    .portal-with-public-header .portal-dash-nav .customer-brand {
        display: inline-flex;
    }

    .explore-vendors-intro h2 {
        font-size: 1.85rem;
    }
}

@media (max-width: 767.98px) {
    .portal-with-public-header .vendor-grid {
        grid-template-columns: 1fr;
    }
}
