[hidden] { display: none !important; }
/* ===== Colour themes — pick one with "Theme" in appsettings.json ===== */
:root, [data-theme="blue-gold"] {
  --brand: #0B2545;      /* header, deep navy */
  --brand-2: #13315C;    /* borders, focus */
  --brand-ink: #13315C;  /* coloured text on light backgrounds */
  --accent: #E0B03A;     /* main button, badges (gold) */
  --on-accent: #0B2545;  /* text on gold */
  --select: #13315C;     /* selected chips */
  --on-select: #ffffff;
  --soft: #FFF7E0;       /* light tint panels */
  --soft-line: #EED48A;
  --ring: #F2D27A;       /* focus outline */
  --head-bg: #EEF2F8;
  --tag-bg: #E8EEF7;
  --tag-ink: #13315C;
  --bg: #F4F6FA;
  --card: #ffffff;
  --text: #14213D;
  --muted: #5B6676;
  --line: #D5DCE6;
  --err: #B42318;
}
[data-theme="blue-teal"] {
  --brand: #0A2F51;
  --brand-2: #0B6E79;
  --brand-ink: #0A4A6B;
  --accent: #0B7F80;     /* teal */
  --on-accent: #ffffff;
  --select: #0B7F80;
  --on-select: #ffffff;
  --soft: #E2F4F3;
  --soft-line: #A6DCD8;
  --ring: #9EDAD5;
  --head-bg: #EAF1F7;
  --tag-bg: #E2F4F3;
  --tag-ink: #075E60;
  --bg: #F3F7F9;
  --card: #ffffff;
  --text: #13253A;
  --muted: #586777;
  --line: #D3DEE5;
  --err: #B42318;
}
* { box-sizing: border-box; }
a { color: var(--tag-ink); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
.topbar {
  background: var(--brand); color: #fff; padding: 14px 16px; border-bottom: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; font-size: 18px; }
.adminnav { display: flex; gap: 14px; align-items: center; }
.adminnav a, .linkbtn { color: #fff; text-decoration: none; font-size: 15px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.adminnav form { margin: 0; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 48px; }
.wrap.wide { max-width: 1200px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; }
h1 { font-size: 22px; margin: 4px 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }

.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hi { font-weight: 400; color: var(--muted); font-size: 14px; }
.req { color: var(--err); }
input[type=text], input[type=tel], input[type=number], input[type=password], select {
  width: 100%; font-size: 17px; padding: 13px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--text); min-height: 50px;
}
input:focus, select:focus { outline: 3px solid var(--ring); border-color: var(--brand-2); }

/* big tap-friendly radio / checkbox chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span {
  display: inline-block; padding: 11px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 16px; user-select: none; cursor: pointer;
}
.chip input:checked + span { background: var(--select); border-color: var(--select); color: var(--on-select); }
.chip input:focus-visible + span { outline: 3px solid var(--ring); }

.file { display: block; padding: 14px; border: 2px dashed var(--line); border-radius: 10px; background: var(--bg); font-size: 15px; }
.file input { width: 100%; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.err, .field-validation-error { color: var(--err); font-size: 14px; display: block; margin-top: 4px; }
.validation-summary-errors ul { margin: 0 0 12px; padding-left: 18px; color: var(--err); }

.btn {
  display: inline-block; width: 100%; padding: 15px; font-size: 18px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 12px; cursor: pointer; text-align: center; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn.small { width: auto; padding: 9px 14px; font-size: 15px; font-weight: 600; }
.btn.ghost { background: #fff; color: var(--brand-ink); border: 1px solid var(--brand-2); }

.success { text-align: center; padding: 32px 16px; }
.success .tick { font-size: 56px; line-height: 1; color: var(--select); }

/* admin */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.toolbar .f { flex: 1 1 160px; }
.toolbar label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.toolbar input, .toolbar select { min-height: 42px; padding: 8px 10px; font-size: 15px; }
.count { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
td.wrapcell { white-space: normal; min-width: 180px; }
th { background: var(--head-bg); font-weight: 600; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; background: var(--tag-bg); color: var(--tag-ink); border-radius: 6px; padding: 2px 7px; margin: 1px 2px 1px 0; font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* admin cards on phones */
@media (max-width: 720px) {
  .tablewrap { border: 0; background: none; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 0; }
  td { border: 0; padding: 5px 14px; white-space: normal; }
  td::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
}

.qrbox { text-align: center; }
#qr { display: inline-block; padding: 16px; background: #fff; border-radius: 12px; border: 1px solid var(--line); margin: 12px 0; }
.qrurl { word-break: break-all; font-size: 14px; color: var(--muted); }
@media print {
  .topbar, .noprint { display: none !important; }
  .card { border: 0; }
}

/* Google Places suggestion dropdown */
.pac {
  position: absolute; left: 0; right: 0; top: 52px; z-index: 20; margin: 4px 0 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 300px; overflow-y: auto;
}
.pac li { padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pac li:last-child { border-bottom: 0; }
.pac li strong { display: block; font-weight: 600; }
.pac li small { display: block; color: var(--muted); font-size: 13px; }
.pac li.on, .pac li:hover { background: var(--soft); }
.pac li.pac-none { color: var(--muted); cursor: default; font-size: 14px; }
input.picked { border-color: var(--select); background: var(--soft) no-repeat right 12px center; padding-right: 38px; }
input.picked, [data-theme="blue-gold"] input.picked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%2313315C' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); }
[data-theme="blue-teal"] input.picked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%230B7F80' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E"); }
.maplink { font-size: 12px; margin-left: 6px; color: var(--tag-ink); }

.rupee { position: relative; }
.rupee span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; }
.rupee input { padding-left: 30px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.stat b { display: block; font-size: 22px; color: var(--brand-ink); }
.stat small { color: var(--muted); font-size: 13px; }
.who { font-size: 13px; opacity: .85; }
.delbtn { background: none; border: 0; color: var(--err); cursor: pointer; font-size: 13px; padding: 0; }

/* ---- type-of-work picker ---- */
.worksearch {
  width: 100%; font-size: 17px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; min-height: 50px; margin-bottom: 6px; -webkit-appearance: none;
}
.picked-bar {
  position: sticky; top: 56px; z-index: 4; background: var(--soft); border: 1px solid var(--soft-line);
  border-radius: 12px; padding: 8px 10px; margin-bottom: 10px;
}
.picked-head { font-size: 14px; color: var(--brand-ink); margin-bottom: 6px; }
.picked-list { display: flex; flex-wrap: wrap; gap: 6px; }
.picked {
  border: 0; background: var(--select); color: var(--on-select); border-radius: 999px; padding: 7px 12px;
  font-size: 14px; cursor: pointer; white-space: pre;
}
details.cat { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; overflow: hidden; }
details.cat summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  cursor: pointer; min-height: 60px; user-select: none;
}
details.cat summary::-webkit-details-marker { display: none; }
.cat-icon { font-size: 28px; width: 36px; text-align: center; flex: none; }
.cat-name { flex: 1; font-weight: 600; font-size: 17px; line-height: 1.25; }
.cat-name small, .chip.job small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.cat-badge { background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 999px; min-width: 24px; height: 24px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; }
.cat-arrow { font-size: 24px; color: var(--muted); transition: transform .15s; }
details.cat[open] .cat-arrow { transform: rotate(90deg); }
details.cat[open] summary { background: var(--soft); border-bottom: 1px solid var(--line); }
details.cat .chips { padding: 12px; }
.chip.job span { border-radius: 12px; text-align: left; line-height: 1.25; }
.chip.job input:checked + span small { color: rgba(255,255,255,.82); }
