@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-400.woff2') format('woff2'); font-weight:400; font-display:swap; unicode-range:U+0000-024F,U+1E00-1EFF,U+2000-206F,U+20AC,U+2116; }
@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-cyr-400.woff2') format('woff2'); font-weight:400; font-display:swap; unicode-range:U+0400-052F; }
@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-600.woff2') format('woff2'); font-weight:600; font-display:swap; unicode-range:U+0000-024F,U+1E00-1EFF,U+2000-206F,U+20AC,U+2116; }
@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-cyr-600.woff2') format('woff2'); font-weight:600; font-display:swap; unicode-range:U+0400-052F; }
@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-700.woff2') format('woff2'); font-weight:700; font-display:swap; unicode-range:U+0000-024F,U+1E00-1EFF,U+2000-206F,U+20AC,U+2116; }
@font-face { font-family:ExactUI; src:url('/admin/fonts/geist-cyr-700.woff2') format('woff2'); font-weight:700; font-display:swap; unicode-range:U+0400-052F; }
/* Shared geometry and colour roles for the app, public receipts and the owner console. */
:root, html:root[data-appearance] {
  --er-ui: ExactUI, system-ui, sans-serif;
  --er-bg: #081726;
  --er-surface: #142638;
  --er-raised: #1e3449;
  --er-text: #fcffff;
  --er-muted: #b2c4d5;
  --er-line: #30475a;
  --er-accent: #0593c6;
  --er-action: #00769e;
  --er-link: #79dcff;
  --er-notice: #db3996;
  --er-error: #ff99c9;
  --er-step: 8px;
  --er-gap: 16px;
  --er-section: 24px;
  --er-radius: 16px;
  --er-action-height: 52px;
  --er-field-height: 68px;
}
html:root[data-appearance="light"] {
  --er-bg: #fcffff;
  --er-surface: #edf3f6;
  --er-raised: #deebf0;
  --er-text: #132638;
  --er-muted: #455d6e;
  --er-line: #bfced7;
  --er-link: #00678a;
  --er-error: #a22161;
}
html[data-appearance] body#mini-app-body.tk {
  /* Import the page palette before mapping the older Telegram component roles. */
  --er-bg: inherit;
  --er-surface: inherit;
  --er-text: inherit;
  --er-muted: inherit;
  --er-line: inherit;
  --er-link: inherit;
  --er-accent: inherit;
  --tk-bg: var(--er-bg);
  --tk-surface: var(--er-surface);
  --tk-surface-2: var(--er-raised);
  --tk-text: var(--er-text);
  --tk-text-2: var(--er-muted);
  --tk-sep: var(--er-line);
  --tk-accent: var(--er-accent);
  --tk-accent-ink: var(--er-link);
  --tk-accent-grad: var(--er-action);
  --tk-r-md: var(--er-radius);
}
html[data-appearance] body#mini-app-body.tk > .app-shell {
  padding-inline: max(var(--er-gap), env(safe-area-inset-left), var(--tg-content-safe-area-inset-left, 0px)) max(var(--er-gap), env(safe-area-inset-right), var(--tg-content-safe-area-inset-right, 0px)) !important;
}
html.telegram-fullscreen[data-appearance] body#mini-app-body.tk.telegram-native-host > #app {
  /* In fullscreen Android places its floating Telegram buttons below the system bar. */
  padding-top: calc(max(env(safe-area-inset-top), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px) + var(--er-gap)) !important;
}
html[data-appearance] body#mini-app-body.tk .bottom-sheet:not([hidden]) {
  border-radius: 24px 24px 0 0 !important;
  border-color: var(--er-line) !important;
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px)));
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: var(--er-gap);
}
body#mini-app-body.tk .bottom-sheet .sheet-header h2 {
  font-size: 22px;
  line-height: 1.25;
  text-wrap: balance;
}
body#mini-app-body.tk .sheet-option { min-height: var(--er-action-height); }
html[data-appearance] body#mini-app-body.tk :is(.app-nav, .app-nav.app-nav-capsule) button {
  min-width: 0; min-height: 48px;
}
html[data-appearance] body#mini-app-body.tk :is(button, a, summary):focus-visible {
  outline: 2px solid var(--er-muted);
  outline-offset: -3px;
}
html[data-appearance] body#mini-app-body.tk .bottom-sheet:focus { outline: 0; }
html[data-appearance] body#mini-app-body.tk #home-view .gram-home-actions button {
  margin: 0 !important;
  align-self: stretch;
  min-height: var(--er-action-height) !important;
}
html[data-appearance] body#mini-app-body.tk #home-view .c3-activity-section { margin-top: var(--er-section) !important; }
html[data-appearance] body#mini-app-body.tk #home-view .section-header { margin: 0 0 var(--er-step) !important; min-height: 40px; }
html[data-appearance] body#mini-app-body.tk #home-view .c3-activity-ledger { margin: 0 !important; }
html[data-appearance] body#mini-app-body.tk #receipts-view .gram-ledger-heading {
  display: flex !important; align-items: center; justify-content: space-between; gap: var(--er-gap);
  margin: 0 0 var(--er-gap) !important;
}
html[data-appearance] body#mini-app-body.tk #receipts-view .journal-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--er-raised) !important; color: var(--er-link) !important;
  min-height: 44px !important; width: auto !important; margin: 0 !important;
  padding: 0 12px !important; border-radius: 12px !important; box-shadow: none !important;
}
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-search {
  min-height: 48px !important; border: 0 !important; border-radius: var(--er-radius) !important;
  background: var(--er-surface) !important;
}
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-search:focus-within { background: var(--er-raised) !important; }
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-tabs button[aria-selected="true"] {
  background: var(--er-action) !important; color: white !important;
}
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-rows {
  overflow: hidden; display: grid; gap: 0 !important; border-radius: var(--er-radius); background: var(--er-surface);
}
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-item {
  margin: 0 !important; background: transparent !important; border: 0 !important;
  border-radius: 0 !important; padding: 12px var(--er-gap) !important; min-height: var(--er-field-height) !important;
}
html[data-appearance] body#mini-app-body.tk #receipts-view .ledger-item + .ledger-item { border-top: 1px solid var(--er-line) !important; }
html[data-appearance] body#mini-app-body.tk #new-view .invoice-composer-tools { display: block !important; }
html[data-appearance] body#mini-app-body.tk #new-view .invoice-composer-tools button { width: 100%; justify-content: flex-start; }
#new-view [data-preview-invoice] .ph-caret-right { margin-inline-start: auto; }
html[data-appearance] body#mini-app-body.tk #new-view #receipt-form #amount-symbol.amount-star-coin {
  width: 26px !important; height: 26px !important; min-width: 26px !important; flex: 0 0 26px !important; background-size: contain !important;
}
.template-save { margin-block-start: var(--er-gap); }
.template-save summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; color: var(--er-link); }
.template-save form { display: grid; gap: var(--er-step); margin-block: var(--er-step); }
.template-save label { color: var(--er-muted); font-size: 14px; }
.template-save input { box-sizing: border-box; width: 100%; min-height: 48px; padding-inline: var(--er-gap); border: 0; border-radius: 12px; color: var(--er-text); background: var(--er-raised); font: inherit; }
.template-save input:focus-visible { outline: 0; box-shadow: inset 0 -2px var(--er-link); }
.template-save button, #receipts-view [data-reset-invoice-search] {
  min-height: var(--er-action-height); padding: 8px var(--er-gap); border: 0; border-radius: var(--er-radius); background: var(--er-action); color: white; font: inherit; font-weight: 600;
}
.template-save [role="alert"] { margin: 0; color: var(--er-error); }
/* The review is a normal route. Let the browser header and Telegram safe area
   reserve their own space, including when a long review needs to scroll. */
html[data-appearance] body#mini-app-body.tk:has(#seller-access-view:not([hidden]) #seller-access-pending:not([hidden])) {
  position: relative !important; inset: auto !important; overflow-y: auto !important;
}
html[data-appearance] body#mini-app-body.tk:has(#seller-access-view:not([hidden]) #seller-access-pending:not([hidden])) > #app {
  position: relative !important; inset: auto !important; height: auto !important; overflow: visible !important;
}
html[data-appearance] body#mini-app-body.tk #seller-access-view:has(#seller-access-pending:not([hidden])),
html[data-appearance] body#mini-app-body.tk #seller-access-view #seller-access-pending:not([hidden]) {
  height: auto !important; overflow: visible !important;
}
html[data-appearance] body#mini-app-body.tk #seller-access-view #seller-access-pending:not([hidden]) {
  padding: var(--er-gap) 0 calc(88px + var(--safe-bottom, 0px)) !important;
}
html[data-appearance] body#mini-app-body.tk #seller-access-pending .seller-review-head {
  gap: var(--er-step); padding-inline: var(--er-gap) !important;
}
html[data-appearance] body#mini-app-body.tk #seller-access-pending .seller-review-state {
  padding: 4px 8px !important; border-radius: 999px !important; white-space: normal;
}
@media (prefers-reduced-motion: reduce) {
  body#mini-app-body.tk *, body#mini-app-body.tk *::before, body#mini-app-body.tk *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :is(button, a, input, textarea, summary):focus-visible { outline: 2px solid Highlight !important; }
}
/* Typography, navigation and the shared dialog frame apply on every route. */
html[data-appearance] body#mini-app-body.tk,
html[data-appearance] body#mini-app-body.tk :is(button,input,textarea,select,h1,h2,h3,h4) {font-family:var(--er-ui)!important}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule:not([hidden]) {
  position:fixed!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;
  bottom:max(18px, env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px))!important;
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:0!important;box-sizing:border-box;
  width:min(calc(100% - 32px),480px)!important;max-width:none!important;min-height:63px!important;height:63px!important;
  padding:5px 12px!important;border:1px solid var(--er-line)!important;border-radius:32px!important;
  background:var(--er-surface)!important;box-shadow:0 3px 14px #00111e24!important;
}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule button {display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:2px!important;min-width:0!important;min-height:44px!important;background:transparent!important;color:var(--er-muted)!important;padding:3px 1px!important}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule button > i {display:grid!important;place-items:center;width:30px!important;height:25px!important;min-width:0!important;border:0!important;box-shadow:none!important;background:transparent!important;color:inherit!important;font-size:23px!important}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule button > span {font-size:12px!important;line-height:1.25!important;font-weight:500!important}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule button[aria-current="page"] {color:var(--er-link)!important}
html[data-appearance] body#mini-app-body.tk #app-nav.app-nav-capsule button[aria-current="page"] > i {font-family:Phosphor-Fill!important}
html[data-appearance] body#mini-app-body.tk:has(> #app-nav:not([hidden])) > .app-shell {padding-bottom:calc(96px + max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px)))!important}
html[data-appearance] body#mini-app-body.tk .bottom-sheet[role="dialog"] {background:var(--er-surface)!important;color:var(--er-text)!important;border:1px solid var(--er-line)!important;border-bottom:0!important;border-radius:24px 24px 0 0!important}
html[data-appearance] body#mini-app-body.tk .bottom-sheet .sheet-handle {width:36px!important;height:4px!important;margin:0 auto 18px!important;background:var(--er-muted)!important;opacity:.65}
html[data-appearance] body#mini-app-body.tk .bottom-sheet .sheet-header {align-items:flex-start!important;gap:12px;margin-bottom:16px!important}
html[data-appearance] body#mini-app-body.tk .bottom-sheet .sheet-header h2 {margin:0!important;font:700 24px/1.16 var(--er-ui)!important;letter-spacing:-.034em}
html[data-appearance] body#mini-app-body.tk .bottom-sheet .sheet-header > button {flex:0 0 44px!important;width:44px!important;height:44px!important;background:var(--er-raised)!important;color:var(--er-text)!important;border:0!important;border-radius:50%!important}
html[data-appearance] body#mini-app-body.tk :is(#route-error,#session-error) .system-panel {display:grid;justify-items:start;width:min(100%,420px);padding:24px!important;gap:14px!important;text-align:start!important;background:var(--er-surface)!important;border:0!important;border-radius:20px!important}
html[data-appearance] body#mini-app-body.tk :is(#route-error,#session-error) .system-panel h1 {font-size:clamp(24px,6.2vw,30px)!important;text-align:start!important;line-height:1.14!important;letter-spacing:-.035em;margin:0!important}
html[data-appearance] body#mini-app-body.tk :is(#route-error,#session-error) .system-panel :is(p,small) {text-align:start!important;color:var(--er-muted)!important;line-height:1.5}
html[data-appearance] body#mini-app-body.tk :is(#route-error,#session-error) .system-panel :is(a,button) {width:100%;min-height:48px;margin:0}
.system-glyph {display:grid;place-items:center;width:52px;height:52px;background:var(--er-raised);border-radius:16px;color:var(--er-error);font-size:28px}
