/* ============================================
   Bootstrap Variable Overrides
   ============================================ */
:root {
    --bs-primary: #16a34a;
    --bs-primary-rgb: 22, 163, 74;
    --bs-success: #16a34a;
    --bs-success-rgb: 22, 163, 74;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-body-font-family: "Bricolage Grotesque", sans-serif;
    --bs-body-color: #0f172a;
    --bs-body-bg: #f8fafc;
    --bs-border-color: rgba(0, 0, 0, 0.08);
    --bs-border-radius: 8px;
    --bs-border-radius-lg: 12px;
    --bs-border-radius-sm: 6px;
    --bs-info-rgb: 13,110,253;
    --bs-light-rgb: 233, 237, 242;
}

/* ============================================
   Fonts
   ============================================ */

@font-face {
    font-family: "Backoffice Icons";
    src: url("../fonts/backoffice/Backoffice-Icons.woff2") format("woff2"),
        url("../fonts/backoffice/Backoffice-Icons.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* ============================================
   Icons
   ============================================ */
[class^="bo-icon-"], [class*=" bo-icon-"] {
    font-family: "Backoffice Icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bo-icon-golf-cart:before {
    content: "\f000";
}

/* ============================================
   Design Tokens
   ============================================ */
:root {
    --color-primary: #fd8424;
    --color-primary-hover: #e37620;
    --color-background: #f8fafc;
    --color-surface: #ffffff;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(0, 0, 0, 0.15);
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fef3c7;
    --color-warning-text: #92400e;
    --color-success-bg: #f0fdf4;
    --color-success-border: #bbf7d0;
    --color-success-text: #166534;
    --color-info: #3b82f6;
    --color-info-bg: #eff6ff;
    --color-info-border: #dbeafe;
    --color-info-text: #1e40af;
    --color-danger: #ef4444;
    --color-danger-bg: #fef2f2;
    --color-danger-border: #fecaca;
    --color-danger-text: #991b1b;
    --shadow-small: 0 1px 3px rgba(0,0,0,0.02);
    --shadow-large: 0 8px 24px rgba(0,0,0,0.08);
    --radius-large: 12px;
    --radius-medium: 8px;
    --radius-pill: 100px;
    --layout-sidebar-width: 240px;
    --layout-bottomnav-height: 64px;    
}

/* ============================================
   Base
   ============================================ */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.table {
    --bs-table-bg: #fff;
}

/* ============================================
   Typography Utilities
   ============================================ */
.text-display {
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* ============================================
   Bootstrap Button Overrides
   ============================================ */
.btn-primary,
.btn-success {
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary-hover);
    --bs-btn-hover-border-color: var(--color-primary-hover);
    --bs-btn-active-bg: var(--color-primary-hover);
    --bs-btn-active-border-color: var(--color-primary-hover);
    --bs-btn-focus-shadow-rgb: 22, 163, 74;
    font-weight: 500;
}

.btn-danger {
    --bs-btn-bg: var(--color-danger);
    --bs-btn-border-color: var(--color-danger);
    --bs-btn-hover-bg: #dc2626;
    --bs-btn-hover-border-color: #dc2626;
    --bs-btn-active-bg: #b91c1c;
    --bs-btn-active-border-color: #b91c1c;
    font-weight: 500;
}

.btn-outline-secondary {
    --bs-btn-border-color: var(--color-border);
    --bs-btn-hover-bg: var(--color-background);
    --bs-btn-hover-border-color: var(--color-border-hover);
    --bs-btn-color: var(--color-text-main);
    --bs-btn-hover-color: var(--color-text-main);
    font-weight: 500;
}

.btn-outline-danger {
    --bs-btn-color: var(--color-danger);
    --bs-btn-border-color: var(--color-danger-border);
    --bs-btn-hover-bg: var(--color-danger-bg);
    --bs-btn-hover-color: var(--color-danger-text);
    font-weight: 500;
}

a {
    --bs-link-color-rgb: var( --color-primary );
    --bs-link-hover-color-rgb: var( --color-primary-hover );
    color: var( --bs-link-color-rgb );
}

a:hover, a:focus, a:active {
    color: var( --bs-link-hover-color-rgb );
}

/* ============================================
   Bootstrap Form Overrides
   ============================================ */
.form-control,
.form-select {
    border-color: var(--color-border);
    color: var(--color-text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-label {
    font-weight: 500;
    color: var(--color-text-main);
}

.form-control + .select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 38px;
}

.select2-dropdown,  .select2-container .select2-selection--single, .select2-container--default .select2-selection--multiple {
    border: var(--bs-border-width) solid var(--bs-border-color);
}

.select2-container--default .select2-selection--single {
    border-radius: var(--bs-border-radius);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var( --color-primary );
}

/* ============================================
   Layout: App Shell
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding-bottom: calc(var(--layout-bottomnav-height) + 16px);
}

@media (min-width: 992px) {
    .app-main {
        padding-bottom: 0;
    }
}

/* ============================================
   Sidebar (Desktop only)
   ============================================ */
.sidebar {
    width: var(--layout-sidebar-width);
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    display: none;
    flex-direction: column;
}

.sidebar .nav-brand > svg,
.sidebar .nav-brand > img {
    height: 4.5rem;
}

@media (min-width: 992px) {
    .sidebar {
        display: flex;
    }
}

.sidebar-nav {
    flex: 1;
}

/* ============================================
   Nav Links (Sidebar + Offcanvas)
   ============================================ */
.sidebar .nav-link,
.offcanvas .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-medium);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar .nav-link:hover,
.offcanvas .nav-link:hover {
    background: #f1f5f9;
    color: var(--color-text-main);
}

.sidebar .nav-link.active,
.offcanvas .nav-link.active {
    background: #f1f5f9;
    color: var(--color-text-main);
    font-weight: 500;
}

.sidebar .nav-link i,
.offcanvas .nav-link i {
    width: 20px;
    text-align: center;
}

/* ============================================
   Mobile Top Bar
   ============================================ */
.mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.mobile-topbar .nav-brand > svg, 
.mobile-topbar .nav-brand > img {
    height: 2.5rem;
}

@media (min-width: 992px) {
    .mobile-topbar {
        display: none;
    }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-medium);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.15s ease;
}

.topbar-btn i {
    font-size: 1.25rem;
}

.topbar-btn:hover {
    background: #f1f5f9;
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-large);
    background: var(--color-primary-bg, #fff3e8);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.settings-icon + div .fw-bold {
    color: var(--color-text-main);
}

a.card:hover {
    border-color: var(--color-primary);
}

.font-monospace {
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
}

/* ============================================
   Bottom Navigation (Mobile only)
   ============================================ */
.bottomnav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--layout-bottomnav-height);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 992px) {
    .bottomnav {
        display: none;
    }
}

.bottomnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.625rem;
    font-weight: 500;
    transition: color 0.15s ease;
    position: relative;
}

.bottomnav-item.active {
    color: var(--color-primary);
}

.bottomnav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--color-primary);
    border-radius: 0 0 2px 2px;
}

.bottomnav i {
    font-size: 1rem;
}

/* ============================================
   Notification Badge
   ============================================ */
.badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    border: 2px solid var(--color-surface);
}

.badge-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    background: var(--color-danger);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-surface);
}

/* ============================================
   Notification Panel (Offcanvas)
   ============================================ */
.notification-item {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
}

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

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.is-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.notification-icon.is-danger { background: var(--color-danger-bg); color: var(--color-danger-text); }
.notification-icon.is-success { background: var(--color-success-bg); color: var(--color-success-text); }
.notification-icon.is-info { background: var(--color-info-bg); color: var(--color-info-text); }

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

.notification-body p {
    margin: 0;
    line-height: 1.4;
    color: var(--color-text-main);
}

.notification-body small {
    color: var(--color-text-muted);
}

.notification-unread {
    background: hsl(210 40% 98%);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--color-border-hover);
}

/* ============================================
   Status Pills
   ============================================ */
.status-pill {
    border-radius: var(--radius-pill);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.status-available { background: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); }
.status-charging { background: var(--color-warning-bg); color: var(--color-warning-text); border: 1px solid var(--color-warning-border); }
.status-in-use { background: var(--color-info-bg); color: var(--color-info-text); border: 1px solid var(--color-info-border); }
.status-maintenance { background: var(--color-danger-bg); color: var(--color-danger-text); border: 1px solid var(--color-danger-border); }

/* ============================================
   Battery Bar
   ============================================ */
.battery-track {
    height: 6px;
    border-radius: 10px;
    background: #e2e8f0;
    overflow: hidden;
    width: 100%;
}

.battery-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   User Avatar
   ============================================ */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============================================
   Desktop Notification Bell (sidebar)
   ============================================ */
.desktop-notif-btn {
    display: none;
}

@media (min-width: 992px) {
    .desktop-notif-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        border-radius: var(--radius-medium);
        background: transparent;
        border: none;
        color: var(--color-text-muted);
        font-family: inherit;
        text-align: left;
        transition: background 0.15s ease, color 0.15s ease;
        position: relative;
    }

    .desktop-notif-btn:hover {
        background: #f1f5f9;
        color: var(--color-text-main);
    }

    .desktop-notif-btn .badge-count {
        position: static;
        border: none;
    }
}

/* ============================================
   Offcanvas customization
   ============================================ */
.offcanvas {
    --bs-offcanvas-width: 320px;
}

.offcanvas-header {
    border-bottom: 1px solid var(--color-border);
}

.offcanvas-bottom {
    --bs-offcanvas-height: auto;
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    max-height: 70vh;
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
}

.filter-toggle i {
    transition: transform 0.2s ease;
}

.filter-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

@media (min-width: 992px) {
    .filter-toggle {
        display: none;
    }
    #filterBody {
        display: block !important;
    }
}

.filter-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-search {
    position: relative;
}

.filter-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-search .form-control {
    padding-left: 36px;
    min-width: 180px;
    width: auto;
}

.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--color-border-hover);
    color: var(--color-text-main);
}

.filter-chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.filter-count {
    color: var(--color-text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.filter-clear {
    color: var(--color-primary);
    background: none;
    border: none;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.filter-clear:hover {
    text-decoration: underline;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    background: var(--color-info-bg);
    color: var(--color-info-text);
    border: 1px solid var(--color-info-border);
}

.active-tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
}

.active-tag button:hover {
    opacity: 1;
}

@media (max-width: 991px) {
    .filter-body {
        flex-direction: column;
    }

    .filter-body > div, .filter-search > .form-control {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .filter-search .form-control,
    .filter-body .form-control + .select2-container {
        width: 220px !important;
        max-width: 100%;
    }

    .filter-body .form-control,
    .filter-body .form-select {
        width: auto;
    }
}

/* ============================================
   Profile Page
   ============================================ */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
}

.profile-avatar-upload {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--color-text-muted);
}

.profile-avatar-upload:hover {
    background: #f1f5f9;
}

.section-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-desc {
    color: var(--color-text-muted);
}

.danger-zone {
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius-large);
    background: var(--color-danger-bg);
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 100px;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
    background: var(--color-primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pref-row + .pref-row {
    border-top: 1px solid var(--color-border);
}

.pref-label {
    font-weight: 500;
}

.pref-desc {
    color: var(--color-text-muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--color-text-main);
}

.profile-content {
    max-width: 640px;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-upload {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: var(--color-surface);
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    color: var(--color-text-muted);
    z-index: 2;
    font-size: 1rem;
}

.profile-avatar-upload:hover {
    color: var(--color-text-main);
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
}

.auth-logo svg,
.auth-logo img {
    height: 6.5rem;
}

.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-large);
    text-align: left;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper .form-control {
    padding-right: 44px;
}

.auth-toggle-pw {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-medium);
    transition: color 0.15s ease;
}

.auth-toggle-pw:hover {
    color: var(--color-text-main);
}

.auth-toggle-pw .icon-eye-off {
    display: none;
}

.auth-toggle-pw.is-visible .icon-eye {
    display: none;
}

.auth-toggle-pw.is-visible .icon-eye-off {
    display: block;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-main);
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.auth-forgot {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.auth-forgot:hover {
    opacity: 0.8;
}

/* ============================================
   Bootstrap Table Override
   ============================================ */
.table {
    --bs-table-hover-bg: rgba(0, 0, 0, 0.02);
}

.table > thead {
    background: var(--color-background);
}

/* ============================================
   Bootstrap Table Override
   ============================================ */
.alert {
    --bs-alert-padding-x: 0.85rem;
    --bs-alert-padding-y: 0.85rem;
    font-size: 0.875rem;
}

/* ============================================
   Pagination
   ============================================ */
.page-link {
    color: var(--color-primary);
}

.page-link:hover,
.page-link:focus {
    color: var(--color-primary);
}

.page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ============================================
   Input Check
   ============================================ */
.form-check-input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input[type="checkbox"]:focus {
    --bs-focus-ring-color: color-mix(in srgb, var(--color-primary) 25%, transparent);
    border-color: var(--color-primary);
}

.form-check-input[type="checkbox"] {
    outline: none;
}

.form-switch .form-check-input:not(:checked):focus {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fd8424'/%3e%3c%2fsvg%3e");
}

/* ============================================
   Swatch Colors
   ============================================ */
.cp-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, border-color 0.15s;
}

.cp-swatch:hover { 
    transform: scale(1.12); 
}

.cp-swatch.selected { 
    border-color: var(--color-primary); 
}

.cp-swatch .check { 
    display: none; 
}

.cp-swatch.selected .check { 
    display: block; 
}

/* ============================================
   Image Grid
   ============================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.image-item {
    cursor: grab;
    border-radius: var(--radius-large);
    overflow: hidden;
}

.image-item:active {
    cursor: grabbing;
}

.image-item-inner {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-large);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.image-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.image-cover-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}

.image-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    border: none;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

.image-item-inner:hover .image-delete-btn {
    opacity: 1;
}

.sortable-ghost .image-item-inner {
    opacity: 0.35;
    border: 2px dashed var(--color-primary);
}

/* ============================================
   Booking
   ============================================ */
.booking-type-toggle {
    display: inline-flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 4px;
    gap: 4px;
}

.booking-type-radio {
    display: none;
}

.booking-type-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: calc(var(--radius-large) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    margin: 0;
    user-select: none;
}

.booking-type-radio:checked + .booking-type-btn {
    background: var(--color-primary);
    color: #fff;
}

.rate-source-icon.text-success {
    color: var(--color-success) !important;
    cursor: help;
}

.rate-source-icon.text-muted {
    cursor: help;
}

/* ============================================
   Libraries
   ============================================ */
.ql-toolbar.ql-snow, .ql-container {
    font-family: inherit;
}

.ql-editor {
    min-height: 10rem;
    max-height: 10rem;
}

.ql-container {
    font-size: 1rem;
}

.flatpickr-months {
    height: 3rem;
}

.flatpickr-months .flatpickr-month {
    height: 2rem;
}

.flatpickr-months {
    align-items: center;
}

.flatpickr-current-month {
    font-size: 110%;
}

.flatpickr-day {
    line-height: 37px;
}

.flatpickr-time input.flatpickr-hour {
    font-weight: 400;
}

.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
    background: var( --color-primary);
    border-color: var( --color-primary );
}

.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg {
    fill: var( --color-primary );
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-large);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--color-primary);
    --bs-nav-link-color: var( --color-primary );
    --bs-nav-link-hover-color: var( --color-primary-hover );
}

.fc a {
    text-decoration: none;
}