/*  styles/crm-light.css — app ka LIGHT roop = landing (marketing site) ka roop
    ===========================================================================
    Maalik (23 Oct 2026): "app.brokers99 dark theme .. landing light theme mein
    taal mel nahin ban raha", aur: "jab landing page sae application kae andar
    jaye toa usae yeh feel nahin aana chahiye ki woh kahin alag si application
    koa use kar raha hai jaise facebook mein ... is rule kao strictly follow
    karoa". Poochhne par: har broker ek baar light par (theme menu bacha), aur
    admin portal abhi nahi.

    Yeh file theme TOKEN wale hisse ka ilaaj hai: landing ke wahi ank, wahi
    font, wahi card / button / chip ki shakl. Haath se likhe rang (crm-core ke
    hex) `app/light-theme.js` sambhalti hai -- dono milkar ek roop.

    ⚠️ Sab kuch `html:not(.dark)` ke andar: dark ke chaaron theme ek byte nahi
       badle.
    ⚠️ YEH FILE index.html ke <head> me <style> NAHI hai -- crm-phone.css wali
       hi wajah: `crmScopedCss` head ka har <style> bani hui form file
       (property-form.js, client-form.js) me pakata hai, aur unki hash-locked
       copy teen repo me hain. Portal par form apne portal ke rang pehenta hai;
       yeh niyam sirf CRM ke SHELL ka hai. head ka purana light block (index.html,
       "Theme: Light Mode") niche ki neev hai -- yeh file ke na chadhne par wahi
       chalta hai.
    ⚠️ Landing ke ank badlein (landing/index.html ka :root) to yahan bhi --
       `tests/app-light-theme.test.mjs` dono ko milata hai.
=========================================================================== */

/* ── 1. Landing ke rang (landing/index.html ka :root) ───────────────────── */
html:not(.dark) {
  --bg-app: #eef2f7;            /* landing --bg */
  --bg-card: #ffffff;           /* landing --card */
  --bg-input: #eef2f7;          /* landing ka search pill */
  --bg-subtle: #f3f6fa;
  --bg-button-gray: #e3e8f0;
  --text-main: #0f1a30;         /* landing --text */
  --text-muted: #334155;        /* landing --muted */
  --text-dim: #475569;          /* landing --soft */
  --text-placeholder: #434f63;   /* 30 Oct 2026: #5b6472 se (#eef2f7 par 5.32), ab 7.36 */
  --border-soft: #dfe4ec;       /* landing --line, safed par */
  --border-control: #b6bfcc;
  --border-main: #8f98a6;       /* khaane / control ki hadd ~3:1 */
  --border-input: #7e8796;
  --shadow-card: none;
  --accent: #1d4ed8;            /* landing --blue */
  --accent-strong: #1e3a8a;     /* landing --blue-dk */
  --accent-soft: #eef3ff;       /* landing --blue-lt */
  /*  27 Oct 2026: neela AKSHAR 800 par (#1e40af, safed par 8.7:1) -- har rang-
      parivaar ka akshar 800 hai (app/light-theme.js ka palette), aur dhoop ka
      niyam 7:1 hai. #1d4ed8 (6.7:1) button / bharaai ka brand neela hi rehta
      hai (--accent, --rb-primary-bg). */
  --accent-text: #1e40af;
  /*  Tab bar (crm-core NAV_ON / NAV_OFF): chuna hua brand neela, baaki landing
      ka --soft. Dark me in dono ka fallback purana hai. */
  --nav-on: #1d4ed8;
  --nav-off: #475569;
  /* Button system (index.html ka rb-button-system) -- landing ka neela */
  --rb-primary-bg: #1d4ed8; --rb-primary-bd: #1d4ed8;
  --rb-call-bg: #1d4ed8; --rb-call-bd: #1d4ed8;
  --rb-shadow: none;
  --rb-disabled-bg: #e3e8f0; --rb-disabled-bd: #cbd5e1; --rb-disabled-fg: #64748b;
  --rb-ring: rgba(29, 78, 216, .35);
}

/* ── 2. Landing ka font (landing --f-body) ─────────────────────────────── */
html:not(.dark) body, html:not(.dark) #root,
html:not(.dark) .bt, html:not(.dark) .rb-btn {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif !important;
}

/* ── 3. Card, button, chip -- landing ki shakl ──────────────────────────── */
/*  Landing ka card: safed, 1px halki lakeer, 12px kone, parchhaai nahi. */
html:not(.dark) .cd { border-radius: 12px; border-color: var(--border-soft); box-shadow: none; }
html:not(.dark) .cd:hover { transform: none; box-shadow: 0 4px 14px rgba(15, 26, 48, .08); border-color: var(--border-soft); }
/*  Landing ka button: 10px kone, bina chamak ki parchhaai. */
html:not(.dark) .bt { border-radius: 10px; box-shadow: none; }
html:not(.dark) .bt:hover { filter: none; box-shadow: none; }
html:not(.dark) .bp { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
html:not(.dark) .bg { background: #e8edf5; border-color: #e8edf5; color: #0f1a30; }
html:not(.dark) .rb-btn { border-radius: 10px; }
html:not(.dark) .rb-btn:hover { filter: none; box-shadow: none; }
html:not(.dark) .rb-btn--neutral { --rb-neutral-bg: #e8edf5; --rb-neutral-bd: #e8edf5; --rb-neutral-fg: #0f1a30; }
/*  Landing ki chip: safed, #cbd5e1 lakeer; chuni hui -- halka neela. */
html:not(.dark) .ch { background: #fff; border-color: #cbd5e1; color: #0f1a30; }
html:not(.dark) .ca { background: #eef3ff; border-color: #c7d6f5; color: #1e40af; }

/* ── 4. Neeche ki patti -- landing ka tab bar ───────────────────────────── */
html:not(.dark) .app-bottom-nav { background: #fff !important; border-top: 1px solid rgba(15, 26, 48, .1) !important; box-shadow: none !important; }

/* ── 5. Pehla pal (boot splash) -- React se pehle ka login, landing jaisa ── */
/*  Splash index.html me haath ke inline rang se bana hai (JS se pehle paint
    hota hai). Light me use asli login jaisa hi dikhna hai, warna khulte hi ek
    pal dark card aur phir light -- wahi jhatka jise rokne ko splash bana.
    Yeh ank asli login ke LIGHT roop se NAAPE gaye hain (23 Oct 2026, Chromium,
    app/light-theme.js ke baad ka computed style). Nishaan aur "Brokers99"
    dono theme me ek hain (inline), unke liye yahan kuch nahi. */
html:not(.dark) #boot-splash { background: #eef2f7 !important; color: #0f1a30 !important; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important; }
html:not(.dark) #boot-splash .bs-card { background: #fff !important; border-color: #dfe4ec !important; box-shadow: 0 1px 3px rgba(15, 26, 48, .08) !important; }
html:not(.dark) #boot-splash .bs-head { color: #0d46a0 !important; }
html:not(.dark) #boot-splash .bs-label,
html:not(.dark) #boot-splash .bs-note { color: #0f1a30 !important; }
html:not(.dark) #boot-splash .bs-in { background: #eef2f7 !important; border: 0 !important; border-bottom: 1px solid #7e8796 !important; border-radius: 10px 10px 0 0 !important; color: #0f1a30 !important; }
html:not(.dark) #boot-splash .bs-btn { background: #1d4ed8 !important; border-radius: 10px !important; font-weight: 600 !important; }
html:not(.dark) #boot-splash .bs-sign { color: #270da0 !important; }
html:not(.dark) #boot-splash .bs-forgot { color: #30497e !important; }
html:not(.dark) #boot-splash .bs-foot,
html:not(.dark) #boot-splash .bs-wait { color: #475569 !important; }
html:not(.dark) #boot-splash .bs-ring { border-color: rgba(29, 78, 216, .2) !important; border-top-color: #1d4ed8 !important; }

/* ── Form: AI console aur Save (30 Oct 2026) ─────────────────────────────────
   Asli Add Seller form 375px par naapa. `lead-capture.js` apni CSS me token
   nahi rakhti, aur light-theme.js ka palette in bataan par adhoora tha:
     AI box ka hint          #94a0b5 par 2.35:1
     "AI Details"            safed, gradient ke halke sire par 2.98:1
   Rang wahi parivaar (indigo, teal, hara), bas 7:1 wala step. */
html:not(.dark) .rudra-lc.rudra-lc .lc-ta::placeholder { color: var(--text-placeholder); }
/*  15 Nov 2026: focus par lead-capture.js `background:#0e1220!important` likhti
    hai -- light form ke beech likhte waqt box KAALA (maalik ke screenshot).
    Light me khaane ka apna rang; focus ki pehchaan indigo kinara + ghera. */
html:not(.dark) .rudra-lc.rudra-lc .lc-ta:focus { background: var(--bg-input) !important; border-color: #4338ca !important; }
html:not(.dark) .rudra-lc.rudra-lc .lc-ta { caret-color: #4338ca; }
html:not(.dark) .rudra-lc.rudra-lc .lc-mode-btn.on,
html:not(.dark) .rudra-lc.rudra-lc .lc-primary {
  background: #4338ca !important;
  color: #fff !important;
}
html:not(.dark) .rudra-lc.rudra-lc .lc-voice.idle { background: #115e59 !important; color: #fff !important; }
html:not(.dark) .bt.bs { background-color: #166534 !important; border-color: #166534 !important; }
/*  Owner / Builder / Broker wale khaanon ki hadd tone ke 25% rang se: 1.2-1.4:1.
    light-theme.js 0.3 se halke kinare ko chhodti hai, isliye yahan. Sirf
    paardarshi inline kinara; laal aur thos kinare apne rang par. */
html:not(.dark) input[style*="border-color: rgba("]:not(:focus),
html:not(.dark) input[style*="border: 1px solid rgba("]:not(:focus),
html:not(.dark) select[style*="border-color: rgba("]:not(:focus),
html:not(.dark) select[style*="border: 1px solid rgba("]:not(:focus),
html:not(.dark) textarea[style*="border-color: rgba("]:not(:focus),
html:not(.dark) textarea[style*="border: 1px solid rgba("]:not(:focus) {
  border-color: var(--border-input) !important;
}

/* ── 6. 4.0 portal (admin / super admin / builder) ke token (14 Nov 2026) ── */
/*  Maalik: "super admin panel ko dark and light theme dono me banana hai aur
    toggle switch header me". components/q40-ui.js ka `T` palette har rang
    var(--q40-naam, <dark hex>) likhta hai: DARK ka ank wahi fallback hai (purana
    hex byte-for-byte, isliye dark ke chaaron roop ek byte nahi badle), aur LIGHT
    ka ank yahan -- landing ke (upar §1 ke PAGE / CARD / INK), akshar slate-800 /
    600 (dhoop ke liye 7:1+), accent landing ka #1d4ed8 aur uspar safed akshar.
    ⚠️ index.html ke head <style> me JAAN-BOOJH KAR nahi: crmScopedCss head ka
    har <style> property-form / client-form me pakata hai -- wahan ek line
    badalte hi dono form file dobara banani padti aur teen repo me copy. Yahan
    (link, head ka <style> nahi) wo chakkar nahi. Dono theme ka contrast
    tests/q40-theme.test.mjs naapta hai. Haal ke rang (good / warn / bad)
    index.html ke --status-* se hi aate hain. */
html:not(.dark) {
  --q40-bg: #eef2f7;
  --q40-panel: #f3f6fa;
  --q40-card: #ffffff;
  --q40-border: #cbd5e1;
  --q40-ink: #0f1a30;
  --q40-ink2: #1e293b;
  --q40-mut: #475569;
  --q40-line: #e2e8f0;
  --q40-accent: #1d4ed8;
  --q40-on-tone: #ffffff;
  --q40-chip: #e2e8f0;
  --q40-chip-bd: #cbd5e1;
  --q40-chip-ink: #1e293b;
  --q40-field-bd: #8391a6;
  --q40-primary-bg: #1d4ed8;
  --q40-primary-bd: #1d4ed8;
  --q40-primary-ink: #ffffff;
  --q40-danger-bg: #fee2e2;
  --q40-danger-bd: #fca5a5;
  --q40-danger-ink: #991b1b;
  --q40-neutral: #475569;
  --q40-skel: #e2e8f0;
  --q40-thumb: #cbd5e1;
  --q40-focus: #1d4ed8;
  --q40-placeholder: #505966;
  --q40-shadow: 0 10px 30px rgba(15,26,48,.12);
  --q40-row-alt: rgba(15,26,48,.025);
  --q40-row-hover: rgba(29,78,216,.06);
  --q40-row-sel: rgba(29,78,216,.10);
  /* 15 Nov 2026 (s5-07): screens ke apne hex ke token -- chuna hua / dim / well, aur haal ke tint (bg / bd / ink). */
  --q40-sel-bd: #1d4ed8;
  --q40-dim-bd: #cbd5e1;
  --q40-dim-ink: #64748b;
  --q40-well: #e9eef5;
  --q40-good-bg: #dcfce7;
  --q40-good-bd: #86efac;
  --q40-good-ink: #166534;
  --q40-warn-bg: #fef3c7;
  --q40-warn-bd: #fcd34d;
  --q40-warn-ink: #92400e;
  --q40-bad-bg: #fee2e2;
  --q40-bad-bd: #fca5a5;
  --q40-bad-ink: #991b1b;
  --q40-info-bg: #dbeafe;
  --q40-info-bd: #93c5fd;
  --q40-info-ink: #1e40af;
  --q40-violet-bg: #ede9fe;
  --q40-violet-bd: #c4b5fd;
  --q40-violet-ink: #5b21b6;
}
