/* ============================================================
   Jilsoft Asset Manager — design system
   ============================================================ */
:root {
  --canvas: #f5f3ec;
  --surface: #ffffff;
  --surface-soft: #fbfaf5;
  --line: #e8e4d8;
  --line-strong: #d9d3c3;
  --ink: #17231d;
  --ink-2: #35443c;
  --muted: #79827b;
  --brand: #14532d;
  --brand-2: #1c6b3d;
  --brand-soft: #eef3ee;
  --brand-soft-2: #e2ece4;
  --gold: #b99450;
  --gold-soft: #f6eee0;
  --danger: #b23b32;
  --danger-soft: #fbeeec;
  --warn: #a0611c;
  --warn-soft: #fbf2e3;
  --info: #2f5f86;
  --info-soft: #edf3f8;
  --ok: #1c7047;
  --ok-soft: #eaf3ee;
  --sidebar: #0e2b1f;
  --sidebar-2: #0a2318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 24, .04), 0 12px 32px -18px rgba(20, 30, 24, .28);
  --shadow-pop: 0 24px 70px -20px rgba(10, 22, 16, .45);
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 78px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
svg { display: block; }
::selection { background: #dceadf; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }

.ic { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }

/* ============ Shell ============ */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #d7e0d9;
  transition: width .22s ease, transform .22s ease;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 18px 18px;
  min-height: 84px;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(231, 207, 154, .28);
  color: #e7cf9a;
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark.large { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); border: 0; color: #e7cf9a; }
.brand-mark.large svg { width: 28px; height: 28px; }
.brand-text { display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; }
.brand-text.mofa { white-space: normal; }
.brand-text.mofa .brand-name { font-size: 13.5px; line-height: 1.22; }
.brand-mark.seal { background: transparent; border: 0; }
.brand-mark.seal img { width: 40px; height: 40px; display: block; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(231, 207, 154, .78); margin-top: 2px; }
.sidebar-collapse {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .6);
}
.sidebar-collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.nav { flex: 1; overflow-y: auto; padding: 6px 10px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-label {
  font-size: 12px; font-weight: 650; letter-spacing: .01em;
  color: rgba(231, 207, 154, .62);
  padding: 16px 12px 8px;
}
.nav-items { display: flex; flex-direction: column; }
.nav-group.closed .nav-items { display: none; }
button.nav-label {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: none; border: 0; font-family: inherit; text-align: left; cursor: pointer;
}
button.nav-label::after {
  content: ""; width: 7px; height: 7px; margin-right: 6px; opacity: .5;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .18s ease, opacity .15s ease;
}
.nav-group:not(.closed) > button.nav-label::after { transform: rotate(45deg); }
button.nav-label:hover { color: #e7cf9a; }
button.nav-label:hover::after { opacity: .85; }
button.nav-label:focus-visible { outline: 2px solid rgba(217, 188, 132, .55); outline-offset: -2px; border-radius: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px; border-radius: 10px;
  color: rgba(233, 240, 235, .86); font-size: 13.6px; font-weight: 500; letter-spacing: .004em;
  white-space: nowrap; margin-bottom: 3px;
  transition: background .15s ease, color .15s ease;
}
.nav-item .ic { color: rgba(226, 234, 228, .58); }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-item:hover .ic { color: rgba(255, 255, 255, .85); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(217, 188, 132, .18), rgba(217, 188, 132, .06));
  color: #fff;
}
.nav-item.active .ic { color: #efd9a6; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 700;
  background: rgba(231, 207, 154, .16); color: #e7cf9a;
  border-radius: 20px; padding: 2px 7px; letter-spacing: .02em;
}
.sidebar-foot {
  padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .07);
}
.user-mini { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-mini .meta { min-width: 0; }
.user-mini strong { display: block; font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini span { font-size: 11px; color: rgba(215, 224, 217, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: #e7cf9a; color: #3b2c10;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s ease; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 68px; display: flex; align-items: center; gap: 14px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: 19px; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.today { font-size: 12px; color: var(--muted); white-space: nowrap; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-soft); border-color: var(--line); }

.user-menu { position: relative; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 9px;
  cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 30px; border: 1px solid transparent;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-soft); border-color: var(--line); }
.user-menu .avatar { width: 32px; height: 32px; }
.user-menu .user-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.user-menu .chev { width: 14px; height: 14px; color: var(--muted); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-pop); padding: 8px; z-index: 80;
}
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; font-size: 13px; }
.menu-head span { font-size: 11.5px; color: var(--muted); }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 8px; border: 0; background: none;
  font-size: 13px; color: var(--ink-2); cursor: pointer; text-align: left;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-soft); }
.menu-panel form { margin: 0; }
.menu-panel .signout { color: var(--danger); }

.content { padding: 26px 30px 44px; width: 100%; max-width: 1680px; margin: 0 auto; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--surface-soft); color: var(--ink); }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(20, 83, 45, .18); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.soft { background: var(--brand-soft); border-color: var(--brand-soft-2); color: var(--brand); }
.btn.soft:hover { background: var(--brand-soft-2); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #9c3129; border-color: #9c3129; color: #fff; }
.btn.danger-ghost { background: transparent; border-color: #eccfcb; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.2px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .count { font-size: 11px; background: rgba(255,255,255,.18); border-radius: 20px; padding: 1px 7px; }

.icon-link {
  width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center;
  color: var(--muted); border: 1px solid transparent; background: transparent; cursor: pointer;
}
.icon-link:hover { color: var(--brand); background: var(--brand-soft); }

/* ============ Cards ============ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card + .card { margin-top: 22px; }
.card-head {
  display: flex; align-items: center; gap: 14px;
  padding: 19px 24px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf9, var(--surface));
}
.card-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.card-body { padding: 22px 24px; }
.card-body.flush { padding: 0; }
.card-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-soft);
}
.card-foot .foot-meta { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.table-foot { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.table-foot strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ============ Toolbar / search ============ */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search {
  position: relative; flex: 1 1 380px; max-width: 560px;
}
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface);
  font: inherit; font-size: 13.5px; color: var(--ink);
}
.search input::placeholder { color: #9aa29b; }
.search input:focus { outline: none; border-color: var(--brand); }
.chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 20px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12.3px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.chip span { font-size: 11px; color: var(--muted); font-weight: 600; }
.chip:hover { border-color: #c9c3b2; }
.chip.active { background: var(--brand-soft); border-color: #c6d8ca; color: var(--brand); }
.chip.active span { color: var(--brand-2); }
.chip.tone-danger.active { background: var(--danger-soft); border-color: #eccfcb; color: var(--danger); }
.chip.tone-warn.active { background: var(--warn-soft); border-color: #ecd9bd; color: var(--warn); }
.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.select-inline {
  height: 38px; padding: 0 32px 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface) 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='%2379827b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  font: inherit; font-size: 12.5px; color: var(--ink-2); appearance: none;
}
.select-inline:focus { outline: none; border-color: var(--brand); }

/* ============ Tables ============ */
.table-scroll { max-height: calc(100vh - 318px); min-height: 240px; overflow: auto; }
.table-scroll.table-ten { max-height: 668px; min-height: 0; }
.table-cap { max-height: 338px; overflow: auto; }
.table-scroll::-webkit-scrollbar, .table-cap::-webkit-scrollbar { width: 8px; height: 8px; }
.table-scroll::-webkit-scrollbar-thumb, .table-cap::-webkit-scrollbar-thumb { background: #d7d2c4; border-radius: 8px; }
.table-scroll::-webkit-scrollbar-track, .table-cap::-webkit-scrollbar-track { background: transparent; }

table.data { width: 100%; border-collapse: separate; border-spacing: 0; }
table.data thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-soft);
  font-size: 10.8px; font-weight: 650; letter-spacing: .075em; text-transform: uppercase;
  color: #8a9189; text-align: left; padding: 11px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.data thead th:first-child { padding-left: 24px; }
table.data thead th:last-child { padding-right: 24px; }
table.data tbody td {
  padding: 12px 14px; border-bottom: 1px solid #f0ede3;
  font-size: 13.2px; color: var(--ink-2); vertical-align: middle;
}
table.data tbody td:first-child { padding-left: 24px; }
table.data tbody td:last-child { padding-right: 24px; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfaf4; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .strong { font-weight: 600; color: var(--ink); }
table.data tr.is-inactive td { color: #98a09a; }
table.data tr.is-inactive .row-title { color: #7d867f; }

.name-cell { display: flex; align-items: center; gap: 18px; min-width: 0; }
.name-cell .row-title { font-weight: 600; color: var(--ink); font-size: 13.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-cell a.row-title:hover { color: var(--brand); }
.row-title .tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--gold); background: var(--gold-soft); padding: 2px 7px; border-radius: 6px; margin-right: 8px; vertical-align: 1px; }
.row-meta { display: block; font-size: 11.6px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta .row-flag { height: 16px; padding: 0 6px; font-size: 9.3px; border-radius: 5px; gap: 4px; margin-left: 5px; vertical-align: 1px; }
.row-meta .row-flag::before { width: 3.5px; height: 3.5px; }
.cell-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cell-strong { font-weight: 600; color: var(--ink); }
.cell-mono { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-controls { display: flex; align-items: center; gap: 6px; }
.status-cell { width: 138px; }
.status-cell .switch { justify-content: flex-start; }

/* ============ Badges / status ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 23px; padding: 0 9px; border-radius: 7px;
  font-size: 10.8px; font-weight: 650; letter-spacing: .015em; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: #f2efe6; color: #6f786f; }
.badge.gold { background: var(--gold-soft); color: #8a6a2b; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  width: 38px; height: 21px; border-radius: 20px; background: #cfdbd1;
  position: relative; transition: background .18s ease; flex: none;
}
.switch .knob {
  position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track .knob { transform: translateX(17px); }
.switch.off .track { background: #f2d6d2; }
.switch.off .knob { background: var(--danger); transform: translateX(17px); }
.switch.off input:checked + .track { background: var(--ok); }
.switch.off input:checked + .track .knob { background: #fff; transform: translateX(17px); }
.switch-label { font-size: 12px; font-weight: 600; color: var(--ok); }
.switch.off .switch-label { color: var(--danger); }
.switch.off input:checked ~ .switch-label { color: var(--ok); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============ Forms ============ */
.form-card .card-body { padding: 8px 24px 26px; }
.form-section { padding: 20px 0 4px; border-bottom: 1px solid #f0ede2; }
.form-section:last-of-type { border-bottom: 0; }
.form-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.form-section-title { font-size: 13px; font-weight: 650; letter-spacing: .01em; color: var(--ink); }
.form-section-desc { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; padding-bottom: 18px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.7px; font-weight: 650; color: #5c665e; margin-bottom: 6px; letter-spacing: .005em; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field label.switch { display: inline-flex; margin-bottom: 0; height: 42px; }
.field label.switch .switch-label { font-size: 12px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font: inherit; font-size: 13.4px; color: var(--ink);
  transition: border-color .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #a3aaa4; }
.input.input-sm { height: 34px; padding: 0 10px; font-size: 12.6px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); }
.input:disabled, .input[readonly] { background: var(--surface-soft); color: var(--muted); }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  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='%2379827b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input-group { display: flex; align-items: center; }
.input-group .prefix {
  height: 42px; display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--line-strong); border-right: 0; border-radius: 10px 0 0 10px;
  background: var(--surface-soft); font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.input-group .input { border-radius: 0 10px 10px 0; }
.field .error-text { font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.field .field-note { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.input.invalid, .select.invalid, .textarea.invalid { border-color: #dfa9a3; background: #fffafa; }
.validation-summary { background: var(--danger-soft); border: 1px solid #efd4d0; color: #8f2f27; border-radius: 10px; padding: 11px 14px; font-size: 12.6px; margin-bottom: 16px; }
.validation-summary ul { margin: 0; padding-left: 18px; }

.option-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; }
.option-card .option-body {
  display: block; border: 1px solid var(--line-strong); border-radius: 12px; padding: 13px 15px; height: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.option-card .option-body strong { display: block; font-size: 13px; font-weight: 650; color: var(--ink); }
.option-card .option-body span { display: block; font-size: 11.8px; color: var(--muted); margin-top: 3px; }
.option-card input:checked + .option-body { border-color: var(--brand); background: var(--brand-soft); }
.option-card input:checked + .option-body strong { color: var(--brand); }
.option-card input:focus-visible + .option-body { outline: 2px solid var(--gold); outline-offset: 2px; }

.photo-field { display: flex; align-items: center; gap: 18px; }
.photo-preview {
  width: 104px; height: 104px; border-radius: 14px; border: 1px dashed var(--line-strong);
  background: var(--surface-soft); display: grid; place-items: center; color: #b0b6b0; overflow: hidden; flex: none;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; flex-direction: column; gap: 8px; }
.photo-actions small { font-size: 11.5px; color: var(--muted); }

/* ============ Picker ============ */
.picker { position: relative; display: flex; align-items: center; gap: 6px; }
.picker-trigger {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 42px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font: inherit; font-size: 13.4px; color: var(--ink); cursor: pointer; text-align: left;
}
.picker-trigger .placeholder { color: #a3aaa4; }
.picker-trigger:focus-visible { outline: none; border-color: var(--brand); }
.picker-trigger .chev { color: var(--muted); flex: none; }
.picker-clear {
  height: 42px; width: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; display: none;
}
.picker.has-value .picker-clear { display: grid; place-items: center; }

/* ============ KPI / dashboard ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .kpi-grid.kpi-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .kpi-grid.kpi-grid-3 { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 11.6px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex: none;
}
.kpi-icon.gold { background: var(--gold-soft); color: #8a6a2b; }
.kpi-icon.info { background: var(--info-soft); color: var(--info); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-icon.danger { background: var(--danger-soft); color: var(--danger); }
.kpi-value { font-size: 25px; font-weight: 680; letter-spacing: -.02em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.kpi-sub b { color: var(--ink-2); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 22px; }
.panel-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-link { font-size: 12px; font-weight: 600; color: var(--brand); }
.panel-link:hover { text-decoration: underline; }

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 132px 1fr 92px; align-items: center; gap: 14px; }
.bar-label { font-size: 12.6px; font-weight: 550; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; background: #f0ede2; border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, #2f7a4d, #17552f); }
.bar-fill.gold { background: linear-gradient(90deg, #c9a562, #a8853d); }
.bar-value { font-size: 12.2px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

.trend { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.trend-bar { width: 100%; max-width: 42px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #3d8a5c, #1b5c36); min-height: 3px; }
.trend-bar.empty { background: #eeece2; }
.trend-label { font-size: 10.6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.trend-val { font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.status-split { display: flex; flex-direction: column; gap: 10px; }
.status-split-row { display: flex; align-items: center; gap: 10px; font-size: 12.6px; color: var(--ink-2); }
.status-split-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status-split-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot.ok { background: #2f8a5b; } .dot.info { background: #4a83ae; } .dot.warn { background: #c58a3a; } .dot.danger { background: #c06058; } .dot.neutral { background: #a7aea6; }

.progress-line { height: 7px; border-radius: 20px; background: #eef0e9; overflow: hidden; margin-top: 10px; }
.progress-line i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, #2f7a4d, #17552f); }

.activity { display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2efe6; }
.activity-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.activity-dot { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.activity-text { font-size: 12.6px; color: var(--ink-2); line-height: 1.45; }
.activity-text b { color: var(--ink); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2efe6; }
.mini-row:last-child { border-bottom: 0; }
.mini-main { min-width: 0; flex: 1; }
.mini-main strong { display: block; font-size: 12.8px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-main span { display: block; font-size: 11.4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-date { font-size: 11.4px; color: var(--ink-2); font-weight: 600; text-align: right; white-space: nowrap; }
.mini-date.overdue { color: var(--danger); }

/* ============ Detail page ============ */
.detail-head { display: flex; gap: 24px; align-items: flex-start; padding: 24px; }
.asset-photo {
  width: 148px; height: 148px; border-radius: 16px; flex: none; overflow: hidden;
  background: var(--brand-soft); border: 1px solid var(--line);
  display: grid; place-items: center; color: #9fb2a4;
}
.asset-photo img { width: 100%; height: 100%; object-fit: cover; }
.asset-photo .ic { width: 44px; height: 44px; stroke-width: 1.2; }
.detail-main { flex: 1; min-width: 0; }
.detail-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.detail-title { font-size: 21px; font-weight: 680; letter-spacing: -.02em; line-height: 1.25; }
.detail-sub { font-size: 12.8px; color: var(--muted); margin-top: 4px; }
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 14px 22px; margin-top: 20px; }
.meta-item .meta-label { font-size: 10.6px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.meta-item .meta-value { font-size: 13px; color: var(--ink); font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 14px 14px 13px; font-size: 12.8px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab .count { font-size: 10.5px; background: #f1eee4; color: var(--muted); border-radius: 20px; padding: 1px 6px; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab.active .count { background: var(--brand-soft); color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; }
.kv .k { font-size: 10.8px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.kv .v { font-size: 13.2px; color: var(--ink); font-weight: 550; margin-top: 3px; }
.kv .v.money { font-variant-numeric: tabular-nums; font-weight: 650; }
.note-box { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--ink-2); line-height: 1.55; white-space: pre-line; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--surface); }
.summary-cell { padding: 14px 18px; border-right: 1px solid var(--line); }
.summary-cell:last-child { border-right: 0; }
.summary-cell .s-label { font-size: 10.6px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.summary-cell .s-value { font-size: 17px; font-weight: 680; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.summary-cell .s-note { font-size: 11.2px; color: var(--muted); margin-top: 2px; }

/* ============ Empty state ============ */
.empty { padding: 46px 24px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--surface-soft); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 12px; color: #adb5ad; }
.empty strong { display: block; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.empty span { display: block; font-size: 12.2px; margin-top: 3px; }

/* ============ Banner ============ */
.banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; border-radius: 11px;
  font-size: 12.8px; margin-bottom: 18px; border: 1px solid transparent;
}
.banner.error { background: var(--danger-soft); border-color: #efd4d0; color: #8f2f27; }
.banner.success { background: var(--ok-soft); border-color: #cfe4d8; color: #1c5c3c; }
.banner .ic { width: 16px; height: 16px; margin-top: 1px; }

/* ============ Modals ============ */
.modal-root {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(12, 22, 16, .42); backdrop-filter: blur(3px);
}
.modal-root.open { display: flex; animation: fade .16s ease; }
.modal-card {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-pop);
  width: 100%; max-width: 430px; padding: 28px; position: relative; animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.confirm-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--warn-soft); color: var(--warn); margin: 0 auto 16px; font-size: 22px; font-weight: 700;
}
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger); }
.modal-card h2 { text-align: center; font-size: 17.5px; font-weight: 680; letter-spacing: -.01em; }
.confirm-text { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; white-space: pre-line; }
.confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-actions .btn { flex: 1; }

.picker-card { max-width: 560px; padding: 0; overflow: hidden; }
.picker-head { display: flex; align-items: center; padding: 20px 22px 14px; }
.picker-head h2 { text-align: left; font-size: 15.5px; flex: 1; }
.picker-close { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--surface-soft); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.picker-search { position: relative; padding: 0 22px 14px; }
.picker-search .ic { position: absolute; left: 35px; top: 13px; color: var(--muted); }
.picker-search input { height: 42px; width: 100%; padding: 0 14px 0 40px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 13.5px; }
.picker-search input:focus { outline: none; border-color: var(--brand); }
.picker-list { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); padding: 6px 0 10px; }
.picker-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 22px; background: none; border: 0; cursor: pointer; font: inherit;
}
.picker-row:hover, .picker-row.hl { background: var(--surface-soft); }
.picker-row .pk-main { flex: 1; min-width: 0; }
.picker-row strong { display: block; font-size: 13.2px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-row span { display: block; font-size: 11.6px; color: var(--muted); margin-top: 1px; }
.picker-row.selected { background: var(--brand-soft); }
.picker-row.selected strong { color: var(--brand); }
.picker-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; display: none; }
.picker-empty.show { display: block; }

/* ============ Success overlay ============ */
.success-overlay {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(10, 20, 14, .38); backdrop-filter: blur(3px); padding: 24px;
}
.success-overlay.open { display: flex; }
.success-card {
  background: var(--surface); border-radius: 20px; width: 100%; max-width: 330px;
  box-shadow: var(--shadow-pop); text-align: center; padding: 30px 26px 0; overflow: hidden;
  animation: pop .22s ease;
}
.success-ring {
  width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; color: var(--brand);
  background: var(--surface); position: relative;
  box-shadow: 0 0 0 6px var(--brand-soft), 0 0 0 7px rgba(185, 148, 80, .55);
}
.success-ring .ic { width: 34px; height: 34px; stroke-width: 2.4; }
.success-ring svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .08s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-card h2 { font-size: 17px; font-weight: 680; letter-spacing: -.01em; }
.success-card p { font-size: 12.6px; color: var(--muted); margin: 6px 0 22px; line-height: 1.5; }
.success-bar { height: 3px; background: #f0ede2; }
.success-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--brand), #4a9870); transform-origin: left; }
.success-overlay.open .success-bar i { animation: shrink 2s linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ============ Auth / login ============ */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 28px;
  background:
    radial-gradient(1100px 600px at 15% 10%, #123c29 0%, #0a2418 52%, #071a11 100%);
  color: var(--ink);
}
.auth-shell { display: grid; grid-template-columns: 1.05fr .95fr; width: min(1020px, 100%); min-height: 580px; background: var(--surface); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .55); }
.auth-aside {
  position: relative; padding: 46px 48px; color: #eaf0ea;
  background:
    radial-gradient(700px 500px at 85% 10%, rgba(110, 168, 132, .28), transparent 60%),
    linear-gradient(160deg, #17482f 0%, #0d2c1e 70%, #0a2116 100%);
  display: flex; flex-direction: column;
}
.auth-aside .brand-row { display: flex; align-items: center; gap: 13px; }
.auth-aside .brand-row .brand-mark { background: rgba(255,255,255,.07); border-color: rgba(231,207,154,.3); }
.auth-aside .brand-row .brand-mark.seal { width: 50px; height: 50px; background: transparent; border-color: transparent; }
.auth-aside .brand-row .brand-mark.seal img { width: 50px; height: 50px; }
.auth-aside h1 { font-size: 34px; line-height: 1.15; letter-spacing: -.03em; font-weight: 680; margin-top: 54px; }
.auth-aside h1 em { font-style: normal; color: #e7cf9a; }
.auth-aside p.lede { font-size: 13.8px; line-height: 1.65; color: rgba(234, 240, 234, .68); margin-top: 16px; max-width: 380px; }
.auth-points { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 34px; }
.auth-point { display: flex; align-items: center; gap: 11px; font-size: 12.6px; color: rgba(234, 240, 234, .8); }
.auth-point .tick { width: 22px; height: 22px; border-radius: 50%; background: rgba(231, 207, 154, .14); color: #e7cf9a; display: grid; place-items: center; flex: none; }
.auth-point .tick .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.auth-card { padding: 56px 54px; display: flex; flex-direction: column; justify-content: center; }
.auth-title { font-size: 24px; font-weight: 680; letter-spacing: -.02em; }
.auth-sub { font-size: 13px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.auth-form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-form .field label { font-size: 11.8px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.2px; color: var(--ink-2); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.4px; color: var(--ink-2); }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }
.auth-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.6px; color: var(--muted); line-height: 1.6; }

/* ============ Utility lists / misc ============ */
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; }
.row-actions { display: flex; align-items: center; gap: 4px; }
.cell-actions { text-align: right; white-space: nowrap; }
.section-title { font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.audit-row select { height: 34px; }
.audit-row textarea { min-height: 40px; height: 40px; padding: 8px 10px; font-size: 12.4px; }
.progress-pill { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.progress-pill .track { height: 6px; background: #eef0e9; border-radius: 9px; flex: 1; overflow: hidden; }
.progress-pill .track i { display: block; height: 100%; background: linear-gradient(90deg, #2f7a4d, #17552f); border-radius: 9px; }
.progress-pill span { font-size: 11.6px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

.report-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.report-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 22px; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.report-card:hover { border-color: #cdd7cd; transform: translateY(-1px); color: inherit; }
.report-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.report-card h3 { font-size: 14px; font-weight: 650; color: var(--ink); }
.report-card p { font-size: 12.3px; color: var(--muted); line-height: 1.5; }
.report-card .go { margin-top: auto; font-size: 12px; font-weight: 650; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }

/* ============ Report sheet / print ============ */
.report-body { background: #ebe7dc; }
.report-toolbar { display: flex; align-items: center; gap: 10px; padding: 16px 24px; max-width: 1100px; margin: 0 auto; }
.report-toolbar .spacer { flex: 1; }
.report-sheet {
  width: min(1100px, calc(100% - 32px)); margin: 8px auto 40px; background: #fff;
  border-radius: 4px; box-shadow: 0 18px 50px -22px rgba(20, 30, 24, .35); padding: 42px 48px 46px;
}
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid #14532d; }
.report-brand { display: flex; align-items: center; gap: 13px; }
.report-brand .brand-mark { width: 46px; height: 46px; border-radius: 12px; background: #14532d; border: 0; color: #e7cf9a; }
.report-brand .brand-mark.seal { background: transparent; }
.report-brand .brand-mark.seal img { width: 46px; height: 46px; }
.report-brand .brand-mark svg { width: 26px; height: 26px; }
.report-brand h2 { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.report-brand span { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #8a928a; display: block; margin-top: 2px; }
.report-meta { text-align: right; font-size: 11px; color: #6d766e; line-height: 1.7; }
.report-meta b { color: #17231d; font-weight: 650; }
.report-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 24px 0 6px; }
.report-title h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.report-title p { font-size: 12px; color: #6d766e; margin-top: 3px; }
.report-org { max-width: 320px; font-size: 10.8px; line-height: 1.6; color: #8a928a; text-align: right; }
.report-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 20px; padding: 12px 14px; background: #faf8f2; border: 1px solid #e8e4d8; border-radius: 10px; }
.report-filters label { font-size: 11px; font-weight: 650; color: #5c665e; }
.report-filters select, .report-filters input { height: 34px; padding: 0 10px; border: 1px solid #d9d3c3; border-radius: 8px; background: #fff; font: inherit; font-size: 12px; }
.report-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.report-table th {
  background: #f4f1e8; color: #5c665e; font-size: 9.6px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  text-align: left; padding: 9px 10px; border-bottom: 1px solid #dad5c6; border-top: 1px solid #dad5c6;
}
.report-table td { padding: 8px 10px; font-size: 11.2px; border-bottom: 1px solid #efecdf; color: #26332b; vertical-align: top; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table tbody tr:nth-child(even) td { background: #fcfbf7; }
.report-table tfoot td { font-weight: 700; background: #f4f1e8 !important; border-top: 1.5px solid #cfc9b8; border-bottom: 0; padding: 10px; }
.report-table .group-row td { background: #f7f5ec !important; font-weight: 700; color: #14532d; font-size: 11px; letter-spacing: .02em; }
.report-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.report-total { border: 1px solid #e8e4d8; border-radius: 10px; padding: 12px 14px; background: #faf8f2; }
.report-total .t-label { font-size: 9.6px; text-transform: uppercase; letter-spacing: .07em; color: #7d867e; font-weight: 650; }
.report-total .t-value { font-size: 15px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.report-note { font-size: 10.8px; color: #7d867e; line-height: 1.6; margin-top: 18px; }
.report-section { font-size: 12px; font-weight: 650; color: var(--ink); margin: 22px 0 10px; }
.report-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 44px; }
.report-sign div { border-top: 1px solid #c9c3b4; padding-top: 7px; font-size: 10.6px; color: #6d766e; }
.report-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 12px; border-top: 1px solid #e8e4d8; font-size: 9.6px; color: #8a928a; letter-spacing: .04em; text-transform: uppercase; }
.report-empty { padding: 36px; text-align: center; color: #8a928a; font-size: 12px; }

/* ============ Responsive ============ */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-grid { grid-template-columns: repeat(3, 1fr); }
  .report-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1120px) {
  .dash-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 22px; }
  .content { padding: 22px 22px 38px; }
  .kv-grid { grid-template-columns: repeat(2, 1fr); }
  .table-scroll { max-height: none; }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); box-shadow: 30px 0 70px -20px rgba(0, 0, 0, .5); }
  body.nav-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .backdrop { position: fixed; inset: 0; background: rgba(10, 18, 13, .45); z-index: 55; display: none; }
  body.nav-open .backdrop { display: block; }
  .sidebar-collapse { display: none; }
  .today { display: none; }
  .user-menu .user-name { display: none; }
  .detail-head { flex-direction: column; }
  .asset-photo { width: 100%; height: 200px; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
  .auth-card { padding: 40px 30px; }
}
@media (min-width: 981px) {
  .menu-toggle { display: none; }
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
  body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
  body.sidebar-collapsed .brand { padding: 22px 0 18px; justify-content: center; }
  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-item span,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .user-mini .meta { display: none; }
  body.sidebar-collapsed .nav { padding: 4px 11px 18px; }
  body.sidebar-collapsed .nav-group .nav-items,
  body.sidebar-collapsed .nav-group.closed .nav-items { display: flex; }
  body.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
  body.sidebar-collapsed .nav-item.active { box-shadow: none; }
  body.sidebar-collapsed .sidebar-foot { display: flex; justify-content: center; padding: 14px 0 18px; }
  body.sidebar-collapsed .nav-group + .nav-group { margin-top: 14px; }
  body.sidebar-collapsed .sidebar-collapse { display: none; }
  .backdrop { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 62px; gap: 8px; padding: 0 14px; }
  .page-title { font-size: 16.5px; }
  .content { padding: 16px 14px 34px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 21px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .toolbar { gap: 10px; }
  .search { flex-basis: 100%; max-width: none; }
  .chips { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .toolbar-end { margin-left: 0; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-cell:nth-child(3), .summary-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .report-cards { grid-template-columns: 1fr; }
  .report-sheet { padding: 26px 20px; }
  .report-title { flex-direction: column; align-items: flex-start; }
  .report-org { text-align: left; }
  .report-toolbar { padding: 12px 16px; }
  .bar-row { grid-template-columns: 100px 1fr 78px; gap: 9px; }
  .card-head { padding: 16px 18px; }
  .card-body { padding: 18px; }
  .card-foot { padding: 14px 18px; }
  table.data thead th:first-child, table.data tbody td:first-child { padding-left: 16px; }
  table.data thead th:last-child, table.data tbody td:last-child { padding-right: 16px; }
  .auth-body { padding: 0; }
  .auth-shell { border-radius: 0; min-height: 100vh; }
  .auth-card { padding: 34px 22px; }
  .modal-card { padding: 22px; }
  .tap-hide { display: none; }
}

@media (max-height: 780px) {
  .table-cap { max-height: 280px; }
}

/* ============ Print ============ */
/* ============ Maps and documents ============ */
.map-canvas {
  position: relative; z-index: 0;
  width: 100%; height: 340px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #eef0ea;
}
.map-canvas.map-picker { height: 300px; }
.map-canvas.map-overview { height: calc(100vh - 250px); min-height: 440px; border-radius: 0 0 14px 14px; border-left: 0; border-right: 0; border-bottom: 0; }
.map-pin span {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: #b8860b; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.map-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.map-actions .coords { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.map-pop { font-size: 12.5px; line-height: 1.55; }
.map-pop strong { color: var(--ink); }
.map-pop span { color: var(--muted); }
.map-pop a { color: #8a6a2b; font-weight: 600; text-decoration: none; }
.map-pop a:hover { text-decoration: underline; }
.doc-link { color: var(--brand); font-weight: 600; text-decoration: none; }
.doc-link:hover { text-decoration: underline; }
.input.file-input { height: auto; padding: 9px 11px; font-size: 12px; }
.doc-upload td { padding-top: 10px; padding-bottom: 10px; }

@media print {
  @page { size: A4; margin: 13mm; }
  html, body { background: #fff !important; }
  .report-toolbar, .sidebar, .topbar, .backdrop, .modal-root, .success-overlay, .no-print { display: none !important; }
  .report-body { background: #fff; }
  .report-sheet { width: 100%; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .report-table { page-break-inside: auto; }
  .report-table thead { display: table-header-group; }
  .report-table tfoot { display: table-row-group; }
  .report-table tr, .report-table td, .report-table th { break-inside: avoid; page-break-inside: avoid; }
  .report-table tbody tr:nth-child(even) td { background: #fff !important; }
  .report-sign { page-break-inside: avoid; }
  .report-filters { display: none; }
  .report-totals { page-break-inside: avoid; }
}

/* app screens printing (fallback) */
@media print {
  .shell .sidebar, .shell .topbar, .toolbar, .card-actions, .btn, .card-foot { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  .table-scroll, .table-cap { max-height: none !important; overflow: visible !important; }
  .card { box-shadow: none; border-color: #ddd; }
  table.data thead { display: table-header-group; }
  table.data tr { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------- Grouped registers ---------------- */
.group-card + .group-card { margin-top: 14px; }
.group-card { overflow: hidden; }
.group-card > .group-head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
}
.group-card > .group-head::-webkit-details-marker { display: none; }
.group-card > .group-head:hover { background: var(--surface-soft); }
.group-card[open] > .group-head { border-bottom: 1px solid var(--line); }
.group-caret { color: var(--muted); transition: transform .18s ease; }
.group-card[open] .group-caret { transform: rotate(90deg); }
.group-title { font-size: 13.4px; font-weight: 680; color: var(--ink); letter-spacing: -.01em; }
.group-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
.group-card .table-scroll { max-height: none; min-height: 0; }
.group-card tbody tr { opacity: .94; }
.group-card .empty-row td { padding: 16px 18px; color: var(--muted); font-size: 12.6px; }
.group-card .empty-row:hover td { background: transparent; }

