/*
  The dashboard (/app): a working tool in the site's own language. The same
  tokens, fonts and colour meanings as site.css (yellow what the bot said, orange
  the store's own text, red a proven error, ruby the one filled button), set
  calmer and denser than the marketing pages. This file is the frame: the
  single cards before the dashboard, the rail, the top bar, the chips on a
  phone, and the parts every screen shares (panels, lists and their states,
  pills, dialogs, the drawer, toasts). The screens are in app-screens.css.

  Motion is transform, opacity and clip-path only, and short; under reduced
  motion site.css ends every transition at once, so each part shows its
  finished state.
*/

/* The marketing nav and footer stay in the page (every page carries them) and step aside here. */
.page-app > .nav, .page-app > .menu, .page-app > .footer, .page-app > .talk, .page-app .talk { display: none !important; }
.page-app main::before { display: none; }
html:has(body.page-app) { scroll-padding-top: 76px; }
.page-app {
  --app-panel: var(--panel);
  --app-rail: var(--bg-soft);
  --app-tile: var(--bg-soft);
  --app-top: var(--nav-scrolled);
  --ok-ink: #1b6b3a;
  --ok-bg: rgba(46, 160, 67, 0.1);
  --ok-line: rgba(46, 160, 67, 0.3);
  --rail: 64px;
  --rail-open: 232px;
  background: var(--bg);
}
:root[data-theme="dark"] .page-app {
  --app-panel: var(--surface);
  --app-rail: var(--panel);
  --app-tile: var(--surface-2);
  --ok-ink: #7ee2a0;
  --ok-bg: rgba(46, 160, 67, 0.14);
  --ok-line: rgba(126, 226, 160, 0.3);
}
.page-app main > * { position: static; }
.app { min-height: 100dvh; }
.small { font-size: 13.5px; color: var(--mute); line-height: 1.5; }
.small a, .explain a, .fd-meta a, .state a { color: var(--ink); text-decoration-color: var(--ruby); text-underline-offset: 3px; }
.h3 { font-size: 14.5px; font-weight: 500; color: var(--ink); outline: none; }
.tnum { font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stack { display: grid; gap: 12px; align-content: start; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.bare:disabled { opacity: 0.62; }
fieldset.bare:disabled .btn { cursor: not-allowed; }
.link-btn { font-size: inherit; }
.dev-note { font-family: var(--mono); }

/* ---------- Before the dashboard: one card on its own ---------- */
.solo { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0 16px 64px; }
.solo-bar { width: min(1160px, 100%); height: 64px; display: flex; align-items: center; justify-content: space-between; }
.solo-bar .theme-toggle { display: inline-grid; }
.solo-note { width: min(520px, 100%); margin: 8px 0 0 !important; }
.solo-card { width: min(520px, 100%); margin-top: clamp(24px, 9vh, 104px); padding: clamp(24px, 4vw, 36px); border-radius: var(--r-lg); background: var(--app-panel); border: 1px solid var(--line); box-shadow: var(--lift-2); display: grid; gap: 12px; animation: rise-in 0.28s var(--ease); }
.solo-card h2 { font-size: clamp(22px, 1rem + 0.8vw, 28px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; outline: none; }
.solo-card p { color: var(--ink-2); font-size: 15px; }
.solo-card .eyebrow { justify-self: start; }
.solo-sub { color: var(--mute) !important; font-size: 14px !important; }
.solo-said { color: var(--ink) !important; font-size: 14px !important; }
.solo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.solo-card .form-error { margin-top: 0; }
.solo-card [data-invite-state] { display: grid; gap: 12px; }
.app-loading { display: flex; gap: 8px; padding: 12px 0; }
.app-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
@media (prefers-reduced-motion: no-preference) {
  .app-loading span { animation: dot-pulse 1s var(--ease-ui) infinite alternate; }
  .app-loading span:nth-child(2) { animation-delay: 0.15s; }
  .app-loading span:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes dot-pulse { to { opacity: 0.35; transform: scale(0.8); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- The sidebar ---------- */
/* After Shopify's admin (Dusan, 4. 11.), in the brand's own ink: a dark sidebar that names and groups the sections, the
   logo and the search at its top, the setup guide, help and the account at its foot, and the screens on one white sheet
   beside it. Narrower than 1100px it is a rail of icons that widens over the content on hover or keyboard focus, and the
   search and account go to a top bar. The column under the rail is painted by the shell for the whole page. */
.page-app {
  --side: var(--stripe-ink);
  --side-ink: #eef2f7;
  --side-mute: #a9b8cb;
  --side-hover: rgba(255, 255, 255, 0.07);
  --side-active: rgba(255, 255, 255, 0.13);
  --side-line: rgba(255, 255, 255, 0.09);
  --side-field: rgba(255, 255, 255, 0.08);
}
:root[data-theme="dark"] .page-app { --side: #0b0b0d; --side-mute: #9a99a3; }
.app-shell { position: relative; min-height: 100vh; min-height: 100dvh; }
.app-shell::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--rail); background: var(--side); pointer-events: none; }
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 45; width: var(--rail-open); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; padding: 12px 10px;
  background: var(--side); color: var(--side-ink);
  clip-path: inset(0 calc(var(--rail-open) - var(--rail)) 0 0);
  transition: clip-path 0.26s var(--ease-ui);
}
.rail:hover, .rail:has(:focus-visible) { clip-path: inset(0 -48px 0 0); box-shadow: 12px 0 32px -12px rgba(0, 0, 0, 0.35); }
.rail :focus-visible { outline-color: #fff; }
.rail-top { flex: none; display: grid; gap: 10px; margin-bottom: 14px; }
.rail-brand { display: flex; align-items: center; gap: 4px; }
.rail-brand .rail-logo { flex: 1; min-width: 0; }
.rail-toggle { display: none; }
.rail-tip { display: none; }
.rail-logo { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; text-decoration: none; color: var(--side-ink); border-radius: var(--r-md); }
.rail-logo .logo-mark { width: 20px; height: 20px; flex: none; }
.rail .logo-source { fill: #fff; }
/* The open sidebar shows the whole name, the rail of icons the check alone (26. 11.): the name is the sidebar's "word",
   so it comes and goes with the other words, and the check is there exactly when the name is not. */
.rail-word { height: 23px; opacity: 0; transition: opacity 0.18s var(--ease-ui); }
@media (max-width: 1099.98px) {
  .rail:hover .rail-logo .logo-mark, .rail:has(:focus-visible) .rail-logo .logo-mark { display: none; }
}
.rail-search:empty { display: none; }
.rail-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-list { position: relative; display: grid; gap: 1px; }
.rail-item { position: relative; display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 12px; border-radius: var(--r-md); color: var(--side-mute); text-decoration: none; font-size: 14.5px; white-space: nowrap; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.rail-item:hover { background: var(--side-hover); color: var(--side-ink); }
.rail-item[aria-current="page"] { color: var(--side-ink); font-weight: 500; }
.rail-item[aria-current="page"]:hover { background: none; }
.rail-item:focus-visible { outline-offset: -2px; }
.rail-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease-ui); }
.rail-item:hover .rail-ico { transform: scale(1.08); }
.rail-label { opacity: 0; transition: opacity 0.16s var(--ease-ui); }
.rail:hover .rail-label, .rail:has(:focus-visible) .rail-label, .rail:hover .rail-word, .rail:has(:focus-visible) .rail-word { opacity: 1; transition-delay: 0.04s; }
.rail-badge { position: absolute; left: 26px; top: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* A group's name needs the open sidebar; in the rail of icons it is a hairline between the groups. */
.rail-group { height: 1px; margin: 9px 12px; background: var(--side-line); }
.rail-group .rail-label { display: none; }
/* The plate under the current section: one for the whole list, sliding to the next section on a change. */
.rail-glide { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: var(--r-md); background: var(--side-active); pointer-events: none; transition: transform 0.32s var(--ease-ui), height 0.32s var(--ease-ui); }
.rail-glide::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ruby); }
.rail-glide.is-placing { transition: none; }
.rail-foot { flex: none; display: grid; gap: 2px; }
.rail-help { display: grid; gap: 2px; }
.rail-help:empty, .rail-account:empty { display: none; }

@media (min-width: 1100px) {
  .page-app { --rail: 240px; --rail-open: 240px; }
  .rail, .rail:hover, .rail:has(:focus-visible) { clip-path: none; box-shadow: none; padding: 12px 10px 10px; }
  .rail-label, .rail-word { opacity: 1; }
  .rail-logo { height: 36px; padding: 0 8px; }
  .rail-word { height: 22px; }
  .rail-logo .logo-mark { display: none; }
  :is([data-rail-folded], [data-area="settings"]) .rail-logo .logo-mark { display: block; }
  .rail-item { height: 32px; gap: 10px; padding: 0 10px; font-size: 13.5px; }
  .rail-ico { width: 17px; height: 17px; }
  .rail-badge { position: static; margin-left: auto; min-width: 20px; height: 18px; font-size: 11px; }
  .rail-glide { height: 32px; }
  .rail-glide::before { display: none; }
  .rail-group { height: auto; margin: 14px 0 4px; padding: 0 10px; background: none; font-size: 12px; font-weight: 500; color: var(--side-mute); }
  .rail-group .rail-label { display: inline; }
  .rail-foot { padding-top: 8px; margin-top: 8px; }

  /* The search, as a field of the sidebar. */
  /* Rounder, with a soft lighter rim as Shopify's search has on its dark sidebar (Dusan, 16. 11.): a faint edge of white
     and a hint of light along the top, in both themes (the sidebar is dark in both); it reads as an edge, not a border. */
  .rail .jump-btn { width: 100%; height: 34px; padding: 0 6px 0 10px; border-radius: 12px; border-color: rgba(255, 255, 255, 0.09); background: var(--side-field); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.03); color: var(--side-mute); font-size: 13.5px; }
  .rail .jump-btn:hover { border-color: rgba(255, 255, 255, 0.16); color: var(--side-ink); }
  .rail .jump-kbd { border-color: var(--side-line); background: transparent; color: var(--side-mute); }

  /* The account row at the foot: the organization, then the bell and the person; their menus open upward. */
  .rail-account { display: flex; align-items: center; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--side-line); }
  .rail-account .pop[data-pop="org"] { flex: 1; min-width: 0; }
  .rail .org-btn { width: 100%; max-width: none; height: 40px; padding: 0 8px 0 4px; border-color: transparent; background: none; color: var(--side-ink); }
  .rail .org-btn:hover, .rail .org-btn[aria-expanded="true"] { background: var(--side-hover); border-color: transparent; }
  .rail .org-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ruby); color: #fff; font-size: 12.5px; }
  .rail .org-domain { color: var(--side-mute); }
  .rail .org-btn .chev { stroke: var(--side-mute); transform: rotate(180deg); }
  .rail .org-btn[aria-expanded="true"] .chev { transform: none; }
  .rail .tool-btn, .rail .avatar { width: 32px; height: 32px; border-color: transparent; background: none; color: var(--side-ink); }
  .rail .tool-btn:hover { background: var(--side-hover); }
  .rail .avatar { background: rgba(255, 255, 255, 0.14); font-size: 12.5px; }
  .rail .badge { top: -3px; right: -4px; box-shadow: 0 0 0 2px var(--side); }
  .rail-foot .pop-panel { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; transform-origin: bottom left; }
  .rail-account .pop[data-pop="org"] .pop-panel { width: max(100%, 272px); }

  /* ---------- Folded: a rail of round icons (Dusan, 8. 11., after Shopify's admin) ----------
     The icons keep their place while the sidebar narrows, so only the words go: each control is clipped by its own
     edge, and at 52px every row is a 32px circle. The words come back as a tooltip beside the rail (app.js). */
  .rail { transition: width 0.28s var(--ease-ui); }
  .rail-logo { padding: 0 6px; }
  .rail-item { padding: 0 7.5px; }
  .rail-word, .rail-label, .rail .help-label, .rail .guide-btn-text, .rail .org-text, .rail .jump-text, .rail .jump-kbd { transition: opacity 0.16s var(--ease-ui); }
  .rail-toggle { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--side-mute); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui), transform 0.28s var(--ease-ui); }
  .rail-toggle:hover { background: var(--side-hover); color: var(--side-ink); }
  .rail-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

  .page-app:is([data-rail-folded], [data-area="settings"]) { --rail: 52px; --rail-open: 52px; }
  /* A settings page: the folded sidebar, and beside it the settings column, the sheet after both. */
  .page-app[data-area="settings"] { --rail: 300px; }
  [data-area="settings"] .rail-toggle { display: none; }
  :is([data-rail-folded], [data-area="settings"]) .rail .rail-word, :is([data-rail-folded], [data-area="settings"]) .rail .rail-label, :is([data-rail-folded], [data-area="settings"]) .rail .help-label, :is([data-rail-folded], [data-area="settings"]) .rail .guide-btn-text,
  :is([data-rail-folded], [data-area="settings"]) .rail .org-text, :is([data-rail-folded], [data-area="settings"]) .rail .org-btn .chev, :is([data-rail-folded], [data-area="settings"]) .rail .jump-text, :is([data-rail-folded], [data-area="settings"]) .rail .jump-kbd { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.12s var(--ease-ui), visibility 0s 0.12s; }
  :is([data-rail-folded], [data-area="settings"]) .rail-logo { overflow: hidden; }
  /* A hidden word still has its width, so the columns are held to the rail's own, or a row would be as wide as its name. */
  .rail-top, .rail-list, .rail-foot, .rail-help { grid-template-columns: minmax(0, 1fr); }
  .rail-item, .rail .jump-btn, .rail .guide-btn, .rail .help-btn { min-width: 0; }
  .rail .help-btn svg, .rail .guide-ring, .rail .jump-ico, .rail .org-mark { flex: none; }
  :is([data-rail-folded], [data-area="settings"]) .rail-brand { flex-direction: column; align-items: stretch; gap: 6px; }
  :is([data-rail-folded], [data-area="settings"]) .rail-toggle { transform: scaleX(-1); }
  :is([data-rail-folded], [data-area="settings"]) .rail-item, :is([data-rail-folded], [data-area="settings"]) .rail-glide, :is([data-rail-folded], [data-area="settings"]) .rail .guide-btn, :is([data-rail-folded], [data-area="settings"]) .rail .help-btn,
  :is([data-rail-folded], [data-area="settings"]) .rail .jump-btn, :is([data-rail-folded], [data-area="settings"]) .rail .org-btn { border-radius: 999px; overflow: hidden; }
  :is([data-rail-folded], [data-area="settings"]) .rail-item:hover { background: var(--side-hover); }
  :is([data-rail-folded], [data-area="settings"]) .rail-group { height: 1px; margin: 8px 4px; padding: 0; background: var(--side-line); font-size: 0; }
  :is([data-rail-folded], [data-area="settings"]) .rail-badge { position: absolute; top: 1px; right: 1px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: var(--ruby); font-size: 9.5px; }
  :is([data-rail-folded], [data-area="settings"]) .rail .jump-btn { height: 32px; padding: 0 0 0 7.5px; gap: 0; }
  :is([data-rail-folded], [data-area="settings"]) .rail .guide-btn, :is([data-rail-folded], [data-area="settings"]) .rail .help-btn { padding: 0 7.5px; }
  :is([data-rail-folded], [data-area="settings"]) .rail-account { flex-direction: column; align-items: stretch; gap: 6px; }
  :is([data-rail-folded], [data-area="settings"]) .rail .org-btn { height: 32px; padding: 0 3px; }
  :is([data-rail-folded], [data-area="settings"]) .rail .org-mark { border-radius: 999px; }
  :is([data-rail-folded], [data-area="settings"]) .rail-foot .pop-panel { left: calc(100% + 14px); bottom: 0; transform-origin: bottom left; }
  /* The rows that change their shape at the fold come in again, instead of jumping. */
  .rail[data-turn] .rail-brand, .rail[data-turn] .rail-search, .rail[data-turn] .rail-foot { animation: rail-turn 0.32s var(--ease-ui); }
  .rail-tip { display: block; position: fixed; z-index: 60; padding: 5px 9px; border-radius: 8px; background: #111418; color: #fff; font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); transform: translateY(-50%); animation: tip-in 0.14s var(--ease-ui); }
  .rail-tip[hidden] { display: none; }
}
@keyframes rail-turn { from { opacity: 0; } }
@keyframes tip-in { from { opacity: 0; transform: translate(-4px, -50%); } }

/* ---------- The frame: one white sheet, the top bar only where the sidebar is narrow ---------- */
/* The sheet clips what reaches past its edge (the home's globe), without becoming a scroll box, so sticky parts stay sticky. */
.frame { margin-left: var(--rail); min-height: 100dvh; min-width: 0; background: var(--bg); overflow-x: clip; }
.topbar { position: sticky; top: 0; z-index: 40; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--app-top); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-logo { display: none; }
.topbar-logo .logo-mark { width: 22px; height: 22px; }
.topbar-start { display: flex; align-items: center; min-width: 0; flex: none; }
.topbar-start:empty { display: none; }
/* The organization's menu opens from its left edge, so it never slides under the rail. */
.topbar-start .pop-panel { left: 0; right: auto; transform-origin: top left; }
.topbar-search { display: flex; flex: 0 1 440px; min-width: 0; }
.topbar-search:empty { display: none; }
.topbar-search .jump-btn { flex: 1; }
.topbar-tools { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
.topbar-help { display: flex; align-items: center; gap: 8px; }
.topbar-help:empty { display: none; }
.help-label { display: none; }
/* Wide, the sheet is a fixed card on the dark ground with all four corners round, and it scrolls inside itself, as
   Shopify's and Canva's do (Dusan, 8. 11.): the sidebar and the edges stay where they are while a screen moves. */
@media (min-width: 1100px) {
  body.page-app.in-shell { background: var(--side); overflow: hidden; }
  .app-shell::before { display: none; }
  .frame {
    position: fixed; top: 8px; right: 8px; bottom: 8px; left: var(--rail); margin: 0; min-height: 0;
    border-radius: 14px; overflow: hidden auto; overscroll-behavior: contain; scroll-padding-top: 16px;
    transition: left 0.28s var(--ease-ui);
  }
  .topbar { display: none; }
}

/* The page's one heading (Dusan, 16. 11., after Shopify's "Orders"): the page's icon and name, small, in the sheet's top
   left corner and on the same spot on every screen, whatever column the screen's content keeps. The icon is the sidebar
   item's own (app.js markNav). --to-edge is the way from the screens' content edge to the sheet's edge: the column is
   centred in the sheet and has side padding (and 24px above it, of which 8 are taken back). The icon stands 19px in from
   the sheet's edge and the row's middle 26px under its top, as Shopify's does. The Overview hides its heading and keeps its own first row. */
.screens { --to-edge: calc(max(0px, (100vw - var(--rail) - 16px - 1180px) / 2) + 32px); }
.screens > .page-title { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: none; margin: -8px 0 20px calc(19px - var(--to-edge)); font-size: 14px; font-weight: 560; letter-spacing: 0; line-height: 20px; color: var(--ink); outline: none; }
.page-title .title-ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.page-title { outline: none; }

/* ---------- Search or jump to ---------- */
.jump-btn { display: flex; align-items: center; gap: 10px; flex: 0 1 440px; min-width: 0; height: 38px; padding: 0 8px 0 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--app-tile); color: var(--mute); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.jump-btn:hover { border-color: var(--line-strong); color: var(--ink-2); }
.jump-ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jump-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jump-kbd, .jump-foot kbd { flex: none; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--app-panel); color: var(--mute); font-family: var(--mono); font-size: 11.5px; line-height: 1.4; }

.jump { position: fixed; inset: 0 0 auto; margin: 12vh auto 0; width: min(620px, calc(100vw - 32px)); max-width: none; height: auto; max-height: min(560px, 76dvh); padding: 0; display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--dd-bg, var(--app-panel)); color: var(--ink); box-shadow: 0 28px 72px -16px rgba(13, 37, 61, 0.36), 0 2px 8px rgba(13, 37, 61, 0.06); opacity: 0; transform: translateY(-6px) scale(0.985); transform-origin: top center; transition: opacity 0.16s var(--ease-ui), transform 0.22s var(--ease-ui); }
.jump[open] { display: flex; }
.jump.is-open { opacity: 1; transform: none; }
.jump::backdrop { background: rgba(13, 37, 61, 0.22); opacity: 0; transition: opacity 0.2s var(--ease-ui); }
:root[data-theme="dark"] .jump::backdrop { background: rgba(0, 0, 0, 0.5); }
.jump.is-open::backdrop { opacity: 1; }
/* From the home's search the row is the bar's own size and shape (app-jump.js sets its place and size). */
.jump.is-anchored { border-radius: var(--jump-radius, 18px); transform-origin: top center; }
.jump.is-anchored .jump-field { height: calc(var(--jump-row) - 1px); gap: 12px; padding: 0 15px 0 17px; }
.jump.is-anchored .jump-ico { width: 17px; height: 17px; }
.jump.is-anchored .jump-input { height: 100%; font-size: 15px; }
.jump-field { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); color: var(--mute); }
.jump-field .jump-ico { width: 19px; height: 19px; }
.jump-input { flex: 1; min-width: 0; height: 56px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 16.5px; outline: none; }
.jump-input::placeholder { color: var(--mute); }
.jump-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; overscroll-behavior: contain; }
.jump-group { padding: 12px 10px 6px; font-size: 12px; font-weight: 500; color: var(--mute); }
.jump-item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 10px; border-radius: var(--r-md); color: var(--ink); font-size: 14.5px; cursor: pointer; }
.jump-item[aria-selected="true"] { background: var(--accent-bg); color: var(--accent-ink); }
.jump-item-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.jump-item[aria-selected="true"] .jump-item-ico { stroke: var(--ruby); }
.jump-item-dot { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.jump-item-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.jump-item[aria-selected="true"] .jump-item-dot::before { background: var(--ruby); }
.jump-item-label { flex: 1; min-width: 0; }
.jump-item-hint { flex: none; font-size: 12.5px; color: var(--mute); }
.jump-empty { padding: 28px 20px 32px; color: var(--mute); font-size: 14.5px; text-align: center; overflow-wrap: anywhere; }
.jump-foot { flex: none; display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--mute); font-size: 12.5px; }
.jump-foot span { display: inline-flex; align-items: center; gap: 4px; }

.pop { position: relative; }
.pop-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 260px; max-width: min(360px, calc(100vw - 24px)); padding: 6px; border-radius: var(--r-lg); background: var(--dd-bg); border: 1px solid var(--line); box-shadow: 0 16px 40px var(--dd-shadow), 0 2px 6px rgba(0, 0, 0, 0.05); transform-origin: top right; animation: pop-in 0.16s var(--ease-ui); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 6px; font-size: 12px; font-weight: 500; color: var(--mute); }
.pop-head a { color: var(--accent-ink); text-decoration: none; font-size: 12.5px; }
.pop-head a:hover { text-decoration: underline; }
.pop-email { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-email b { font-size: 14px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.pop-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.pop-item:hover { background: var(--surface-2); }
.switch { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--line-strong); flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease-ui); }
[aria-pressed="true"] > .switch { background: var(--primary); }
[aria-pressed="true"] > .switch::after { transform: translateX(12px); }

.org-btn { display: flex; align-items: center; gap: 10px; height: 40px; max-width: 280px; padding: 0 10px 0 6px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--app-panel); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.org-btn:hover { border-color: var(--line-strong); }
.org-mark { width: 26px; height: 26px; flex: none; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; }
.org-text { display: grid; min-width: 0; line-height: 1.25; }
.org-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-domain { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-btn .chev { width: 10px; height: 10px; flex: none; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.org-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.org-list { display: grid; gap: 2px; }
.org-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.org-item:hover { background: var(--surface-2); }
.org-item[aria-current="true"] { background: var(--accent-bg); }
.org-check { width: 16px; height: 16px; margin-left: auto; flex: none; fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tool-btn, .avatar { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--app-panel); color: var(--ink); cursor: pointer; font: inherit; }
.tool-btn:hover, .avatar:hover { border-color: var(--line-strong); }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.badge { position: absolute; top: -4px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; background: var(--error); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--bg); }
.avatar { background: var(--ink); color: var(--bg); border-color: transparent; font-size: 14px; font-weight: 600; }
/* ---------- The round button of Shopify's cards (Dusan, 8. 11.) ----------
   White on the card with a hairline edge and a soft lift; it greys under the pointer and gives a little when pressed. */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--app-panel); color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 0 rgba(13, 37, 61, 0.05), inset 0 -1px 0 rgba(13, 37, 61, 0.07);
  transition: background-color 0.15s var(--ease-ui), border-color 0.15s var(--ease-ui), transform 0.15s var(--ease-ui);
}
.btn-pill:hover { background: var(--app-tile); border-color: var(--line-strong); }
.btn-pill:active { transform: scale(0.97); }
.btn-pill:focus-visible { outline-offset: 2px; }
.btn-pill:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-pill-plain { border-color: transparent; background: none; box-shadow: none; }
.btn-pill-plain:hover { border-color: transparent; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
/* Every button of the dashboard takes that shape and size: the brand's ruby stays the one filled button, the others
   are white with a hairline edge and the ink's own colour, as Shopify's are. */
.page-app .btn { min-height: 34px; padding: 8px 16px; border-radius: 999px; font-size: 14px; }
.page-app .btn-sm { min-height: 30px; padding: 6px 13px; font-size: 13px; }
.page-app .btn-lg { min-height: 42px; padding: 11px 20px; font-size: 15px; }
.page-app .btn-ghost { background: var(--app-panel); color: var(--ink); border-color: var(--line); box-shadow: 0 1px 0 rgba(13, 37, 61, 0.05), inset 0 -1px 0 rgba(13, 37, 61, 0.07); }
.page-app .btn-ghost:hover { background: var(--app-tile); border-color: var(--line-strong); }

/* ---------- The bell: alerts, after Shopify's (Dusan, 8. 11.) ----------
   A wide card with a deep shadow; each alert its kind and time over a bold title, a red shield for a proven error or a
   broken connection, and a dot while it is unread. The card comes up from the bell and the alerts follow one by one. */
.bell-panel { width: 400px; max-width: min(400px, calc(100vw - 24px)); padding: 0; overflow: hidden; border-radius: 16px; box-shadow: 0 24px 56px -12px rgba(15, 23, 42, 0.28), 0 6px 16px rgba(15, 23, 42, 0.08); animation: bell-in 0.24s var(--ease-ui); }
@keyframes bell-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.bell-h { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.bell-read { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 0.15s var(--ease-ui), transform 0.15s var(--ease-ui); }
.bell-read:hover { background: var(--surface-2); }
.bell-read:active { transform: scale(0.97); }
.bell-read svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bell-list { display: block; max-height: min(480px, calc(100dvh - 180px)); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.bell-item + .bell-item { border-top: 1px solid var(--line); }
.bell-item a { display: grid; gap: 4px; padding: 14px 18px 15px 18px; color: var(--ink); text-decoration: none; transition: background-color 0.15s var(--ease-ui); }
.bell-item a:hover { background: var(--surface-2); }
.bell-item a:focus-visible { outline-offset: -3px; }
.bell-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mute); }
.bell-dot { width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--stripe-ink); transform: scale(0); transition: transform 0.24s var(--ease-ui); }
.bell-item.is-unread .bell-dot { transform: none; }
.bell-item:not(.is-unread):not(.was-unread) .bell-dot { display: none; }
.bell-meta time { font-variant-numeric: tabular-nums; }
.bell-title { display: flex; align-items: flex-start; gap: 6px; }
.bell-title b { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.bell-mark { flex: none; width: 18px; height: 18px; margin-top: 0.5px; fill: none; stroke: var(--error); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell-body { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bell-empty { padding: 18px 18px 22px; font-size: 13.5px; color: var(--mute); border-top: 1px solid var(--line); }
.bell-end { display: block; padding: 13px 16px; border-top: 1px solid var(--line); text-align: center; font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.bell-end:hover { background: var(--surface-2); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .bell-item { animation: bell-row 0.32s var(--ease-ui) both; animation-delay: calc(var(--i, 0) * 28ms + 40ms); }
}
@keyframes bell-row { from { opacity: 0; transform: translateY(6px); } }
:root[data-theme="dark"] .bell-dot { background: #8fb4ff; }

/* The sections on a phone: one row of chips under the top bar. */
.app-chips { display: none; }
.app-chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; background: var(--app-panel); }
.app-chip[aria-current="page"] { border-color: var(--ruby); color: var(--accent-ink); background: var(--accent-bg); }

.screens { max-width: 1180px; margin: 0 auto; padding: 24px 32px 96px; }
.banners { display: grid; gap: 10px; }
.banners:has(> :not([hidden])) { margin-bottom: 16px; }
.banners .dev-note { margin: 0 !important; }
.app-notice { padding: 12px 14px; border-radius: var(--r-md); background: var(--app-panel); border: 1px solid var(--line-strong); color: var(--ink); font-size: 14.5px; }
.alert-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--error-line); background: var(--error-bg); color: var(--ink); font-size: 14px; }
.alert-bar b { font-weight: 500; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.screen { display: grid; gap: 16px; min-width: 0; animation: rise-in 0.22s var(--ease-ui); }
.screen-sub { color: var(--mute); font-size: 14.5px; }
.screen-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Panels ---------- */
/* Sharper after Markyard's workspace (4. 11.): an 8px corner, a hairline and no shadow, and a panel's name as a small
   mono eyebrow, so the content, not the frame around it, is what the eye reads first. */
.panel { position: relative; min-width: 0; border-radius: var(--r-md); background: var(--app-panel); border: 1px solid var(--line); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 46px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); outline: none; }
.panel-body { display: grid; gap: 12px; padding: 16px 18px; min-width: 0; }
.panel-body > p, .panel-body .stack > p { color: var(--ink-2); font-size: 14.5px; }
.panel-note { padding: 12px 18px 14px; border-top: 1px solid var(--line); }
.panel-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--line); }
.panel-foot:not(:has(> :not([hidden]))) { display: none; }
.panel-link { font-size: 13.5px; color: var(--accent-ink); text-decoration: none; }
.panel-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* A part a link named: marked for a moment with an outline that fades. */
.is-named::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 2px var(--ruby); opacity: 0; pointer-events: none; animation: named 1.8s var(--ease-ui); }
@keyframes named { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }
.lock { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--app-tile); color: var(--ink-2); font-size: 13.5px; }
.lock svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Lists and their states ---------- */
.rows { display: grid; }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: grid; align-items: center; gap: 10px 16px; padding: 12px 20px; color: inherit; text-decoration: none; min-width: 0; }
a.row { transition: background-color 0.12s var(--ease-ui); }
a.row:hover { background: var(--app-tile); }
a.row:focus-visible { outline-offset: -2px; }
.rows-head { display: grid; gap: 16px; padding: 8px 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--mute); }
.row-title { font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; }
code.row-title { font-family: var(--mono); font-size: 13px; }
.row-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mute); overflow-wrap: anywhere; }
.cell { min-width: 0; font-size: 14px; color: var(--ink-2); }
.cell-time { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cell-amount { text-align: right; color: var(--ink); }
.skeleton { display: grid; gap: 14px; padding: 20px; }
.sk-row { display: block; height: 12px; width: var(--w); border-radius: 6px; background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) {
  .sk-row { animation: sk 1.1s var(--ease-ui) infinite alternate; }
  .sk-row:nth-child(2n) { animation-delay: 0.2s; }
}
@keyframes sk { to { opacity: 0.4; } }
.state { display: grid; justify-items: start; gap: 12px; padding: 28px 20px; }
.state p { max-width: 62ch; font-size: 14.5px; color: var(--ink-2); }
.state-error p { color: var(--error-ink); }
.state-filtered { border-top: 1px dashed transparent; }
.empty { padding: 20px; font-size: 14px; color: var(--mute); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }

/* ---------- Pills: severity (shades of the one red), a finding's status ---------- */
.sevp { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; border: 1px solid var(--error-line); color: var(--error-ink); font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.sevp-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--error); }
.sevp-critical { background: var(--error); border-color: var(--error); color: #fff; }
.sevp-critical .sevp-dot { background: #fff; }
.sevp-high { background: var(--error-bg); }
.sevp-medium .sevp-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--error); }
.sevp-low { border-color: var(--line-strong); color: var(--ink-2); }
.sevp-low .sevp-dot { background: var(--mute); }
.sevp-unknown { border-color: var(--line-strong); color: var(--ink-2); }
.sevp-unknown .sevp-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--mute); }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; display: inline-block; }
.dot-critical, .dot-high { background: var(--error); }
.dot-critical { box-shadow: 0 0 0 3px var(--error-bg); }
.dot-medium { box-shadow: inset 0 0 0 1.5px var(--error); }
.dot-low { background: var(--mute); }
.fstatus { display: inline-flex; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.fstatus-acknowledged { background: var(--surface-2); border-color: transparent; color: var(--ink-2); }
.fstatus-resolved { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.fstatus-disputed { border-style: dashed; color: var(--mute); }
.fstatus-unknown { color: var(--mute); }
.page-app .status[data-status="available"] { color: var(--ok-ink); }

/* ---------- Notes inside a panel ---------- */
.note-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; color: var(--ink); }
.note-box p { color: var(--ink) !important; font-size: 14px !important; }
.note-wait { border: 1px solid var(--look-line); background: var(--look-bg); }
.note-ok { border: 1px solid var(--ok-line); background: var(--ok-bg); }
.note-bad { display: grid; justify-items: start; border: 1px solid var(--error-line); background: var(--error-bg); }
.note-warn { display: block; border: 1px solid var(--line-strong); background: var(--app-tile); color: var(--ink-2); }
.note-warn b { color: var(--ink); font-weight: 500; }
.pulse { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--yellow-deep); display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 1.4s var(--ease-ui) infinite; } }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

/* ---------- Dialogs: a modal for decisions (one finding is a page of its own, app-screens.css) ---------- */
.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--app-panel); color: var(--ink); box-shadow: 0 24px 64px rgba(13, 37, 61, 0.22); opacity: 0; transform: translateY(8px) scale(0.985); transition: opacity 0.2s var(--ease-ui), transform 0.24s var(--ease); }
.modal.is-open { opacity: 1; transform: none; }
.modal::backdrop { background: rgba(13, 37, 61, 0.32); opacity: 0; transition: opacity 0.24s var(--ease-ui); }
:root[data-theme="dark"] .modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.modal.is-open::backdrop { opacity: 1; }
.modal h2 { font-size: 20px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.3; }
.modal-text, .modal-body { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.modal-body { display: grid; gap: 10px; }
.modal-body b { color: var(--ink); font-weight: 500; }
.modal .field { margin-top: 16px; }
.modal .form-error { margin-top: 14px; }
.modal .dev-note { margin-top: 12px !important; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-actions .link-btn { margin-right: auto; font-size: 13.5px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 9px 8px 9px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.4; box-shadow: var(--lift-2); opacity: 0; transform: translateY(8px); transition: opacity 0.2s var(--ease-ui), transform 0.24s var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast-error { background: var(--error); color: #fff; }
.toast-text { flex: 1; }
.toast-btn { flex: none; padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.toast-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: inherit; opacity: 0.7; cursor: pointer; }
.toast-x:hover { opacity: 1; }
.toast-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- A phone ---------- */
@media (max-width: 767px) {
  .rail, .app-shell::before { display: none; }
  .frame { margin-left: 0; border-left: 0; }
  .topbar { height: 56px; gap: 10px; padding: 0 16px; }
  .topbar-logo { display: grid; flex: none; }
  .screens { --to-edge: 16px; }
  .screens > .page-title { margin-top: 0; margin-bottom: 14px; }
  .org-btn { max-width: 42vw; padding-right: 8px; }
  .org-domain { display: none; }
  .tool-btn, .avatar { width: 36px; height: 36px; }
  .topbar-tools { gap: 6px; }
  .topbar-help { gap: 6px; }
  .jump { margin-top: 8px; width: calc(100vw - 16px); max-height: 82dvh; }
  .jump-foot { display: none; }
  .app-chips { display: flex; gap: 6px; position: sticky; top: 56px; z-index: 39; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; background: var(--app-top); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .app-chips::-webkit-scrollbar { display: none; }
  html:has(body.page-app) { scroll-padding-top: 116px; }
  .screens { padding: 16px 16px 96px; }
  .pop-panel { position: fixed; top: 64px; left: 12px; right: 12px; max-width: none; min-width: 0; width: auto; }
  .rows-head { display: none; }
  .row { padding: 12px 16px; }
  .panel-head, .panel-body, .panel-note, .panel-foot, .pager { padding-left: 16px; padding-right: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; justify-items: stretch; }
  .toast { max-width: none; }
}
/* Search is its magnifier alone where the bar would push the organization off. */
@media (max-width: 640px) {
  .jump-btn { flex: none; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; background: var(--app-panel); color: var(--ink); }
  .jump-btn .jump-text, .jump-btn .jump-kbd { display: none; }
  .topbar-search, .topbar-search .jump-btn { flex: none; }
}
/* On a narrow phone the organization gets the room the logo had; the chips and the title name the screen. */
@media (max-width: 480px) {
  .topbar { gap: 8px; }
  .topbar-logo { display: none; }
  .topbar-start { flex: 1 1 auto; }
  .org-btn { max-width: none; min-width: 0; width: 100%; }
  .pop[data-pop="org"] { flex: 1; min-width: 0; }
  .topbar-tools { margin-left: 0; }
  .modal-actions { justify-content: stretch; }
  .modal-actions .btn { flex: 1; }
}

/* ---------- Our dropdowns and calendars (app-pickers.js) ---------- */
/* The native control stays in its place, see-through and out of reach, under our button. */
.drop { position: relative; display: inline-grid; min-width: 0; vertical-align: middle; }
.field .drop { display: grid; width: 100%; }
.drop > .drop-native { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.drop-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 40px; padding: 0 10px 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--app-panel); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: border-color 0.15s var(--ease-ui), box-shadow 0.15s var(--ease-ui); }
.drop-btn:hover { border-color: var(--mute); }
.drop-btn:focus-visible, .drop-btn[aria-expanded="true"] { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 36, 94, 0.16); }
.drop-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.drop-btn:disabled:hover { border-color: var(--line-strong); }
.drop-btn.is-empty .drop-value { color: var(--mute); }
.drop-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.18s var(--ease-ui); }
.drop-sel .drop-btn[aria-expanded="true"] .drop-chev { transform: rotate(180deg); }
.field .drop-btn { height: auto; min-height: 44px; padding: 0 12px; font-size: 16px; }
.drop-sm .drop-btn { height: 34px; min-width: 120px; padding: 0 8px 0 10px; }

/* The panel: in the top layer where the browser can, placed by app-pickers.js. */
.drop-pop, .drop-pop[popover] { position: fixed; inset: auto; z-index: 80; margin: 0; display: grid; align-content: start; gap: 2px; padding: 6px; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--dd-bg); color: var(--ink); box-shadow: 0 16px 40px var(--dd-shadow), 0 2px 6px rgba(0, 0, 0, 0.05); transform-origin: top left; animation: pop-in 0.14s var(--ease-ui); }
.drop-pop.is-up { transform-origin: bottom left; }
.drop-search-row { position: sticky; top: -6px; z-index: 1; display: flex; align-items: center; gap: 8px; margin: -6px -6px 4px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--dd-bg); color: var(--mute); }
.drop-search-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-search { flex: 1; min-width: 0; height: 34px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.drop-search::placeholder { color: var(--mute); }
.drop-list { display: grid; gap: 1px; }
.drop-group { padding: 8px 10px 4px; font-size: 12px; font-weight: 500; color: var(--mute); }
.drop-opt { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; border-radius: var(--r-sm); font-size: 14px; cursor: pointer; }
.drop-opt.is-active { background: var(--surface-2); }
.drop-opt.is-on { color: var(--accent-ink); font-weight: 500; }
.drop-opt[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.drop-opt-text { flex: 1; min-width: 0; }
.drop-check { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ruby); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.drop-none { padding: 12px 10px; color: var(--mute); font-size: 13.5px; overflow-wrap: anywhere; }

/* The calendar: one month, Sunday first as in the US, today ringed, the chosen day filled. */
.drop-cal { gap: 6px; padding: 10px 10px 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 4px; }
.cal-title { font-size: 14.5px; font-weight: 500; }
.cal-nav { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); cursor: pointer; }
.cal-nav:hover { background: var(--surface-2); color: var(--ink); }
.cal-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cal-grid { display: grid; gap: 2px; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { padding: 4px 0; text-align: center; font-size: 11.5px; font-weight: 500; color: var(--mute); }
.cal-day { width: 100%; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 0.12s var(--ease-ui); }
.cal-day:hover { background: var(--surface-2); }
.cal-day.is-out { color: var(--mute); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; }
.cal-day.is-on, .cal-day.is-on:hover { background: var(--primary); color: #fff; font-weight: 600; }
.cal-day:disabled { opacity: 0.3; cursor: not-allowed; }
.cal-day:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 2px; padding: 8px 4px 0; border-top: 1px solid var(--line); font-size: 13.5px; }

/* ---------- Buttons that answer (4. 11.: "dugmići sa svojim animacijama sjaja, razvlačenja") ---------- */
/* A light sweeps across a button the mouse comes onto, and a press gives a little, wider than it is tall, as if the
   button were soft; a filled button also lifts. Only where motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .page-app .btn { position: relative; overflow: hidden; isolation: isolate; transition: background-color 0.3s var(--ease-ui), border-color 0.3s var(--ease-ui), color 0.3s var(--ease-ui), transform 0.22s var(--ease-ui), box-shadow 0.25s var(--ease-ui); }
  .page-app .btn::after { content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.42) 48%, rgba(255, 255, 255, 0.08) 56%, transparent 70%); transform: translateX(-130%); }
  .page-app .btn-ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(234, 34, 97, 0.12) 48%, transparent 66%); }
  .page-app .btn:hover:not(:disabled)::after { transform: translateX(130%); transition: transform 0.75s var(--ease); }
  .page-app .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(224, 36, 94, 0.55); }
  .page-app .btn:active:not(:disabled) { transform: scale(1.03, 0.94); transition-duration: 0.08s; }
  .page-app .status-tabs button:active, .page-app .metric:active, .page-app .tile-link:active { transform: scale(0.985); }
  .page-app .tile-link, .page-app .metric { transition: transform 0.2s var(--ease-ui), border-color 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui); }
  .page-app .tile-link:hover { transform: translateY(-2px); }
}

/* ---------- Settings, after Shopify's (Dusan, 8. 11.) ----------
   Narrower than 1100px the settings pages are more rows of the sidebar, under a hairline; the column's head, search and
   organization, the gear and the Roles row belong to the wide layout only. */
.rs-head, .rs-search, .rs-org, .rs-none, .rail-gear, .rs-sub { display: none; }
.rs-list { margin-top: 0; }
@media (min-width: 1100px) {
  .rail-settings { display: none; }
  .rs-group { display: none; }
  /* The gear at the sidebar's foot, a round plate while a settings page is open. */
  .rail-gear { display: flex; color: var(--side-mute); }
  .rail-gear:hover { color: var(--side-ink); }
  .rail-gear.is-on { background: var(--side-active); color: var(--side-ink); }
  .rail-gear .rail-ico { transition: transform 0.45s var(--ease-ui); }
  .rail-gear.is-on .rail-ico, .rail-gear:hover .rail-ico { transform: rotate(60deg); }

  /* The column comes in from the folded sidebar, its rows one after another, as Shopify's does. */
  .page-app[data-area="settings"] .rail-settings {
    display: flex; flex-direction: column; gap: 10px; position: fixed; top: 0; bottom: 0; left: 52px; width: 248px; padding: 12px 10px 12px 8px;
    background: var(--side); overflow-y: auto; scrollbar-width: none; animation: rs-in 0.3s var(--ease-ui);
  }
  .rs-head { display: flex; align-items: center; gap: 4px; height: 36px; }
  .rs-back { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; color: var(--side-ink); transition: background-color 0.15s var(--ease-ui), transform 0.15s var(--ease-ui); }
  .rs-back:hover { background: var(--side-hover); transform: translateX(-2px); }
  .rs-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .rs-title { font-size: 14.5px; font-weight: 600; color: var(--side-ink); }
  .rs-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--side-field); color: var(--side-mute); border: 1px solid transparent; transition: border-color 0.15s var(--ease-ui); }
  .rs-search:focus-within { border-color: var(--side-line); }
  .rs-search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .rs-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--side-ink); font: inherit; font-size: 13.5px; outline: none; }
  .rs-search input::placeholder { color: var(--side-mute); }
  .rs-org { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--side-active); }
  .rs-org-mark { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--ruby); color: #fff; font-size: 12.5px; font-weight: 600; }
  .rs-org-text { display: grid; min-width: 0; line-height: 1.25; }
  .rs-org-text b { font-size: 13.5px; font-weight: 600; color: var(--side-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rs-org-text span { font-size: 12px; color: var(--side-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rs-none { display: block; padding: 6px 10px; font-size: 13px; color: var(--side-mute); }
  .rs-none[hidden] { display: none; }
  /* Its rows keep their names and square plates, whatever the folded sidebar beside them does. */
  .page-app[data-area="settings"] .rail .rail-settings .rail-item { border-radius: 8px; overflow: visible; height: 32px; padding: 0 10px; gap: 10px; }
  .page-app[data-area="settings"] .rail .rail-settings .rail-label { opacity: 1; visibility: visible; pointer-events: auto; transition: none; }
  .page-app[data-area="settings"] .rail .rail-settings .rail-badge { position: static; margin-left: auto; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); font-size: 11px; }
  .rail-settings .rail-item[aria-current="page"] { background: var(--side-active); color: var(--side-ink); font-weight: 500; }
  .rail-settings .rs-sub { display: block; }
  .page-app[data-area="settings"] .rail .rail-settings .rs-sub .rail-item { padding-left: 37px; height: 28px; font-size: 13px; }
  .rail-settings .rs-list > li[hidden] { display: none; }
  @media (prefers-reduced-motion: no-preference) {
    .page-app[data-area="settings"] .rs-list > li { animation: rs-row 0.32s var(--ease-ui) both; animation-delay: calc(var(--i, 0) * 30ms + 60ms); }
  }
}
@keyframes rs-in { from { opacity: 0; transform: translateX(-12px); } }
@keyframes rs-row { from { opacity: 0; transform: translateY(5px); } }

/* ---------- Shopify's settings parts, for every settings page (Dusan, 8. 11.) ----------
   The dashboard session gives its markup these classes; the shapes are here, once.
   .set-rows > a.set-row        a row with an icon, a title and words, and an arrow at its end ("Customer notifications")
   .set-tabs > button.set-tab   the round tabs over a table ("All", "Paid", "Unpaid"); aria-pressed marks the one on
   .badge-ok, .badge-warn, .badge-bad   the small filled states in a table ("Paid", "Pending", "Refused")
   .bill-card                   the big amount over its line and the card it goes on ("Upcoming bill")
   .set-head                    a section's name with its round buttons on the right ("Past bills" / "View in charge table") */
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 10px; }
.set-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.set-head p { margin-top: 2px; font-size: 13.5px; color: var(--mute); }
.set-head .set-actions { display: flex; gap: 8px; flex: none; }
.set-rows { border: 1px solid var(--line); border-radius: 14px; background: var(--app-panel); overflow: hidden; }
.set-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; transition: background-color 0.15s var(--ease-ui); }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row:hover { background: var(--app-tile); }
.set-row:focus-visible { outline-offset: -3px; }
.set-row > svg:first-child { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.set-row b { display: block; font-size: 14px; font-weight: 500; }
.set-row span { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); }
.set-row::after { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(-45deg); transition: transform 0.2s var(--ease-ui); }
.set-row:hover::after { transform: translateX(3px) rotate(-45deg); }
.set-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
.set-tab { height: 28px; padding: 0 11px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.set-tab:hover { background: var(--app-tile); color: var(--ink); }
.set-tab[aria-pressed="true"] { background: var(--line); color: var(--ink); }
.set-tab:disabled { opacity: 0.45; cursor: not-allowed; }
.badge-ok, .badge-warn, .badge-bad { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.badge-ok { background: #c7f0c4; color: #0c5132; }
.badge-warn { background: #ffe8a3; color: #5e4200; }
.badge-bad { background: #fed1d7; color: #8e0b21; }
:root[data-theme="dark"] .badge-ok { background: rgba(46, 160, 67, 0.22); color: #9be9a8; }
:root[data-theme="dark"] .badge-warn { background: rgba(212, 167, 44, 0.22); color: #f2cc60; }
:root[data-theme="dark"] .badge-bad { background: rgba(248, 81, 73, 0.2); color: #ffa198; }
.bill-card { display: grid; gap: 6px; padding: 18px 16px 16px; }
.bill-card .bill-amount { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.bill-card .bill-amount small { margin-left: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.bill-card .bill-line { font-size: 13.5px; color: var(--ink-2); }
.bill-card .bill-method { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; color: var(--ink); }
.bill-card .bill-method[hidden] { display: none; }
/* The card's own mark, its name and last four, and the pencil that opens Paddle's page for it (app-paycard.js). */
.bill-brand { width: 40px; height: 26px; flex: none; border-radius: 5px; box-shadow: 0 1px 2px rgba(13, 37, 61, 0.12); }
.bill-card-name { font-size: 14px; font-weight: 500; letter-spacing: 0.01em; }
.bill-edit { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.bill-edit:hover { background: var(--app-tile); color: var(--ink); }
.bill-edit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The plan's own red button, as Shopify's "Cancel plan". */
.page-app .btn-cancel { background: #fde6e7; color: #8e1f0b; border-color: transparent; box-shadow: none; }
.page-app .btn-cancel:hover { background: #fbd3d6; }
:root[data-theme="dark"] .page-app .btn-cancel { background: rgba(248, 81, 73, 0.16); color: #ffa198; }

/* Inside Shopify's admin (site/assets/app-shopify.js, docs/shopify-app.md 3.4): nothing to sign out of, no cookie note of the
   marketing site, no help bubble. Elements the page hides itself carry .embedded-off, set by the file that owns them. */
.embedded-off,
.embedded [data-signout],
.embedded [data-signout-solo],
.embedded .storage-note,
.embedded .talk { display: none !important; }
