/* SmartAbashon web: design tokens from the handoff README. No inline styles anywhere (content security policy). */
/* Hind Siliguri is served from this site (public/assets/fonts, SIL Open Font License), so Bangla text never depends on an outside server. */
@font-face { font-family: "Hind Siliguri"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/HindSiliguri-Light.woff") format("woff"); }
@font-face { font-family: "Hind Siliguri"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/HindSiliguri-Regular.woff") format("woff"); }
@font-face { font-family: "Hind Siliguri"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/HindSiliguri-Medium.woff") format("woff"); }
@font-face { font-family: "Hind Siliguri"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/HindSiliguri-SemiBold.woff") format("woff"); }
@font-face { font-family: "Hind Siliguri"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/HindSiliguri-Bold.woff") format("woff"); }

:root {
  --ink: #0B1B33; --ink-2: #43536B; --ink-muted: #6B7B93;
  --border-strong: #C3CCDA; --border: #DFE5EE; --border-light: #E6EBF3; --divider: #F1F4F9;
  --surface-subtle: #F7F9FC; --surface: #EEF1F6; --white: #FFFFFF;
  --primary: #0F62D6; --primary-dark: #0A4CA8; --primary-bg: #EAF2FE; --primary-border: #B8D3F5;
  --success: #12844A; --success-bg: #E6F5EC;
  --warning: #C25E00; --warning-deep: #8A4400; --warning-bg: #FEFAF4; --warning-border: #F5DEBB;
  --danger: #B32A30; --danger-deep: #8A2226; --danger-bg: #FEF6F6; --danger-border: #F0C9CB;
  --sidebar: #101A2E;
  --radius-card: 14px; --radius-input: 9px; --radius-btn: 8px; --radius-chip: 7px;
}
/* TEXT SIZE: every font size in this file is in rem, so this one line scales all text without changing the layout.
   100% = the design's exact sizes (12.5px body). 112.5% = about 12% larger (14px body). */
html { font-size: 112.5%; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: "Hind Siliguri", system-ui, sans-serif;
  font-size: 0.7812rem; line-height: 1.55; font-feature-settings: "tnum" 1;
}
h1, h2 { margin: 0; }
h1 { font-size: 1.0312rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 0.8438rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.muted { color: var(--ink-muted); font-size: 0.7188rem; }
.fine { color: var(--ink-muted); font-size: 0.7188rem; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 13px; }
.pad { padding: 18px 20px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* controls (design: input radius 9, 12.5px text; field label 11.5/500) */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 0.7188rem; font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=tel], select {
  width: 100%; min-height: 40px; padding: 9px 12px; font: inherit; font-size: 0.7812rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-input);
}
input::placeholder, textarea::placeholder { color: #8C9AAF; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.btn {
  min-height: 38px; padding: 0 14px; font: inherit; font-size: 0.8125rem; font-weight: 600; border-radius: var(--radius-btn);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--border); font-size: 0.7812rem; font-weight: 500; }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--ink); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 0.7812rem; }
.btn-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.chip { display: inline-block; padding: 3px 10px; font-size: 0.7188rem; font-weight: 600; color: var(--primary-dark); background: var(--primary-bg); border: 1px solid var(--primary-border); border-radius: var(--radius-chip); white-space: nowrap; }
.badge { display: inline-block; margin-left: auto; padding: 0 7px; font-size: 0.6562rem; font-weight: 700; line-height: 18px; color: #fff; background: #E0454B; border-radius: 999px; }
.notice { padding: 11px 14px; font-size: 0.7812rem; border-radius: 10px; border: 1px solid; }
.notice-ok { color: var(--success); background: var(--success-bg); border-color: #BFE3CE; }
.notice-error { color: var(--danger-deep); background: var(--danger-bg); border-color: var(--danger-border); }

/* login / join: split screen (design "পোর্টালে লগ ইন") */
.auth-body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.auth-hero { min-width: 0; display: flex; flex-direction: column; gap: 26px; padding: 56px 48px; color: #fff; background: linear-gradient(150deg, #0B1B33, #123A6B); }
.auth-hero .brand { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.auth-hero .brand img { height: 30px; width: auto; display: block; }
.auth-hero .pitch { margin-top: auto; }
.auth-hero h2 { font-size: 1.9375rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; text-wrap: pretty; }
.auth-hero .pitch p { max-width: 420px; margin-top: 14px; font-size: 0.875rem; line-height: 1.8; color: rgba(255,255,255,.78); text-wrap: pretty; }
.auth-facts { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }
.auth-facts b { display: block; font-size: 1.3125rem; font-weight: 700; }
.auth-facts span { display: block; margin-top: 2px; font-size: 0.7188rem; color: rgba(255,255,255,.62); }
.auth-side { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.auth-card > .auth-brand { display: none; }
.auth-title h1 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -.02em; }
.auth-title p { margin-top: 5px; font-size: 0.7812rem; color: var(--ink-muted); line-height: 1.6; }
.auth-box { display: flex; flex-direction: column; gap: 13px; padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
.auth-box input[type=tel], .auth-box input[type=text] { padding: 11px 13px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.8125rem; font-weight: 500; }
.auth-box .btn-primary { min-height: 44px; font-size: 0.8438rem; border-radius: 9px; }
.auth-hint { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; font-size: 0.7188rem; line-height: 1.6; color: var(--ink-2); background: var(--surface-subtle); border: 1px solid var(--border-light); border-radius: 9px; }
.auth-hint::before { content: ""; flex: none; width: 15px; height: 15px; margin-top: 1px; border: 1.6px solid var(--primary); border-radius: 50%; }
.auth-note { padding: 13px 15px; font-size: 0.7188rem; line-height: 1.6; color: var(--warning-deep); background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: 11px; }
.auth-note strong { display: block; margin-bottom: 3px; font-size: 0.75rem; }
.auth-foot { text-align: center; font-size: 0.7188rem; line-height: 1.7; color: var(--ink-muted); }
.auth-card .muted { font-size: 0.7812rem; line-height: 1.7; }
.auth-card > h1 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -.02em; }
.auth-card > .muted { margin-top: -10px; }
.error-body { margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: var(--surface); }
.error-card { padding: 26px 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
.error-card h1 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -.02em; }
.error-card p { font-size: 0.7812rem; line-height: 1.7; color: var(--ink-2); }
.error-card .btn { display: inline-flex; align-items: center; }
.choice { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 13px 16px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; }
.choice:hover { border-color: var(--primary); background: var(--primary-bg); }
.choice-main { font-weight: 600; }
.choice-sub { font-size: 0.7188rem; color: var(--ink-muted); }

/* shell (design: dark top bar 46px, sidebar 246px #0B1B33, sticky white content header) */
.shell-body { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 50; height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 18px; background: #0B1B33; color: #fff; }
.topbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.topbar-brand:hover { color: #fff; }
.topbar-brand img { height: 28px; width: auto; display: block; }
.wordmark { font-size: 0.9375rem; font-weight: 600; letter-spacing: -.01em; }
.topbar-spacer { flex: 1; }
.topbar-logout { margin: 0; }
.user-chip { padding: 4px 11px; font-size: 0.7188rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border-radius: 7px; }
.topbar-button { padding: 5px 11px; font: inherit; font-size: 0.75rem; font-weight: 500; color: rgba(255,255,255,.85); background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 7px; cursor: pointer; }
.topbar-button:hover { color: #fff; border-color: rgba(255,255,255,.45); }

.shell { display: flex; align-items: stretch; min-height: calc(100vh - 46px); }
.sidebar { position: sticky; top: 46px; flex: none; width: 246px; height: calc(100vh - 46px); display: flex; flex-direction: column; gap: 14px; padding: 14px 0 20px; color: #fff; background: #0B1B33; }
.soc-card { position: relative; display: block; margin: 0 14px; padding: 9px 11px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; }
.soc-card > summary { list-style: none; cursor: pointer; display: block; }
.soc-card > summary::-webkit-details-marker { display: none; }
.soc-label { display: block; font-size: 0.6562rem; letter-spacing: .04em; color: rgba(255,255,255,.5); }
.soc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.soc-name { min-width: 0; font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-count { flex: none; font: 600 0.625rem "IBM Plex Mono", monospace; color: #8FD3A9; }
.soc-bars { display: flex; gap: 5px; margin-top: 8px; }
.soc-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.16); }
.soc-bars span.is-current { background: #22A45D; }
.switcher-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin-top: 7px; padding: 9px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(11,27,51,.22); }
.switcher-title { padding: 2px 11px 6px; font-size: 0.625rem; font-weight: 600; letter-spacing: .08em; color: var(--ink-muted); }
.switcher-menu form { margin: 0; }
.switch-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; font: inherit; text-align: left; color: var(--ink); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.switch-item:hover, .switch-item.is-current { background: var(--primary-bg); }
.switch-mark { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font: 600 0.6875rem "IBM Plex Mono", monospace; color: var(--ink-2); background: var(--surface); border-radius: 7px; }
.switch-item.is-current .switch-mark { color: #fff; background: var(--primary); }
.switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.switch-name { font-size: 0.7812rem; font-weight: 600; }
.switch-sub { margin-top: 1px; font-size: 0.6562rem; color: var(--ink-muted); }
.switch-now { flex: none; font-size: 0.6562rem; font-weight: 600; color: var(--primary-dark); }

.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 0 8px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-section { padding: 0 8px 6px; font-size: 0.625rem; font-weight: 600; letter-spacing: .1em; color: rgba(255,255,255,.38); }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 0.7812rem; font-weight: 400; color: rgba(255,255,255,.72); border-radius: 7px; }
a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active, a.nav-item.is-active:hover { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item.is-soon { color: rgba(255,255,255,.4); cursor: default; }
.user-card { display: flex; align-items: center; gap: 9px; padding: 0 14px; }
.avatar { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; background: #1F3A5F; border-radius: 50%; }
.user-text { min-width: 0; display: flex; flex-direction: column; }
.user-name { font-size: 0.7812rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.6562rem; color: rgba(255,255,255,.45); }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page-head { position: sticky; top: 46px; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 24px; background: var(--white); border-bottom: 1px solid var(--border); }
.page-title { flex: 1; min-width: 0; }
.page-head p { margin-top: 1px; font-size: 0.7188rem; color: var(--ink-muted); }
.head-search { margin: 0; }
.head-search input[type=search] { width: 230px; min-height: 0; padding: 7px 11px; font-size: 0.7812rem; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 8px; }
.page-body { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; }

/* cards & panels (design: page card radius 14, border #DFE5EE; KPI card padding 15, label 11.5, value 24/700) */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid > * { min-width: 0; }
.card { display: block; min-width: 0; padding: 15px; color: var(--ink); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
a.card:hover, .card-link:hover { border-color: var(--primary-border); background: #F5F9FF; color: var(--ink); }
.card-label { font-size: 0.7188rem; color: var(--ink-muted); }
.card-value { margin-top: 2px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.card-value.is-warn { color: var(--warning); }
.card-value.is-bad { color: var(--danger); }
.card-note { margin-top: 6px; font-size: 0.6875rem; color: var(--ink-muted); }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-card); }
.auth-card .panel { padding: 16px 18px; }
.auth-card .panel > h2 { margin-bottom: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px 20px; border-bottom: 1px solid var(--border-light); }
.panel-head h2 { font-size: 0.8438rem; }
.panel-sub { margin-top: 3px; font-size: 0.7188rem; color: var(--ink-muted); }
.row, .claim { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 11px 20px; border-bottom: 1px solid var(--divider); }
.auth-card .row { padding: 8px 0; }
.row:last-child, .claim:last-child { border-bottom: 0; }
.row-main, .claim-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.inline-form select, .inline-form input[type=tel], .inline-form input[type=search], .inline-form input[type=text] { width: auto; min-width: 150px; min-height: 34px; padding: 6px 10px; font-size: 0.7812rem; }
.join-code { display: inline-block; margin-bottom: 10px; padding: 8px 16px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 1.625rem; font-weight: 600; letter-spacing: .08em; color: var(--primary-dark); background: var(--primary-bg); border: 1px solid var(--primary-border); border-radius: 10px; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; }
  .sidebar-nav { overflow: visible; }
  .page-head { position: static; }
  .head-search input[type=search] { width: 100%; }
  .auth-hero { padding: 32px 24px; }
}

/* ---- community & operations pages (stream B: notices, tickets, gate) ---- */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
textarea { width: 100%; min-height: 120px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-input); resize: vertical; }
input[type=date], input[type=number], input[type=search] { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-input); }
textarea:focus-visible, input[type=date]:focus-visible, input[type=number]:focus-visible, input[type=search]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { padding: 7px 14px; font-size: 0.7812rem; font-weight: 600; text-decoration: none; color: var(--ink-2); background: var(--white); border: 1px solid var(--border-strong); border-radius: 999px; }
.tab.is-active { color: #fff; background: var(--primary); border-color: var(--primary); }
.tab .count { margin-left: 6px; opacity: .75; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tag { display: inline-block; padding: 2px 10px; font-size: 0.7188rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--border-strong); border-radius: var(--radius-chip); color: var(--ink-2); background: var(--surface-subtle); }
.tag-warn { color: var(--warning-deep); background: var(--warning-bg); border-color: var(--warning-border); }
.tag-info { color: var(--primary-dark); background: var(--primary-bg); border-color: var(--primary-border); }
.tag-ok { color: var(--success); background: var(--success-bg); border-color: #BFE3CE; }
.tag-bad { color: var(--danger-deep); background: var(--danger-bg); border-color: var(--danger-border); }
.tag-muted { color: var(--ink-muted); }
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 13px 20px; border-bottom: 1px solid var(--divider); }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.item-title { font-weight: 600; color: var(--ink); text-decoration: none; }
.item-title:hover { color: var(--primary); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.75rem; color: var(--ink-muted); }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.item-actions form { margin: 0; }
.prose { white-space: pre-wrap; line-height: 1.9; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; }
.check input { width: 18px; height: 18px; min-height: 0; }
.empty { padding: 28px 20px; text-align: center; color: var(--ink-muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 20px; border-bottom: 1px solid var(--divider); }
.timeline li:last-child { border-bottom: 0; }
.detail-grid { display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.detail-grid dt { font-size: 0.7188rem; color: var(--ink-muted); }
.detail-grid dd { margin: 2px 0 0; font-weight: 500; }
.banner-code { display: inline-block; padding: 6px 16px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 1.375rem; font-weight: 600; letter-spacing: .12em; color: var(--primary-dark); background: var(--primary-bg); border: 1px solid var(--primary-border); border-radius: 10px; }
.pass-code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; letter-spacing: .08em; }
.panel-body { padding: 16px 20px; }

/* ---- billing pages: tables, amounts, receipts ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
table.data th, table.data td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--divider); white-space: nowrap; vertical-align: middle; }
table.data th { font-size: 0.7188rem; font-weight: 600; color: var(--ink-muted); background: var(--surface-subtle); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }
table.data input[type=text] { min-height: 36px; padding: 4px 8px; }
table.data a { color: var(--primary); text-decoration: none; }
.amount-big { font-size: 1.625rem; font-weight: 700; }
.receipt { max-width: 560px; }
.sig { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--divider); }
@media print { .sidebar, .page-head, .no-print, nav { display: none !important; } .panel { border: 0; box-shadow: none; } }

/* ---- extra modules: results bars, wrapped table cells ---- */
table.data td.wrap { white-space: normal; min-width: 220px; }
progress.bar { width: 100%; height: 12px; appearance: none; -webkit-appearance: none; border: 1px solid var(--border-light); border-radius: 999px; background: var(--surface-subtle); overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--surface-subtle); }
progress.bar::-webkit-progress-value { background: var(--primary); }
progress.bar::-moz-progress-bar { background: var(--primary); }
.option-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--divider); }
.option-row:last-child { border-bottom: 0; }
label.check { display: flex; align-items: center; gap: 8px; }
details.item-edit { flex-basis: 100%; margin-top: 8px; }
details.item-edit > summary { cursor: pointer; color: var(--primary); font-size: 0.875rem; }
details.item-edit[open] > summary { margin-bottom: 12px; }

a.item-link { color: inherit; text-decoration: none; justify-content: space-between; }
a.item-link:hover { background: var(--surface-subtle); }

/* ---- public front page ---- */
.site-body { margin: 0; background: var(--bg, #fff); color: var(--text, #1a1a1a); }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--divider); }
.site-brand { display: inline-flex; }
.site-hero { max-width: 760px; margin: 0 auto; padding: 56px 24px 40px; text-align: center; }
.site-hero h1 { font-size: 2rem; line-height: 1.3; margin: 0 0 14px; }
.site-hero h2 { margin: 0 0 10px; }
.site-hero p { font-size: 1.0625rem; line-height: 1.7; margin: 0 0 20px; }
.site-hero-alt { padding-top: 24px; padding-bottom: 56px; }
.site-cta { display: flex; justify-content: center; margin-bottom: 14px; }
.site-features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 1000px; margin: 0 auto; padding: 0 24px 24px; }
.site-feature { border: 1px solid var(--border-light); border-radius: 12px; padding: 18px 20px; background: var(--surface, #fff); }
.site-feature h2 { font-size: 1.125rem; margin: 0 0 8px; }
.site-feature p { margin: 0; line-height: 1.7; }
.site-footer { text-align: center; padding: 24px; color: var(--muted, #666); border-top: 1px solid var(--divider); font-size: 0.875rem; }
.text-bad { color: var(--danger, #b3261e); }

/* ---- web installer (public/install.php) ---- */
.installer { max-width: 760px; margin: 24px auto 48px; padding: 0 16px; }
.installer h1 { font-size: 1.625rem; margin: 8px 0 6px; }
.installer .lead { color: var(--muted, #666); line-height: 1.7; margin: 0 0 18px; }
.installer .check { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; }
.installer .check-ok::before { content: "✓"; color: var(--success, #1a7f37); font-weight: 700; }
.installer .check-bad::before { content: "✗"; color: var(--danger, #b3261e); font-weight: 700; }
.installer .radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; margin-bottom: 8px; }
.installer .radio input { width: 18px; height: 18px; margin-top: 3px; }
.installer textarea.code { width: 100%; min-height: 220px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8125rem; }
.installer .warn-box { border: 1px solid #e3b341; background: #fff8e1; border-radius: 10px; padding: 12px 14px; margin: 14px 0; line-height: 1.7; }

/* ---- design: KPI strip, 230px side panel + main, floor grid (প্রপার্টি ও ইউনিট) ---- */
.kpi-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi-row > * { min-width: 0; }
.split-230 { display: grid; gap: 16px; grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
.side-panel { display: flex; flex-direction: column; gap: 2px; padding: 13px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 10px; }
.side-head h2 { font-size: 0.7812rem; }
.side-head a { font-size: 0.7188rem; font-weight: 500; }
.side-label { padding: 10px 10px 4px; font-size: 0.625rem; font-weight: 600; letter-spacing: .08em; color: var(--ink-muted); }
.side-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: var(--ink); border-radius: 8px; }
.side-item .dot { flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--border-strong); }
.side-item.is-active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
.side-item.is-active .dot { background: var(--primary); }
.side-name { flex: 1; min-width: 0; font-size: 0.7812rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-count { font-size: 0.6562rem; font-weight: 400; color: var(--ink-muted); }
.side-filter { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px; margin: 0; }
.side-filter input[type=search], .side-filter select { min-height: 34px; padding: 6px 10px; font-size: 0.7812rem; }
.fine-link { font-size: 0.7188rem; }
.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 9px; padding: 2px 10px 4px; border-top: 1px solid var(--divider); }
.legend .side-label { padding: 10px 0 0; }
.legend > div:not(.side-label) { display: flex; align-items: center; gap: 8px; font-size: 0.6875rem; color: var(--ink-2); }
.swatch { flex: none; width: 11px; height: 11px; border-radius: 3px; border: 1px solid; }
.building-panel { padding: 18px 20px; }
.building-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.building-head h2 { font-size: 0.875rem; }
.head-actions { display: flex; gap: 9px; }
.floors { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--divider); }
.floor-row { display: flex; align-items: center; gap: 14px; }
.floor-name { flex: none; width: 62px; font-size: 0.7188rem; font-weight: 500; color: var(--ink-muted); }
.floor-units { flex: 1; min-width: 0; display: grid; gap: 9px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.unit-tile { display: block; padding: 9px 8px; text-align: center; border: 1px solid; border-radius: 9px; }
.unit-tile:hover { filter: brightness(.97); }
.unit-label { display: block; font-size: 0.7812rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-state { display: block; margin-top: 2px; font-size: 0.5938rem; }
.st-owner { background: #EAF2FE; border-color: #B8D3F5; color: #0A4CA8; }
.st-rented { background: #E6F5EC; border-color: #B4E0C6; color: #12844A; }
.st-overdue { background: #FDECEC; border-color: #F5C2C4; color: #B32A30; }
.st-vacant { background: #F7F9FC; border-color: #C3CCDA; border-style: dashed; color: #6B7B93; }
.st-occupied { background: #FFFFFF; border-color: #DFE5EE; color: #43536B; }
a.unit-tile.st-owner:hover { color: #0A4CA8; } a.unit-tile.st-rented:hover { color: #12844A; } a.unit-tile.st-overdue:hover { color: #B32A30; } a.unit-tile.st-vacant:hover { color: #6B7B93; } a.unit-tile.st-occupied:hover { color: #43536B; }
@media (max-width: 980px) { .split-230 { grid-template-columns: minmax(0, 1fr); } }

/* ---- design: dashboard collection card and stat cards ---- */
.dash-top { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.dash-top > * { min-width: 0; }
.hero-card { display: flex; flex-direction: column; gap: 16px; padding: 20px 22px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-label { font-size: 0.75rem; font-weight: 500; color: var(--ink-muted); }
.hero-number { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 2.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.hero-number > span:first-child { font-size: 1.5rem; font-weight: 600; color: var(--ink-muted); }
.delta { padding: 3px 7px; font: 600 0.7188rem "IBM Plex Mono", monospace; letter-spacing: 0; border-radius: 5px; }
.delta.is-up { color: var(--success); background: var(--success-bg); } .delta.is-down { color: var(--danger); background: #FDECEC; }
.hero-sub { margin-top: 5px; font-size: 0.7188rem; color: var(--ink-muted); }
.stack-bar { display: flex; height: 12px; overflow: hidden; background: var(--surface); border-radius: 6px; }
.seg-collected { background: linear-gradient(90deg, #0F62D6, #1B7FE8); } .seg-rest { flex: 1; background: #E0454B; }
.hero-legend { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 11px; }
.hero-legend > div { display: flex; align-items: center; gap: 7px; }
.hero-legend b { font-size: 0.9062rem; font-weight: 600; } .hero-legend .muted { font-size: 0.6875rem; }
.sw { flex: none; width: 8px; height: 8px; border-radius: 2px; } .sw-collected { background: #0F62D6; } .sw-rest { background: #E0454B; } .sw-total { background: #C3CCDA; }
.bars-wrap { flex: 1; display: flex; flex-direction: column; padding-top: 14px; border-top: 1px solid #EDF1F6; }
.bars-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 0.75rem; } .bars-head .muted { font-size: 0.6875rem; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 14px; min-height: 96px; height: 110px; margin-top: 12px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar { width: 100%; max-width: 46px; background: #D6E2F5; border-radius: 5px 5px 0 0; } .bar.is-current { background: #0F62D6; }
.bar-label { font-size: 0.6562rem; color: var(--ink-muted); } .bar-label.is-current { color: var(--ink); font-weight: 600; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-content: stretch; }
.stat-card { display: flex; flex-direction: column; padding: 18px; color: var(--ink); background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.stat-card:hover { color: var(--ink); border-color: var(--primary-border); }
.stat-label { font-size: 0.75rem; color: var(--ink-muted); }
.stat-value { margin-top: 4px; font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.stat-badge { align-self: flex-start; margin-top: 9px; padding: 3px 7px; font-size: 0.6875rem; font-weight: 600; border-radius: 5px; }
.stat-badge.is-bad { color: #B32A30; background: #FDECEC; } .stat-badge.is-info { color: #0A4CA8; background: #EAF2FE; } .stat-badge.is-warn { color: var(--warning); background: #FDF0E6; }
.stat-bar { display: flex; gap: 3px; margin-top: 9px; } .stat-bar .seg { height: 4px; border-radius: 2px; }
.seg.is-ok { background: #22A45D; } .seg.is-muted { background: #DFE5EE; } .seg.is-bad { background: #E0454B; } .seg.is-warn { background: #F0A93B; }
.stat-note { margin-top: auto; padding-top: 10px; font-size: 0.7188rem; color: var(--ink-muted); }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }
/* width and height steps for bars (inline styles are blocked by the content security policy) */
.w-0 { width: 0%; } .w-1 { width: 1%; } .w-2 { width: 2%; } .w-3 { width: 3%; } .w-4 { width: 4%; } .w-5 { width: 5%; } .w-6 { width: 6%; } .w-7 { width: 7%; } .w-8 { width: 8%; } .w-9 { width: 9%; } .w-10 { width: 10%; } .w-11 { width: 11%; } .w-12 { width: 12%; } .w-13 { width: 13%; } .w-14 { width: 14%; } .w-15 { width: 15%; } .w-16 { width: 16%; } .w-17 { width: 17%; } .w-18 { width: 18%; } .w-19 { width: 19%; } .w-20 { width: 20%; } .w-21 { width: 21%; } .w-22 { width: 22%; } .w-23 { width: 23%; } .w-24 { width: 24%; } .w-25 { width: 25%; } .w-26 { width: 26%; } .w-27 { width: 27%; } .w-28 { width: 28%; } .w-29 { width: 29%; } .w-30 { width: 30%; } .w-31 { width: 31%; } .w-32 { width: 32%; } .w-33 { width: 33%; } .w-34 { width: 34%; } .w-35 { width: 35%; } .w-36 { width: 36%; } .w-37 { width: 37%; } .w-38 { width: 38%; } .w-39 { width: 39%; } .w-40 { width: 40%; } .w-41 { width: 41%; } .w-42 { width: 42%; } .w-43 { width: 43%; } .w-44 { width: 44%; } .w-45 { width: 45%; } .w-46 { width: 46%; } .w-47 { width: 47%; } .w-48 { width: 48%; } .w-49 { width: 49%; } .w-50 { width: 50%; } .w-51 { width: 51%; } .w-52 { width: 52%; } .w-53 { width: 53%; } .w-54 { width: 54%; } .w-55 { width: 55%; } .w-56 { width: 56%; } .w-57 { width: 57%; } .w-58 { width: 58%; } .w-59 { width: 59%; } .w-60 { width: 60%; } .w-61 { width: 61%; } .w-62 { width: 62%; } .w-63 { width: 63%; } .w-64 { width: 64%; } .w-65 { width: 65%; } .w-66 { width: 66%; } .w-67 { width: 67%; } .w-68 { width: 68%; } .w-69 { width: 69%; } .w-70 { width: 70%; } .w-71 { width: 71%; } .w-72 { width: 72%; } .w-73 { width: 73%; } .w-74 { width: 74%; } .w-75 { width: 75%; } .w-76 { width: 76%; } .w-77 { width: 77%; } .w-78 { width: 78%; } .w-79 { width: 79%; } .w-80 { width: 80%; } .w-81 { width: 81%; } .w-82 { width: 82%; } .w-83 { width: 83%; } .w-84 { width: 84%; } .w-85 { width: 85%; } .w-86 { width: 86%; } .w-87 { width: 87%; } .w-88 { width: 88%; } .w-89 { width: 89%; } .w-90 { width: 90%; } .w-91 { width: 91%; } .w-92 { width: 92%; } .w-93 { width: 93%; } .w-94 { width: 94%; } .w-95 { width: 95%; } .w-96 { width: 96%; } .w-97 { width: 97%; } .w-98 { width: 98%; } .w-99 { width: 99%; } .w-100 { width: 100%; }
.h-0 { height: 0%; } .h-5 { height: 5%; } .h-10 { height: 10%; } .h-15 { height: 15%; } .h-20 { height: 20%; } .h-25 { height: 25%; } .h-30 { height: 30%; } .h-35 { height: 35%; } .h-40 { height: 40%; } .h-45 { height: 45%; } .h-50 { height: 50%; } .h-55 { height: 55%; } .h-60 { height: 60%; } .h-65 { height: 65%; } .h-70 { height: 70%; } .h-75 { height: 75%; } .h-80 { height: 80%; } .h-85 { height: 85%; } .h-90 { height: 90%; } .h-95 { height: 95%; } .h-100 { height: 100%; }
.stat-bar .seg, .stack-bar > span:first-child { flex: none; }
.stat-bar { overflow: hidden; }
a.claims-note { display: block; color: var(--primary-dark); background: var(--primary-bg); border-color: var(--primary-border); }
