:root {
  --bg: #eef3f1;
  --surface: #ffffff;
  --text: #13201b;
  --muted: #4f5f58;
  --border: #c9d5d0;
  --primary: #0b5a42;
  --primary-2: #12805e;
  --primary-ink: #ffffff;
  --primary-soft: #dcefe7;
  --accent: #c8932b;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --computed: #f1f5f3;
  --shadow: 0 1px 2px rgba(10,40,30,.06), 0 4px 14px rgba(10,40,30,.06);
  --shadow-lg: 0 10px 30px rgba(10,40,30,.14);
  --radius: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1412; --surface: #16201d; --text: #eef3f1; --muted: #a9b8b2;
    --border: #2e3c37; --primary: #34b386; --primary-2: #49c999; --primary-ink: #062018; --primary-soft: #173a2e;
    --accent: #e0b052; --danger: #ff7a6e; --danger-soft: #3a1b19; --computed: #111a17;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Noto Sans Tamil", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
.ta { font-family: "Noto Sans Tamil", sans-serif; font-weight: 500; color: var(--muted); font-size: .84em; }
.btn .ta, .tab .ta { color: inherit; opacity: .85; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error-text { color: var(--danger); font-size: 13px; min-height: 1em; margin: 6px 0; font-weight: 500; }
code { background: var(--computed); padding: 1px 5px; border-radius: 4px; }
.print-only { display: none; }

/* ---------- animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(18,128,94,.55); } 100% { box-shadow: 0 0 0 8px rgba(18,128,94,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.page:not(.hidden) { animation: fadeUp .35s var(--ease); }
.pop { animation: popIn .3s var(--ease); }
.reveal { animation: reveal .3s var(--ease); }
.flash { animation: flash .6s ease-out; border-color: var(--primary-2) !important; }
.section { animation: fadeUp .4s var(--ease) both; }
.section:nth-of-type(2) { animation-delay: .05s; } .section:nth-of-type(3) { animation-delay: .1s; } .section:nth-of-type(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- layout ---------- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-bg { background: radial-gradient(circle at 20% 10%, var(--primary-2) 0, transparent 45%), linear-gradient(160deg, var(--primary) 0%, #06382a 100%); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.narrow { width: 100%; max-width: 400px; }
.login-bg .card { box-shadow: var(--shadow-lg); border: 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }

.logo { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none; }
.brand-big { text-align: center; margin-bottom: 16px; }
.brand-big .logo { margin: 0 auto 10px; width: 56px; height: 56px; font-size: 32px; box-shadow: 0 6px 16px rgba(11,90,66,.35); }
.brand-big h1 { font-size: 21px; margin: 0; display: flex; flex-direction: column; gap: 2px; }

.topbar { position: sticky; top: 0; z-index: 10; color: #fff;
  background: linear-gradient(120deg, #0b5a42 0%, #12805e 100%);
  display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; box-shadow: 0 2px 10px rgba(6,56,42,.25); }
.topbar .logo { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.topbar .ta { color: rgba(255,255,255,.85); }
.brand { display: flex; gap: 10px; align-items: center; }
.brand-title { font-weight: 700; letter-spacing: .01em; }
.tabs { display: flex; gap: 6px; flex: 1; }
.tab { border: 0; background: transparent; color: rgba(255,255,255,.88); padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; transition: background .2s, color .2s, transform .1s; }
.tab:hover { background: rgba(255,255,255,.12); }
.tab:active { transform: scale(.97); }
.tab.active { background: #fff; color: var(--primary); }
.tab.active .ta { color: var(--primary); }
.user-box { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.9); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 9px 14px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .1s, box-shadow .2s, background .2s, border-color .2s; }
.btn:hover { border-color: var(--primary-2); box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); color: var(--primary-ink); border-color: transparent; }
.btn.primary:hover { box-shadow: 0 4px 14px rgba(11,90,66,.35); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--computed); }
.btn.light { background: #fff; color: var(--primary); border-color: #fff; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.ghost-light:hover { background: rgba(255,255,255,.12); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; margin-top: 6px; padding: 11px; }
.btn:disabled { opacity: .55; cursor: wait; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 6px 8px; border-radius: 6px; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; }
.field small.ta { margin-left: 4px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
select:disabled { background: var(--computed); color: var(--muted); }
input.computed { background: var(--computed); color: var(--primary); font-weight: 600; border-style: dashed; }
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field .hint { color: var(--danger); font-size: 12px; font-weight: 500; }
.input-group { display: flex; }
.input-group .prefix { display: grid; place-items: center; padding: 0 10px; border: 1.5px solid var(--border); border-right: 0;
  border-radius: 9px 0 0 9px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 14px; }
.input-group input { border-radius: 0 9px 9px 0; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0 14px; }
.grid > .field { justify-content: space-between; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } .span-2 { grid-column: span 1; } }

.section { margin: 0 0 18px; border-top: 4px solid var(--primary-2); }
.section legend { font-weight: 700; font-size: 16.5px; padding: 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
fieldset.card { padding-top: 14px; }
.form-head h2 { margin: 4px 0 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sub-head { margin: 8px 0 12px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 15px; color: var(--primary); }
.q-block { border-bottom: 1px dashed var(--border); margin-bottom: 14px; }

.seg { display: flex; gap: 6px; }
.seg label { flex: 1; }
.seg input { display: none; }
.seg span { display: block; text-align: center; border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 6px; cursor: pointer; font-size: 13.5px; font-weight: 500; transition: all .2s var(--ease); user-select: none; }
.seg span:hover { border-color: var(--primary-2); }
.seg input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; transform: scale(1.02); box-shadow: 0 3px 10px rgba(11,90,66,.25); }
.seg input[value=false]:checked + span { background: #5b6b65; border-color: #5b6b65; box-shadow: none; }

.photo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.photo-box { width: 115px; height: 138px; border: 2px dashed var(--border); border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; background: var(--computed); flex: none; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
#photo-placeholder { font-size: 13px; line-height: 1.5; }
.photo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.family-row { position: relative; border: 1.5px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 44px 0 12px; margin-bottom: 10px;
  animation: fadeUp .3s var(--ease); transition: opacity .2s, transform .2s; background: var(--surface); }
.family-row.leaving { opacity: 0; transform: translateX(20px); }
.fam-grid { grid-template-columns: 2fr 1.4fr .8fr; }
@media (max-width: 520px) { .fam-grid { grid-template-columns: 1fr 1fr; } .fam-grid .field:first-child { grid-column: span 2; } }
.fam-remove { position: absolute; top: 8px; right: 6px; }

.form-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px);
  padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--border); }
.form-actions .error-text { margin-right: auto; }
.form-actions .btn.primary { padding: 11px 26px; font-size: 15.5px; }

/* ---------- camera ---------- */
.modal { position: fixed; inset: 0; background: rgba(5,20,15,.7); display: grid; place-items: center; z-index: 95; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 16px; padding: 14px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.cam-frame { position: relative; aspect-ratio: 5 / 6; background: #000; border-radius: 12px; overflow: hidden; }
.cam-frame video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame video.mirror { transform: scaleX(-1); }
.cam-guide { position: absolute; inset: 12% 20% 18%; border: 2px dashed rgba(255,255,255,.65); border-radius: 50% 50% 45% 45%; pointer-events: none; }
.cam-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.cam-actions .primary { flex: 1; justify-content: center; }

/* ---------- list ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar #search { flex: 1 1 260px; }
.toolbar select { flex: 0 1 240px; width: auto; }
.spacer { flex: 1; }
.list-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 6px; font-weight: 500; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 250px; padding: 5px; z-index: 20;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .18s, transform .18s var(--ease); }
.dropdown-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu button { display: block; width: 100%; text-align: left; padding: 10px 11px; border: 0; background: transparent; color: var(--text); font: inherit; border-radius: 7px; cursor: pointer; }
.dropdown-menu button:hover { background: var(--primary-soft); color: var(--primary); }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table.records { width: 100%; border-collapse: collapse; }
.records th, .records td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.records th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); font-weight: 700; background: var(--primary-soft); }
.records tbody tr { cursor: pointer; animation: fadeUp .3s var(--ease) both; transition: background .15s; }
.records tbody tr:hover { background: var(--computed); }
.records tbody tr:last-child td { border-bottom: 0; }
.thumb { width: 40px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--computed); display: block; }
.thumb.blank { display: grid; place-items: center; color: var(--muted); font-size: 18px; }
.name-cell b { display: block; }
.badge { display: inline-block; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.row-actions { white-space: nowrap; text-align: right; }
.act { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 5px 8px; margin-left: 4px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .1s, background .2s, border-color .2s; display: inline-flex; gap: 4px; align-items: center; }
.act span { display: none; }
.act:hover { border-color: var(--primary-2); background: var(--primary-soft); }
.act:active { transform: scale(.94); }
.act.wa:hover, .btn.wa:hover { border-color: #1fa855; background: #e3f7ea; color: #137a3c; }
.act.del:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
@media (min-width: 1100px) { .act span { display: inline; } }

/* compact A4 sheet — used for single-record Print and PDF (always light) */
#print-area { display: none; }
.pdf-holder { position: fixed; left: -10000px; top: 0; }
.doc { width: 794px; box-sizing: border-box; padding: 40px 44px 30px; background: #fff; color: #111;
  font-family: "Inter", "Noto Sans Tamil", sans-serif; font-size: 13.5px; line-height: 1.4; }
.doc * { animation: none !important; }
.doc-head { display: flex; align-items: center; justify-content: center; gap: 12px; border-bottom: 2.5px solid #0b5a42; padding-bottom: 12px; margin-bottom: 16px; }
.doc-logo { width: 38px; height: 38px; border-radius: 9px; background: #0b5a42; color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 700; flex: none; }
.doc-title { flex: 1; text-align: center; font-family: "Noto Sans Tamil", sans-serif; font-size: 22px; font-weight: 800; color: #0b5a42; line-height: 1.4; }
.doc-title span { display: table; margin: 6px auto 0; font-size: 15px; font-weight: 700; color: #fff; background: #0b5a42; padding: 3px 18px; border-radius: 999px; }
.doc-reg { text-align: right; font-size: 11px; color: #555; }
.doc-reg b { display: block; font-size: 20px; color: #0b5a42; }
.doc-body { display: grid; grid-template-columns: 1fr 120px; gap: 22px; align-items: start; }
.doc-kv { border-collapse: collapse; width: 100%; }
.doc-kv tr { border-bottom: 1px dotted #c8c8c8; }
.doc-kv th { text-align: left; font-weight: 600; width: 165px; padding: 5px 0; vertical-align: top; color: #222; }
.doc-kv th small { display: block; font-family: "Noto Sans Tamil", sans-serif; font-size: 10.5px; font-weight: 400; color: #666; }
.doc-kv td { padding: 5px 0; vertical-align: top; font-weight: 500; }
.doc-kv td.c { width: 14px; color: #888; }
.doc-photo { width: 120px; height: 145px; border: 1px solid #bbb; border-radius: 6px; overflow: hidden; display: grid; place-items: center; color: #999; font-size: 12px; background: #f5f5f5; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.doc-sub { margin: 18px 0 6px; font-weight: 700; color: #0b5a42; font-size: 14px; }
.doc-sub small { font-family: "Noto Sans Tamil", sans-serif; font-weight: 500; color: #555; margin-left: 6px; font-size: 12px; }
.doc-fam { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-fam th, .doc-fam td { border: 1px solid #bbb; padding: 5px 8px; text-align: left; }
.doc-fam th { background: #e8f3ee; color: #0b5a42; font-size: 12px; }
.doc-foot { margin-top: 20px; font-size: 10.5px; color: #777; text-align: right; }
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing-doc > *:not(#print-area) { display: none !important; }
  body.printing-doc #print-area { display: block; }
  body.printing-doc .doc { width: auto; padding: 0; }
}

.empty { text-align: center; padding: 50px 10px; color: var(--muted); animation: fadeUp .4s var(--ease); }
.empty-icon { font-size: 40px; margin-bottom: 8px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .records thead { display: none; }
  .records, .records tbody, .records tr, .records td { display: block; width: 100%; }
  .records tr { display: grid; grid-template-columns: 52px 1fr; gap: 0 12px; padding: 12px; border-bottom: 1px solid var(--border); }
  .records td { border: 0; padding: 1px 0; }
  .records td:first-child { grid-row: span 6; }
  .records td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  .records td.row-actions { grid-column: 2; text-align: left; padding-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
  .act { margin: 0; padding: 7px 10px; }
  .act span { display: inline; }
}

/* ---------- profile ---------- */
.profile { padding: 24px; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; border-bottom: 3px solid var(--primary); padding-bottom: 16px; margin-bottom: 8px; }
.profile-head img, .profile-head .noimg { width: 120px; height: 145px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--computed); flex: none; box-shadow: var(--shadow); }
.profile-head .noimg { display: grid; place-items: center; font-size: 34px; color: var(--muted); }
.profile-head h2 { margin: 6px 0 4px; font-size: 23px; }
.profile h3 { font-size: 15.5px; margin: 22px 0 10px; color: var(--primary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px 20px; }
.kv div span { display: block; font-size: 12px; color: var(--muted); }
.kv div b { font-weight: 600; word-break: break-word; }
.kv .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .kv { grid-template-columns: 1fr 1fr; } .profile-head { flex-direction: column; } }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.mini th, .mini td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; }
.mini th { background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 12.5px; }
.meta-line { margin-top: 22px; font-size: 12px; color: var(--muted); }

/* ---------- toast / loading ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff;
  padding: 11px 20px; border-radius: 10px; z-index: 100; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 90vw; }
.toast.show { animation: toastIn .3s var(--ease); }
.toast.err { background: var(--danger); }
.loading { position: fixed; inset: 0; background: rgba(5,20,15,.18); display: grid; place-items: center; z-index: 90; animation: popIn .2s; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--primary-soft); border-top-color: var(--primary-2); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- phone ---------- */
@media (max-width: 700px) {
  .topbar { gap: 8px; padding: 8px 12px; }
  .brand { flex: 1; }
  .user-box { order: 2; }
  .tabs { order: 3; flex-basis: 100%; }
  .tab { flex: 1; }
  .tab .ta, .user-box #user-email { display: none; }
  .dropdown-menu { right: auto; left: 0; }
  .container { padding: 14px 12px 60px; }
  .card { padding: 16px; }
  .photo-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- print ---------- */
@media print {
  :root { --bg:#fff; --surface:#fff; --text:#000; --muted:#444; --border:#bbb; --computed:#f2f2f2; --primary:#0b5a42; --primary-soft:#e8f3ee; }
  * { animation: none !important; }
  body { font-size: 12px; }
  .no-print, .topbar, .toast, .loading, .modal { display: none !important; }
  .print-only { display: block; }
  .container { padding: 0; max-width: none; }
  .card, .table-wrap { box-shadow: none; border: 0; }
  .records tr { break-inside: avoid; }
  .records thead { display: table-header-group !important; }
  .records { display: table !important; } .records tbody { display: table-row-group !important; }
  .records tr { display: table-row !important; } .records td:not(.no-print) { display: table-cell !important; }
  .records td[data-l]::before { content: none !important; }
}

/* ---------- roles ---------- */
body:not(.is-admin) .admin-only { display: none !important; }
body:not(.is-user) .user-only { display: none !important; }

/* ---------- login / register ---------- */
.auth-tabs { display: flex; gap: 6px; background: var(--computed); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.auth-tab .ta { display: block; font-size: 11.5px; color: inherit; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 6px; line-height: 1; }
.pw-eye:hover { background: var(--computed); }

/* ---------- approval ---------- */
.badge.pending { background: #fff3d6; color: #8a5a00; }
.approve-card { border-left: 4px solid var(--accent); margin-bottom: 18px; padding-bottom: 4px; }
.status { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-weight: 500; animation: fadeUp .35s var(--ease); }
.status.ok { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-2); }
.status.wait { background: #fff6e0; color: #7a4e00; border: 1px solid #e8c36a; }
.status .ta { color: inherit; opacity: .85; }
.approve-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.approve-form > div { flex: 1 1 220px; }
.approve-form input { flex: 0 1 220px; width: auto; text-transform: uppercase; }
.toolbar select#filter-status { flex: 0 1 200px; }

/* ---------- blue background toggle ---------- */
.bg-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.bg-toggle input { width: 18px; height: 18px; accent-color: #4a8fd8; }

/* ---------- ID card — the Sabai's card design (686 x 1064 px), always light ---------- */
.idt { --k: 1; width: 686px; height: 1064px; position: relative; overflow: hidden; background: #fff; font-family: "Noto Sans Tamil", sans-serif; }
.idt * { animation: none !important; box-sizing: border-box; }
.idt-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.idt-pattern { position: absolute; left: 20px; right: 20px; top: 352px; bottom: 74px; background-repeat: repeat; background-size: 80px 80px; opacity: .9; }
.idt-wm { position: absolute; left: 143px; top: 520px; width: 400px; height: 400px; opacity: .06; }
.idt-photo { position: absolute; left: 212px; top: 362px; width: 262px; height: 314px;
  border: 5px solid #23408e; border-radius: 12px; overflow: hidden; background: #eef1f7; display: flex; align-items: center; justify-content: center; font-size: 80px; color: #9aa6c0; }
.idt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idt-info { position: absolute; left: 34px; right: 34px; top: 688px; bottom: 96px; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; text-align: center; overflow: hidden; }
.idt-titles { font-size: calc(22px * var(--k)); font-weight: 700; color: #0b6b4f; line-height: 1.3; }
.idt-name { font-size: calc(30px * var(--k)); font-weight: 800; color: #c0121c; line-height: 1.3; }
.idt-edu { font-size: calc(22px * var(--k)); font-weight: 700; color: #0b6b4f; line-height: 1.3; }
.idt-place { font-size: calc(22px * var(--k)); font-weight: 700; color: #23408e; line-height: 1.3; }
.idt-phone { font-family: "Inter", sans-serif; font-size: calc(20px * var(--k)); font-weight: 700; color: #23408e; letter-spacing: .5px; line-height: 1.3; }
.idt-id { font-family: "Inter", sans-serif; font-size: calc(26px * var(--k)); font-weight: 800; color: #fff; background: #23408e; padding: 2px 22px; border-radius: 999px; letter-spacing: 1.5px; line-height: 1.35; }
.btn.idc-btn { border-color: #23408e; color: #23408e; }
.btn.idc-btn:hover { background: #e8edf8; }
.act.idc-act:hover { border-color: #23408e; background: #e8edf8; color: #23408e; }

/* ---------- brand logo (Theni Ulamas) ---------- */
.brand-logo { width: 44px; height: 44px; border-radius: 50%; flex: none; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.brand-logo-big { width: 120px; height: 120px; border-radius: 50%; display: block; margin: 0 auto 10px; box-shadow: 0 8px 22px rgba(11,90,66,.35); }
