/* PIM — Property & Inventory Management, Municipal Government of Candoni
   Green sidebar (collapses to an icon rail) and green header with a gold rule; light content pages with KPI cards
   and compact tables, in the municipal green and gold. Inter throughout, Plus Jakarta
   Sans for the brand mark. Light theme only. */
:root {
  /* neutrals (slightly warm) */
  --ink: #20364c; --ink-2: #243b50; --text: #243b50; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-2: #cbd5e1; --bg: #f8fafc; --card: #ffffff; --hover: #f1f5f9; --sunken: #f1f5f9; --side-bg: #fbfcfd;
  /* brand — the CBO palette (Candoni Financial Management System): deep navy shell, steel blue actions, teal accent,
     sand for the warm touch. The --green / --gold names are kept from the first design: green = the navy family,
     gold = the teal accent. */
  --green: #20364c; --green-2: #284e64; --green-3: #3e6a80; --green-line: #355f74; --green-muted: #8eb0be; --green-text: #d9e6eb; --green-soft: #eef4f6;
  --sb-bg: #36536e; --sb-line: #4a6782; --sb-ink: #ffffff; --sb-text: #e2eaf2; --sb-muted: #a9bed2; --sb-hover: rgba(255,255,255,.09); --sb-active: rgba(255,255,255,.17); --sb-blue: #9cc8f0;
  --gold: #558b8c; --gold-2: #457273; --gold-ink: #3a5f60; --gold-soft: #eef6f5; --gold-soft-2: #b9dbdb;
  --primary: #3e6a80; --primary-2: #335869; --sand: #edd0a9; --clay: #cf8c6e;
  /* status */
  --ok: #457273; --ok-bg: #eef6f5; --warn: #835500; --warn-bg: #fcf0d4; --bad: #b32525; --bad-bg: #fbe7e5;
  --info: #2a4f87; --info-bg: #e7eef8; --neutral-bg: #f1f5f9;
  /* shape */
  --radius: 12px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg: 0 24px 64px -12px rgba(22,38,54,.28), 0 8px 20px -8px rgba(22,38,54,.18);
  --ring: 0 0 0 3px rgba(85,139,140,.32);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  --top: 60px; --side: 264px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 650; margin: 0 0 .5rem; color: var(--ink); letter-spacing: -.015em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.025em; } h2 { font-size: 1.22rem; } h3 { font-size: 1rem; font-weight: 600; } h4 { font-size: .93rem; font-weight: 600; }
p { margin: 0 0 .8rem; }
a { color: var(--green-3); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .87rem; } .xs { font-size: .79rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono, .num, td.right, th.right, .stat .n { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
ul { padding-left: 1.2rem; }
::selection { background: var(--gold-soft-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 36px; padding: .4rem .95rem; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-weight: 550; font-size: .875rem; white-space: nowrap; color: var(--ink); line-height: 1.25; box-shadow: 0 1px 1px rgba(15,23,42,.04);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .08s; }
.btn:hover { background: var(--hover); border-color: #94a3b8; }
.btn:active:not(:disabled) { transform: translateY(1px); }
a.btn { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 1px 2px rgba(32,54,76,.2); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ok:hover { background: #3a5f60; }
.btn.danger { color: var(--bad); border-color: #ebc6c2; }
.btn.danger:hover { background: var(--bad-bg); border-color: #e0aaa5; }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.danger.solid:hover { background: #962020; }
.btn.sm { min-height: 30px; padding: .25rem .65rem; font-size: .8rem; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--sunken); }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--green-3); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }

/* Forms */
label { display: block; font-size: .82rem; font-weight: 550; color: var(--ink-2); margin-bottom: .3rem; }
.req::after { content: " *"; color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=tel], input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; padding: .45rem .75rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; min-height: 38px; box-shadow: 0 1px 1px rgba(15,23,42,.03); transition: border-color .15s, box-shadow .15s; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
select { appearance: none; padding-right: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7rem center; }
textarea { min-height: 88px; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background-color: var(--sunken); color: #64748b; cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; vertical-align: -3px; accent-color: var(--green-3); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; font-weight: 500; color: var(--text); }
.grid { display: grid; gap: .9rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2, .span3 { grid-column: auto; } }
.field-err { color: var(--bad); font-size: .82rem; margin-top: .25rem; }
.form-msg { font-size: .88rem; margin-top: .6rem; }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--bad); } .form-msg.ok { color: var(--ok); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem 1.1rem; margin: 0 0 1rem; background: #fff; }
legend { font-weight: 600; font-size: .78rem; padding: 0 .4rem; color: var(--ink); }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.card > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s var(--ease); flex: none; }
details.card[open] > summary::before { transform: rotate(45deg); }
details.card > summary::-webkit-details-marker { display: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; }
.card > h3:first-child { margin-bottom: .9rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--muted); max-width: 76ch; font-size: .92rem; }

/* Key figures (stat cards: label, then the figure) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.stat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; text-decoration: none; color: inherit; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .35rem; overflow: hidden; }
.stat .n { font-size: 1.45rem; font-weight: 650; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat .l { font-size: .82rem; color: var(--muted); line-height: 1.3; font-weight: 500; }
a.stat { transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: var(--line-2); box-shadow: 0 4px 14px -6px rgba(15,23,42,.14); }
.stat.alert .n { color: var(--bad); } .stat.alert { border-color: #efc7c3; }
.card .stats .stat { box-shadow: none; background: var(--side-bg); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } .kpi { padding: .75rem .8rem; } .kpi .v { font-size: .95rem; overflow-wrap: normal; } .kpi .top { font-size: .76rem; } .kpi .top svg { display: none; } }
.kpi { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.15rem 1.05rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.kpi:hover { border-color: var(--line-2); box-shadow: 0 4px 14px -6px rgba(15,23,42,.14); }
.kpi .top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .84rem; font-weight: 550; color: var(--ink-2); }
.kpi .top svg { width: 18px; height: 18px; color: var(--faint); flex: none; }
.kpi:hover .top svg { color: var(--gold-2); }
.kpi .v { font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.kpi .h { font-size: .76rem; color: var(--muted); }

/* Home */
.home-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.home-head h1 { font-size: 1.6rem; margin: 0; }
.home-head p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
.home-head .avatar.lg { width: 52px; height: 52px; font-size: 1.05rem; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold-soft-2); }
.home { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 1080px) { .home { grid-template-columns: minmax(0, 1fr); } }
.inbox { list-style: none; margin: 0 -.5rem; padding: 0; }
.inbox li { display: flex; align-items: center; gap: .9rem; padding: .7rem .5rem; border-radius: 10px; transition: background .15s; }
.inbox li + li { border-top: 1px solid var(--line); }
.inbox li a { text-decoration: none; color: inherit; display: contents; }
.inbox .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); display: grid; place-items: center; flex: none; }
.inbox .ic svg { width: 20px; height: 20px; }
.inbox .ic.red { background: var(--bad-bg); color: var(--bad); } .inbox .ic.blue { background: var(--info-bg); color: var(--info); } .inbox .ic.green { background: var(--ok-bg); color: var(--ok); }
.inbox .t { flex: 1; min-width: 0; }
.inbox .t b { font-weight: 600; display: block; color: var(--ink); }
.inbox .t span { font-size: .83rem; color: var(--muted); }
.inbox .n { font-weight: 600; font-variant-numeric: tabular-nums; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; padding: .1rem .55rem; font-size: .85rem; min-width: 2rem; text-align: center; }
.inbox li:hover { background: var(--hover); }
.inbox li:hover .n { background: var(--gold); color: var(--green); }
.glance { list-style: none; margin: 0; padding: 0; }
.glance li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; font-size: .92rem; }
.glance li + li { border-top: 1px solid var(--line); }
.glance li span { color: var(--muted); }
.glance li b { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.glance a { color: inherit; text-decoration: none; }
.glance a:hover span { color: var(--green-3); text-decoration: underline; }
.upcoming { list-style: none; margin: 0; padding: 0; }
.upcoming li { padding: .55rem 0; font-size: .9rem; }
.upcoming li + li { border-top: 1px solid var(--line); }
.upcoming .when { font-size: .78rem; color: var(--muted); display: block; }
.search-card { padding: .9rem; position: relative; }
.search-card input[type=search] { width: 100%; font-size: .95rem; min-height: 44px; padding: .65rem 1rem .65rem 2.7rem; border-radius: 10px; background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 1rem center; }
.search-card input[type=search]:focus { background-color: #fff; }
.search-hits:empty { display: none; }
.search-hits { padding: .2rem .3rem .3rem; }
.search-hits h4 { margin: .9rem 0 .25rem; font-size: .76rem; font-weight: 600; color: var(--muted); }
.search-hits a { display: block; padding: .45rem .6rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-hits a:hover, .search-hits a:focus-visible { background: var(--green-soft); }
.search-hits a b { color: var(--green); }

.rep-menu .btn { white-space: normal; text-align: left; justify-content: flex-start; line-height: 1.3; width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.1rem; }
.split.rep-split { grid-template-columns: 270px minmax(0, 1fr); }
@media (max-width: 1080px) { .split, .split.rep-split { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.3rem; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

/* Tables */
.table-tools { display: flex; gap: .65rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .9rem; }
.table-tools > .grow { flex: 1; min-width: 200px; }
.table-tools > div { min-width: 140px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.card > .table-wrap:only-child, .card > div > .table-wrap { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 550; border-bottom: 1px solid var(--line); padding: .6rem .75rem; white-space: nowrap; height: 40px; }
.table-wrap thead th { background: var(--side-bg); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: " ↕"; color: #cbd5e1; }
th.asc::after { content: " ↑"; color: var(--gold-ink); } th.desc::after { content: " ↓"; color: var(--gold-ink); }
td { border-bottom: 1px solid var(--line); padding: .6rem .75rem; vertical-align: middle; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td { background: var(--side-bg); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--green-soft) !important; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); background: var(--side-bg); color: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .8rem .2rem 0; font-size: .85rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.loading { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.loading::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Badges and notices */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 6px; font-size: .74rem; font-weight: 600; white-space: nowrap; background: var(--sunken); color: #475569; border: 1px solid var(--line); line-height: 1.5; text-decoration: none; }
.b-ok { background: var(--ok-bg); color: var(--ok); border-color: #b9dbdb; } .b-warn { background: var(--warn-bg); color: var(--warn); border-color: #f0dcae; }
.b-bad { background: var(--bad-bg); color: var(--bad); border-color: #efc7c3; } .b-info { background: var(--info-bg); color: var(--info); border-color: #c9d7ee; }
.b-gold { background: var(--gold-soft); color: var(--gold-ink); border-color: var(--gold-soft-2); } .b-dark { background: var(--green); color: #fff; border-color: var(--green); }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.notice { padding: .75rem 1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1rem; border: 1px solid transparent; border-left-width: 3px; }
.notice.info { background: var(--info-bg); color: #1d3a63; border-color: #c9d7ee; border-left-color: var(--info); }
.notice.warn { background: var(--warn-bg); color: #5f3f00; border-color: #f0dcae; border-left-color: #c48a12; }
.notice.bad { background: var(--bad-bg); color: #7a2020; border-color: #efc7c3; border-left-color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: #304e4f; border-color: #b9dbdb; border-left-color: var(--ok); }
.notice a { color: inherit; font-weight: 600; }

/* Avatar */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--gold-soft-2); color: var(--gold-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; overflow: hidden; font-size: .9rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.8rem; }
.avatar.sm { width: 34px; height: 34px; font-size: .76rem; }

/* Auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); background: var(--bg); }
.auth-hero { color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 3rem 3.2rem; min-height: 280px;
  background: radial-gradient(90% 70% at 100% 0%, rgba(85,139,140,.35) 0%, rgba(85,139,140,0) 55%), radial-gradient(70% 60% at 0% 100%, rgba(53,95,116,.7) 0%, rgba(53,95,116,0) 60%), linear-gradient(160deg, #284e64 0%, #162636 100%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: linear-gradient(rgba(255,255,255,.9) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .top { display: flex; align-items: center; gap: .9rem; }
.auth-hero .seal { width: 64px; height: 64px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.auth-hero .lgu { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-muted); line-height: 1.4; }
.auth-hero .lgu b { display: block; color: #fff; font-family: var(--display); font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.auth-hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: .6rem; max-width: 16ch; }
.auth-hero h1 em { font-style: normal; color: var(--gold); }
.auth-hero h1 .pim { display: block; font-size: 3.4rem; letter-spacing: .02em; color: var(--sand); line-height: 1; margin-bottom: .35rem; }
.auth-hero h1 em { color: var(--gold-soft-2); }
.auth-hero .sub { color: #d5e5da; margin: 0 0 1.4rem; max-width: 54ch; font-size: 1.02rem; }
.auth-hero .feats { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.2rem; max-width: 560px; }
.auth-hero .feats li { display: flex; gap: .55rem; align-items: flex-start; color: #e8f1eb; font-size: .9rem; }
.auth-hero .feats svg { width: 18px; height: 18px; color: var(--gold); flex: none; margin-top: 2px; }
.pillars { display: flex; gap: 1.4rem; flex-wrap: wrap; letter-spacing: .22em; font-size: .74rem; font-weight: 700; color: var(--gold); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.4rem; }
.auth-box { width: 100%; max-width: 430px; }
.auth-panel .auth-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2rem 2rem 1.6rem; box-shadow: var(--shadow-lg); }
.auth-box.wide { max-width: 740px; }
.public-tag { max-width: 520px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem 1.6rem 1.4rem; box-shadow: var(--shadow-lg); }
.public-tag .pt-head { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.public-tag .pt-head img { width: 48px; height: 48px; }
.public-tag .pt-head b { display: block; color: var(--green); font-size: 1.2rem; font-weight: 800; }
.public-tag .pt-head span { font-size: .78rem; color: var(--muted); }
.auth-box h2 { margin-bottom: .25rem; font-size: 1.6rem; }
.gbtn { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .7rem; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-weight: 600; transition: background .15s, border-color .15s, box-shadow .15s; }
.gbtn:hover { background: var(--hover); border-color: #94a3b8; box-shadow: var(--shadow); }
.auth-box .btn.primary.block { min-height: 46px; border-radius: 12px; font-size: .95rem; }
.or { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .8rem; margin: 1.1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-links { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; font-size: .88rem; }
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(60% 50% at 50% 0%, rgba(85,139,140,.12), transparent 70%), var(--bg); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 1.6rem 1.4rem; min-height: 0; gap: 1rem; }
  .auth-hero h1 { font-size: 1.6rem; } .auth-hero .feats, .auth-hero .sub, .pillars { display: none; }
  .auth-panel { padding: 1.2rem 1rem 2rem; } .auth-panel .auth-box { padding: 1.5rem 1.2rem; box-shadow: var(--shadow); }
}

/* Shell: green sidebar (collapses to an icon rail) and green header with a gold rule */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sb-bg); color: var(--sb-text); border-right: 1px solid var(--sb-line); z-index: 25;
  transition: width .24s cubic-bezier(.23, 1, .32, 1); overflow: hidden; }
.side-brand { display: flex; align-items: center; gap: .7rem; height: var(--top); padding: 0 1rem; background: var(--sb-bg); box-shadow: inset 0 -2px 0 var(--sb-blue); text-decoration: none; flex: none; }
.side-brand .seal { width: 34px; height: 34px; flex: none; }
.side-brand .brand { line-height: 1.15; min-width: 0; white-space: nowrap; }
.side-brand .brand b { display: block; color: var(--sb-ink); font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.side-brand .brand span { color: var(--sb-muted); font-size: .72rem; }
.side .fund { padding: .9rem .75rem .5rem; flex: none; border-bottom: 1px solid var(--sb-line); }
.side .fund label { color: var(--sb-muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; padding-left: .2rem; }
.fund-select { width: 100%; min-height: 38px; font-weight: 600; font-size: .87rem; padding: .3rem 2rem .3rem .75rem; color: var(--sb-ink); border: 1px solid var(--sb-line) !important; background-color: rgba(255,255,255,.08) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239cc8f0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important; }
.fund-select:hover { border-color: var(--sb-muted) !important; }
.fund-select:focus { border-color: var(--sb-blue) !important; }
.fund-select option { color: var(--ink); background: #fff; }
.side-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: var(--sb-line) transparent; }
.side .group { color: var(--sb-muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; padding: 1rem .6rem .4rem; font-weight: 700; white-space: nowrap; }
.side-nav a { display: flex; align-items: center; gap: .65rem; color: var(--sb-text); text-decoration: none; padding: .45rem .6rem; min-height: 38px; border-radius: 9px; font-size: .88rem; margin-bottom: 2px; font-weight: 500; position: relative; white-space: nowrap;
  transition: background .15s, color .15s; }
.side-nav a .nav-ic { width: 18px; height: 18px; flex: none; opacity: .75; }
.side-nav a .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-nav a:hover { background: var(--sb-hover); color: var(--sb-ink); }
.side-nav a:hover .nav-ic { opacity: 1; }
.side-nav a.active { background: var(--sb-active); color: #fff; font-weight: 650; }
.side-nav a.active::before { content: ""; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--sb-blue); }
.side-nav a.active .nav-ic { color: #fff; opacity: 1; }
.side .count { background: var(--bad); color: #fff; font-size: .7rem; border-radius: 99px; padding: .05rem .48rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.side-nav a.active .count { background: #fff; color: var(--sb-bg); }
.side-foot { flex: none; display: flex; align-items: center; gap: .4rem; padding: .7rem .75rem; border-top: 1px solid var(--sb-line); }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; font-size: .84rem; padding: .3rem .4rem; color: var(--sb-ink); border-radius: 9px; text-decoration: none; }
a.me:hover { background: var(--sb-hover); color: var(--sb-ink); }
.me .who { min-width: 0; } .me .who div { line-height: 1.25; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .role { color: var(--sb-muted); font-size: .72rem; font-weight: 600 !important; }
.icon-btn { position: relative; background: none; border: 1px solid transparent; color: #f1f5f2; border-radius: 9px; height: 38px; min-width: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .5rem; transition: background .15s, border-color .15s; flex: none; }
.icon-btn:hover { background: var(--green-2); border-color: var(--green-line); }
.icon-btn svg { width: 19px; height: 19px; }
.side .avatar { background: var(--sb-active); color: #fff; }
.side .icon-btn { color: var(--sb-text); } .side .icon-btn:hover { background: var(--sb-hover); border-color: var(--sb-line); color: #fff; }
.inset { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; height: var(--top); padding: 0 1.5rem 0 1rem; background: #fff; color: var(--ink); box-shadow: inset 0 -1px 0 var(--line), 0 2px 10px rgba(15,23,42,.05); }
.topbar .icon-btn { color: var(--ink); } .topbar .icon-btn:hover { background: var(--hover); border-color: var(--line); }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.back-btn { gap: .3rem; font-size: .86rem; font-weight: 600; padding: 0 .7rem 0 .45rem; color: var(--ink); background: #fff; border-color: var(--line-2); }
@media (max-width: 900px) { .back-btn span { display: none; } }
.crumbs { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); min-width: 0; padding-left: .75rem; margin-left: .25rem; border-left: 1px solid var(--line-2); height: 22px; }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs span { white-space: nowrap; } .crumbs .sep { color: var(--line-2); }
.fund-chip { font-size: .78rem; font-weight: 700; color: var(--green); background: var(--sand); border-radius: 6px; padding: .18rem .6rem; white-space: nowrap; }
.main { flex: 1; width: 100%; max-width: 1360px; padding: 1.75rem 2rem 3.5rem; animation: page-in .22s var(--ease); }
/* collapsed: icon rail */
body.side-collapsed { --side: 68px; }
body.side-collapsed .side-brand { padding: 0; justify-content: center; }
body.side-collapsed .side-brand .brand, body.side-collapsed .side .fund, body.side-collapsed .side-nav a .lbl, body.side-collapsed .me .who { display: none; }
body.side-collapsed .side .group { font-size: 0; padding: .5rem 0; margin: .4rem .5rem 0; border-top: 1px solid var(--sb-line); }
body.side-collapsed .side .nav-group:first-child .group { border-top: 0; }
body.side-collapsed .side-nav { padding: .6rem .6rem 1rem; }
body.side-collapsed .side-nav a { justify-content: center; padding: .45rem 0; }
body.side-collapsed .side-nav a.active::before { left: -.6rem; }
body.side-collapsed .side .count { position: absolute; top: 2px; right: 2px; font-size: .62rem; padding: 0 .3rem; }
body.side-collapsed .side-foot { flex-direction: column; padding: .6rem .4rem; }
body.side-collapsed .me { flex: none; padding: .2rem; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.scrim { display: none; }
@media (max-width: 900px) {
  body, body.side-collapsed { --side: 272px; }
  .topbar .menu-btn { display: inline-flex; } .topbar .collapse-btn { display: none; }
  .side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: 8px 0 32px rgba(0,0,0,.18); z-index: 40; }
  body.side-collapsed .side-brand { padding: 0 1rem; justify-content: flex-start; }
  .side { box-shadow: 8px 0 32px rgba(0,0,0,.3); }
  body.side-collapsed .side-brand .brand, body.side-collapsed .side-nav a .lbl, body.side-collapsed .me .who { display: block; }
  body.side-collapsed .side .fund { display: block; }
  body.side-collapsed .side .group { font-size: .68rem; padding: 1rem .6rem .35rem; margin: 0; border: 0; }
  body.side-collapsed .side-nav { padding: .25rem .75rem 1rem; } body.side-collapsed .side-nav a { justify-content: flex-start; padding: .42rem .6rem; }
  body.side-collapsed .side .count { position: static; } body.side-collapsed .side-foot { flex-direction: row; padding: .7rem .75rem; } body.side-collapsed .me { flex: 1; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(22,38,54,.4); }
  .main { padding: 1.1rem 1rem 3rem; }
  .topbar { padding: 0 .75rem 0 .5rem; }
  .crumbs > span { display: none; } .crumbs { border-left: 0; padding-left: 0; margin-left: 0; }
  .home-head .avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
  .page-head { margin-bottom: 1rem; }
  h1 { font-size: 1.4rem; }
  .btn { min-height: 42px; } .btn.sm { min-height: 36px; }
  .card { padding: 1rem; }
}

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .2rem; padding: .25rem; margin-bottom: 1rem; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; width: fit-content; max-width: 100%; }
@media (max-width: 760px) { .tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; } }
.tabs button { background: none; border: 0; padding: .4rem .85rem; font-weight: 550; font-size: .86rem; color: var(--muted); border-radius: 7px; white-space: nowrap; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.tabs button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.1); }

/* Profile header */
.profile { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.profile .info { flex: 1; min-width: 220px; }
.profile h2 { margin: 0 0 .2rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .7rem; }
.timeline li::before { content: ""; position: absolute; left: -1.6rem; top: .32rem; width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.timeline li.done::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); } .timeline li.current::before { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); } .timeline li.bad::before { background: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.timeline .when { font-size: .78rem; color: var(--muted); }

/* Requirement rows */
.req-grid { display: grid; gap: .6rem; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.req-row .name { font-weight: 600; }
.progress { height: 6px; background: var(--neutral-bg); border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.progress > div { height: 100%; background: var(--gold); width: 0; transition: width .2s; }

/* Modal, toast */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(22,38,54,.5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; animation: fade-in .16s ease-out; }
.modal { background: #fff; border-radius: 14px; border: 1px solid var(--line); width: 100%; max-width: 780px; padding: 1.5rem 1.6rem 1.2rem; position: relative; box-shadow: var(--shadow-lg); animation: modal-in .2s var(--ease); }
.modal h2 { padding-right: 2.2rem; }
.modal.wide { max-width: 1120px; } .modal.narrow { max-width: 480px; }
.modal .x { position: absolute; top: .7rem; right: .8rem; background: none; border: 0; font-size: 1.5rem; color: var(--muted); line-height: 1; width: 36px; height: 36px; border-radius: 10px; }
.modal .x:hover { background: var(--sunken); color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
#toasts { position: fixed; z-index: 80; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .45rem; align-items: center; pointer-events: none; }
#toasts div { background: var(--ink-2); color: #fff; padding: .65rem 1rem; border-radius: 10px; font-size: .9rem; font-weight: 500; max-width: 92vw; box-shadow: var(--shadow-lg); animation: toast-in .22s var(--ease); border-left: 4px solid var(--gold); }
#toasts div.err { background: #7d1b1b; border-left-color: #ff8a80; } #toasts div.ok { background: var(--green); border-left-color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Document viewer */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; }
.viewer .frame { background: #2a2f2c; border-radius: 12px; min-height: 70vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer .frame iframe { width: 100%; height: 75vh; border: 0; background: #fff; }
.viewer .frame img { max-width: 100%; max-height: 75vh; }
@media (max-width: 900px) { .viewer { grid-template-columns: 1fr; } .viewer .frame { min-height: 50vh; } }

/* Notification list */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: .75rem .4rem; border-bottom: 1px solid var(--line); display: flex; gap: .7rem; }
.notes li.unread { background: var(--gold-soft); }
.notes .kind { width: 6px; border-radius: 4px; flex: none; background: var(--line-2); }
.notes .kind.ok { background: var(--ok); } .notes .kind.warn { background: var(--warn); } .notes .kind.action { background: var(--gold); }

/* Fund switcher and line-item tables */
.lines { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lines th { font-size: .7rem; padding: .5rem .4rem; }
.lines td { padding: .38rem .32rem; vertical-align: top; border-bottom: 1px solid var(--line); }
.lines input, .lines select, .lines textarea { min-height: 38px; padding: .35rem .55rem; font-size: .88rem; border-radius: 8px; }
.lines select { padding-right: 1.8rem; background-position: right .5rem center; }
.lines textarea { min-height: 38px; height: 38px; }
.lines .w-xs { width: 70px; } .lines .w-sm { width: 100px; } .lines .w-md { width: 140px; } .lines .w-lg { width: 200px; }
.lines .tot { font-weight: 700; text-align: right; white-space: nowrap; }
.steps { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.1rem; counter-reset: step; }
.steps div { flex: 1 1 170px; padding: .6rem .9rem; font-size: .78rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 10px; position: relative; }
.steps div b { display: block; color: var(--ink); font-size: .88rem; font-weight: 650; }
.steps div.done { background: var(--ok-bg); border-color: #b9dbdb; } .steps div.done b { color: var(--ok); }
.steps div.now { background: var(--gold-soft); border-color: var(--gold-soft-2); box-shadow: inset 3px 0 0 var(--gold); } .steps div.now b { color: var(--gold-ink); }
.steps div.bad { background: var(--bad-bg); border-color: #efc7c3; } .steps div.bad b { color: var(--bad); }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .75rem .95rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; background: #fff; }
.post-row.posted { background: var(--ok-bg); border-color: #b9dbdb; }
.setup { max-width: 680px; }
.setup code { background: var(--neutral-bg); padding: .1rem .35rem; border-radius: 4px; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Print: official forms */
#print-area { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #000; }
}
.pf { font-family: "Times New Roman", Georgia, serif; color: #000; font-size: 11px; page-break-after: always; }
.pf:last-child { page-break-after: auto; }
.ph { text-align: center; margin-bottom: 8px; }
.ph img { width: 60px; height: 60px; }
.ph .l1 { font-weight: 700; font-size: 13px; } .ph .l2 { font-size: 10.5px; }
.ph .l3 { font-weight: 700; font-size: 15px; margin-top: 6px; letter-spacing: .5px; }
.pmeta-t { width: 100%; border-collapse: collapse; font-size: 11px; margin: 4px 0; }
.pmeta-t td { padding: 2px 4px; border: 0; }
.pt { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-top: 6px; }
.pt th, .pt td { border: 1px solid #000; padding: 3px 5px; color: #000; vertical-align: top; }
.pt th { background: #eee; text-transform: none; letter-spacing: 0; font-size: 10px; white-space: normal; text-align: center; font-weight: 700; }
.pt tr.blank td { height: 16px; }
.pt tr.nothing td { text-align: center; font-weight: 700; letter-spacing: 1px; }
.pt .r, .pf .r { text-align: right; } .pt .c, .pf .c { text-align: center; }
.pf-spec { font-size: 9.5px; color: #222; }
.pf-num { border-bottom: 1px solid #000; padding: 0 6px; font-size: 13px; }
.pf-box { display: inline-block; width: 12px; height: 12px; border: 1px solid #000; text-align: center; line-height: 11px; font-size: 10px; vertical-align: middle; }
.pf-cell { padding: 8px !important; height: 120px; }
.pf-signame { margin-top: 30px; text-align: center; font-weight: 700; border-bottom: 1px solid #000; min-height: 14px; }
.pf-ref { font-size: 10.5px; margin-top: 6px; }
.pf-foot { font-size: 9px; font-style: italic; margin-top: 8px; }
.sig2 { display: flex; gap: 24px; margin-top: 22px; }
.sig2 .col { flex: 1; text-align: center; }
.sig2 .who { text-align: left; margin-bottom: 26px; }
.sig2 .name { border-bottom: 1px solid #000; font-weight: 700; min-height: 15px; }
.sig2 .pos { border-bottom: 1px solid #000; margin-top: 14px; min-height: 15px; }
.sig2 .cap, .pf .cap { font-size: 9px; }
.sigt td { height: 20px; }
.sigt tr.sig-row td { height: 48px; }
.doc-view { background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.doc-view iframe { width: 100%; height: 72vh; border: 0; background: #fff; }
.doc-view img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; }
.pinfo { margin-top: 2px; } .pinfo td { font-size: 10.5px; } .pinfo td.lbl { width: 1%; white-space: nowrap; font-weight: 700; }
.card-l .pt { font-size: 9.5px; } .card-l .pt th { font-size: 9px; }
.tags { display: grid; grid-template-columns: repeat(2, 3in); gap: 6mm; }
.tag { width: 3in; height: 1.9in; border: 1px solid #000; display: flex; gap: 8px; align-items: center; padding: 6px 8px; font-family: Arial, sans-serif; font-size: 10px; page-break-inside: avoid; overflow: hidden; }
.tag .qrcol { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; } .tag .qrlogo { width: 24px; height: 24px; }
.tag .qr { width: 96px; height: 96px; } .tag .qr img, .tag .qr canvas { width: 96px; height: 96px; }
.tag b { font-size: 12px; display: block; margin: 2px 0; } .tag .xs { font-size: 8.5px; }
/* Everything prints on A4 — also when the page is printed directly with Ctrl+P */
@page { size: A4; margin: 10mm; }
/* Orientation per form, also as named pages (ledger / property / stock / CIP cards and wide reports print landscape) */
@page pms-land { size: A4 landscape; margin: 10mm; }
@page pms-port { size: A4 portrait; margin: 10mm; }
#print-area[data-orient=landscape] .pf { page: pms-land; }
#print-area[data-orient=portrait] .pf, #print-area[data-orient=tags] .tags { page: pms-port; }
/* attachments: name, size / date and uploader each on one line (cut with … and shown in full on hover); the buttons sit
   under the text in a narrow card and to the right of it in a wide one */
.attach { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
.attach li { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: .75rem; row-gap: .45rem; align-items: start; padding: .7rem 0; }
.attach li + li { border-top: 1px solid var(--line); }
.attach .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft); color: var(--green-3); display: grid; place-items: center; }
.attach .t { min-width: 0; line-height: 1.35; }
.attach .one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach .acts { grid-column: 2; gap: .4rem; flex-wrap: wrap; }
@container (min-width: 520px) {
  .attach li { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; }
  .attach .acts { grid-column: 3; }
}
.att-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; align-items: end; margin-top: 1rem; }
.att-form input[type=file] { width: 100%; max-width: 100%; }
.att-form .att-go { grid-column: 1 / -1; }
tr.sel td { background: var(--gold-soft) !important; }
/* CCAR form: the three signatory boxes */
.ccar-sign fieldset { display: flex; flex-direction: column; gap: .4rem; margin: 0; min-width: 0; }
.ccar-sign fieldset > label:not(.check) { margin-top: .3rem; }
/* AIR / CCAR signature boxes: the ticks above, the signature lines in a row of their own (so they align) */
.pt tr.sig-top td { border-bottom: 0; padding: 8px 8px 0; height: 78px; }
.pt tr.sig-bot td { border-top: 0; vertical-align: bottom; padding: 0 8px 6px; }
.pt tr.sig-bot .pf-signame { margin-top: 26px; }
