/* =========================================================================
   Party Manager - MOBILE UI v3  (sabse LAST load hota hai)
   -------------------------------------------------------------------------
   Sirf look & feel / touch comfort. Koi template logic, URL ya form field
   nahi badla - isliye purane features me error nahi aata.

   Rules (research ke hisaab se):
   - Har tap target >= 44-48px (Android Material: 48dp, Apple: 44pt)
   - Chhota text 12px se neeche nahi; body/input 16px (iOS/Android zoom nahi)
   - Contrast: text 4.5:1, bada text 3:1; sirf color se matlab nahi
   - Primary action neeche (thumb zone) -> bottom nav 64px, safe-area ke saath
   - Ek hi primary color, ek hi radius, ek hi spacing scale (4/8/12/16/24)
   - Har state design: loading, empty, error, offline
   ========================================================================= */

:root {
  --m-primary: #1D4ED8;
  --m-primary-soft: #E6EDFD;
  --m-ink: #111827;
  --m-muted: #5B6478;          /* white par 5.9:1 */
  --m-line: #E3E8F2;
  --m-bg: #F4F6FB;
  --m-danger: #B3261E;
  --m-ok: #1E8E4E;
  --m-radius: 14px;
  --m-tap: 48px;
}

/* ---------- all screen sizes: safe defaults ---------- */
.pm-field-hint { display: none; }
a, button, label, select, summary, [role=button] { touch-action: manipulation; }   /* 300ms tap delay nahi */
:focus-visible { outline: 3px solid rgba(29,78,216,.45); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.stat-number, .stat-card .stat-number, .pm-pipe-i b, .vt-sum-i b, .vt-fn b, .ed-tile .n {
  font-variant-numeric: tabular-nums;
}

/* Offline banner (mobile.js) */
#pm-offline { display: none; }
body.pm-is-offline #pm-offline {
  display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 9999;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: #7A1C16; color: #fff; text-align: center; font-size: 13px; font-weight: 600;
}

/* touch screens par "sticky hover" nahi */
@media (hover: none) {
  .stat-card:hover, .btn:hover, .btn-gold:hover, .btn-outline:hover { transform: none !important; }
}

/* ======================================================================
   PHONE  (<= 720px)
   ====================================================================== */
@media (max-width: 720px) {
  html { scroll-padding-bottom: 96px; }

  /* Flat, fast background - fixed gradients WebView me scroll atkate hain */
  body {
    background: var(--m-bg) !important;
    background-attachment: scroll !important;
    color: var(--m-ink);
    font-size: 15px; line-height: 1.45;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell { padding: 8px 10px 0; }
  .content { padding: 2px 0 24px; }

  /* ---- top bar: 60px, hamburger 48px ---- */
  .topbar {
    min-height: 60px; padding: 6px 12px 6px 70px; margin-bottom: 10px;
    border-radius: 16px; border: 1px solid var(--m-line); box-shadow: 0 1px 2px rgba(16,24,48,.04);
    align-items: center;
  }
  .topbar h1 { font-size: 18px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
  #pm-menu-btn {
    width: 48px; height: 48px; border-radius: 14px; top: calc(16px + env(safe-area-inset-top, 0px)); left: 16px;
    border-color: var(--m-line); box-shadow: none;
  }
  #pm-menu-btn:active { background: var(--m-primary-soft); }
  #pm-menu-btn svg { width: 22px; height: 22px; }

  /* ---- cards ---- */
  .card { padding: 14px; border-radius: var(--m-radius); border: 1px solid var(--m-line); box-shadow: 0 1px 2px rgba(16,24,48,.04); margin-bottom: 12px; }
  .card h2 { font-size: 16px; margin: 0 0 8px; }
  .card h3 { font-size: 15px; }

  /* ---- type scale: koi text 12px se chhota nahi ---- */
  .pm-pipe-i small, .vt-nocard, .vt-hint, .talk-popover-date, .stat-card .stat-label,
  .vt-sum-i span, .vt-fn span, .badge, .nav-label { font-size: 12px !important; }
  small, .muted, .hint { font-size: 12.5px; }
  label { font-size: 13px; font-weight: 600; color: var(--m-ink); }

  /* ---- buttons: ek hi system ---- */
  .btn, .btn-outline, .btn-gold, .btn-primary, button.btn {
    min-height: var(--m-tap); padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; line-height: 1.2;
  }
  .btn { background: var(--m-primary); border: 1.5px solid var(--m-primary); color: #fff; box-shadow: none; }
  .btn-gold, .btn-primary {
    background: var(--m-primary) !important; border-color: var(--m-primary) !important; color: #fff !important;
    box-shadow: 0 1px 2px rgba(29,78,216,.25) !important; background-image: none !important;
  }
  .btn-gold:active, .btn-primary:active { background: #1A43BC !important; }
  .btn-outline { background: #fff; color: var(--m-primary); border: 1.5px solid #C5D2F6; box-shadow: none; }
  .btn-outline:active { background: var(--m-primary-soft); }
  .btn-muted { color: var(--m-muted) !important; border-color: var(--m-line) !important; }
  .btn-danger-outline { color: var(--m-danger); border: 1.5px solid #F1CDC9; background: #fff; }
  .btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
  button:disabled, .btn[disabled], .btn.disabled { opacity: .5; }

  /* ---- fields: 48px, 16px text, clear border ---- */
  input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], input[type=tel],
  input[type=password], input[type=search], input[type=url], select, textarea {
    min-height: var(--m-tap); font-size: 16px; padding: 10px 12px; border-radius: 12px;
    border: 1.5px solid #CBD3E6; background: #fff; color: var(--m-ink);
  }
  input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; text-align: left; }
  input::placeholder, textarea::placeholder { color: #7A8399; opacity: 1; font-size: 15px; }
  input:focus, select:focus, textarea:focus { border-color: var(--m-primary); box-shadow: 0 0 0 4px rgba(29,78,216,.14); outline: none; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  /* checkbox ko bada tap area */
  td.c-sel, .c-sel { display: flex; align-items: flex-start; justify-content: center; min-height: 44px; }
  td.c-sel input[type=checkbox] { margin-top: 4px; }

  /* django field errors: laal + text (sirf color nahi) */
  .errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--m-danger); font-size: 13px; font-weight: 600; }
  .errorlist li::before { content: "! "; font-weight: 800; }
  .errorlist + input, .errorlist ~ input { border-color: var(--m-danger); }

  /* ---- search / filter bar: wrap hoke saaf layout (pehle select "S" tak sikud jaate the) ---- */
  .search-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
  .search-bar > * { min-width: 0; margin: 0; }
  .search-bar input[type=text], .search-bar input[type=search] { order: -1; flex: 1 1 100%; max-width: none; width: 100%; }
  .search-bar select { flex: 1 1 140px; width: auto; }
  .search-bar input[type=date] { flex: 1 1 100%; width: 100%; }
  .search-bar .pm-field-hint { display: block; flex: 1 1 100%; margin: 2px 0 -4px; font-size: 12.5px; font-weight: 600; color: var(--m-muted); }
  .search-bar > button, .search-bar > .btn { flex: 1 1 100%; }
  .search-bar > a.btn { flex: 1 1 100%; }

  /* ---- stat cards: barabar 2-column grid ---- */
  .stat-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
  .stat-card { min-width: 0 !important; width: auto; padding: 12px 14px; border-radius: var(--m-radius); }
  .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-card .stat-number { font-family: inherit !important; font-size: 26px; line-height: 1.1; }
  .stat-card .stat-label { letter-spacing: .04em; line-height: 1.3; }

  /* Contacts -> Follow-up -> Partner strip */
  .pm-pipe-i { padding: 12px 4px; border-radius: var(--m-radius); min-height: 84px; }
  .pm-pipe-i b { font-family: inherit !important; font-size: 24px; }
  .pm-pipe-i span { font-size: 12.5px; line-height: 1.2; }
  .pm-pipe-a { font-size: 20px; }
  .vt-sum-i b, .vt-fn b { font-family: inherit !important; }

  /* ---- party cards (list) ---- */
  table.party-cards tr { padding: 14px; border-radius: var(--m-radius); box-shadow: 0 1px 2px rgba(16,24,48,.04); }
  table.party-cards td.c-name { font-size: 16px; font-weight: 700; line-height: 1.3; }
  table.party-cards td.c-phone a, table.party-cards td.c-phone { font-size: 15px; }
  table.party-cards td.c-phone a { display: inline-flex; align-items: center; min-height: 44px; color: var(--m-primary); text-decoration: none; }
  table.party-cards td.c-next { color: var(--m-primary); font-size: 12.5px; }
  table.party-cards td.c-company, table.party-cards td.c-city { font-size: 13px; color: var(--m-muted); }
  .row-actions, table.party-cards .row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: stretch; }
  .row-actions form { display: contents; }
  .row-actions .btn { flex: 1 1 calc(50% - 4px); min-height: 44px; height: auto; font-size: 14px; padding: 0 12px; white-space: normal; }
  .row-actions .btn-icon { flex: 0 0 44px; width: 44px; min-width: 44px; padding: 0; }
  table.party-cards .row-actions .btn-icon, .row-actions .btn-icon { flex: 0 0 44px !important; width: 44px; min-width: 44px; padding: 0; }
  #bulk-action-bar { gap: 8px; }
  #bulk-action-bar .btn { min-height: 44px; height: auto; font-size: 14px; }

  /* tables jo card nahi bante: side-scroll (pehle kinara kat jaata tha) */
  .content table.data-table:not(.pm-cards):not(.party-cards) {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%;
  }
  .content table.data-table th, .content table.data-table td { font-size: 14px; }


  /* ---- forms: ek column, sticky Save bar (thumb zone) ---- */
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; }
  .form-grid > * { grid-column: 1 / -1 !important; min-width: 0; }
  #party-profile .form-grid > div { padding: 6px 0; border-bottom: 1px solid #EEF1F8; font-size: 14.5px; }
  #party-profile .form-grid > div:last-child { border-bottom: 0; }
  .form-section-title { font-size: 12px; }
  .pm-form-actions {
    position: sticky; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 50;
    display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin: 20px -6px 0 !important; padding: 10px 6px;
    background: rgba(255,255,255,.96); border-top: 1px solid var(--m-line); border-radius: 14px;
  }
  body.pm-kb-open .pm-form-actions { bottom: 0; }

  /* touch par hover-highlight atka na rahe + table cell reset in cards */
  table.data-table tbody tr:hover td { background: transparent; }
  table.party-cards td { background: transparent !important; white-space: normal !important; width: auto !important; }
  table.party-cards td.c-act, table.party-cards td.actions-cell { width: 100% !important; text-align: left; }
  table.party-cards tr { grid-template-columns: 34px minmax(0, 1fr) auto; }

  /* chhote text links ko bhi 44px tap area */
  table.party-cards td.c-name a { display: inline-flex; align-items: center; min-height: 44px; color: var(--m-primary); text-decoration: none; }
  a.pm-call { display: inline-flex; align-items: center; min-height: 44px; color: var(--m-primary); font-weight: 600; text-decoration: none; }
  .tabs { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tabs a { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
  td[data-label="Party"] a { display: inline-flex; align-items: center; min-height: 44px; }

  /* ---- empty / loading / error states ---- */
  .empty-state, td.empty-state {
    text-align: center; color: var(--m-muted); font-size: 14.5px; line-height: 1.5;
    padding: 28px 16px !important; background: transparent; text-transform: none; letter-spacing: 0;
  }
  .pm-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
  .messages { list-style: none; padding: 0; margin: 0 0 12px; }
  .messages li { padding: 12px 14px; border-radius: 12px; background: var(--m-primary-soft); color: #14338F; font-size: 14px; font-weight: 600; }

  /* ---- toasts bottom-nav ke upar, poori width ---- */
  #pm-toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .pm-toast { border-radius: 14px; font-size: 14px; }

  /* ---- BOTTOM NAV: SVG icons, 64px, thumb zone ---- */
  .pm-bottom-nav {
    height: calc(64px + env(safe-area-inset-bottom, 0px)); align-items: stretch;
    background: #fff; border-top: 1px solid var(--m-line); box-shadow: 0 -2px 12px rgba(16,24,48,.06);
    padding: 0 4px env(safe-area-inset-bottom, 0px);
  }
  .pm-bottom-nav a {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 2px !important; font-size: 12px !important; font-weight: 600; color: var(--m-muted);
    box-shadow: none !important; position: relative; -webkit-tap-highlight-color: transparent;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pm-bottom-nav a i {
    display: grid !important; place-items: center; width: 52px; height: 30px; border-radius: 15px; margin: 0 !important;
    transition: background .15s;
  }
  .pm-bottom-nav a i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .pm-bottom-nav a.active { color: var(--m-primary); font-weight: 700; }
  .pm-bottom-nav a.active i { background: var(--m-primary-soft); }
  .pm-bottom-nav a:active i { background: var(--m-primary-soft); }
  body.pm-kb-open { padding-bottom: 0 !important; }

  /* ---- drawer ---- */
  .sidebar nav a { min-height: 48px; font-size: 15px; }
  .sidebar .link-btn { min-height: 44px; padding: 0 8px; }

  /* ---- modals / sheets: bottom se, thumb ke paas ---- */
  .modal, .rs-modal, [class*="modal-card"], [class*="-modal-box"] { max-height: 92dvh; overflow-y: auto; border-radius: 18px; }

  /* ---- Visit & Tour tabs / chips ---- */
  .vt-tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 14px; }
  .vt-phone { display: inline-flex; align-items: center; min-height: 44px; }
  .vt-card { padding: 14px; border-radius: var(--m-radius); }
  .vt-sum-i.on { border-color: var(--m-primary); }
  .vt-tabs a.active { background: var(--m-primary); }
  .vt-badge { background: var(--m-primary-soft); color: #14338F; }
}

@media (max-width: 340px) {
  .stat-row { grid-template-columns: 1fr; }
  .row-actions .btn { flex-basis: 100%; }
}

/* ======================================================================
   LOGIN / SETUP / FORGOT PASSWORD  (<= 900px): heavy animation band,
   card turant dikhe (pehle opacity:0 se 1.2 sec blank rehta tha)
   ====================================================================== */
@media (max-width: 900px) {
  body.login-body { background: var(--m-bg); }
  .lp-glow, .lp-panel-deco { display: none !important; }
  .lp-card { opacity: 1 !important; transform: none !important; animation: none !important; }
  .lp-card, .lp-field input, .lp-btn-login { font-size: 16px; }
  .lp-field input { min-height: 52px; border-radius: 12px; }
  .lp-field label { font-size: 12px; letter-spacing: .4px; color: #5B6478; }
  .lp-btn-login { min-height: 52px; border-radius: 12px; }
  .lp-remember { min-height: 44px; }
  .lp-remember input { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-card, .lp-headline h1 .lp-word, .lp-sub { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ======================================================================
   HOME DASHBOARD (employee) - 6 count cards + Call Not Connected (reason ke saath)
   ====================================================================== */
.hd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 900px) { .hd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.hd-card {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 14px; text-decoration: none; color: var(--m-ink);
  background: #fff; border: 1px solid var(--m-line); border-left: 5px solid var(--m-primary);
  border-radius: var(--m-radius); box-shadow: 0 1px 2px rgba(16,24,48,.04);
}
.hd-card:active { background: var(--m-primary-soft); }
.hd-card b { font-size: 30px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.hd-card span { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.hd-card small { font-size: 12px; color: var(--m-muted); line-height: 1.3; }
.hd-blue  { border-left-color: #1D4ED8; }
.hd-gold  { border-left-color: #C98A12; }
.hd-red   { border-left-color: var(--m-danger); }
.hd-red b { color: var(--m-danger); }
.hd-green { border-left-color: var(--m-ok); }
.hd-gray  { border-left-color: #6B7280; }
.hd-teal  { border-left-color: #0F8B8D; }
.hd-teal b { color: #0F8B8D; }

/* TODAY'S CALLING hero card (Home, employee) - phone ki asli call history se */
.hd-hero {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; margin-bottom: 12px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, #1D4ED8 0%, #0F8B8D 100%); border-radius: var(--m-radius);
  box-shadow: 0 4px 14px rgba(29,78,216,.25);
}
.hd-hero:active { filter: brightness(.94); }
.hd-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hd-hero-title { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.hd-hero-date { font-size: 12px; font-weight: 600; opacity: .85; }
.hd-hero-main { display: flex; align-items: center; gap: 14px; }
.hd-hero-main > b { font-size: 46px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.hd-hero-label { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; }
.hd-hero-label small { font-size: 12px; font-weight: 500; opacity: .9; }
.hd-hero-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255,255,255,.28); overflow: hidden; }
.hd-hero-bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.hd-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hd-st { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.16);
  font-size: 11.5px; font-weight: 600; line-height: 1.25; min-width: 0; }
.hd-st b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hd-st small { font-size: 11px; font-weight: 500; opacity: .9; }
@media (min-width: 900px) { .hd-hero-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.hd-nc { padding: 14px; }
.hd-nc-total { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--m-ink); }
.hd-nc-total b { font-size: 30px; font-weight: 800; color: var(--m-danger); font-variant-numeric: tabular-nums; }
.hd-nc-total span { font-size: 14px; font-weight: 700; }
.hd-nc-total small { font-size: 12px; font-weight: 500; color: var(--m-muted); }
.hd-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
@media (min-width: 900px) { .hd-reasons { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hd-reason {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 12px;
  background: #FDF3F2; border: 1px solid #F1CDC9; border-radius: 12px; text-decoration: none; color: var(--m-ink);
}
.hd-reason span { font-size: 13px; font-weight: 600; }
.hd-reason b { font-size: 20px; font-weight: 800; color: var(--m-danger); font-variant-numeric: tabular-nums; }
.hd-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hd-quick .btn { flex: 1 1 140px; }

/* drill-down list */
.hd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--m-line); }
.hd-row:last-of-type { border-bottom: 0; }
.hd-row-main { min-width: 0; }
.hd-row-name { font-weight: 700; font-size: 15px; color: var(--m-primary); text-decoration: none; word-break: break-word; }
.hd-row-sub { font-size: 12.5px; color: var(--m-muted); }
.hd-row-call { flex-shrink: 0; font-weight: 600; text-decoration: none; color: var(--m-primary); }

/* ======================================================================
   Mobile side-menu (hamburger) HATA DIYA - phone par sirf bottom nav.
   Logout ke liye topbar me chhota button (sirf <= 900px).
   ====================================================================== */
.pm-top-logout { display: none; margin: 0 0 0 auto; }
@media (max-width: 900px) {
  .sidebar, #pm-scrim, #pm-menu-btn { display: none !important; }
  .topbar { padding-left: 14px !important; }
  .pm-top-logout { display: block; flex-shrink: 0; }
  .pm-top-logout button {
    min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--m-line); background: #fff;
    color: var(--m-muted); font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .topbar > .btn, .topbar > a.btn { margin-left: auto; }
  .topbar > .btn + .pm-top-logout, .topbar > a.btn + .pm-top-logout { margin-left: 8px; }
}

/* Visit report (admin desktop): shop photo thumbnail */
.vt-shop-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--m-line); display: block; }

/* ======================================================================
   STATE FILTER (multi-select) + CITY - phone UI  (Business Partner / analytics filters)
   Pehle: .ea-field span ka chhota grey text list ke naam par lag raha tha, sheet 640px par hi
   banti thi, buttons chhote the. Ab: poori width, 48px field, bada saaf bottom-sheet.
   ====================================================================== */
@media (max-width: 720px) {
  .ea-filter { gap: 10px; }
  .ea-filter .ea-field, .ea-filter .pm-ms-field { flex: 1 1 100%; min-width: 0; width: 100%; }
  .ea-field > span:first-child { font-size: 13px; color: var(--m-ink); font-weight: 700; }
  .ea-field select, .ea-field input { width: 100%; box-sizing: border-box; }

  .pm-ms-btn {
    min-height: var(--m-tap); padding: 10px 12px; border: 1.5px solid #CBD3E6; border-radius: 12px;
    font-size: 16px; background: #fff; color: var(--m-ink);
  }
  .pm-ms-btn.has, .pm-ms.open .pm-ms-btn { border-color: var(--m-primary); background: var(--m-primary-soft); }
  .pm-ms-btn .pm-ms-text { font-size: 16px; font-weight: 500; color: var(--m-ink); }
  .pm-ms-badge { background: var(--m-primary); font-size: 12px; line-height: 20px; padding: 0 8px; }

  /* bottom sheet (<= 720px, bottom-nav ke upar) */
  .pm-ms.open::after { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1190; }
  .pm-ms-panel {
    position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; top: auto; width: auto; min-width: 0; margin: 0;
    max-height: 82dvh; display: flex; flex-direction: column; padding: 14px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(16,24,48,.25);
  }
  .pm-ms-panel[hidden] { display: none; }
  .pm-ms-head { gap: 8px; }
  .pm-ms-search { min-height: var(--m-tap); font-size: 16px; border: 1.5px solid #CBD3E6; border-radius: 12px; padding: 10px 12px; }
  .pm-ms-x { display: grid; place-items: center; width: var(--m-tap); height: var(--m-tap); border-radius: 12px; font-size: 26px; flex: none; }
  .pm-ms-tools { margin: 10px 0 6px; gap: 8px; }
  .pm-ms-tools button { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
  .pm-ms-count { font-size: 13px; }
  .pm-ms-list { max-height: none; flex: 1 1 auto; min-height: 140px; -webkit-overflow-scrolling: touch; }
  .pm-ms-list label { min-height: 48px; padding: 8px 10px; font-size: 16px; font-weight: 500; color: var(--m-ink); border-radius: 10px; }
  .pm-ms-list label span { font-size: 16px !important; font-weight: 500 !important; color: var(--m-ink) !important; }
  .pm-ms-list input:checked + span { font-weight: 700 !important; color: var(--m-primary) !important; }
  .pm-ms-list input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--m-primary); }
  .pm-ms-foot { display: block; margin-top: 10px; }
  .pm-ms-done { min-height: var(--m-tap); border-radius: 12px; background: var(--m-primary); font-size: 16px; }
  .pm-city-field[hidden] { display: none; }
}
