/* Iscars Ledger: app styles. Light only. One font (Satoshi), one accent (indigo),
   teal = money in, coral = money out (validated for colour-blind separation; position
   and +/− signs carry direction too). */

:root {
	--bg: #F4F5F8;
	--surface: #FFFFFF;
	--surface-2: #F8F9FB;
	--surface-3: #EEF0F4;
	--line: #E4E7EC;
	--line-2: #D3D8E0;
	--t1: #0F1217;
	--t2: #475064;
	--t3: #687185;
	--accent: #4558D6;
	--accent-hover: #3B4DC4;
	--accent-press: #3342AD;
	--accent-tint: #EEF0FC;
	--accent-ink: #3445B5;
	--in: #00806B;
	--in-txt: #007360;
	--in-tint: #E5F3F0;
	--out: #EE6A47;
	--out-txt: #C0432A;
	--out-tint: #FDEDE8;
	--ok: #16A36A;
	--ok-txt: #0F7A50;
	--warn: #E59A00;
	--warn-txt: #8F5300;
	--bad: #E0392C;
	--bad-txt: #BE2A1E;
	--info: #4558D6;
	--idle: #A3AAB7;
	--r-card: 14px;
	--r-ctl: 10px;
	--r-sm: 7px;
	--pop: 0 18px 50px -14px rgba(15, 18, 23, .28), 0 2px 8px rgba(15, 18, 23, .06);
	--font: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--side-w: 252px;
	--top-h: 62px;
	--tab-h: 62px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body.ilg { margin: 0; background: var(--bg); color: var(--t1); font-family: var(--font); font-size: 14.5px; line-height: 1.5; font-weight: 450; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
:where(.ilg) h1, :where(.ilg) h2, :where(.ilg) h3, :where(.ilg) p { margin: 0; }
:where(.ilg) a { color: inherit; text-decoration: none; }
:where(.ilg) button { font: inherit; color: inherit; }
:where(.ilg) img { max-width: 100%; display: block; }
:where(.ilg) ul, :where(.ilg) ol { margin: 0; padding: 0; list-style: none; }
.ilg [hidden] { display: none !important; }
.ilg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ilg-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--t1); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.ilg-skip:focus { top: 12px; }
.ilg :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ilg-i { width: 18px; height: 18px; flex: none; }
.ilg-num, .ilg-amt, .ilg-row__amt, .ilg-row__c1, .ilg-row__c2, .ilg-row__bal { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ilg-muted { color: var(--t3); }
.ilg-center { text-align: center; }
.ilg-r { text-align: right; justify-content: flex-end; }
.ilg-pad { padding: 16px 20px; }
.ilg-link { color: var(--accent-ink); font-weight: 550; }
@media (hover: hover) and (pointer: fine) { .ilg-link:hover { text-decoration: underline; text-underline-offset: 3px; } }
button, a, [role="button"], label { touch-action: manipulation; }
button, .ilg-btn, .ilg-seg__btn, .ilg-tabbar__item, .ilg-nav__item, .ilg-chip { user-select: none; -webkit-user-select: none; }

.ilg-amt--in, .ilg-amt--in-txt { color: var(--in-txt); }
.ilg-amt--out, .ilg-amt--out-txt { color: var(--out-txt); }
.ilg-amt { white-space: nowrap; font-weight: 600; }

/* ---------- buttons ---------- */
.ilg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--t1); font-weight: 600; font-size: 14px; line-height: 1; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .1s var(--ease); text-decoration: none; }
.ilg-btn .ilg-i { width: 17px; height: 17px; }
.ilg-btn:active { transform: scale(.98); }
.ilg-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ilg-btn--primary:active { background: var(--accent-press); }
.ilg-btn--ghost { border-color: transparent; background: transparent; color: var(--t2); }
.ilg-btn--danger { color: var(--bad-txt); }
.ilg-btn--danger-ghost { border-color: transparent; background: transparent; color: var(--bad-txt); }
.ilg-btn--sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.ilg-btn--block { width: 100%; min-height: 46px; font-size: 15px; }
.ilg-btn[disabled], .ilg-btn.is-busy { opacity: .6; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
	.ilg-btn:hover { background: var(--surface-2); border-color: #C3C9D3; }
	.ilg-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
	.ilg-btn--ghost:hover, .ilg-btn--danger-ghost:hover { background: var(--surface-3); border-color: transparent; }
}
.ilg-iconbtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--t2); cursor: pointer; flex: none; }
.ilg-iconbtn:active { background: var(--surface-3); }
@media (hover: hover) and (pointer: fine) { .ilg-iconbtn:hover { background: var(--surface-3); color: var(--t1); } }
.ilg-linkbtn { border: 0; background: none; padding: 4px 2px; color: var(--accent-ink); font-weight: 550; cursor: pointer; font-size: 13px; }
.ilg-linkbtn--danger { color: var(--bad-txt); }
.ilg-kbd { font: inherit; font-size: 11.5px; color: var(--t3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; line-height: 18px; background: var(--surface); }
.ilg-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; margin-left: 2px; }

/* ---------- app shell ---------- */
.ilg-app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.ilg-side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; z-index: 40; }
.ilg-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.ilg-brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--t1); color: #fff; flex: none; }
.ilg-brand__mark .ilg-i { width: 18px; height: 18px; }
.ilg-brand__name { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; flex: 1; min-width: 0; }
.ilg-brand__name span { color: var(--t3); font-weight: 500; }
.ilg-side__close { display: none; }
.ilg-nav { flex: 1; padding: 6px 10px; }
.ilg-nav__group + .ilg-nav__group { margin-top: 14px; }
.ilg-nav__label { padding: 6px 10px; font-size: 12.5px; color: var(--t3); font-weight: 550; }
.ilg-nav__item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border-radius: 9px; color: var(--t2); font-weight: 550; transition: background-color .15s, color .15s; }
.ilg-nav__item .ilg-i { color: var(--t3); }
.ilg-nav__item.is-on { background: var(--accent-tint); color: var(--accent-ink); }
.ilg-nav__item.is-on .ilg-i { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .ilg-nav__item:not(.is-on):hover { background: var(--surface-2); color: var(--t1); } }
.ilg-side__foot { padding: 12px; border-top: 1px solid var(--line); }
.ilg-me { display: flex; align-items: center; gap: 10px; }
.ilg-me__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ilg-me__txt strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-me__txt span { color: var(--t3); font-size: 12.5px; }
.ilg-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--t2); font-weight: 650; font-size: 12.5px; flex: none; }
.ilg-avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.ilg-scrim { position: fixed; inset: 0; background: rgba(15, 18, 23, .38); z-index: 35; }

.ilg-body { min-width: 0; display: flex; flex-direction: column; }
.ilg-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 28px; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.ilg-top.is-scrolled { border-bottom-color: var(--line); background: rgba(244, 245, 248, .96); }
.ilg-top__menu { display: none; }
.ilg-top__title { display: none; font-weight: 650; font-size: 16px; }
.ilg-search-trigger { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--t3); cursor: text; text-align: left; }
.ilg-search-trigger__txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .ilg-search-trigger:hover { border-color: #C3C9D3; } }
.ilg-top__actions { margin-left: auto; display: flex; gap: 8px; }
.ilg-main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 12px 28px 56px; outline: none; }
.ilg-main > * + * { margin-top: 18px; }
.ilg-main.is-loading { opacity: .55; transition: opacity .15s .1s; pointer-events: none; }

/* ---------- page head ---------- */
.ilg-crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--t3); font-weight: 550; font-size: 13.5px; }
.ilg-crumbs .ilg-i { width: 16px; height: 16px; }
.ilg-crumbs + .ilg-head { margin-top: 6px; }
.ilg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.ilg-head__txt { min-width: 0; flex: 1 1 300px; }
.ilg-head h1 { font-size: 26px; line-height: 1.2; font-weight: 650; letter-spacing: -.022em; overflow-wrap: anywhere; }
.ilg-head p { margin-top: 5px; color: var(--t3); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.ilg-head__act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.ilg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; min-width: 0; }
.ilg-card.ilg-flush { padding: 0; overflow: hidden; }
/* clip (not hidden) so sticky day headers stick to the page, not inside the card */
@supports (overflow: clip) { .ilg-card.ilg-flush { overflow: clip; } }
@supports not (overflow: clip) { .ilg-day { position: static !important; } }
.ilg-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ilg-card.ilg-flush > .ilg-card__head { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.ilg-card__title { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.ilg-card > .ilg-card__title { margin-bottom: 12px; }
.ilg-card__sub { color: var(--t3); font-size: 13.5px; margin-top: 2px; }
.ilg-card__big { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; }
.ilg-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* metrics */
.ilg-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ilg-metrics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ilg-metric { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); min-width: 0; overflow: hidden; transition: border-color .15s; }
a.ilg-metric:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { a.ilg-metric:hover { border-color: var(--line-2); } }
.ilg-metric__label { color: var(--t3); font-weight: 550; font-size: 13.5px; }
.ilg-metric__value { font-size: 23px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; } /* never cut a money figure short */
.ilg-metric__foot { color: var(--t3); font-size: 12.5px; min-height: 18px; }
.ilg-metric .ilg-spark { height: 30px; margin-top: 8px; }
.ilg-delta { font-weight: 650; }
.ilg-delta.is-good { color: var(--ok-txt); }
.ilg-delta.is-bad { color: var(--bad-txt); }
.ilg-spark { display: block; width: 100%; }
.ilg-spark svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* status: dot + words */
.ilg-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 550; color: var(--t2); white-space: nowrap; }
.ilg-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); flex: none; }
.ilg-status--ok i { background: var(--ok); } .ilg-status--ok { color: var(--ok-txt); }
.ilg-status--warn i { background: var(--warn); } .ilg-status--warn { color: var(--warn-txt); }
.ilg-status--bad i { background: var(--bad); } .ilg-status--bad { color: var(--bad-txt); }
.ilg-status--info i { background: var(--info); }

/* attention */
.ilg-attn { padding: 6px 8px; }
.ilg-attn .ilg-card__title { padding: 10px 12px 4px; }
.ilg-attn li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; font-weight: 550; }
.ilg-attn li a > span:not(.ilg-status) { flex: 1; min-width: 0; }
.ilg-attn li a .ilg-i { color: var(--t3); }
.ilg-attn .ilg-status { gap: 0; }
@media (hover: hover) and (pointer: fine) { .ilg-attn li a:hover { background: var(--surface-2); } }

/* simple lists */
.ilg-simple li + li { border-top: 1px solid var(--line); }
.ilg-simple li > a, .ilg-simple li > button { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 14px; width: 100%; padding: 12px 20px; background: none; border: 0; text-align: left; cursor: pointer; }
.ilg-simple--plain li { padding: 10px 0; }
.ilg-simple__main { display: flex; flex-direction: column; min-width: 0; }
.ilg-simple__main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-simple__main span { color: var(--t3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-simple__val { font-weight: 650; white-space: nowrap; }
.ilg-simple .ilg-bar { grid-column: 1 / -1; margin-top: 8px; }
.ilg-bar { display: block; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.ilg-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
@media (hover: hover) and (pointer: fine) { .ilg-simple li > a:hover, .ilg-simple li > button:hover { background: var(--surface-2); } }

/* ---------- filters ---------- */
.ilg-filters { display: flex; flex-direction: column; gap: 10px; }
.ilg-filters__row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ilg-filters__quick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ilg-searchbox { position: relative; flex: 1 1 280px; min-width: 0; display: flex; align-items: center; }
.ilg-searchbox .ilg-i { position: absolute; left: 12px; color: var(--t3); pointer-events: none; }
.ilg-searchbox input { width: 100%; height: 40px; padding: 0 12px 0 38px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); font: inherit; font-size: 14.5px; color: var(--t1); }
.ilg-searchbox input::placeholder { color: var(--t3); }
.ilg-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: var(--r-ctl); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ilg-seg::-webkit-scrollbar { display: none; }
.ilg-seg__btn { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 11px; border-radius: 8px; color: var(--t2); font-weight: 600; font-size: 13.5px; white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s; }
.ilg-seg__btn.is-on { background: var(--surface); color: var(--t1); box-shadow: 0 1px 2px rgba(15, 18, 23, .08), 0 0 0 1px rgba(15, 18, 23, .04); }
.ilg-seg__btn .ilg-count { background: var(--t2); }
@media (hover: hover) and (pointer: fine) { .ilg-seg__btn:not(.is-on):hover { color: var(--t1); } }
.ilg-seg--radio { display: flex; }
.ilg-seg--radio .ilg-seg__btn { flex: 1; justify-content: center; }
.ilg-seg--radio input { position: absolute; opacity: 0; pointer-events: none; }
.ilg-seg--radio .ilg-seg__btn:has(input:checked) { background: var(--surface); color: var(--t1); box-shadow: 0 1px 2px rgba(15, 18, 23, .08); }
.ilg-seg--radio .ilg-seg__btn:has(input:focus-visible) { outline: 2px solid var(--accent); }
.ilg-filters__more[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-ink); }
.ilg-adv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.ilg-adv__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ilg-adv__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ilg-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ilg-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px 0 11px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-ink); font-weight: 600; font-size: 13px; max-width: 100%; }
.ilg-chip .ilg-i { width: 14px; height: 14px; }
.ilg-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--t3); font-size: 13.5px; align-items: center; }
.ilg-summary strong { color: var(--t1); font-weight: 650; }
.ilg-summary .ilg-amt { font-size: 13.5px; }

/* ---------- fields ---------- */
.ilg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ilg-field > span:first-child { font-weight: 600; font-size: 13.5px; color: var(--t2); }
.ilg-field > span:first-child em { font-style: normal; color: var(--t3); font-weight: 500; }
.ilg-field__hint { color: var(--t3); font-size: 12.5px; }
.ilg input:not([type]), .ilg input[type="text"], .ilg input[type="search"], .ilg input[type="email"], .ilg input[type="tel"], .ilg input[type="password"], .ilg input[type="number"], .ilg input[type="date"], .ilg select, .ilg textarea {
	width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background-color: var(--surface); font: inherit; font-size: 16px; font-weight: 450; color: var(--t1); transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.ilg .ilg-searchbox input { padding-left: 38px; }
.ilg textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.ilg input:focus, .ilg select:focus, .ilg textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(69, 88, 214, .16); }
.ilg select { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687185' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.ilg-app select, .ilg-form select, .ilg-filters select, .ilg-catrow select { background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.ilg input[type="date"] { min-width: 0; }
.ilg input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.ilg-field--inline { flex-direction: row; }
.ilg-field--inline select { min-height: 38px; height: 38px; padding-top: 0; padding-bottom: 0; font-size: 14px; }
.ilg-filters .ilg-field input, .ilg-filters .ilg-field select { font-size: 14.5px; }
.ilg-amountbox { position: relative; display: flex; align-items: center; }
.ilg-amountbox > span { position: absolute; left: 14px; color: var(--t3); font-weight: 650; font-size: 20px; pointer-events: none; }
.ilg .ilg-amountbox input { padding-left: 38px; min-height: 56px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ilg-amountbox--sm > span { font-size: 15px; left: 12px; }
.ilg .ilg-amountbox--sm input { min-height: 42px; font-size: 16px; font-weight: 600; padding-left: 30px; }
.ilg-prefix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-ctl); overflow: hidden; background: var(--surface); }
.ilg-prefix > span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-2); color: var(--t3); font-size: 14px; white-space: nowrap; border-right: 1px solid var(--line); max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.ilg .ilg-prefix input { border: 0; border-radius: 0; }
.ilg-form { display: flex; flex-direction: column; gap: 16px; }
.ilg-form--narrow { max-width: 620px; }
.ilg-form__2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ilg-formfoot { display: flex; gap: 8px; flex-wrap: wrap; }
.ilg-formerr { color: var(--bad-txt); font-weight: 600; font-size: 13.5px; }
.ilg-field.has-error input, .ilg-field.has-error select { border-color: var(--bad); }

.ilg-switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.ilg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ilg-switch__ui { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); transition: background-color .18s; margin-top: 1px; }
.ilg-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s var(--ease); }
.ilg-switch input:checked + .ilg-switch__ui { background: var(--accent); }
.ilg-switch input:checked + .ilg-switch__ui::after { transform: translateX(16px); }
.ilg-switch input:focus-visible + .ilg-switch__ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.ilg-switch > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ilg-switch small, .ilg-radio small { color: var(--t3); font-size: 12.5px; line-height: 1.4; }
.ilg-checkline { display: flex; gap: 10px; align-items: center; color: var(--t2); font-size: 14px; cursor: pointer; }
.ilg-checkline input { width: 18px; height: 18px; accent-color: var(--accent); }
.ilg-kind { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ilg-radio { position: relative; display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ilg-radio input { margin: 2px 0 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.ilg-radio > span { display: flex; flex-direction: column; }
.ilg-radio strong { font-weight: 600; font-size: 14px; }
.ilg-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.ilg-more { border-top: 1px solid var(--line); padding-top: 12px; }
.ilg-more > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--t2); list-style: none; min-height: 32px; }
.ilg-more > summary::-webkit-details-marker { display: none; }
.ilg-more > summary .ilg-i { transition: transform .18s var(--ease); width: 16px; height: 16px; }
.ilg-more[open] > summary .ilg-i { transform: rotate(180deg); }
.ilg-more[open] > summary + * { margin-top: 12px; }
.ilg-more[open] > * + * { margin-top: 14px; }

/* money in / out picker */
.ilg-dirpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ilg-dirpick__opt { position: relative; cursor: pointer; }
.ilg-dirpick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.ilg-dirpick__opt > span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); font-weight: 650; color: var(--t2); transition: background-color .15s, border-color .15s, color .15s; }
.ilg-dirpick__opt--in input:checked + span { background: var(--in-tint); border-color: var(--in); color: var(--in-txt); }
.ilg-dirpick__opt--out input:checked + span { background: var(--out-tint); border-color: var(--out); color: var(--out-txt); }
.ilg-dirpick__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- entry rows ---------- */
.ilg-rows__head { display: none; }
.ilg-day { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 20px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--t3); font-weight: 600; position: sticky; top: var(--top-h); z-index: 2; }
.ilg-rows > .ilg-day:first-child, .ilg-rows__head + .ilg-day { border-top: 0; }
.ilg-day__t { display: flex; gap: 14px; }
.ilg-day__t .ilg-amt { font-weight: 600; font-size: 13px; }
.ilg-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 13px 20px; min-height: 60px; }
.ilg-row + .ilg-row { border-top: 1px solid var(--line); }
.ilg-row__hit { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; z-index: 1; border-radius: 0; }
.ilg-row__hit:focus-visible { outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .ilg-row:hover { background: var(--surface-2); } }
.ilg-row:active { background: var(--surface-2); }
.ilg-row__state { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ok); }
.ilg-row__state i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--warn); }
.ilg-row__state .ilg-i { width: 19px; height: 19px; }
.ilg-row__main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ilg-row__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-row.is-done .ilg-row__title { color: var(--t2); }
.ilg-row.is-deleted { opacity: .6; }
.ilg-row.is-deleted .ilg-row__title { text-decoration: line-through; }
.ilg-row__sub { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--t3); font-size: 13px; min-width: 0; }
.ilg-row__desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ilg-tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ilg-tag .ilg-i { width: 14px; height: 14px; }
.ilg-row__amt { font-size: 15px; text-align: right; }
.ilg-row__amt .ilg-amt { font-weight: 650; }
.ilg-rows--compact .ilg-row { min-height: 54px; padding-top: 10px; padding-bottom: 10px; }
.ilg-rows--compact .ilg-day { position: static; }

/* selection */
.ilg-check { position: relative; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; cursor: pointer; }
.ilg-check input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ilg-check span { width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 5px; background: var(--surface); transition: background-color .12s, border-color .12s; }
.ilg-check input:checked + span { background: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 13px; background-position: center; background-repeat: no-repeat; }
.ilg-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ilg-row__sel { display: none; }
.ilg-rows--select.is-selecting .ilg-row { grid-template-columns: 22px 22px minmax(0, 1fr) auto; }
.ilg-rows--select.is-selecting .ilg-row__sel { display: grid; }
.ilg-row.is-selected { background: var(--accent-tint); }
.ilg-bulk { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--t1); color: #fff; border-radius: 14px; box-shadow: var(--pop); max-width: calc(100vw - 24px); }
.ilg-bulk__n { font-weight: 650; margin-right: 6px; white-space: nowrap; }
.ilg-bulk .ilg-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.ilg-bulk .ilg-btn--danger { color: #FFB4A8; }
.ilg-bulk .ilg-iconbtn { color: #fff; }

/* books (account / debtor) */
.ilg-rows--book .ilg-row { grid-template-columns: 22px minmax(0, 1fr) 130px 130px 150px; }
.ilg-rows--book .ilg-rows__head { display: grid; grid-template-columns: 22px minmax(0, 1fr) 130px 130px 150px; column-gap: 12px; padding: 10px 20px; font-size: 12.5px; color: var(--t3); font-weight: 600; border-bottom: 1px solid var(--line); }
.ilg-rows--book .ilg-rows__head span:first-child { grid-column: 2; }
.ilg-rows--book .ilg-rows__head span:not(:first-child) { text-align: right; }
.ilg-row__c1, .ilg-row__c2, .ilg-row__bal { text-align: right; font-size: 14.5px; }
.ilg-row__bal { font-weight: 650; }
.ilg-row__ballbl { display: none; }
.ilg-row__amt--phone { display: none; }
.ilg-opening { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--surface-2); border-top: 1px solid var(--line); color: var(--t3); font-weight: 550; }
.ilg-opening strong { color: var(--t1); }

.ilg-books li + li { border-top: 1px solid var(--line); }
.ilg-books a { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px auto 18px; align-items: center; gap: 14px; padding: 14px 20px; }
.ilg-books li.is-archived { opacity: .6; }
.ilg-books__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-3); color: var(--t2); }
.ilg-books__main { display: flex; flex-direction: column; min-width: 0; }
.ilg-books__main strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-books__main span { color: var(--t3); font-size: 13px; }
.ilg-books__spark { height: 30px; }
.ilg-books__bal { font-weight: 650; font-size: 16px; text-align: right; white-space: nowrap; }
.ilg-books__chev { color: var(--t3); }
@media (hover: hover) and (pointer: fine) { .ilg-books a:hover { background: var(--surface-2); } }

/* quick debtor actions */
.ilg-quick2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ilg-quick2__btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, background-color .15s; }
.ilg-quick2__btn > .ilg-i { width: 36px; height: 36px; padding: 8px; border-radius: 10px; }
.ilg-quick2__btn--in > .ilg-i { background: var(--in-tint); color: var(--in-txt); }
.ilg-quick2__btn--out > .ilg-i { background: var(--out-tint); color: var(--out-txt); }
.ilg-quick2__btn span { display: flex; flex-direction: column; }
.ilg-quick2__btn strong { font-weight: 650; }
.ilg-quick2__btn small { color: var(--t3); font-size: 13px; }
.ilg-quick2__btn:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .ilg-quick2__btn:hover { border-color: var(--line-2); } }

/* tables (div based, stack on phones) */
.ilg-table__head, .ilg-table__row { display: grid; align-items: center; column-gap: 14px; padding: 12px 20px; }
.ilg-table__head { font-size: 12.5px; color: var(--t3); font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
.ilg-table__row + .ilg-table__row { border-top: 1px solid var(--line); }
a.ilg-table__row:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { a.ilg-table__row:hover { background: var(--surface-2); } }
.ilg-table--debtors .ilg-table__head, .ilg-table--debtors .ilg-table__row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.3fr) 120px 140px 150px; }
.ilg-table--months .ilg-table__head, .ilg-table--months .ilg-table__row { grid-template-columns: minmax(0, 1fr) 160px 160px 160px; }
.ilg-table--log .ilg-table__head, .ilg-table--log .ilg-table__row { grid-template-columns: 130px 160px minmax(0, 1fr); align-items: start; }
.ilg-table__name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ilg-table__name > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ilg-table__name strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-table__name span span { color: var(--t3); font-size: 13px; }
.ilg-table__muted { color: var(--t3); font-size: 13.5px; }
.ilg-table__owes strong { font-weight: 700; font-size: 15px; }
.ilg-table__paid { color: var(--t2); }
.ilg-table [role="cell"] { min-width: 0; overflow-wrap: anywhere; }

/* charts */
.ilg-chartcard .ilg-card__head { margin-bottom: 8px; }
.ilg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--t2); font-size: 13px; font-weight: 550; }
.ilg-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ilg-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ilg-key--in { background: var(--in); }
.ilg-key--out { background: var(--out); }
.ilg-key--line { height: 2px; width: 14px; border-radius: 1px; background: var(--t1); }
.ilg-chart { position: relative; height: 280px; width: 100%; }
.ilg-chart--short { height: 200px; }
.ilg-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ilg-chart .ax { fill: var(--t3); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.ilg-chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.ilg-chart .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.ilg-chart .b-in { fill: var(--in); }
.ilg-chart .b-out { fill: var(--out); }
.ilg-chart .ln { fill: none; stroke: var(--t1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ilg-chart .ln--bal { stroke: var(--accent); }
.ilg-chart .area { fill: var(--accent); opacity: .1; }
.ilg-chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.ilg-chart .xh { stroke: var(--line-2); stroke-width: 1; }
.ilg-chart .hit { fill: transparent; cursor: crosshair; }
.ilg-chart .is-dim { opacity: .45; }
.ilg-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--t1); color: #fff; padding: 9px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; box-shadow: var(--pop); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.ilg-tip b { font-weight: 650; display: block; margin-bottom: 2px; }
.ilg-tip span { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.ilg-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.ilg-spark .sp-l { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.ilg-spark .sp-a { opacity: .1; }
.ilg-spark[data-tone="in"] .sp-l { stroke: var(--in); } .ilg-spark[data-tone="in"] .sp-a { fill: var(--in); }
.ilg-spark[data-tone="out"] .sp-l { stroke: var(--out); } .ilg-spark[data-tone="out"] .sp-a { fill: var(--out); }
.ilg-spark[data-tone="bal"] .sp-l { stroke: var(--accent); } .ilg-spark[data-tone="bal"] .sp-a { fill: var(--accent); }

.ilg-hbars { display: flex; flex-direction: column; gap: 12px; }
.ilg-hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.ilg-hbars__name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-hbars__val { font-weight: 650; }
.ilg-hbars__track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ilg-hbars__track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.ilg-hbars--in i { background: var(--in); }
.ilg-hbars--out i { background: var(--out); }
.ilg-segbar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.ilg-segbar__p { display: block; min-width: 4px; }
/* ageing scale: calm indigo -> amber -> brick -> deep red (not the coral of money out) */
.ilg-segbar__p--1 { background: #8FA0F0; }
.ilg-segbar__p--2 { background: #E3A82B; }
.ilg-segbar__p--3 { background: #B5531A; }
.ilg-segbar__p--4 { background: #7E1D14; }
.ilg-segleg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ilg-segleg li { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ilg-segleg li > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--t2); font-weight: 550; }
.ilg-segleg strong { font-size: 16px; font-weight: 700; }
.ilg-segleg__k { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ilg-proofs-intro { margin-bottom: 14px; }
.ilg-card > .ilg-muted + .ilg-form { margin-top: 18px; }

/* ---------- empty / start ---------- */
.ilg-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 16px; gap: 6px; }
.ilg-empty__i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--surface-3); color: var(--t2); margin-bottom: 6px; }
.ilg-empty__t { font-weight: 650; font-size: 15px; }
.ilg-empty__x { color: var(--t3); max-width: 380px; }
.ilg-empty .ilg-btn { margin-top: 10px; }
.ilg-start h2 { font-size: 18px; font-weight: 650; }
.ilg-steps { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ilg-steps li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.ilg-steps__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; flex: none; }
.ilg-steps p { color: var(--t3); font-size: 13.5px; margin: 2px 0 10px; }

/* ---------- notices, notes, proofs ---------- */
.ilg-notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--r-ctl); background: var(--accent-tint); color: var(--t1); font-size: 14px; }
.ilg-notice > .ilg-i { color: var(--accent); margin-top: 1px; }
.ilg-notice > span { flex: 1; }
.ilg-notice--warn { background: #FFF5E0; }
.ilg-notice--warn > .ilg-i { color: var(--warn-txt); }
.ilg-notice--bad { background: #FDECEA; }
.ilg-notice--bad > .ilg-i { color: var(--bad-txt); }
.ilg-noteform { display: flex; flex-direction: column; gap: 8px; }
.ilg-noteform__foot { display: flex; justify-content: flex-end; }
.ilg-notelist { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ilg-notelist li { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.ilg-notelist li.is-pinned { border-color: #C9D0F5; background: #F7F8FE; }
.ilg-notelist p { white-space: normal; overflow-wrap: anywhere; }
.ilg-notelist__meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; color: var(--t3); font-size: 12.5px; align-items: center; }
.ilg-notelist__meta .ilg-i { width: 13px; height: 13px; vertical-align: -2px; }
.ilg-notelist__act { display: flex; gap: 10px; }
.ilg-notecards li { padding: 16px 20px; }
.ilg-notecards li + li { border-top: 1px solid var(--line); }
.ilg-notecards li.is-pinned { background: #FAFBFF; }
.ilg-notecards__top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.ilg-notecards__top .ilg-linkbtn { padding: 0; text-align: left; }
.ilg-notecards__top .ilg-i { width: 13px; height: 13px; vertical-align: -2px; }
.ilg-notecards p { overflow-wrap: anywhere; }

.ilg-proofs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.ilg-proof, .ilg-drop { position: relative; display: flex; flex-direction: column; min-height: 196px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; text-align: left; cursor: pointer; padding: 0; transition: border-color .15s; }
@media (hover: hover) and (pointer: fine) { .ilg-proof:hover { border-color: var(--line-2); } }
.ilg-proof__img { display: block; height: 116px; background: var(--surface-3); flex: none; }
.ilg-proof__img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.ilg-proof__pdf { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; color: var(--t2); font-weight: 650; font-size: 12px; }
.ilg-proof__pdf .ilg-i { width: 30px; height: 30px; }
.ilg-proof__txt { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 11px; min-width: 0; }
.ilg-proof__txt strong { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-proof__txt > span:not(.ilg-status) { color: var(--t3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-proof__txt .ilg-status { font-size: 12px; margin-top: 2px; }
.ilg-proof.is-uploading { opacity: .7; }
.ilg-proof__bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transition: width .2s; }
.ilg-drop { align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--t2); text-align: center; padding: 16px; }
.ilg-drop > span { display: flex; flex-direction: column; }
.ilg-drop strong { font-weight: 650; color: var(--t1); }
.ilg-drop small { color: var(--t3); font-size: 12.5px; }
.ilg-drop .ilg-i { width: 24px; height: 24px; }
.ilg-drop.is-over { border-color: var(--accent); background: var(--accent-tint); }
.ilg-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ilg-proofs--form { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ilg-proofs--form .ilg-drop, .ilg-proofs--form .ilg-proof { min-height: 150px; }
.ilg-proofs--form .ilg-proof__img { height: 80px; }
.ilg-suggest { margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid #C9D0F5; background: #F7F8FE; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ilg-suggest__txt { flex: 1 1 220px; min-width: 0; font-size: 13.5px; }
.ilg-suggest__txt strong { display: block; font-weight: 650; font-size: 14px; }
.ilg-ocrline { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; color: var(--t2); font-size: 13.5px; }
.ilg-ocrline .ilg-i { color: var(--t3); margin-top: 1px; width: 16px; height: 16px; }
.ilg-ocrline .ilg-status { margin-left: 6px; white-space: normal; }
.ilg-ocrtext { white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--t2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; max-height: 320px; overflow: auto; overflow-wrap: anywhere; }
.ilg-ocrstate { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

/* ---------- drawer ---------- */
.ilg-drawer { position: fixed; inset: 0; z-index: 60; }
.ilg-drawer__scrim { position: absolute; inset: 0; background: rgba(15, 18, 23, .4); opacity: 0; transition: opacity .25s var(--ease); }
.ilg-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--pop); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s var(--ease); outline: none; }
.ilg-drawer.is-open .ilg-drawer__scrim { opacity: 1; }
.ilg-drawer.is-open .ilg-drawer__panel { transform: none; }
.ilg-drawer__grip { display: none; }
.ilg-drawer__body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.ilg-drawer__body > form { flex: 1; }
.ilg-dhead { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ilg-dhead__txt { min-width: 0; }
.ilg-dhead h2 { font-size: 19px; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ilg-dhead__kicker { color: var(--t3); font-size: 13px; font-weight: 550; margin-bottom: 2px; }
.ilg-dhead .ilg-muted { font-size: 13.5px; margin-top: 2px; }
.ilg-dbody { padding: 18px 20px 24px; }
.ilg-dbody > * + * { margin-top: 14px; }
.ilg-form.ilg-dbody > * + * { margin-top: 0; }
.ilg-dfoot { position: sticky; bottom: 0; margin: 8px -20px -24px; padding: 12px 20px calc(12px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ilg-dsec { font-size: 14px; font-weight: 650; margin-top: 22px !important; padding-top: 16px; border-top: 1px solid var(--line); }
.ilg-dactions { display: flex; gap: 8px; flex-wrap: wrap; }
.ilg-hero-amt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ilg-hero-amt__v { font-size: 32px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.ilg-dl { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ilg-dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 14px; }
.ilg-dl > div + div { border-top: 1px solid var(--line); }
.ilg-dl dt { color: var(--t3); font-size: 13.5px; }
.ilg-dl dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.ilg-dl--inline { margin-top: 18px; }
.ilg-order { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.ilg-order > span { flex: 1; }
.ilg-history li { display: flex; flex-direction: column; padding: 8px 0; font-size: 13px; }
.ilg-history li + li { border-top: 1px solid var(--line); }
.ilg-history time { color: var(--t3); font-size: 12.5px; }
.ilg-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.ilg-preview img { width: 100%; max-height: 62vh; object-fit: contain; background: var(--surface-3); }
.ilg-preview--pdf object { display: block; width: 100%; height: 62vh; border: 0; }
.ilg-linked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ilg-linked__main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.ilg-linked__main strong { font-weight: 650; }
.ilg-linked__main span { color: var(--t3); font-size: 13px; }
.ilg-matchlist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.ilg-matchlist li + li { border-top: 1px solid var(--line); }

/* ---------- search palette ---------- */
.ilg-search { position: fixed; inset: 0; z-index: 70; }
.ilg-search__scrim { position: absolute; inset: 0; background: rgba(15, 18, 23, .4); }
.ilg-search__panel { position: relative; margin: 9vh auto 0; width: min(680px, calc(100vw - 32px)); max-height: 76vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--pop); overflow: hidden; animation: ilg-pop .18s var(--ease); }
@keyframes ilg-pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.ilg-search__bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.ilg-search__bar > .ilg-i { color: var(--t3); }
.ilg .ilg-search__bar input { border: 0; box-shadow: none; padding: 8px 0; min-height: 40px; font-size: 16.5px; }
.ilg .ilg-search__bar input:focus { box-shadow: none; }
.ilg-search__results { overflow-y: auto; overscroll-behavior: contain; padding: 6px 0 10px; }
.ilg-search__hint { padding: 14px 18px; color: var(--t3); }
.ilg-sgroup__h { display: flex; justify-content: space-between; padding: 10px 18px 4px; font-size: 12.5px; color: var(--t3); font-weight: 600; }
.ilg-sitem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 9px 18px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; }
.ilg-sitem.is-active { background: var(--accent-tint); }
.ilg-sitem__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--t2); overflow: hidden; }
.ilg-sitem__icon img { width: 100%; height: 100%; object-fit: cover; }
.ilg-sitem__txt { display: flex; flex-direction: column; min-width: 0; }
.ilg-sitem__txt strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-sitem__txt span { color: var(--t3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilg-sitem__val { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ilg-sitem__val.in { color: var(--in-txt); } .ilg-sitem__val.out { color: var(--out-txt); }

/* ---------- toasts ---------- */
.ilg-toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.ilg-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 16px; border-radius: 12px; background: var(--t1); color: #fff; box-shadow: var(--pop); font-weight: 550; font-size: 14px; animation: ilg-toast .22s var(--ease); max-width: 100%; }
.ilg-toast--bad { background: #8E1F15; }
.ilg-toast--warn { background: #6B4200; }
.ilg-toast button { border: 0; background: rgba(255,255,255,.12); color: #fff; font-weight: 650; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ilg-toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes ilg-toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* settings */
.ilg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ilg-tabs::-webkit-scrollbar { display: none; }
.ilg-tabs__item { padding: 10px 12px; font-weight: 600; color: var(--t3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ilg-tabs__item.is-on { color: var(--t1); border-bottom-color: var(--accent); }
.ilg-catlist li + li { border-top: 1px solid var(--line); }
.ilg-catrow { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto auto; gap: 10px; align-items: center; padding: 10px 0; }
.ilg-catrow--new { grid-template-columns: minmax(0, 1fr) 160px auto; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.ilg-checks li { display: flex; gap: 10px; padding: 7px 0; color: var(--t2); }
.ilg-checks .ilg-i { color: var(--ok); margin-top: 2px; }
code { font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }

/* pager */
.ilg-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ilg-pager__info { color: var(--t3); font-size: 13.5px; margin-right: auto; }

/* ---------- sign in ---------- */
.ilg-signin-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.ilg-signin { width: 100%; max-width: 400px; }
.ilg-signin__card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; box-shadow: 0 10px 40px -20px rgba(15, 18, 23, .2); }
.ilg-brand--center { padding: 0 0 22px; }
.ilg-signin h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.ilg-signin .ilg-muted { margin: 4px 0 18px; }
.ilg-signin .ilg-notice { margin-bottom: 16px; }
.ilg-signin__foot { text-align: center; margin-top: 16px; font-size: 13.5px; }
.ilg-pass { position: relative; display: block; }
.ilg-pass input { padding-right: 46px !important; }
.ilg-pass .ilg-iconbtn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }

/* ---------- phone tab bar ---------- */
.ilg-tabbar { display: none; }

/* ---------- statement / print ---------- */
.ilg-statement-page { background: var(--surface); }
.ilg-statement { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; }
.ilg-statement__bar { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
.ilg-statement__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--t1); }
.ilg-statement__head h1 { font-size: 30px; font-weight: 700; margin: 2px 0 10px; }
.ilg-statement__sum { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--t3); }
.ilg-statement__sum strong { font-size: 30px; color: var(--t1); font-weight: 700; }
.ilg-stable { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
.ilg-stable th { text-align: left; font-size: 12.5px; color: var(--t3); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
.ilg-stable td { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ilg-stable th.ilg-r, .ilg-stable td.ilg-r { text-align: right; white-space: nowrap; }
.ilg-stable tfoot td { font-weight: 700; border-top: 2px solid var(--t1); border-bottom: 0; font-size: 15px; }
.ilg-stable__bf td { color: var(--t3); }
.ilg-stable-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ilg-stable__d { white-space: nowrap; }
@media (max-width: 560px) {
	.ilg-stable { font-size: 12px; }
	.ilg-stable th, .ilg-stable td { padding: 7px 3px; }
	.ilg-statement { padding-left: 12px; padding-right: 12px; }
	.ilg-statement__head h1, .ilg-statement__sum strong { font-size: 24px; }
	.ilg-statement__sum { align-items: flex-start; text-align: left; }
}
@media print {
	.ilg-noprint { display: none !important; }
	.ilg-statement { padding: 0; }
	body.ilg { background: #fff; }
}

/* ---------- tablet ---------- */
@media (max-width: 1180px) {
	.ilg-metrics:not(.ilg-metrics--3) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ilg-adv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ilg-table--debtors .ilg-table__head, .ilg-table--debtors .ilg-table__row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.3fr) 110px 130px; }
	.ilg-table--debtors .ilg-table__paid, .ilg-table--debtors .ilg-table__head span:nth-child(4) { display: none; }
}
@media (max-width: 1023px) {
	.ilg-app { grid-template-columns: minmax(0, 1fr); }
	.ilg-side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform .28s var(--ease), visibility 0s linear .28s; }
	.ilg-side.is-open { transform: none; visibility: visible; box-shadow: var(--pop); transition: transform .28s var(--ease); }
	.ilg-side__close { display: inline-grid; }
	.ilg-top__menu { display: inline-grid; }
	.ilg-top { padding: 0 16px 0 10px; }
	.ilg-main { padding: 10px 20px 48px; }
	.ilg-rows--book .ilg-row, .ilg-rows--book .ilg-rows__head { grid-template-columns: 22px minmax(0, 1fr) 110px 110px 130px; }
}

/* ---------- phone ---------- */
@media (max-width: 719px) {
	body.ilg { font-size: 15px; }
	.ilg-top { height: 56px; gap: 6px; padding: 0 8px 0 16px; padding-top: env(safe-area-inset-top, 0px); height: calc(56px + env(safe-area-inset-top, 0px)); background: var(--surface); border-bottom-color: var(--line); }
	.ilg-top__menu, .ilg-top__new { display: none; }
	.ilg-top__title { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s var(--ease); }
	.ilg-top.is-titled .ilg-top__title { opacity: 1; transform: none; }
	.ilg-top::before { content: ""; width: 30px; height: 30px; flex: none; margin-right: 4px; border-radius: 9px; background: var(--t1) url("../img/icon.svg") center / 30px no-repeat; }
	.ilg-top.is-titled::before { display: none; }
	.ilg-search-trigger { flex: none; width: 42px; height: 42px; padding: 0; justify-content: center; border: 0; background: transparent; color: var(--t1); }
	.ilg-search-trigger__txt, .ilg-search-trigger .ilg-kbd { display: none; }
	.ilg-search-trigger .ilg-i { width: 21px; height: 21px; }
	.ilg-top__actions { margin-left: 0; }
	.ilg-main { padding: 14px 16px calc(var(--tab-h) + 28px + var(--safe-b)); }
	.ilg-main > * + * { margin-top: 14px; }
	.ilg-head { align-items: flex-start; }
	.ilg-head h1 { font-size: 23px; }
	.ilg-head__txt { flex-basis: 100%; }
	.ilg-head__act .ilg-btn { min-height: 40px; }
	.ilg-hide-phone { display: none !important; }
	.ilg-card { padding: 16px; border-radius: 12px; }
	.ilg-pad { padding: 14px 16px; }
	.ilg-grid2 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.ilg-metrics, .ilg-metrics--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ilg-metrics--3 > :first-child { grid-column: 1 / -1; }
	.ilg-metric { padding: 13px 14px 12px; }
	.ilg-metric__value { font-size: 19px; }
	.ilg-metric__label { font-size: 13px; }
	.ilg-metric__foot { font-size: 12px; }
	.ilg-chart { height: 230px; }
	.ilg-chart--short { height: 170px; }
	.ilg-filters__row { gap: 8px; }
	.ilg-searchbox { flex-basis: 100%; }
	/* every option stays visible: segmented controls fill the width and wrap rather than scroll */
	.ilg-filters__quick { width: 100%; }
	.ilg-filters .ilg-seg, .ilg-filters__row--seg .ilg-seg { display: flex; flex: 1 1 100%; flex-wrap: wrap; overflow: visible; }
	.ilg-filters .ilg-seg__btn { flex: 1 1 auto; justify-content: center; padding: 0 6px; min-height: 36px; }
	.ilg-filters__quick:has(.ilg-filters__more) .ilg-seg { flex: 1 1 0; min-width: 0; }
	.ilg-filters__more span:not(.ilg-count) { display: none; }
	.ilg-filters__more { padding: 0 11px; min-height: 42px; }
	.ilg-filters__row--wrap { flex-wrap: wrap; }
	.ilg-filters .ilg-field--inline { flex: 1 1 100%; }
	.ilg-tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }
	.ilg-tabs__item { padding: 10px 10px; }
	.ilg-row__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
	.ilg-books__main strong, .ilg-table__name strong, .ilg-simple__main strong { white-space: normal; overflow-wrap: anywhere; }
	.ilg-linkbtn { min-height: 36px; padding: 6px 4px; }
	.ilg-chip { min-height: 36px; }
	.ilg-noteform__foot .ilg-btn { min-height: 40px; }
	.ilg-attn { padding: 4px; }
	.ilg-attn li a { padding: 10px 12px; }
	.ilg-adv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ilg-form__2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.ilg-adv .ilg-form__2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ilg-kind { grid-template-columns: minmax(0, 1fr); }
	.ilg-steps { grid-template-columns: minmax(0, 1fr); }
	.ilg-day { padding: 8px 16px; top: calc(56px + env(safe-area-inset-top, 0px)); }
	.ilg-row { padding: 12px 16px; column-gap: 10px; grid-template-columns: 20px minmax(0, 1fr) auto; }
	.ilg-row__amt { font-size: 14.5px; }
	.ilg-row__sub { font-size: 12.5px; gap: 2px 10px; }
	.ilg-rows--book .ilg-rows__head { display: none; }
	.ilg-rows--book .ilg-row { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 2px; }
	.ilg-rows--book .ilg-row__state { grid-row: 1 / 3; }
	.ilg-rows--book .ilg-row__main { grid-row: 1 / 3; }
	.ilg-rows--book .ilg-row__c1, .ilg-rows--book .ilg-row__c2 { display: none; }
	.ilg-rows--book .ilg-row__amt--phone { display: block; grid-column: 3; grid-row: 1; text-align: right; }
	.ilg-rows--book .ilg-row__bal { grid-column: 3; grid-row: 2; font-size: 12.5px; color: var(--t3); font-weight: 550; }
	.ilg-row__ballbl { display: inline; }
	.ilg-rows--select.is-selecting .ilg-row { grid-template-columns: 22px 20px minmax(0, 1fr) auto; }
	.ilg-books a { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 13px 16px; gap: 12px; }
	.ilg-books__icon { width: 36px; height: 36px; }
	.ilg-books__spark, .ilg-books__chev { display: none; }
	.ilg-simple li > a, .ilg-simple li > button { padding: 12px 16px; }
	.ilg-quick2 { gap: 8px; }
	.ilg-quick2__btn { gap: 8px; padding: 8px 10px; min-height: 52px; }
	.ilg-quick2__btn > .ilg-i { width: 30px; height: 30px; padding: 6px; }
	.ilg-quick2__btn small { display: none; }
	.ilg-table__head { display: none; }
	.ilg-table__row { padding: 12px 16px; }
	.ilg-table--debtors .ilg-table__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name owes" "state last"; row-gap: 6px; }
	.ilg-table--debtors .ilg-table__name { grid-area: name; }
	.ilg-table--debtors .ilg-table__owes { grid-area: owes; }
	.ilg-table--debtors .ilg-table__state { grid-area: state; }
	.ilg-table--debtors .ilg-table__muted { grid-area: last; text-align: right; font-size: 12.5px; }
	.ilg-table--debtors .ilg-table__state .ilg-status { white-space: normal; font-size: 12.5px; }
	.ilg-table--months .ilg-table__row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 4px; }
	.ilg-table--months .ilg-table__row > :first-child { grid-column: 1 / -1; }
	.ilg-table--months [data-label]::before { content: attr(data-label); display: block; color: var(--t3); font-size: 12px; font-weight: 500; }
	.ilg-table--months .ilg-r { text-align: left; font-size: 13.5px; }
	.ilg-table--log .ilg-table__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
	.ilg-table--log .ilg-table__row > :nth-child(1) { grid-column: 2; grid-row: 1; text-align: right; font-size: 12.5px; }
	.ilg-table--log .ilg-table__row > :nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 600; }
	.ilg-table--log .ilg-table__row > :nth-child(3) { grid-column: 1 / -1; font-size: 13.5px; }
	.ilg-segleg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ilg-proofs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ilg-proof, .ilg-drop { min-height: 176px; }
	.ilg-proof__img { height: 100px; }
	.ilg-catrow, .ilg-catrow--new { grid-template-columns: minmax(0, 1fr) auto; }
	.ilg-catrow select { grid-column: 1; }
	.ilg-catrow input[type="text"] { grid-column: 1 / -1; }
	.ilg-dl > div { grid-template-columns: 110px minmax(0, 1fr); }
	.ilg-pager { justify-content: space-between; }
	.ilg-pager__info { width: 100%; text-align: center; }
	.ilg-summary { gap: 4px 14px; font-size: 13px; }
	.ilg-hero-amt__v { font-size: 28px; }

	/* bottom sheet drawer */
	.ilg-drawer__panel { top: auto; left: 0; right: 0; width: 100%; max-height: calc(100dvh - 28px - env(safe-area-inset-top, 0px)); height: calc(100dvh - 28px - env(safe-area-inset-top, 0px)); border-radius: 18px 18px 0 0; transform: translateY(100%); }
	.ilg-drawer__grip { display: block; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line-2); z-index: 4; }
	.ilg-dhead { padding: 20px 12px 12px 16px; border-radius: 18px 18px 0 0; }
	.ilg-dbody { padding: 16px 16px 20px; }
	.ilg-dfoot { margin: 8px -16px -20px; padding: 10px 16px calc(10px + var(--safe-b)); }
	.ilg-dfoot { flex-wrap: nowrap; }
	.ilg-dfoot .ilg-btn { flex: 1 1 0; min-height: 46px; padding: 0 10px; white-space: normal; line-height: 1.2; }
	.ilg-dfoot .ilg-btn--ghost { display: none; }
	.ilg-dactions .ilg-btn { flex: 1 1 calc(50% - 4px); }
	.ilg-preview img { max-height: 46vh; }
	.ilg-preview--pdf object { height: 46vh; }

	/* full-screen search */
	.ilg-search__panel { margin: 0; width: 100%; height: 100dvh; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }
	.ilg-search__scrim { display: none; }

	.ilg-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b); background: var(--surface); border-top: 1px solid var(--line); }
	.ilg-tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; border: 0; background: none; color: var(--t3); font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 0; }
	.ilg-tabbar__item .ilg-i { width: 22px; height: 22px; }
	.ilg-tabbar__item.is-on { color: var(--accent-ink); }
	.ilg-tabbar__item:active .ilg-i { transform: scale(.92); }
	.ilg-tabbar__add { justify-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(69, 88, 214, .6); cursor: pointer; transition: transform .1s var(--ease); }
	.ilg-tabbar__add .ilg-i { width: 26px; height: 26px; }
	.ilg-tabbar__add:active { transform: scale(.94); }
	.ilg-bulk { bottom: calc(var(--tab-h) + 12px + var(--safe-b)); left: 12px; right: 12px; transform: none; flex-wrap: wrap; padding: 8px; }
	.ilg-bulk__n { width: 100%; padding: 2px 6px 4px; }
	.ilg-bulk .ilg-btn { flex: 1 1 auto; }
	.ilg-toasts { bottom: calc(var(--tab-h) + 14px + var(--safe-b)); }
	.ilg-signin__card { padding: 24px 20px; }
}
@media (max-width: 360px) {
	.ilg-filters .ilg-seg__btn { padding: 0 3px; font-size: 13px; }
	.ilg-metrics, .ilg-metrics--3 { grid-template-columns: minmax(0, 1fr); }
	.ilg-adv__grid, .ilg-adv .ilg-form__2 { grid-template-columns: minmax(0, 1fr); }
	.ilg-proofs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.ilg-dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

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