:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --border: #e3e9e7;
  --text: #17211f;
  --muted: #5d6b68;
  --primary: #0f766e;
  --primary-ink: #ffffff;
  --primary-soft: #e6f4f2;
  --accent: #d97706;
  --good: #15803d;
  --good-soft: #e8f6ec;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --warn-soft: #fff6e5;
  --shadow: 0 1px 2px rgba(16, 24, 22, .05), 0 4px 16px rgba(16, 24, 22, .04);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513;
    --surface: #151e1c;
    --surface-2: #1a2522;
    --border: #26332f;
    --text: #e6eeec;
    --muted: #9aaba7;
    --primary: #2dd4bf;
    --primary-ink: #04201c;
    --primary-soft: #133430;
    --accent: #fbbf24;
    --good: #4ade80;
    --good-soft: #12301e;
    --bad: #f87171;
    --bad-soft: #3a1717;
    --warn-soft: #33270e;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Hind Siliguri", "Noto Sans Bengali", "Kohinoor Bangla", "Bangla Sangam MN", "Nirmala UI", "Vrinda", "Shonar Bangla", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- লেআউট */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand img { width: 38px; height: 38px; }
.brand strong { font-size: 1.1rem; display: block; line-height: 1.2; }
.brand span { font-size: .8rem; color: var(--muted); }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav .ico { width: 22px; text-align: center; }
.sidebar .who { margin-top: auto; border-top: 1px solid var(--border); padding: 14px 10px 0; font-size: .9rem; }
.sidebar .who button { margin-top: 8px; }
main { padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1200px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar {
    display: block; position: sticky; top: 0; z-index: 10;
    background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .topbar .row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 4px; }
  .topbar .brand { padding: 0; }
  .topbar .nav { display: flex; overflow-x: auto; gap: 4px; padding: 4px 12px 10px; scrollbar-width: none; }
  .topbar .nav a { white-space: nowrap; padding: 6px 12px; font-size: .92rem; }
  main { padding: 20px 16px 60px; }
  h1 { font-size: 1.35rem; }
}

/* ---------- কার্ড ও পরিসংখ্যান */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); min-width: 0;
}
.card > h2 { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat .label { color: var(--muted); font-size: .9rem; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
.stat .hint { font-size: .82rem; color: var(--muted); }
.stat.hero { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.stat.hero .label, .stat.hero .hint { color: inherit; opacity: .85; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }

.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: var(--primary); border-radius: 99px; }

.bars { display: flex; align-items: end; gap: 6px; height: 170px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; height: 100%; min-width: 0; }
.bars .fill { width: 100%; max-width: 34px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar.current .fill { background: var(--accent); }
.bars .lbl { font-size: .7rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }

.hlist { list-style: none; margin: 0; padding: 0; }
.hlist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.hlist li:last-child { border-bottom: 0; }
.hlist .track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hlist .track > div { height: 100%; background: var(--bad); }
.hlist .track.income > div { background: var(--good); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
a.chip:hover { text-decoration: none; border-color: var(--primary); }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--accent); }
.badge.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.admin { background: var(--primary-soft); color: var(--primary); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 9px; flex: none; }
.feed .meta { font-size: .8rem; color: var(--muted); }

/* ---------- টেবিল */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-weight: 700; color: var(--text); font-size: .85rem; white-space: nowrap; background: var(--surface-2);
  text-align: center; letter-spacing: .01em; border-bottom: 2px solid var(--border); }
tbody tr:hover { background: var(--surface-2); }
td.r { text-align: right; }
th.r { text-align: center; }
tfoot td { font-weight: 700; border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.matrix th, .matrix td { padding: 7px 8px; text-align: center; font-size: .85rem; }
.matrix th:first-child, .matrix td:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.matrix td.paid { color: var(--good); font-weight: 600; }
.matrix td.partial { color: var(--accent); font-weight: 600; }
.matrix td.due { background: var(--bad-soft); color: var(--bad); }
.matrix td.na { color: var(--border); }

/* ---------- ফর্ম ও বাটন */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 5px; }
label.field > small { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: end; }
.filters label.field { margin: 0; min-width: 170px; }
.form-error { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: 10px; margin: 0 0 12px; }
.notice { background: var(--warn-soft); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.tabs button, .tabs a { border: 0; background: transparent; font: inherit; padding: 5px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tabs button.on, .tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- লগইন */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1000px 500px at 10% -10%, var(--primary-soft), transparent), var(--bg); }
.auth .card { width: 100%; max-width: 420px; padding: 28px; }
.auth .brand { justify-content: center; flex-direction: column; text-align: center; padding-bottom: 20px; }
.auth .brand img { width: 56px; height: 56px; }
.auth .brand strong { font-size: 1.5rem; }
.auth .btn.primary { width: 100%; padding: 11px; }

/* ---------- মোডাল ও টোস্ট */
dialog { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 20, 18, .45); }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px 4px; overflow-y: auto; }
.modal-inner .form-error { margin: 0 20px 10px; }
.modal-foot { display: flex; justify-content: end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: pop .2s ease-out; }
#toast div.err { background: var(--bad); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* ================================================================ নতুন অংশ */
:root { --info: #1d4ed8; --info-soft: #e8efff; }
@media (prefers-color-scheme: dark) { :root { --info: #93b4ff; --info-soft: #18233d; } }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.dim { opacity: .55; }
.nowrap { white-space: nowrap; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.badge.info { background: var(--info-soft); color: var(--info); }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

.sidebar { overflow-y: auto; }
.nav-sec { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); padding: 14px 12px 4px; text-transform: uppercase; }
.nav a { position: relative; padding: 7px 12px; }
.nav-badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; line-height: 1.6; }

.notice-bar { display: block; padding: 10px 16px; border-radius: 12px; margin-bottom: 12px; background: var(--warn-soft); color: var(--text); border: 1px solid var(--border); font-weight: 500; }
.notice-bar.info { background: var(--info-soft); }
.notice-bar:hover { text-decoration: none; border-color: var(--primary); }
.notice { background: var(--warn-soft); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.kv > div span { display: block; color: var(--muted); font-size: .82rem; }
.kv > div strong { font-size: 1.15rem; }
.kv.small > div strong { font-size: 1rem; }
.kv-table td { padding: 7px 4px; }
.kv-table tr.sep-row td { border-top: 2px solid var(--border); }
.hlist.plain li { grid-template-columns: 1fr auto; align-items: center; }
.hlist li.total { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 700; }
.scroll-y { max-height: 420px; overflow-y: auto; }
.stat .value.neg { color: var(--bad); }
.stat .icon-btn { font-size: .85rem; padding: 0 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.link-card { color: var(--text); display: block; }
.link-card:hover { text-decoration: none; border-color: var(--primary); }
.link-card h2 { margin-bottom: 4px; }

.committee { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px; }
.person { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: var(--text); }
.person:hover { text-decoration: none; border-color: var(--primary); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; }

.notice-body { white-space: pre-wrap; }
.card.notice { background: var(--surface); margin: 0; }
.card.notice.pinned { border-color: var(--accent); }

.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.row3 .span2 { grid-column: span 2; }
@media (max-width: 620px) { .row3 { grid-template-columns: 1fr; } .row3 .span2 { grid-column: auto; } }
.form-sec { font-size: .95rem; color: var(--primary); margin: 6px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; cursor: pointer; }
label.check input { width: 18px; }
[hidden] { display: none !important; }
dialog.wide { width: min(820px, calc(100vw - 24px)); }
textarea { resize: vertical; }

.checklist-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.checklist-head label { display: flex; gap: 8px; align-items: center; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-2); }
.checklist label { display: flex; gap: 8px; align-items: center; font-size: .9rem; cursor: pointer; }
.checklist input, .checklist-head input { width: 17px; height: 17px; flex: none; }

/* ---------- প্রিন্টযোগ্য ডকুমেন্ট (রসিদ, পাসবই, রিপোর্ট) */
.print-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.doc { background: #fff; color: #111; border: 1px solid var(--border); border-radius: 12px; padding: 28px 32px; max-width: 860px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.doc.wide { max-width: none; }
.doc h2 { font-size: 1.05rem; margin: 20px 0 8px; color: #0f766e; }
.doc-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; border-bottom: 3px double #0f766e; padding-bottom: 12px; margin-bottom: 16px; }
.doc-head img { width: 54px; height: 54px; }
.doc-head h1 { font-size: 1.5rem; color: #0f766e; }
.doc-head p { margin: 2px 0 0; font-size: .82rem; color: #444; }
.doc-title { text-align: right; }
.doc-title strong { display: block; font-size: 1.1rem; border: 1.5px solid #0f766e; color: #0f766e; padding: 3px 12px; border-radius: 8px; }
.doc-title span { font-size: .78rem; color: #555; }
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; font-size: .9rem; }
.doc-grid span, .doc-summary span { display: block; font-size: .75rem; color: #666; }
.doc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.doc-summary > div { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; }
.doc-summary > div.hl { background: #e6f4f2; border-color: #0f766e; }
.doc-summary strong { font-size: 1.05rem; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .86rem; color: #111; }
.doc-table th, .doc-table td { border: 1px solid #cfd8d6; padding: 6px 8px; background: #fff; color: #111; }
.doc-table th { background: #eef5f4; color: #0f4d48; font-weight: 600; }
.doc-table tfoot td { background: #eef5f4; font-weight: 700; }
.doc-table td.neg { color: #b91c1c; }
.doc-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.doc .table-wrap { margin: 0; padding: 0; }
.doc a { color: #0f766e; }
.matrix.doc-table td.paid { color: #15803d; font-weight: 600; }
.matrix.doc-table td.partial { color: #b45309; font-weight: 600; }
.matrix.doc-table td.due { background: #fdecec; color: #b91c1c; }
.matrix.doc-table td.na { color: #bbb; }
.matrix.doc-table th:first-child, .matrix.doc-table td:first-child { background: #fff; }
.fin { margin: 0; }
.doc-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; }
.doc-sign div { flex: 1; text-align: center; border-top: 1px dashed #777; padding-top: 6px; font-size: .82rem; color: #444; }
.doc-note { font-size: .72rem; color: #777; text-align: center; margin: 18px 0 0; }
.receipt { max-width: 720px; }
.receipt-top { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 10px; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table td { border-bottom: 1px dotted #aaa; padding: 9px 4px; color: #111; }
.receipt-table td:first-child { width: 34%; color: #555; }
.receipt-table .big { font-size: 1.4rem; }
.receipt .doc-sign { margin-top: 44px; }
.no-screen { display: none; }
@media (max-width: 620px) {
  .doc { padding: 18px 14px; }
  .doc-head { grid-template-columns: auto 1fr; }
  .doc-title { grid-column: 1 / -1; text-align: left; }
  .doc-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .no-print, #toast, dialog { display: none !important; }
  .shell { display: block; }
  main { padding: 0 !important; max-width: none; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; margin: 0 0 10mm; }
  .no-screen { display: block; text-align: center; color: #999; margin: 8mm 0; }
  .table-wrap { overflow: visible !important; }
  .doc-table { font-size: 9.5pt; }
  .matrix.doc-table th, .matrix.doc-table td { padding: 3px 4px; font-size: 8.5pt; }
  .doc-table tr { break-inside: avoid; }
}

/* ---------- ছবি ও প্রোফাইল */
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; flex: none; object-fit: cover; border: 1px solid var(--border); }
.avatar.sm { width: 34px; height: 34px; font-size: .85rem; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.8rem; border-width: 2px; border-color: var(--primary); }
.name-cell { display: flex; gap: 10px; align-items: center; }
.member-head { display: flex; gap: 16px; align-items: center; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 720px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-grid .kv-table td:first-child { width: 38%; }
.meter { margin-bottom: 8px; max-width: 360px; }
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.photo-slot { border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; background: var(--surface-2); }
.photo-slot img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; display: block; background: #fff; }
.photo-slot.nid_image img { object-fit: contain; }
.photo-empty { height: 150px; display: grid; place-content: center; gap: 4px; color: var(--muted); font-size: 2.2rem; border: 2px dashed var(--border); border-radius: 8px; }
.photo-empty span { font-size: .8rem; }
.photo-label { font-size: .85rem; font-weight: 600; margin: 8px 0 6px; }
.photo-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.photo-actions label.btn { cursor: pointer; }
label.busy { opacity: .5; pointer-events: none; }
.doc-grid.with-photo { grid-template-columns: 96px repeat(3, 1fr); }
.doc-photo { grid-row: span 2; width: 96px; height: 116px; object-fit: cover; border: 1px solid #ccc; border-radius: 6px; }
@media (max-width: 620px) { .doc-grid.with-photo { grid-template-columns: 80px 1fr 1fr; } .doc-photo { width: 80px; height: 96px; } }
.photo-row.compact { margin-top: 0; margin-bottom: 8px; grid-template-columns: repeat(3, 1fr); }
.photo-row.compact .photo-slot img, .photo-row.compact .photo-empty { height: 110px; }
@media (max-width: 520px) { .photo-row.compact { grid-template-columns: 1fr 1fr; } }

/* ---------- লগইন করা সদস্য ও লগআউট */
.userbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 14px clamp(16px, 3vw, 40px) 0; max-width: 1200px; }
.userchip { display: flex; align-items: center; gap: 10px; color: var(--text); }
.userchip:hover { text-decoration: none; }
.userchip span { display: flex; flex-direction: column; line-height: 1.25; text-align: right; }
.userchip small { color: var(--muted); font-size: .78rem; }
.topbar .userchip { gap: 8px; }
@media (max-width: 860px) { .userbar { display: none; } }
.sidebar .who { display: none; }

/* ---------- নিবন্ধন */
.auth .card.wide { max-width: 640px; }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; display: grid; gap: 8px; }
.auth-alt span { color: var(--muted); font-size: .9rem; }
.auth-alt .btn { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.success-box { font-size: 3rem; text-align: center; }
.reg-card .kv-table td:first-child { width: 32%; }
[data-logout] { white-space: nowrap; }
.topbar .row { gap: 10px; }
.topbar .brand strong { line-height: 1.2; }
.feed .dot.private { background: var(--muted); }

/* ---------- জমার তালিকা প্রিন্ট */
.print-only { display: none; }
.print-btn { text-decoration: none; font-size: .95rem; padding: 2px 6px; }
.print-btn:hover { text-decoration: none; }
@media print {
  .print-only { display: block !important; }
  main:has(.print-only) > .card, main:has(.print-only) > .page-head { display: none !important; }
}

/* =====================================================================
   রঙিন আধুনিক থিম — হেডার, ফুটার, কার্ড, বোতাম, টেবিল, এনিমেশন
   ===================================================================== */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --border: #e4e8f1;
  --text: #182033;
  --muted: #5f6b80;
  --primary: #0f766e;
  --primary-2: #047857;
  --primary-ink: #ffffff;
  --primary-soft: #e3f6f3;
  --accent: #d97706;
  --c-teal: #0f766e;    --c-teal-soft: #e0f5f2;
  --c-emerald: #047857; --c-emerald-soft: #e2f6ec;
  --c-blue: #1d4ed8;    --c-blue-soft: #e6edfe;
  --c-violet: #6d28d9;  --c-violet-soft: #efe8fe;
  --c-rose: #be123c;    --c-rose-soft: #fde8ee;
  --c-amber: #b45309;   --c-amber-soft: #fdf1df;
  --c-slate: #334155;   --c-slate-soft: #eef1f6;
  --grad-hero: linear-gradient(135deg, #0f766e 0%, #059669 45%, #0ea5a4 75%, #2563eb 130%);
  --grad-primary: linear-gradient(135deg, #0d9488, #059669);
  --grad-gold: linear-gradient(135deg, #f59e0b, #f97316);
  --shadow: 0 1px 2px rgba(24, 32, 51, .04), 0 6px 20px rgba(24, 32, 51, .06);
  --shadow-lg: 0 10px 30px rgba(24, 32, 51, .12);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #16213a;
    --border: #23304d;
    --text: #e7ecf6;
    --muted: #9aa6bd;
    --primary: #2dd4bf;
    --primary-2: #34d399;
    --primary-ink: #04201c;
    --primary-soft: #11302f;
    --c-teal: #2dd4bf;    --c-teal-soft: #0f2f30;
    --c-emerald: #34d399; --c-emerald-soft: #0f2d22;
    --c-blue: #60a5fa;    --c-blue-soft: #14254a;
    --c-violet: #a78bfa;  --c-violet-soft: #241a45;
    --c-rose: #fb7185;    --c-rose-soft: #3a1626;
    --c-amber: #fbbf24;   --c-amber-soft: #33270e;
    --c-slate: #94a3b8;   --c-slate-soft: #1c2740;
    --grad-hero: linear-gradient(135deg, #0f3d3a 0%, #065f46 45%, #0e5f6b 75%, #1e3a8a 130%);
    --grad-primary: linear-gradient(135deg, #14b8a6, #10b981);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 34px rgba(0, 0, 0, .45);
  }
}

body {
  background:
    radial-gradient(900px 420px at 100% -10%, var(--c-blue-soft), transparent 60%),
    radial-gradient(800px 380px at -10% 0%, var(--c-teal-soft), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: .1px;
}
::selection { background: var(--c-teal-soft); color: var(--text); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ---------- লেখা */
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.2px; }
h2 { font-weight: 700; }
.page-head h1 { position: relative; padding-bottom: 8px; }
.page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 99px;
  background: var(--grad-primary);
}
.card > h2, .card-head h2 { display: flex; align-items: center; gap: 8px; }
.card > h2::before, .card-head h2::before {
  content: ""; width: 4px; height: 1.05em; border-radius: 99px; background: var(--grad-primary); flex: none;
}

/* ---------- সাইডবার */
.sidebar {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-right: 1px solid var(--border);
}
.sidebar .brand {
  margin: -6px -2px 10px; padding: 14px 12px; border-radius: 14px;
  background: var(--grad-hero); color: #fff; box-shadow: var(--shadow);
}
.sidebar .brand span { color: rgba(255, 255, 255, .82); }
.sidebar .brand img { background: rgba(255, 255, 255, .15); border-radius: 10px; padding: 3px; }
.nav-sec { color: var(--muted); opacity: .85; }
.nav a { gap: 10px; border-radius: 12px; transition: background .2s, transform .2s, color .2s; }
.nav a .ico {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: .95rem;
  background: color-mix(in srgb, var(--ic) 14%, transparent); transition: transform .25s, background .25s;
}
.nav a:hover { background: color-mix(in srgb, var(--ic) 9%, transparent); transform: translateX(3px); }
.nav a:hover .ico { transform: scale(1.12) rotate(-6deg); }
.nav a.active { background: color-mix(in srgb, var(--ic) 14%, transparent); color: var(--text); font-weight: 700; }
.nav a.active .ico { background: var(--ic); box-shadow: 0 4px 12px color-mix(in srgb, var(--ic) 45%, transparent); }
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ic);
}

/* ---------- মোবাইলের উপরের বার */
.topbar {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.topbar .brand img { border-radius: 8px; }
.topbar .nav a.active { background: var(--grad-primary); color: #fff; }
.topbar .nav a.active .ico { background: rgba(255, 255, 255, .2); box-shadow: none; }
.topbar .nav a .ico { width: 24px; height: 24px; font-size: .8rem; }
.topbar .nav a.active::before { display: none; }

/* ---------- হেডার (লগইন করা সদস্য ও তারিখ) */
.userbar {
  position: sticky; top: 0; z-index: 9; justify-content: space-between; max-width: none;
  padding: 12px clamp(16px, 3vw, 40px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.userbar-right { display: flex; align-items: center; gap: 12px; }
.today-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: .88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--muted);
}
.userchip { padding: 4px 6px 4px 4px; border-radius: 99px; transition: background .2s; }
.userchip:hover { background: var(--surface); }
.userchip .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c-teal); }
.logout-btn { border-color: color-mix(in srgb, var(--c-rose) 35%, var(--border)); color: var(--c-rose); }
.logout-btn:hover { background: var(--c-rose); color: #fff; border-color: var(--c-rose); }

/* ---------- ফুটার */
.site-footer {
  margin: 10px clamp(16px, 3vw, 40px) 24px; max-width: 1200px; padding: 22px 24px; border-radius: 20px;
  background: var(--grad-hero); color: #fff; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; align-items: center; box-shadow: var(--shadow-lg);
}
.site-footer::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.f-brand { display: flex; gap: 12px; align-items: center; }
.f-brand img { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .15); padding: 3px; }
.f-brand strong { display: block; font-size: 1.05rem; }
.f-brand span, .f-meta { font-size: .84rem; color: rgba(255, 255, 255, .8); }
.f-motto { font-weight: 600; text-align: center; }
.f-meta { text-align: right; }
@media (max-width: 860px) { .site-footer { grid-template-columns: 1fr; text-align: center; margin: 10px 16px 20px; } .f-brand { justify-content: center; } .f-meta { text-align: center; } }

/* ---------- ড্যাশবোর্ডের ব্যানার */
.hero-banner {
  position: relative; overflow: hidden; border-radius: 22px; padding: 28px 30px; margin-bottom: 20px;
  background: var(--grad-hero); color: #fff; box-shadow: var(--shadow-lg);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background-size: 160% 160%; animation: heroShift 14s ease-in-out infinite alternate;
}
.hero-banner h1 { font-size: 1.9rem; color: #fff; }
.hero-banner p { margin: 6px 0 0; color: rgba(255, 255, 255, .88); max-width: 560px; }
.hero-banner .eyebrow { margin: 0 0 6px; font-size: .82rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.hero-text, .hero-side { position: relative; z-index: 1; }
.hero-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.hero-mini { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 8px 14px; text-align: right; backdrop-filter: blur(6px); }
.hero-mini span { display: block; font-size: .78rem; opacity: .85; }
.hero-mini strong { font-size: 1.2rem; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 1s 2; }
.btn.light { background: #fff; color: #0f766e; border-color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.btn.light:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
@media (max-width: 620px) { .hero-banner { padding: 22px 20px; } .hero-banner h1 { font-size: 1.45rem; } .hero-side { align-items: stretch; width: 100%; } .hero-mini { text-align: left; } }

/* ভাসমান গোল আকৃতি (ব্যানার ও লগইন পেজে) */
.blob { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.hero-banner .blob.b1 { width: 220px; height: 220px; right: -40px; top: -80px; background: rgba(255, 255, 255, .12); animation: float 9s ease-in-out infinite; }
.hero-banner .blob.b2 { width: 140px; height: 140px; right: 180px; bottom: -70px; background: rgba(251, 191, 36, .25); animation: float 11s ease-in-out infinite reverse; }

/* ---------- পরিসংখ্যান কার্ড (প্রতিটি আলাদা রঙের) */
.stats { gap: 16px; }
.stat { position: relative; overflow: hidden; --sc: var(--c-teal); --ss: var(--c-teal-soft); border-top: 3px solid var(--sc); }
.stat.c-emerald { --sc: var(--c-emerald); --ss: var(--c-emerald-soft); }
.stat.c-violet { --sc: var(--c-violet); --ss: var(--c-violet-soft); }
.stat.c-rose { --sc: var(--c-rose); --ss: var(--c-rose-soft); }
.stat.c-blue { --sc: var(--c-blue); --ss: var(--c-blue-soft); }
.stat.c-amber { --sc: var(--c-amber); --ss: var(--c-amber-soft); }
.stat::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: var(--ss); opacity: .9; transition: transform .4s;
}
.stat > * { position: relative; z-index: 1; }
.stat .value { color: var(--sc); font-size: 1.65rem; font-weight: 800; }
.stat .label { font-weight: 600; }
.stat-ico {
  float: right; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--ss); margin: -2px -4px 0 8px; transition: transform .3s;
}
.stat:hover .stat-ico { transform: rotate(-8deg) scale(1.1); }
.stat:hover::after { transform: scale(1.15); }
.stat.hero { background: var(--grad-primary); border-top-color: transparent; color: #fff; }
.stat.hero .value { color: #fff; }
.stat.hero .stat-ico { background: rgba(255, 255, 255, .2); }
.stat.hero::after { background: rgba(255, 255, 255, .12); }

/* ---------- কার্ড */
.card { border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card:hover { box-shadow: var(--shadow-lg); }
.link-card:hover, .person:hover, .stat:hover { transform: translateY(-4px); }
.committee .person { border-left: 4px solid var(--c-violet); }
.notice-bar { border-left: 4px solid var(--c-amber); transition: transform .2s; }
.notice-bar.info { border-left-color: var(--c-blue); }
.notice-bar:hover { transform: translateX(4px); }
.card.notice.pinned { border-left: 4px solid var(--c-amber); }

/* ---------- বোতাম */
.btn { border-radius: 12px; transition: transform .15s ease, box-shadow .2s, background .2s, border-color .2s, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--grad-primary); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 38%, transparent); }
.btn.danger { border-color: color-mix(in srgb, var(--c-rose) 40%, var(--border)); }
.btn.danger:hover { background: var(--c-rose); color: #fff; }
.icon-btn { transition: background .2s, transform .2s; }
.icon-btn:hover { transform: scale(1.12); }

/* ---------- ব্যাজ ও চিপ */
.badge { border-radius: 99px; padding: 2px 10px; letter-spacing: .1px; }
.badge.good { background: var(--c-emerald-soft); color: var(--c-emerald); }
.badge.bad { background: var(--c-rose-soft); color: var(--c-rose); }
.badge.warn { background: var(--c-amber-soft); color: var(--c-amber); }
.badge.info { background: var(--c-blue-soft); color: var(--c-blue); }
.badge.admin { background: var(--c-violet-soft); color: var(--c-violet); }
.chip { transition: transform .15s, border-color .2s; }
a.chip:hover { transform: translateY(-2px); }

/* ---------- টেবিল */
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap th { background: var(--surface-2); text-transform: none; position: sticky; top: 0; z-index: 1; }
.table-wrap th:first-child { border-top-left-radius: 10px; }
.table-wrap th:last-child { border-top-right-radius: 10px; }
.table-wrap tbody tr { transition: background .15s; }
.table-wrap tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table-wrap tbody tr:hover { background: var(--c-teal-soft); }

/* ---------- ফর্ম */
input, select, textarea { border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--c-teal-soft); }
.form-sec { color: var(--c-violet); }
.tabs { border-radius: 12px; }
.tabs button, .tabs a { border-radius: 9px; transition: background .2s, color .2s; }
.tabs button.on, .tabs a.on { background: var(--grad-primary); color: #fff; }

/* ---------- প্রগ্রেস বার ও চার্ট */
.progress { height: 12px; }
.progress > div { background: linear-gradient(90deg, #14b8a6, #22c55e, #f59e0b); background-size: 200% 100%; animation: growX 1.1s cubic-bezier(.2,.8,.2,1) both, shimmer 3s linear infinite; transform-origin: left; }
.bars .fill { background: linear-gradient(180deg, #2dd4bf, #0d9488); border-radius: 8px 8px 3px 3px; transform-origin: bottom; animation: growY .9s cubic-bezier(.2,.8,.2,1) both; }
.bars .bar:nth-child(odd) .fill { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.bars .bar.current .fill { background: var(--grad-gold); }
.bars .bar:nth-child(1) .fill { animation-delay: .05s; } .bars .bar:nth-child(2) .fill { animation-delay: .1s; }
.bars .bar:nth-child(3) .fill { animation-delay: .15s; } .bars .bar:nth-child(4) .fill { animation-delay: .2s; }
.bars .bar:nth-child(5) .fill { animation-delay: .25s; } .bars .bar:nth-child(6) .fill { animation-delay: .3s; }
.bars .bar:nth-child(7) .fill { animation-delay: .35s; } .bars .bar:nth-child(8) .fill { animation-delay: .4s; }
.bars .bar:nth-child(9) .fill { animation-delay: .45s; } .bars .bar:nth-child(10) .fill { animation-delay: .5s; }
.bars .bar:nth-child(11) .fill { animation-delay: .55s; } .bars .bar:nth-child(12) .fill { animation-delay: .6s; }
.feed .dot { background: var(--grad-primary); box-shadow: 0 0 0 4px var(--c-teal-soft); }

/* ---------- পেজ খোলার এনিমেশন (অংশগুলো একে একে ভেসে ওঠে) */
.page-enter > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.page-enter > *:nth-child(2) { animation-delay: .05s; }
.page-enter > *:nth-child(3) { animation-delay: .1s; }
.page-enter > *:nth-child(4) { animation-delay: .15s; }
.page-enter > *:nth-child(5) { animation-delay: .2s; }
.page-enter > *:nth-child(6) { animation-delay: .25s; }
.page-enter > *:nth-child(n+7) { animation-delay: .3s; }
.page-enter .stats > .stat { animation: pop .5s cubic-bezier(.2,.8,.2,1) both; }
.page-enter .stats > .stat:nth-child(2) { animation-delay: .06s; }
.page-enter .stats > .stat:nth-child(3) { animation-delay: .12s; }
.page-enter .stats > .stat:nth-child(4) { animation-delay: .18s; }
.page-enter .stats > .stat:nth-child(5) { animation-delay: .24s; }
.page-enter .stats > .stat:nth-child(6) { animation-delay: .3s; }

/* ---------- মোডাল ও টোস্ট */
dialog[open] { animation: pop .28s cubic-bezier(.2,.8,.2,1); }
dialog::backdrop { background: rgba(11, 17, 32, .5); backdrop-filter: blur(3px); }
.modal-head { background: linear-gradient(90deg, var(--c-teal-soft), var(--c-blue-soft)); border-radius: 16px 16px 0 0; }
#toast div { border-radius: 14px; padding: 12px 20px; background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-lg); animation: slideUp .35s cubic-bezier(.2,.8,.2,1); }
#toast div::before { content: "✓  "; font-weight: 800; }
#toast div.err { background: linear-gradient(135deg, #e11d48, #f97316); }
#toast div.err::before { content: "⚠  "; }

/* ---------- লগইন ও নিবন্ধন পেজ */
.auth {
  position: relative; overflow: hidden;
  background: var(--grad-hero); background-size: 180% 180%; animation: heroShift 16s ease-in-out infinite alternate;
}
.auth-wrap { position: relative; z-index: 1; width: 100%; max-width: 440px; }
.auth .card.wide ~ .auth-foot, .auth-wrap:has(.card.wide) { max-width: 660px; }
.auth .card {
  max-width: none; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 24px 60px rgba(0, 0, 0, .28); border-radius: 22px;
  animation: pop .55s cubic-bezier(.2,.8,.2,1);
}
.auth .brand img { animation: bob 3.5s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(13, 148, 136, .35)); }
.auth .brand strong {
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.6rem;
}
.auth-foot { text-align: center; color: rgba(255, 255, 255, .9); margin: 18px 0 0; font-weight: 600; }
.auth-foot small { font-weight: 400; opacity: .8; }
.auth .blob.b1 { width: 380px; height: 380px; left: -120px; top: -120px; background: rgba(255, 255, 255, .1); animation: float 12s ease-in-out infinite; }
.auth .blob.b2 { width: 260px; height: 260px; right: -80px; bottom: -60px; background: rgba(251, 191, 36, .22); animation: float 10s ease-in-out infinite reverse; }
.auth .blob.b3 { width: 160px; height: 160px; right: 18%; top: 12%; background: rgba(96, 165, 250, .25); animation: float 14s ease-in-out infinite; }

/* ---------- কী-ফ্রেম */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -22px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
@keyframes heroShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* যারা এনিমেশন বন্ধ রেখেছেন (ফোনের সেটিংসে) তাদের জন্য সব স্থির */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* প্রিন্টে রং ও এনিমেশন বাদ */
@media print {
  *, *::before, *::after { animation: none !important; }
  .site-footer, .userbar, .hero-banner .blob { display: none !important; }
  body { background: #fff !important; }
}
/* ছয়টি পরিসংখ্যান কার্ড বড় পর্দায় ৩+৩ সারিতে */
@media (min-width: 1000px) { .stats:has(> .stat:nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); } }
.btn { white-space: nowrap; }

/* ---------- রসিদ অনুমোদন/বাতিলের নোটিশ */
.notice-bar.success, .notice-bar.danger { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; animation: rise .5s both, glow 2.4s ease-in-out .6s 2; }
.notice-bar.success { background: var(--c-emerald-soft); border-left-color: var(--c-emerald); }
.notice-bar.danger { background: var(--c-rose-soft); border-left-color: var(--c-rose); }
.notice-bar .nb-ico { font-size: 1.2rem; }
.notice-bar .nb-text { flex: 1; min-width: 200px; }
.notice-bar.leaving { opacity: 0; transform: translateX(30px); transition: opacity .3s, transform .3s; }
.notice-bar:hover { transform: none; }
.badge.new { background: var(--c-amber); color: #fff; animation: pop .4s both; }
tr.is-new { background: var(--c-amber-soft) !important; }
@keyframes glow { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-emerald) 25%, transparent); } }

/* ---------- ভাষা বদলের বোতাম */
.auth .card { position: relative; }

/* ভাষা বদলের বোতাম */
.lang-btn { font-weight: 700; border-color: color-mix(in srgb, var(--c-blue) 35%, var(--border)); color: var(--c-blue); }
.lang-btn:hover { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.topbar .userchip .lang-btn { padding: 4px 8px; }
.topbar .row { flex-wrap: nowrap; min-width: 0; }
.topbar .brand { min-width: 0; }
.topbar .userchip { flex: 0 0 auto; }
/* খুব সরু ফোনে (৩৬০px-এর নিচে) বোতামে শুধু 🌐 চিহ্নটা থাকে */
@media (max-width: 360px) {
  .topbar .userchip .lang-btn .lang-label { display: none; }
  .topbar .userchip .lang-btn { padding: 4px 7px; }
  .topbar .userchip [data-logout] { padding: 4px 8px; }
}

/* কার্ডের শিরোনামের পাশে একাধিক বোতাম */
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ================= প্রশাসনিক এলাকা (/admin) ================= */
/* সদস্যদের সাইট থেকে আলাদা বোঝা যায় এমন রং — নীলচে ধূসর */
.admin-mode .sidebar { background: linear-gradient(180deg, #1e293b, #0f172a); }
.admin-mode .sidebar .brand strong,
.admin-mode .sidebar .brand span,
.admin-mode .sidebar .who,
.admin-mode .sidebar .who strong { color: #e2e8f0; }
.admin-mode .sidebar .nav a { color: #cbd5e1; }
.admin-mode .sidebar .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-mode .sidebar .nav a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.admin-mode .sidebar .nav-sec { color: #94a3b8; }
.admin-mode .topbar { background: #1e293b; }
.admin-mode .topbar .brand strong { color: #e2e8f0; }
.admin-mode .topbar .nav a { color: #cbd5e1; }
.admin-mode .topbar .nav a.active { background: rgba(255, 255, 255, .16); color: #fff; }

.area-link { font-weight: 700; white-space: nowrap; }

.admin-hero {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1e293b, #334155); color: #fff;
  border-radius: var(--r-lg, 18px); padding: 22px 24px; margin-bottom: 18px;
}
.admin-hero h1 { margin: 2px 0 6px; font-size: 1.6rem; color: #fff; }
.admin-hero p { margin: 0; color: #cbd5e1; }
.admin-hero .eyebrow { text-transform: none; letter-spacing: .02em; font-size: .82rem; color: #94a3b8; }
.admin-hero-side { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-hero-side .hero-mini {
  background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 14px; min-width: 120px;
}
.admin-hero-side .hero-mini span { display: block; font-size: .76rem; color: #cbd5e1; }
.admin-hero-side .hero-mini strong { font-size: 1.05rem; color: #fff; }

/* দ্রুত কাজের বোতামগুলো */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 10px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; font-family: inherit;
}
.quick-btn span { font-size: 1.5rem; line-height: 1; }
.quick-btn:hover { transform: translateY(-2px); border-color: var(--c-teal); box-shadow: 0 6px 16px rgba(0, 0, 0, .08); text-decoration: none; }

/* ব্যবস্থাপনার তালিকা */
.admin-tiles { display: flex; flex-direction: column; gap: 8px; }
.admin-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  transition: border-color .15s, background .15s;
}
.admin-tile:hover { border-color: var(--c-teal); background: var(--bg); text-decoration: none; }
.admin-tile .t-ico { font-size: 1.3rem; }
.admin-tile .t-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.admin-tile .t-text small { color: var(--muted); font-size: .78rem; }

@media (max-width: 700px) {
  .admin-hero { padding: 18px; }
  .admin-hero h1 { font-size: 1.3rem; }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* একজন / একাধিক সদস্য বেছে নেওয়ার সুইচ */
.pick-toggle {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer;
  padding: 8px 12px; border: 1px dashed var(--border); border-radius: 10px; font-size: .9rem; font-weight: 600;
}
.pick-toggle:hover { border-color: var(--c-teal); }
.pick-toggle input { width: 16px; height: 16px; }

/* সময়ের দ্রুত বাছাই */
.quick-range { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-btn {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 99px;
  background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 600;
}
.chip-btn:hover { border-color: var(--c-teal); text-decoration: none; }
.chip-btn.on { background: var(--grad-primary, var(--c-teal)); color: #fff; border-color: transparent; }
.tabs a { display: inline-block; text-decoration: none; }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* মাস ধরে ভাগ করা তালিকা */
.month-row td {
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  padding: 8px 10px; position: sticky; top: 34px; z-index: 1;
}
.month-row .m-name { font-weight: 700; color: var(--text); }
.month-row .m-meta { color: var(--muted); font-size: .82rem; margin-right: 10px; }
.list-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sort-pick { display: inline-flex; align-items: center; gap: 6px; }
.sort-pick select {
  font: inherit; font-size: .85rem; padding: 4px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.tabs.sm button { padding: 4px 11px; font-size: .85rem; }
@media (max-width: 700px) {
  .card-head { flex-wrap: wrap; gap: 8px; }
  .month-row td { position: static; }
}

/* রিপোর্ট/রসিদের কাগজ-নকশার টেবিল: অ্যাপের থিমের রং যেন হেডারে না বসে
   (.table-wrap th পরে আসায় আগে গাঢ় পটভূমিতে গাঢ় লেখা পড়া যেত না) */
.doc .table-wrap th,
.table-wrap .doc-table th,
.doc-table th { background: #eef5f4; color: #0f4d48; position: static; }
.doc .table-wrap td,
.table-wrap .doc-table td { background: #fff; color: #111; }
.table-wrap .matrix.doc-table th:first-child,
.table-wrap .matrix.doc-table td:first-child { background: #fff; }
.table-wrap .matrix.doc-table td.due { background: #fdecec; color: #b91c1c; }
.doc-table tfoot td { background: #eef5f4 !important; color: #111; }
