/* Sindhu Pahani — admin styles
   Warm paper panel, black + butter-yellow accents, big light numerals. */

:root {
  --page: #c9ced6;
  --ink: #1d1d1b;
  --ink-2: #3b3a36;
  --muted: #8b8980;
  --line: rgba(29, 29, 27, .09);
  --card: rgba(255, 255, 255, .58);
  --card-solid: #fbfaf6;
  --yellow: #f7d45e;
  --yellow-soft: #fbe9a4;
  --dark: #2a2a28;
  --dark-2: #3a3a37;
  --grey: #8f8f8b;
  --ok: #3d8b5f;
  --bad: #c2553d;
  --warn: #b98a12;
  --r-shell: 34px;
  --r-card: 26px;
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 12px 30px -18px rgba(60, 50, 20, .25);
  /* Outfit has no Devanagari, so Mukta is second in the stack: any Marathi text anywhere picks it up. */
  --font: 'Outfit', 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mr: 'Mukta', 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', sans-serif;
  --font-mr-head: 'Anek Devanagari', 'Mukta', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.45 var(--font);
  min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
code { font: 500 12.5px/1 ui-monospace, 'SF Mono', Menlo, monospace; background: rgba(0,0,0,.05); padding: 3px 6px; border-radius: 6px; }
.mr, [lang="mr"] { font-family: var(--font-mr); }
.alt { font-size: .82em; color: var(--muted); font-weight: 400; }

/* Marathi mode: Mukta for text, Anek Devanagari for headings, a touch larger for readability */
body.lang-mr { font-family: var(--font-mr); font-size: 16px; line-height: 1.5; }
body.lang-mr input, body.lang-mr select, body.lang-mr textarea, body.lang-mr .btn, body.lang-mr .pill-btn { font-family: var(--font-mr); }
body.lang-mr h1, body.lang-mr h2, body.lang-mr h3 { font-family: var(--font-mr-head); font-weight: 500; letter-spacing: 0; }
body.lang-mr .mainnav a, body.lang-mr .tabs a { font-size: 15px; }
body.lang-mr .bignum strong, body.lang-mr .stat-line strong, body.lang-mr .big-pct,
body.lang-mr .ring-txt strong, body.lang-mr .dc-head span { font-family: 'Outfit', sans-serif; }
body.lang-mr .brand span { font-family: 'Outfit', sans-serif; }

/* language switch */
.lang-toggle { display: inline-flex; background: rgba(255,255,255,.75); border-radius: 999px; padding: 4px; gap: 2px; }
.lang-toggle a { text-decoration: none; font-size: 13px; padding: 7px 12px; border-radius: 999px; line-height: 1; color: var(--ink-2); }
.lang-toggle a[lang="mr"] { font-family: var(--font-mr); font-size: 14px; }
.lang-toggle a.on { background: var(--dark); color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; }
.center { text-align: center; flex: 1; }
.pad { padding: 14px 4px; }
.hide-sm { }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
/* Rounded panel on the grey page, stretched to the full window width */
.shell {
  margin: clamp(8px, 1.2vw, 18px);
  padding: 20px clamp(16px, 2vw, 32px) 14px;
  border-radius: var(--r-shell);
  box-shadow: 0 30px 60px -30px rgba(40, 45, 60, .45);
  background:
    radial-gradient(120% 90% at 100% 100%, #fbe6a0 0%, rgba(251,230,160,0) 55%),
    radial-gradient(80% 70% at 85% 30%, #fbf1cf 0%, rgba(251,241,207,0) 60%),
    linear-gradient(160deg, #f1f0ec 0%, #f4f2ea 45%, #f8efcf 100%);
  min-height: calc(100vh - 2 * clamp(8px, 1.2vw, 18px));
  display: flex;
  flex-direction: column;
}
.content { flex: 1; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; padding: 26px 6px 2px; }
.foot a { color: var(--ink-2); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.2); }
.foot a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 400; text-decoration: none;
  border: 1.3px solid #6f6d66; border-radius: 999px; padding: 4px 20px 4px 4px;
  white-space: nowrap;
}
.brand img { width: 38px; height: 38px; border-radius: 50%; display: block; }
.brand.plain { border: 0; padding: 0; font-size: 20px; }
.mainnav {
  margin-left: auto;
  display: flex; gap: 2px;
  background: rgba(255,255,255,.72);
  border-radius: 999px; padding: 5px;
  overflow-x: auto; scrollbar-width: none;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  text-decoration: none; font-size: 14px;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap; color: var(--ink-2);
  transition: background .15s;
}
.mainnav a:hover { background: rgba(0,0,0,.05); }
.mainnav a.on { background: var(--dark); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }

.pill-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  font: 400 14px var(--font); text-decoration: none; border: 0; cursor: pointer;
  background: rgba(255,255,255,.75); color: var(--ink); white-space: nowrap;
}
.pill-btn.ghost { background: rgba(255,255,255,.72); }
.pill-btn.dark { background: var(--dark); color: #fff; }
.pill-btn.glass { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.7); backdrop-filter: blur(6px); }
.pill-btn:hover { filter: brightness(.97); }
.pill-btn .count { font-style: normal; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 12px; }

.round-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; position: relative;
  background: rgba(255,255,255,.75); border: 0; cursor: pointer; color: var(--ink); text-decoration: none;
}
.round-btn.light { background: #fff; width: 38px; height: 38px; }
.round-btn.dark { background: var(--dark); color: #fff; }
.round-btn .dot { position: absolute; top: 9px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px #fff; }

.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: 50px; z-index: 1200; min-width: 250px;
  background: var(--card-solid); border-radius: 18px; padding: 8px;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.3); display: none;
}
.dropdown.open { display: block; }
.dropdown a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 14px; }
.dropdown a:hover { background: rgba(0,0,0,.05); }
.dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-head strong { display: block; font-weight: 500; }
.dd-head span { color: var(--muted); font-size: 13px; }

/* ---------- flash ---------- */
.flash { padding: 12px 18px; border-radius: 16px; margin: 0 0 16px; font-size: 14px; background: rgba(255,255,255,.8); border-left: 4px solid var(--ok); }
.flash-err { border-left-color: var(--bad); background: #fff3ef; }
.flash-warn { border-left-color: var(--warn); background: #fff8e2; }

/* ---------- hero ---------- */
/* Greeting spans the full width; pill bars and big numbers share the row below */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 30px; align-items: end; margin-bottom: 30px; }
.hero-left { display: contents; }
.hero h1, .hero-sub { grid-column: 1 / -1; }
.hero .pillbars { grid-column: 1; }
.hero .bignums { grid-column: 2; }
.hero-left .pillbars { max-width: 960px; }
.hero h1 { font-size: clamp(30px, 4vw, 50px); line-height: 1.12; padding-bottom: 2px; }
/* Long names: show in full when there is room, otherwise cut with … */
.fit { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-sub { color: var(--muted); margin: 8px 0 22px; }
.pillbars { display: flex; gap: 8px; align-items: flex-end; }
.pillbars.col { flex-direction: column; align-items: stretch; margin: 18px 0; }
.pillbar { display: flex; flex-direction: column; gap: 8px; min-width: 90px; flex: 1 1 0; }
.pb-label { font-size: 14px; color: var(--ink-2); padding-left: 6px; white-space: nowrap; }
.pb { height: 42px; border-radius: 999px; display: flex; align-items: center; padding: 0 16px; font-size: 13px; }
.pb b { font-weight: 400; }
.pb-dark { background: var(--dark); color: #fff; }
.pb-yellow { background: var(--yellow); }
.pb-line { border: 1.3px solid #9a978f; background: rgba(255,255,255,.4); }
.pb-hatch {
  background: repeating-linear-gradient(-55deg, rgba(255,255,255,.95) 0 6px, rgba(0,0,0,.08) 6px 7.5px);
  border: 1px solid rgba(0,0,0,.05);
}
.bignums { display: flex; gap: 34px; }
.bignum { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: end; text-decoration: none; }
.bignum strong { grid-row: 1 / span 2; grid-column: 2; font: 300 clamp(44px, 5vw, 64px)/.9 var(--font); letter-spacing: -.03em; }
.bn-ico { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.7); display: grid; place-items: center; align-self: end; grid-column: 1; grid-row: 1; margin-bottom: 4px; }
.bignum em { grid-column: 1 / span 2; font-style: normal; font-size: 13px; color: var(--ink-2); grid-row: 3; }

/* ---------- cards & grid ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: var(--r-card);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card h2 { margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card.empty { text-align: center; padding: 50px 24px; }
.card.empty p { margin: 8px 0 18px; }

.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dash-grid .tall { grid-row: span 2; display: flex; flex-direction: column; }
.dash-grid .wide2 { grid-column: span 2; }
.dash-grid .full { grid-column: 1 / -1; }

/* photo card */
.photo-card {
  padding: 0; overflow: hidden; position: relative; min-height: 280px;
  background-size: cover; background-position: center; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.photo-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.0) 45%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.photo-card > * { position: relative; z-index: 1; }
/* the printed label sits in the bottom of every photo; push it out of the card so the card text stays clean */
.photo-card > .pc-img { position: absolute; z-index: 0; inset: 0 0 -32% 0; background: center top / cover no-repeat; }
.photo-card .chip { margin: 18px; align-self: flex-start; }
.pc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 20px; }
.pc-foot h3 { font-size: 21px; }
.pc-foot p { margin: 2px 0 0; font-size: 13px; opacity: .85; }
.photo-card.no-photo { color: var(--ink); background: linear-gradient(160deg, #eceae3, #f6ecc6); }
.photo-card.no-photo::after { display: none; }
.pc-empty { margin: auto; text-align: center; padding: 30px; color: var(--ink-2); }
.pc-empty h3 { margin: 10px 0 4px; }
.pc-empty p { margin: 0; font-size: 13px; color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.8); text-decoration: none; white-space: nowrap; }
.chip.glass { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); color: #fff; }
.chip.ghost { background: #fff; }

/* weekly bars */
.stat-line { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 8px; }
.stat-line strong { font: 300 44px/1 var(--font); letter-spacing: -.02em; }
.stat-line span { font-size: 12.5px; color: var(--ink-2); padding-top: 4px; }
.weekbars { display: flex; justify-content: space-between; align-items: flex-end; height: 150px; padding-top: 28px; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; position: relative; flex: 1; }
.wb-track { flex: 1; width: 7px; display: flex; align-items: flex-end;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.08) 3px 5px); border-radius: 6px; }
.wb-track i { display: block; width: 100%; background: var(--dark); border-radius: 6px; }
.wb.today .wb-track i { background: var(--yellow); }
.wb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dark); }
.wb.today .wb-dot { background: var(--yellow); }
.wb small { font-size: 12px; color: var(--muted); }
.wb-tip { position: absolute; top: -28px; background: var(--yellow); border-radius: 999px; font-size: 11.5px; padding: 3px 9px; white-space: nowrap; }

/* ring */
.ring { position: relative; width: 170px; height: 170px; margin: 4px auto 6px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; }
.ring-ticks { stroke: var(--dark); stroke-width: 6; stroke-dasharray: 1 5.3; opacity: .55; }
.ring-bg { stroke: rgba(0,0,0,.04); stroke-width: 14; }
.ring-val { stroke: var(--yellow); stroke-width: 14; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt strong { font: 300 34px/1 var(--font); }
.ring-txt span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ring-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* segments + dark list */
.big-pct { font: 300 44px/1 var(--font); }
.segs { display: flex; gap: 3px; margin: 8px 0 18px; }
.seg { display: flex; flex-direction: column; gap: 6px; min-width: 56px; }
.seg span { font-size: 12px; padding-left: 4px; border-left: 1.5px solid var(--dark); height: 22px; display: flex; align-items: flex-start; }
.seg i { font-style: normal; font-size: 13px; height: 42px; border-radius: 12px; display: flex; align-items: flex-end; padding: 0 0 7px 10px; }
.seg:first-child i { border-radius: 14px 6px 6px 14px; }
.seg:last-child i { border-radius: 6px 14px 14px 6px; }
.s-yellow { background: var(--yellow); }
.s-dark { background: var(--dark); color: #fff; }
.s-grey { background: var(--grey); color: #fff; }

.dark-card {
  background: var(--dark); color: #fff; border-radius: 24px; padding: 20px 18px 10px;
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  box-shadow: 0 -10px 0 -4px #9b9a95, 0 -18px 0 -9px #d8d6cf;
  margin-top: 12px;
}
.dark-card.solo { margin-top: 18px; }
.dc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; padding: 0 4px; }
.dc-head h3 { font-size: 19px; }
.dc-head span { font: 300 30px/1 var(--font); }
.dc-empty { color: #b9b8b2; font-size: 14px; padding: 0 4px; }
.dc-muted { color: #9f9e98; }
.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li a { display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-decoration: none; border-radius: 14px; }
.tasklist li a:hover { background: rgba(255,255,255,.05); }
.tl-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #4a4a46; flex: none; }
.tl-txt { flex: 1; min-width: 0; }
.tl-txt b { display: block; font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-txt small { color: #a9a8a2; font-size: 11.5px; }
.tasklist li.done .tl-txt b { text-decoration: line-through; color: #b5b4ae; }
.tasklist li.done .tl-ico { background: #3f3f3c; color: #8d8c87; }
.tl-state { width: 18px; height: 18px; border-radius: 50%; background: #55554f; flex: none; display: grid; place-items: center; color: var(--dark); }
.tl-state.s-approved { background: var(--yellow); }
.tl-state.s-rejected, .tl-state.s-resubmit { background: #d9795e; }
.tl-go { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); flex: none; }
.tasklist.big li a { padding: 12px 6px; }

/* accordion */
.accordion { padding: 10px 22px; }
.accordion details { border-bottom: 1px dashed rgba(0,0,0,.14); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 15px 0; cursor: pointer; font-size: 15.5px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.accordion details[open] summary svg { transform: rotate(180deg); }
.acc-body { padding: 0 0 14px; }
.acc-actions { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; }
.acc-actions a { color: var(--ink-2); }
.acc-empty { text-align: center; padding: 30px 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mini-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.mini-stats b { font-weight: 500; color: var(--ink); }

/* area table */
.wide2 .card-head { margin-bottom: 8px; }
.area-table { display: flex; flex-direction: column; }
.at-row { display: grid; grid-template-columns: 1.6fr .7fr .7fr 1.6fr .6fr; gap: 12px; align-items: center; padding: 11px 6px; text-decoration: none; font-size: 14px; border-bottom: 1px dashed rgba(0,0,0,.1); }
.role-bdo .at-row { grid-template-columns: 1.8fr .7fr 1.6fr .6fr; }
.at-row:last-child { border-bottom: 0; }
a.at-row:hover { background: rgba(255,255,255,.5); border-radius: 12px; }
.at-head { color: var(--muted); font-size: 12.5px; }
.at-name small { color: var(--muted); }
.at-bar { position: relative; height: 26px; background: rgba(255,255,255,.7); border-radius: 999px; overflow: hidden; }
.at-bar i { position: absolute; inset: 0 auto 0 0; background: var(--dark); border-radius: 999px; }
.at-bar em { position: relative; font-style: normal; font-size: 12px; line-height: 26px; padding-left: 10px; color: #fff; mix-blend-mode: difference; }
.badge { display: inline-block; min-width: 22px; text-align: center; background: var(--yellow); border-radius: 999px; padding: 1px 7px; font-weight: 500; font-size: 12px; }

/* maps */
.map { height: 360px; border-radius: 18px; overflow: hidden; background: #e9e7df; z-index: 0; }
.map.small { height: 230px; margin-top: 16px; }
.map.tall { height: calc(100vh - 290px); min-height: 440px; }
.leaflet-container { font-family: var(--font); }
.pt { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.35); }
.pt.f-possible { background: #e9b800; }
.pt.f-partial { background: #2a2a28; }
.pt.f-not_possible { background: #c2553d; }
.pt.k-village { background: #fff; border-color: #2a2a28; width: 12px; height: 12px; }
.pt.k-photo { background: #7fb3a6; }
.pop { font-size: 13px; min-width: 180px; }
.pop img { border-radius: 10px; margin-bottom: 8px; width: 200px; height: 120px; object-fit: cover; }
.pop b { display: block; font-size: 14px; }
.pop a { display: inline-block; margin-top: 6px; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.lg.f-possible { background: #e9b800; }
.lg.f-partial { background: #2a2a28; }
.lg.f-not_possible { background: #c2553d; }

/* ---------- pages ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 3vw, 38px); }
.page-head p { margin: 6px 0 0; }
.h-mr { font-size: .55em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.back:hover { color: var(--ink); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.two-col.even { grid-template-columns: 1fr 1fr; }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.card.side { position: sticky; top: 16px; }
.card.narrow { max-width: 820px; }

.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.6); border-radius: 999px; padding: 4px; width: fit-content; margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
.tabs a { text-decoration: none; padding: 8px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.tabs a.on { background: var(--dark); color: #fff; }
.tabs em { font-style: normal; font-size: 12px; opacity: .6; margin-left: 3px; }

/* forms */
input, select, textarea {
  font: 400 15px var(--font); color: var(--ink);
  width: 100%; padding: 11px 14px; border-radius: 14px;
  border: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.9);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #b9a043; box-shadow: 0 0 0 3px rgba(247,212,94,.35); }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; padding: 0; accent-color: var(--dark); flex: none; }
label, .label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
label small { color: var(--muted); font-weight: 400; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span2 { grid-column: span 2; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-foot { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.pw { display: flex; gap: 8px; align-items: center; }
.link-btn { border: 0; background: none; font: 500 13px var(--font); color: var(--ink-2); cursor: pointer; text-decoration: underline; white-space: nowrap; }
.inline-label { flex-direction: row; align-items: center; gap: 8px; white-space: nowrap; }
.inline-label input { width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 400 15px var(--font); text-decoration: none; white-space: nowrap;
  background: #fff; color: var(--ink);
}
.btn.dark { background: var(--dark); color: #fff; }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.ghost { background: transparent; border: 1.3px solid rgba(0,0,0,.18); }
.btn.ghost-light { background: transparent; border: 1.3px solid rgba(255,255,255,.3); color: #fff; }
.btn.danger { color: var(--bad); border-color: rgba(194,85,61,.35); }
.btn.big { height: 52px; font-size: 16px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:hover:not(:disabled) { filter: brightness(.96); }

.filters { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.filters.wrap { flex-wrap: wrap; }
.filters select, .filters input[type=date] { width: auto; min-width: 150px; }
.filters .btn { height: 44px; }
.card.filters { padding: 14px; }
.search { position: relative; flex: 1; min-width: 190px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px dashed rgba(0,0,0,.09); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table tr.inactive td { opacity: .5; }
.table tr.warn td { background: #fff5f0; }
.table.compact td { padding: 7px 10px; font-size: 13px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form.inline, form.inline { display: inline; }
.empty-row { text-align: center; color: var(--muted); padding: 30px 10px !important; }
.cell-input { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.6); }
.cell-input.short { width: 90px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); text-decoration: none; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.icon-btn.danger:hover { color: var(--bad); background: #fbe9e4; }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.06); color: var(--ink-2); margin-left: 4px; }
.warn-txt { color: var(--bad); }

.pager { display: flex; gap: 6px; justify-content: center; margin: 18px 0 0; flex-wrap: wrap; }
.pager a { min-width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; text-decoration: none; background: rgba(255,255,255,.7); font-size: 14px; padding: 0 10px; }
.pager a.on { background: var(--dark); color: #fff; }

/* modal */
.modal { border: 0; border-radius: 26px; padding: 24px; width: min(560px, calc(100% - 24px)); background: var(--card-solid); box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.modal::backdrop { background: rgba(30, 30, 28, .35); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }

/* people */
.people { display: flex; flex-direction: column; }
.person { display: flex; gap: 14px; align-items: center; padding: 12px 8px; text-decoration: none; border-bottom: 1px dashed rgba(0,0,0,.09); border-radius: 14px; }
.person:hover { background: rgba(255,255,255,.55); }
.person.inactive { opacity: .5; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 500; flex: none; background: #fff; border: 1.3px solid #9a978f; }
.avatar.r-collector { background: var(--dark); color: #fff; border: 0; }
.avatar.r-bdo { background: var(--yellow); border: 0; }
.avatar.xl { width: 70px; height: 70px; font-size: 22px; }
.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-main b { font-weight: 500; }
.p-main small { color: var(--muted); font-size: 12.5px; }
.p-vill { color: var(--ink-2) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.p-meta small { color: var(--muted); font-size: 12px; }
.checklist { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-right: 4px; }
.checklist .check { padding: 8px 6px; border-radius: 10px; align-items: flex-start; }
.checklist .check:hover { background: rgba(255,255,255,.6); }
.profile-top { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.profile-top h2 { margin: 0; }
.profile-top p { margin: 3px 0 0; }

/* schemes */
.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.scheme { display: flex; flex-direction: column; gap: 10px; }
.scheme.inactive { opacity: .6; }
.sc-top { display: flex; gap: 12px; align-items: center; }
.sc-badge { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; flex: none; color: var(--ink); }
.sc-title { flex: 1; min-width: 0; }
.sc-title h2 { margin: 0; font-size: 20px; }
.sc-title .mr { color: var(--muted); font-size: 14px; }
.sc-dept { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.sc-desc { margin: 0; color: var(--muted); font-size: 13.5px; }
.sc-progress { height: 8px; border-radius: 999px; background: repeating-linear-gradient(-55deg, rgba(255,255,255,.9) 0 5px, rgba(0,0,0,.08) 5px 6.5px); overflow: hidden; margin-top: 4px; }
.sc-progress i { display: block; height: 100%; background: var(--dark); border-radius: 999px; }
.sc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.sc-actions .pill-btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch i { display: block; width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.swatch input:checked + i { box-shadow: 0 0 0 2px var(--dark); }

/* question builder */
.fieldlist { list-style: none; margin: 0; padding: 0; }
.fieldlist li { display: flex; gap: 14px; align-items: center; padding: 13px 8px; border-bottom: 1px dashed rgba(0,0,0,.1); border-radius: 14px; }
.fieldlist li.fixed { opacity: .65; }
.fieldlist li.editing { background: var(--yellow-soft); }
.fl-no { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.fl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fl-main b { font-weight: 500; }
.fl-main small { color: var(--muted); font-size: 12.5px; }
.fl-actions form { display: flex; gap: 2px; }
.req { color: var(--bad); font-style: normal; }
.tag.t-photo { background: var(--yellow); }
.tag.t-location { background: #d9ebe5; }

/* assignment */
.assign-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; padding: 14px; position: sticky; top: 10px; z-index: 5; }
.assign-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tgroup header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.vcell { padding: 6px 4px; border-radius: 8px; align-items: flex-start !important; font-size: 13.5px !important; }
.vcell.locked span::after { content: ' •'; color: var(--warn); }

/* village officer */
.vo-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vo-village { margin-bottom: 16px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; text-decoration: none; }
.pick > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.pick small { color: var(--muted); font-size: 12.5px; }
.pick b { font-weight: 500; }

/* survey form (phone first) */
.survey-wrap { max-width: 680px; margin: 0 auto; }
.survey-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.survey-head .sc-badge { background: var(--sc); width: 54px; height: 54px; border-radius: 18px; }
.survey-head h1 { font-size: 26px; }
.survey-head h1 .mr { font-size: 18px; color: var(--muted); }
.survey-head p { margin: 2px 0 0; color: var(--ink-2); }
.survey-desc { background: rgba(255,255,255,.55); border-radius: 18px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.survey-form { display: flex; flex-direction: column; gap: 12px; }
.gps-box { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--dark); color: #fff; }
.gps-ico { width: 40px; height: 40px; border-radius: 50%; background: #4a4a46; display: grid; place-items: center; flex: none; }
.gps-box.ok .gps-ico { background: var(--yellow); color: var(--ink); }
.gps-box.bad .gps-ico { background: #c2553d; }
.gps-txt { flex: 1; display: flex; flex-direction: column; }
.gps-txt b { font-weight: 400; }
.gps-txt small { color: #b3b2ac; font-size: 12.5px; }
.gps-box .pill-btn { height: 36px; padding: 0 12px; background: rgba(255,255,255,.12); color: #fff; }
.q { background: rgba(255,255,255,.62); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.q legend { font-size: 15.5px; float: left; width: 100%; margin-bottom: 10px; }
.q legend .mr { color: var(--muted); font-size: 14px; }
.q legend + * { clear: both; }
.q-help { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); clear: both; }
.q.invalid { box-shadow: 0 0 0 2px var(--bad); }
.seg-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; clear: both; }
.seg-choice label { position: relative; }
.seg-choice input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 64px; border-radius: 16px; background: #fff; border: 1.3px solid rgba(0,0,0,.1); font-size: 14px; color: var(--ink); cursor: pointer; }
.seg-choice small { font-size: 13px; color: var(--muted); }
.seg-choice .sc-possible input:checked + span { background: var(--yellow); border-color: var(--yellow); }
.seg-choice .sc-partial input:checked + span { background: var(--dark); border-color: var(--dark); color: #fff; }
.seg-choice .sc-not_possible input:checked + span { background: #c2553d; border-color: #c2553d; color: #fff; }
.seg-choice input:checked + span small { color: inherit; opacity: .8; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.chips label { position: relative; }
.chips span { display: inline-block; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1.3px solid rgba(0,0,0,.1); font-size: 14px; color: var(--ink); cursor: pointer; }
.chips input:checked + span { background: var(--dark); color: #fff; border-color: var(--dark); }
.chips input:focus-visible + span, .seg-choice input:focus-visible + span { outline: 2px solid #b9a043; }
.loc-field { display: flex; gap: 8px; clear: both; }
.photo-field { clear: both; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumbs:empty { display: none; }
.thumbs figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #ddd; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: 12px 6px 4px; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.shoot { margin-top: 8px; flex-direction: row !important; align-items: center; justify-content: center; gap: 10px !important; height: 64px; border-radius: 18px; border: 1.6px dashed rgba(0,0,0,.25); background: rgba(255,255,255,.6); color: var(--ink) !important; font-size: 15px !important; cursor: pointer; }
.shoot:active { background: var(--yellow-soft); }
.submit-bar { position: sticky; bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(251,250,246,.92); backdrop-filter: blur(10px); border-radius: 999px; padding: 8px 8px 8px 20px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.3); z-index: 20; }
.hist { margin-top: 18px; }
.hist-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 10px; padding: 10px 4px; border-bottom: 1px dashed rgba(0,0,0,.1); text-decoration: none; font-size: 13.5px; align-items: center; }
.hist-row:last-child { border-bottom: 0; }

.gp-card { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 20px; padding: 12px 16px; margin-bottom: 12px; }
.gp-card > div { display: flex; flex-direction: column; }
.gp-card b { font-weight: 500; font-size: 17px; }
.gp-card small { color: var(--muted); font-size: 12px; }
.gp-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; flex: none; }
.stamp-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.template-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 8px 2px; }

/* dropdown lists */
.lists-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.list-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.list-nav a { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 16px; text-decoration: none; }
.list-nav a:hover { background: rgba(255,255,255,.6); }
.list-nav a.on { background: var(--dark); color: #fff; }
.list-nav b { font-weight: 500; }
.list-nav small { font-size: 12px; opacity: .65; }
.list-title { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr auto; gap: 8px; margin-bottom: 14px; }
.title-input { font-size: 18px; }
.items-table td { padding: 6px 8px; }
.add-items { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }

/* survey list + detail */
.sub-list { display: flex; flex-direction: column; gap: 10px; }
.sub-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; text-decoration: none; }
.sub-row:hover { background: rgba(255,255,255,.78); }
.sub-thumb { width: 72px; height: 72px; border-radius: 18px; background: #e7e4da center/cover no-repeat; flex: none; display: grid; place-items: center; color: var(--muted); position: relative; }
.sub-thumb em { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 0 6px; }
.sub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sub-main b { font-weight: 500; }
.sub-scheme { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.sub-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.feas, .status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.feas.big, .status.big { padding: 9px 18px; font-size: 14px; }
.feas.f-possible { background: var(--yellow); }
.feas.f-partial { background: var(--dark); color: #fff; }
.feas.f-not_possible { background: #c2553d; color: #fff; }
.status { border: 1.3px solid rgba(0,0,0,.15); background: rgba(255,255,255,.6); }
.status.s-approved { border-color: var(--ok); color: var(--ok); }
.status.s-rejected { border-color: var(--bad); color: var(--bad); }
.status.s-resubmit { border-color: var(--warn); color: var(--warn); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.answers { margin: 0; display: flex; flex-direction: column; }
.answers > div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(0,0,0,.1); font-size: 14px; }
.answers > div:last-child { border-bottom: 0; }
.answers dt { color: var(--muted); }
.answers dd { margin: 0; word-break: break-word; }
.answers.tight > div { padding: 7px 0; font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.g-item { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; background: #ddd; text-decoration: none; }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; color: #fff; font-size: 11px; line-height: 1.35; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.review { margin-top: 0; box-shadow: none; }
.review textarea { background: #3a3a37; border-color: #4a4a46; color: #fff; }
.review-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.review-opts label { position: relative; }
.review-opts input { position: absolute; opacity: 0; }
.review-opts span { display: grid; place-items: center; height: 44px; border-radius: 14px; background: #3a3a37; color: #ddd; font-size: 13.5px; cursor: pointer; }
.ro-approved input:checked + span { background: var(--yellow); color: var(--ink); }
.ro-resubmit input:checked + span { background: #e4b34a; color: var(--ink); }
.ro-rejected input:checked + span { background: #c2553d; color: #fff; }

/* ---------- auth / install ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(80% 70% at 100% 100%, #fbe3a0 0%, rgba(251,227,160,0) 60%), linear-gradient(160deg, #eeede8, #f5efdc); }
.auth-card { width: min(440px, 100%); background: rgba(255,255,255,.66); backdrop-filter: blur(12px); border-radius: 30px; padding: 32px 30px; box-shadow: 0 30px 60px -30px rgba(60,50,20,.35); }
.auth-card.wide { width: min(780px, 100%); }
.auth-card .brand { display: block; margin: 6px 0 18px; text-align: center; }
.auth-card h1, .auth-card > p { text-align: center; }
.auth-logo { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); }
.auth-top { position: fixed; top: 16px; right: 16px; }
.auth-credit { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; }
.auth-credit a { color: var(--ink-2); font-weight: 500; }
.auth-wrap { grid-template-rows: 1fr auto; }
.auth-card h1 { font-size: 34px; }
.auth-card > p { margin: 6px 0 22px; }
.auth-roles { display: flex; gap: 14px; justify-content: center; margin-top: 22px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.auth-roles span { display: flex; align-items: center; gap: 6px; }
.sw-dark { background: var(--dark); }
.sw-yellow { background: var(--yellow); }
.sw-line { border: 1.3px solid #8a877f; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13.5px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks .ok { color: var(--ok); }
.checks .bad { color: var(--bad); font-weight: 500; }
.checks .soft { color: var(--muted); }
.page-install fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 18px; background: rgba(255,255,255,.5); padding: 18px; border-radius: 20px; }
.page-install legend { float: left; grid-column: 1 / -1; font-size: 16px; margin-bottom: 4px; }
.page-install .form-grid { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid .tall { grid-row: span 2; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid .side-stack { grid-column: 1 / -1; }
}
@media (max-width: 1240px) {
  .topbar { flex-wrap: wrap; }
  .mainnav { order: 3; width: fit-content; max-width: 100%; margin-left: 0; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .bignums { grid-column: 1; margin-top: 18px; }
}
@media (max-width: 980px) {
  .lists-layout { grid-template-columns: 1fr; }
  .list-title { grid-template-columns: 1fr 1fr; }
  .topbar { flex-wrap: wrap; }
  .mainnav { order: 3; width: 100%; margin-left: 0; }
  .top-actions { margin-left: auto; }
  .two-col, .two-col.even, .vo-grid { grid-template-columns: 1fr; }
  .card.side { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .shell { margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; padding: 14px 14px 10px; }
  .topbar { margin-bottom: 20px; gap: 10px; }
  .brand { font-size: 18px; padding: 3px 14px 3px 3px; }
  .brand img { width: 32px; height: 32px; }
  .lang-toggle a { padding: 7px 9px; }
  .hide-sm { display: none; }
  .hero { margin-bottom: 20px; }
  .pillbars { flex-wrap: wrap; }
  .pillbar { flex: 1 1 40% !important; }
  .bignums { width: 100%; justify-content: space-between; gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .wide2, .dash-grid .full { grid-column: auto; }
  .dash-grid .tall { grid-row: auto; }
  .card { padding: 18px 16px; border-radius: 22px; }
  .at-row { grid-template-columns: 1.4fr .8fr 1.3fr .5fr; }
  .role-collector .at-row > span:nth-child(2) { display: none; }
  .form-grid, .page-install fieldset { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: wrap; }
  .filters select, .filters input[type=date] { flex: 1 1 45%; min-width: 0; }
  .sub-row { gap: 12px; padding: 10px; }
  .sub-thumb { width: 60px; height: 60px; border-radius: 14px; }
  .sub-row { flex-wrap: wrap; }
  .sub-main { flex: 1 1 calc(100% - 80px); }
  .sub-tags { flex-direction: row; width: 100%; padding-left: 72px; justify-content: flex-start; }
  .checkgrid { grid-template-columns: 1fr; }
  .assign-bar { position: static; }
  .checks { grid-template-columns: 1fr; }
  .person .p-meta small { display: none; }
  .answers > div { grid-template-columns: 1fr; gap: 2px; }
  .map.tall { height: 64vh; }
  .foot { flex-direction: column; gap: 4px; }
}

/* Names and titles that can run long: full when there is room, … when there is not */
.dd-head strong, .dd-head span,
.p-main b, .p-main small,
.pc-foot h3, .pc-foot p,
.profile-top h2, .page-head h1,
.at-name, .sc-title h2, .sub-main b, .pick b,
.list-nav b, .list-nav small {
  display: block; min-width: 0; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-foot > div, .profile-top > div { min-width: 0; max-width: 100%; }
.page-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.brand { flex: none; }
.brand span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.dropdown { max-width: min(320px, calc(100vw - 32px)); }

/* Collector login sheet */
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-head p { margin: 0; max-width: 640px; }
.sheet-table td { vertical-align: top; }
.sheet-table td b.fit { max-width: 240px; font-weight: 500; }
.sheet-area small { display: block; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-cell { display: inline-flex; align-items: center; gap: 2px; }
.pw-mask { min-width: 92px; display: inline-block; letter-spacing: .5px; }
.pw-mask.shown { background: var(--yellow-soft); }
.copyable { cursor: copy; }
.copied { outline: 2px solid var(--ok); outline-offset: 1px; }
.pw-current { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }

@media print {
  body { background: #fff; }
  .shell { margin: 0; box-shadow: none; background: #fff; padding: 0; }
  .topbar, .tabs, .foot, .sheet-head .head-actions, .row-actions, .icon-btn, .page-head .head-actions { display: none !important; }
  .card { box-shadow: none; background: #fff; }
  .pw-mask { background: none !important; }
}

@media (max-width: 720px) {
  /* phones: long names wrap to two lines before being cut */
  .hero h1.fit { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 28px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand span { max-width: none; min-width: 0; }
  .topbar { flex-wrap: wrap; }
  .top-actions { flex: none; }
}

/* v1.6 login sheet download */
.sheet-dl { display: flex; gap: 8px; align-items: center; }
.sheet-dl select { height: 40px; width: auto; min-width: 150px; }
.sheet-head .head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media print { .sheet-filter { display: none !important; } }

/* v1.9 live refresh bar + edit requests */
.live-bar { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); display: flex; gap: 14px; align-items: center;
  background: #1f1e1b; color: #fff; padding: 10px 10px 10px 18px; border-radius: 99px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: transform .3s ease; z-index: 60; font-size: 14px; }
.live-bar.on { transform: translate(-50%, 0); }
.live-bar button { border: 0; background: #f7d45e; color: #1f1e1b; border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer; }
.status.s-edit { background: #fde6c8; color: #8a4b0f; }
.status.s-edit-ok { background: #e3e0fb; color: #4b3fb0; }
.edit-box.asking { outline: 2px solid #f0b35a; }
.edit-reason { margin: 6px 0 12px; padding: 10px 12px; background: #fbf6e6; border-radius: 12px; font-size: 14px; }
.auth-app { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding: 12px 16px; border-radius: 16px;
  background: rgba(255,255,255,.7); color: inherit; text-decoration: none; border: 1px solid rgba(0,0,0,.08); }
.auth-app:hover { background: #fff; }
.auth-app small { display: block; color: #7a776d; font-size: 12px; }
.edit-alert { display: block; color: inherit; text-decoration: none; }
.auth-app { position: relative; overflow: hidden; }
.auth-app .dl-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.auth-app .dl-bar i { display: block; height: 100%; width: 0; background: #7a67e8; transition: width .2s; }
.auth-app.loading { cursor: progress; }
.dl-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); background: #1f1e1b; color: #fff; padding: 12px 18px;
  border-radius: 14px; font-size: 14px; max-width: calc(100% - 32px); text-align: center; transition: transform .3s ease; z-index: 50; }
.dl-toast.on { transform: translate(-50%, 0); }
.app-steps { text-align: left; margin: 16px 0 6px; padding-left: 20px; font-size: 13.5px; color: #55524a; line-height: 1.55; }
.app-back { margin-top: 12px; font-size: 13.5px; }
.app-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-card .auth-app { margin-top: 0; min-width: 260px; }
.dl-toast { opacity: 0; visibility: hidden; transition: transform .3s ease, opacity .3s ease, visibility 0s .3s; }
.dl-toast.on { opacity: 1; visibility: visible; transition: transform .3s ease, opacity .3s ease; }
