/* Pushkara Mitra design system. Colours from the ghats themselves: Godavari river green,
   kumkum red, turmeric, temple-wall cream and lamp-black ink. Light by default for use in
   bright sun; the command centre uses .theme-dark (warm charcoal, not blue). */
:root {
  --bg: #f5eedf; --bg-2: #ece2cd; --card: #fffaf0; --ink: #2b2118; --muted: #6b5a48; --line: #e0d2b8;
  --brand: #1f5f66; --brand-2: #2a7378; --brand-ink: #ffffff; --deep: #174a50;
  --gold: #e2a72e; --gold-2: #ecbd5a; --accent: #b5341f; --kumkum: #b5341f; --kumkum-2: #96291a;
  --ok: #4f7a3a; --ok-bg: #e3ecd6; --warn: #a1561a; --warn-bg: #f8e7bf; --bad: #b5341f; --bad-bg: #f6ddd3; --info-bg: #dfeae6;
  --radius: 12px; --shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(60, 40, 20, .06), 0 4px 14px rgba(60, 40, 20, .06);
  --font: "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Noto Serif", "Noto Serif Telugu", "Noto Serif Devanagari", Georgia, serif;
}
.theme-dark {
  --bg: #1a1612; --bg-2: #221d17; --card: #26201a; --ink: #f1e8d8; --muted: #b3a48c; --line: #3a3128;
  --brand: #1f5f66; --brand-2: #5fa3a6; --deep: #120f0c;
  --ok: #9cc27e; --ok-bg: #26301f; --warn-bg: #3a2c16; --bad-bg: #3d1d16; --info-bg: #1b3234; --bad: #e07a62;
  --shadow: 0 1px 0 rgba(255, 240, 220, .03), 0 6px 20px rgba(0, 0, 0, .3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--display); }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
h2 { font-size: 20px; margin: 0 0 6px; }
h3 { font-size: 16px; }
a { color: var(--brand-2); }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 900; color: var(--brand-ink); padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
         background: var(--brand); border-bottom: 4px solid transparent;
         border-image: repeating-linear-gradient(90deg, var(--kumkum) 0 14px, #f5eedf 14px 28px) 4; }
.theme-dark header { background: #120f0c; }
header::before { content: ""; width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='16' fill='%23ffffff' fill-opacity='.12'/%3E%3Cpath d='M32 10l9 14H23z' fill='%23ecbd5a'/%3E%3Crect x='25' y='24' width='14' height='12' rx='2' fill='%23e2a72e'/%3E%3Cpath d='M10 44c7-5 15-5 22 0s15 5 22 0' stroke='%23ffffff' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M10 53c7-5 15-5 22 0s15 5 22 0' stroke='%23e8b4a6' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
header h1 { font-size: 18px; margin: 0; font-weight: 700; }
header .sub { opacity: .8; font-size: 12.5px; }
header .spacer { flex: 1; }
header select { width: auto; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); padding: 6px 8px; border-radius: 9px; }
header select option { color: #111; }
header button.secondary { color: #fff !important; border-color: rgba(255, 255, 255, .4) !important; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { background: #e3ecd6; color: #3d6129; }
.pill.offline { background: #f6ddd3; color: #96291a; }

main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 40px; }

/* ---------- tabs ---------- */
nav.tabs { position: sticky; top: 58px; z-index: 800; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
           background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
nav.tabs button { border: 1px solid var(--line); background: var(--card); padding: 9px 15px; border-radius: 999px; color: var(--muted);
                  font-weight: 700; white-space: nowrap; cursor: pointer; font-size: 14.5px; font-family: inherit; transition: all .15s; }
nav.tabs button:hover { color: var(--ink); }
nav.tabs button.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- cards + forms ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg);
                          color: var(--ink); font-size: 16px; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 18%, transparent); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 14px; }
button.primary, button.secondary { padding: 12px 20px; border-radius: 11px; font-weight: 800; font-size: 15.5px; cursor: pointer; margin-top: 14px;
                                   font-family: inherit; transition: transform .08s, box-shadow .15s, filter .15s; }
button.primary { border: 0; color: #fff; background: var(--kumkum); box-shadow: 0 2px 0 var(--kumkum-2); }
button.primary:hover { background: var(--kumkum-2); }
button.primary:active, button.secondary:active { transform: translateY(1px); }
button.secondary { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
button.secondary:hover { border-color: var(--brand-2); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13.5px; }

/* ---------- wristband ---------- */
.band { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border: 2px dashed var(--gold); border-radius: 16px; padding: 14px 16px; margin-top: 14px;
        background: repeating-linear-gradient(135deg, #fffaf0 0 14px, #f8efd9 14px 28px); color: #2b2118; }
.band img { width: 124px; height: 124px; background: #fff; padding: 6px; border-radius: 10px; }
.band .code { font: 800 28px ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 3px; color: var(--deep); }

/* ---------- alerts, lists, tags ---------- */
.alert { padding: 12px 14px; border-radius: 12px; margin-top: 12px; font-weight: 600; border-left: 4px solid; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.alert.info { background: var(--info-bg); color: var(--brand-2); border-color: var(--brand-2); }
.theme-dark .alert.ok { color: #9cc27e; } .theme-dark .alert.warn { color: #e8b75a; } .theme-dark .alert.info { color: #8fc3c4; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--card); }
.item .grow { flex: 1; min-width: 190px; }
.item small { color: var(--muted); display: block; }
.score { font: 800 22px var(--display); color: var(--brand-2); min-width: 52px; text-align: center; }
.tag { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; }
.tag.missing { background: #f6ddd3; color: #96291a; } .tag.found { background: #dfeae6; color: #174a50; }
.tag.matched { background: #f8e7bf; color: #7a5410; } .tag.reunited { background: #e3ecd6; color: #3d6129; }
.tag.open { background: #ece2cd; color: #6b5a48; }
#reader { width: 100%; max-width: 360px; margin-top: 10px; border-radius: 12px; overflow: hidden; }

/* ---------- tables (dashboard) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
tr:hover td { background: color-mix(in srgb, var(--brand-2) 6%, transparent); }

@media (max-width: 520px) {
  header h1 { font-size: 16px; } header::before { width: 32px; height: 32px; }
  nav.tabs { top: 54px; }
  .card { padding: 15px; }
}
@media print {
  header, nav.tabs, button, form, .card > h2, .card > p { display: none !important; }
  .card { border: 0; box-shadow: none; }
}
