/* FS Preparer – Premium sky blue theme
   Professional financial statement formatting with print-optimised paging */
@import url('./kalimati.css');
:root {
  --sky: #38bdf8; --sky-d: #0284c7; --sky-l: #e0f2fe; --sky-xl: #f0f9ff;
  --sky-accent: #0369a1; --gold: #b8860b;
  --txt: #1e293b; --txt2: #475569; --txt3: #94a3b8;
  --bg: #fff; --bg2: #f8fafc; --border: #e2e8f0; --border-d: #cbd5e1;
  --danger: #ef4444; --ok: #16a34a; --warn: #f59e0b;
  --radius: 6px; --gap: 1rem;
  --serif: 'Georgia', 'Cambria', 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ne-serif: 'Kokila', 'Kalimati', 'Mangal', 'Preeti', 'Noto Serif Devanagari', serif;
  --ne-sans: 'Kalimati', 'Kokila', 'Mangal', 'Noto Sans Devanagari', sans-serif;
  --font-heading: var(--serif);
  --font-title: var(--serif);
  --font-body: var(--serif);
  --font-number: var(--sans);
}

/* ---- Nepali font override when lang="ne" ---- */
html[lang="ne"] { --serif: var(--ne-serif); --sans: var(--ne-sans); }
html[lang="ne"] body { font-size: 15.5px; line-height: 1.65; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--sans); color: var(--txt); background: var(--bg2); line-height: 1.55; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1rem; padding: .55rem 1.25rem;
  background: linear-gradient(135deg, var(--sky-d) 0%, var(--sky-accent) 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(2,132,199,.25);
}
.topbar .brand { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.topbar .brand small { font-weight: 400; font-size: .78rem; opacity: .8; display: block; }
.topbar select, .topbar .btn { font-size: .85rem; }
.topbar select { padding: .3rem .5rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; max-width: 230px; backdrop-filter: blur(4px); }
.topbar select option { color: var(--txt); background: var(--bg); }
.lang-toggle { display: flex; gap: 2px; margin-left: auto; }
.lang-toggle button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); padding: .25rem .65rem; font-size: .8rem; cursor: pointer; border-radius: var(--radius); transition: all .15s; }
.lang-toggle button.on { background: #fff; color: var(--sky-d); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout { display: flex; min-height: calc(100vh - 48px); }
#sidenav {
  width: 240px; min-width: 190px; background: #fff; border-right: 1px solid var(--border);
  padding: .75rem 0; overflow-y: auto; flex-shrink: 0;
  box-shadow: 2px 0 8px rgba(0,0,0,.03);
  scrollbar-width: thin; scrollbar-color: var(--border-d) transparent;
}
#sidenav::-webkit-scrollbar { width: 4px; }
#sidenav::-webkit-scrollbar-thumb { background: var(--border-d); border-radius: 4px; }
#sidenav::-webkit-scrollbar-track { background: transparent; }
#sidenav .nav-g {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--sky-d); padding: .9rem 1.2rem .3rem;
  border-bottom: 1px solid var(--border); margin-bottom: .15rem;
}
#sidenav .nav-n {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem 1.2rem; font-size: .87rem; color: var(--txt2); text-decoration: none;
  cursor: pointer; border-left: 3px solid transparent; transition: all .12s;
}
#sidenav .nav-n:hover { background: var(--sky-xl); color: var(--txt); }
#sidenav .nav-n.active { background: var(--sky-l); border-left-color: var(--sky-d); font-weight: 600; color: var(--sky-d); }
#sidenav .nav-n svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .65; }
#sidenav .nav-n.active svg { opacity: 1; }
#main { flex: 1; padding: 1.5rem 2rem; max-width: 1120px; overflow-x: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem; font-size: .87rem; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: all .15s;
  background: var(--bg); color: var(--txt); box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn:hover { background: var(--sky-xl); border-color: var(--sky); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.btn-primary, .btn.primary {
  background: var(--sky-d); color: #fff; border-color: var(--sky-d);
  box-shadow: 0 1px 3px rgba(2,132,199,.25);
}
.btn-primary:hover, .btn.primary:hover { background: var(--sky-accent); border-color: var(--sky-accent); }
.btn-sm, .btn.sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-danger, .btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover, .btn.danger:hover { background: #fef2f2; }
.btn[disabled] { opacity: .45; cursor: default; box-shadow: none; pointer-events: none; }
.btn svg { width: 15px; height: 15px; }

/* ============================================================
   CARD, GRID, FIELDS
   ============================================================ */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.4rem 1.5rem; margin-bottom: 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.card summary {
  font-weight: 700; cursor: pointer; color: var(--sky-d); font-size: .95rem;
  padding: .3rem 0; display: flex; align-items: center; gap: .4rem;
}
.card summary::marker { color: var(--sky); }
.card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--sky-accent);
  margin-bottom: .8rem; padding-bottom: .45rem;
  border-bottom: 2px solid var(--sky-l);
  letter-spacing: .01em;
}
.card h4 {
  font-size: .92rem; font-weight: 700; color: var(--txt);
  margin: .8rem 0 .45rem; padding-top: .3rem;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.fld { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; }
.fld > span {
  font-size: .78rem; font-weight: 600; color: var(--txt2);
  letter-spacing: .02em; line-height: 1.4;
}
.fld label { font-size: .78rem; font-weight: 600; color: var(--txt2); letter-spacing: .02em; }
.fld input, .fld select, .fld textarea {
  padding: .5rem .7rem; font-size: .87rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--txt); font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.fld select { padding-right: 1.8rem; }
.fld textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}
.fld input:hover, .fld select:hover, .fld textarea:hover {
  border-color: var(--border-d);
}
.fld input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--sky-d); cursor: pointer; }

/* ============================================================
   PAGE TITLE / TOOLBAR
   ============================================================ */
.page-title {
  font-size: 1.35rem; font-weight: 700; color: var(--sky-d); margin-bottom: 0;
  display: flex; align-items: center; gap: .5rem; letter-spacing: -.01em;
}
.page-title svg { width: 26px; height: 26px; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin-bottom: .85rem; padding-bottom: .55rem;
  border-bottom: 1.5px solid var(--border);
}
.grow { flex: 1; }

/* ============================================================
   PAPER  –  the print-ready statement container
   On screen: elevated white card with subtle shadow
   In print: clean white with generous margins for letterhead
   ============================================================ */
.paper {
  background: #fff; padding: 2rem 2.25rem; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 1.5rem; box-shadow: 0 2px 16px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.02);
  font-family: var(--font-body); line-height: 1.65;
}

/* --- letterhead reserved space — visible on screen as placeholder, blank area in print --- */
.letterhead-space {
  height: 48px;
  border: 1.5px dashed var(--border-d);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--txt3); font-family: var(--sans); font-size: .7rem;
  letter-spacing: .04em; text-transform: uppercase;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 6px,
    rgba(56,189,248,.03) 6px, rgba(56,189,248,.03) 12px
  );
}
.letterhead-space::after { content: '\2702  company letterhead area  \2702'; }

/* --- decorative top border on paper --- */
.paper::before {
  content: ''; display: block; height: 3px; margin: -2rem -2.25rem 1.5rem;
  background: linear-gradient(90deg, var(--sky-d) 0%, var(--sky) 50%, var(--sky-d) 100%);
  border-radius: 8px 8px 0 0;
}

/* ============================================================
   STATEMENT HEADER  –  company name, title, period, icon
   ============================================================ */
.st-head { text-align: center; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 2px solid var(--sky-d); }
.st-head .st-icon { display: flex; justify-content: center; margin-bottom: .6rem; }
.st-head .st-icon svg { width: 32px; height: 32px; color: var(--sky-d); }
.st-co {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--txt);
  letter-spacing: .03em; text-transform: uppercase;
}
.st-addr { font-family: var(--sans); font-size: .82rem; color: var(--txt2); margin-top: .1rem; }
.st-title {
  font-family: var(--font-title); font-size: 1.05rem; font-weight: 700; color: var(--sky-d);
  margin: .5rem 0 .25rem; letter-spacing: .02em; text-transform: uppercase;
  position: relative; display: inline-block;
}
.st-title::after {
  content: ''; display: block; width: 50px; height: 2px; margin: .3rem auto 0;
  background: var(--sky);
}
.st-period { font-family: var(--sans); font-size: .88rem; color: var(--txt2); margin-top: .35rem; }
.st-cur { font-family: var(--sans); font-size: .8rem; color: var(--txt3); margin-top: .15rem; letter-spacing: .02em; }
.halfunit { font-family: var(--sans); font-size: .76rem; color: var(--txt3); }

/* ============================================================
   STATEMENT TABLES  –  financial data
   ============================================================ */
table.st { width: 100%; border-collapse: collapse; font-size: .87rem; font-family: var(--font-number); }
table.st th, table.st td { padding: .38rem .6rem; vertical-align: top; }
table.st th {
  text-align: left; font-weight: 700; font-size: .8rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--sky-d);
  border-bottom: 2.5px solid var(--sky-d); border-top: 1.5px solid var(--sky-d);
  background: var(--sky-xl); padding: .5rem .6rem;
}
table.st th.num { text-align: right; }
table.st td.part { text-align: left; }
table.st td.note { text-align: center; width: 3.5rem; color: var(--txt2); font-size: .82rem; font-weight: 600; }
table.st td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; min-width: 110px; }

/* row types */
table.st .r-h td {
  font-weight: 700; padding-top: .9rem; padding-bottom: .35rem; font-size: .93rem;
  color: var(--sky-accent); border-bottom: 1.5px solid var(--sky);
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .02em;
}
table.st .r-sec td {
  font-weight: 700; font-style: italic; padding-top: .6rem; color: var(--txt); font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
table.st .r-line td { border-bottom: 1px solid var(--border); }
table.st .r-line:hover td { background: var(--sky-xl); }
table.st .r-sub td {
  font-weight: 700; border-top: 1.5px solid var(--txt3); padding-top: .45rem;
  color: var(--txt);
}
table.st .r-sectot td {
  font-weight: 700; border-top: 1.5px solid var(--txt3);
  color: var(--txt);
}
table.st .r-tot td {
  font-weight: 700; border-top: 2.5px solid var(--txt); border-bottom: 3px double var(--txt);
  padding-top: .5rem; padding-bottom: .5rem; font-size: .92rem;
  color: var(--txt);
}
table.st.soce { font-size: .82rem; }
table.st.soce td.num { min-width: 70px; }
table.st.wide td.num { min-width: 95px; }

/* zebra stripe for readability */
table.st tbody tr.r-line:nth-child(even) td { background: rgba(240,249,255,.35); }
table.st tbody tr.r-line:hover td { background: var(--sky-l) !important; }

/* ============================================================
   NOTES  –  professional formatting
   ============================================================ */
.note-block {
  break-inside: avoid; page-break-inside: avoid;
  margin-bottom: .5rem; padding-top: .25rem;
}
.note-h {
  font-family: var(--font-heading); font-size: 1.02rem; font-weight: 700; color: var(--sky-d);
  margin: 1.25rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--sky-l);
  display: flex; align-items: baseline; gap: .35rem;
}
.nno { color: var(--sky-d); font-size: .88rem; font-weight: 700; }
.note-sub {
  font-family: var(--font-title); font-weight: 600; margin: .7rem 0 .25rem; font-size: .93rem;
  color: var(--txt); padding-left: .3rem; border-left: 3px solid var(--sky); padding-bottom: .1rem;
}
.sub-h { font-style: italic; color: var(--txt2); margin: .4rem 0 .15rem; font-size: .86rem; font-family: var(--font-title); }
p.note-p, .note-p, .paper p, .aud p {
  margin: .35rem 0; font-size: .88rem; line-height: 1.75;
  text-align: justify; text-justify: inter-word;
  hyphens: auto; -webkit-hyphens: auto;
}

/* policy sub-sections keep together */
.policy-block { break-inside: avoid; page-break-inside: avoid; margin-bottom: .3rem; }

/* ============================================================
   SIGNATURES  –  professional layout
   ============================================================ */
.sign-for {
  font-family: var(--font-heading); font-weight: 700; font-size: .95rem; color: var(--txt);
  margin-top: 1.5rem; padding-top: .5rem;
}
.signs { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: .75rem; padding-top: .5rem; }
.sign { flex: 1; min-width: 160px; text-align: left; }
.sig-line { border-top: 1.5px solid var(--txt); width: 180px; margin-top: 2.5rem; }
.sig-name { font-weight: 700; font-size: .9rem; margin-top: .25rem; font-family: var(--font-number); color: var(--txt); }
.sig-desg { font-size: .84rem; color: var(--txt2); font-family: var(--font-number); margin-top: .1rem; }
.aud-sign { margin-top: 1.5rem; border-top: 1.5px solid var(--border-d); padding-top: .75rem; }
.aud-sig { margin-top: 1.5rem; }
.sign-place { font-family: var(--sans); font-size: .84rem; color: var(--txt2); margin-top: .7rem; }
.as-per-report { font-family: var(--font-body); font-style: italic; font-size: .9rem; color: var(--txt); font-weight: 600; }

/* separator between statement body and signatures */
.stmt-sep {
  border: none; border-top: 2px solid var(--border-d); margin: 1rem 0 .5rem;
}

/* ============================================================
   AUDITOR REPORT  –  professional legal document styling
   ============================================================ */
.aud-letterhead { text-align: center; margin-bottom: .8rem; }
.aud-letterhead img { max-width: 100%; max-height: 120px; }
.aud-sig { break-inside: avoid; margin-top: 1.5rem; line-height: 1.6; }
.aud-sig .sig-line { width: 200px; border-top: 1.5px solid var(--txt); margin-top: 1.5rem; }
.aud-sig .sig-name { font-size: .92rem; font-weight: 700; margin-top: .3rem; }
.aud-sig .sig-role { font-size: .85rem; }
.aud-sig .sig-firm { font-size: .88rem; font-weight: 600; margin-top: .15rem; }
.aud-sig .sig-ca { font-size: .85rem; letter-spacing: .02em; }
.aud-sig .sig-details { font-size: .82rem; color: var(--txt2); margin-top: .1rem; }
.aud { font-size: .88rem; line-height: 1.8; font-family: var(--font-body); }
.aud h3 {
  font-size: .98rem; color: var(--sky-d); margin: 1rem 0 .3rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 1px solid var(--sky-l); padding-bottom: .2rem;
}
.aud h4 { font-size: .92rem; font-weight: 700; color: var(--txt); margin: .8rem 0 .2rem; }
.aud p { margin: .4rem 0; text-align: justify; text-justify: inter-word; line-height: 1.8; hyphens: auto; }
.aud .center { text-align: center; }
.aud ul, .aud ol { margin: .4rem 0 .4rem 1.5rem; }
.aud li { margin: .25rem 0; line-height: 1.7; text-align: justify; }

/* KAM table */
table.kam { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .85rem; break-inside: avoid; }
table.kam th { background: var(--sky-xl); color: var(--sky-d); font-weight: 600; padding: .5rem; text-align: left; border-bottom: 2px solid var(--sky-d); font-size: .8rem; text-transform: uppercase; }
table.kam td { padding: .6rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.65; text-align: justify; }
table.kam td b { color: var(--sky-accent); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: .6rem .85rem; border-radius: var(--radius); font-size: .84rem; margin: .65rem 0;
  background: #fef2f2; color: var(--danger); border-left: 4px solid var(--danger);
  font-family: var(--sans); display: flex; align-items: flex-start; gap: .5rem;
}
.alert::before { content: ''; flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center/contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center/contain no-repeat; }
.alert.ok { background: #f0fdf4; color: var(--ok); border-left-color: var(--ok); }
.alert.ok::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.alert.warn { background: #fffbeb; color: #92400e; border-left-color: var(--warn); }
.small { font-size: .82rem; } .muted { color: var(--txt3); font-family: var(--sans); }
.pill {
  display: inline-block; padding: .2rem .7rem; border-radius: 99px;
  font-size: .73rem; font-weight: 700; letter-spacing: .04em;
  background: var(--sky-l); color: var(--sky-d);
  border: 1px solid rgba(2,132,199,.15);
  text-transform: uppercase;
}
.nowrap { white-space: nowrap; }

/* ============================================================
   PREMIUM DASHBOARD
   ============================================================ */

/* --- hero banner --- */
.hero {
  background: linear-gradient(135deg, var(--sky-d) 0%, var(--sky-accent) 60%, #065a82 100%);
  color: #fff; border-radius: 12px; padding: 1.5rem 2rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(2,132,199,.25); position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; top: -40%; right: -10%; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none;
}
.hero-info { position: relative; z-index: 1; }
.hero-info h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .2rem; line-height: 1.2; }
.hero-info .hero-sub { opacity: .8; font-size: .85rem; margin: .1rem 0; }
.hero-badges { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  background: rgba(255,255,255,.18); padding: .18rem .6rem; border-radius: 99px;
  font-size: .72rem; font-weight: 600; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15); letter-spacing: .02em;
}
.hero-mini {
  flex-shrink: 0; width: 120px; height: 90px; background: rgba(255,255,255,.1);
  border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 1;
}
.hero-mini svg { width: 48px; height: 48px; opacity: .5; }

/* --- stat cards --- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .85rem; margin-bottom: 1.25rem;
}
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: .9rem 1rem; position: relative; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(2,132,199,.12); transform: translateY(-1px); }
.stat-card .sc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .5rem; }
.stat-card .sc-icon {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--sky-l); color: var(--sky-d); flex-shrink: 0;
}
.stat-card .sc-icon svg { width: 17px; height: 17px; }
.stat-card .sc-trend {
  display: inline-flex; align-items: center; gap: .15rem;
  font-size: .68rem; font-weight: 600; padding: .1rem .4rem; border-radius: 99px;
}
.sc-trend.up { background: #ecfdf5; color: #059669; }
.sc-trend.down { background: #fef2f2; color: #dc2626; }
.sc-trend.flat { background: var(--bg2); color: var(--txt3); }
.stat-card .sc-val {
  font-size: 1.3rem; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.stat-card .sc-label {
  font-size: .7rem; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; margin-top: .15rem;
}

/* --- panel (generic card) --- */
.panel { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.04); overflow: hidden; transition: box-shadow .2s; }
.panel:hover { box-shadow: 0 3px 12px rgba(0,0,0,.07); }
.panel-head {
  display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem;
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: .88rem; color: var(--txt);
}
.panel-head svg { width: 17px; height: 17px; color: var(--sky-d); flex-shrink: 0; }
.panel-head .grow { flex: 1; }
.panel-body { padding: .75rem 1rem; }
.panel-foot { padding: .6rem 1rem; border-top: 1px solid var(--border); background: var(--bg2); }

/* --- workflow steps --- */
.workflow { display: flex; gap: 0; }
.wf-step {
  flex: 1; text-align: center; padding: .65rem .35rem; position: relative; font-size: .74rem; color: var(--txt2);
}
.wf-step .wf-num {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .74rem; margin-bottom: .25rem;
  background: var(--border); color: var(--txt3); transition: all .2s;
}
.wf-step.done .wf-num { background: var(--ok); color: #fff; }
.wf-step.active .wf-num { background: var(--sky-d); color: #fff; box-shadow: 0 0 0 3px var(--sky-l); }
.wf-step .wf-label { display: block; margin-top: .15rem; line-height: 1.25; }
.wf-step::after {
  content: ''; position: absolute; top: .95rem; left: calc(50% + 18px); right: calc(-50% + 18px);
  height: 2px; background: var(--border);
}
.wf-step:last-child::after { display: none; }
.wf-step.done::after { background: var(--ok); }

/* --- report pack list --- */
.report-list { margin: 0; }
.report-row {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .85rem;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; font-size: .85rem;
}
.report-row:last-child { border-bottom: none; }
.report-row:hover { background: var(--sky-xl); }
.report-row .rr-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sky-l); color: var(--sky-d);
}
.report-row .rr-icon svg { width: 13px; height: 13px; }
.report-row .rr-name { flex: 1; font-weight: 500; }
.report-row .rr-status { flex-shrink: 0; }

/* --- pill colour variants --- */
.pill.green { background: #ecfdf5; color: #059669; }
.pill.red { background: #fef2f2; color: #dc2626; }
.pill.amber { background: #fffbeb; color: #92400e; }
.pill.mute { background: var(--bg2); color: var(--txt3); }

/* --- dashboard grid --- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.dash-grid .full { grid-column: 1 / -1; }

/* --- health check list (inside panel) --- */
.checks { margin: 0; }
.chk-row { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .84rem; }
.chk-row::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ok); }
.chk-row.bad::before { background: var(--danger); }
.chk-row .chk-detail { color: var(--txt3); font-size: .78rem; margin-left: auto; font-variant-numeric: tabular-nums; }

/* --- IRD return forms --- */
.ird-sn { width: 40px; text-align: center; color: var(--txt2); font-size: .78rem; }
table.st .ird-sn { width: 40px; text-align: center; padding: .25rem .3rem; }
table.ird-meta { border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); }
table.ird-meta td { padding: .4rem .75rem; border-bottom: 1px solid var(--border); font-size: .84rem; }
table.ird-meta tr:last-child td { border-bottom: none; }
table.ird-meta td:nth-child(odd) { font-weight: 600; color: var(--sky-accent); width: 22%; }

/* --- legacy compat (used by other views) --- */
.stats { margin: .75rem 0; }
.stat { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .85rem; }
.stat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ok); }
.stat.bad::before { background: var(--danger); }
.steps { margin: .5rem 0; padding-left: 1.4rem; font-size: .85rem; }
.steps li { margin: .3rem 0; line-height: 1.55; }

/* ============================================================
   LIST / MAPPING / EDIT TABLES
   ============================================================ */
table.list { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .5rem 0; }
table.list th, table.list td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--border); }
table.list th { background: var(--sky-xl); font-weight: 600; color: var(--sky-d); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
table.list tbody tr:hover td { background: var(--sky-xl); }

table.map-t { width: 100%; border-collapse: collapse; font-size: .85rem; table-layout: fixed; }
table.map-t th, table.map-t td { padding: .35rem .4rem; border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; }
table.map-t th { background: var(--sky-xl); color: var(--sky-d); font-weight: 600; font-size: .78rem; text-align: left; position: sticky; top: 0; z-index: 1; text-transform: uppercase; letter-spacing: .03em; }
table.map-t .unm { background: #fef2f2; }
table.map-t .skip { background: #f8f8f8; opacity: .55; }
table.map-t .skip td input, table.map-t .skip td select { text-decoration: line-through; color: var(--txt3); }
table.map-t th:nth-child(1) { width: 3.5%; text-align: center; } table.map-t th:nth-child(2) { width: 6.5%; } table.map-t th:nth-child(3) { width: 17%; } table.map-t th:nth-child(4) { width: 19%; }
table.map-t th:nth-child(n+5):nth-child(-n+8) { width: 11%; text-align: right; }
table.map-t th:last-child { width: 4%; }
table.map-t td:nth-child(n+5):nth-child(-n+8) { text-align: right; font-variant-numeric: tabular-nums; }
table.map-t td input, table.map-t td select { width: 100%; box-sizing: border-box; font-size: .82rem; padding: .25rem .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--txt); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
table.map-t td input:focus, table.map-t td select:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
table.map-t td input[type="number"] { text-align: right; }

table.edit-t {
  width: 100%; border-collapse: collapse; font-size: .84rem;
  margin: .6rem 0; border: 1px solid var(--border); border-radius: var(--radius);
}
table.edit-t th, table.edit-t td { padding: .45rem .55rem; border-bottom: 1px solid var(--border); }
table.edit-t th {
  background: var(--sky-xl); color: var(--sky-d); font-weight: 700;
  font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--sky-l); padding: .55rem .55rem;
}
table.edit-t input, table.edit-t select {
  font-size: .84rem; padding: .35rem .5rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  width: 100%; background: var(--bg); color: var(--txt);
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
table.edit-t input:focus, table.edit-t select:focus {
  border-color: var(--sky); outline: none;
  box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}
table.edit-t input:hover, table.edit-t select:hover { border-color: var(--border-d); }
table.edit-t input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
table.edit-t tr:hover td { background: rgba(240,249,255,.5); }

.tbl-wrap { overflow-x: auto; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .65rem; padding: .5rem .75rem; background: var(--bg2); border-radius: var(--radius); border: 1px solid var(--border); }
.filters input[type=text], .filters input[type=search] { padding: .35rem .65rem; font-size: .85rem; border: 1px solid var(--border); border-radius: var(--radius); min-width: 200px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.filters input:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px rgba(56,189,248,.15); }
.inline { display: flex; align-items: center; gap: .4rem; }
.drop { min-width: 120px; }
.note-t { font-size: .85rem; }
.note-t td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--txt); color: #fff; padding: .55rem 1.3rem; border-radius: 8px;
  font-size: .87rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 999; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   PRINT  –  A4 portrait, professional Nepal financial statements
   ============================================================
   A4 = 210 × 297 mm.
   @page margins: top 12mm, bottom 12mm, left/right 18mm.
   Usable: 174 × 273 mm per page.
   Letterhead space (20mm) at start of each statement pushes
   first-page content to ~32mm from paper top edge — room for
   a pre-printed company letterhead. Continuation pages use
   the full 273mm height.

   Fonts:
     Prose / headings  →  Times New Roman  (formal serif)
     Tables / numbers  →  Calibri, Arial   (clean sans)
   ============================================================ */
@media print {
  /* --- base --- */
  html { font-size: 9pt; }
  body { background: #fff; color: #000; }

  /* --- hide UI chrome --- */
  .no-print, .topbar, #sidenav, .toolbar, .filters, .alert,
  .hero, .workflow, .stats-grid, .dash-grid, .panel-foot,
  .panel, .stat-card, .checks, .report-list { display: none !important; }
  #main { padding: 0; max-width: none; }

  /* --- A4 page --- */
  @page { size: A4 portrait; margin: 8mm 15mm 8mm 15mm; }

  /* --- letterhead reserved space ---
     Blank area for pre-printed company letterhead.
     Adjust height if your letterhead is taller/shorter. */
  .letterhead-space {
    display: block; height: 10mm;
    border: none; background: none;
    margin: 0 0 1mm 0; padding: 0;
  }
  .letterhead-space::after { content: none; }

  /* --- paper container --- */
  .paper {
    border: none; padding: 0; margin: 0; box-shadow: none; border-radius: 0;
    font-family: 'Times New Roman', 'Cambria', Georgia, serif;
    font-size: 8.5pt; line-height: 1.35;
  }
  .paper::before { display: none; }

  /* ==================== STATEMENT HEADER ==================== */
  .st-head {
    text-align: center; margin-bottom: 2mm; padding-bottom: 1.5mm;
    border-bottom: 0.5pt solid #999;
  }
  .st-head .st-icon { display: none; }
  .st-co {
    font-family: 'Times New Roman', serif;
    font-size: 11pt; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
  }
  .st-addr {
    font-family: 'Calibri', 'Arial', sans-serif;
    font-size: 7.5pt; color: #444; margin-top: 0;
  }
  .st-title {
    font-family: 'Times New Roman', serif;
    font-size: 10pt; font-weight: 700; color: #000;
    margin: 1.5mm 0 0.5mm; letter-spacing: .03em;
  }
  .st-title::after { background: #000; width: 20mm; height: 0.4pt; margin: 0.8mm auto 0; }
  .st-period {
    font-family: 'Calibri', 'Arial', sans-serif;
    font-size: 7.5pt; color: #333; margin-top: 0.5mm;
  }
  .st-cur {
    font-family: 'Calibri', 'Arial', sans-serif;
    font-size: 7pt; color: #555; margin-top: 0;
  }

  /* ==================== TABLES ==================== */
  table.st {
    font-family: 'Calibri', 'Arial', sans-serif;
    font-size: 8.5pt;
  }
  table.st th, table.st td { padding: 0.8mm 1.5mm; }
  table.st th {
    background: none !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    border-bottom: 1.5pt solid #000; border-top: 0.75pt solid #000;
    color: #000; font-size: 7.5pt;
    font-family: 'Calibri', 'Arial', sans-serif;
  }
  /* zebra off in print */
  table.st tbody tr.r-line:nth-child(even) td { background: none !important; }
  table.st .r-line:hover td { background: none !important; }
  table.st .r-line td { border-bottom: 0.25pt solid #ddd; }

  /* row types */
  table.st .r-h td {
    border-bottom: 0.5pt solid #999; padding-top: 1.8mm; padding-bottom: 0.6mm;
    font-size: 8.5pt; color: #000;
  }
  table.st .r-sub td { border-top: 0.5pt solid #999; padding-top: 0.8mm; }
  table.st .r-sectot td { border-top: 0.5pt solid #999; }
  table.st .r-tot td {
    border-top: 1.5pt solid #000; border-bottom: 2pt double #000;
    padding-top: 1mm; padding-bottom: 1mm; font-size: 8.5pt;
  }

  /* SOCE — extra compact for many equity columns */
  table.st.soce { font-size: 7pt; }
  table.st.soce th, table.st.soce td { padding: 0.8mm 1.2mm; }
  table.st.soce td.num, table.st.soce th.num { min-width: 0 !important; }

  /* wide tables (depreciation) */
  table.st.wide { font-size: 7.5pt; }
  table.st.wide th, table.st.wide td { padding: 0.8mm 1.5mm; }
  table.st.wide td.num { min-width: 0 !important; }

  /* overflow visible */
  .tbl-wrap { overflow: visible !important; }

  /* sub-headings */
  .sub-h { font-size: 8pt; margin: 1.5mm 0 0.5mm; font-family: 'Times New Roman', serif; }

  /* ==================== NOTES ==================== */
  .note-h {
    font-family: 'Times New Roman', serif;
    color: #000; font-size: 9pt; font-weight: 700;
    border-bottom: 0.5pt solid #bbb;
    margin: 2.5mm 0 1mm; padding-bottom: 0.5mm;
  }
  .note-sub {
    font-family: 'Times New Roman', serif;
    color: #000; font-size: 8.5pt; font-weight: 600;
    border-left: 1.5pt solid #999;
    margin: 1.5mm 0 1mm;
  }
  .note-block { break-inside: avoid; page-break-inside: avoid; }
  .policy-block { break-inside: avoid; page-break-inside: avoid; }
  p.note-p, .note-p, .paper p {
    font-family: 'Times New Roman', serif;
    font-size: 8pt; line-height: 1.4; margin: 0.5mm 0;
  }

  /* ==================== SIGNATURES ==================== */
  .signs { margin-top: 3mm; padding-top: 1.5mm; gap: 6mm; }
  .sign { break-inside: avoid; page-break-inside: avoid; }
  .sig-line { margin-top: 8mm; width: 32mm; border-top-width: 0.5pt; }
  .sig-name { font-family: 'Calibri', sans-serif; font-size: 7.5pt; }
  .sig-desg { font-family: 'Calibri', sans-serif; font-size: 7pt; }
  .sign-for {
    font-family: 'Times New Roman', serif; font-size: 9pt; font-weight: 700;
    margin-top: 3mm; padding-top: 1mm;
  }
  .aud-sign { margin-top: 4mm; padding-top: 2mm; border-top: 0.5pt solid #999; }
  .aud-sig { margin-top: 4mm; }
  .as-per-report { font-size: 8pt; font-weight: 600; }
  .sign-place { font-family: 'Calibri', sans-serif; font-size: 7pt; margin-top: 1.5mm; }
  .stmt-sep { margin: 2mm 0; border-top: 0.5pt solid #999; }

  /* ==================== AUDITOR REPORT ==================== */
  .aud {
    font-family: 'Times New Roman', serif;
    font-size: 8.5pt; line-height: 1.4;
  }
  .aud h3 {
    font-family: 'Times New Roman', serif;
    color: #000; font-size: 9pt; font-weight: 700;
    border-bottom: 0.5pt solid #bbb;
    margin: 2mm 0 1mm; padding-bottom: 0.5mm;
  }
  .aud h4 { font-size: 8.5pt; margin: 1.5mm 0 0.5mm; }
  .aud p { font-size: 8.5pt; line-height: 1.4; margin: 0.8mm 0; }
  .aud li { font-size: 8.5pt; line-height: 1.35; margin: 0.5mm 0; }

  /* titles always black */
  .st-title { color: #000; }
  .st-title::after { background: #000; }
  .st-head { border-bottom-color: #999; }

  /* justified prose */
  p, .aud p, .note-p, .aud li { text-align: justify; text-justify: inter-word; }

  /* table header repeat on every printed page */
  table.st thead { display: table-header-group; }
  table.st tr { break-inside: avoid; page-break-inside: avoid; }
  table.st .r-tot, table.st .r-sub { break-inside: avoid; page-break-inside: avoid; }

  /* small / muted text */
  .small { font-size: 7pt; }
  .muted { font-size: 7pt; }

  /* KAM table */
  table.kam { font-size: 8pt; }
  table.kam th { font-size: 7pt; padding: 1.5mm; }
  table.kam td { padding: 2mm; line-height: 1.4; font-size: 8pt; }

  /* ==================== IRD FORMS ==================== */
  .ird-sn { width: 8mm; font-size: 7pt; }
  table.ird-meta { font-size: 8pt; background: none !important; border-color: #999; }
  table.ird-meta td { padding: 1.5mm 3mm; border-color: #ccc; }
  table.ird-meta td:nth-child(odd) { color: #000; }

  /* note-t (detail tables in notes) */
  .note-t { font-size: 8.5pt; }
  .note-t th { font-size: 7.5pt; }

  /* ---- Nepali print fonts ---- */
  html[lang="ne"] .paper {
    font-family: 'Kokila', 'Kalimati', 'Mangal', 'Noto Serif Devanagari', serif;
    font-size: 9.5pt; line-height: 1.5;
  }
  html[lang="ne"] .st-co {
    font-family: 'Kokila', 'Kalimati', 'Mangal', serif;
    font-size: 12.5pt;
  }
  html[lang="ne"] .st-title {
    font-family: 'Kokila', 'Kalimati', 'Mangal', serif;
    font-size: 11pt;
  }
  html[lang="ne"] table.st,
  html[lang="ne"] table.st th {
    font-family: 'Kalimati', 'Kokila', 'Mangal', 'Noto Sans Devanagari', sans-serif;
    font-size: 9pt;
  }
  html[lang="ne"] table.st th { font-size: 8pt; }
  html[lang="ne"] table.st.soce { font-size: 7.5pt; }
  html[lang="ne"] .aud,
  html[lang="ne"] .note-h,
  html[lang="ne"] .note-sub,
  html[lang="ne"] p.note-p,
  html[lang="ne"] .aud p {
    font-family: 'Kokila', 'Kalimati', 'Mangal', serif;
    font-size: 9.5pt;
  }
  html[lang="ne"] .sig-name,
  html[lang="ne"] .sig-desg,
  html[lang="ne"] .st-addr,
  html[lang="ne"] .st-period,
  html[lang="ne"] .st-cur {
    font-family: 'Kalimati', 'Kokila', 'Mangal', sans-serif;
  }
}

/* full-set print mode */
body.print-all .layout { display: none !important; }
body.print-all #printArea { display: block !important; }
#printArea { display: none; }
#printArea .print-sec { break-before: page; page-break-before: always; }
#printArea .print-sec:first-child { break-before: auto; page-break-before: auto; }

/* ============================================================
   ADJUSTMENT JOURNAL
   ============================================================ */
.adj-card { overflow: hidden; }
.adj-card.adj-unbal { border-color: var(--danger); box-shadow: 0 0 0 1px rgba(185,28,28,.12); }
.adj-card .tbl-wrap { margin-top: .4rem; }
.adj-card tfoot td { font-weight: 600; background: var(--bg2); }

.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  line-height: 1.4; white-space: nowrap;
}
.badge.ok { background: #ecfdf5; color: #047857; }
.badge.warn { background: #fef2f2; color: #b91c1c; }
.badge.info { background: #eff6ff; color: #1d4ed8; }
.badge.muted { background: var(--bg2); color: var(--txt3); }

.adj-card .list .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- ASSET REGISTER ---------- */
/* -- asset category card -- */
.asset-cat { border: 1px solid var(--border); border-radius: 8px; margin-bottom: .6rem; background: var(--bg); overflow: hidden; }
.asset-cat-head {
  display: flex; align-items: center; gap: .35rem; padding: .35rem .6rem;
  border-bottom: 1px solid var(--border); background: var(--bg2);
}
.asset-cat-num { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--sky); color: #fff; font-size: .65rem; font-weight: 700; flex-shrink: 0; }
.asset-cat-name { font-weight: 600; font-size: .88rem; border: none; background: transparent; padding: .15rem .3rem; flex: 1; min-width: 0; color: var(--txt); }
.asset-cat-name:focus { outline: 1.5px solid var(--sky); border-radius: 3px; background: var(--bg); }
.asset-cat-body { padding: .5rem .6rem; }

/* -- category settings row -- */
.asset-cat-settings { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 1px dashed var(--border); }
.asset-cat-settings label { display: flex; flex-direction: column; }
.asset-cat-settings small { font-size: .6rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .02em; line-height: 1.7; }
.asset-cat-settings input, .asset-cat-settings select { font-size: .82rem; padding: .2rem .3rem; }
.asset-cat-settings input[type="number"] { width: 7rem; text-align: right; font-variant-numeric: tabular-nums; }
.asset-cat-settings .w4 { width: 3.5rem; }
.asset-cat-settings .w5 { width: 5rem; }
.asset-cat-settings .w6 { width: 7rem; }

/* -- flat fields (legacy, no items) -- */
.asset-flat-fields { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: .35rem; }
.asset-flat-fields label { display: flex; flex-direction: column; }
.asset-flat-fields small { font-size: .6rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .02em; line-height: 1.7; }
.asset-flat-fields input { font-size: .82rem; padding: .2rem .3rem; width: 7rem; text-align: right; font-variant-numeric: tabular-nums; }

/* -- items list -- */
.asset-items-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .35rem; }
.asset-item { border: 1px solid var(--border); border-radius: 6px; background: var(--bg); overflow: hidden; }
.asset-item-head { display: flex; align-items: center; gap: .3rem; padding: .2rem .4rem; background: var(--bg2); border-bottom: 1px solid var(--border); }
.asset-item-name { font-size: .8rem; font-weight: 500; border: none; background: transparent; padding: .1rem .2rem; flex: 1; min-width: 0; color: var(--txt); }
.asset-item-name:focus { outline: 1px solid var(--sky); border-radius: 3px; background: var(--bg); }
.asset-item-name::placeholder { color: var(--txt3); font-weight: 400; }
.asset-item-nbv { font-size: .72rem; color: var(--sky-d); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.asset-item-body { padding: .3rem .4rem; }
.asset-item-fields { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: .25rem; }
.asset-item-fields label { display: flex; flex-direction: column; }
.asset-item-fields small { font-size: .58rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .02em; line-height: 1.7; }
.asset-item-fields input[type="number"] { font-size: .8rem; padding: .15rem .25rem; width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.asset-item-dep { display: flex; flex-direction: column; }
.asset-item-dep small { font-size: .58rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .02em; line-height: 1.7; }
.asset-item-dep b { font-size: .8rem; color: var(--sky-d); font-variant-numeric: tabular-nums; }

/* -- category actions -- */
.asset-cat-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin: .35rem 0 .1rem; }

/* -- category summary footer -- */
.asset-cat-summary {
  display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding-top: .35rem; margin-top: .35rem;
  border-top: 1px solid var(--border); font-size: .75rem; color: var(--txt2); font-variant-numeric: tabular-nums;
}
.asset-cat-summary b { color: var(--txt); }

/* fields as a flat table row — each cell sizes to content (legacy compat) */
.asset-fields { border-collapse: collapse; margin-bottom: .3rem; }
.asset-fields td { padding: 0 .4rem 0 0; vertical-align: top; white-space: nowrap; }
.asset-fields small { display: block; font-size: .6rem; color: var(--txt3); text-transform: uppercase; letter-spacing: .02em; line-height: 1.7; }
.asset-fields input, .asset-fields select { font-size: .82rem; padding: .2rem .3rem; }
.asset-fields input[type="number"] { width: 7rem; text-align: right; font-variant-numeric: tabular-nums; }
.asset-fields .w4 { width: 3.5rem; }
.asset-fields .w5 { width: 5rem; }
.asset-fields .w6 { width: 7rem; }

/* -- additions / disposals — inline flow -- */
.asset-txn-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem .6rem; margin-bottom: .2rem; }
.asset-txn-row > .btn { font-size: .75rem; padding: .15rem .5rem; align-self: center; }
.asset-txn { margin-bottom: .15rem; }
.asset-txn table.compact { margin: 0; border-collapse: collapse; font-size: .8rem; }
.asset-txn table.compact th { font-size: .62rem; padding: 1px 4px; text-transform: uppercase; color: var(--txt3); letter-spacing: .02em; font-weight: 600; border-bottom: 1px solid var(--border); background: none; }
.asset-txn table.compact td { padding: 1px 3px; }
.asset-txn table.compact input[type="date"] { width: 7.5rem; font-size: .8rem; padding: .15rem .2rem; }
.asset-txn table.compact input[type="number"] { width: 5rem; font-size: .8rem; padding: .15rem .2rem; text-align: right; }

/* -- auto-dep footer -- */
.asset-auto { font-size: .72rem; color: var(--txt3); padding-top: .2rem; border-top: 1px dashed var(--border); font-variant-numeric: tabular-nums; }
/* -- PPE schedule table -- */
.asset-schedule { table-layout: fixed; }
.asset-schedule .part { white-space: nowrap; width: 14rem; }
.asset-schedule th.num { text-align: center; vertical-align: bottom; }
.asset-schedule th small { display: block; font-weight: 400; color: var(--txt3); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #sidenav { width: 190px; }
  #main { padding: .85rem; }
  .grid2, .grid3, .grid4, .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .full { grid-column: 1; }
  .topbar { flex-wrap: wrap; }
  .paper { padding: 1rem; }
  .hero { flex-direction: column; text-align: center; padding: 1.2rem; }
  .hero-mini { display: none; }
  .hero-badges { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .workflow { flex-wrap: wrap; }
  .wf-step::after { display: none; }
  table.map-t { table-layout: auto; }
  table.map-t th, table.map-t td { padding: .25rem .3rem; font-size: .8rem; }
  .mbca-company-grid { grid-template-columns: 1fr; }
  .asset-cat-settings { gap: .3rem .5rem; }
  .asset-cat-settings input[type="number"] { width: 5.5rem; }
  .asset-item-fields input[type="number"] { width: 5.5rem; }
  .coop-input-table { min-width: 600px; }
}
@media (max-width: 560px) {
  .layout { flex-direction: column; }
  #sidenav { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; padding: .5rem; gap: 0; }
  #sidenav .nav-g { width: 100%; padding: .3rem .5rem; }
  #sidenav .nav-n { padding: .3rem .6rem; border-left: none; border-bottom: 2px solid transparent; font-size: .8rem; }
  #sidenav .nav-n.active { border-bottom-color: var(--sky-d); }
  #sidenav .nav-n svg { display: none; }
  .asset-cat-head { flex-wrap: wrap; }
  .asset-flat-fields { gap: .2rem .5rem; }
  .asset-flat-fields input { width: 5.5rem; }
  .asset-txn-row { gap: .2rem .4rem; }
  .asset-txn table.compact input[type="date"] { width: 6rem; }
  .asset-txn table.compact input[type="number"] { width: 4rem; }
  .mbca-card .grid2 { grid-template-columns: 1fr; }
}
/* Cooperative preparation schedules; printed notes use the standard statement styles. */
.coop-year { margin: 1.25rem 0; }
.coop-input-table { min-width: 900px; }
.coop-input-table input:not([type="checkbox"]), .coop-input-table select { min-width: 110px; width: 100%; }
.coop-input-table td:first-child { min-width: 210px; }
.coop-input-table td:first-child input + input { margin-top: 4px; }
.coop-input-table td:first-child .small-input { font-size: .78rem; opacity: .7; padding: 3px 6px; }
.coop-input-table td:first-child .small-input:focus { opacity: 1; }
.cooperative-stale { border-left: 4px solid #b45309; padding: 12px 16px; background: #fffbeb; color: #78350f; font-weight: 600; }

/* ---- MBCA Link ---- */
.mbca-card { border-left: 3px solid var(--sky); }
.mbca-card h3 { margin-bottom: .25rem; }
.mbca-section { margin-top: .75rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.mbca-section h4 { font-size: .85rem; margin-bottom: .5rem; }
.mbca-company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem; }
.mbca-company-btn {
  display: flex; flex-direction: column; gap: .15rem; padding: .5rem .7rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
  cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s;
}
.mbca-company-btn:hover { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }
.mbca-company-btn.selected { border-color: var(--sky); background: var(--sky-l); box-shadow: 0 0 0 2px var(--sky); }
.mbca-company-btn strong { font-size: .85rem; }
.mbca-company-btn small { font-size: .72rem; color: var(--txt3); }

.coop-toggle { display: inline-flex; align-items: center; gap: .65rem; margin: .5rem 0; cursor: pointer; }
.coop-toggle input[type="checkbox"] { width: auto; margin: 0; }
.readiness-list { display: grid; gap: .65rem; }
.readiness-item { display: flex; align-items: center; gap: 1rem; padding: .8rem; border: 1px solid var(--border); border-left: 4px solid #b45309; border-radius: 6px; }
.readiness-item[data-level="error"] { border-left-color: #b91c1c; }
.readiness-item p { flex: 1; margin: 0; }
@media(max-width:600px) { .readiness-item { flex-wrap:wrap; } .readiness-item p { flex-basis:70%; } }
/* Preparation workbench: keyboard entry, review conversations and report pack. */
.entry-tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.entry-error { display:block; color:#b42318; font-size:12px; line-height:1.4; margin:5px 0; max-width:300px; white-space:normal; }
[aria-invalid="true"] { border-color:#b42318!important; box-shadow:0 0 0 2px #fee4e2; }
.entry-duplicate { margin-left:4px; }
#main .map-t th:last-child, #main .map-t td.mapping-actions { width:108px; min-width:108px; }
#main .mapping-actions .btn { width:28px; min-width:28px; padding:4px; margin:2px; }
#main .mapping-actions .action-icon { width:17px; height:17px; }
.review-message { padding:14px 0; border-bottom:1px solid #e2e8f0; }
.review-message p { white-space:normal; overflow-wrap:anywhere; margin:8px 0; }
.review-thread textarea { min-height:76px; }
.history-batch { border-top:1px solid #dce3ed; padding:14px 0; }
.history-batch summary { cursor:pointer; font-weight:600; }
.history-batch pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; max-width:420px; max-height:240px; overflow:auto; }
.member-editor table { min-width:2400px; }
.member-editor td input,.member-editor td select { min-width:130px; }
.member-editor td:nth-child(2) input { min-width:210px; }
.pack-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; }
.pack-options label { display:flex; align-items:center; gap:8px; }
.report-pack-preview .print-sec { margin:24px 0; }
.pack-cover { min-height:900px; display:flex; flex-direction:column; justify-content:space-between; text-align:center; padding:70px; }
.pack-cover h1 { font-size:34px; margin:24px 0; }
.pack-cover footer { border-top:1px solid #91a4bf; padding-top:22px; }
.pack-contents ol { list-style:none; padding:0; }
.pack-contents li a { display:flex; gap:22px; padding:17px 0; border-bottom:1px solid #dce3ed; text-decoration:none; color:inherit; }
.pack-contents li span { color:#64748b; font-variant-numeric:tabular-nums; }
.note-topic h3 .btn,.note-topic h4 .btn { float:right; font-family:inherit; }
@media print {
  .entry-tools,.entry-error,.entry-duplicate,.mbca-card { display:none!important; }
  .pack-cover { min-height:245mm!important; height:auto; padding:12mm 0!important; page:portrait; }
  .pack-contents { break-after:page; }
  .pack-contents a { color:#111!important; text-decoration:none!important; }
  .pack-contents a::after { content:none!important; }
  .member-report { page:mappingLandscape; break-before:page; }
  .member-report table { font-size:8.5pt; }
  .member-report tr { break-inside:avoid; }
}
