/* ==========================================================================
   Loki.Ge — demo apps (requires base.css)
   ========================================================================== */

body.demo { background: #f2f4f8; min-height: 100vh; }

/* ---------- Demo banner ---------- */
.demo-banner {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  height: 44px; padding: 0 20px; background: var(--navy-950); color: var(--slate-300); font-size: .84rem; white-space: nowrap;
}
.demo-banner p { flex: 1; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.demo-banner__tag {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 6px; background: var(--orange-500); color: #fff;
}
.demo-banner a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; white-space: nowrap; }
.demo-banner a:hover { color: var(--green-400); }
.demo-banner .i { width: 1em; height: 1em; }
.demo-banner__cta { color: var(--green-400) !important; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 44px); }

.side {
  position: sticky; top: 44px; height: calc(100vh - 44px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; background: var(--navy-800); color: var(--slate-300);
}
.side__ws { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side__ws img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.side__ws b { display: block; color: #fff; font-size: .95rem; line-height: 1.3; }
.side__ws span { font-size: .76rem; color: var(--slate-400); }
.side__label { margin: 14px 10px 6px; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--slate-500); }
.side__nav { display: grid; gap: 2px; }
.side__nav a, .side__nav span {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: .9rem; font-weight: 600; color: var(--slate-300); transition: background-color .2s, color .2s;
}
.side__nav a:hover { background: var(--navy-700); color: #fff; }
.side__nav a[aria-current="page"] { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--green-400); }
.side__nav a[aria-current="page"] .i { color: var(--green-400); }
.side__nav--muted span { color: var(--slate-500); cursor: not-allowed; }
.side__user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 14px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side__user b { display: block; color: #fff; font-size: .88rem; line-height: 1.3; }
.side__user span:not(.ava) { font-size: .75rem; color: var(--slate-400); }

.main { min-width: 0; display: flex; flex-direction: column; }

.top {
  position: sticky; top: 44px; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__menu { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); align-items: center; justify-content: center; }
.top__title { min-width: 0; flex: 1; }
.top__crumb { font-size: .76rem; color: var(--slate-500); font-weight: 600; }
.top__title h1 { font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.top__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink-2);
}
.period .i { color: var(--slate-500); }
.btn--light { --b-bg: var(--card); --b-fg: var(--ink); --b-bd: var(--line-strong); }
.btn--light:hover { --b-bd: var(--ink); }
.btn--warn { --b-bg: var(--orange-50); --b-fg: var(--orange-700); --b-bd: var(--orange-200); }

.content { padding: 24px 28px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; position: relative; overflow: hidden; }
.kpi__label { font-size: .8rem; font-weight: 600; color: var(--slate-500); display: flex; align-items: center; gap: 8px; }
.kpi__label .i { width: 1em; height: 1em; }
.kpi__value { margin-top: 6px; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.25; }
.kpi__value small { font-size: .9rem; font-weight: 700; color: var(--slate-500); margin-left: 4px; }
.kpi__sub { margin-top: 4px; font-size: .78rem; color: var(--slate-500); }
.kpi--ok .kpi__value { color: var(--green-600); }
.kpi--warn .kpi__value { color: var(--orange-600); }
.kpi--dark { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.kpi--dark .kpi__label, .kpi--dark .kpi__sub, .kpi--dark .kpi__value small { color: var(--slate-300); }
.kpi.bump .kpi__value { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: translateY(-3px); color: var(--green-600); } }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel__head h2 { font-size: 1rem; font-weight: 800; }
.panel__head p { font-size: .8rem; color: var(--slate-500); display: flex; align-items: center; gap: 6px; }
.panel__head p .i { width: 1em; height: 1em; }
.panel__body { padding: 16px 18px; }
.muted { color: var(--slate-500); }

/* ---------- Status chips ---------- */
.st {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.4;
}
.st .i { width: 1em; height: 1em; stroke-width: 2.6; }
.st--ok { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); }
.st--warn { background: var(--orange-50); color: var(--orange-700); box-shadow: inset 0 0 0 1px var(--orange-100); }
.st--info { background: #eef2fb; color: var(--navy-600); box-shadow: inset 0 0 0 1px #dbe3f5; }
.st--muted { background: var(--bg); color: var(--slate-500); box-shadow: inset 0 0 0 1px var(--line); }
.st--pending { background: var(--bg); color: var(--slate-400); }
.st--pending::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Filters ---------- */
.filters { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.filters button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: .8rem; font-weight: 700; color: var(--slate-500);
  display: inline-flex; align-items: center; gap: 6px;
}
.filters button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.filters .count { font-family: var(--font-mono); font-size: .72rem; padding: 0 6px; border-radius: 6px; background: var(--line); color: var(--ink-2); }
.filters button[aria-pressed="true"] .count { background: var(--navy-800); color: #fff; }

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; }
.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.dt th {
  position: relative; text-align: left; white-space: nowrap;
  padding: 10px 12px; font-size: .74rem; font-weight: 700; color: var(--slate-500);
  background: #f7f9fc; border-bottom: 1px solid var(--line);
}
.dt th.num { text-align: right; }
.dt th .i { width: .95em; height: .95em; vertical-align: -2px; margin-left: 4px; color: var(--slate-400); display: inline-block; }
.dt thead tr.dt__group th { background: #fff; color: var(--ink-2); font-size: .78rem; text-align: center; border-bottom: 1px solid var(--line); }
.dt thead tr.dt__group th.side-ours { box-shadow: inset 0 3px 0 var(--navy-800); }
.dt thead tr.dt__group th.side-theirs { box-shadow: inset 0 3px 0 var(--green-500); }
.dt td { padding: 11px 12px; border-bottom: 1px solid #edf0f5; vertical-align: middle; white-space: nowrap; }
.dt tbody tr { transition: background-color .25s; }
.dt tbody tr:hover { background: #f9fbfd; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .idx { color: var(--slate-400); font-family: var(--font-mono); font-size: .78rem; width: 1%; }
.dt .who { white-space: normal; min-width: 120px; }
.dt .who b { display: block; font-weight: 700; line-height: 1.4; }
.dt .who span { font-size: .78rem; color: var(--slate-500); }
.dt .mono { font-size: .82rem; color: var(--ink-2); }
.dt .calc { background: #f8fafc; color: var(--ink-2); cursor: not-allowed; position: relative; }
.dt .calc::after {
  content: ""; position: absolute; left: 6px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%); opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95ad' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity .2s;
}
.dt tr:hover .calc::after { opacity: 1; }
.dt .strong { font-weight: 800; color: var(--ink); }
.dt tfoot td { background: #f4f7fb; font-weight: 800; border-bottom: 0; border-top: 1px solid var(--line); }
.dt tfoot td:first-child { border-bottom-left-radius: 16px; }
.dt tfoot td:last-child { border-bottom-right-radius: 16px; }
.dt .dash { color: var(--slate-400); }
.dt tr.is-selected { background: #f1f7ff; box-shadow: inset 3px 0 0 var(--navy-600); }
.dt tr.is-removed td:not(:last-child) { color: var(--slate-400); text-decoration: line-through; }
.dt tr.dt__day td { background: #f7f9fc; padding: 8px 14px; font-size: .8rem; font-weight: 700; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.dt tr.dt__day .day-meta { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.dt tr.dt__day .day-meta span:last-child { font-weight: 600; color: var(--slate-500); }
.dt tr.dt__day:hover { background: transparent; }
.dt tr.is-closed td { color: var(--ink-2); }
.dt .in { color: var(--green-700); font-weight: 700; }
.dt .out { color: var(--orange-700); font-weight: 700; }
.dt .balance-row td { font-weight: 700; background: #fbfcfe; }

.cell-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; margin: -3px -6px; border: 0; border-radius: 6px;
  background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line-strong);
}
.cell-btn .i { width: .9em; height: .9em; color: var(--slate-400); opacity: 0; transition: opacity .2s; }
.cell-btn:hover { background: var(--green-50); }
.cell-btn:hover .i { opacity: 1; }
.cell-input {
  width: 110px; padding: 6px 8px; border-radius: 8px; border: 2px solid var(--green-500); text-align: right;
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; box-shadow: 0 0 0 4px var(--green-50);
}
.cell-input.is-bad { border-color: var(--orange-500); box-shadow: 0 0 0 4px var(--orange-50); }

.row-actions { display: inline-flex; gap: 2px; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--slate-500);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn--danger:hover { background: var(--orange-50); color: var(--orange-600); }
.icon-btn .i { width: 1.05em; height: 1.05em; }

/* row flashes */
.flash-ok { animation: flashOk 1.4s ease; }
.flash-bad { animation: flashBad 1.2s ease; }
@keyframes flashOk { 0%, 30% { background: var(--green-100); } 100% { background: transparent; } }
@keyframes flashBad { 0%, 35% { background: var(--orange-100); } 100% { background: transparent; } }
.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Try panel ---------- */
.try__list { display: grid; gap: 6px; padding: 10px; }
.try__btn {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left;
  width: 100%; padding: 10px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  transition: background-color .2s, border-color .2s;
}
.try__btn:hover { background: var(--bg); border-color: var(--line); }
.try__btn b { display: block; font-size: .88rem; font-weight: 700; line-height: 1.35; }
.try__btn span.sub { display: block; font-size: .76rem; color: var(--slate-500); line-height: 1.4; }
.try__btn > .i { color: var(--slate-400); width: 1em; height: 1em; }
.try__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-800); color: #fff; }
.try__icon .i { width: 1.05em; height: 1.05em; }
.try__icon--warn { background: var(--orange-50); color: var(--orange-600); box-shadow: inset 0 0 0 1px var(--orange-100); }
.try__icon--ok { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-100); }
.try__icon--info { background: #eef2fb; color: var(--navy-600); box-shadow: inset 0 0 0 1px #dbe3f5; }

/* ---------- Activity log ---------- */
.log__list { padding: 6px 18px 14px; display: grid; max-height: 420px; overflow-y: auto; }
.log__item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: .84rem; }
.log__item:last-child { border-bottom: 0; }
.log__item.is-new { animation: logIn .5s var(--ease); }
@keyframes logIn { from { opacity: 0; transform: translateY(-8px); background: var(--green-50); } }
.log__item p { line-height: 1.45; }
.log__item b { font-weight: 700; }
.log__item time { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: .72rem; color: var(--slate-400); }
.log__diff { font-family: var(--font-mono); font-size: .78rem; padding: 1px 6px; border-radius: 5px; background: var(--bg); white-space: nowrap; }
.ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; background: var(--navy-800); color: #fff; flex: none; }
.ava--g { background: var(--green-500); }
.ava--o { background: var(--orange-500); }
.ava--s { background: var(--slate-400); }
.ava .i { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- Breakdown (reconciliation) ---------- */
.bd { padding: 8px 10px 12px; display: grid; gap: 6px; }
.bd__item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); transition: border-color .2s, box-shadow .2s, background-color .3s;
}
.bd__item.is-active { border-color: var(--navy-600); box-shadow: 0 0 0 3px #e3e9f7; }
.bd__item.is-fixed { background: var(--green-50); border-color: var(--green-100); }
.bd__title { font-size: .84rem; font-weight: 700; line-height: 1.45; }
.bd__title .mono { white-space: nowrap; }
.bd__title .i { display: inline-block; vertical-align: -2px; margin-right: 6px; width: 1em; height: 1em; color: var(--orange-600); stroke-width: 2.6; }
.bd__item.is-fixed .bd__title .i { color: var(--green-600); }
.bd__amt { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; text-align: right; color: var(--orange-700); white-space: nowrap; }
.bd__item.is-fixed .bd__amt { color: var(--green-700); text-decoration: line-through; opacity: .7; }
.bd__hint { grid-column: 1 / -1; font-size: .78rem; color: var(--slate-500); line-height: 1.45; }
.bd__actions { grid-column: 1 / -1; margin-top: 6px; }
.bd__sum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 0; padding: 12px;
  border-radius: 12px; background: var(--navy-800); color: #fff; font-size: .84rem; font-weight: 700;
}
.bd__sum .mono { font-size: .9rem; }
.bd__sum.is-ok { background: var(--green-500); color: var(--navy-900); }

.parties { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.party { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; }
.party__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--navy-800); }
.party__dot--g { background: var(--green-500); }
.parties .i { color: var(--slate-400); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: 14px; background: var(--navy-800); color: #fff; box-shadow: var(--shadow-lg);
  font-size: .88rem; line-height: 1.45; animation: toastIn .35s var(--ease);
}
.toast.is-out { animation: toastOut .3s ease forwards; }
.toast .i { width: 1.2em; height: 1.2em; margin-top: 1px; stroke-width: 2.4; }
.toast--ok .i { color: var(--green-400); }
.toast--warn .i { color: #ff9a6b; }
.toast--info .i { color: var(--slate-300); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialog / forms ---------- */
.dlg {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 20px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg);
}
.dlg::backdrop { background: rgba(7, 15, 39, .55); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlgIn .3s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dlg form { display: grid; }
.dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dlg__head h2 { font-size: 1.1rem; font-weight: 800; }
.dlg__body { padding: 18px 22px; display: grid; gap: 14px; }
.dlg__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 20px 20px; }
.dlg__alert {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--orange-50); color: var(--orange-700); border: 1px solid var(--orange-200); font-size: .86rem; font-weight: 600;
}
.dlg__alert .i { width: 1.2em; height: 1.2em; stroke-width: 2.4; }
.dlg__alert[hidden] { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.field input, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--card);
  font: inherit; font-size: .95rem; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { border-color: var(--navy-600); box-shadow: 0 0 0 4px #e3e9f7; }
.field.is-bad input, .field.is-bad select { border-color: var(--orange-500); box-shadow: 0 0 0 4px var(--orange-50); }
.field.is-good input { border-color: var(--green-500); }
.field__err { display: none; font-size: .78rem; font-weight: 600; color: var(--orange-600); align-items: center; gap: 6px; }
.field__err .i { width: 1em; height: 1em; stroke-width: 2.6; }
.field.is-bad .field__err { display: flex; }
.field__hint { font-size: .76rem; color: var(--slate-500); }
.check { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green-600); }
.calc-preview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px dashed var(--line-strong); border-radius: 12px; overflow: hidden;
}
.calc-preview div { padding: 10px 12px; background: #f8fafc; }
.calc-preview div + div { border-left: 1px dashed var(--line-strong); }
.calc-preview span { display: flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; color: var(--slate-500); }
.calc-preview span .i { width: .9em; height: .9em; }
.calc-preview b { font-size: .98rem; font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--slate-500); cursor: pointer; transition: background-color .2s, color .2s; }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input[value="in"]:checked + span .i { color: var(--green-600); }
.seg input[value="out"]:checked + span .i { color: var(--orange-600); }
.seg input:focus-visible + span { outline: 3px solid var(--green-400); outline-offset: 2px; }
.order-no { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: .84rem; }
.order-no b { font-family: var(--font-mono); }
.order-no span { display: inline-flex; align-items: center; gap: 6px; color: var(--slate-500); font-weight: 600; }
.order-no .i { width: 1em; height: 1em; }
.pulse { animation: pulse 1.2s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(69, 192, 138, .35); } }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .stack { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; z-index: 60; left: 0; top: 44px; bottom: 0; width: 272px; height: auto;
    transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
  }
  .side.is-open { transform: none; }
  .side-scrim { position: fixed; inset: 44px 0 0; z-index: 55; background: rgba(7, 15, 39, .45); }
  .top__menu { display: inline-flex; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .demo-banner { font-size: .76rem; padding: 6px 12px; gap: 10px; }
  .demo-banner__text { display: none !important; }
  .top__actions { width: 100%; }
  .top__actions .btn { flex: 1; }
  .period { display: none; }
  .kpi__value { font-size: 1.2rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .calc-preview { grid-template-columns: 1fr; }
  .calc-preview div + div { border-left: 0; border-top: 1px dashed var(--line-strong); }
}

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

/* compact variant for wide two-sided tables */
.dt--compact th, .dt--compact td { padding-left: 10px; padding-right: 10px; }
.dt--compact .who { min-width: 104px; }
