/* ==========================================================
   न्यूज़रूम एडमिन: Bootstrap 5 के ऊपर अपना थीम
   ब्रांड रंग --brand सेटिंग से आता है (layout में <style>)
   ========================================================== */

:root {
  --brand: #d71920;
  --brand-ink: #ffffff;
  --side-bg: #141417;
  --side-ink: #d6d3da;
  --side-muted: #85808c;
  --side-hover: #212026;
  --page-bg: #f4f3f3;
  --panel-bg: #ffffff;
  --line: #e7e4e5;
  --ink: #1c1b1d;
  --muted: #6d6873;
  --radius: 10px;
  --font-ui: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans Devanagari", "Mukta", system-ui, sans-serif;
  --bs-body-font-family: var(--font-ui);
  --bs-primary: var(--brand);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: color-mix(in srgb, var(--brand) 80%, #000);
  /* Phase 16 (सुलभता): Bootstrap लिंक का नीला हल्की पृष्ठभूमि पर 4.5:1 से कम था */
  --bs-link-color-rgb: 10, 88, 202;
  --bs-link-hover-color-rgb: 8, 66, 152;
}
[data-bs-theme="dark"] {
  --side-bg: #0b0a0d;
  --side-hover: #1b1a20;
  --page-bg: #111013;
  --panel-bg: #1a191d;
  --line: #2d2b32;
  --ink: #ecebee;
  --muted: #a6a1ac;
  --bs-body-bg: #111013;
  --bs-link-color: color-mix(in srgb, var(--brand) 70%, #fff);
  --bs-link-color-rgb: 110, 168, 254;
  --bs-link-hover-color-rgb: 158, 197, 254;
}

html, body { height: 100%; }
body.admin, body.auth-page { background: var(--page-bg); color: var(--ink); font-family: var(--font-ui); font-size: 15px; }
a { text-decoration: none; }
.skip-link { position: absolute; z-index: 2000; top: 8px; left: 8px; background: var(--panel-bg); padding: 6px 12px; border-radius: 6px; }

/* ---------- बटन ---------- */
.btn { font-weight: 600; border-radius: 8px; }
.btn-brand { --bs-btn-color: var(--brand-ink); --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 85%, #000); --bs-btn-hover-border-color: color-mix(in srgb, var(--brand) 85%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--brand) 75%, #000); --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm.btn-icon { width: 30px; height: 30px; }
.btn-ghost { border: 1px solid transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--page-bg); color: var(--ink); border-color: var(--line); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: color-mix(in srgb, var(--brand) 60%, #fff); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-label { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.page-link { color: var(--ink); }
.active > .page-link { background: var(--brand); border-color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- ढाँचा ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.shell-main { display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1; padding: 22px 26px 40px; outline: none; }
.admin-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 26px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- साइडबार ---------- */
.sidebar { background: var(--side-bg); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.sidebar-brand { padding: 18px 18px 14px; border-bottom: 1px solid #ffffff10; }
.brand-mark { display: inline-flex; align-items: center; font-weight: 800; font-size: 20px; line-height: 1; color: #fff; }
.brand-mark img { max-height: 40px; max-width: 190px; width: auto; }
.bm-a { background: var(--brand); color: #fff; padding: 6px 8px 4px; border-radius: 4px 0 0 4px; }
.bm-b { border: 2px solid var(--brand); border-left: 0; padding: 4px 8px 2px; border-radius: 0 4px 4px 0; }
.bm-a:only-child { border-radius: 4px; }
.brand-sub { display: block; margin-top: 8px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--side-muted); font-weight: 700; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.nav-group { margin-top: 10px; }
.nav-group-label { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--side-muted); font-weight: 700; padding: 6px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--side-ink); font-weight: 500; font-size: 15px; position: relative; }
.nav-item i { color: var(--side-muted); }
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item.active { background: color-mix(in srgb, var(--brand) 22%, transparent); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item.active i { color: #fff; }
.sidebar-foot { padding: 12px 18px; border-top: 1px solid #ffffff10; font-size: 13.5px; }
.sidebar-foot a { color: var(--side-muted); }
.sidebar-foot a:hover { color: #fff; }
.sidebar-backdrop { display: none; }

/* ---------- टॉपबार ---------- */
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; padding: 10px 26px; background: color-mix(in srgb, var(--panel-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.quick-search { position: relative; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; background: var(--page-bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; color: var(--muted); }
.quick-search:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, #fff); }
.quick-search input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; padding: 8px 0; color: var(--ink); }
.quick-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050; max-height: 360px; overflow-y: auto; }
.quick-results .list-group-item.active { background: var(--brand); border-color: var(--brand); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel-bg); border-radius: 999px; padding: 3px 12px 3px 3px; color: var(--ink); }
.user-btn b { display: block; font-size: 14px; }
.user-btn small { font-size: 12px; color: var(--muted); }
.notif-menu { width: 300px; }

/* ---------- अवतार ---------- */
.avatar { --h: 0; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  background: hsl(var(--h) 45% 42%); color: #fff; font-weight: 800; font-size: 15px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.xl { width: 72px; height: 72px; font-size: 28px; }
.avatar.icon { background: var(--page-bg); color: var(--muted); }

/* ---------- पेज हेडर ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; font-weight: 800; margin: 0; line-height: 1.25; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.breadcrumb { font-size: 13px; margin-bottom: 4px; }
.breadcrumb a { color: var(--muted); }

/* ---------- पैनल ---------- */
.panel { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 16.5px; font-weight: 700; margin: 0; }
.panel-body { padding: 16px; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.panel-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.panel-tabs a { padding: 11px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.panel-tabs a span { font-size: 12px; background: var(--page-bg); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.panel-tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.input-icon { position: relative; min-width: 200px; }
.input-icon i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.input-icon .form-control { padding-left: 34px; }
.form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding: 12px 16px; background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -6px 18px rgba(0,0,0,.04); }
.empty-state { padding: 38px 16px; text-align: center; color: var(--muted); }
.empty-state i { font-size: 34px; opacity: .4; display: block; margin-bottom: 8px; }
.empty-state p { margin: 0; }

/* ---------- टेबल ---------- */
.data-table { --bs-table-bg: transparent; }
.data-table thead th { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .3px; background: var(--page-bg); border-bottom: 1px solid var(--line); white-space: nowrap; padding: 10px 12px; }
.data-table td { padding: 11px 12px; border-color: var(--line); }
.badge-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background-color: color-mix(in srgb, var(--bs-success) 14%, transparent) !important; }
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status.text-bg-success { color: var(--bs-success-text-emphasis) !important; background-color: var(--bs-success-bg-subtle) !important; }
.badge-status.text-bg-danger { color: var(--bs-danger-text-emphasis) !important; background-color: var(--bs-danger-bg-subtle) !important; }
.badge-status.text-bg-warning { color: var(--bs-warning-text-emphasis) !important; background-color: var(--bs-warning-bg-subtle) !important; }
.badge-status.text-bg-secondary { color: var(--bs-secondary-text-emphasis) !important; background-color: var(--bs-secondary-bg-subtle) !important; }
.role-chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 6px; background: var(--page-bg); border: 1px solid var(--line); white-space: nowrap; }
.role-super-admin { background: var(--brand); color: #fff; border-color: var(--brand); }
.role-admin { background: #1c1b1d; color: #fff; border-color: #1c1b1d; }
[data-bs-theme="dark"] .role-admin { background: #ecebee; color: #1c1b1d; }
.role-editor { background: #e8f0fb; color: #1d4f91; border-color: #cfdef4; }
.role-reporter { background: #e8f6ee; color: #1b6b3f; border-color: #cdeadb; }
[data-bs-theme="dark"] .role-editor { background: #172437; color: #8bb7f0; border-color: #24364f; }
[data-bs-theme="dark"] .role-reporter { background: #13271c; color: #7fd3a2; border-color: #1f3a2a; }
.action-chip { display: inline-block; font-family: ui-monospace, monospace; font-size: 12px; padding: 1px 8px; border-radius: 5px; background: var(--page-bg); border: 1px solid var(--line); }
.act-delete { color: var(--bs-danger); } .act-create { color: var(--bs-success); } .act-login { color: #2360a5; }

/* ---------- डैशबोर्ड ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card { position: relative; display: flex; gap: 14px; align-items: flex-start; background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .15s; }
.stat-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.stat-card.is-alert { border-color: color-mix(in srgb, var(--bs-danger) 50%, var(--line)); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-size: 18px; flex: none; }
.stat-body { display: grid; min-width: 0; }
.stat-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.chart-box { position: relative; height: 280px; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 14px; }
.bl-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-track { height: 9px; background: var(--page-bg); border-radius: 5px; overflow: hidden; }
.bl-track span { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.bar-list b { text-align: right; font-variant-numeric: tabular-nums; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.activity li:first-child { border-top: 0; }
.activity small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.activity.compact li { padding: 9px 16px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; padding: 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.roadmap { padding: 8px 16px 16px; display: grid; gap: 10px; }
.rm-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; }
.rm-phase { font-size: 12px; font-weight: 800; color: var(--brand); padding-top: 3px; }
.rm-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-mods span { font-size: 12.5px; background: var(--page-bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.rm-mods i { margin-right: 3px; }

/* ---------- रोल ---------- */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.role-card { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.role-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.role-card p { color: var(--muted); font-size: 14px; margin: 0; min-height: 42px; }
.role-card dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.role-card dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.role-card dd { margin: 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.role-card .progress { height: 5px; }
.role-card .progress-bar { background: var(--brand); }
.role-card footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.matrix-wrap { max-height: 70vh; }
.matrix { font-size: 14px; }
.matrix-head th { position: sticky; top: 0; z-index: 2; background: var(--panel-bg); font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix td, .matrix th { vertical-align: middle; border-color: var(--line); padding: 7px 8px; }
.mx-module { min-width: 240px; position: sticky; left: 0; background: var(--panel-bg); z-index: 1; font-weight: 500; }
.mx-group th { background: var(--page-bg) !important; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.matrix tr.is-future .mx-module span, .matrix tr.is-future .mx-module { color: var(--muted); }
.matrix .form-check-input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.lg-role { background: var(--page-bg); border: 1px solid var(--line); } .lg-allow { background: var(--bs-success); } .lg-deny { background: var(--bs-danger); }
.ov { border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; font-size: 13px; background: var(--panel-bg); color: var(--muted); }
.ov.from-role { color: var(--bs-success); font-weight: 700; }
.ov.ov-allow { background: var(--bs-success); color: #fff; border-color: var(--bs-success); }
.ov.ov-deny { background: var(--bs-danger); color: #fff; border-color: var(--bs-danger); }
.diff .old { color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); word-break: break-word; }
.diff .new { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); word-break: break-word; }
.confirm-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--bs-danger); background: var(--bs-danger-bg-subtle); }

/* ---------- लॉगिन पेज (लॉगिन, पासवर्ड भूलें/रीसेट, OTP) ---------- */
body.auth-page { background: var(--page-bg); }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-art { background: var(--brand-2, var(--side-bg)); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 52px; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(70% 55% at 100% 0%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 65%),
  radial-gradient(50% 40% at 0% 100%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%),
  repeating-linear-gradient(0deg, #ffffff07 0 1px, transparent 1px 30px); }
.auth-art::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand); }
.aa-logo { display: inline-flex; align-self: flex-start; }
.aa-logo img { max-height: 58px; max-width: 280px; width: auto; display: block; }
.aa-logo-chip { background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: inline-flex; }
.aa-logo-chip img { max-height: 44px; }
.brand-mark-lg { font-size: 34px; }
.brand-mark-lg .bm-a { padding: 9px 12px 6px; } .brand-mark-lg .bm-b { padding: 7px 12px 4px; color: #fff; }
.brand-mark-lg img { max-height: 64px; max-width: 280px; }
.aa-mid { max-width: 440px; }
.aa-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #fff; background: #ffffff14; border: 1px solid #ffffff22; padding: 5px 12px; border-radius: 99px; }
.aa-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); }
.aa-title { font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; line-height: 1.25; margin: 18px 0 26px; color: #fff; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; font-size: 16px; color: #e6e3ea; }
.auth-points li { display: flex; align-items: center; gap: 12px; }
.auth-points i { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #ffffff12; border: 1px solid #ffffff1c; color: #fff; }
.aa-cards { display: grid; gap: 10px; max-width: 360px; }
.aa-card { background: #ffffff0f; border: 1px solid #ffffff1a; border-radius: 12px; padding: 12px 14px; display: grid; gap: 7px; backdrop-filter: blur(4px); }
.aa-card.two { margin-left: 36px; opacity: .8; }
.aa-card span { height: 7px; border-radius: 4px; background: #ffffff30; } .aa-card .w70 { width: 70%; } .aa-card .w50 { width: 50%; }
.aa-pill { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .5px; background: var(--brand); color: #fff; padding: 2px 8px; border-radius: 4px; }
.aa-pill.alt { background: #fff; color: var(--brand); }
.aa-foot { margin: 0; font-size: 13px; color: #b9b4bf; }
.aa-foot i { color: #6fcf97; margin-right: 4px; }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px 24px; gap: 22px;
  background: radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%), var(--page-bg); }
.auth-mhead { display: none; }
.auth-card { width: min(440px, 100%); background: var(--panel-bg); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 18px; padding: 32px 30px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 50px -18px rgba(20,20,30,.22); position: relative; }
.auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.auth-icon { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, var(--panel-bg)); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.auth-title { font-size: 23px; font-weight: 800; line-height: 1.25; margin: 2px 0 0; }
.auth-sub { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 99px; }
.auth-badge.staff { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.auth-card .form-label { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.auth-card .input-group-text { background: var(--panel-bg); color: var(--muted); border-right: 0; min-width: 46px; justify-content: center; }
.auth-card .input-group > .form-control { border-left: 0; padding-left: 4px; }
.auth-card .form-control { min-height: 48px; font-size: 16px; }
.auth-card .input-group:focus-within .input-group-text, .auth-card .input-group:focus-within .pw-eye { border-color: color-mix(in srgb, var(--brand) 55%, #fff); color: var(--brand); }
.auth-card .form-control:focus { box-shadow: none; border-color: color-mix(in srgb, var(--brand) 55%, #fff); }
.auth-card .input-group:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); border-radius: var(--bs-border-radius); }
.pw-eye { border: 1px solid var(--bs-border-color); border-left: 0; background: var(--panel-bg); color: var(--muted); min-width: 46px; }
.pw-eye:hover { color: var(--ink); }
.auth-submit { min-height: 52px; font-weight: 800; border-radius: 12px; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.auth-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; color: var(--muted); background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: 10px; padding: 9px 12px; }
.auth-note i { color: #1f8a4c; margin-top: 3px; }
.auth-alt { display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 22px 0 0; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 14px; text-align: center; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--muted); text-decoration: none; } .auth-foot a:hover { color: var(--ink); }
.auth-foot i { margin-right: 3px; }
.auth-steps-mini { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.auth-steps-mini li { counter-increment: s; display: flex; align-items: center; gap: 10px; }
.auth-steps-mini li::before { content: counter(s); width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.auth-progress { list-style: none; display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 20px; font-size: 13px; font-weight: 700; color: var(--muted); }
.auth-progress li { display: flex; align-items: center; gap: 7px; }
.auth-progress li + li::before { content: ""; width: 34px; height: 2px; background: var(--line); margin-right: 3px; }
.auth-progress span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; border: 2px solid var(--line); }
.auth-progress .done span { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.auth-progress .now { color: var(--ink); } .auth-progress .now span { border-color: var(--brand); color: var(--brand); }
.pw-meter-row { display: flex; align-items: center; gap: 10px; }
.pw-meter { flex: 1; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: #c0392b; transition: width .2s, background .2s; }
.pw-meter[data-level="2"] span { background: #d68910; } .pw-meter[data-level="3"] span { background: #2e86c1; } .pw-meter[data-level="4"] span { background: #1f8a4c; }
.pw-meter-txt { min-width: 56px; text-align: right; color: var(--muted); font-size: 12px; }
[data-bs-theme="dark"] .auth-card { box-shadow: none; }
@media (max-width: 991px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main { justify-content: flex-start; padding: 0 0 24px; gap: 18px; }
  /* मोबाइल: ऊपर लोगो वाली पट्टी */
  .auth-mhead { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; background: var(--panel-bg); border-bottom: 1px solid var(--line); padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 16px; position: relative; }
  .auth-mhead::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand); }
  .am-logo { display: inline-flex; }
  .am-logo img { max-height: 46px; max-width: 220px; width: auto; display: block; }
  .am-logo .brand-mark { color: var(--ink); font-size: 24px; }
  .am-logo .bm-b { color: var(--brand); }
  .am-tag { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
  .auth-card { width: calc(100% - 32px); max-width: 460px; padding: 26px 20px; border-radius: 16px; }
}
@media (max-width: 380px) { .auth-head { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* ---------- इंस्टॉलर ---------- */
body.install { background: var(--page-bg); font-family: var(--font-ui); color: var(--ink); min-height: 100vh; }
.install-wrap { max-width: 860px; margin: 0 auto; padding: 28px 16px 48px; }
.install-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.install .brand-mark { color: var(--ink); }
.install .bm-b { color: var(--brand); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); text-align: center; position: relative; }
.steps li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--panel-bg); border: 2px solid var(--line); position: relative; z-index: 1; }
.steps li.done .n { background: var(--bs-success); border-color: var(--bs-success); color: #fff; }
.steps li.done::before, .steps li.now::before { background: var(--bs-success); }
.steps li.now .n { border-color: var(--brand); color: var(--brand); }
.steps li.now { color: var(--ink); font-weight: 700; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.checks .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; }
.checks .pass .ic { background: var(--bs-success); } .checks .warn .ic { background: #c98a14; } .checks .fail .ic { background: var(--bs-danger); }
.checks small { display: block; color: var(--muted); }
.checks .tag { font-size: 11.5px; font-weight: 800; letter-spacing: .5px; padding: 1px 8px; border-radius: 5px; }
.checks .pass .tag { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); }
.checks .warn .tag { color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); }
.checks .fail .tag { color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); }
.mig-list { font-family: ui-monospace, monospace; font-size: 13px; }
.color-pair { display: flex; gap: 10px; align-items: center; }

/* ---------- जल्द आ रहा (वेबसाइट) ---------- */
body.soon-page { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #141417; color: #fff; font-family: "Mukta", system-ui, sans-serif; padding: 24px 16px; text-align: center;
  background-image: radial-gradient(70% 50% at 50% 0%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%); }
.soon .brand-mark .bm-b { color: #fff; }
.soon-tag { color: #bdb8c3; margin: 14px 0 26px; }
.soon h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 800; margin: 0 0 10px; }
.soon-text { color: #cfcad5; margin: 0; }
.soon-contact { margin-top: 26px; color: #8f8a96; font-size: 14px; }

/* ---------- मोबाइल ---------- */
@media (max-width: 1199px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 1045; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; }
  .topbar, .content, .admin-foot { padding-left: 16px; padding-right: 16px; }
  .steps li { font-size: 0; } .steps .n { font-size: 13px; }
}
@media (max-width: 575px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { flex-direction: column; gap: 8px; padding: 12px; }
  .stat-value { font-size: 22px; }
  .page-head h1 { font-size: 22px; }
  .quick-search { display: none; }
  .filter-bar .form-select, .filter-bar .form-control { width: 100% !important; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ==========================================================
   Phase 2: सेटिंग, डैशबोर्ड चेकलिस्ट, पेज, एडिटर, मेनू बिल्डर, होमपेज बिल्डर
   ========================================================== */
.chart-box.sm { height: 220px; }
.checklist { list-style: none; margin: 0; padding: 8px 0; }
.checklist li { display: flex; gap: 10px; padding: 8px 16px; font-size: 14.5px; }
.checklist li > i { margin-top: 3px; color: var(--muted); }
.checklist li.ok > i { color: var(--bs-success); }
.checklist li.ok span { color: var(--muted); text-decoration: line-through; }
.checklist small { display: block; color: var(--muted); font-size: 12.5px; }
.checklist a { font-weight: 600; }

/* सेटिंग */
.settings-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-nav { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; position: sticky; top: 76px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-weight: 500; }
.settings-nav a i:first-child { color: var(--muted); }
.settings-nav a:hover { background: var(--page-bg); }
.settings-nav a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--ink); font-weight: 700; }
.settings-nav a.active i:first-child { color: var(--brand); }
.setting-switch { padding: 10px 12px 10px 3.2em; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; }
.chip-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.img-preview { height: 90px; border: 1px dashed var(--line); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 8px; padding: 8px; background: repeating-conic-gradient(var(--page-bg) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.img-preview img { max-height: 54px; max-width: 100%; }
.img-preview.empty { color: var(--muted); font-size: 24px; }
.img-inline { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.img-inline img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.code-area { font-size: 13px; background: var(--page-bg); }
.brand-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 8px; position: relative; }
.bp-label { position: absolute; right: 8px; top: 6px; font-size: 11px; color: #fff; opacity: .7; }
.bp-bar { height: 22px; display: flex; gap: 8px; align-items: center; padding: 0 10px; }
.bp-bar span { width: 40px; height: 5px; border-radius: 3px; background: #ffffff55; }
.bp-nav { display: flex; gap: 16px; padding: 8px 12px; color: #fff; font-weight: 700; font-size: 14px; }
.bp-body { padding: 12px; background: var(--panel-bg); }
.bp-body b { font-size: 18px; }
.bp-body p { margin: 4px 0 0; color: var(--muted); }

/* पेज */
.bulk-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--brand) 8%, var(--panel-bg)); border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.serp { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-family: arial, sans-serif; background: var(--panel-bg); }
.serp-url { display: block; font-size: 12.5px; color: var(--muted); }
.serp-title { display: block; color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-bs-theme="dark"] .serp-title { color: #8ab4f8; }
.serp-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: var(--muted); }
.char-count { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-top: -12px; margin-bottom: 8px; }
.char-count.over { color: var(--bs-danger); font-weight: 700; }
@media (min-width: 1200px) { .sticky-xl { position: sticky; top: 76px; } }

/* रिच एडिटर */
.rte { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-bg); position: relative; }
.rte:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, #fff); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 14%, transparent); }
.rte.is-busy::after { content: "अपलोड हो रहा है…"; position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--panel-bg) 80%, transparent); font-weight: 700; border-radius: 8px; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line); background: var(--page-bg); border-radius: 8px 8px 0 0; position: sticky; top: 61px; z-index: 4; }
.rte-btn { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: var(--ink); }
.rte-btn:hover, .rte-btn.active { background: var(--panel-bg); color: var(--brand); }
.rte-btn:disabled { opacity: .35; }
.rte-block { width: auto; min-width: 110px; }
.rte-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rte-area, .rte-src { min-height: 340px; padding: 16px 18px; outline: none; font-family: var(--font-body); font-size: 16.5px; line-height: 1.85; overflow-wrap: anywhere; }
.rte-src { border: 0 !important; border-radius: 0 0 8px 8px; font-size: 13px; line-height: 1.6; }
.rte-area h2, .rte-area h3, .rte-area h4 { font-family: var(--font-ui); margin: 18px 0 8px; }
.rte-area blockquote { border-left: 4px solid var(--brand); margin: 12px 0; padding: 4px 14px; color: var(--muted); }
.rte-area table { border-collapse: collapse; width: 100%; }
.rte-area th, .rte-area td { border: 1px solid var(--line); padding: 6px 8px; }
.rte-area img { max-width: 100%; height: auto; }
.rte-area figure { margin: 12px 0; }
.rte-area figcaption { font-size: 13px; color: var(--muted); }
.rte-area figure.embed { background: #111; color: #fff; padding: 36px 16px; text-align: center; border-radius: 6px; font-family: var(--font-ui); }
.rte-area .callout { border-left: 4px solid #2360a5; background: var(--page-bg); padding: 8px 14px; border-radius: 6px; margin: 12px 0; }
.rte-area .callout-warning { border-left-color: #c98a14; } .rte-area .callout-success { border-left-color: #1e7d45; } .rte-area .callout-danger { border-left-color: var(--brand); }
.rte-area .btn-cta { display: inline-block; background: var(--brand); color: #fff; padding: 6px 14px; border-radius: 6px; font-weight: 700; }

/* मेनू */
.menu-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.menu-card { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); overflow: hidden; }
.menu-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line); }
.menu-card.loc-main::before { background: var(--brand); } .menu-card.loc-top::before { background: var(--side-bg); } .menu-card.loc-footer::before { background: #6d6873; } .menu-card.loc-mobile::before { background: #2360a5; }
.menu-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.mc-where { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.menu-card b { font-size: 17px; }
.mc-count { color: var(--muted); font-size: 14px; }
.mc-edit { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.menu-builder { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.menu-builder[data-readonly="1"] { grid-template-columns: 1fr; }
.mb-add { position: sticky; top: 76px; }
.mb-name { max-width: 360px; }
.mb-tree { list-style: none; margin: 0; padding: 12px; }
.mb-item { --depth: 0; margin-left: calc(var(--depth) * 32px); margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-bg); position: relative; }
.mb-item.is-missing { border-color: var(--bs-warning); }
.mb-item.is-missing .mb-type::after { content: " · अभी वेबसाइट पर नहीं दिखेगा (पेज बंद है या उसका मॉड्यूल अभी तैयार नहीं)"; color: var(--bs-warning-text-emphasis); }
.mb-item.dragging { opacity: .45; }
.mb-item.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.mb-item.drop-after { box-shadow: 0 3px 0 var(--brand); }
.mb-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.mb-handle { color: var(--muted); cursor: grab; }
.mb-title { font-weight: 600; }
.mb-type { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.mb-actions { display: flex; gap: 0; }
.mb-edit { padding: 10px 12px 12px; border-top: 1px dashed var(--line); background: var(--page-bg); border-radius: 0 0 8px 8px; }

/* होमपेज बिल्डर */
.hb { display: grid; grid-template-columns: 250px minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.hb-palette, .hb-preview { position: sticky; top: 76px; }
.hb-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; max-height: calc(100vh - 170px); overflow-y: auto; }
.hb-block { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-bg); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.3; color: var(--ink); }
.hb-block i { font-size: 18px; color: var(--brand); }
.hb-block small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.hb-block:hover { border-color: var(--brand); }
.hb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hb-section { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); }
.hb-section.is-off { opacity: .65; }
.hb-section.dragging { opacity: .4; border-style: dashed; }
.hb-section.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 45%, transparent); } }
.hb-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.hb-handle { color: var(--muted); cursor: grab; }
.hb-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); flex: none; }
.hb-name { flex: 1; min-width: 0; }
.hb-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-name small { color: var(--muted); font-size: 12.5px; }
.hb-devices { display: flex; gap: 6px; color: var(--muted); font-size: 13px; }
.hb-devices .off { opacity: .25; }
.hb-actions { display: flex; align-items: center; gap: 2px; }
.hb-form { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--page-bg); border-radius: 0 0 var(--radius) var(--radius); }
.hb-form-foot { display: flex; gap: 8px; margin-top: 12px; }
.wire { padding: 10px; display: grid; gap: 5px; margin: 0 auto; transition: max-width .2s; }
.wire[data-device="mobile"] { max-width: 150px; }
.wire-head { height: 16px; border-radius: 3px; background: var(--side-bg); }
.wire-nav { height: 8px; border-radius: 2px; background: var(--brand); }
.wire-foot { height: 22px; border-radius: 3px; background: var(--side-bg); margin-top: 4px; }
.wire-block { font-size: 11px; padding: 6px 8px; border-radius: 4px; background: var(--page-bg); border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wire-block.wb-hero { min-height: 48px; background: color-mix(in srgb, var(--brand) 12%, var(--page-bg)); }
.wire-block.wb-videos { background: #1c1b1d; color: #fff; }
.wire-block.wb-breaking { background: var(--brand); color: #fff; padding: 3px 8px; }
.wire-block.wb-ads { background: repeating-linear-gradient(45deg, var(--page-bg) 0 6px, transparent 6px 12px); text-align: center; }
.wire-block.hidden-block { display: none; }

.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: grid; gap: 8px; }
.toast-msg { background: #1c1b1d; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; max-width: 360px; }
.toast-msg.err { background: var(--bs-danger); }

@media (max-width: 1399px) { .hb { grid-template-columns: 220px minmax(0, 1fr); } .hb-preview { display: none; } }
@media (max-width: 991px) {
  .settings-shell, .menu-builder, .hb { grid-template-columns: 1fr; }
  .settings-shell > *, .menu-builder > *, .hb > * { min-width: 0; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .settings-nav a { white-space: nowrap; }
  .mb-add, .hb-palette { position: static; }
  .hb-blocks { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-height: none; }
  .mb-item { margin-left: calc(var(--depth) * 18px); }
  .mb-actions .btn { width: 28px; height: 28px; }
  .rte-bar { top: 57px; }
}

/* ==========================================================
   Phase 3: श्रेणी, टॉपिक, टैग, लोकेशन, मीडिया लाइब्रेरी
   ========================================================== */
.cat-dot { --c: #9aa0a6; width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); font-size: 14px; }
.cat-dot.lg { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
.tree-table .tree-child td:first-child { padding-left: 22px; }
.tree-elbow { width: 14px; height: 18px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 6px; margin-top: -12px; flex: 0 0 auto; }
.tree-parent td { background: color-mix(in srgb, var(--page-bg) 45%, transparent); }
tr.is-off td > *:not(.text-end) { opacity: .6; }
.chip-sm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--page-bg); border: 1px solid var(--line); color: var(--muted); margin-right: 2px; white-space: nowrap; }
.thumb-sm { width: 48px; height: 32px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.danger-zone { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border: 1px solid color-mix(in srgb, #dc3545 35%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, #dc3545 5%, var(--panel-bg)); }
.code-sample { background: var(--page-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; }

/* इमेज खाना (लाइब्रेरी से चुनें) */
.media-field { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mf-preview { width: 128px; height: 72px; border: 1px dashed var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); font-size: 22px; background: var(--page-bg); }
.mf-preview img { width: 100%; height: 100%; object-fit: cover; }
.mf-preview.is-invalid { border-color: #dc3545; }
.media-field.has-value .mf-preview { border-style: solid; }
.mf-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

/* अपलोड क्षेत्र */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 16px; text-align: center; transition: .15s; }
.dropzone > i { font-size: 34px; color: var(--muted); display: block; margin-bottom: 6px; }
.dropzone.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.upload-queue { list-style: none; padding: 0; margin: 12px auto 0; max-width: 720px; text-align: left; display: grid; gap: 6px; }
.upload-queue:empty { display: none; }
.upload-queue li { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-bar { height: 6px; border-radius: 3px; background: var(--page-bg); overflow: hidden; }
.uq-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.upload-queue li.ok .uq-bar i { background: #198754; }
.upload-queue li.err { border-color: color-mix(in srgb, #dc3545 45%, var(--line)); }
.upload-queue li.err .uq-msg { color: #dc3545; }

/* फ़ोल्डर सूची */
.folder-list { display: grid; padding: 6px; }
.folder-list a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.folder-list a:hover { background: var(--page-bg); }
.folder-list a.active { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); font-weight: 600; }
.folder-list a span { margin-left: auto; font-size: 12px; color: var(--muted); }

/* मीडिया ग्रिड */
.media-grid { list-style: none; margin: 0; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-card { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-bg); outline-offset: 2px; }
.media-card .media-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.media-thumb { display: flex; align-items: center; justify-content: center; flex-direction: column; aspect-ratio: 16 / 9; background: repeating-conic-gradient(var(--page-bg) 0 25%, transparent 0 50%) 0 0 / 14px 14px; color: var(--muted); position: relative; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb > i { font-size: 30px; }
.media-thumb > span { font-size: 11px; font-weight: 700; margin-top: 4px; }
.media-flag { position: absolute; right: 6px; bottom: 6px; font-size: 11px; background: #ffc107; color: #000; border-radius: 4px; padding: 0 5px; font-weight: 600; }
.media-meta { padding: 6px 8px; font-size: 12.5px; line-height: 1.35; }
.media-meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.media-meta span { color: var(--muted); font-size: 11.5px; }
.media-card:has(.media-check:checked), .media-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.media-preview { background: repeating-conic-gradient(var(--page-bg) 0 25%, transparent 0 50%) 0 0 / 18px 18px; display: flex; align-items: center; justify-content: center; min-height: 240px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.media-preview img, .media-preview video { max-width: 100%; max-height: 520px; display: block; }
.media-preview audio { width: 90%; }

/* पिकर */
.mp-search { min-width: 220px; }
.mp-body { display: flex; min-height: 60vh; }
.mp-main { flex: 1; min-width: 0; }
.mp-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.mp-grid .media-card { cursor: pointer; }
.mp-side { width: 280px; flex: 0 0 auto; border-left: 1px solid var(--line); padding: 16px; background: var(--page-bg); }
.mp-side img { width: 100%; border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel-bg); }
@media (max-width: 767.98px) {
  .mp-body { flex-direction: column; }
  .mp-side { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 10px; }
  .upload-queue li { grid-template-columns: 1fr; gap: 4px; }
}

/* लोकेशन खोज-चयन */
.loc-picker { position: relative; }
.loc-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: 320px; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.loc-results .list-group-item { cursor: pointer; }

/* ==========================================================
   Phase 4: ख़बरें, वर्कफ़्लो, हिस्ट्री, असाइनमेंट
   ========================================================== */
.text-bg-teal { background: #0f766e !important; color: #fff !important; }
.text-bg-purple { background: #6d28d9 !important; color: #fff !important; }
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: var(--page-bg); color: var(--muted); }
.news-table .news-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.min-w-0 { min-width: 0; }
.chip-sm.flag-breaking, .chip-sm.flag-live { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-sm.flag-exclusive { background: #6d28d9; color: #fff; border-color: #6d28d9; }
.loc-filter { min-width: 170px; }
.mf-file { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 20px; padding: 4px; text-align: center; }
.mf-file small { font-size: 10.5px; word-break: break-all; line-height: 1.2; }
.check-scroll { max-height: 170px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.flag-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-box { background: var(--page-bg); border-radius: 8px; padding: 10px; margin-top: 8px; }

/* टैग चिप्स */
.tag-input { position: relative; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tag-chips:empty { display: none; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--ink); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13.5px; }
.tag-chip button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.tag-chip button:hover { color: #dc3545; }

/* ख़बर चुनने वाला, मीडिया सूची */
.news-picker { position: relative; }
.np-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; }
.np-list:empty { display: none; }
.np-list li { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: 13.5px; }
.np-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-remove { border: 0; background: var(--page-bg); color: var(--muted); width: 24px; height: 24px; border-radius: 50%; line-height: 1; font-size: 16px; flex: 0 0 auto; }
.ml-remove:hover { background: #dc3545; color: #fff; }
.media-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-item { position: relative; width: 112px; height: 63px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--page-bg); }
.ml-item img { width: 100%; height: 100%; object-fit: cover; }
.ml-item .ml-remove { position: absolute; top: 3px; right: 3px; }
.ml-file { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 4px; text-align: center; font-size: 18px; color: var(--muted); }
.ml-file small { font-size: 10.5px; line-height: 1.2; word-break: break-all; }
.ml-add { width: 112px; height: 63px; border: 2px dashed var(--line); border-radius: 8px; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; }
.ml-add:hover { border-color: var(--brand); color: var(--brand); }

/* टिप्पणियाँ */
.remark-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.remark-list li { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; }
.remark-list li.rm-note { border-left-color: #6d28d9; }
.remark-list li.rm-feedback { border-left-color: var(--brand); }
.remark-list p { margin: 4px 0 0; font-size: 14px; white-space: normal; }
.rm-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.wf-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-form { margin-top: 12px; padding: 12px; background: var(--page-bg); border-radius: 8px; }

/* diff */
.diff-view del { background: #ffd7d5; color: #82071e; text-decoration: line-through; }
.diff-view ins { background: #ccffd8; color: #055d20; text-decoration: none; }
[data-bs-theme="dark"] .diff-view del { background: #5a1e22; color: #ffb3ad; }
[data-bs-theme="dark"] .diff-view ins { background: #16432a; color: #a6f0bb; }
.diff-body p { margin: 0 0 6px; padding: 4px 8px; border-radius: 6px; }
.diff-body .diff-same { color: var(--muted); }
.diff-body .diff-del { background: #ffebe9; text-decoration: line-through; }
.diff-body .diff-ins { background: #e6ffec; }
[data-bs-theme="dark"] .diff-body .diff-del { background: #3b1c1e; }
[data-bs-theme="dark"] .diff-body .diff-ins { background: #13301f; }
.diff-key { display: inline-block; padding: 0 8px; border-radius: 4px; margin-right: 6px; }
.diff-key.del { background: #ffd7d5; color: #82071e; }
.diff-key.ins { background: #ccffd8; color: #055d20; }

/* असाइनमेंट */
.asg-list { list-style: none; margin: 0; padding: 0; }
.asg-item { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.asg-item.is-late { box-shadow: inset 3px 0 0 #dc3545; }
.asg-main { min-width: 0; flex: 1; }
.asg-title { font-size: 16px; }
.asg-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 767.98px) {
  .asg-item { flex-direction: column; }
  .asg-actions { justify-content: flex-start; }
}

/* ==========================================================
   Phase 6: आवेदन, रिपोर्टर, ब्यूरो
   ========================================================== */
.app-profile { display: flex; gap: 18px; align-items: flex-start; }
.app-photo { width: 120px; height: 145px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin: 0; flex: 1; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.doc-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; font-size: 14px; }
.doc-item i { font-size: 20px; color: var(--brand); }
.doc-item.missing { opacity: .6; border-style: dashed; } .doc-item.missing i { color: var(--muted); }
.rp-head { display: flex; gap: 18px; align-items: center; padding: 16px; flex-wrap: wrap; }
.rp-photo img, .rp-photo .avatar { width: 92px; height: 110px; object-fit: cover; border-radius: 8px; font-size: 34px; }
.rp-main { flex: 1; min-width: 220px; }
.rp-main h2 { margin: 0 0 4px; font-size: 22px; }
.rp-dates { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font-size: 14px; }
.rp-dates dt { color: var(--muted); } .rp-dates dd { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.mini-stat { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; }
.mini-stat i { color: var(--brand); } .mini-stat b { font-size: 20px; } .mini-stat span { color: var(--muted); font-size: 13px; }
.simple-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.simple-list li:last-child { border-bottom: 0; }
@media (max-width: 767.98px) { .app-profile { flex-direction: column; } .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; } }

/* ==========================================================
   Phase 7: ब्रेकिंग कंट्रोल रूम, लाइव ब्लॉग, मल्टीमीडिया
   ========================================================== */
.brk-preview { display: flex; align-items: stretch; border-radius: var(--radius); overflow: hidden; background: var(--panel-bg); border: 1px solid var(--line); }
.brk-preview-label { background: var(--brand); color: #fff; font-weight: 800; padding: 8px 14px; white-space: nowrap; }
.brk-preview-run { display: flex; gap: 28px; padding: 8px 14px; overflow-x: auto; white-space: nowrap; font-weight: 600; scrollbar-width: thin; }
.brk-preview-run span::before { content: "◆"; color: var(--brand); margin-right: 8px; font-size: 11px; }
.brk-preview-run .urgent { color: var(--brand); }
.brk-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 16px; }
.brk-list { list-style: none; margin: 0; padding: 0; }
.brk-item { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.brk-item.p2 { border-left-color: #f0ad4e; }
.brk-item.p3 { border-left-color: var(--bs-danger); background: color-mix(in srgb, var(--bs-danger) 4%, var(--panel-bg)); }
.brk-item.is-off { opacity: .7; }
.brk-main { min-width: 0; }
.brk-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.brk-type { font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 4px; color: #fff; background: var(--brand); }
.brk-type.t-flash { background: #d97706; }
.brk-type.t-alert { background: #334155; }
.brk-title { display: block; font-size: 16px; line-height: 1.4; }
.brk-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.brk-actions form { margin: 0; }
@media (max-width: 640px) { .brk-item { flex-direction: column; align-items: stretch; } .brk-actions { justify-content: flex-end; } }

/* लाइव ब्लॉग कंट्रोल */
.lu-list { list-style: none; margin: 0; padding: 0; }
.lu-admin { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lu-admin.flash { animation: luflash 1.6s ease-out; }
@keyframes luflash { from { background: color-mix(in srgb, var(--brand) 14%, var(--panel-bg)); } to { background: transparent; } }
.lu-admin .lu { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.lu-time time { font-weight: 800; color: var(--brand); display: block; }
.lu-badge { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 6px; margin-top: 4px; margin-right: 4px; background: var(--line); }
.lu-badge.key { background: var(--brand); color: #fff; }
.lu-body h3 { font-size: 17px; margin: 0 0 4px; }
.lu-body p { margin: 0 0 8px; }
.lu-body img { max-width: 100%; max-height: 260px; border-radius: 6px; }
.lu-body .video-embed { position: relative; aspect-ratio: 16/9; max-width: 480px; }
.lu-body .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.lu-author { font-size: 13px; color: var(--muted); }
.lu-link { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.lu-tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.lu-tools form { margin: 0; }
@media (max-width: 575px) { .lu-admin .lu { grid-template-columns: 1fr; gap: 4px; } }

/* मल्टीमीडिया सूची / लाइव टीवी */
.thumb-sm.tall { width: 34px; height: 46px; object-fit: cover; }
.ltv-logo { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--line); color: var(--muted); }
.ltv-card.is-off { opacity: .65; }
.min-w-0 { min-width: 0; }

/* गैलरी: फ़ोटो सूची */
[data-gp].drop-over { outline: 3px dashed var(--brand); outline-offset: -6px; }
.gp-list { list-style: none; margin: 0; padding: 0; counter-reset: gp; }
.gp-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: gp; position: relative; }
.gp-item::before { content: counter(gp); position: absolute; left: 4px; top: 14px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 4px; }
.gp-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--line); }
.gp-fields { display: grid; gap: 6px; }
.gp-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; }
.gp-f { display: grid; gap: 2px; font-size: 12px; color: var(--muted); margin: 0; }
.gp-tools { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 575px) { .gp-item { grid-template-columns: 72px minmax(0, 1fr); } .gp-item img { width: 72px; height: 56px; } .gp-tools { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; } }

/* वेब स्टोरी बिल्डर */
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.sl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sl-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); }
.sl-card.active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.sl-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.sl-body { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px; }
.sl-media { display: grid; gap: 6px; align-content: start; }
.sl-thumb { width: 110px; aspect-ratio: 9 / 16; border-radius: 8px; background: var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 22px; }
.sl-thumb img, .sl-thumb video { width: 100%; height: 100%; object-fit: cover; }
.sl-fields { display: grid; gap: 6px; }
.sl-fields label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); margin: 0; }
.sl-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-row label { flex: 1 1 110px; }
.ws-preview-wrap { position: sticky; top: 80px; }
.ws-preview { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #111; color: #fff; display: flex; flex-direction: column; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.ws-preview.no-media.theme-light { background: #f6f3ee; } .ws-preview.no-media.theme-brand { background: var(--brand); }
.wsp-bars { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 3px; z-index: 3; }
.wsp-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); }
.wsp-bars i.on { background: #fff; }
.wsp-media { position: absolute; inset: 0; }
.wsp-media img, .wsp-media video { width: 100%; height: 100%; object-fit: cover; }
.wsp-text { position: relative; z-index: 2; margin-top: auto; padding: 60px 14px 22px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.ws-preview.pos-top .wsp-text { margin-top: 0; margin-bottom: auto; padding: 28px 14px 60px; background: linear-gradient(rgba(0,0,0,.8), transparent); }
.ws-preview.pos-center .wsp-text { margin: auto 0; background: rgba(0,0,0,.45); padding: 18px 14px; }
.ws-preview.theme-light .wsp-text { color: #111; background: linear-gradient(transparent, rgba(255,255,255,.92)); }
.ws-preview.theme-brand .wsp-text { background: linear-gradient(transparent, color-mix(in srgb, var(--brand) 92%, #000)); }
.wsp-text b { display: block; font-size: 19px; line-height: 1.25; margin-bottom: 4px; }
.wsp-text p { font-size: 13px; line-height: 1.45; margin: 0; }
.wsp-cta { display: inline-block; margin-top: 10px; background: #fff; color: #111; border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 700; }
@media (max-width: 991px) { .ws-grid { grid-template-columns: 1fr; } .ws-preview-wrap { position: static; max-width: 220px; margin: 0 auto; order: -1; } }
@media (max-width: 480px) { .sl-body { grid-template-columns: 80px minmax(0, 1fr); } .sl-thumb { width: 80px; } }
.ws-preview.pos-top.theme-brand .wsp-text { background: linear-gradient(color-mix(in srgb, var(--brand) 92%, #000), transparent); }
.ws-preview.pos-top.theme-light .wsp-text { background: linear-gradient(rgba(255,255,255,.92), transparent); }
.ws-preview.pos-center.theme-brand .wsp-text { background: color-mix(in srgb, var(--brand) 88%, transparent); }
.ws-preview.pos-center.theme-light .wsp-text { background: rgba(255,255,255,.9); }

/* ==========================================================
   Phase 8: ई-पेपर
   ========================================================== */
.ep-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; }
.ep-today-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.ep-today-item b { flex: 1 1 100%; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; padding: 16px; }
.ep-card { display: block; color: inherit; text-decoration: none; }
.ep-card:hover .ep-cover { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.ep-cover { display: grid; place-items: center; aspect-ratio: 3 / 4; background: var(--line); border-radius: 6px; overflow: hidden; color: var(--muted); font-size: 34px; transition: box-shadow .2s; }
.ep-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ep-meta { display: grid; gap: 2px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ep-meta b { color: var(--ink); font-size: 14px; }
.ep-drop { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 14px; border: 2px dashed color-mix(in srgb, var(--bs-danger) 45%, var(--line)); border-radius: var(--radius); cursor: pointer; margin: 0; background: color-mix(in srgb, var(--bs-danger) 3%, var(--panel-bg)); height: 100%; }
.ep-drop.alt { border-color: var(--line); background: var(--panel-bg); }
.ep-drop i { font-size: 30px; color: var(--bs-danger); }
.ep-drop.alt i { color: var(--muted); }
.ep-drop small { color: var(--muted); }
.ep-drop.over, .ep-drop:hover { border-color: var(--brand); }
.ep-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ep-page { display: grid; gap: 6px; }
.ep-thumb { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--line); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ep-no { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 4px; }
.ep-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.hs-stage { position: relative; user-select: none; touch-action: none; cursor: crosshair; line-height: 0; }
.hs-stage img { width: 100%; height: auto; border: 1px solid var(--line); pointer-events: none; }
.hs-box { position: absolute; border: 2px solid var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); cursor: pointer; }
.hs-box.on { border-style: dashed; background: color-mix(in srgb, var(--brand) 26%, transparent); }
.hs-box span { position: absolute; left: -2px; top: -2px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; padding: 0 6px; }
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 70vh; overflow-y: auto; }
.hs-list li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.hs-list li.on { border-color: var(--brand); }
.hs-news { position: relative; }
.hs-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 220px; overflow-y: auto; box-shadow: 0 8px 20px rgba(0,0,0,.15); }

/* ==========================================================
   Phase 9: विज्ञापन और CRM
   ========================================================== */
.ad-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ad-slot-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0; cursor: pointer; }
.ad-slot-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--panel-bg)); }
.ad-slot-opt.is-off { opacity: .6; }
.ad-slot-opt span { display: grid; } .ad-slot-opt small { color: var(--muted); }
.loc-multi { position: relative; }
.loc-multi .loc-results { position: absolute; left: 0; right: 0; z-index: 20; max-height: 240px; overflow-y: auto; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.ad-preview { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; overflow: hidden; }
.ad-preview img { max-width: 100%; height: auto; }
.ad-preview .ad-label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ad-preview .ad-video { position: relative; aspect-ratio: 16/9; } .ad-preview .ad-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ad-preview .ad-textlink { display: block; text-align: left; border-left: 3px solid var(--brand); padding: 6px 10px; }
.kpi { display: grid; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); } .kpi b { font-size: 22px; }
.inv-lines td { vertical-align: top; }
.inv-lines input { min-width: 70px; }
.inv-totals { max-width: 360px; margin-left: auto; }
.inv-totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.inv-totals .grand { border-top: 2px solid var(--ink); font-weight: 800; font-size: 18px; }

/* ---------- Phase 10: SEO कमांड सेंटर ---------- */
.sub-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs a { flex: 0 0 auto; padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.sub-tabs a:hover { color: var(--bs-body-color); }
.sub-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.seo-score { display: flex; align-items: center; gap: 18px; }
.seo-ring { --p: 0; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--panel-bg) 78%, transparent 80% 100%), conic-gradient(currentColor calc(var(--p) * 1%), var(--line) 0); }
.seo-ring b { font-size: 1.8rem; line-height: 1; color: var(--bs-body-color); }
.seo-ring small { color: var(--muted); font-size: .75rem; }
.seo-checks { list-style: none; margin: 0; padding: 4px 0; }
.seo-checks li { display: flex; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.seo-checks li:last-child { border-bottom: 0; }
.seo-checks li > i { margin-top: 3px; }
.seo-checks li.ok > i { color: var(--bs-success); }
.seo-checks li.bad > i { color: var(--bs-warning); }
.seo-checks small { display: block; color: var(--muted); }
.sitemap-list li { padding: 3px 0; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
/* ख़बर एडिटर: SEO स्कोर और FAQ */
.seo-meter { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.seo-meter .bar { flex: 1; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.seo-meter .bar i { display: block; height: 100%; width: 0; background: var(--bs-danger); transition: width .25s, background .25s; }
.seo-meter b { min-width: 44px; text-align: right; }
.seo-tips { list-style: none; padding: 0; margin: 0 0 12px; font-size: .85rem; }
.seo-tips li { padding: 3px 0; display: flex; gap: 8px; }
.seo-tips li::before { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f057"; color: var(--bs-danger); }
.seo-tips li.ok::before { content: "\f058"; color: var(--bs-success); }
.seo-tips li.warn::before { content: "\f06a"; color: var(--bs-warning); }
.faq-rows .faq-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; position: relative; }
.faq-rows .faq-row .btn-close { position: absolute; top: 8px; right: 8px; }

/* ---------- Phase 11 ---------- */
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 700; }
.notif-menu { width: min(360px, 92vw); padding: 0; }
.notif-items { max-height: 380px; overflow-y: auto; }
.notif-item { white-space: normal; border-bottom: 1px solid var(--line); padding: 9px 14px; }
.notif-item b { display: block; font-size: .88rem; }
.notif-item span { display: block; font-size: .8rem; color: var(--muted); }
.notif-item small { color: var(--muted); font-size: .74rem; }
.notif-item.unread, .notif-list .unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.cm-admin { list-style: none; margin: 0; padding: 0; }
.cm-a { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cm-a > .form-check-input { margin-top: 4px; flex: none; }
.cm-a-main { flex: 1; min-width: 0; }
.cm-a-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cm-a-body { margin: 6px 0; overflow-wrap: anywhere; }
.cm-a-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cm-a.spam, .cm-a.rejected { opacity: .75; }
.nl-preview { width: 100%; height: 720px; border: 0; background: #f2f2f2; display: block; }

/* ---------- Phase 12 ---------- */
.fb-list { display: grid; gap: 10px; margin-bottom: 12px; }
.fb-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel-bg); }
.fb-grip { display: flex; flex-direction: column; gap: 4px; }
.fb-main { flex: 1; min-width: 0; }
.fb-del { flex: none; }
.sub-data { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; margin: 0; }
.sub-data dt, .sub-data dd { padding: 9px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.sub-data dt { color: var(--muted); font-weight: 600; font-size: .88rem; }
.sub-data dd { overflow-wrap: anywhere; }
.sub-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sub-file img, .sub-file video { width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; background: #000; display: block; margin-bottom: 6px; }
.sub-doc { display: grid; place-items: center; height: 110px; border: 1px dashed var(--line); border-radius: 6px; font-size: 40px; color: var(--muted); margin-bottom: 6px; }
.sub-timeline { list-style: none; margin: 0; padding: 0; }
.sub-timeline li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sub-timeline li > i { width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: .75rem; flex: none; }
.sub-timeline li.t-reply > i { background: var(--brand); color: #fff; }
.sub-meta dt { color: var(--muted); font-weight: 400; }
.sub-meta dd { margin-bottom: 6px; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .sub-data { grid-template-columns: 1fr; } .sub-data dt { border-bottom: 0; padding-bottom: 0; } .fb-row { flex-direction: column; } .fb-grip { flex-direction: row; } }

/* ---------- Phase 13: एनालिटिक्स ---------- */
.range-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 16px; }
.range-custom { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.range-custom input { width: 150px; }
.chart-box.xs { height: 170px; }
.stat-list { list-style: none; margin: 0; padding: 4px 16px 12px; display: grid; gap: 8px; }
.stat-list > li { display: block; min-width: 0; }
.bl-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; min-width: 0; }
.bl-row span { min-width: 0; }
.bl-bar { height: 6px; background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 99px; overflow: hidden; margin-top: 3px; }
.bl-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.rt-dot { color: #1f9d55; font-size: 9px; vertical-align: middle; animation: rtpulse 1.6s infinite; }
@keyframes rtpulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .rt-dot { animation: none; } }
.rt-pages { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.rt-pages li { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.rt-pages li span { min-width: 0; }
.rank-admin { margin: 0; padding: 8px 16px 12px 34px; display: grid; gap: 6px; font-size: 14px; }
.min-w-0 { min-width: 0; }

/* ---------- Phase 14: फ़ैक्ट चेक ---------- */
.fc-false { --fc: #c62828; } .fc-misleading { --fc: #d9730d; } .fc-partly { --fc: #b58a00; } .fc-unverified { --fc: #6b6b78; } .fc-true { --fc: #1b8a4a; }
.fc-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--fc, #666); color: #fff; font-weight: 700; font-size: 13px; line-height: 1; padding: 5px 9px; border-radius: 4px; white-space: nowrap; }
.fc-badge.sm { font-size: 12px; padding: 4px 7px; }
.fc-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fc-pick { position: relative; cursor: pointer; }
.fc-pick input { position: absolute; opacity: 0; }
.fc-pick span { display: block; border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 600; color: var(--fc); }
.fc-pick input:checked + span { border-color: var(--fc); background: color-mix(in srgb, var(--fc) 12%, transparent); }
.fc-pick input:focus-visible + span { outline: 2px solid var(--fc); outline-offset: 2px; }
/* चुनाव / खेल */
.party-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.cand-table .vote-input { font-variant-numeric: tabular-nums; }
.cand-table td { vertical-align: top; }
.comm-type { position: relative; cursor: pointer; }
.comm-type input { position: absolute; opacity: 0; }
.comm-type span { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 600; }
.comm-type input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.comm-type input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.comm-list { list-style: none; margin: 0; padding: 0; max-height: 620px; overflow-y: auto; }
.comm-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.comm-list .cm-mk { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.comm-list small { display: block; color: var(--muted); font-size: 11px; }
.comm-list li.c-four { border-left: 4px solid #1d6fd6; } .comm-list li.c-six { border-left: 4px solid #7b3fe4; } .comm-list li.c-wicket, .comm-list li.c-red { border-left: 4px solid #c62828; }
.comm-list li.c-goal { border-left: 4px solid #13803f; } .comm-list li.c-yellow { border-left: 4px solid #e0a100; } .comm-list li.c-hl { border-left: 4px solid var(--brand); }
.form-text { overflow-wrap: anywhere; }
/* होमपेज बिल्डर: छोटे फ़ोन पर सेक्शन की पंक्ति टूटे (पहले साइडवेज़ स्क्रोल होता था) */
@media (max-width: 575px) { .hb-head { flex-wrap: wrap; } .hb-name { flex-basis: calc(100% - 90px); } .hb-devices { display: none; } .hb-actions { margin-left: auto; } }
/* अलग लॉगिन पेज: रिपोर्टर / स्टाफ़ */
/* Phase 15: सिस्टम */
.health-list { list-style: none; margin: 0; padding: 0; }
.health-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.health-list li:last-child { border-bottom: 0; }
.health-list li > i { margin-top: 3px; }
.health-list li.ok > i { color: #1b8a4a; } .health-list li.bad > i { color: #c62828; } .health-list li.warn > i { color: #d9730d; } .health-list li.unk > i { color: var(--muted); }
.health-list li small { display: block; color: var(--muted); font-size: 12.5px; }
.health-list li b { font-weight: 600; text-align: right; overflow-wrap: anywhere; max-width: 220px; }
.health-list li.bad b { color: #c62828; }
.bk-type { position: relative; cursor: pointer; }
.bk-type input { position: absolute; opacity: 0; }
.bk-type span { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 14px; }
.bk-type input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); }
.bk-type input:disabled + span { opacity: .45; cursor: not-allowed; }
.bk-type input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* दो-चरण लॉगिन: OTP */
.otp-input { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: .45em; font-variant-numeric: tabular-nums; padding-left: .45em; }
.otp-input::placeholder { letter-spacing: .3em; opacity: .35; }

/* पत्र/प्रमाणपत्र टेम्पलेट */
.tpl-help { background: color-mix(in srgb, var(--brand) 4%, var(--panel-bg)); }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-var { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-bg); border-radius: 99px; padding: 3px 10px 3px 4px; font-size: 13px; color: var(--ink); }
.tpl-var code { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); border-radius: 99px; padding: 1px 7px; font-size: 12px; }
.tpl-var:hover { border-color: var(--brand); }
.tpl-area { font-family: var(--font-body); font-size: 15px; line-height: 1.7; }
.tpl-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.tpl-paper { background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 8px; padding: 16px 18px; font-family: var(--font-body); font-size: 14px; line-height: 1.75; text-align: justify; box-shadow: 0 6px 18px -10px rgba(0,0,0,.2); }
.tpl-paper h4 { text-align: center; font-weight: 800; font-size: 17px; text-decoration: underline; text-underline-offset: 4px; margin: 0 0 10px; }
.tpl-paper ol, .tpl-paper ul { padding-left: 20px; margin: 0 0 10px; }
.tpl-paper p { margin: 0 0 10px; }
