/* ==========================================================================
   Граніт ERP — дизайн-система в стилі Apple (iOS / macOS)
   ========================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --blue: #007AFF; --green: #34C759; --orange: #FF9500; --red: #FF3B30; --yellow: #FFCC00;
  --purple: #AF52DE; --pink: #FF2D55; --teal: #30B0C7; --indigo: #5856D6; --gray: #8E8E93;

  --bg: #F2F2F7;              /* systemGroupedBackground */
  --bg-elev: #FFFFFF;         /* secondarySystemGroupedBackground */
  --bg-soft: #F7F7FA;
  --fill: rgba(120,120,128,.12);
  --fill-2: rgba(120,120,128,.08);
  --fill-strong: rgba(120,120,128,.2);
  --label: #000; --label-2: rgba(60,60,67,.6); --label-3: rgba(60,60,67,.3);
  --sep: rgba(60,60,67,.14);
  --glass: rgba(255,255,255,.72);
  --glass-strong: rgba(250,250,252,.86);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.03);
  --shadow: 0 2px 8px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
  --accent: var(--blue);
  --accent-tint: rgba(0,122,255,.12);

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --spring: cubic-bezier(.2,.9,.25,1.12);
  --ease: cubic-bezier(.25,.8,.25,1);
  --sidebar: 248px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000; --bg-elev: #1C1C1E; --bg-soft: #151517;
  --fill: rgba(120,120,128,.24); --fill-2: rgba(120,120,128,.16); --fill-strong: rgba(120,120,128,.36);
  --label: #fff; --label-2: rgba(235,235,245,.6); --label-3: rgba(235,235,245,.3);
  --sep: rgba(84,84,88,.6);
  --glass: rgba(28,28,30,.72); --glass-strong: rgba(36,36,38,.88);
  --shadow: 0 2px 8px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  --blue: #0A84FF; --green: #30D158; --orange: #FF9F0A; --red: #FF453A; --purple: #BF5AF2; --teal: #40C8E0; --indigo: #5E5CE6; --yellow: #FFD60A;
  --accent-tint: rgba(10,132,255,.2);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.42; color: var(--label); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -.01em;
  overscroll-behavior-y: none;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-tint); }
.hidden { display: none !important; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.gap-s { gap: 6px; } .gap-l { gap: 16px; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.red { color: var(--red); } .green { color: var(--green); } .orange { color: var(--orange); } .blue { color: var(--blue); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 16px; height: 16px; } svg.i.l { width: 26px; height: 26px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-right: .5px solid var(--sep);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: radial-gradient(circle at 30% 25%, #6b6b72, #2c2c30 55%, #111 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 6px rgba(0,0,0,.25); position: relative; overflow: hidden;
}
.brand-logo::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1.5px 1.5px at 20% 40%, rgba(255,255,255,.6), transparent), radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,.5), transparent),
  radial-gradient(1.2px 1.2px at 75% 30%, rgba(255,255,255,.45), transparent), radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,.4), transparent); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--label-2); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--label);
  font-weight: 500; transition: background .2s var(--ease), transform .15s var(--ease); position: relative; cursor: pointer;
}
.nav-item:hover { background: var(--fill-2); }
.nav-item:active { transform: scale(.98); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item .i { color: var(--accent); }
.nav-item.active .i { color: #fff; }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--fill); padding: 1px 7px; border-radius: 10px; color: var(--label-2); }
.nav-item.active .count { background: rgba(255,255,255,.25); color: #fff; }
.nav-sep { height: 14px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.me:hover { background: var(--fill-2); }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 28px; min-height: 56px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-bottom: .5px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--sep); }
.topbar .crumb { font-weight: 600; font-size: 15px; opacity: 0; transform: translateY(4px); transition: all .25s var(--ease); }
.topbar.scrolled .crumb { opacity: 1; transform: none; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--fill); color: var(--label-2);
  border: 0; cursor: pointer; min-width: 220px; transition: background .2s;
}
.search-trigger:hover { background: var(--fill-strong); }
.search-trigger kbd { margin-left: auto; font: 600 11px var(--font); background: var(--bg-elev); padding: 2px 6px; border-radius: 5px; box-shadow: var(--shadow-sm); }
.content { padding: 8px 28px 60px; max-width: 1400px; width: 100%; margin: 0 auto; }
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 10px 0 20px; }
.page-head h1 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.page-head .sub { color: var(--label-2); font-size: 15px; margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 500; margin-bottom: 6px; cursor: pointer; }

/* Мобільна нижня панель */
.tabbar { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  .content { padding: 4px 16px calc(100px + env(safe-area-inset-bottom)); }
  .search-trigger { min-width: 0; flex: 1; }
  .search-trigger kbd { display: none; }
  .page-head h1 { font-size: 30px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass-strong); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
    border-top: .5px solid var(--sep);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--gray); padding: 4px 0; position: relative; }
  .tab .i { width: 24px; height: 24px; transition: transform .3s var(--spring); }
  .tab.active { color: var(--accent); }
  .tab.active .i { transform: scale(1.08); }
  .tab .dot { position: absolute; top: 0; left: calc(50% + 8px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; }
}

/* ---------- Cards / grids ---------- */
.card {
  background: var(--bg-elev); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3, .section-title { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.section-title { margin: 26px 4px 10px; font-size: 20px; font-weight: 700; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g-side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* KPI */
.kpi { position: relative; overflow: hidden; cursor: default; }
.kpi .label { font-size: 13px; color: var(--label-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--label-2); margin-top: 2px; }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.kpi.link { cursor: pointer; }
.kpi.link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; white-space: nowrap;
  padding: 9px 16px; border-radius: 980px; font-weight: 600; font-size: 15px; background: var(--accent); color: #fff;
  transition: transform .2s var(--spring), filter .2s, background .2s, opacity .2s; user-select: none; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.gray { background: var(--fill); color: var(--accent); }
.btn.gray:hover { background: var(--fill-strong); filter: none; }
.btn.plain { background: transparent; color: var(--accent); padding: 8px 10px; }
.btn.plain:hover { background: var(--fill-2); filter: none; }
.btn.danger { background: var(--red); }
.btn.danger.gray { background: rgba(255,59,48,.1); color: var(--red); }
.btn.green { background: var(--green); }
.btn.dark { background: var(--label); color: var(--bg-elev); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 14px 22px; font-size: 17px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { padding: 8px; border-radius: 50%; width: 36px; height: 36px; }
.btn.icon.sm { width: 30px; height: 30px; padding: 6px; }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.btn.loading { pointer-events: none; opacity: .8; }
.icon-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--fill-2); }
.badge-dot { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; animation: pop .4s var(--spring); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--label-2); padding-left: 4px; }
.input, .select, .textarea {
  width: 100%; border: 0; outline: 0; background: var(--fill-2); border-radius: 10px; padding: 10px 12px; font-size: 15px;
  transition: box-shadow .2s, background .2s; box-shadow: inset 0 0 0 1px transparent; min-height: 40px;
}
.input:hover, .select:hover, .textarea:hover { background: var(--fill); }
.input:focus, .select:focus, .textarea:focus { background: var(--bg-elev); box-shadow: 0 0 0 4px var(--accent-tint), inset 0 0 0 1px var(--accent); }
.textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; align-items: center; gap: 0; background: var(--fill-2); border-radius: 10px; transition: box-shadow .2s, background .2s; }
.input-group:focus-within { background: var(--bg-elev); box-shadow: 0 0 0 4px var(--accent-tint), inset 0 0 0 1px var(--accent); }
.input-group .input { background: transparent !important; box-shadow: none !important; }
.input-group .addon { padding: 0 12px; color: var(--label-2); font-size: 14px; }
.search { position: relative; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--label-2); width: 17px; height: 17px; }
.search .input { padding-left: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid .span-2 { grid-column: 1 / -1; } }

/* Switch (iOS) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 51px; height: 31px; border-radius: 16px; background: var(--fill-strong); position: relative; transition: background .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .3s var(--spring); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch.sm .track { width: 38px; height: 23px; } .switch.sm .track::after { width: 19px; height: 19px; } .switch.sm input:checked + .track::after { transform: translateX(15px); }

/* Segmented control */
.seg { display: inline-flex; position: relative; background: var(--fill); border-radius: 10px; padding: 2px; gap: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--label); transition: color .2s; }
.seg button .n { color: var(--label-2); font-weight: 500; margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg .thumb { position: absolute; z-index: 0; top: 2px; bottom: 2px; border-radius: 8px; background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); transition: left .35s var(--spring), width .35s var(--spring); }
:root[data-theme="dark"] .seg .thumb { background: #636366; }
.seg button.on { font-weight: 600; }

/* ---------- Lists (iOS inset grouped) ---------- */
.list { background: var(--bg-elev); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; position: relative; min-height: 48px; transition: background .15s; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.list-row.link { cursor: pointer; }
.list-row.link:hover { background: var(--fill-2); }
.list-row.link:active { background: var(--fill); }
.list-row .chev { color: var(--label-3); }
.list-head { font-size: 13px; text-transform: uppercase; color: var(--label-2); padding: 18px 16px 6px; letter-spacing: .02em; }
.list-foot { font-size: 13px; color: var(--label-2); padding: 6px 16px 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--bg-elev); box-shadow: var(--shadow-sm); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; padding: 12px 14px; position: sticky; top: 0; background: var(--bg-elev); white-space: nowrap; border-bottom: .5px solid var(--sep); }
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover { color: var(--label); }
table.t td { padding: 11px 14px; border-bottom: .5px solid var(--sep); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .15s; }
table.t tbody tr.link { cursor: pointer; }
table.t tbody tr.link:hover { background: var(--fill-2); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td { font-weight: 700; border-top: .5px solid var(--sep); }

/* ---------- Pills / chips / avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 980px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--label-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill.blue { background: rgba(0,122,255,.12); color: var(--blue); }
.pill.green { background: rgba(52,199,89,.14); color: #248A3D; }
.pill.orange { background: rgba(255,149,0,.14); color: #C93400; }
.pill.red { background: rgba(255,59,48,.12); color: #D70015; }
.pill.purple { background: rgba(175,82,222,.14); color: #8944AB; }
.pill.gray { background: var(--fill); color: var(--label-2); }
.pill.teal { background: rgba(48,176,199,.14); color: #0071A4; }
:root[data-theme="dark"] .pill.green { color: var(--green); } :root[data-theme="dark"] .pill.orange { color: var(--orange); }
:root[data-theme="dark"] .pill.red { color: var(--red); } :root[data-theme="dark"] .pill.purple { color: var(--purple); } :root[data-theme="dark"] .pill.teal { color: var(--teal); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 980px; background: var(--fill-2); font-size: 13px; font-weight: 500; border: 0; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { background: var(--fill); }
.chip.on { background: var(--accent); color: #fff; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; flex: none; background: var(--gray); letter-spacing: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--bg-elev); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }

/* Progress */
.ring { --p: 0; --c: var(--accent); width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fill) 0); transition: --p .6s; position: relative; font-variant-numeric: tabular-nums; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg-elev); }
.ring span { position: relative; }
.ring.lg { width: 76px; height: 76px; font-size: 18px; } .ring.lg::before { inset: 7px; }
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; animation: grow .8s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Empty / skeleton / spinner ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--label-2); }
.empty .i { width: 46px; height: 46px; color: var(--label-3); margin-bottom: 10px; stroke-width: 1.4; }
.empty h3 { color: var(--label); margin: 0 0 4px; font-size: 18px; }
.skeleton { background: linear-gradient(90deg, var(--fill-2) 25%, var(--fill) 37%, var(--fill-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--fill-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader { display: grid; place-items: center; padding: 60px; }

/* ---------- Sheet / modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s ease both; display: flex; align-items: center; justify-content: center; padding: 20px; }
.backdrop.out { animation: fadeOut .22s ease both; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet {
  background: var(--bg); border-radius: 22px; width: 100%; max-width: 560px; max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: sheetIn .45s var(--spring) both; overflow: hidden;
}
.sheet.wide { max-width: 880px; } .sheet.xwide { max-width: 1100px; } .sheet.narrow { max-width: 420px; }
.backdrop.out .sheet { animation: sheetOut .22s ease both; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(16px) scale(.97); } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; background: var(--glass-strong); backdrop-filter: blur(20px); border-bottom: .5px solid var(--sep); }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.sheet-head .btn { min-width: 70px; }
.sheet-body { padding: 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: .5px solid var(--sep); background: var(--glass-strong); }
@media (max-width: 700px) {
  .backdrop { align-items: flex-end; padding: 0; }
  .sheet, .sheet.wide, .sheet.xwide { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 94dvh; animation-name: sheetUp; }
  .backdrop.out .sheet { animation-name: sheetDown; }
  .sheet-body { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  @keyframes sheetDown { to { transform: translateY(100%); } }
}
/* Alert (iOS) */
.alert { max-width: 300px; text-align: center; border-radius: 16px; background: var(--glass-strong); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); overflow: hidden; box-shadow: var(--shadow-lg); animation: alertIn .35s var(--spring) both; width: 100%; }
@keyframes alertIn { from { opacity: 0; transform: scale(1.12); } }
.alert .a-body { padding: 20px 18px 16px; }
.alert h3 { margin: 0 0 4px; font-size: 17px; }
.alert p { margin: 0; font-size: 13px; color: var(--label-2); }
.alert .a-input { margin-top: 12px; }
.alert .a-btns { display: flex; border-top: .5px solid var(--sep); }
.alert .a-btns button { flex: 1; border: 0; background: transparent; padding: 12px; font-size: 17px; color: var(--accent); cursor: pointer; transition: background .15s; }
.alert .a-btns button + button { border-left: .5px solid var(--sep); }
.alert .a-btns button:hover { background: var(--fill-2); }
.alert .a-btns button.bold { font-weight: 600; }
.alert .a-btns button.destructive { color: var(--red); }
@media (max-width: 700px) { .backdrop.alert-bd { align-items: center; padding: 20px; } }

/* ---------- Toast (Dynamic Island) ---------- */
.island-wrap { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.island {
  pointer-events: auto; background: #000; color: #fff; border-radius: 28px; padding: 10px 18px 10px 12px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; font-weight: 500; max-width: min(92vw, 440px);
  animation: islandIn .6s var(--spring) both; cursor: pointer;
}
.island.out { animation: islandOut .35s var(--ease) both; }
.island .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.island .ic .i { width: 17px; height: 17px; stroke-width: 2.4; }
.island .t { font-weight: 600; } .island .b { color: rgba(255,255,255,.7); font-size: 13px; }
@keyframes islandIn { 0% { opacity: 0; transform: scale(.4, .6); max-width: 120px; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes islandOut { to { opacity: 0; transform: scale(.6) translateY(-10px); } }

/* ---------- Popover / tooltip ---------- */
.popover { position: fixed; z-index: 200; background: var(--glass-strong); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-radius: 14px; box-shadow: var(--shadow-lg); border: .5px solid var(--sep); padding: 6px; min-width: 220px; max-width: 340px; max-height: 70vh; overflow: auto;
  animation: popIn .3s var(--spring) both; transform-origin: top left; }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } }
.popover .menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.popover .menu-item:hover { background: var(--accent); color: #fff; }
.popover .menu-item:hover .muted { color: rgba(255,255,255,.75); }
.popover .menu-item.danger { color: var(--red); }
.popover .menu-item.danger:hover { background: var(--red); color: #fff; }
.popover .menu-sep { height: .5px; background: var(--sep); margin: 4px 6px; }
.tip { position: fixed; z-index: 250; pointer-events: none; background: var(--glass-strong); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: .5px solid var(--sep); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); max-width: 300px; font-size: 13px; animation: popIn .25s var(--spring) both; }

/* ---------- Spotlight ---------- */
.spotlight-bd { align-items: flex-start; padding-top: 12vh; }
.spotlight { width: 100%; max-width: 640px; background: var(--glass-strong); backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 18px; box-shadow: var(--shadow-lg); border: .5px solid var(--sep); overflow: hidden; animation: alertIn .35s var(--spring) both; }
.spotlight .s-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.spotlight .s-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 22px; font-weight: 400; }
.spotlight .s-res { max-height: 50vh; overflow: auto; border-top: .5px solid var(--sep); padding: 6px; }
.spotlight .s-res:empty { display: none; }
.spotlight .s-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.spotlight .s-item.on { background: var(--accent); color: #fff; }
.spotlight .s-item.on .muted { color: rgba(255,255,255,.75); }
.spotlight .s-grp { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--label-2); padding: 8px 12px 4px; }

/* ---------- Photos ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); cursor: zoom-in; animation: pop .4s var(--spring) both; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.photo:hover img { transform: scale(1.05); }
.photo .pdf { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--red); }
.photo .ph-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.photo .ph-btn { width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(10px); }
.photo .ph-btn .i { width: 14px; height: 14px; stroke-width: 2.2; }
.photo .ph-btn.on { background: var(--green); }
.photo .ph-tag { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(10px); }
.photo .ph-tag.on { background: var(--green); }
.photo.uploading::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.photo.uploading .spinner { position: absolute; left: calc(50% - 11px); top: calc(50% - 11px); z-index: 1; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.photo-add { aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed var(--fill-strong); display: grid; place-items: center; color: var(--accent); cursor: pointer; background: transparent; transition: all .2s; text-align: center; font-size: 12px; font-weight: 500; }
.photo-add:hover { background: var(--accent-tint); border-color: var(--accent); }
.dropzone.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; animation: fadeIn .25s both; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 6px; animation: zoomIn .45s var(--spring) both; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .lb-close, .lightbox .lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); }
.lightbox .lb-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lightbox .lb-nav.prev { left: 16px; } .lightbox .lb-nav.next { right: 16px; }
.lightbox .lb-cap { position: absolute; bottom: 20px; color: rgba(255,255,255,.8); font-size: 14px; }
@keyframes zoomIn { from { opacity: 0; transform: scale(.85); } }

/* ---------- Orders ---------- */
.order-card { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.order-card .num { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.order-list { display: flex; flex-direction: column; gap: 10px; }
.order-row { display: grid; grid-template-columns: 46px minmax(0, 1.6fr) minmax(0, 1fr) 120px 120px 26px; gap: 14px; align-items: center; padding: 14px 16px; background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease); animation: viewIn .4s var(--ease) both; }
.order-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.order-row .title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) { .order-row { grid-template-columns: 46px minmax(0, 1fr) auto; } .order-row .hide-m { display: none; } }
.prio { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.prio.p1 { background: var(--orange); } .prio.p2 { background: var(--red); animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255,59,48,.2); } }

.module-card { background: var(--bg-elev); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; animation: viewIn .4s var(--ease) both; }
.module-card + .module-card { margin-top: 12px; }
.module-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.module-head .m-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; font-size: 18px; }
.module-head .m-title { font-weight: 600; font-size: 16px; }
.module-head .caret { transition: transform .3s var(--spring); color: var(--label-3); }
.module-card.open .module-head .caret { transform: rotate(90deg); }
.module-body { padding: 0 16px 16px; display: none; }
.module-card.open .module-body { display: block; animation: viewIn .35s var(--ease) both; }
.m-sub { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--label-2); margin: 18px 0 8px; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--label-2); } .kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }

/* Ланцюжок майстрів */
.chain { display: flex; flex-direction: column; gap: 0; }
.chain-step { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; position: relative; padding-bottom: 14px; }
.chain-step:last-child { padding-bottom: 0; }
.chain-step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--fill-strong); border-radius: 1px; }
.chain-step:last-child::before { display: none; }
.chain-step.done::before { background: var(--green); }
.chain-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--label-2); font-size: 12px; font-weight: 700; z-index: 1; }
.chain-step.done .chain-dot { background: var(--green); color: #fff; }
.chain-step.active .chain-dot, .chain-step.in_progress .chain-dot { background: var(--accent); color: #fff; animation: pulseBlue 2s infinite; }
@keyframes pulseBlue { 50% { box-shadow: 0 0 0 6px var(--accent-tint); } }

/* Редактор етапів */
.step-edit { display: grid; grid-template-columns: 26px minmax(140px, 1fr) minmax(160px, 1.2fr) 110px auto; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: var(--fill-2); animation: viewIn .3s var(--ease) both; }
.step-edit + .step-edit { margin-top: 6px; }
.step-edit .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.step-edit .input, .step-edit .select { background: var(--bg-elev); min-height: 36px; padding: 7px 10px; font-size: 14px; }
.step-edit .instr { grid-column: 2 / -1; }
@media (max-width: 760px) { .step-edit { grid-template-columns: 26px 1fr 1fr; } .step-edit .pay, .step-edit .acts { grid-column: auto; } .step-edit .instr { grid-column: 1 / -1; } }
.worker-pick { display: flex; align-items: center; gap: 8px; background: var(--bg-elev); border-radius: 10px; padding: 4px 10px 4px 4px; cursor: pointer; min-height: 36px; border: 0; width: 100%; text-align: left; transition: box-shadow .2s; }
.worker-pick:hover { box-shadow: 0 0 0 3px var(--accent-tint); }
.load-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: var(--fill); color: var(--label-2); }
.load-badge.l0 { background: rgba(52,199,89,.15); color: var(--green); }
.load-badge.l1 { background: rgba(255,149,0,.15); color: var(--orange); }
.load-badge.l2 { background: rgba(255,59,48,.14); color: var(--red); }

/* Плаваюча панель дій */
.floatbar { position: sticky; bottom: 16px; z-index: 15; margin-top: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border-radius: 20px;
  background: var(--glass-strong); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); border: .5px solid var(--sep); animation: viewIn .5s var(--spring) both; }
@media (max-width: 900px) { .floatbar { bottom: calc(80px + env(safe-area-inset-bottom)); flex-wrap: wrap; } }

/* Шаблони модулів */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg-elev); border: 0; cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); transition: transform .25s var(--spring), box-shadow .2s; }
.tpl:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow); }
.tpl:active { transform: scale(.97); }
.tpl .m-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.tpl .nm { font-weight: 600; font-size: 14px; }

/* Завдання майстра */
.task-card { background: var(--bg-elev); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .3s var(--spring), box-shadow .3s; display: flex; flex-direction: column; gap: 12px; animation: viewIn .45s var(--ease) both; position: relative; overflow: hidden; }
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.task-card:active { transform: scale(.98); }
.task-card .t-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.task-card.prio-2::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.task-card.prio-1::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.task-hero { border-radius: 24px; padding: 22px; color: #fff; background: linear-gradient(135deg, #1c1c1e, #3a3a3c); position: relative; overflow: hidden; }
.task-hero::after { content: ""; position: absolute; inset: 0; opacity: .35; background:
  radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 70%, #ddd, transparent), radial-gradient(2px 2px at 70% 40%, #eee, transparent),
  radial-gradient(1px 1px at 85% 80%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 15%, #ccc, transparent), radial-gradient(1px 1px at 45% 50%, #fff, transparent); pointer-events: none; }
.task-hero h1 { margin: 6px 0 4px; font-size: 30px; letter-spacing: -.03em; }
.task-hero .pill { background: rgba(255,255,255,.18); color: #fff; }
.big-action { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 10; }
@media (min-width: 901px) { .big-action { bottom: 16px; } }
.success-burst { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; pointer-events: none; }
.success-burst .circle { width: 140px; height: 140px; border-radius: 50%; background: var(--green); display: grid; place-items: center; animation: burst 1.4s var(--spring) both; box-shadow: 0 20px 60px rgba(52,199,89,.5); }
.success-burst .circle .i { width: 70px; height: 70px; color: #fff; stroke-width: 3; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .3s ease forwards; }
@keyframes burst { 0% { transform: scale(0); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Графіки */
.chart { width: 100%; height: 220px; }
.chart .bar-r { fill: var(--accent); transition: opacity .2s; rx: 4; }
.chart .bar-r.b2 { fill: var(--green); }
.chart .bar-r:hover { opacity: .75; }
.chart text { fill: var(--label-2); font-size: 10px; font-family: var(--font); }
.chart .grid-l { stroke: var(--sep); stroke-width: .5; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--label-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar + .hbar { margin-top: 10px; }

/* Логін */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(0,122,255,.18), transparent 60%), radial-gradient(900px 600px at 110% 110%, rgba(175,82,222,.16), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--glass-strong); backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 28px; padding: 34px 28px 28px; box-shadow: var(--shadow-lg); border: .5px solid var(--sep); animation: sheetIn .7s var(--spring) both; position: relative; z-index: 1; }
.auth-card .brand-logo { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; }
.auth-card h1 { text-align: center; margin: 0; font-size: 26px; letter-spacing: -.03em; }
.auth-card .sub { text-align: center; color: var(--label-2); margin: 4px 0 24px; font-size: 14px; }
.auth-card .input { background: var(--fill); padding: 13px 14px; font-size: 16px; }
.auth-err { color: var(--red); font-size: 13px; text-align: center; min-height: 18px; margin-top: 10px; }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--label-2); text-align: center; display: flex; gap: 6px; align-items: center; justify-content: center; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 46px; height: 56px; text-align: center; font-size: 24px; font-weight: 600; border-radius: 12px; border: 0; background: var(--fill); outline: 0; transition: box-shadow .2s; }
.otp input:focus { box-shadow: 0 0 0 3px var(--accent); background: var(--bg-elev); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 18s ease-in-out infinite; }
@keyframes float { 33% { transform: translate(40px, -30px) scale(1.1); } 66% { transform: translate(-30px, 30px) scale(.95); } }

/* Нотифікації */
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.notif:hover { background: var(--fill-2); }
.notif.unread .n-t::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 2px; }
.n-t { font-weight: 600; font-size: 14px; } .n-b { font-size: 13px; color: var(--label-2); }

/* Друк */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; color: #000; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; }
}
.print-root { display: none; font-family: Arial, sans-serif; color: #000; font-size: 12pt; }
.pf-row { display: flex; border-bottom: 1.2px solid #000; min-height: 9mm; align-items: flex-end; padding-bottom: 1mm; gap: 3mm; }
.pf-row b { white-space: nowrap; }
.pf-row .v { flex: 1; font-size: 11pt; }
.pf-row .m { width: 30mm; border-left: 1.2px solid #000; align-self: stretch; padding-left: 2mm; font-size: 9pt; display: flex; align-items: flex-end; }
.pf-box { border: 1.2px solid #000; min-height: 45mm; margin: 6mm 0 2mm; padding: 2mm; display: flex; gap: 2mm; flex-wrap: wrap; }
.pf-box img { height: 42mm; object-fit: contain; }
.pf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3mm; }
.pf-mh { text-align: right; font-weight: bold; font-size: 10pt; }

/* Скроли */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--fill-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

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

/* Компактні KPI майстра на телефоні */
@media (max-width: 700px) { .kpi-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kpi-compact .card { padding: 12px; } .kpi-compact .value { font-size: 20px; } .kpi-compact .label { font-size: 11px; } }
