/* LastWing Loan Management System — UI */
@font-face { font-family: 'TeX Gyre Adventor'; src: url('../fonts/adventor-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TeX Gyre Adventor'; src: url('../fonts/adventor-bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --primary: #0f4c81; --primary-50: #eef4fa; --primary-100: #d5e3f0; --accent: #f2a900; --accent-50: #fdf3d9; --sidebar: #0b2540;
  --font: 'Century Gothic', CenturyGothic, 'TeX Gyre Adventor', AppleGothic, sans-serif;
  --ink: #17212b; --ink-2: #4a5866; --muted: #7b8794; --line: #e3e8ee; --bg: #f4f6f9; --card: #fff;
  --ok: #1e8e5a; --ok-50: #e5f5ec; --warn: #b7791f; --warn-50: #fdf3dc; --bad: #c53030; --bad-50: #fde8e8; --info: #2b6cb0; --info-50: #e6f0fb;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.04);
}
* { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.08rem; } h4 { font-size: .95rem; }
small, .muted { color: var(--muted); }
code { background: var(--primary-50); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--sidebar); color: #c9d4df; display: flex; flex-direction: column; z-index: 30; transition: transform .2s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none !important; }
.brand-logo { height: 36px; max-width: 120px; object-fit: contain; border-radius: 6px; }
.logo-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--sidebar); font-weight: 700; flex: none; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #7f93a8; margin: 16px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c9d4df; text-decoration: none !important; margin-bottom: 1px; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link .count { margin-left: auto; background: var(--accent); color: #1b1b1b; font-size: .72rem; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.sidebar-foot { padding: 12px 18px; font-size: .75rem; color: #7f93a8; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-foot a { color: #a9bccf; }
.main { margin-left: 248px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px; }
.topbar h1 { font-size: 1.2rem; margin: 0; white-space: nowrap; }
.burger { display: none; border: 0; background: none; font-size: 1.4rem; cursor: pointer; }
.top-search { margin-left: auto; flex: 0 1 340px; }
.top-search input { width: 100%; border-radius: 20px; background: var(--bg); }
.userbox { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.userbox:hover { background: var(--bg); }
.userbox .who { display: flex; flex-direction: column; line-height: 1.2; }
.userbox .who small { font-size: .75rem; }
.userbox .menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; }
.userbox:hover .menu { display: block; }
.userbox .menu a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); }
.userbox .menu a:hover { background: var(--bg); text-decoration: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.8rem; border-radius: 14px; }
.content { padding: 22px 24px 40px; flex: 1; }
.foot { padding: 14px 24px; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); background: #fff; }

/* ---------- cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card > h3:first-child, .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.card-head .tools { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 14px 18px 0; }
.card.empty { text-align: center; padding: 50px 20px; }
.grid { display: grid; gap: 18px; }
.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)); }
.g-side { grid-template-columns: minmax(0,1fr) 340px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.kpi.accent::before { background: var(--accent); } .kpi.ok::before { background: var(--ok); } .kpi.bad::before { background: var(--bad); } .kpi.warn::before { background: var(--warn); } .kpi.info::before { background: var(--info); }
.kpi .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 1.45rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .8rem; color: var(--ink-2); margin-top: 2px; }
.kpi a { color: inherit; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.section-title h2 { margin: 0; font-size: 1.05rem; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); background: var(--primary-50); padding: 9px 12px; border-bottom: 1px solid var(--primary-100); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr:hover td { background: #fafbfd; }
table.t tfoot td { font-weight: 700; background: var(--primary-50); border-top: 2px solid var(--primary-100); }
table.t.compact td, table.t.compact th { padding: 6px 10px; }
.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; font-weight: 400; color: var(--muted); padding: 6px 10px 6px 0; width: 42%; vertical-align: top; }
.kv td { padding: 6px 0; font-weight: 600; }
.kv tr + tr th, .kv tr + tr td { border-top: 1px dashed var(--line); }
tr.overdue td { background: var(--bad-50) !important; }
tr.paid td { color: var(--muted); }

/* ---------- forms */
label { display: block; font-size: .82rem; color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }
label .req { color: var(--bad); }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 8px 11px; border: 1px solid #cfd7e0; border-radius: 8px; background: #fff; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=color] { padding: 2px; height: 38px; }
input[type=file] { padding: 6px; background: var(--bg); }
textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .span2 { grid-column: span 2; }
.field { margin-bottom: 12px; }
.help { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; color: var(--ink); cursor: pointer; }
.check input { margin-top: 3px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; color: var(--primary); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > div { min-width: 140px; }
.filters input, .filters select { padding: 7px 10px; }
.inline-form { display: inline; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 8px 15px; border-radius: 8px; border: 1px solid transparent; background: var(--primary); color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.3; }
.btn:hover { filter: brightness(1.08); }
.btn.sm { padding: 5px 10px; font-size: .85rem; }
.btn.lg { padding: 12px 22px; font-size: 1.05rem; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #cfd7e0; }
.btn.ghost:hover { background: var(--bg); }
.btn.accent { background: var(--accent); color: #1b1b1b; }
.btn.ok { background: var(--ok); } .btn.danger { background: var(--bad); } .btn.warn { background: var(--warn); }
.btn.link { background: none; color: var(--primary); padding: 0; border: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-xls::before, .btn-pdf::before { content: ''; width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.btn-xls::before { background: #1d6f42; } .btn-pdf::before { background: #c53030; }

/* ---------- badges & alerts */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge-success { background: var(--ok-50); color: var(--ok); } .badge-warn { background: var(--warn-50); color: var(--warn); } .badge-danger { background: var(--bad-50); color: var(--bad); }
.badge-info { background: var(--info-50); color: var(--info); } .badge-primary { background: var(--primary-100); color: var(--primary); } .badge-dark { background: #2d3748; color: #fff; } .badge-muted { background: #edf0f3; color: var(--muted); }
.grade { display: inline-block; font-weight: 700; padding: 2px 9px; border-radius: 6px; font-size: .8rem; color: #fff; }
.grade-A { background: #1e8e5a; } .grade-B { background: #48a868; } .grade-C { background: #d69e2e; } .grade-D { background: #dd6b20; } .grade-E { background: #c53030; }
.alert { padding: 11px 15px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: var(--ok-50); border-color: #b5e2c9; color: #14633f; }
.alert-error, .alert-danger { background: var(--bad-50); border-color: #f5c2c2; color: #9b2c2c; }
.alert-warn { background: var(--warn-50); border-color: #f1d9a2; color: #8a5a12; }
.alert-info { background: var(--info-50); border-color: #bcd5f2; color: #1f4f85; }

/* ---------- tabs, steps, misc */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { padding: 9px 14px; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none !important; }
.tabs .on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tab-pane { display: none; } .tab-pane.on { display: block; }
.steps { display: flex; gap: 0; margin: 4px 0 18px; }
.steps div { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); position: relative; padding-top: 30px; }
.steps div::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: var(--ink-2); display: grid; place-items: center; font-weight: 700; z-index: 1; }
.steps div::after { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: #e2e8f0; }
.steps div:first-child::after { display: none; }
.steps .done::before, .steps .done::after { background: var(--ok); color: #fff; }
.steps .cur::before { background: var(--primary); color: #fff; }
.steps .bad::before { background: var(--bad); color: #fff; }
.pager { display: flex; gap: 4px; align-items: center; padding: 12px 0 0; flex-wrap: wrap; }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pager a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photo-lg { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.profile-head { display: flex; gap: 18px; align-items: center; }
.profile-head h2 { margin: 0 0 4px; }
.meter { height: 8px; background: #edf0f3; border-radius: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 0 0 12px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline small { display: block; }
.repeat-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) 40px; align-items: end; margin-bottom: 8px; }
.rm { border: 0; background: var(--bad-50); color: var(--bad); width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; }
.chip { display: inline-block; background: var(--primary-50); color: var(--primary); padding: 2px 10px; border-radius: 14px; font-size: .8rem; margin: 2px; }
.quote-box { background: var(--primary-50); border: 1px dashed var(--primary-100); border-radius: var(--radius); padding: 14px 16px; }
.quote-box .kv th { width: 55%; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.perm-grid fieldset { margin: 0; }
.chart-box { position: relative; height: 280px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); gap: 10px; }
.mini-list li:last-child { border-bottom: 0; }

/* modal */
.modal { display: none; position: fixed; z-index: 60; left: 50%; top: 8vh; transform: translateX(-50%); width: min(560px, 94vw); max-height: 84vh; overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 22px; }
.modal.on, .modal-back.on { display: block; }
.modal-back { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 55; }
.modal h3 { margin-top: 0; }
.modal .close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }

/* ---------- auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--primary), var(--sidebar)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 2rem; line-height: 1.2; }
.auth-form { display: grid; place-items: center; padding: 30px; background: #fff; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 1.6rem; }

/* ---------- icons (CSS masks) */
.ico { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; opacity: .9; }
.ico-grid { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.ico-users { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21v-1a6 6 0 0 1 12 0v1M16 3.5a4 4 0 0 1 0 9M22 21v-1a6 6 0 0 0-4-5.6'/%3E%3C/svg%3E"); }
.ico-user { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a8 8 0 0 1 16 0v1'/%3E%3C/svg%3E"); }
.ico-user-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21v-1a7 7 0 0 1 14 0v1M19 8v6M16 11h6'/%3E%3C/svg%3E"); }
.ico-shield { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 2l8 4v6c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.ico-share { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E"); }
.ico-file { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.ico-plus { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.ico-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M9 11l3 3 8-8'/%3E%3Cpath d='M20 12v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E"); }
.ico-send { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M22 2L11 13M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E"); }
.ico-cash { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.ico-alert { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ico-wallet { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M20 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0 0 4h15v13H5a2 2 0 0 1-2-2V5'/%3E%3Cpath d='M16 14h.01'/%3E%3C/svg%3E"); }
.ico-bank { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 10l9-6 9 6M5 10v8M9 10v8M15 10v8M19 10v8M3 21h18'/%3E%3C/svg%3E"); }
.ico-receipt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M5 2h14v20l-3-2-2 2-2-2-2 2-2-2-3 2z'/%3E%3Cpath d='M9 7h6M9 11h6M9 15h4'/%3E%3C/svg%3E"); }
.ico-award { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M8.2 13.2L7 22l5-3 5 3-1.2-8.8'/%3E%3C/svg%3E"); }
.ico-chart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 15l4-4 3 3 6-6'/%3E%3C/svg%3E"); }
.ico-star { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/%3E%3C/svg%3E"); }
.ico-key { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='7.5' cy='15.5' r='4.5'/%3E%3Cpath d='M10.7 12.3L21 2M16 7l3 3M18 5l3 3'/%3E%3C/svg%3E"); }
.ico-cog { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2V21a2 2 0 1 1-4 0v-.1A1.7 1.7 0 0 0 7 19.4l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 13.7H3a2 2 0 1 1 0-4h.1A1.7 1.7 0 0 0 4.6 7l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 10.3 3V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0 1.2 2.9H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
.ico-mail { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E"); }
.ico-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }

/* ---------- responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .burger { display: block; }
  .top-search, .userbox .who { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; }
  .form-grid .span2 { grid-column: auto; }
}
@media print {
  .sidebar, .topbar, .foot, .page-actions, .filters, .btn, .no-print { display: none !important; }
  .main { margin: 0; } .content { padding: 0; } .card { box-shadow: none; border: 0; }
}
