/* ย้ายมาจาก <style> ใน resources/views/components/property/navbar.blade.php (2026-12-02, UX audit ความเร็วบนมือถือ):
   เดิมฝังซ้ำใน HTML ทุกหน้า - เป็นไฟล์แล้วเบราว์เซอร์จำไว้ หน้าถัดไปไม่ต้องโหลดซ้ำ แก้ CSS ส่วนนี้ที่ไฟล์นี้ */
    /* Shared login/register experience: large touch targets, short labels, and one visual language. */
    .auth-modal {
        --auth-border: #dfe5e2;
        --auth-muted: #64748b;
        --auth-soft: #f6f8f7;
    }

    .auth-modal-dialog { width: calc(100% - 2rem); }
    .auth-modal-dialog--login { max-width: 480px; }
    .auth-modal-dialog--register { max-width: 760px; }

    .auth-modal-content {
        border-radius: 24px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    }

    .auth-modal-header {
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 1.25rem 1.5rem 1rem;
        border: 0;
        background: linear-gradient(135deg, #e8f0ed, #fff 72%); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 9%, white), #fff 72%);
    }

    .auth-modal-header--compact {
        align-items: center;
        padding: 0.75rem 1.25rem 0.65rem;
    }

    .auth-modal-header--compact .auth-modal-heading { gap: 10px; }

    .auth-modal-header--compact .auth-modal-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 1rem;
        box-shadow: 0 5px 14px rgba(3, 84, 50, 0.2); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 5px 14px color-mix(in srgb, var(--theme-primary) 20%, transparent);
    }

    .auth-modal-header--compact .auth-modal-title { font-size: 1.05rem; }

    .auth-modal-header--compact .auth-modal-subtitle {
        margin-top: 1px;
        font-size: 0.76rem;
        line-height: 1.25;
    }

    .auth-modal-header--compact .auth-modal-close { padding: 0.55rem; }

    .auth-modal-heading {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .auth-modal-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: var(--theme-primary);
        color: #fff;
        font-size: 1.2rem;
        box-shadow: 0 8px 20px rgba(3, 84, 50, 0.24); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 8px 20px color-mix(in srgb, var(--theme-primary) 24%, transparent);
    }

    .auth-modal-title {
        margin: 0;
        color: #17201c;
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1.25;
    }

    .auth-modal-subtitle {
        margin: 3px 0 0;
        color: var(--auth-muted);
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .auth-modal-close {
        flex: 0 0 auto;
        margin: 0;
        padding: 0.65rem;
        border-radius: 50%;
        background-color: #f0f1f3; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        background-color: color-mix(in srgb, var(--auth-muted) 10%, white);
        opacity: 0.7;
    }

    .auth-modal-close:hover { opacity: 1; }

    .auth-switch-callout {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 0.5rem 1.25rem;
        border-top: 1px solid #e6eeea; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        border-top: 1px solid color-mix(in srgb, var(--theme-primary) 10%, white);
        border-bottom: 1px solid #d2e0da; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        border-bottom: 1px solid color-mix(in srgb, var(--theme-primary) 18%, white);
        background: #edf3f1; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        background: color-mix(in srgb, var(--theme-primary) 7%, white);
    }

    .auth-switch-callout__copy {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: #334139;
        font-size: 0.82rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .auth-switch-callout__copy i { color: var(--theme-primary); }

    .auth-switch-callout__action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0.35rem 0.65rem 0.35rem 0.8rem;
        border-radius: 999px;
        background: var(--theme-primary);
        color: #fff;
        font-size: 0.82rem;
        font-weight: 800;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 5px 12px rgba(3, 84, 50, 0.18); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 5px 12px color-mix(in srgb, var(--theme-primary) 18%, transparent);
        transition: filter 0.2s ease, box-shadow 0.2s ease;
    }

    .auth-switch-callout__action i { font-size: 1rem; }

    .auth-switch-callout__action:hover {
        color: #fff;
        filter: brightness(0.92);
        box-shadow: 0 7px 16px rgba(3, 84, 50, 0.22); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-primary) 22%, transparent);
    }
    .auth-switch-callout__action:focus-visible {
        color: #fff;
        filter: brightness(0.92);
        box-shadow: 0 7px 16px rgba(3, 84, 50, 0.22); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-primary) 22%, transparent);
    }

    .auth-modal-body { padding: 1.1rem 1.5rem 1.25rem; }

    .auth-choice-section {
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .auth-section-label,
    .auth-field-label,
    .auth-modal .form-label {
        display: block;
        width: auto;
        margin: 0 0 0.45rem;
        color: #25332c;
        font-size: 0.88rem;
        font-weight: 700;
        line-height: 1.4;
    }

    .auth-choice-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .auth-choice-button {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        min-height: 62px;
        padding: 0.7rem 2rem 0.7rem 0.85rem;
        border: 1.5px solid var(--auth-border);
        border-radius: 14px;
        background: #fff;
        color: #475569;
        cursor: pointer;
        transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .auth-choice-button > i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: var(--auth-soft);
        color: var(--auth-muted);
        font-size: 1rem;
    }

    .auth-choice-button span { min-width: 0; }

    .auth-choice-button strong,
    .auth-choice-button small {
        display: block;
        line-height: 1.25;
    }

    .auth-choice-button strong {
        color: #26352e;
        font-size: 0.9rem;
        font-weight: 800;
    }

    .auth-choice-button small {
        margin-top: 3px;
        color: var(--auth-muted);
        font-size: 0.72rem;
    }

    .auth-choice-button::after {
        content: "";
        position: absolute;
        top: 8px;
        right: 8px;
        display: grid;
        place-items: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background-color: var(--theme-primary);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4' d='m3 8 3 3 7-7'/%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
        background-size: 11px;
        color: #fff;
        font-size: 0.7rem;
        font-weight: 900;
        opacity: 0;
        transform: scale(0.75);
        transition: opacity 0.16s ease, transform 0.16s ease;
    }

    .auth-modal .btn-check:checked + .auth-choice-button {
        border-color: var(--theme-primary);
        background: #edf3f1; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        background: color-mix(in srgb, var(--theme-primary) 7%, white);
        color: var(--theme-primary);
        box-shadow: 0 0 0 3px rgba(3, 84, 50, 0.1); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 10%, transparent);
    }

    .auth-modal .btn-check:checked + .auth-choice-button > i {
        background: var(--theme-primary);
        color: #fff;
    }

    .auth-modal .btn-check:checked + .auth-choice-button strong { color: var(--theme-primary); }
    .auth-modal .btn-check:checked + .auth-choice-button::after { opacity: 1; transform: scale(1); }

    .auth-modal .btn-check:focus-visible + .auth-choice-button {
        outline: 3px solid rgba(3, 84, 50, 0.22); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        outline: 3px solid color-mix(in srgb, var(--theme-primary) 22%, transparent);
        outline-offset: 2px;
    }

    @media (hover: hover) {
        .auth-choice-button:hover {
            border-color: #719c8a; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
            border-color: color-mix(in srgb, var(--theme-primary) 50%, var(--auth-border));
            background: #f7faf9; /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
            background: color-mix(in srgb, var(--theme-primary) 3%, white);
            box-shadow: 0 4px 12px rgba(3, 84, 50, 0.09); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
            box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-primary) 9%, transparent);
        }
    }

    .auth-modal .form-control,
    .auth-modal .input-group-text {
        min-height: 48px;
        border-color: var(--auth-border);
        background-color: #fff;
    }

    .auth-modal .form-control {
        padding: 0.7rem 0.9rem;
        border-radius: 12px;
        color: #1f2937;
        font-size: 0.95rem;
        line-height: 1.35;
        box-shadow: none;
    }

    .auth-modal .form-control::placeholder { color: #9aa5b1; }

    .auth-modal .form-control:focus {
        border-color: var(--theme-primary);
        box-shadow: 0 0 0 3px rgba(3, 84, 50, 0.11); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 11%, transparent);
    }

    .auth-input-group .input-group-text {
        padding: 0 0.85rem;
        border-right: 0;
        border-radius: 12px 0 0 12px;
        color: var(--auth-muted);
    }

    .auth-input-group > .form-control {
        border-left: 0;
        border-radius: 0;
        padding-left: 0.75rem;
    }

    .auth-modal .auth-input-group > .form-control:last-child {
        border-radius: 0 12px 12px 0 !important;
    }

    /* ปุ่มแสดง/ซ่อนรหัสผ่าน (รูปตา) ท้ายช่องรหัสผ่านทุกช่องในป๊อปอัปเข้าสู่ระบบ/สมัคร */
    /* Edge วาดปุ่มรูปตาของตัวเองในช่องรหัสผ่าน ซ้อนกับปุ่มของเรา → ซ่อนของ Edge ให้เหลือปุ่มเดียว */
    .auth-modal .auth-pw-input::-ms-reveal,
    .auth-modal .auth-pw-input::-ms-clear { display: none; }

    /* ช่องสมัครมี .border-neutral-300 ทับสีตอนโฟกัส → ให้ขอบช่องเขียวพร้อมปุ่มรูปตา */
    .auth-modal .auth-pw-input:focus { border-color: var(--theme-primary) !important; }

    .auth-modal .input-group > .auth-pw-input {
        border-right: 0;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* site-wide .input-group > .input-group-text:last-child sets radius 0 !important */
    .auth-modal .input-group > .auth-pw-toggle:last-child {
        border-left: 0;
        border-right: 1px solid var(--auth-border);
        border-radius: 0 12px 12px 0 !important;
        padding: 0 0.95rem;
        color: var(--auth-muted);
        cursor: pointer;
    }

    .auth-modal .auth-pw-toggle:hover,
    .auth-modal .auth-pw-toggle[aria-pressed="true"] { color: var(--theme-primary); }

    .auth-modal .input-group:focus-within .input-group-text {
        border-color: var(--theme-primary);
    }

    .auth-modal .form-hint {
        margin-top: 0.3rem;
        color: var(--auth-muted);
        font-size: 0.75rem;
    }

    .auth-modal .form-check-input {
        width: 1.1rem;
        height: 1.1rem;
        margin-top: 0.15rem;
        border-color: #aab5af;
    }

    .auth-modal .form-check-input:checked { background-color: var(--theme-primary); border-color: var(--theme-primary); }
    .auth-modal .form-check-label { color: #59675f; font-size: 0.85rem; line-height: 1.45; }

    .auth-login-options .form-check {
        display: grid;
        grid-template-columns: 1.1rem auto;
        align-items: center;
        column-gap: 0.4rem;
        padding-left: 0;
    }

    .auth-login-options .form-check-input {
        float: none;
        margin: 0;
    }

    .auth-login-options .form-check-label { line-height: 1.1rem; }

    .auth-primary-button {
        min-height: 50px;
        padding: 0.7rem 1rem;
        border-radius: 13px;
        font-size: 1rem;
        font-weight: 800;
        box-shadow: 0 8px 18px rgba(3, 84, 50, 0.2); /* fallback: color-mix() needs iOS 16.2+ / Chrome 111+ */
        box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-primary) 20%, transparent);
    }

    .auth-divider {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 1rem 0;
        color: #89958f;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .auth-divider::before,
    .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-border); }

    .auth-social-grid--top { margin-bottom: 0.75rem; }
    .auth-agent-switch { margin: 0.9rem 0 0; text-align: center; font-size: 0.86rem; color: #6b7a72; }
    .auth-agent-switch__btn { border: 0; background: none; padding: 0.35rem 0.25rem; color: #035432; font-weight: 700; text-decoration: underline; cursor: pointer; font: inherit; font-weight: 700; }
    .auth-social-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.625rem;
    }

    .social-btn-google {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: #fff;
        min-height: 52px;
        padding: 0.72rem 1rem;
        border: 1px solid #d5dbe0;
        border-radius: 14px;
        color: #253238;
        font-size: 0.92rem;
        font-weight: 700;
        line-height: 1.2;
        box-shadow: 0 2px 7px rgba(15, 23, 42, 0.07);
        transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    }

    .social-btn-google__icon {
        display: inline-flex;
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
    }

    .social-btn-google__icon svg {
        display: block;
        width: 100%;
        height: 100%;
    }

    .social-btn-google:hover {
        background: #f8fafc;
        color: #172126;
        border-color: #b8c1c7;
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.11);
    }

    .social-btn-google:focus-visible {
        color: #172126;
        outline: 3px solid rgba(66, 133, 244, 0.22);
        outline-offset: 2px;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
    }

    .social-btn-google:active {
        background: #f1f5f7;
        border-color: #aeb8bf;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    }

    /* LINE Login - สีตามแนวทางแบรนด์ LINE (#06C755, กดค้างเข้มขึ้น) ขนาดเท่าปุ่ม Google */
    .social-btn-line {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 52px;
        padding: 0.72rem 1rem;
        background: #06C755;
        border: 1px solid #06C755;
        border-radius: 14px;
        color: #fff;
        font-size: 0.92rem;
        font-weight: 700;
        line-height: 1.2;
        box-shadow: 0 2px 7px rgba(6, 199, 85, 0.18);
        transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .social-btn-line__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        font-size: 22px;
        line-height: 1;
    }

    .social-btn-line:hover {
        background: #05B34C;
        border-color: #05B34C;
        color: #fff;
        box-shadow: 0 6px 16px rgba(6, 199, 85, 0.24);
    }

    .social-btn-line:focus {
        color: #fff;
        box-shadow: 0 0 0 0.25rem rgba(6, 199, 85, 0.25);
    }

    .social-btn-line:focus-visible {
        color: #fff;
        outline: 3px solid rgba(6, 199, 85, 0.3);
        outline-offset: 2px;
    }

    .social-btn-line:active {
        background: #048B3B;
        border-color: #048B3B;
        color: #fff;
        box-shadow: 0 1px 3px rgba(6, 199, 85, 0.16);
    }

    .auth-modal .alert { margin-bottom: 0.9rem !important; }

    /* Keep the complete registration form visible on standard desktop viewports.
       Short screens retain Bootstrap's internal scrolling so no action is hidden. */
    @media (min-width: 768px) and (min-height: 850px) {
        .auth-modal-dialog--register .auth-switch-callout {
            padding-top: 0.35rem;
            padding-bottom: 0.35rem;
        }

        .auth-modal-dialog--register .auth-modal-body {
            padding-top: 0.625rem;
            padding-bottom: 0.5rem;
        }

        .auth-modal-dialog--register .auth-choice-button {
            min-height: 52px;
            padding-top: 0.55rem;
            padding-bottom: 0.55rem;
        }

        .auth-modal-dialog--register .mb-3 {
            margin-bottom: 0.625rem !important;
        }

        .auth-modal-dialog--register .form-control-lg {
            min-height: 44px;
            padding-top: 0.5rem;
            padding-bottom: 0.5rem;
            font-size: 0.95rem;
        }

        .auth-modal-dialog--register .auth-primary-button,
        .auth-modal-dialog--register .social-btn-google,
        .auth-modal-dialog--register .social-btn-line {
            min-height: 46px;
            padding-top: 0.55rem;
            padding-bottom: 0.55rem;
        }

        .auth-modal-dialog--register .auth-divider {
            margin-top: 0.625rem;
            margin-bottom: 0.625rem;
        }
    }

    @media (max-width: 575.98px) {
        .auth-modal-dialog {
            width: auto;
            max-width: none;
            min-height: calc(100% - 1rem);
            margin: 0.5rem;
        }

        .auth-modal-content { border-radius: 20px; }
        .auth-modal-header { padding: 1rem 1rem 0.85rem; }
        .auth-modal-header--compact { padding: 0.65rem 0.9rem 0.55rem; }
        .auth-modal-body { padding: 0.9rem 1rem 1rem; }

        .auth-modal-icon {
            flex-basis: 40px;
            width: 40px;
            height: 40px;
            border-radius: 12px;
        }

        .auth-modal-title { font-size: 1.12rem; }
        .auth-modal-subtitle { font-size: 0.79rem; }

        .auth-modal-header--compact .auth-modal-icon {
            flex-basis: 34px;
            width: 34px;
            height: 34px;
            border-radius: 10px;
        }

        .auth-modal-header--compact .auth-modal-title { font-size: 1rem; }
        .auth-modal-header--compact .auth-modal-subtitle { font-size: 0.72rem; }

        .auth-switch-callout { padding: 0.45rem 0.9rem; }
        .auth-switch-callout__copy,
        .auth-switch-callout__action { font-size: 0.78rem; }

        .auth-choice-grid { gap: 8px; }
        .auth-choice-button {
            min-height: 58px;
            gap: 7px;
            padding: 0.6rem 1.55rem 0.6rem 0.6rem;
            border-radius: 12px;
        }

        .auth-choice-button > i {
            flex-basis: 30px;
            width: 30px;
            height: 30px;
            border-radius: 9px;
            font-size: 0.9rem;
        }

        .auth-choice-button strong { font-size: 0.82rem; }
        .auth-choice-button small { font-size: 0.66rem; }
        .auth-choice-button::after { top: 6px; right: 6px; }

        .auth-modal .row > [class*="col-"] { margin-bottom: 0.75rem !important; }
        .auth-login-options { font-size: 0.82rem; }
    }

    .phone-auth-note {
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        color: #475569;
        font-size: 0.9rem;
        padding: 12px 14px;
    }

    .phone-auth-note strong {
        color: #0f172a;
    }

    .phone-auth-hidden {
        display: none !important;
    }

    .phone-auth-dev-link {
        background: #fffbeb;
        border: 1px solid #fcd34d;
        border-radius: 10px;
        color: #92400e;
        font-size: 0.85rem;
        padding: 10px 12px;
        word-break: break-all;
    }

    .phone-auth-step {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 999px;
        background: #ecfdf5;
        color: #047857;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .auth-flow-actions {
        display: grid;
        gap: 0.65rem;
    }

    .auth-flow-action {
        min-height: 48px;
        border-radius: 12px;
        font-weight: 700;
        transform: none !important;
        transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
    }

    .auth-flow-action:hover,
    .auth-flow-action:focus,
    .auth-flow-action:active {
        transform: none !important;
    }

    .psm-modal-dialog { max-width: 460px; }
    .psm-modal-content {
        border-radius: 22px;
        overflow: hidden;
        background: linear-gradient(180deg, #f8fff9 0%, #ffffff 35%);
    }
    .psm-modal-header {
        background:
            radial-gradient(circle at 15% 0%, rgba(3, 84, 50, 0.15), transparent 45%),
            radial-gradient(circle at 85% 20%, rgba(22, 163, 74, 0.1), transparent 35%);
    }
    .psm-subtitle {
        font-size: 0.83rem;
        max-width: 300px;
        line-height: 1.45;
    }

    /* ── Profile Select Modal (psm) ──────────────────────────────────────── */
    .psm-profile-btn {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        background: #fff;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px 16px;
        text-align: left;
        cursor: pointer;
        transition: border-color .18s, background .18s;
        font-size: 0.9rem;
        min-height: 60px;
        -webkit-tap-highlight-color: transparent;
    }
    .psm-profile-btn:hover:not(:disabled), .psm-profile-btn:active:not(:disabled) {
        border-color: var(--theme-primary);
        background: #f0fdf4;
    }
    .psm-profile-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .psm-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #166534, #035432);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 700;
        font-size: 1.1rem;
        flex-shrink: 0;
        overflow: hidden;
    }
    .psm-avatar img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
    .psm-name  { font-weight: 700; color: #1f2937; line-height: 1.3; font-size: 0.9rem; }
    .psm-bank  {
        font-size: 0.78rem; color: #6b7280; margin-top: 2px;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .psm-bank .bi { margin-right: 5px; }
    .psm-warn  { font-size: 0.75rem; color: #dc2626; margin-top: 2px; }
    .provider-badge-psm {
        display: inline-flex;
        align-items: center;
        background: #f0fdf4;
        color: #166534;
        border: 1px solid #bbf7d0;
        border-radius: 100px;
        padding: 3px 12px;
        font-size: 0.78rem;
        font-weight: 600;
    }

    @media (max-width: 575.98px) {
        .psm-modal-dialog {
            max-width: calc(100% - 20px);
            margin: 10px;
        }

        .psm-modal-body {
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        .psm-profile-btn {
            min-height: 64px;
            padding: 11px 12px;
            gap: 10px;
        }

        .psm-avatar,
        .psm-avatar img {
            width: 40px;
            height: 40px;
        }
    }

/* สมัครตัวแทนสำเร็จ (#registerAgentDone, UX audit 2026-12-02): รหัสตัวแทน + คัดลอก + ขั้นต่อไป ในป๊อปอัปเดิม */
.reg-agent-done { text-align: center; padding: 8px 4px 4px; }
.reg-agent-done__icon {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: #dcfce7; color: #15803d;
}
.reg-agent-done__icon .bi { font-family: bootstrap-icons; line-height: 1; font-size: 28px; }
.reg-agent-done__icon .bi::before { vertical-align: 0; }
.reg-agent-done__title { font-size: 1.15rem; font-weight: 700; color: #13241b; margin: 0 0 14px; outline: none; }
.reg-agent-done__code {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
    background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.reg-agent-done__label { width: 100%; font-size: .85rem; color: #55665d; }
.reg-agent-done__code strong { font-size: 1.6rem; letter-spacing: .08em; color: #035432; font-variant-numeric: tabular-nums; }
.reg-agent-done__copy {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
    border: 1px solid #035432; border-radius: 999px; background: #fff; color: #035432; font-weight: 600; font-size: .9rem;
}
.reg-agent-done__copy .bi { font-family: bootstrap-icons; line-height: 1; font-size: 16px; }
.reg-agent-done__copy:hover, .reg-agent-done__copy:focus-visible { background: #035432; color: #fff; }
.reg-agent-done__steps { text-align: left; margin: 0 0 18px; padding-left: 1.3rem; display: grid; gap: 8px; font-size: .95rem; color: #13241b; }
