/**
 * Admin Dashboard Styles — Brand Theme (black bg, white logo, gold accents)
 */

:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --sidebar-collapsed-width: 70px;
    /* Brand colors */
    --brand-black: #222222;
    --brand-black-light: #2d2d2d;
    --brand-black-dark: #1a1a1a;
    --brand-gold: #d0a747;
    --brand-gold-hover: #e0b857;
    --brand-white: #fffef9;
    --brand-gray: #d9d6d3;
    --text-primary: #fffef9;
    --text-secondary: rgba(255, 254, 249, 0.8);
    --text-muted: rgba(255, 254, 249, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--brand-black);
    color: var(--text-primary);
}

/* Highlight error for publish blockers */
.highlight-error {
    animation: highlightPulse 2s ease-in-out;
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

@keyframes highlightPulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(220, 53, 69, 0.1);
    }
}

/* A3: Upload modal drop zone */
.upload-drop-zone {
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.upload-drop-zone:hover {
    background-color: var(--brand-black-light);
}

/* ============================================================
   Topbar
   ============================================================ */

.topbar {
    height: var(--topbar-height);
    background: var(--brand-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.topbar-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
}
.topbar-hamburger:hover {
    background: var(--brand-black-light);
    color: var(--brand-gold);
}
.topbar-hamburger.d-lg-none {
    display: flex;
}
@media (min-width: 992px) {
    .topbar-hamburger.d-lg-none {
        display: none;
    }
}

.topbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    margin-right: 2rem;
}

/* G4: Logo normalization — dashboard */
.site-logo {
    max-height: 40px;
    width: auto;
    height: auto;
}
.main-content .site-logo,
.topbar .site-logo,
.dashboard .site-logo {
    max-height: 48px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 1rem;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.profile-btn:hover {
    background-color: var(--brand-black-light);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-gold) 0%, #b8923a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-black);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--brand-black-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 999;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--brand-black-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.sidebar-toggle:hover {
    background: var(--brand-gold);
    color: var(--brand-black);
}

.sidebar-nav {
    padding: 0.75rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-section {
    margin-bottom: 0.25rem;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.65rem 1.5rem;
    gap: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.sidebar-section-header:hover {
    color: var(--brand-gold);
    background: var(--brand-black-light);
}

.sidebar-section-header i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-section-header .sidebar-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.sidebar-section-header:not(.collapsed) .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-nav .collapse {
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    margin-left: 1.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link-sub {
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.sidebar-nav .nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.75rem;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--brand-black-light);
    color: var(--brand-gold);
}

.sidebar-nav .nav-link.active {
    background-color: rgba(208, 167, 71, 0.15);
    color: var(--brand-gold);
    border-right: 3px solid var(--brand-gold);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-section-header {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-section-header span,
.sidebar.collapsed .sidebar-section-header .sidebar-chevron {
    display: none;
}

.sidebar.collapsed .sidebar-nav .collapse {
    display: none !important;
}

.sidebar.collapsed .sidebar-nav .nav-link-sub {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    position: relative;
}

.sidebar.collapsed .sidebar-nav .nav-link[title] {
    cursor: help;
}

/* ============================================================
   Main Content
   ============================================================ */

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================================
   Cards
   ============================================================ */

.card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--brand-black-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.card-header {
    background: var(--brand-black-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
    background-color: var(--brand-black-light);
}

/* ============================================================
   Tables
   ============================================================ */

/* Override Bootstrap 5 table variables (--bs-table-bg causes white cells) */
.table {
    margin-bottom: 0;
    color: var(--text-primary);
    --bs-table-bg: var(--brand-black-light);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    --bs-table-hover-color: var(--text-primary);
}

.table thead th {
    background-color: var(--brand-black-dark) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.table td,
.table th {
    border-color: rgba(255, 255, 255, 0.06);
    background-color: var(--brand-black-light) !important;
    color: var(--text-primary);
}

.table tbody tr {
    background-color: var(--brand-black-light) !important;
    color: var(--text-primary);
}

.table tbody tr td {
    background-color: var(--brand-black-light) !important;
}

.table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

.table tbody tr.table-secondary td,
.table tbody tr.table-secondary {
    background-color: var(--brand-black-dark) !important;
}

/* ============================================================
   Forms
   ============================================================ */

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control,
.form-select {
    background-color: var(--brand-black-dark);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--brand-black-dark);
    border-color: var(--brand-gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(208, 167, 71, 0.25);
}

.form-control:disabled {
    background-color: var(--brand-black);
    color: var(--text-muted);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-black);
}

.btn-primary:hover {
    background-color: var(--brand-gold-hover);
    border-color: var(--brand-gold-hover);
    color: var(--brand-black);
}

.btn-outline-primary {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

.btn-outline-primary:hover {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-black);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* ============================================================
   Badges
   ============================================================ */

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge.bg-primary {
    background-color: var(--brand-gold) !important;
    color: var(--brand-black) !important;
}

/* Dealer Lead (Portal Only) — neutral purple, distinct from error state */
.badge-dealer {
    background-color: #6f42c1;
    color: #fff;
}

/* ============================================================
   Login Page
   ============================================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-black);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--brand-black-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 2.5rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.login-logo p {
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
}

/* ============================================================
   Responsive (RHP)
   ============================================================ */

/* Sidebar becomes offcanvas on <992px */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 12px rgba(0,0,0,0.1);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    /* Backdrop overlay (added via JS) */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--topbar-height);
        background: rgba(0,0,0,0.4);
        z-index: 998;
        cursor: pointer;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* Legacy 768px kept for very small screens */
@media (max-width: 767.98px) {
    .main-content {
        padding: 0.75rem;
    }
}

/* Tables: responsive wrapper + clamp for long text (add .clamp-cell to td/th) */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive .table td.clamp-cell,
.table-responsive .table th.clamp-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Gallery manager: 2 cols on mobile */
@media (max-width: 575.98px) {
    .gallery-grid .col-6,
    #galleryImagesList .col-6,
    #projectGalleryGrid .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Dealer form modal: scrollable when height exceeds viewport, footer always visible */
#dealerModal .modal-dialog {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}
#dealerModal .modal-content {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}
#dealerModal .modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
#dealerModal .modal-header {
    flex-shrink: 0;
}
#dealerModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#dealerModal .modal-footer {
    flex-shrink: 0;
}

/* Upload modal: mobile fit */
#uploadImageModal .modal-dialog {
    max-height: 90vh;
    margin: 0.5rem;
}
#uploadImageModal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
#uploadImageModal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#uploadImageModal #uploadPreviewWrap img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
@media (max-width: 575.98px) {
    #uploadImageModal .modal-dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }
    #uploadImageModal .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    #uploadImageModal .modal-footer .btn {
        width: 100%;
    }
    #uploadImageModal .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Crop modal (Cropper.js) */
#cropImageModal .crop-container {
    overflow: hidden;
}
#cropImageModal .crop-container img {
    max-width: 100%;
}

/* ============================================================
   Utilities
   ============================================================ */

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0;
}

.stats-card {
    background: linear-gradient(135deg, var(--brand-gold) 0%, #b8923a 100%);
    color: var(--brand-black);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.stats-card p {
    margin: 0;
    opacity: 0.9;
}

/* ============================================================
   Bootstrap Overrides (dark theme)
   ============================================================ */

/* Fix white/light backgrounds visible in dark admin theme */
.bg-light {
    background-color: var(--brand-black-dark) !important;
    color: var(--text-primary);
}

.dropdown-menu {
    background: var(--brand-black-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--brand-black);
    color: var(--brand-gold);
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-content {
    background: var(--brand-black-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.modal-header .btn-close {
    filter: invert(1);
}

.text-muted {
    color: var(--text-muted) !important;
}

.profile-btn .text-muted {
    color: var(--text-muted) !important;
}

/* Pagination */
.pagination .page-link {
    background: var(--brand-black-light);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.pagination .page-link:hover {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-black);
}

.pagination .page-item.active .page-link {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-black);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* Alerts */
.alert {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-success {
    background: rgba(25, 135, 84, 0.2);
    color: #75b798;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f1aeb5;
}

.alert-warning {
    background: rgba(208, 167, 71, 0.2);
    color: var(--brand-gold);
}

/* Nav tabs */
.nav-tabs .nav-link {
    color: var(--text-muted);
    border-color: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--brand-gold);
}

.nav-tabs .nav-link.active {
    background: var(--brand-black-light);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--brand-gold);
}

/* Links in main content */
.main-content a:not(.btn):not(.dropdown-item),
.card a:not(.btn) {
    color: var(--brand-gold);
}

.main-content a:not(.btn):not(.dropdown-item):hover,
.card a:not(.btn):hover {
    color: var(--brand-gold-hover);
}

/* Form check */
.form-check-input {
    background-color: var(--brand-black-dark);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-check-input:checked {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
}

.form-check-label {
    color: var(--text-primary);
}

/* List group */
.list-group-item {
    background: var(--brand-black-light);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Select2 / custom selects - ensure dark styling */
.select2-container--default .select2-selection--single {
    background-color: var(--brand-black-dark);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* ============================================================
   Project Form: Sticky Sidebar (left panel)
   ============================================================ */

.project-sidebar-sticky {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-gold) var(--brand-black-dark);
}
.project-sidebar-sticky::-webkit-scrollbar {
    width: 5px;
}
.project-sidebar-sticky::-webkit-scrollbar-track {
    background: var(--brand-black-dark);
}
.project-sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--brand-gold);
    border-radius: 4px;
}

@media (max-width: 991.98px) {
    .project-sidebar-sticky {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

/* ============================================================
   Tab Micro-Descriptions
   ============================================================ */

.tab-micro-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--brand-gold);
    background: rgba(208, 167, 71, 0.05);
    border-radius: 0 0.25rem 0.25rem 0;
}

/* ============================================================
   Amenities Grid
   ============================================================ */

.amenity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 576px) {
    .amenity-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    .amenity-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1200px) {
    .amenity-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.amenity-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--brand-black-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    position: relative;
    transition: border-color 0.2s;
}
.amenity-pill:hover {
    border-color: var(--brand-gold);
}
.amenity-pill .amenity-icon {
    color: var(--brand-gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.amenity-pill .amenity-actions {
    position: absolute;
    top: 2px;
    right: 2px;
    display: none;
    gap: 2px;
}
.amenity-pill:hover .amenity-actions {
    display: flex;
}
.amenity-pill .amenity-actions .btn {
    padding: 0 0.25rem;
    font-size: 0.7rem;
    line-height: 1;
}

/* Amenity icon preview in dropdown */
.amenity-icon-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.amenity-icon-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(208, 167, 71, 0.15);
    border-radius: 0.25rem;
    color: var(--brand-gold);
    font-size: 1rem;
}

/* ============================================================
   Gallery Lightbox
   ============================================================ */

.gallery-lightbox-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    direction: rtl;
}
.gallery-lightbox-strip .lightbox-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 70vh;
    direction: ltr;
}
.gallery-lightbox-strip .lightbox-slide img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.25rem;
}
.lightbox-counter {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}
.lightbox-nav-btn:hover {
    background: rgba(208, 167, 71, 0.8);
}
.lightbox-nav-btn.prev { left: 10px; }
.lightbox-nav-btn.next { right: 10px; }

/* ============================================================
   Description Block Builder
   ============================================================ */

.desc-block {
    background: var(--brand-black-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}
.desc-block:hover {
    border-color: rgba(208, 167, 71, 0.3);
}
.desc-block .block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.desc-block .block-header .block-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-gold);
}
.desc-block .block-actions {
    display: flex;
    gap: 0.25rem;
}
.desc-block .bullet-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.desc-block .bullet-item .form-control {
    flex: 1;
}

/* ============================================================
   Location Tab — 6/6 Split Layout
   ============================================================ */

/* Card shadow for location cards */
.loc-card-shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.2s;
}
.loc-card-shadow:hover {
    box-shadow: 0 4px 16px rgba(208, 167, 71, 0.15);
}

/* Image preview container */
.loc-image-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--brand-black-dark);
}
.loc-image-card img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}
.loc-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.25s;
}
.loc-image-card:hover .loc-image-overlay {
    opacity: 1;
}

/* Image placeholder */
.loc-image-placeholder {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    padding: 2.5rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Accessibility point row */
.loc-access-row {
    background: var(--brand-black-light);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.375rem;
    transition: border-color 0.2s, background-color 0.2s;
}
.loc-access-row:hover {
    border-color: var(--brand-gold);
    background: rgba(208, 167, 71, 0.05);
}
.loc-access-row .form-control,
.loc-access-row .form-select {
    background: var(--brand-black-dark);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 0.85rem;
}
.loc-access-row .form-control:focus,
.loc-access-row .form-select:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 0.15rem rgba(208, 167, 71, 0.2);
}
.loc-icon-select {
    padding-left: 0.4rem;
    padding-right: 1.5rem;
}

/* Legacy class compat */
.location-image-preview {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--brand-black-dark);
    max-width: 100%;
}
.location-image-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}
.location-image-preview .preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Gallery grid thumb clickable */
.gallery-thumb-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.gallery-thumb-clickable:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(208, 167, 71, 0.3);
}
.gallery-thumb-clickable:hover img {
    transform: scale(1.05);
}
@media (prefers-reduced-motion: reduce) {
    .gallery-thumb-clickable {
        transition: none;
    }
    .gallery-thumb-clickable:hover {
        transform: none;
    }
    .gallery-thumb-clickable:hover img {
        transform: none;
    }
}

/* ============================================================
   Gallery Modal Lightbox (RTL Slider)
   ============================================================ */
.gallery-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 8px;
    direction: rtl;
    width: 100%;
    height: 100%;
    align-items: center;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.gallery-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
}

.gallery-slide-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-slide-caption {
    max-width: 80%;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.gallery-nav-btn {
    opacity: 0.8;
    transition: opacity 0.2s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.gallery-nav-btn:focus {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(208, 167, 71, 0.5);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-slider {
        scroll-behavior: auto;
    }
    .gallery-nav-btn {
        transition: none;
    }
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .gallery-slide-img {
        max-height: 70vh;
    }
}

/* ============================================================
   Tab Error Indicators
   ============================================================ */
.tab-error-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e8262c;
    display: inline-block;
    vertical-align: middle;
}

.tab-error-banner {
    margin-bottom: 1rem;
}

.tab-error-banner .alert {
    border-left: 3px solid #e8262c;
}

.tab-error-banner ul {
    list-style: none;
    padding-left: 0;
}

.tab-error-banner ul li {
    margin-bottom: 0.25rem;
}

.tab-error-banner ul li:last-child {
    margin-bottom: 0;
}

.tab-error-banner a {
    cursor: pointer;
}

.tab-error-banner a:hover {
    text-decoration: underline !important;
}

/* ============================================================
   Readiness Checklist (Admin Sidebar)
   ============================================================ */
.rc-checklist-card {
    border-color: rgba(208, 167, 71, 0.2);
}
.rc-checklist-card .card-header {
    background: rgba(208, 167, 71, 0.08);
    padding: 0.5rem 0.75rem;
    border-bottom-color: rgba(208, 167, 71, 0.15);
}
.rc-row {
    transition: background 0.15s;
    cursor: pointer;
    border-radius: 0.25rem;
}
.rc-row:hover {
    background: rgba(208, 167, 71, 0.08);
}
.rc-row-ok {
    border-left: 3px solid #198754;
    padding-left: 0.5rem;
}
.rc-row-fail {
    border-left: 3px solid #dc3545;
    padding-left: 0.5rem;
}
.rc-label {
    color: var(--text-secondary);
}
.rc-overall {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}