/* =======================
   GLOBAL
======================= */

body {
    background: #f4f6f9;
    font-family: 'Inter', sans-serif;
}


/* =======================
   BANNER
======================= */

.dashboard-banner {
    border-radius: 16px;
}


/* =======================
   KPI BOX
======================= */

.kpi-box {
    position: relative;
    padding: 18px 8px;
    border-radius: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.kpi-box span {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffffff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50px;
}


/* =======================
   ACTION CARDS
======================= */

.action-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 14px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    display: block;
    height: 100%;
    text-decoration: none;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15);
}


/* ICON */

.action-card img {
    width: 100px;
    margin-bottom: 10px;
    transition: transform 0.25s ease;
}

.action-card:hover img {
    transform: scale(1.15);
}


/* TEXT */

.action-card span {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}


/* =======================
   QUOTATION CARD
======================= */

.quote-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-header h6 {
    font-weight: 700;
    margin-bottom: 4px;
}

.quote-amount {
    font-weight: 700;
    color: #198754;
}

.quote-card small {
    color: #666;
}

.quote-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}


/* =======================
   COLOR HELPERS
======================= */

.bg-primary {
    background: #0d6efd;
}

.bg-warning {
    background: #ffc107;
    color: #000;
}

.bg-success {
    background: #198754;
}


/* =======================
   MOBILE OPTIMIZATION
======================= */

@media (max-width: 576px) {
    .action-card img {
        width: 76px;
    }
    .kpi-box {
        font-size: 13px;
    }
}

.lead-card {
    border-radius: 14px;
}

.lead-card h6 {
    font-size: 15px;
}

.lead-meta {
    font-size: 13px;
    color: #6c757d;
}

.status-badge {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
}


/* Banner Overlay */

.lead-banner-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    border-radius: 10px;
}

.lead-banner-overlay h3 {
    margin: 0;
    font-weight: 600;
}

.lead-banner-overlay span {
    font-size: 13px;
    opacity: 0.9;
}


/* Lead Details Card */

.lead-details-page {
    background: #f8fafc;
}

.lead-details-page .ld-page-head {
    margin-bottom: 1.25rem;
}

.lead-details-page .ld-page-head h3 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.lead-details-page .ld-page-head p {
    color: #64748b;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.ld-rejection-alert {
    border: 1px solid #fecaca;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.08);
}

.ld-rejection-alert__title {
    color: #991b1b;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.ld-rejection-alert__meta {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.ld-rejection-alert__reason {
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    color: #7f1d1d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.ld-rejection-alert__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #dc2626;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.lead-details-card {
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.lead-details-card .card-body {
    position: relative;
    padding: 1.35rem 1.5rem 1.5rem;
}

.lead-info-grid .lead-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    height: 100%;
}

.lead-info-grid i,
.lead-info-grid .iconsax {
    font-size: 18px;
    color: #4f46e5;
}

.lead-info-grid label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-top: 0.45rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.lead-info-grid p {
    font-weight: 500;
    margin: 0;
    color: #0f172a;
    word-break: break-word;
}

.lead-header .lead-name {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0;
}

.lead-header .lead-code {
    color: #64748b;
    font-size: 0.9rem;
}

.ld-followup-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    height: 100%;
}

.ld-followup-card.is-rejected {
    border-color: #fecaca;
    background: #fff7f7;
}

.ld-followup-card__reason {
    color: #7f1d1d;
    font-weight: 500;
    margin-top: 0.35rem;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.lead-details-page .ld-quotation-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.lead-details-page .ld-quotation-card-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.lead-details-page .ld-quotation-items {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.lead-details-page .ld-quotation-item-badge {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.45;
    height: auto;
    padding: 0.45rem 0.65rem;
}

.lead-details-page .row > [class*="col-"] {
    min-width: 0;
}

@media (max-width: 768px) {
    .lead-details-page {
        overflow-x: hidden;
    }

    .lead-details-card .card-body {
        padding-top: 3rem;
    }

    .lead-status-badge {
        top: 14px;
        right: 14px;
        max-width: calc(100% - 28px);
    }

    .lead-status-badge .badge {
        white-space: normal;
        text-align: right;
        line-height: 1.3;
    }

    .lead-action-row {
        justify-content: stretch !important;
    }

    .lead-action-row .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }
}


/* Status Badge */

.lead-status-badge {
    position: absolute;
    top: 20px;
    right: 20px;
}


/* Action Row */

.lead-action-row .btn {
    padding: 10px 18px;
    border-radius: 10px;
}

.modal-content {
    border-radius: 14px;
}

.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}


/* ================================
   MOBILE / APK SAFE AREA LAYOUT
   (notch, camera cutout, home bar)
   ================================ */

:root {
    --app-safe-top: 36px;
    --app-safe-bottom: 16px;
    --app-safe-left: 12px;
    --app-safe-right: 12px;
    --app-content-gutter: 16px;
}

.mobile-safe-layout {
    padding-left: 0;
    padding-right: 0;
}

.mobile-safe-layout .salon-main-header {
    padding-block: unset;
    padding-top: max(44px, calc(12px + env(safe-area-inset-top, var(--app-safe-top))));
    padding-bottom: 12px;
    padding-left: var(--app-content-gutter);
    padding-right: var(--app-content-gutter);
}

.mobile-safe-layout .custom-container {
    padding-left: var(--app-content-gutter) !important;
    padding-right: var(--app-content-gutter) !important;
}

.mobile-safe-layout .salon-main-header .custom-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mobile-safe-layout .salon-main-header .header-content {
    gap: 12px;
    min-height: 44px;
}

.mobile-safe-layout .salon-main-header .header-content img {
    flex-shrink: 0;
}

.mobile-safe-layout .bottom-navbar {
    padding-top: 8px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, var(--app-safe-bottom)));
    padding-left: max(10px, env(safe-area-inset-left, var(--app-safe-left)));
    padding-right: max(10px, env(safe-area-inset-right, var(--app-safe-right)));
}

.mobile-safe-layout .mobile-bottom-spacer {
    height: calc(96px + env(safe-area-inset-bottom, var(--app-safe-bottom)));
    width: 100%;
    pointer-events: none;
}

.mobile-safe-layout .salon-auth-header {
    padding-top: calc(20px + env(safe-area-inset-top, var(--app-safe-top)));
    padding-left: 0;
    padding-right: 0;
}

.mobile-safe-layout.auth-page .bottom-navbar,
.mobile-safe-layout.auth-page .mobile-bottom-spacer,
.mobile-safe-layout.auth-page .panel-space-sm {
    display: none !important;
}

.mobile-safe-layout .app-page-content,
.mobile-safe-layout .custom-container2,
.mobile-safe-layout .container {
    padding-left: var(--app-content-gutter);
    padding-right: var(--app-content-gutter);
}

body.mobile-safe-layout.is-mobile-app .salon-main-header {
    padding-top: max(48px, calc(12px + env(safe-area-inset-top, 40px))) !important;
}

body.mobile-safe-layout.android-webview-app .salon-main-header,
body.mobile-safe-layout.android-webview-app.is-mobile-app .salon-main-header {
    padding-top: 12px !important;
}

body.mobile-safe-layout.android-webview-app .salon-main-header {
    background-color: #fff;
}

body.mobile-safe-layout.android-webview-app .salon-auth-header {
    padding-top: 12px !important;
}

body.mobile-safe-layout.is-mobile-app .bottom-navbar {
    left: var(--app-content-gutter) !important;
    right: var(--app-content-gutter) !important;
    bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14) !important;
}

body.mobile-safe-layout.is-mobile-app .mobile-bottom-spacer {
    height: calc(100px + env(safe-area-inset-bottom, 18px)) !important;
}

.mobile-dashboard-grid .row {
    --bs-gutter-x: 10px;
}

.mobile-dashboard-grid .kpi-box,
.mobile-dashboard-grid .status-box {
    overflow: visible;
    word-break: break-word;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    body.mobile-safe-layout .bottom-navbar {
        left: var(--app-content-gutter) !important;
        right: var(--app-content-gutter) !important;
        bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        border-radius: 16px !important;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14) !important;
    }

    .mobile-safe-layout .app-page-content,
    .mobile-safe-layout .custom-container2,
    .mobile-safe-layout .container {
        padding-left: var(--app-content-gutter) !important;
        padding-right: var(--app-content-gutter) !important;
        max-width: 100% !important;
    }

    .mobile-safe-layout .container {
        --bs-gutter-x: 12px;
    }

    .mobile-safe-layout .salon-main-header .main-content h4 {
        font-size: 15px;
        line-height: 1.25;
    }

    .mobile-safe-layout .salon-main-header .main-content h5 {
        font-size: 12px;
        margin-top: 2px;
    }

    .mobile-safe-layout .bottom-navbar ul li .icon h5 {
        font-size: 11px;
        line-height: 1.1;
    }

    .mobile-safe-layout .bottom-navbar ul li .icon .menu-icon {
        padding: 6px 12px;
    }
}

/* ================================
   FIELD SALES VISIT UI
   ================================ */

.fsv-body {
    padding: 16px var(--app-content-gutter, 16px) 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.fsv-header,
.vs-page-header {
    margin-bottom: 18px;
}

.fsv-header-title,
.vs-page-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.fsv-header-subtitle,
.vs-page-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.vs-page-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vs-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.vs-back-btn:hover {
    background: #f8fafc;
    color: #0f766e;
}

.vs-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .vs-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .vs-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.vs-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    border: 2px solid transparent;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vs-summary-card:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.vs-summary-card.is-active {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.vs-summary-count {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.vs-summary-label {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.95;
}

.vs-theme-all { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.vs-theme-success { background: linear-gradient(135deg, #15803d, #22c55e); }
.vs-theme-teal { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.vs-theme-info { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.vs-theme-warning { background: linear-gradient(135deg, #c2410c, #f97316); }
.vs-theme-danger { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.vs-theme-purple { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }

.vs-filter-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.vs-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.vs-filter-field {
    flex: 1 1 220px;
}

.vs-filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.vs-filter-input {
    border-radius: 12px;
    border-color: #e2e8f0;
    min-height: 42px;
}

.vs-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vs-filter-btn {
    min-width: 96px;
    border-radius: 12px;
    min-height: 42px;
    font-weight: 600;
}

.vs-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.vs-results-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.vs-results-count {
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1;
    padding: 6px 10px;
    border-radius: 999px;
}

.vs-lead-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vs-lead-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.vs-lead-card.vs-theme-success { border-left-color: #16a34a; }
.vs-lead-card.vs-theme-teal { border-left-color: #0f766e; }
.vs-lead-card.vs-theme-info { border-left-color: #2563eb; }
.vs-lead-card.vs-theme-warning { border-left-color: #ea580c; }
.vs-lead-card.vs-theme-danger { border-left-color: #dc2626; }
.vs-lead-card.vs-theme-purple { border-left-color: #7c3aed; }
.vs-lead-card.vs-theme-all { border-left-color: #14b8a6; }

.vs-lead-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vs-lead-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfeff;
    color: #0f766e;
    font-weight: 800;
    flex-shrink: 0;
}

.vs-lead-main {
    flex: 1;
    min-width: 0;
}

.vs-lead-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.vs-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #334155;
}

.vs-lead-card.vs-theme-success .vs-status-pill { background: #dcfce7; color: #166534; }
.vs-lead-card.vs-theme-teal .vs-status-pill { background: #ccfbf1; color: #115e59; }
.vs-lead-card.vs-theme-info .vs-status-pill { background: #dbeafe; color: #1e40af; }
.vs-lead-card.vs-theme-warning .vs-status-pill { background: #ffedd5; color: #9a3412; }
.vs-lead-card.vs-theme-danger .vs-status-pill { background: #fee2e2; color: #991b1b; }
.vs-lead-card.vs-theme-purple .vs-status-pill { background: #ede9fe; color: #5b21b6; }

.vs-lead-id {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
}

.vs-lead-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.vs-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.vs-meta-item i {
    margin-top: 2px;
    color: #0f766e;
    flex-shrink: 0;
}

.vs-meta-note span {
    word-break: break-word;
}

.vs-lead-actions {
    margin-top: 14px;
}

.vs-lead-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    background: #0f766e;
    color: #fff;
}

.vs-lead-action-btn:hover {
    background: #115e59;
    color: #fff;
}

.vs-empty-state {
    text-align: center;
    padding: 42px 20px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
}

.vs-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfeff;
    color: #0f766e;
    font-size: 24px;
}

.vs-empty-state h6 {
    margin-bottom: 6px;
    font-weight: 700;
    color: #0f172a;
}

.vs-empty-state p {
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
}

/* Select2 + modal field alignment */
.quotation-modal-body {
    padding: 1rem 1.25rem 1.25rem;
}

.quotation-modal-fields,
.modal-action-fields {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.modal-action-fields > *,
.quotation-modal-fields > * {
    width: 100%;
    max-width: 100%;
}

.modal-field-group {
    width: 100%;
    margin-bottom: 1rem;
    display: block;
}

.modal-field-group:last-child {
    margin-bottom: 0;
}

.modal-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.modal .form-control,
.modal .form-select,
.modal select.form-control,
.modal select.form-select {
    width: 100%;
    max-width: 100%;
}

.select2-container {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.select2-container .select2-selection--single {
    width: 100%;
}

.modal .select2-container {
    z-index: 1060;
}

.select2-container--default .select2-selection--single {
    min-height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding: 10px 36px 10px 14px;
    color: #0f172a;
    font-size: 14px;
    white-space: normal;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.select2-container--open .select2-dropdown--below {
    margin-top: 4px;
}

.select2-search--dropdown {
    display: block !important;
    width: 100% !important;
    padding: 10px 12px;
    box-sizing: border-box;
}

.select2-search--dropdown .select2-search__field {
    width: 100% !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    outline: none !important;
    box-sizing: border-box;
}

.select2-dropdown {
    z-index: 1061;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}

.select2-results,
.select2-results__options {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.select2-results__option {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box;
    padding: 11px 14px !important;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal !important;
    word-break: break-word;
    border-bottom: 1px solid #f1f5f9;
}

.select2-results__option:last-child {
    border-bottom: none;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #fffbeb;
    color: #92400e;
}

/* Vendor manager picker (modal) */
.vm-picker-wrap {
    width: 100%;
}

.vm-city-note {
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #64748b;
}

.vm-picker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}

.vm-picker-item {
    display: block;
    width: 100%;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.vm-picker-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vm-picker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.vm-picker-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vm-picker-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.vm-picker-code {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.02em;
}

.vm-picker-check {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.vm-picker-item input[type="radio"]:checked + .vm-picker-card {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

.vm-picker-item input[type="radio"]:checked + .vm-picker-card .vm-picker-check {
    border-color: #f59e0b;
    background: #f59e0b;
}

.vm-picker-item input[type="radio"]:checked + .vm-picker-card .vm-picker-check::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.vm-picker-item:hover .vm-picker-card {
    border-color: #94a3b8;
}

.vm-picker-item.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.vm-picker-item.is-disabled .vm-picker-card {
    background: #f8fafc;
}

.vm-picker-item.is-disabled:hover .vm-picker-card {
    border-color: #e2e8f0;
}

#sendToVendorManagerModal .modal-body,
#sendForApprovalModal .modal-body,
#sendToFieldSalesModal .modal-body {
    padding-top: 0.75rem;
}

#sendToVendorManagerModal .modal-footer {
    border-top: 1px solid #eef2f7;
    padding-top: 12px;
}

/* Lead list search + pagination (mobile) */
.lead-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.lead-search-field,
.lead-search-actions {
    width: 100%;
}

.lead-search-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lead-pagination-nav {
    width: 100%;
}

.lead-pagination-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.lead-pagination-actions .btn {
    width: 100%;
    min-height: 42px;
}

.lead-list-item .card {
    width: 100%;
}

.lead-list-item .row.g-2 > [class*="col-"] {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .lead-search-form {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: end;
        gap: 12px;
    }

    .lead-search-actions {
        display: contents;
    }

    .lead-search-actions .btn {
        min-width: 110px;
    }
}

/* =========================
   TOAST ALERTS (MOBILE / PWA / APK)
========================= */

.app-toast-host,
#toast_message,
.app-toast-process-host,
#process_toast_message_div {
    position: fixed;
    top: max(12px, calc(8px + env(safe-area-inset-top, var(--app-safe-top, 40px))));
    left: max(12px, env(safe-area-inset-left, var(--app-safe-left, 12px)));
    right: max(12px, env(safe-area-inset-right, var(--app-safe-right, 12px)));
    z-index: 999999;
    min-width: 0 !important;
    width: auto;
    max-width: none;
    pointer-events: none;
}

.app-toast-host > *,
#toast_message > *,
.app-toast-process-inner,
.app-toast-process-host > div {
    pointer-events: auto;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100%;
    max-width: 100%;
}

#toast_message #alert_toast,
.app-toast-wrap #alert_toast,
.app-alert-toast {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.app-toast-wrap .toast-header {
    flex-wrap: wrap;
    gap: 4px;
}

.app-toast-wrap .toast-body {
    word-break: break-word;
}

@media (min-width: 769px) {

    .app-toast-host,
    #toast_message,
    .app-toast-process-host,
    #process_toast_message_div {
        left: auto;
        width: min(420px, calc(100vw - 24px));
        right: max(12px, env(safe-area-inset-right, 12px));
    }
}