/* =============================================================================
   YMO Booking — shared theme
   Mirrors the look of yourmechaniconline.com (dark hero, brand-green accent,
   rounded buttons, sans-serif body, oversized headings). Bootstrap 5 is
   loaded from the app origin in layout/partials/head_assets.php; this file overrides tokens + adds
   custom components.
   ============================================================================= */

:root {
    --ymo-primary:        #3a6f37;
    --ymo-primary-dark:   #2c5429;
    --ymo-primary-soft:   #e8f1e7;
    --ymo-black:          #111418;
    --ymo-grey-900:       #1d2026;
    --ymo-grey-700:       #3a3f46;
    --ymo-grey-500:       #6b7280;
    --ymo-grey-300:       #d1d5db;
    --ymo-grey-100:       #f3f4f6;
    --ymo-bg-soft:        #f7f8fa;
    --ymo-yellow:         #ffc107;

    --bs-primary: var(--ymo-primary);
    --bs-primary-rgb: 58, 111, 55;

    --ymo-radius: 0.6rem;
    --ymo-radius-lg: 1rem;
    --ymo-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --ymo-shadow:    0 8px 24px rgba(0,0,0,.08);

    /* --- Material 3 elevation tiers (subtle on light surfaces) ---------- */
    --md-elev-1: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.06);
    --md-elev-2: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.08);
    --md-elev-3: 0 4px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.10);
    --md-elev-4: 0 6px 10px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.10);
    --md-elev-5: 0 8px 12px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.10);

    /* MD3 state-layer opacities (on top of any colour) */
    --md-state-hover: 0.08;
    --md-state-focus: 0.12;
    --md-state-press: 0.16;

    /* MD3 semantic color roles (YMO green seed) */
    --md-sys-color-primary:              var(--ymo-primary);
    --md-sys-color-on-primary:           #ffffff;
    --md-sys-color-primary-container:    var(--ymo-primary-soft);
    --md-sys-color-on-primary-container: var(--ymo-primary-dark);
    --md-sys-color-secondary-container:  #e8eef0;
    --md-sys-color-on-secondary-container: var(--ymo-grey-900);
    --md-sys-color-surface:              #ffffff;
    --md-sys-color-surface-dim:          var(--ymo-bg-soft);
    --md-sys-color-surface-container:    #f3f4f6;
    --md-sys-color-surface-container-high: #eceef1;
    --md-sys-color-on-surface:           var(--ymo-black);
    --md-sys-color-on-surface-variant:   var(--ymo-grey-700);
    --md-sys-color-outline:              var(--ymo-grey-300);
    --md-sys-color-outline-variant:      #e5e7eb;

    /* MD3 shape */
    --md-shape-corner-extra-small: 4px;
    --md-shape-corner-small:         8px;
    --md-shape-corner-medium:        12px;
    --md-shape-corner-large:         16px;
    --md-shape-corner-full:          9999px;
}

html, body {
    background: var(--md-sys-color-surface-dim);
    color: var(--md-sys-color-on-surface);
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.md-theme {
    background: var(--md-sys-color-surface-dim);
    color: var(--md-sys-color-on-surface);
}

a { color: var(--ymo-primary); text-decoration: none; }
a:hover { color: var(--ymo-primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }

.btn-primary, .btn-primary:focus {
    background: var(--ymo-primary);
    border-color: var(--ymo-primary);
}
.btn-primary:hover, .btn-primary:active {
    background: var(--ymo-primary-dark);
    border-color: var(--ymo-primary-dark);
}
.btn-outline-primary {
    color: var(--ymo-primary);
    border-color: var(--ymo-primary);
}
.btn-outline-primary:hover {
    background: var(--ymo-primary);
    border-color: var(--ymo-primary);
    color: #fff;
}

.btn { border-radius: var(--ymo-radius); font-weight: 600; }
.btn-lg { padding: 0.75rem 1.5rem; }

/* ---------------- Header / nav ---------------------------------------- */
.ymo-topbar {
    background: linear-gradient(90deg, var(--ymo-black) 0%, var(--ymo-grey-900) 100%);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8125rem;
    padding: 0.35rem 0;
    letter-spacing: 0.01em;
}
.ymo-topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.ymo-topbar a:hover { color: var(--ymo-yellow); }

.ymo-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
}
.ymo-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin-right: 1.5rem;
}
.ymo-navbar .navbar-brand .ymo-brand-logo {
    height: 40px;
    width: auto;
    display: block;
}
@media (max-width: 575.98px) {
    .ymo-navbar .navbar-brand .ymo-brand-logo { height: 34px; }
}

.ymo-nav-primary {
    gap: 0.15rem;
}

.ymo-nav-link.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--ymo-grey-700);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--md-shape-corner-full);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ymo-nav-link.nav-link:hover,
.ymo-nav-link.nav-link:focus-visible {
    color: var(--ymo-primary-dark);
    background: rgba(58, 111, 55, 0.08);
    text-decoration: none;
}

.ymo-nav-link.nav-link.active,
.ymo-nav-link.nav-link.show {
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    box-shadow: inset 0 0 0 1px rgba(58, 111, 55, 0.12);
}

.ymo-nav-link.dropdown-toggle::after {
    display: none;
}

.ymo-nav-chevron {
    font-size: 1.125rem !important;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.ymo-nav-link.show .ymo-nav-chevron,
.ymo-nav-dropdown.is-hover-open > .ymo-nav-link .ymo-nav-chevron,
.ymo-nav-dropdown:focus-within > .ymo-nav-link .ymo-nav-chevron {
    transform: rotate(180deg);
}

.ymo-nav-dropdown.is-hover-open > .ymo-nav-link:not(.active),
.ymo-nav-dropdown:focus-within > .ymo-nav-link:not(.active) {
    color: var(--ymo-primary-dark);
    background: rgba(58, 111, 55, 0.08);
}

.ymo-nav-actions {
    gap: 0.35rem;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--md-sys-color-outline-variant);
}

@media (max-width: 991.98px) {
    .ymo-nav-actions {
        border-left: 0;
        padding-left: 0;
        margin-left: 0;
        padding-top: 0.75rem;
    }
}

.ymo-navbar .dropdown-menu {
    border: 0;
    border-radius: var(--md-shape-corner-large);
    box-shadow: var(--md-elev-4);
    padding: 0.5rem;
    margin-top: 0.5rem !important;
}

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

@media (min-width: 992px) {
    .ymo-navbar > .container {
        position: relative;
    }

    /* Invisible hit area above the panel so hover is not lost in the gap */
    .ymo-nav-dropdown > .dropdown-menu::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        height: 0.65rem;
    }

    .ymo-nav-dropdown > .dropdown-menu {
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        margin-top: 0.25rem !important;
        transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
        transform: translateY(-4px);
        animation: none;
    }

    .ymo-nav-dropdown.is-hover-open > .dropdown-menu,
    .ymo-nav-dropdown:focus-within > .dropdown-menu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.ymo-navbar .dropdown-menu-md {
    min-width: 18rem;
}

.ymo-nav-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--md-shape-corner-medium);
    color: var(--ymo-grey-900);
}

.ymo-nav-menu-item .mi {
    font-size: 1.25rem;
    color: var(--ymo-primary);
    opacity: 0.9;
    flex-shrink: 0;
}

.ymo-nav-menu-item:hover,
.ymo-nav-menu-item:focus {
    background: var(--ymo-primary-soft);
    color: var(--ymo-primary-dark);
}

.ymo-nav-menu-item.active,
.ymo-nav-menu-item:active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.ymo-nav-menu-item.dropdown-item-emphasis {
    margin-top: 0.25rem;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0 0 var(--md-shape-corner-medium) var(--md-shape-corner-medium);
    font-weight: 700;
    color: var(--ymo-primary);
}

.ymo-nav-mega {
    min-width: 14rem;
    max-width: 18rem;
    padding: 0.35rem 0;
}

.ymo-nav-mega-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ymo-nav-mega-col {
    background: transparent;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
}

.ymo-nav-mega-col + .ymo-nav-mega-col {
    border-top: 1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
    padding-top: 0.65rem;
    margin-top: 0.35rem;
}

.ymo-nav-mega-city {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ymo-grey-900);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: var(--md-shape-corner-small);
    margin-bottom: 0.35rem;
}

.ymo-nav-mega-city .mi {
    color: var(--ymo-primary);
    font-size: 1.125rem;
}

.ymo-nav-mega-city:hover {
    background: rgba(58, 111, 55, 0.08);
    color: var(--ymo-primary-dark);
}

.ymo-nav-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ymo-nav-mega-links a {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ymo-grey-700);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: var(--md-shape-corner-small);
}

.ymo-nav-mega-links a:hover,
.ymo-nav-mega-links a.is-active {
    background: var(--ymo-primary-soft);
    color: var(--ymo-primary-dark);
}

.ymo-nav-mega-links a.is-active {
    font-weight: 600;
}

.ymo-navbar .dropdown-header {
    display: none;
}

.ymo-navbar .dropdown-divider {
    display: none;
}

@media (min-width: 992px) {
    .ymo-nav-locations {
        position: relative;
    }

    .ymo-nav-locations .ymo-nav-mega {
        left: 0;
        right: auto;
        translate: none;
    }
}

.ymo-drawer-expand {
    border: 0;
}

.ymo-drawer-expand > summary {
    list-style: none;
    cursor: pointer;
}

.ymo-drawer-expand > summary::-webkit-details-marker {
    display: none;
}

.ymo-drawer-chevron {
    margin-left: auto;
    font-size: 1.375rem !important;
    color: var(--ymo-grey-500);
    transition: transform 0.2s ease, color 0.15s ease;
}

.ymo-drawer-expand[open] > summary .ymo-drawer-chevron {
    transform: rotate(180deg);
}

.ymo-drawer-expand > summary:hover .ymo-drawer-chevron,
.ymo-drawer-expand > summary:focus-visible .ymo-drawer-chevron {
    color: var(--ymo-primary);
}

.ymo-drawer-sub {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ymo-drawer-expand[open] > .ymo-drawer-sub {
    grid-template-rows: 1fr;
}

.ymo-drawer-sub-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 0 0.35rem 2.75rem;
}

.ymo-drawer-sub-link {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ymo-grey-700);
    text-decoration: none;
    border-radius: var(--md-shape-corner-small);
}

.ymo-drawer-sub-link:hover,
.ymo-drawer-sub-link:focus-visible {
    color: var(--ymo-primary-dark);
    background: var(--ymo-primary-soft);
}

.ymo-drawer-sub-link.is-active {
    color: var(--ymo-primary);
    font-weight: 600;
}

.ymo-drawer-sub-link--icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ymo-drawer-sub-link--icon .mi {
    color: var(--ymo-primary);
    opacity: 0.85;
    flex-shrink: 0;
}

.ymo-drawer-sub-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ymo-grey-500);
    padding: 0.5rem 0.75rem 0.15rem;
}

/* Hamburger styling only below `lg`: our `display:inline-flex` must not beat
   Bootstrap's `.navbar-expand-lg .navbar-toggler { display:none }` — ymo.css
   loads after Bootstrap, so unconstrained toggler rules wrongly show it on desktop. */
@media (max-width: 991.98px) {
    .ymo-navbar .navbar-toggler {
        border: 0;
        padding: 0;
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: var(--ymo-grey-900);
        transition: background 0.15s ease;
    }
    .ymo-navbar .navbar-toggler:focus { box-shadow: none; }
    .ymo-navbar .navbar-toggler:hover,
    .ymo-navbar .navbar-toggler:focus-visible { background: var(--ymo-grey-100); }
    .ymo-navbar .navbar-toggler .mi { font-size: 28px; }
}

/* ---------------- Mobile navigation drawer (offcanvas) ---------------- */
.ymo-drawer {
    width: 320px;
    max-width: 88vw;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    border: 0;
}
.ymo-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--ymo-grey-100);
    flex-shrink: 0;
}
.ymo-drawer-head .ymo-brand-logo { height: 36px; width: auto; display: block; }
.ymo-drawer-close {
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ymo-grey-700);
    transition: background 0.15s ease;
}
.ymo-drawer-close:hover, .ymo-drawer-close:focus-visible {
    background: var(--ymo-grey-100);
    color: var(--ymo-grey-900);
}

.ymo-drawer-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--ymo-primary-soft);
    flex-shrink: 0;
}
.ymo-drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ymo-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.ymo-drawer-user-meta { line-height: 1.25; min-width: 0; }
.ymo-drawer-user-meta strong {
    display: block;
    color: var(--ymo-black);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ymo-drawer-user-meta small {
    color: var(--ymo-grey-700);
    font-size: 0.78rem;
}

/* Scrollable middle area lets header/footer stay pinned on short screens */
.ymo-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}
.ymo-drawer-section { padding: 0.25rem 0; }
.ymo-drawer-section-label {
    display: block;
    padding: 0.6rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ymo-grey-500);
}
.ymo-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    color: var(--ymo-grey-900);
    font-weight: 500;
    text-decoration: none;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
}
.ymo-drawer-link:hover, .ymo-drawer-link:focus-visible {
    background: rgba(58, 111, 55, 0.08);
    color: var(--ymo-primary-dark);
    text-decoration: none;
}
.ymo-drawer-link.is-active {
    background: var(--ymo-primary-soft);
    color: var(--ymo-primary-dark);
    border-left-color: var(--ymo-primary);
}
.ymo-drawer-link .mi {
    color: var(--ymo-grey-700);
    font-size: 22px;
    flex-shrink: 0;
}
.ymo-drawer-link:hover .mi,
.ymo-drawer-link:focus-visible .mi,
.ymo-drawer-link.is-active .mi { color: var(--ymo-primary); }

.ymo-drawer-div {
    border: 0;
    border-top: 1px solid var(--ymo-grey-100);
    margin: 0.5rem 0;
}

.ymo-drawer-foot {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--ymo-grey-100);
    background: #fff;
}
.ymo-drawer-foot .btn { border-radius: 999px; padding: 0.7rem 1.25rem; }
.ymo-drawer-foot-secondary {
    text-align: center;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--ymo-grey-500);
}
.ymo-drawer-foot-secondary a { color: var(--ymo-grey-700); font-weight: 600; }
.ymo-drawer-tagline {
    text-align: center;
    margin-top: 0.85rem;
    font-size: 0.7rem;
    color: var(--ymo-grey-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* The drawer is mobile-only; on lg+ the standard inline navbar takes over. */
@media (min-width: 992px) {
    .ymo-drawer { display: none !important; }
}
/* Bootstrap's offcanvas applies `overflow:hidden` to body when open; that's
   fine. The scrim opacity is increased for stronger contrast against white. */
.offcanvas-backdrop.show { opacity: 0.5; }

/* Mobile drawer motion — slide, staggered links, submenu expand */
@media (max-width: 991.98px) {
    .offcanvas-backdrop {
        transition: opacity 0.32s ease;
    }

    .ymo-drawer.offcanvas-end {
        transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }

    .ymo-navbar .navbar-toggler .mi {
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .ymo-navbar .navbar-toggler.is-active .mi {
        transform: rotate(-90deg);
    }

    .ymo-drawer-head,
    .ymo-drawer-user {
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .ymo-drawer.is-revealed .ymo-drawer-head,
    .ymo-drawer.is-revealed .ymo-drawer-user {
        opacity: 1;
        transform: translateY(0);
    }

    .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-link,
    .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-expand {
        opacity: 0;
        transform: translateX(14px);
        transition:
            opacity 0.28s ease,
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            background 0.15s ease,
            color 0.15s ease,
            border-color 0.15s ease;
    }

    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-link,
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-expand {
        opacity: 1;
        transform: translateX(0);
    }

    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(1) { transition-delay: 0.04s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(2) { transition-delay: 0.07s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(3) { transition-delay: 0.1s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(4) { transition-delay: 0.13s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(5) { transition-delay: 0.16s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(6) { transition-delay: 0.19s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:first-child > *:nth-child(7) { transition-delay: 0.22s; }

    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:last-child > *:nth-child(1) { transition-delay: 0.14s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:last-child > *:nth-child(2) { transition-delay: 0.17s; }
    .ymo-drawer.is-revealed .ymo-drawer-body .ymo-drawer-section:last-child > *:nth-child(3) { transition-delay: 0.2s; }

    .ymo-drawer-foot {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .ymo-drawer.is-revealed .ymo-drawer-foot {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.16s;
    }

    .ymo-drawer-div {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .ymo-drawer.is-revealed .ymo-drawer-div {
        opacity: 1;
        transition-delay: 0.12s;
    }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    .ymo-drawer.offcanvas-end,
    .offcanvas-backdrop,
    .ymo-navbar .navbar-toggler .mi,
    .ymo-drawer-head,
    .ymo-drawer-user,
    .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-link,
    .ymo-drawer-body .ymo-drawer-section > .ymo-drawer-expand,
    .ymo-drawer-foot,
    .ymo-drawer-div,
    .ymo-drawer-sub {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ---------------- Hero (booking subdomain only) ------------------------- */
.ymo-booking-hero {
    background:
        linear-gradient(135deg, rgba(17,20,24,0.72), rgba(17,20,24,0.55)),
        url('/assets/img/hero-car.jpg') center/cover no-repeat,
        var(--ymo-grey-900);
    color: #fff;
    padding: 4rem 0 3rem;
}
.ymo-booking-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.ymo-booking-hero .lead { font-size: 1.15rem; opacity: 0.85; }

/* ---------------- Cards / packages ------------------------------------ */
.ymo-card {
    background: #fff;
    border-radius: var(--ymo-radius-lg);
    box-shadow: var(--ymo-shadow);
    padding: 1.5rem;
}
.contacts-bulk-bar {
    border: 2px solid var(--ymo-primary);
    background: #f8fbff;
}
.contacts-bulk-bar[hidden] {
    display: none !important;
}
.ymo-package-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ymo-package-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
}
.ymo-package-card .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ymo-primary);
}
.ymo-package-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    flex: 1;
}
.ymo-package-card li {
    padding-left: 1.4rem;
    position: relative;
    margin-bottom: 0.4rem;
    color: var(--ymo-grey-700);
}
.ymo-package-card li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--ymo-primary);
    font-weight: bold;
}

/* ---------------- Forms ----------------------------------------------- */
.form-control, .form-select {
    border-radius: var(--ymo-radius);
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--ymo-grey-300);
}
.form-control:focus, .form-select:focus {
    border-color: var(--ymo-primary);
    box-shadow: 0 0 0 0.2rem rgba(58, 111, 55, 0.18);
}
.form-label { font-weight: 600; }

/* ---------------- Material 3 outlined text field ---------------------- */
/* Builds on Bootstrap's .form-floating, restyled to MD3's outlined look:
   floating label sits on the border, primary-coloured on focus, with a
   2px outline ring instead of Bootstrap's box-shadow halo. */
.form-floating > .form-control,
.form-floating > .form-select {
    height: 56px;
    padding: 1rem 0.9rem 0.4rem;
    border-radius: var(--ymo-radius);
    border: 1px solid var(--ymo-grey-300);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-floating > textarea.form-control { height: auto; min-height: 96px; padding-top: 1.4rem; }
.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--ymo-primary);
    box-shadow: inset 0 0 0 1px var(--ymo-primary);
}
.form-floating > label {
    color: var(--ymo-grey-500);
    padding: 1rem 0.9rem;
    transition: color .15s ease;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    background: #fff;
    padding: 0 0.4rem;
    margin: 0 0.5rem;
    height: auto;
    transform: scale(0.78) translateY(-0.95rem) translateX(0.15rem);
    color: var(--ymo-grey-700);
    border-radius: 4px;
    width: auto;
}
.form-floating > .form-control:focus ~ label {
    color: var(--ymo-primary);
}
/* Error variant — wrap the field group in .md-field--error for red styling */
.md-field--error .form-floating > .form-control {
    border-color: #b91c1c;
}
.md-field--error .form-floating > .form-control:focus {
    box-shadow: inset 0 0 0 1px #b91c1c;
}
.md-field--error .form-floating > label {
    color: #b91c1c;
}
.md-field-help {
    font-size: 0.75rem;
    color: var(--ymo-grey-500);
    padding: 0.25rem 0.9rem 0;
}
.md-field-help.is-error { color: #b91c1c; }

/* ---------------- Stepper -------------------------------------------- */
.ymo-stepper {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-wrap: wrap;
}
.ymo-stepper li {
    flex: 1;
    min-width: 140px;
    border-bottom: 3px solid var(--ymo-grey-300);
    padding-bottom: 0.5rem;
    color: var(--ymo-grey-500);
    font-weight: 600;
    font-size: 0.9rem;
}
.ymo-stepper li.is-active {
    border-color: var(--ymo-primary);
    color: var(--ymo-primary);
}
.ymo-stepper li.is-done {
    border-color: #16a34a;
    color: #16a34a;
}

/* ---------------- Status badges -------------------------------------- */
.badge-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-status.s-pending     { background:#fff3cd; color:#7a5b02; }
.badge-status.s-confirmed   { background:#cfe2ff; color:#0a3d91; }
.badge-status.s-in_progress { background:#e0e7ff; color:#3730a3; }
.badge-status.s-completed   { background:#d1fae5; color:#065f46; }
.badge-status.s-cancelled   { background:#fee2e2; color:#991b1b; }

/* ---------------- Footer --------------------------------------------- */
.ymo-footer {
    background: #ffffff;
    color: var(--ymo-grey-700);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--ymo-grey-300);
}
.ymo-footer h6 { color: var(--ymo-black); margin-bottom: 1rem; font-weight: 700; }
.ymo-footer a { color: var(--ymo-grey-700); }
.ymo-footer a:hover { color: var(--ymo-primary); }
.ymo-footer-logo {
    height: 56px;
    width: auto;
}
.ymo-footer .ymo-footer-bottom {
    border-top: 1px solid var(--ymo-grey-300);
    padding-top: 1rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--ymo-grey-500);
}

/* ---------------- Flash / alerts ------------------------------------- */
.ymo-flash { margin: 1rem 0; }

/* ---------------- Admin layout extras -------------------------------- */
.ymo-admin-body { overflow-x: hidden; }
.ymo-admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.ymo-admin-side {
    background: var(--ymo-grey-900);
    color: #cbd5e1;
    padding: 1.5rem 0;
}
.ymo-admin-brand {
    display: block;
    margin: 0 1.25rem 0.25rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: var(--ymo-radius);
    text-align: center;
    text-decoration: none;
    border-left: 0 !important;
}
.ymo-admin-brand:hover { background: #fff; }
.ymo-admin-brand img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: 36px;
    width: auto;
}
.ymo-admin-brand-tag {
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1rem;
}
.ymo-admin-side nav a,
.ymo-admin-drawer-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent;
    min-height: 44px;
}
.ymo-admin-side nav a:hover,
.ymo-admin-side nav a.active,
.ymo-admin-drawer-nav a:hover,
.ymo-admin-drawer-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--ymo-primary);
}
.ymo-admin-nav-label {
    padding: 0.25rem 1.5rem 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}
.ymo-admin-nav-div {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0.75rem 1.5rem;
    opacity: 1;
}
.ymo-admin-nav-logout {
    padding: 0 1.5rem 0.5rem;
    margin: 0;
}
.ymo-admin-main {
    padding: 1.5rem 2rem;
    min-width: 0;
}
.ymo-admin-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 1025;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: var(--ymo-grey-900);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ymo-admin-menu-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ymo-admin-menu-btn:hover,
.ymo-admin-menu-btn:focus-visible {
    background: rgba(255,255,255,0.14);
}
.ymo-admin-mobile-bar-meta {
    min-width: 0;
    line-height: 1.25;
}
.ymo-admin-mobile-bar-title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ymo-admin-mobile-bar-meta small {
    color: rgba(255,255,255,0.65);
    font-size: 0.75rem;
}
.ymo-admin-drawer {
    width: min(320px, 88vw);
    background: var(--ymo-grey-900);
    color: #cbd5e1;
    border: 0;
}
.ymo-admin-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ymo-admin-drawer-brand {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    background: #fff;
    border-radius: var(--ymo-radius);
}
.ymo-admin-drawer-brand img {
    display: block;
    height: 32px;
    width: auto;
}
.ymo-admin-drawer .ymo-drawer-close {
    color: rgba(255,255,255,0.85);
}
.ymo-admin-drawer .ymo-drawer-close:hover,
.ymo-admin-drawer .ymo-drawer-close:focus-visible {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.ymo-admin-drawer-tag {
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 1rem 0.5rem;
}
.ymo-admin-drawer-nav {
    overflow-y: auto;
    padding-bottom: 1rem;
    max-height: calc(100vh - 120px);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .ymo-admin-shell { grid-template-columns: 1fr; }
    .ymo-admin-main { padding: 1rem; }
}

/* ---------------- Public main content -------------------------------- */
.ymo-main {
    padding: 1.25rem 0 2rem;
    min-width: 0;
}
@media (max-width: 575.98px) {
    .ymo-main { padding: 1rem 0 1.5rem; }
    .ymo-booking-hero { padding: 2.5rem 0 2rem; }
    .ymo-booking-hero h1 { font-size: clamp(1.65rem, 8vw, 2.25rem); }
    .ymo-topbar .container > span:first-child { display: none; }
    .ymo-topbar { font-size: 0.78rem; text-align: center; }
    .ymo-topbar .container { justify-content: center !important; }
    .ymo-footer { padding: 2rem 0 1.25rem; margin-top: 2.5rem; }
    .md-fab {
        right: 1rem;
        bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* ---------------- Responsive tables & pagination --------------------- */
.ymo-card.p-0,
.md-card-elevated.p-0,
.ymo-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Customer booking lists — stacked cards on mobile */
.ymo-booking-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ymo-booking-card {
    padding: 1rem 1.1rem;
}
.ymo-booking-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.ymo-booking-card-title {
    font-weight: 600;
    line-height: 1.35;
}
.ymo-booking-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

@media (max-width: 767.98px) {
    table.ymo-table { min-width: 36rem; }
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.15rem;
    }
    .pagination .page-link {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .ymo-pipeline {
        grid-template-columns: minmax(260px, 1fr);
        overflow-x: auto;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 85vw);
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
    }
    .ymo-pipeline-col { scroll-snap-align: start; }
    .ymo-stepper li { min-width: 100%; flex: 1 1 100%; }
    .btn, .form-control, .form-select {
        min-height: 44px;
    }
    .btn-sm { min-height: 36px; }
}

/* ---------------- Utility -------------------------------------------- */
.ymo-muted { color: var(--ymo-grey-500); }
.ymo-divider { border: 0; border-top: 1px solid var(--ymo-grey-300); margin: 1.5rem 0; }

table.ymo-table { width: 100%; background:#fff; border-radius: var(--ymo-radius); overflow:hidden; box-shadow: var(--ymo-shadow-sm); }
table.ymo-table thead th { background: var(--ymo-grey-100); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ymo-grey-700); padding: 0.75rem 1rem; }
table.ymo-table tbody td  { padding: 0.85rem 1rem; border-top: 1px solid var(--ymo-grey-100); vertical-align: middle; }
table.ymo-table tbody tr:hover { background: var(--ymo-grey-100); }

/* CRM pipeline kanban */
.ymo-pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: start;
}
.ymo-pipeline-col {
    background: var(--ymo-grey-100);
    border-radius: var(--ymo-radius);
    padding: 0.75rem;
    min-height: 120px;
}
.ymo-pipeline-col h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ymo-grey-700);
    margin-bottom: 0.75rem;
}
.ymo-pipeline-card {
    background: #fff;
    border-radius: calc(var(--ymo-radius) - 2px);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--ymo-shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
}
.ymo-pipeline-card:hover {
    box-shadow: var(--ymo-shadow-md);
    color: inherit;
}
.ymo-pipeline-card .name { font-weight: 600; font-size: 0.9rem; }
.ymo-pipeline-card .meta { font-size: 0.78rem; color: var(--ymo-grey-500); }
.badge-priority-high { background: #fee2e2; color: #991b1b; }
.badge-stage { font-size: 0.72rem; text-transform: capitalize; }

/* ============================================================================
   Material 3 components
   ========================================================================= */

/* ---------------- Material Symbols icon ------------------------------- */
.mi {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    display: inline-flex;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
.mi.mi-fill   { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.mi.mi-sm     { font-size: 18px; }
.mi.mi-lg     { font-size: 28px; }
.mi.mi-xl     { font-size: 40px; }
.mi-leading   { margin-right: 0.4rem; }
.mi-trailing  { margin-left: 0.4rem; }

/* ---------------- Material card variants ------------------------------- */
.md-card-outlined {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-large);
    padding: 1.25rem;
}
.md-card-elevated {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-shape-corner-large);
    box-shadow: var(--md-elev-1);
    padding: 1.25rem;
    transition: box-shadow .2s ease, transform .2s ease;
}
.md-card-elevated:hover { box-shadow: var(--md-elev-3); }
.md-card-filled {
    background: var(--md-sys-color-primary-container);
    border-radius: var(--md-shape-corner-large);
    padding: 1.25rem;
}

/* ---------------- MD3 buttons ------------------------------------------------ */
.md-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.625rem 1.5rem;
    border-radius: var(--md-shape-corner-full);
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.md-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.md-btn:hover::before  { opacity: var(--md-state-hover); }
.md-btn:focus-visible::before { opacity: var(--md-state-focus); }
.md-btn:active::before { opacity: var(--md-state-press); }
.md-btn--lg { min-height: 48px; padding: 0.75rem 1.75rem; font-size: 0.9375rem; }
.md-btn--sm { min-height: 32px; padding: 0.375rem 1rem; font-size: 0.8125rem; }
.md-btn--filled {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elev-1);
}
.md-btn--filled:hover,
.md-btn--filled:focus-visible {
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elev-2);
    text-decoration: none;
}
.md-btn--tonal {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}
.md-btn--tonal:hover,
.md-btn--tonal:focus-visible {
    color: var(--md-sys-color-on-primary-container);
    text-decoration: none;
}
.md-btn--outlined {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}
.md-btn--outlined:hover,
.md-btn--outlined:focus-visible {
    color: var(--md-sys-color-primary-dark);
    border-color: var(--md-sys-color-primary);
    text-decoration: none;
}
.md-btn--text {
    background: transparent;
    color: var(--md-sys-color-primary);
    box-shadow: none;
    min-height: 40px;
    padding-inline: 0.75rem;
}
.md-btn--text:hover,
.md-btn--text:focus-visible {
    color: var(--md-sys-color-primary-dark);
    text-decoration: none;
}
.md-btn--on-dark {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.md-btn--on-dark:hover,
.md-btn--on-dark:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    text-decoration: none;
}

/* Bootstrap btn aliases under MD theme */
.md-theme .btn {
    position: relative;
    overflow: hidden;
    border-radius: var(--md-shape-corner-full);
    font-weight: 600;
    letter-spacing: 0.01em;
    min-height: 40px;
    padding: 0.625rem 1.5rem;
    border: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}
.md-theme .btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.md-theme .btn:hover::before { opacity: var(--md-state-hover); }
.md-theme .btn-lg { min-height: 48px; padding: 0.75rem 1.75rem; }
.md-theme .btn-sm { min-height: 32px; padding: 0.375rem 1rem; font-size: 0.8125rem; }
.md-theme .btn-primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elev-1);
}
.md-theme .btn-primary:hover,
.md-theme .btn-primary:active,
.md-theme .btn-primary:focus-visible {
    background: var(--ymo-primary-dark);
    border-color: var(--ymo-primary-dark);
    color: var(--md-sys-color-on-primary);
}
.md-theme .btn-outline-primary {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}
.md-theme .btn-outline-primary:hover,
.md-theme .btn-outline-primary:focus-visible {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-color: var(--md-sys-color-primary);
}
.md-theme .btn-outline-secondary {
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    border: 1px solid var(--md-sys-color-outline-variant);
}
.md-theme .btn-outline-secondary:hover {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}
.md-theme .btn-outline-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.md-theme .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}
.md-theme .btn-link { border-radius: var(--md-shape-corner-full); }

/* ---------------- MD3 chips (filter / assist) -------------------------------- */
.md-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0.375rem 1rem;
    border-radius: var(--md-shape-corner-full);
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.md-chip:hover,
.md-chip:focus-visible {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-color: transparent;
    text-decoration: none;
    box-shadow: var(--md-elev-1);
}
.md-chip.is-selected,
.md-chip[aria-current="page"] {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border-color: transparent;
    font-weight: 600;
}

/* ---------------- MD3 typography scale ---------------------------------------- */
.md-headline-lg { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.md-headline-md { font-size: clamp(1.375rem, 2.5vw, 1.75rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.md-title-lg    { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.md-title-md    { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.md-body-lg     { font-size: 1rem; line-height: 1.6; color: var(--md-sys-color-on-surface-variant); }
.md-body-md     { font-size: 0.875rem; line-height: 1.5; color: var(--md-sys-color-on-surface-variant); }
.md-label-lg    { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; }

/* ---------------- MD3 top app bar --------------------------------------------- */
.md-top-app-bar {
    background: var(--md-sys-color-surface);
    box-shadow: var(--md-elev-1);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.md-top-app-bar .nav-link {
    position: relative;
    border-radius: var(--md-shape-corner-full);
    transition: background 0.15s ease, color 0.15s ease;
}
.md-top-app-bar .nav-link:hover,
.md-top-app-bar .nav-link:focus-visible {
    background: rgba(58, 111, 55, var(--md-state-hover));
    text-decoration: none;
}
.md-top-app-bar .nav-link.active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* ---------------- MD3 icon button ------------------------------------------------ */
.md-icon-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--md-shape-corner-full);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.md-icon-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.md-icon-btn:hover::before,
.md-icon-btn:focus-visible::before { opacity: var(--md-state-hover); }
.md-icon-btn:active::before { opacity: var(--md-state-press); }
.md-icon-btn .mi { font-size: 24px; }
.md-icon-btn--on-dark {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    backdrop-filter: blur(4px);
}
.md-icon-btn--on-dark:hover,
.md-icon-btn--on-dark:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* MD navigation drawer */
.md-theme .ymo-drawer {
    background: var(--md-sys-color-surface);
    box-shadow: var(--md-elev-5);
}
.md-theme .ymo-drawer-head {
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.md-theme .ymo-drawer-user {
    background: var(--md-sys-color-primary-container);
}
.md-theme .ymo-drawer-link {
    margin: 0.15rem 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--md-shape-corner-full);
    border-left: 0;
    font-weight: 500;
}
.md-theme .ymo-drawer-link:hover,
.md-theme .ymo-drawer-link:focus-visible {
    background: rgba(58, 111, 55, var(--md-state-hover));
}
.md-theme .ymo-drawer-link.is-active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}
.md-theme .ymo-drawer-foot {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface);
}
.md-theme .ymo-drawer-foot .md-btn { width: 100%; }

/* MD footer */
.md-theme .ymo-footer {
    background: var(--md-sys-color-surface);
    border-top: 1px solid var(--md-sys-color-outline-variant);
    margin-top: 0;
}
.md-theme .ymo-footer h6 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
}
.md-theme .ymo-footer-bottom {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface-variant);
}

/* Use these to upgrade existing .ymo-package-card / .ymo-card without
   touching every view. The package cards now use MD3 elevation tiers. */
.ymo-package-card {
    box-shadow: var(--md-elev-1);
}
.ymo-package-card:hover {
    box-shadow: var(--md-elev-4);
    transform: translateY(-3px);
}

/* ---------------- Floating Action Button (FAB) ----------------------- */
.md-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ymo-primary);
    color: #fff;
    border: 0;
    border-radius: 16px;
    padding: 0.95rem 1.25rem;
    box-shadow: var(--md-elev-3);
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow .2s ease, transform .15s ease, background .15s ease;
}
.md-fab:hover {
    background: var(--ymo-primary-dark);
    color: #fff;
    box-shadow: var(--md-elev-4);
    text-decoration: none;
}
.md-fab:active { transform: scale(0.97); }
.md-fab .mi { color: #fff; }
.md-fab.md-fab--icon-only {
    padding: 1rem;
    border-radius: 50%;
}

/* ---------------- Snackbar ------------------------------------------- */
.md-snackbar-host {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    width: min(92vw, 480px);
}
.md-snackbar {
    pointer-events: auto;
    background: var(--ymo-grey-900);
    color: #fff;
    border-radius: var(--ymo-radius);
    box-shadow: var(--md-elev-4);
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.35;
    animation: md-snackbar-in .25s ease;
}
.md-snackbar.is-leaving { animation: md-snackbar-out .2s ease forwards; }
.md-snackbar .mi { color: rgba(255,255,255,0.85); }
.md-snackbar.is-success .mi { color: #6ee7a4; }
.md-snackbar.is-error   .mi { color: #fca5a5; }
.md-snackbar.is-warning .mi { color: #fde68a; }
.md-snackbar .md-snackbar-msg { flex: 1; }
.md-snackbar .md-snackbar-close {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.85);
    border-radius: 999px;
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
}
.md-snackbar .md-snackbar-close:hover { background: rgba(255,255,255,0.12); }
@keyframes md-snackbar-in  {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes md-snackbar-out {
    to { opacity: 0; transform: translateY(8px); }
}

/* ---------------- Ripple effect on .btn ------------------------------ */
.btn { position: relative; overflow: hidden; }
.md-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: md-ripple-anim .55s linear;
    background: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}
.btn-outline-primary .md-ripple,
.btn-light .md-ripple,
.btn-link .md-ripple,
.btn-outline-secondary .md-ripple {
    background: rgba(58, 111, 55, 0.20);
}
@keyframes md-ripple-anim {
    to { transform: scale(2.2); opacity: 0; }
}

/* ---------------- Status badge — icon-aware -------------------------- */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.badge-status .mi { font-size: 14px; }

/* ---------------- CRM lead chat thread -------------------------------- */
.ymo-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.25rem 0;
}
.ymo-chat-bubble {
    max-width: 85%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--ymo-radius);
    font-size: 0.875rem;
}
.ymo-chat-in {
    align-self: flex-start;
    background: var(--ymo-grey-100);
    border: 1px solid var(--ymo-grey-300);
}
.ymo-chat-out {
    align-self: flex-end;
    background: var(--ymo-primary-soft);
    border: 1px solid rgba(58, 111, 55, 0.25);
}
.ymo-chat-meta {
    margin-top: 0.25rem;
    color: var(--ymo-grey-500);
    font-size: 0.75rem;
}
