/* ย้ายมาจาก <style> ใน resources/views/components/property/navbar.blade.php (2026-12-02, UX audit ความเร็วบนมือถือ):
   เดิมฝังซ้ำใน HTML ทุกหน้า - เป็นไฟล์แล้วเบราว์เซอร์จำไว้ หน้าถัดไปไม่ต้องโหลดซ้ำ แก้ CSS ส่วนนี้ที่ไฟล์นี้ */
    .property-navbar { height: auto; min-height: 60px; padding-block: 0; }

    /* Desktop uses the full co-brand logo; mobile uses the compact mark so the primary action can stay readable. */
    .brand-logo-img {
        height: 48px;
        width: auto;
        max-width: 100%;
    }

    .brand-logo-img--mobile { display: none; }

    :where(.property-navbar, .mobile-bottom-nav, .mobile-account-sheet) .bi {
        display: inline-block;
        font-family: bootstrap-icons;
        line-height: 1;
    }

    :where(.property-navbar, .mobile-bottom-nav, .mobile-account-sheet) .bi::before {
        display: block;
        vertical-align: 0;
    }

    /* Navbar specific refinements for balance */
    .navbar-nav .nav-link {
        color: #374151;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
        color: var(--theme-primary) !important;
    }

    #mainNavbar .navbar-nav .nav-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    #mainNavbar .navbar-nav { gap: 4px; }
    #mainNavbar .navbar-type-toggle {
        border: 0;
        border-radius: 8px;
        background: transparent;
        cursor: pointer;
    }
    #mainNavbar .navbar-type-toggle:hover,
    #mainNavbar .navbar-type-toggle[aria-expanded="true"] { background: var(--theme-primary-light, #e3f3e9); }
    #mainNavbar .navbar-type-toggle::after { display: none; }
    #mainNavbar .navbar-type-chevron { margin-left: 6px; font-size: 12px; }
    #mainNavbar .navbar-type-toggle[aria-expanded="true"] .navbar-type-chevron::before { transform: rotate(180deg); }
    #mainNavbar .nav-link > .bi:not(.navbar-type-chevron),
    #mainNavbar .navbar-action-label > .bi { font-size: 16px; }

    /* The Thai glyphs sit low in the menu link's line box. */
    #mainNavbar .navbar-link-label {
        position: relative;
        inset-block-start: -.75px;
    }

    #mainNavbar .nav-link > :is(.bi-house-door, .bi-house-door-fill, .bi-search) {
        position: relative;
        inset-block-start: -.5px;
    }

    .navbar-brand:focus-visible,
    #mainNavbar .nav-link:focus-visible,
    .property-navbar .navbar-quick-action:focus-visible,
    .navbar-cta .btn:focus-visible,
    .navbar-cta .navbar-menu-avatar:focus-visible {
        outline: 2px solid var(--theme-primary);
        outline-offset: 2px;
    }

    .navbar-nav .nav-link.navbar-action-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .navbar-action-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .navbar-action-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: #dc2626;
        color: #fff;
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 0 0 2px #fff;
    }

    .navbar-nav .nav-link.navbar-action-link:hover .navbar-action-badge,
    .navbar-nav .nav-link.navbar-action-link.active .navbar-action-badge {
        background: var(--theme-primary);
    }
    
    /* จอ 1200-1399px (container 1140px): ไม่ตัดคำ + ลดระยะข้าง
       ไอคอน/ขนาด/ลูกเล่นของเมนูเดสก์ท็อปอยู่ใน assets/css/navbar-desktop.css */
    @media (min-width: 1200px) {
        #mainNavbar .navbar-nav .nav-link,
        #mainNavbar .btn { white-space: nowrap; }
    }
    @media (min-width: 1200px) and (max-width: 1399.98px) {
        .brand-logo-img--desktop { height: 44px; }
    }

    /* Active nav indicator - inset box-shadow: ไม่ layout shift, ไม่ต้องใช้ position/::after */
    @media (min-width: 1200px) {
        .navbar-nav .nav-link.active {
            box-shadow: inset 0 -3px 0 0 var(--theme-primary);
        }
    }
    @media (max-width: 1199.98px) {
        .navbar-nav .nav-link.active {
            box-shadow: inset 3px 0 0 0 var(--theme-primary);
            padding-left: 0.75rem;
        }
    }
    
    .navbar-brand .brand-text span {
        color: var(--theme-primary);
    }

    @media (max-width: 1199.98px) {
        .navbar > .container {
            flex-wrap: nowrap;
            gap: 8px;
        }

        .navbar-brand,
        .navbar-brand .brand-logo {
            min-width: 0;
        }

        .navbar-brand {
            flex: 1 1 auto;
            margin-right: 0;
        }

        .navbar-mobile-quick {
            display: flex;
            align-items: center;
            gap: 6px;
            flex: 0 0 auto;
            min-width: 0;
        }

        .mobile-header-action-btn {
            min-height: 44px;
            padding: 0.35rem 0.55rem;
            font-size: 0.875rem;
            font-weight: 700;
            white-space: nowrap;
        }

        .mobile-header-action-btn i {
            font-size: 16px;
        }

        .mobile-header-icon-btn {
            width: 44px;
            height: 44px;
            padding: 0;
            position: relative;
            border-radius: 12px;
            flex: 0 0 44px;
        }

        .mobile-header-icon-btn i {
            margin-right: 0 !important;
        }

        /* Flat round chat control: same size and softness as the contact (headset) button beside it,
           no raised shadow (the old neumorphic ring looked like a smudge next to flat buttons). */
        .mobile-header-chat-btn {
            border: none;
            border-radius: 50%;
            /* 44px touch target, 32px visible disc: same surface as the headset button beside it */
            padding: 6px;
            background-color: #eef2f0;
            background-clip: content-box;
            color: #3f5448;
            font-size: 18px;
            box-shadow: none;
            transition: background-color 0.16s ease, color 0.16s ease;
        }

        .mobile-header-chat-btn i {
            font-size: 18px;
            line-height: 1;
        }

        .mobile-header-chat-btn:hover,
        .mobile-header-chat-btn:focus-visible,
        .mobile-header-chat-btn:active {
            background-color: var(--theme-primary-light, #e3f3e9);
            color: var(--theme-primary);
        }

        .mobile-header-chat-btn.navbar-chat-btn--unread {
            background-color: var(--theme-primary-light, #e3f3e9);
            color: var(--theme-primary);
        }

        .mobile-header-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            border: 2px solid #fff;
            font-size: 0.54rem;
            font-weight: 800;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 10px rgba(220, 38, 38, .22);
            /* still: a badge that pulses forever makes the header twitch on every page (user, 2026-11-06) */
        }

        .brand-logo-img--desktop { display: none; }

        .brand-logo-img--mobile {
            display: block;
            height: 42px;
            max-width: min(132px, 100%);
            object-fit: contain;
            object-position: left center;
        }
    }

    @media (min-width: 768px) and (max-width: 1199.98px) {
        .property-navbar > .container { max-width: 960px; }
    }

    @media (max-width: 390px) {
        .navbar > .container {
            gap: 6px;
            padding-left: 10px;
            padding-right: 10px;
        }

        .navbar-mobile-quick {
            gap: 4px;
        }

        .brand-logo-img--mobile {
            height: auto;
            max-height: 38px;
            max-width: min(104px, 100%);
        }

        .mobile-header-action-btn i {
            margin-right: 0.2rem !important;
        }
    }

    /* Desktop navbar bell icon - standalone, next to the profile dropdown (ไอคอนแจ้งเตือนเห็นได้ทันทีไม่ต้องเปิด dropdown)
       ghost icon button (ไม่มีเส้นขอบ) ให้กลืนกับ navbar เหมือนไอคอนแจ้งเตือนทั่วไป ไม่ใช่ปุ่ม outline เหมือนปุ่มอื่น ๆ */
    .navbar-cta .navbar-bell-btn {
        width: 36px;
        height: 36px;
        min-height: 36px;
        padding: 0;
        border-radius: 50%;
        border: none;
        background: transparent;
        color: var(--theme-text-body, #475569);
        font-size: 1.1rem;
        flex-shrink: 0;
        box-shadow: none;
        transition: background-color 0.16s ease, color 0.16s ease;
    }

    .navbar-cta .navbar-bell-btn:hover,
    .navbar-cta .navbar-bell-btn:focus-visible,
    .navbar-cta .navbar-bell-btn:active {
        background: var(--theme-primary-light, #e3f3e9);
        color: var(--theme-primary);
        box-shadow: none;
    }

    /* สีอย่างเดียว ไม่ตั้งพื้น: กฎนี้มาทีหลัง :hover ด้วยน้ำหนักเท่ากัน ถ้าตั้ง background จะลบพื้นตอนชี้/กด */
    .navbar-cta .navbar-bell-btn.navbar-bell-btn--unread {
        color: var(--theme-primary);
    }

    /* rings ONCE, and only when a notification arrived since the last page (navbar-desktop.js adds
       --ring by comparing with the count it saw last) - it used to ring every 2.4s forever, and again
       on every reload (user, 2026-11-06: "รีหน้าแล้วไอคอนขยับและกระตุก") */
    .navbar-cta .navbar-bell-btn.navbar-bell-btn--ring i {
        animation: navbar-bell-ring 2.4s ease-in-out 1;
        transform-origin: top center;
    }

    @keyframes navbar-bell-ring {
        0%, 76%, 100% { transform: rotate(0deg); }
        80%           { transform: rotate(14deg); }
        84%           { transform: rotate(-12deg); }
        88%           { transform: rotate(7deg); }
        92%           { transform: rotate(-4deg); }
        96%           { transform: rotate(0deg); }
    }

    /* ไอคอนแชทใช้หน้าตาเดียวกับกระดิ่ง แต่ไม่สั่นแบบกระดิ่ง - มีข้อความใหม่ = ไอคอนเขียว + ตัวเลขสีแดง ไม่มีพื้น
       (เดิมใส่พื้นเขียวอ่อนค้างไว้ = สีเดียวกับตอนชี้/กด ปุ่มเลยดูยุบค้างตลอด, user 2026-12-01); พื้นยังขึ้นตอนชี้/กดตามปกติ */
    .navbar-cta .navbar-chat-btn.navbar-chat-btn--unread {
        color: var(--theme-primary);
    }

    .navbar-bell-badge {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: #dc2626;
        color: #fff;
        border: 2px solid #fff;
        font-size: 0.62rem;
        font-weight: 800;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(220, 38, 38, .3);
        /* still: a badge that pulses forever makes the header twitch on every page (user, 2026-11-06) */
    }

    @media (prefers-reduced-motion: reduce) {
        .navbar-cta .navbar-bell-btn.navbar-bell-btn--ring i { animation: none; }
        .navbar-bell-badge,
        .mobile-header-badge { animation: none; }
    }

    /* Navbar Profile Image - scoped to navbar only */
    .navbar-cta .navbar-profile-img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        display: inline-block;
    }

    /* Navbar Profile Icon - ให้มีขนาดเท่ากับรูปโปรไฟล์ */
    .navbar-cta .dropdown-toggle .bi-person-circle {
        width: 28px;
        height: 28px;
        font-size: 28px;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* ตัวแทนที่ยังไม่มีรูป: วงกลมเขียวพร้อมตัวอักษรแรกของชื่อ (เหมือนการ์ดที่ลูกค้าเห็นใน /agent/profile) */
    .navbar-cta .navbar-profile-initial {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(145deg, #0B7A46 0%, #035432 100%);
        color: #fff;
        font-family: var(--theme-font-family-heading, 'Prompt', 'Segoe UI', sans-serif);
        font-size: .95rem;
        font-weight: 600;
        line-height: 1;
        padding-bottom: 0.14em; /* ตัวอักษรไทยนั่งต่ำกว่ากลางกล่องบรรทัด ยกขึ้นให้อยู่กลางวง */
    }

    /* ปรับ alignment ของปุ่มใน navbar */
    .navbar-cta .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.5;
        min-height: 44px;
        padding-top: 0.375rem;
        padding-bottom: 0.375rem;
    }

    /* later than the generic ".navbar-cta .btn" 44px floor above, so the round icon stays a circle (36 x 36) */
    .navbar-cta > .navbar-bell-btn { align-self: center; width: 36px; height: 36px; min-height: 36px; padding: 0; }
    .navbar-cta > .navbar-bell-btn > .bi { font-size: 18px; }

    .property-navbar .navbar-quick-action {
        --navbar-action-size: 36px;
        --navbar-action-inset: 2px;
        --navbar-action-fill: transparent;
        position: relative;
        isolation: isolate;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: var(--navbar-action-size);
        padding: var(--navbar-action-inset) 9px;
        border: 0;
        border-radius: 8px;
        background-color: transparent;
        color: var(--theme-text-body);
        font-size: .875rem;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
    }

    /* Keep the rounded surface compact inside the larger touch target. */
    .property-navbar .navbar-quick-action::before {
        content: '';
        position: absolute;
        inset: var(--navbar-action-inset) var(--navbar-action-inline-inset, 0px);
        z-index: -1;
        border-radius: inherit;
        background-color: var(--navbar-action-fill);
        pointer-events: none;
        transition: background-color .15s ease;
    }

    @media (max-width: 1199.98px), (pointer: coarse) {
        .property-navbar .navbar-quick-action {
            --navbar-action-size: 44px;
            --navbar-action-inset: 6px;
        }
    }

    .property-navbar .navbar-quick-action:is(:hover, :active, [aria-expanded="true"]) {
        --navbar-action-fill: var(--theme-primary-light);
        color: var(--theme-primary);
    }

    .property-navbar .navbar-quick-action:focus { box-shadow: none; }

    .property-navbar .navbar-quick-action--post {
        --navbar-action-fill: var(--theme-primary);
        color: #fff;
        font-weight: 600;
    }

    .property-navbar .navbar-quick-action--post:is(:hover, :active) {
        --navbar-action-fill: var(--theme-primary-hover);
        color: #fff;
    }

    .property-navbar .navbar-quick-action > .bi:not(.bi-person-circle, .navbar-account-chevron) { font-size: 16px; }
    /* ไอคอนกับชื่อปุ่มไม่หดเข้าหากัน: กล่องไอคอนกว้าง 1em ของตัวมันเองเสมอ (มือถือตัวหนังสือใหญ่ใน LINE วง + ทับตัว "ล" ของ ลงประกาศ, user 2026-11-13) */
    .property-navbar .navbar-quick-action > .bi { flex: none; min-width: 1em; }
    .property-navbar .navbar-quick-action > .navbar-quick-label { flex: none; }
    /* The compact buttons use a different line box from the center links. */
    .navbar-quick-action > :is(.navbar-quick-label, .navbar-account-name) {
        position: relative;
        inset-block-start: 1px;
    }
    .navbar-quick-action > .bi-person-plus {
        position: relative;
        inset-block-start: -.5px;
    }
    @media (max-width: 767.98px) and (pointer: coarse) {
        .navbar-mobile-quick .navbar-quick-action--post > .bi-plus-circle {
            position: relative;
            inset-block-start: .5px;
        }
    }
    .navbar-cta .navbar-account-toggle { padding-inline: 7px; }
    .navbar-cta .navbar-account-toggle::after { display: none; }
    .navbar-cta .navbar-account-toggle > .navbar-account-chevron { font-size: 12px; }
    .navbar-cta .navbar-account-toggle[aria-expanded="true"] .navbar-account-chevron { transform: rotate(180deg); }
    /* One line, never two: a long company name used to wrap into a tall block that pushed the whole header
       tight. The full name is in the button's title/aria-label and at the top of the opened menu. */
    .navbar-cta .navbar-account-name {
        max-width: 9.5rem;
        line-height: 1.4;
        text-align: start;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    @media (max-width: 1399.98px) {
        .navbar-cta .navbar-account-name { max-width: 6.5rem; }
    }

    @media (prefers-reduced-motion: reduce) {
        .property-navbar .navbar-quick-action,
        .property-navbar .navbar-quick-action::before { transition: none; }
    }

    /* ── Desktop account dropdown: profile header + grouped, scrollable menu ──
       Ports the mobile account-sheet's pattern (profile card, section labels,
       icon chips, current-page highlight, bounded height) into the floating
       Bootstrap dropdown. Namespaced navbar-menu-* on purpose - NOT the same
       classes as .mmenu-item/.mmenu-icon/etc., because mobile's touch-feedback
       JS does querySelectorAll('.mmenu-item') and would pick up these nodes
       too if the class were shared. .mmenu-count-badge/.mmenu-subtext/.mmenu-dot
       are still reused as-is (already used by both desktop and mobile today). */
    .navbar-cta .navbar-menu {
        width: 480px;
        max-width: calc(100vw - 24px);
        /* เผื่อพื้นที่จาก navbar (~60px) + ระยะขอบล่างเล็กน้อย ไม่ใช่ค่าคงที่ตายตัว
           ค่าคงที่เดิม (560px) เตี้ยเกินไปสำหรับหน้าจอทั่วไป ทำให้บัญชีที่มีเมนูแค่
           ระดับกลาง ๆ ก็ยังต้องสกอลทั้งที่จริงพื้นที่จอเหลือพอ */
        max-height: calc(100vh - 96px);
        max-height: calc(100dvh - 96px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        animation: navbarMenuIn 0.18s ease-out;
        /* การ์ดลอยโค้งมนขึ้น + เงานุ่มหลายชั้นแทน shadow-sm เหลี่ยม ๆ ของ Bootstrap
           ให้ความรู้สึกทันสมัยแบบแอปมือถือมากกว่ากรอบเมนูเว็บทั่วไป */
        border-radius: 20px;
        border-color: #dfece5;
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04), 0 16px 40px -12px rgba(3, 84, 50, 0.22);
        scrollbar-width: thin;
        scrollbar-color: #bfe0cc transparent;
    }

    .navbar-cta .navbar-menu::-webkit-scrollbar { width: 6px; }
    .navbar-cta .navbar-menu::-webkit-scrollbar-track { background: transparent; }
    .navbar-cta .navbar-menu::-webkit-scrollbar-thumb { background: #bfe0cc; border-radius: 999px; }
    .navbar-cta .navbar-menu::-webkit-scrollbar-thumb:hover { background: var(--theme-primary); }

    /* จัดรายการเมนูเป็น 2 คอลัมน์เพื่อลดความสูงโดยรวมของ dropdown ลงเกือบครึ่ง
       (เมนูโปรไฟล์เดิมยาวเป็นแถวเดียวจนต้องสกอลตลอด) การ์ดโปรไฟล์/หัวข้อกลุ่ม
       (.navbar-menu-section)/เส้นคั่น/ปุ่มออกจากระบบ ยังกินเต็มความกว้างเสมอ -
       เลือกด้วย :has() จาก <li> แม่โดยตรง ไม่ต้องแก้ class ทีละจุดในเทมเพลต
       ทั้งชุดอยู่ใน @supports selector(:has(*)) - iOS < 15.4, Chrome < 105, Firefox ESR 115 ไม่มี :has()
       ถ้าเปิดกริดโดยไม่มีกฎเต็มแถว การ์ดโปรไฟล์/หัวข้อ/ปุ่มออกจากระบบจะถูกบีบเหลือครึ่งคอลัมน์ จึงเป็นคอลัมน์เดียวแทน */
    @supports selector(:has(*)) {
        .navbar-cta .navbar-menu.show {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            column-gap: 6px;
            row-gap: 2px;
            align-content: start;
            align-items: start;
        }

        .navbar-cta .navbar-menu > li:has(.navbar-menu-profile),
        .navbar-cta .navbar-menu > li:has(.navbar-menu-section),
        .navbar-cta .navbar-menu > li:has(.navbar-menu-divider),
        .navbar-cta .navbar-menu > li:has(.navbar-menu-item--danger) {
            grid-column: 1 / -1;
        }
    }

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

    @media (prefers-reduced-motion: reduce) {
        .navbar-cta .navbar-menu { animation: none; }
    }

    .navbar-cta .navbar-menu-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        margin: 2px 2px 8px;
        background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
        border-radius: 16px;
        border: 1px solid #c8ead6;
    }

    /* คำทักทายเล็ก ๆ เหนือชื่อ ใส่ผ่าน ::before ล้วน ๆ (ไม่ต้องแก้ Blade)
       ให้การ์ดโปรไฟล์รู้สึกเหมือนทักทายผู้ใช้แทนที่จะโชว์แค่ชื่อเฉย ๆ */
    .navbar-cta .navbar-menu-profile-name::before {
        content: "ยินดีต้อนรับ 👋";
        display: block;
        font-size: 0.64rem;
        font-weight: 700;
        color: var(--theme-primary);
        letter-spacing: 0.01em;
        margin-bottom: 2px;
    }

    .navbar-cta .navbar-menu-avatar {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        flex-shrink: 0;
        overflow: hidden;
        border: 2px solid #fff;
        box-shadow: 0 0 0 3px rgba(3, 84, 50, 0.18);
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--theme-primary), #035432);
    }

    .navbar-cta button.navbar-menu-avatar { padding: 0; }

    .navbar-cta .navbar-menu-avatar img {
        width: 46px;
        height: 46px;
        object-fit: cover;
        border-radius: 50%;
    }

    .navbar-cta .navbar-menu-avatar-initial {
        color: #fff;
        font-family: var(--theme-font-family-heading, 'Prompt', 'Segoe UI', sans-serif);
        font-size: 1.05rem;
        font-weight: 600;
        line-height: 1;
        transform: translateY(-0.03em);
    }

    .navbar-cta .navbar-menu-profile-info {
        flex: 1;
        min-width: 0;
    }

    .navbar-menu-profile-role {
        align-self: flex-start;
        flex-shrink: 0;
        margin-left: auto;
    }

    .navbar-cta .navbar-menu-profile-name {
        font-weight: 800;
        font-size: 0.92rem;
        color: #111827;
        overflow-wrap: anywhere;
        margin-bottom: 3px;
    }

    /* เมตาเล็ก ๆ ใต้ชื่อ (รหัสตัวแทน) - แยกจาก .mmenu-subtext เพราะสีของ mmenu-subtext
       มีความหมาย "นัดถัดไป" อยู่แล้วในที่อื่นของไฟล์นี้ ใช้ปนกันจะสับสน */
    .navbar-cta .navbar-menu-profile-meta {
        font-size: 0.7rem;
        font-weight: 600;
        color: #6b7280;
        margin-top: 2px;
    }

    .navbar-cta .navbar-menu-profile-bank {
        margin-top: 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-cta .navbar-menu-profile-bank .bi { margin-right: 4px; }

    /* ไม่มีเส้นคั่นก่อน section label เหล่านี้โดยตั้งใจ (ตัดออกแล้ว) - ให้ระยะห่าง
       ด้านบน + ตัวพิมพ์ใหญ่ทำหน้าที่แบ่งหมวดแทน เส้น+ป้ายพร้อมกันดูรกเกินไป
       (เก็บเส้นคั่นไว้เฉพาะก่อนออกจากระบบ ซึ่งควรแยกให้เห็นชัดว่าเป็นคนละกลุ่ม) */
    .navbar-cta .navbar-menu-section {
        font-size: 0.68rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #94a3b8;
        padding: 16px 8px 6px;
    }

    .navbar-cta .navbar-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 40px;
        padding: 6px 8px;
        border-radius: 10px;
        font-size: 0.85rem;
        font-weight: 600;
        color: #1f2937;
        transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    }

    .navbar-cta .dropdown-item.navbar-menu-item:hover,
    .navbar-cta .dropdown-item.navbar-menu-item:focus {
        background-color: #edf8f2;
        color: #023F25;
        box-shadow: inset 0 0 0 1px rgba(3, 84, 50, 0.1);
    }

    .navbar-cta .dropdown-item.navbar-menu-item:hover .navbar-menu-icon,
    .navbar-cta .dropdown-item.navbar-menu-item:focus .navbar-menu-icon {
        box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1);
        transform: translateY(-1px);
    }

    @media (prefers-reduced-motion: reduce) {
        .navbar-cta .navbar-menu-item,
        .navbar-cta .navbar-menu-icon { transition: none; }
        .navbar-cta .dropdown-item.navbar-menu-item:hover,
        .navbar-cta .dropdown-item.navbar-menu-item:focus { transform: none; }
        .navbar-cta .dropdown-item.navbar-menu-item:hover .navbar-menu-icon,
        .navbar-cta .dropdown-item.navbar-menu-item:focus .navbar-menu-icon { transform: none; }
    }

    /* สถานะ "อยู่หน้านี้" - ตั้งชื่อแยกจาก .active ของ Bootstrap โดยตั้งใจ เพราะ
       theme-system.css ผูก .dropdown-item.active ไว้กับพื้นเขียวทึบ/ตัวหนังสือขาว
       ซึ่งหนักเกินไปเทียบกับ .mmenu-item--current ของมือถือที่นุ่มนวลกว่า */
    .navbar-cta .dropdown-item.navbar-menu-item--current {
        background-color: #E3F3E9;
        color: #023F25;
        box-shadow: inset 0 0 0 1px #bfe5cf;
    }
    .navbar-cta .dropdown-item.navbar-menu-item--current .navbar-menu-icon {
        background: var(--theme-primary);
        color: #fff;
    }
    .navbar-cta .dropdown-item.navbar-menu-item--current:hover,
    .navbar-cta .dropdown-item.navbar-menu-item--current:focus {
        background-color: #dff2e8;
        color: #023F25;
    }

    .navbar-cta .dropdown-item.navbar-menu-item--danger:hover,
    .navbar-cta .dropdown-item.navbar-menu-item--danger:focus {
        background-color: #fef2f2;
    }

    .navbar-cta .navbar-menu-icon {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        background: #f1f5f9;
        color: #64748b;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .navbar-cta .navbar-menu-icon--primary { background: #dcfce7; color: var(--theme-primary); }
    .navbar-cta .navbar-menu-icon--success { background: #e0f2fe; color: #0369a1; }
    .navbar-cta .navbar-menu-icon--danger  { background: #fee2e2; color: #dc2626; }
    .navbar-cta .navbar-menu-icon > .bi-person-check { position: relative; top: -1px; }

    /* ไอคอนแต่ละหมวดคนละสีพาสเทล (สไตล์ Notion/Linear) แทนสีเทาเดียวกันหมด -
       ให้ตากวาดหาเมนูที่ต้องการเจอเร็วขึ้น และรู้สึกมีชีวิตชีวา/เป็นมิตรกว่าเดิม
       เลือกจากไอคอน Bootstrap Icons ด้านในด้วย :has() ไม่ต้องแก้ class ทีละจุดใน Blade
       (สถานะ hover/current ด้านบนมี specificity สูงกว่าอยู่แล้ว จึงยังทับสีเหล่านี้ได้ตามปกติ) */
    .navbar-cta .navbar-menu-icon:has(> .bi-heart) { background: #ffe4ec; color: #db2777; }
    .navbar-cta .navbar-menu-icon:has(> .bi-people),
    .navbar-cta .navbar-menu-icon:has(> .bi-person) { background: #e0e7ff; color: #4338ca; }
    .navbar-cta .navbar-menu-icon:has(> .bi-chat-square-text) { background: #f3e8ff; color: #7c3aed; }
    .navbar-cta .navbar-menu-icon:has(> .bi-calendar2-week),
    .navbar-cta .navbar-menu-icon:has(> .bi-calendar-check) { background: #fef3c7; color: #b45309; }
    .navbar-cta .navbar-menu-icon:has(> .bi-credit-card),
    .navbar-cta .navbar-menu-icon:has(> .bi-receipt-cutoff),
    .navbar-cta .navbar-menu-icon:has(> .bi-list-check),
    .navbar-cta .navbar-menu-icon:has(> .bi-building) { background: #ccfbf1; color: #0f766e; }
    .navbar-cta .navbar-menu-icon:has(> .bi-tools) { background: #ffedd5; color: #c2410c; }

    .navbar-cta .navbar-menu-label {
        flex: 1;
        min-width: 0;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-cta .navbar-menu-divider {
        margin: 4px 0;
    }

    /* เจ้าของทรัพย์: 2 เมนูหลัก (ทรัพย์ของฉัน / วิเคราะห์พอร์ตทรัพย์) เป็นการ์ดขาวนุ่มๆ ใหญ่กว่าเมนูอื่นนิดเดียว
       (user, 2026-11-25: ครั้งแรกเขียวทึบ "เด่นไปและไม่เฟรนลี่" -> ใช้ขอบบาง เงานุ่ม ไอคอนพาสเทล ข้อความรองสีเทา)
       หน้าปัจจุบัน = ขอบเขียว + พื้นมิ้นต์อ่อน (ไอคอนเขียวทึบตามกติกา --current เดิม) ไม่ใช้แถบสีด้านซ้าย */
    .navbar-cta .dropdown-item.navbar-menu-item--feature {
        position: relative;
        align-items: center;
        gap: 10px;
        min-height: 52px;
        padding: 8px 10px;
        margin-bottom: 4px;
        border-radius: 12px;
        background: #fff;
        box-shadow: inset 0 0 0 1px #e3ece7, 0 2px 8px rgba(15, 23, 42, 0.05);
        color: #1f2937;
        white-space: normal;
    }
    .navbar-cta .navbar-menu-item--feature .navbar-menu-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 16px;
    }
    .navbar-cta .navbar-menu-item--feature .navbar-menu-icon .bi { font-family: bootstrap-icons; line-height: 1; }
    .navbar-cta .navbar-menu-item--feature .navbar-menu-icon--sky { background: #e0f2fe; color: #0369a1; }
    .navbar-cta .navbar-menu-item--feature .navbar-menu-label {
        flex: 1;
        min-width: 0;
        font-size: 0.86rem;
        font-weight: 700;
        line-height: 1.25;
    }
    .navbar-cta .navbar-feature-sub {
        display: block;
        margin-top: 2px;
        font-size: 0.72rem;
        font-weight: 500;
        color: #64748b;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .navbar-cta .navbar-menu-item--feature .mmenu-count-badge { margin-left: 2px; }
    .navbar-cta .dropdown-item.navbar-menu-item--feature:hover,
    .navbar-cta .dropdown-item.navbar-menu-item--feature:focus {
        background: #fff;
        box-shadow: inset 0 0 0 1px #bfe5cf, 0 6px 14px rgba(15, 23, 42, 0.09);
        color: #023F25;
    }
    .navbar-cta .dropdown-item.navbar-menu-item--feature.navbar-menu-item--current {
        background: #f1faf5;
        box-shadow: inset 0 0 0 1.5px #86d0a6, 0 2px 8px rgba(3, 84, 50, 0.08);
        color: #023F25;
    }

    /* Navbar Image Popup Modal */
    .navbar-image-popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.85);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .navbar-image-popup-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-image-popup-content {
        max-width: 90%;
        max-height: 90%;
        position: relative;
    }
    
    .navbar-image-popup-content img {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-image-popup-close {
        position: absolute;
        top: -40px;
        right: 0;
        color: #fff;
        font-size: 2rem;
        cursor: pointer;
        opacity: 0.8;
        transition: opacity 0.2s;
    }
    
    .navbar-image-popup-close:hover {
        opacity: 1;
    }

    .form-hint {
        font-size: 0.75rem;
        color: #9ca3af;
        margin-top: 4px;
    }

    /* Password strength indicator */
    .pw-req {
        line-height: 1.6;
        transition: color 0.2s;
        color: #6b7280;
    }
    .pw-req.valid {
        color: #16a34a;
    }
    .pw-req .bi-check-circle-fill { color: #16a34a; }
    .pw-req .bi-x-circle-fill { color: #dc2626; }

    /* ── Forgot Password Modal ──────────────────────────────────────────── */
    .fp-modal-card { border-radius: 18px; overflow: hidden; }
    .fp-header-strip {
        position: relative;
        background: linear-gradient(135deg, #035432 0%, #2d6a2d 100%);
        padding: 28px 24px 22px;
        text-align: center;
        color: #fff;
    }
    .fp-close-x {
        position: absolute; top: 12px; right: 14px;
        background: rgba(255,255,255,.18); border: none; color: #fff;
        width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        font-size: .85rem; transition: background .2s; line-height: 1;
    }
    .fp-close-x:hover { background: rgba(255,255,255,.35); }
    .fp-hdr-icon {
        width: 58px; height: 58px; border-radius: 50%;
        background: rgba(255,255,255,.2);
        display: flex; align-items: center; justify-content: center;
        margin: 0 auto 10px; font-size: 1.55rem;
        transition: all .3s;
    }
    .fp-hdr-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 3px; }
    .fp-hdr-sub { font-size: .8rem; opacity: .88; margin: 0; }
    .fp-step { animation: fpFadeIn .22s ease; }
    @keyframes fpFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
    .fp-email-chip {
        display: inline-block;
        background: #f0fdf4; border: 1.5px solid #86efac;
        border-radius: 999px; padding: 5px 18px;
        font-weight: 600; color: #15803d;
        font-size: .9rem; letter-spacing: .03em; word-break: break-all;
    }
    .fp-info-strip {
        font-size: .77rem; color: #6b7280;
        display: flex; align-items: center; justify-content: center; gap: 6px;
    }
    .fp-success-icon-wrap {
        width: 64px; height: 64px; border-radius: 50%;
        background: linear-gradient(135deg,#dcfce7,#bbf7d0);
        display: flex; align-items: center; justify-content: center; margin: 0 auto;
    }
    .fp-warn-icon-wrap {
        width: 64px; height: 64px; border-radius: 50%;
        background: linear-gradient(135deg,#fef9c3,#fde68a);
        display: flex; align-items: center; justify-content: center; margin: 0 auto;
    }
    .fp-id-input { border-color: #d1d5db !important; border-left: none !important; }
    .fp-id-input:focus { border-color: #035432 !important; box-shadow: 0 0 0 .2rem rgba(3,84,50,.15) !important; }
    .fp-id-prepend {
        background: #f9fafb !important; border-color: #d1d5db !important;
        border-right: none !important; color: #9ca3af;
    }

    /* ── Mobile Bottom Navigation Bar ───────────────────────────────── */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
        z-index: 1029;
        display: flex;
        align-items: stretch;
        padding: 0 4px env(safe-area-inset-bottom, 0px); /* ชื่อช่องริมไม่ชิดขอบจอ */
    }

    /* ชื่อเมนูบรรทัดเดียวเสมอ ไอคอนแถวเดียวกัน (user 2026-11-13: มือถือที่ตั้งตัวหนังสือใหญ่ / LINE ชื่อเมนูตัดเป็น "หน้า/แรก" ไอคอนเบี้ยวไม่ตรงกัน)
       fitBottomNav() (สคริปต์ใต้แถบนี้) วัดของจริง: ช่องเท่ากันพอ = ช่องเท่ากัน, ไม่พอ = .mobile-bottom-nav--fluid ช่องกว้างตามชื่อ
       แล้ว --bnav-fit ย่อไอคอนกับชื่อพร้อมกันเท่าที่ยังเกิน (กว้าง/สูง) แถบสูง 60px เท่าเดิม (หน้าอื่นวางปุ่มลอยเหนือแถบด้วยค่า 60px)
       จอปกติชื่อพอดีช่อง = ไม่ย่อ หน้าตาเหมือนเดิม */
    .mobile-bottom-nav-item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        color: #475569;
        text-decoration: none;
        gap: 2px;
        padding: 6px 4px; /* ชื่อสองช่องติดกันห่างกันอย่างน้อย 8px ไม่อ่านเป็นคำเดียว */
        min-width: 0;
        min-height: 44px;
        font-size: calc(0.75rem * var(--bnav-fit, 1));
        font-weight: 600;
        line-height: 1.2;
        transition: color 0.2s, background 0.15s;
        border: none;
        background: none;
        cursor: pointer;
        border-radius: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav-item i {
        font-size: calc(22px * var(--bnav-fit, 1));
    }

    .mobile-bottom-nav-item > :first-child {
        display: inline-flex;
        flex: none;
        align-items: center;
        justify-content: center;
        min-height: 24px;
    }

    .mobile-bottom-nav--fluid .mobile-bottom-nav-item { flex: 1 1 auto; }

    /* ชื่อเมนู: บรรทัดเดียว ไม่ตัดคำ (กันพลาด: ถ้าย่อจนสุดแล้วยังไม่พอ ตัดท้ายด้วย … แทนการล้นไปทับช่องข้าง)
       clip แค่แนวนอน - สระบน/วรรณยุกต์ไม่โดนตัดหัว */
    .mobile-bottom-nav .bnav-label {
        display: block;
        max-width: 100%;
        white-space: nowrap;
        overflow-x: clip;
        text-overflow: ellipsis;
    }

    .mobile-bottom-nav-item .mobile-bottom-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        object-fit: cover;
        border: 1.5px solid #e5e7eb;
    }

    .mobile-bottom-nav-item.active {
        color: var(--theme-primary);
    }

    .mobile-bottom-nav-item--register {
        color: var(--theme-primary);
    }

    .mobile-bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 28px;
        height: 3px;
        background: var(--theme-primary);
        border-radius: 0 0 4px 4px;
    }

    .mobile-bottom-nav-item.active .mobile-bottom-avatar {
        border-color: var(--theme-primary);
    }

    .mobile-bottom-nav-item:active {
        background: #f9fafb;
        color: var(--theme-primary);
    }

    .mobile-bottom-nav-item:focus-visible {
        outline: 2px solid var(--theme-primary);
        outline-offset: -3px;
        color: var(--theme-primary);
    }

    /* Body padding so content isn't hidden behind fixed bottom nav */
    @media (max-width: 1199.98px) {
        body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; }
    }

    /* ── Mobile account sheet ─────── */
    .mobile-account-sheet {
        height: min(84vh, 720px); /* fallback: dvh ไม่มีใน iOS < 15.4 / Chrome < 108 (ไม่งั้นได้ 30vh ของ Bootstrap) */
        height: min(84dvh, 720px);
        border-radius: 24px 24px 0 0;
        border: 0;
        background: #f6f8fb;
        box-shadow: 0 -22px 48px rgba(15, 23, 42, 0.2);
        overflow: hidden;
    }

    .mobile-account-sheet .offcanvas-header {
        position: sticky;
        top: 0;
        z-index: 2;
        align-items: center;
        padding: 22px 16px 12px;
        border-bottom: 1px solid #e8eef5;
        background: rgba(255,255,255,0.96);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    }

    .mobile-account-sheet .offcanvas-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: #cbd5e1;
    }

    .mobile-account-sheet-title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        color: #111827;
        font-size: 1.04rem;
        font-weight: 800;
        letter-spacing: 0;
    }

    .mobile-account-sheet-title i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 10px;
        background: #e7f5ed;
        color: var(--theme-primary);
        font-size: 1rem;
    }

    .mobile-account-sheet .btn-close {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        background-color: #f1f5f9;
        opacity: 1;
    }

    .mobile-account-sheet .offcanvas-body {
        padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* User name row - single line, no avatar */
    .mmenu-name-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        margin: 4px 0 2px;
    }

    .mmenu-user-name {
        font-weight: 700;
        font-size: 0.88rem;
        color: #111827;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }

    .mmenu-badge {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        font-size: 0.65rem;
        font-weight: 600;
        padding: 1px 8px;
        border-radius: 999px;
    }

    .mmenu-badge--agent { background: #fef9c3; color: #92400e; border: 1px solid #fcd34d; }
    .mmenu-badge--member { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

    /* ── Payment-action notification - เตือนลูกค้าว่ามีรายการต้องชำระเงิน (เมนู "ชำระเงิน") ──────
       ไอคอนสีเดียวกับเมนูอื่น ๆ เสมอ, แจ้งเตือนด้วยวงกลมแดงมุมบนขวาแบบ Shopee แทนสีส้มกระพริบ ── */
    .bnav-icon-wrap {
        position: relative;
        min-width: 28px;
    }

    /* วงกลม badge เล็ก (11px) ชิดมุมขวาบนของไอคอนพอดี (right:0 ไม่ยื่นล้ำออกไปนอกกรอบไอคอน) จึงไม่ต้องกันระยะเพิ่มให้
       ข้อความที่ตามมาอีก (ข้อความชิดไอคอนแบบปกติเหมือนเมนูอื่นที่ไม่มี badge ได้เลย) - เดิมเคย right:-9px/-6px แล้วยื่นทับ
       ตัวอักษรแรกของข้อความ ("ท") เพราะข้อความเริ่มติดขอบขวาของ wrap ทันทีโดยไม่มีช่องว่างคั่น */
    .bnav-badge {
        position: absolute;
        top: -5px;
        right: 0;
        min-width: 11px;
        height: 11px;
        padding: 0 2px;
        border-radius: 999px;
        background: #dc2626;
        color: #fff;
        font-size: 0.44rem;
        font-weight: 700;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 0 1.5px #fff;
    }

    .bnav-badge--count {
        top: -3px;
        right: -9px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 0.54rem;
        font-weight: 800;
        box-shadow: 0 0 0 2px #fff;
    }

    .mmenu-count-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: #dc2626;
        color: #fff;
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
        margin-left: 6px;
        flex-shrink: 0;
        /* still: a badge that pulses forever makes the header twitch on every page (user, 2026-11-06) */
    }

    .mmenu-item:hover .mmenu-count-badge,
    .mmenu-item:active .mmenu-count-badge,
    .mmenu-item--current .mmenu-count-badge {
        background: #dc2626;
        color: #fff;
    }

    /* จุดแดงเมนู "นัดชมทรัพย์ของฉัน" - ใช้จุดแทนตัวเลข เพราะสิ่งที่ต้องบอกคือ "มีนัดที่ยังไม่ถึงกำหนด"
       ไม่ใช่จำนวนรายการ (ลูกค้ามีนัดพร้อมกันได้ไม่กี่รายการอยู่แล้ว) */
    .mmenu-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #dc2626;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
        flex-shrink: 0;
        margin-left: 6px;
        /* still: a badge that pulses forever makes the header twitch on every page (user, 2026-11-06) */
    }

    .mmenu-item:hover .mmenu-dot,
    .mmenu-item:active .mmenu-dot,
    .mmenu-item--current .mmenu-dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); }

    @media (prefers-reduced-motion: reduce) {
        .mmenu-dot { animation: none; }
    }

    /* วัน-เวลานัดครั้งถัดไป ใต้ชื่อเมนู - เห็นได้ตั้งแต่ยังไม่กดเข้าไปในหน้า */
    .mmenu-subtext {
        display: block;
        font-size: 0.7rem;
        font-weight: 600;
        color: #16a34a;
        line-height: 1.3;
        margin-top: 1px;
    }
    .mmenu-subtext--wait { color: #c2410c; }
    .mmenu-item:hover .mmenu-subtext,
    .mmenu-item:active .mmenu-subtext,
    .mmenu-item--current .mmenu-subtext { color: #047857; }
    .mmenu-item:hover .mmenu-subtext--wait,
    .mmenu-item:active .mmenu-subtext--wait,
    .mmenu-item--current .mmenu-subtext--wait { color: #b45309; }

    /* ใน dropdown เดสก์ท็อป ข้อความรองต้องเยื้องให้ตรงกับข้อความหลัก (หลังไอคอน)
       และต้องไม่ล้นบรรทัดในกล่องความกว้างคงที่ของ .navbar-menu */
    .dropdown-item .mmenu-subtext {
        padding-left: 1.55rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* .navbar-menu-item ของใหม่ให้ label กับ subtext อยู่ใน .navbar-menu-label
       เดียวกัน ซึ่งเริ่มชิดซ้ายหลังไอคอนอยู่แล้ว (ไอคอนเป็นกล่องแยกด้วย flex)
       ค่า padding-left ของ compat rule ด้านบนเลยไม่จำเป็นและทำให้วันที่เยื้องผิด
       ที่ - ยกเลิกเฉพาะในบริบทนี้ */
    .navbar-cta .navbar-menu-label .mmenu-subtext {
        padding-left: 0;
    }

    /* Menu items - app-style grouped rows */
    .mmenu-list {
        margin-top: 10px;
        padding: 6px;
        background: #fff;
        border: 1px solid #e8eef5;
        border-radius: 18px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    }

    .mmenu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 10px;
        border-radius: 13px;
        text-decoration: none;
        color: #1f2937;
        font-size: 0.92rem;
        font-weight: 700;
        min-height: 52px;
        margin: 2px 0;
        transition: background 0.14s, color 0.14s, transform 0.1s, box-shadow 0.14s;
        -webkit-tap-highlight-color: transparent;
    }

    .mmenu-item:hover, .mmenu-item:active {
        background: #eef8f2;
        color: var(--theme-primary);
        text-decoration: none;
    }

    .mmenu-item:active {
        transform: scale(0.98);
    }

    .mmenu-item:hover .mmenu-arrow, .mmenu-item:active .mmenu-arrow { color: var(--theme-primary); opacity: 0.9; }

    .mmenu-item--highlight:hover, .mmenu-item--highlight:active { background: var(--theme-primary); color: #fff; }

    .mmenu-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        color: #64748b;
        flex-shrink: 0;
        transition: background 0.12s, color 0.12s;
    }

    .mmenu-icon--primary { background: #dcfce7; color: var(--theme-primary); }
    .mmenu-icon--success { background: #e0f2fe; color: #0369a1; }

    .mmenu-item:hover .mmenu-icon,
    .mmenu-item:active .mmenu-icon { background: #dcfce7; color: var(--theme-primary); }

    .mmenu-label {
        flex: 1;
        min-width: 0;
        line-height: 1.35;
    }

    .mmenu-arrow { color: #cbd5e1; font-size: 0.78rem; flex-shrink: 0; }

    .mmenu-item--current {
        background: #e7f5ed;
        color: var(--theme-primary);
        box-shadow: inset 0 0 0 1px #bfe5cf;
    }
    .mmenu-item--current .mmenu-icon { background: var(--theme-primary); color: #fff; }
    .mmenu-item--current .mmenu-arrow { color: var(--theme-primary); opacity: 0.9; }
    .mmenu-item--current:hover, .mmenu-item--current:active { background: #dff2e8; color: var(--theme-primary); }
    .mmenu-item--current:hover .mmenu-icon, .mmenu-item--current:active .mmenu-icon { background: var(--theme-primary-hover); color: #fff; }

    /* เจ้าของทรัพย์: 2 เมนูหลักเป็นการ์ดคู่ (ดูเหตุผลที่ .navbar-menu-item--feature) - มือถือเป็นกระเบื้อง 2 ช่องเท่ากัน */
    .mmenu-feature-pair {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 4px 0 8px;
    }
    .mmenu-feature-pair .mmenu-item--feature {
        position: relative;
        align-items: center;
        gap: 10px;
        min-height: 60px;
        margin: 0;
        padding: 10px;
        border-radius: 16px;
        background: #fff;
        box-shadow: inset 0 0 0 1px #e3ece7, 0 3px 10px rgba(15, 23, 42, 0.06);
        color: #1f2937;
    }
    .mmenu-item--feature .mmenu-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 18px;
    }
    .mmenu-item--feature .mmenu-icon--sky { background: #e0f2fe; color: #0369a1; }
    .mmenu-item--feature .mmenu-label {
        flex: 1;
        min-width: 0;
        font-size: 0.88rem;
        font-weight: 700;
        line-height: 1.25;
    }
    .mmenu-feature-sub {
        display: block;
        margin-top: 2px;
        font-size: 0.74rem;
        font-weight: 500;
        color: #64748b;
        line-height: 1.3;
    }
    .mmenu-item--feature .mmenu-count-badge { margin-left: 2px; }
    /* จอแคบ: ตัดคำอธิบาย ให้ชื่อเมนูอ่านครบโดยการ์ดไม่สูงขึ้น */
    @media (max-width: 479.98px) {
        .mmenu-feature-sub { display: none; }
    }
    .mmenu-feature-pair .mmenu-item--feature:hover,
    .mmenu-feature-pair .mmenu-item--feature:active {
        background: #fff;
        box-shadow: inset 0 0 0 1px #bfe5cf, 0 6px 14px rgba(15, 23, 42, 0.09);
        color: #023F25;
    }
    .mmenu-feature-pair .mmenu-item--feature.mmenu-item--current {
        background: #f1faf5;
        box-shadow: inset 0 0 0 1.5px #86d0a6, 0 3px 10px rgba(3, 84, 50, 0.08);
        color: #023F25;
    }

    .mmenu-divider-label {
        font-size: 0.68rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #94a3b8;
        padding: 14px 10px 4px;
    }

    /* Logout */
    .mmenu-footer {
        margin-top: 10px;
        padding: 0;
    }

    .mmenu-logout-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid #fecaca;
        background: #fff;
        color: #dc2626;
        font-weight: 800;
        font-size: 0.9rem;
        text-decoration: none;
        transition: background 0.12s, transform 0.1s;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
        width: 100%;
        box-shadow: 0 8px 22px rgba(220, 38, 38, 0.06);
    }

    .mmenu-logout-btn:hover, .mmenu-logout-btn:active {
        background: #fef2f2; color: #dc2626; text-decoration: none; width: 100%;
    }

    .mmenu-logout-btn:active {
        transform: scale(0.98);
    }

    /* ── Bottom nav: tactile press effect ────────────────────────────── */
    .mobile-bottom-nav-item {
        transition: color 0.15s, transform 0.1s cubic-bezier(0.4,0,0.2,1), background 0.12s;
    }
    .mobile-bottom-nav-item.bnav-pressed {
        transform: scale(0.88);
        background: #f0fdf4;
        color: var(--theme-primary);
    }
    .mobile-bottom-nav-item.bnav-loading {
        color: var(--theme-primary);
    }
    .mobile-bottom-nav-item.bnav-loading i {
        animation: bnav-pulse 0.55s ease-in-out forwards;
    }
    @keyframes bnav-pulse {
        0%   { transform: scale(1); }
        45%  { transform: scale(1.3); }
        100% { transform: scale(1); }
    }

    /* ── Mobile account sheet: profile card header ──────────────────── */
    .mmenu-profile-card {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 15px;
        margin: 0 0 12px;
        background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
        border-radius: 18px;
        border: 1px solid #c8ead6;
        box-shadow: 0 12px 26px rgba(3, 84, 50, 0.1);
    }

    .mmenu-profile-avatar-wrap {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        flex-shrink: 0;
        overflow: hidden;
        border: 2.5px solid var(--theme-primary);
        box-shadow: 0 0 0 4px rgba(3,84,50,0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--theme-primary), #035432);
    }

    .mmenu-profile-avatar-wrap img {
        width: 52px;
        height: 52px;
        object-fit: cover;
        border-radius: 50%;
    }

    .mmenu-profile-avatar-initial {
        color: #fff;
        font-family: var(--theme-font-family-heading, 'Prompt', 'Segoe UI', sans-serif);
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1;
        transform: translateY(-0.07em);
    }

    .mmenu-profile-info {
        flex: 1;
        min-width: 0;
    }

    .mmenu-profile-name {
        font-weight: 800;
        font-size: 1rem;
        color: #111827;
        overflow-wrap: anywhere;
        margin-bottom: 5px;
    }

    /* คำทักทายเหนือชื่อ + รหัสตัวแทนใต้ชื่อ เหมือนการ์ดโปรไฟล์ใน dropdown บนคอม
       (.navbar-menu-profile-name::before / .navbar-menu-profile-meta) - ข้อความทักทายต้องตรงกันทั้งสองที่ */
    .mmenu-profile-name::before {
        content: "ยินดีต้อนรับ 👋";
        display: block;
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--theme-primary);
        letter-spacing: 0.01em;
        margin-bottom: 2px;
    }

    .mmenu-profile-info .mmenu-profile-name:has(+ .mmenu-profile-meta) { margin-bottom: 2px; }

    .mmenu-profile-meta {
        font-size: 0.78rem;
        font-weight: 600;
        color: #6b7280;
    }

    .mmenu-profile-card .mmenu-badge {
        background: #fff;
    }

    .mmenu-profile-bank {
        font-size: 0.78rem;
        font-weight: 600;
        color: #6b7280;
        margin-top: 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mmenu-profile-bank .bi { margin-right: 4px; }
