/* Orbitrix Production Planning demo */
:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #F8F9FC;
  --ink: #0B1222;
  --ink-2: #2E3648;
  --muted: #687085;
  --faint: #9AA1B2;
  --line: #E5E7EF;
  --line-2: #EEF0F5;
  --brand: #5B4CF5;
  --brand-2: #7C3AED;
  --brand-soft: #EFEDFF;
  --grad: linear-gradient(135deg, #6366F1 0%, #7C3AED 100%);
  --side: #0B1222;
  --side-2: #131C30;

  --planned: #475569;   --planned-bg: #F1F5F9;  --planned-line: #CBD5E1;
  --waiting: #B45309;   --waiting-bg: #FFF7E8;  --waiting-line: #FCD9A0;
  --inprogress: #1D4ED8; --inprogress-bg: #EEF3FF; --inprogress-line: #BFD0FF;
  --qc: #7C3AED;        --qc-bg: #F4EFFF;       --qc-line: #D9C8FF;
  --finished: #047857;  --finished-bg: #EAFBF3; --finished-line: #A7E8CB;
  --red: #DC2626; --red-bg: #FEF1F1; --red-line: #FBC7C7;
  --amber: #B45309; --amber-bg: #FFF7E8;
  --green: #047857; --green-bg: #EAFBF3;
  --blue: #1D4ED8; --blue-bg: #EEF3FF;
  --violet: #7C3AED; --violet-bg: #F4EFFF;

  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --sh-2: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .05);
  --sh-3: 0 30px 60px -20px rgba(15, 23, 42, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side-w: 256px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.red { color: var(--red) !important; } .amber { color: var(--amber) !important; } .green { color: var(--green) !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: #C9CFDC;
  display: flex; flex-direction: column; padding: 20px 14px; z-index: 30;
  background-image: radial-gradient(600px 300px at -10% -10%, rgba(124, 58, 237, .25), transparent 60%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-logo { display: inline-flex; }
.logo { width: 40px; height: 40px; display: block; border-radius: 11px; background: #040712; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.brand b { display: block; color: #fff; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 12px; color: #8C95AB; margin-top: -1px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; font-weight: 500; font-size: 14.5px;
  color: #B5BDCF; transition: background .2s, color .2s; text-align: left; width: 100%;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav a.active .ic { color: #A5B4FC; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5F6880; padding: 18px 12px 6px; font-weight: 600; }
.nav button { color: #7F889E; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.biz { padding: 12px; border-radius: 12px; background: var(--side-2); border: 1px solid rgba(255, 255, 255, .06); }
.biz b { display: block; color: #fff; font-size: 13.5px; }
.biz small { color: #8C95AB; font-size: 12px; }
.side-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: #B5BDCF; font-size: 14px; font-weight: 500; border: 1px solid rgba(255, 255, 255, .1); transition: background .2s; }
.side-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-cta { display: block; padding: 14px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(124, 58, 237, .8); transition: transform .25s var(--ease); }
.side-cta:hover { transform: translateY(-2px); }
.side-cta small { display: block; opacity: .8; font-size: 12px; }
.side-cta b { font-size: 14px; }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(243, 244, 248, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(229, 231, 239, .7);
}
.tb-left { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); }
.tb-biz { font-weight: 600; color: var(--ink-2); }
.live { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; background: var(--green-bg); color: var(--green); font-weight: 600; font-size: 12.5px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .2s; min-height: 44px; }
.user-chip:hover { box-shadow: var(--sh-2); }
.uc-t { text-align: left; line-height: 1.15; }
.uc-t b { display: block; font-size: 13.5px; }
.uc-t small { font-size: 11.5px; color: var(--muted); }
.mob { display: none !important; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.icon-btn .ic { width: 20px; height: 20px; }

.view { padding: 28px 28px 40px; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 28px 26px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); max-width: 1480px; width: 100%; margin: 0 auto; }
.foot a { color: var(--brand); font-weight: 600; }
.tabbar { display: none; }

/* entrance */
.view.enter > * { animation: rise .6s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; }
.view.enter > *:nth-child(5) { animation-delay: .2s; }
.view.enter > *:nth-child(6) { animation-delay: .25s; }
.view.enter > *:nth-child(n+7) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Common ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.eyebrow.light { color: #C7D2FE; }
.lead { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 800; margin-top: 4px; }
.ph-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h .muted { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 22px 6px; font-size: 14px; }
.empty .ic { color: var(--green); }
.empty.tall { flex-direction: column; justify-content: center; padding: 60px 10px; text-align: center; }
.empty.tall .ic { width: 30px; height: 30px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 18px; border-radius: 12px;
  font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .18s var(--ease), box-shadow .2s, background .2s, opacity .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -10px rgba(91, 76, 245, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { box-shadow: 0 12px 26px -10px rgba(91, 76, 245, 1), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.white { background: #fff; color: var(--ink); }
.btn.danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; box-shadow: 0 8px 20px -10px rgba(220, 38, 38, .9); }
.btn.lg { min-height: 50px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.xl { min-height: 60px; font-size: 16.5px; border-radius: 16px; }
.btn.small { min-height: 38px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.a-planned { background: linear-gradient(135deg, #2563EB, #1D4ED8); box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .9); }
.btn.a-inprogress { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.btn.a-qc { background: linear-gradient(135deg, #10B981, #047857); box-shadow: 0 8px 20px -10px rgba(4, 120, 87, .9); }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 13.5px; }
.link .ic { width: 16px; height: 16px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill .ic { width: 13px; height: 13px; }
.pill.big { padding: 8px 14px; font-size: 13.5px; }
.pill.s-planned, .s-planned .pill { background: var(--planned-bg); color: var(--planned); }
.pill.s-waiting { background: var(--waiting-bg); color: var(--waiting); }
.pill.s-inprogress { background: var(--inprogress-bg); color: var(--inprogress); }
.pill.s-qc { background: var(--qc-bg); color: var(--qc); }
.pill.s-finished { background: var(--finished-bg); color: var(--finished); }
.pill.s-delayed { background: var(--red); color: #fff; box-shadow: 0 6px 14px -6px rgba(220, 38, 38, .8); animation: throb 2.4s ease-in-out infinite; }
@keyframes throb { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); } }
.tag { display: inline-flex; align-items: center; font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; vertical-align: 1px; }
.t-red.tag { background: var(--red-bg); color: var(--red); }
.t-amber.tag { background: var(--amber-bg); color: var(--amber); }
.t-green.tag { background: var(--green-bg); color: var(--green); }
.t-violet.tag { background: var(--violet-bg); color: var(--violet); }

.ptile {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
  background: linear-gradient(140deg, var(--c1), var(--c2)); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -8px var(--c2); text-shadow: 0 1px 1px rgba(0, 0, 0, .15);
}
.ptile.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.ptile.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 15px; }
.ptile.mat { --c1: #64748B; --c2: #334155; }
.ptile.mat .ic { width: 24px; height: 24px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av); color: #fff; font-size: 12px; font-weight: 700; flex: none; box-shadow: 0 0 0 2px #fff; }
.av.xs { width: 22px; height: 22px; font-size: 9.5px; box-shadow: none; }

.meter { display: block; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; transition: width .8s var(--ease); animation: fill 1s var(--ease) both; transform-origin: left; }
.meter.thick { height: 8px; }
@keyframes fill { from { transform: scaleX(0); } }
.meter .red { background: linear-gradient(90deg, #F87171, #DC2626); }
.meter .amber { background: linear-gradient(90deg, #FBBF24, #D97706); }
.meter .green { background: linear-gradient(90deg, #34D399, #059669); }
.meter .blue { background: linear-gradient(90deg, #60A5FA, #2563EB); }

/* ---------- Summary ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { font-size: 34px; font-weight: 800; margin: 6px 0 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 16px; box-shadow: var(--sh-1); transition: transform .25s var(--ease), box-shadow .25s; min-width: 0; }
a.kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--kc-bg); opacity: .8; }
.kpi > * { position: relative; z-index: 1; }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kc-bg); color: var(--kc); }
.kpi-l { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.kpi-v { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin-top: 10px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 15px; color: var(--muted); font-weight: 600; }
.kpi-s { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.t-blue { --kc: var(--blue); --kc-bg: var(--blue-bg); }
.kpi.t-red { --kc: var(--red); --kc-bg: var(--red-bg); border-color: var(--red-line); }
.kpi.t-red .kpi-v { color: var(--red); }
.kpi.t-amber { --kc: var(--amber); --kc-bg: var(--amber-bg); }
.kpi.t-green { --kc: var(--green); --kc-bg: var(--green-bg); }
.kpi.t-violet { --kc: var(--violet); --kc-bg: var(--violet-bg); }
.kpis.three .kpi-v { font-size: 28px; }

.list { display: flex; flex-direction: column; gap: 4px; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; text-align: left; width: 100%; transition: background .2s; min-height: 56px; }
button.li:hover { background: var(--surface-2); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-main b { font-size: 14px; font-weight: 600; }
.li-main > span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.li-main .meter { margin-top: 6px; max-width: 260px; }
.li-side { text-align: right; flex: none; }
.li-side b { display: block; font-size: 15px; }
.li-side span { font-size: 12px; color: var(--muted); }
.li .chev { color: var(--faint); }
.dot-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dot-ic.t-red { background: var(--red-bg); color: var(--red); }
.dot-ic.t-amber { background: var(--amber-bg); color: var(--amber); }
.big-n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.big-n small { font-size: 13px; color: var(--muted); font-weight: 600; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .bar-bg { fill: var(--surface-2); }
.chart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.chart.c-brand .bar { fill: #C7C2FF; } .chart.c-brand .bar.hl { fill: var(--brand); }
.chart.c-amber .bar { fill: #FCD9A0; } .chart.c-amber .bar.hl { fill: #F59E0B; }
.chart .bv { font-size: 12px; font-weight: 700; fill: var(--ink-2); animation: fadeIn .6s .5s both; }
.chart .bl { font-size: 11.5px; fill: var(--muted); font-weight: 500; }
.chart .avg { stroke: #D97706; stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart .avg-t { font-size: 11.5px; font-weight: 700; fill: #B45309; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes fadeIn { from { opacity: 0; } }
.chart-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
.tbl td small { display: block; font-size: 12px; color: var(--muted); }
.tbl tr.clickable { cursor: pointer; transition: background .2s; }
.tbl tr.clickable:hover { background: var(--surface-2); }
.card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 20px; }
.card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 20px; }
.cellp { display: flex; align-items: center; gap: 10px; }
.cellp small { display: block; }
.oh { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
.oh .meter { width: 120px; }

.cta-band {
  margin-top: 22px; border-radius: 24px; padding: 28px 30px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: radial-gradient(500px 220px at 90% 0%, rgba(167, 139, 250, .45), transparent 60%), linear-gradient(135deg, #111A2E, #1E1B4B);
  box-shadow: var(--sh-2);
}
.cta-band h3 { font-size: 22px; margin: 6px 0; }
.cta-band p { margin: 0; color: #C3C8D9; max-width: 620px; font-size: 14px; }

/* ---------- Board ---------- */
.jump { display: none; }
.board { display: grid; grid-template-columns: repeat(5, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; scroll-behavior: smooth; }
.col { background: #ECEEF4; border-radius: 18px; padding: 10px; min-height: 360px; transition: background .2s, box-shadow .2s; border: 1px solid transparent; }
.col.drop-ok { background: var(--brand-soft); box-shadow: inset 0 0 0 2px #C7C2FF; }
.col-h { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; }
.col-h b { display: block; font-size: 14px; }
.col-h small { display: block; font-size: 12px; color: var(--muted); }
.col-h .count { margin-left: auto; min-width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface); box-shadow: var(--sh-1); }
.col-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.col-ic .ic { width: 16px; height: 16px; }
.col.s-planned .col-ic { background: var(--planned-bg); color: var(--planned); box-shadow: inset 0 0 0 1px var(--planned-line); }
.col.s-waiting .col-ic { background: var(--waiting-bg); color: var(--waiting); box-shadow: inset 0 0 0 1px var(--waiting-line); }
.col.s-inprogress .col-ic { background: var(--inprogress-bg); color: var(--inprogress); box-shadow: inset 0 0 0 1px var(--inprogress-line); }
.col.s-qc .col-ic { background: var(--qc-bg); color: var(--qc); box-shadow: inset 0 0 0 1px var(--qc-line); }
.col.s-finished .col-ic { background: var(--finished-bg); color: var(--finished); box-shadow: inset 0 0 0 1px var(--finished-line); }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.col-empty { padding: 26px 14px; text-align: center; color: var(--faint); font-size: 13px; border: 1.5px dashed #D5D9E3; border-radius: 14px; }

.bcard {
  position: relative; background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--sh-1), 0 0 0 1px var(--line);
  cursor: pointer; transition: box-shadow .25s, transform .25s var(--ease); display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.bcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sc); }
.bcard.s-planned { --sc: #94A3B8; } .bcard.s-waiting { --sc: #F59E0B; } .bcard.s-inprogress { --sc: #3B82F6; } .bcard.s-qc { --sc: #8B5CF6; } .bcard.s-finished { --sc: #10B981; }
.bcard.is-delayed { box-shadow: var(--sh-1), 0 0 0 1.5px var(--red-line); background: linear-gradient(180deg, #FFF8F8, #fff 40%); }
.bcard.is-delayed::before { background: var(--red); }
.bcard:hover { box-shadow: var(--sh-2), 0 0 0 1px var(--line); transform: translateY(-2px); }
.bcard.dragging { opacity: .5; transform: rotate(2deg); }
.bcard.pulse { animation: cardPulse 1.6s var(--ease) .1s 1; }
@keyframes cardPulse { 0% { box-shadow: 0 0 0 0 rgba(91, 76, 245, .55), var(--sh-2); } 60% { box-shadow: 0 0 0 10px rgba(91, 76, 245, 0), var(--sh-2); } 100% { box-shadow: var(--sh-1), 0 0 0 1px var(--line); } }
.bc-top { display: flex; align-items: center; gap: 11px; }
.bc-t { flex: 1; min-width: 0; }
.bc-t b { display: block; font-size: 15px; line-height: 1.25; }
.bc-t span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bc-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.bc-meta span { display: flex; align-items: center; gap: 7px; }
.bc-meta .ic { width: 14px; height: 14px; color: var(--faint); }
.bc-meta .red .ic { color: var(--red); }
.bc-meta em { font-style: normal; color: var(--faint); font-size: 11.5px; }
.bc-prob, .bc-short { display: flex; gap: 8px; font-size: 12.5px; padding: 9px 10px; border-radius: 10px; line-height: 1.4; }
.bc-prob { background: var(--red-bg); color: #991B1B; }
.bc-short { background: var(--waiting-bg); color: #92400E; }
.bc-prob .ic, .bc-short .ic { width: 15px; height: 15px; margin-top: 1px; }
.bc-short em { display: block; font-style: normal; font-weight: 700; margin-top: 2px; }
.bc-yield { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.yl { display: flex; justify-content: space-between; font-weight: 600; }
.yl.muted { font-weight: 500; }
.bc-run { display: flex; flex-direction: column; gap: 5px; }
.bc-run small { font-size: 12px; color: var(--muted); }
.bc-foot { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 9px; }
.bc-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-actions { display: flex; gap: 8px; }
.btn-act {
  flex: 1; min-height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px;
  color: #fff; transition: transform .15s var(--ease), filter .2s; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-act:active { transform: scale(.96); }
.btn-act:hover { filter: brightness(1.06); }
.btn-act .ic { width: 16px; height: 16px; }
.a-waiting { background: linear-gradient(135deg, #F59E0B, #D97706); }
.a-planned { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.a-inprogress { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.a-qc { background: linear-gradient(135deg, #10B981, #047857); }
.a-done { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn-sq { width: 48px; min-height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s; }
.btn-sq:hover { background: var(--red-bg); color: var(--red); }
.btn-sq.on { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px var(--red-line); }

/* ---------- Plan ---------- */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.plan-form { display: flex; flex-direction: column; gap: 24px; padding: 22px; }
.check-panel { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.flabel { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.flabel small { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.stepn { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 800; }
.opts { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); text-align: left; transition: border-color .2s, background .2s, box-shadow .2s; min-height: 60px; }
.opt:hover { border-color: #C7C2FF; }
.opt.sel { border-color: var(--brand); background: #FAF9FF; box-shadow: 0 0 0 3px rgba(91, 76, 245, .12); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #CBD0DC; flex: none; transition: border .2s; position: relative; }
.opt.sel .radio { border: 6px solid var(--brand); }
.opt-main { flex: 1; min-width: 0; }
.opt-main b { display: block; font-size: 14px; }
.opt-main span, .opt-side span { font-size: 12.5px; color: var(--muted); }
.opt-side { text-align: right; flex: none; }
.opt-side b { display: block; font-size: 13.5px; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.prod { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); text-align: left; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s var(--ease); }
.prod:hover { transform: translateY(-1px); }
.prod b { font-size: 13.5px; line-height: 1.25; }
.prod span:last-child { font-size: 12px; color: var(--muted); }
.prod.sel { border-color: var(--brand); background: #FAF9FF; box-shadow: 0 0 0 3px rgba(91, 76, 245, .12); }
.qty-row { display: flex; gap: 10px; align-items: stretch; }
.qbtn { width: 56px; min-height: 56px; border-radius: 14px; border: 1px solid var(--line); font-size: 24px; font-weight: 500; background: var(--surface-2); transition: background .2s, transform .15s; }
.qbtn:active { transform: scale(.94); }
.qinput { flex: 1; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; transition: border .2s, box-shadow .2s; }
.qinput:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 76, 245, .15); }
.qinput input { border: 0; outline: 0; width: 100%; font-size: 24px; font-weight: 700; background: none; min-width: 0; font-variant-numeric: tabular-nums; }
.qinput span { color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 0 13px; min-height: 38px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; transition: all .2s; }
.chip:hover { border-color: #C7C2FF; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dt-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.dt-row input, textarea { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; font-size: 15px; background: var(--surface); outline: 0; transition: border .2s, box-shadow .2s; }
textarea { padding: 12px 14px; resize: vertical; }
.dt-row input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 76, 245, .15); }

.verdict { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; }
.verdict b { display: block; font-size: 16px; }
.verdict span { font-size: 13.5px; }
.v-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; }
.v-ic .ic { width: 22px; height: 22px; }
.verdict.ok { background: var(--green-bg); color: #065F46; }
.verdict.ok .v-ic { background: linear-gradient(135deg, #34D399, #059669); }
.verdict.short { background: var(--red-bg); color: #991B1B; }
.verdict.short .v-ic { background: linear-gradient(135deg, #F87171, #DC2626); animation: shake .5s .2s; }
@keyframes shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat3 > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line-2); }
.stat3 span { display: block; font-size: 11.5px; color: var(--muted); }
.stat3 b { font-size: 16px; font-variant-numeric: tabular-nums; }
.short-box { border: 1.5px solid var(--red-line); border-radius: 16px; padding: 14px; background: linear-gradient(180deg, #FFF6F6, #fff); animation: rise .45s var(--ease) both; }
.sb-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.sb-top b { font-size: 15px; }
.sb-grid { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13.5px; }
.sb-grid span { color: var(--muted); }
.sb-grid b { text-align: right; font-weight: 600; }
.sb-grid b small { color: var(--muted); font-weight: 500; }
.sb-grid b.big { font-size: 20px; color: var(--red); }
.sb-sup { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--red-line); font-size: 12.5px; color: var(--ink-2); }
.sb-sup .ic { width: 15px; height: 15px; color: var(--muted); }
.mtable { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mrow { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line-2); }
.mrow:last-child { border-bottom: 0; }
.mrow .mi .ic { width: 16px; height: 16px; color: var(--green); }
.mrow.bad { background: var(--red-bg); }
.mrow.bad .mi .ic { color: var(--red); }
.mrow .mq { font-weight: 600; font-variant-numeric: tabular-nums; }
.mrow .ma { color: var(--muted); font-size: 12.5px; min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.promise { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--amber-bg); color: #78350F; font-size: 13.5px; }
.promise.ok { background: var(--brand-soft); color: #3730A3; }
.promise .ic { margin-top: 1px; }
.cp-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Schedule ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { min-height: 38px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; }
.seg button.on { background: var(--ink); color: #fff; }
.overdue { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red); margin-bottom: 14px; }
.od-chip { padding: 7px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--red-line); font-size: 13px; font-weight: 600; color: #991B1B; }
.od-chip em { font-style: normal; color: var(--red); font-weight: 500; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; min-height: 380px; display: flex; flex-direction: column; overflow: hidden; }
.day header { display: flex; align-items: baseline; gap: 7px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.day header span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day header b { font-size: 20px; font-weight: 800; }
.day header em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--brand); padding: 2px 7px; border-radius: 99px; }
.day header small { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.day.today { border-color: #C7C2FF; box-shadow: 0 0 0 3px rgba(91, 76, 245, .1); }
.day.past { background: var(--surface-2); }
.day-b { padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.day-empty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 18px 0; }
.sch { text-align: left; border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; border-left: 3px solid var(--sc); background: var(--sb); transition: transform .2s var(--ease), box-shadow .2s; min-height: 48px; }
.sch:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.sch b { font-size: 13px; line-height: 1.25; }
.sch > span { color: var(--ink-2); }
.sch-t { font-weight: 700; color: var(--muted) !important; font-size: 11px; font-variant-numeric: tabular-nums; }
.sch-s { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--sc) !important; margin-top: 2px; font-size: 11px; }
.sch-s i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sch-s .ic { width: 12px; height: 12px; }
.sch.s-planned { --sc: var(--planned); --sb: var(--planned-bg); }
.sch.s-waiting { --sc: var(--waiting); --sb: var(--waiting-bg); }
.sch.s-inprogress { --sc: var(--inprogress); --sb: var(--inprogress-bg); }
.sch.s-qc { --sc: var(--qc); --sb: var(--qc-bg); }
.sch.s-finished { --sc: var(--finished); --sb: var(--finished-bg); }
.sch.is-delayed { --sc: var(--red); --sb: var(--red-bg); }
.sch.is-delayed .sch-t { color: var(--red) !important; }
.sch.unplanned { --sc: var(--brand); --sb: #fff; border: 1.5px dashed #C7C2FF; border-left: 3px solid var(--brand); }

/* ---------- Stock ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tab-link { min-height: 42px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; transition: background .2s, color .2s; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.tab-link { margin-left: auto; color: var(--brand); }
.tab-link .ic { width: 15px; height: 15px; }
.fgv { font-size: 16px; }
.moves { display: flex; flex-direction: column; }
.mv { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.mv:last-child { border-bottom: 0; }
.mv-q { min-width: 96px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.mv-q.in { color: var(--green); } .mv-q.out { color: var(--ink-2); }
.mv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mv-main b { font-size: 14px; }
.mv-main span { font-size: 12.5px; color: var(--muted); }
.mv-side { display: flex; align-items: center; gap: 8px; font-size: 12.5px; text-align: right; flex: none; }
.mv-side small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------- Recipes ---------- */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.recipe { display: flex; flex-direction: column; gap: 14px; }
.rc-h { display: flex; gap: 14px; align-items: center; }
.rc-h h3 { font-size: 18px; }
.rc-h span { font-size: 13px; color: var(--muted); }
.rc-lines { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.rl { display: grid; grid-template-columns: 1fr auto 90px; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.rq { font-weight: 600; font-variant-numeric: tabular-nums; }
.rc { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-sum span { display: block; font-size: 11.5px; color: var(--muted); }
.rc-sum b { font-size: 17px; }
.rc-act { display: flex; gap: 8px; margin-top: auto; }

/* ---------- Overlay / sheets ---------- */
#overlay { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
#overlay.open { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(11, 18, 34, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .3s both; }
.sheet {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(540px, calc(100% - 24px)); background: var(--surface); border-radius: 24px;
  box-shadow: var(--sh-3); display: flex; flex-direction: column; overflow: hidden; animation: drawerIn .45s var(--ease) both;
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.modal {
  position: absolute; left: 50%; top: 50%; width: min(460px, calc(100% - 32px)); max-height: calc(100% - 40px); transform: translate(-50%, -50%);
  background: var(--surface); border-radius: 24px; box-shadow: var(--sh-3); overflow: hidden; display: flex; flex-direction: column; animation: modalIn .4s var(--ease) both;
}
@keyframes modalIn { from { transform: translate(-50%, -46%) scale(.96); opacity: 0; } }
#overlay.closing .backdrop { animation: fadeOut .28s both; }
#overlay.closing .sheet { animation: drawerOut .28s ease-in both; }
#overlay.closing .modal { animation: modalOut .25s ease-in both; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes drawerOut { to { transform: translateX(40px); opacity: 0; } }
@keyframes modalOut { to { transform: translate(-50%, -48%) scale(.97); opacity: 0; } }
.handle { display: none; }
.sheet-body { overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; flex: 1; position: relative; }
.modal .sheet-body { padding: 0; gap: 0; }
.sh-head { display: flex; align-items: flex-start; gap: 14px; }
.sh-t { flex: 1; min-width: 0; }
.sh-t h2 { font-size: 21px; margin: 2px 0 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.xbtn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); flex: none; transition: background .2s; }
.xbtn:hover { background: var(--line-2); }
.xbtn.abs { position: absolute; top: 14px; right: 14px; z-index: 2; }
.steps { display: flex; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.stp { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 64px; }
.stp span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .3s; }
.stp span .ic { width: 15px; height: 15px; }
.stp small { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: center; }
.stp.done span { background: var(--green); border-color: var(--green); color: #fff; }
.stp.cur span { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px rgba(91, 76, 245, .15); }
.stp.cur small { color: var(--ink); }
.stp.warn span { border-color: #F59E0B; color: #B45309; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.stp-line { flex: 1; height: 2px; background: var(--line); margin-bottom: 20px; }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info > div { padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); }
.info span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.info b { display: block; font-size: 14px; margin-top: 2px; }
.info small { display: block; font-size: 12px; color: var(--muted); }
.prob-box { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--red-bg); border: 1px solid var(--red-line); color: #7F1D1D; align-items: flex-start; flex-wrap: wrap; }
.prob-box > .ic { color: var(--red); margin-top: 2px; }
.prob-box > div { flex: 1; min-width: 180px; }
.prob-box p { margin: 2px 0 4px; font-size: 13.5px; }
.prob-box small { color: #B45353; font-size: 12px; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.sec h4 .ic { width: 16px; height: 16px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.metric span { display: block; font-size: 11.5px; color: var(--muted); }
.metric b { font-size: 15px; font-variant-numeric: tabular-nums; }
.metric.strong { background: var(--brand-soft); border-color: #DCD8FF; }
.metric.strong b { color: #3730A3; font-size: 17px; }
.metric.green b { color: var(--green); } .metric.amber b { color: var(--amber); }
.note { margin: 0; font-size: 12.5px; color: var(--muted); }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; }
.tl li { display: flex; gap: 12px; padding: 0 0 14px; position: relative; font-size: 13.5px; }
.tl li::before { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl span { color: var(--muted); }
.tl small { display: block; color: var(--muted); font-size: 12px; }
.sh-actions { position: sticky; bottom: -22px; margin: auto -22px -22px; padding: 14px 22px 22px; background: linear-gradient(180deg, rgba(255, 255, 255, .7), #fff 30%); display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-2); }
.acting { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); justify-content: center; }
.acting .link { font-size: 12.5px; }
.hint { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.ask { margin: 0; font-size: 16px; }
.ask span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.bigstep { display: grid; grid-template-columns: 64px 64px 1fr 64px 64px; gap: 8px; }
.bigstep button { min-height: 64px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 17px; transition: transform .12s, background .2s; }
.bigstep button:active { transform: scale(.93); background: var(--line-2); }
.bigstep input { min-width: 0; width: 100%; text-align: center; font-size: 30px; font-weight: 800; border: 2px solid var(--brand); border-radius: 16px; outline: 0; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 4px rgba(91, 76, 245, .12); }
#recvLive, #finLive { display: flex; flex-direction: column; gap: 18px; }
.fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fin-stats > div { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.fin-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.fin-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.fin-stats small { display: block; font-size: 11.5px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pbtn { min-height: 56px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; text-align: left; transition: all .2s; }
.pbtn.on { border-color: var(--red); background: var(--red-bg); color: #991B1B; box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }

.full { padding: 30px 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.full h2 { font-size: 22px; }
.full p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.full ul { list-style: none; padding: 0; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.full li { display: flex; gap: 10px; font-size: 14px; }
.full li .ic { color: var(--green); margin-top: 2px; }
.full-ic { position: relative; width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; margin-bottom: 6px; box-shadow: 0 14px 30px -12px rgba(91, 76, 245, .9); }
.full-ic .ic { width: 26px; height: 26px; }
.full-ic .lock { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.full-ic .lock .ic { width: 13px; height: 13px; }
.mod-pad { padding: 28px 24px 22px; display: flex; flex-direction: column; gap: 10px; }
.mod-pad.center { align-items: center; text-align: center; }
.mod-pad h2 { font-size: 22px; }
.mod-pad p { margin: 0 0 8px; }
.ulist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.urow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); text-align: left; min-height: 60px; transition: all .2s; }
.urow span { flex: 1; }
.urow b { display: block; font-size: 14px; }
.urow small { color: var(--muted); font-size: 12.5px; }
.urow.on { border-color: var(--brand); background: #FAF9FF; }
.urow.on > .ic { color: var(--brand); }
.menu-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.menu-brand b { display: block; }
.menu-brand small { color: var(--muted); font-size: 12.5px; }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 56px; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.menu a.on { border-color: var(--brand); background: var(--brand-soft); color: #3730A3; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 200; left: calc(var(--side-w) + 24px); bottom: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; pointer-events: none; }
@media (max-width: 1240px) and (min-width: 900px) { .clock { display: none; } }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; width: min(400px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 16px; background: #0F172A; color: #E2E8F0; box-shadow: var(--sh-3); animation: toastIn .45s var(--ease) both; }
.toast.out { animation: toastOut .35s ease-in both; }
.toast b { display: block; color: #fff; font-size: 14px; }
.toast span { font-size: 13px; color: #A8B3C7; }
.tic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: #10B981; color: #fff; }
.toast.warn .tic { background: #F59E0B; }
.tic .ic { width: 16px; height: 16px; }
@keyframes toastIn { from { transform: translateY(16px) scale(.96); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(10px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .grid-2, .plan-grid { grid-template-columns: 1fr; }
  .check-panel { position: static; }
}
@media (max-width: 899px) {
  .sidebar, .desk { display: none !important; }
  .mob { display: flex !important; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; height: 60px; gap: 10px; padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .topbar .brand { padding: 0; }
  .topbar .brand b { color: var(--ink); font-size: 15px; }
  .topbar .brand small { color: var(--muted); font-size: 11.5px; }
  .logo { width: 36px; height: 36px; }
  .user-chip { padding: 4px; }
  .user-chip .uc-t { display: none; }
  .view { padding: 18px 16px 110px; }
  .foot { padding: 16px 16px 100px; flex-direction: column; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 12px; transition: color .2s; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand); }
  .tab-plus span { width: 44px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 18px -8px rgba(91, 76, 245, .9); }
  .tab-plus span .ic { width: 20px; height: 20px; }
  .hero h1 { font-size: 26px; }
  .page-head h1 { font-size: 25px; }
  .page-head { margin-bottom: 16px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-v { font-size: 30px; }
  .kpi-ic { width: 30px; height: 30px; }
  .kpi-l { font-size: 12.5px; line-height: 1.25; }
  .kpi-s { white-space: normal; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .kpis.three { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 18px; }
  .grid-2 { gap: 14px; margin-top: 14px; }
  .cta-band { padding: 22px; }
  .cta-band .btn { width: 100%; }
  .jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px; scrollbar-width: none; position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 10; background: linear-gradient(180deg, var(--bg) 80%, rgba(243, 244, 248, 0)); padding-bottom: 8px; }
  .jump::-webkit-scrollbar { display: none; }
  .jump button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .2s; }
  .jump button i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
  .jump button b { font-size: 12px; background: var(--surface-2); border-radius: 99px; padding: 1px 7px; }
  .jump button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
  .jump button.on b { background: rgba(255, 255, 255, .18); }
  .jump .s-planned { --sc: #94A3B8; } .jump .s-waiting { --sc: #F59E0B; } .jump .s-inprogress { --sc: #3B82F6; } .jump .s-qc { --sc: #8B5CF6; } .jump .s-finished { --sc: #10B981; }
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .col { scroll-snap-align: start; min-height: 60vh; }
  .ph-actions .btn.primary { display: none; }
  .plan-form { padding: 16px; gap: 22px; }
  .opts { max-height: none; }
  .prods { grid-template-columns: repeat(2, 1fr); }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .day.past { display: none; }
  .day-empty { padding: 8px 0; text-align: left; padding-left: 4px; }
  .hide-s { display: none; }
  .tbl td, .tbl th { padding: 10px 8px; }
  .card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 14px; }
  .card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 14px; }
  .oh .meter { width: 80px; }
  .oh { min-width: 80px; }
  .mv { padding: 12px 14px; flex-wrap: wrap; gap: 6px 12px; }
  .mv-q { min-width: 80px; }
  .mv-side { width: 100%; padding-left: 92px; text-align: left; }
  .recipes { grid-template-columns: 1fr; }
  .sheet {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; animation: sheetUp .45s var(--ease) both;
  }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  #overlay.closing .sheet { animation: sheetDown .28s ease-in both; }
  @keyframes sheetDown { to { transform: translateY(100%); } }
  .handle { display: block; width: 42px; height: 5px; border-radius: 99px; background: #D5D9E3; margin: 10px auto 0; flex: none; }
  .sheet-body { padding: 14px 16px 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .sh-actions { bottom: calc(-18px - env(safe-area-inset-bottom)); margin: auto -16px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .bigstep { grid-template-columns: 56px 56px 1fr 56px 56px; gap: 6px; }
  .bigstep button { min-height: 60px; }
  #toasts { left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); bottom: auto; align-items: stretch; }
  @keyframes toastIn { from { transform: translateY(-16px) scale(.96); opacity: 0; } }
  .toast { width: 100%; }
}
@media (max-width: 420px) {
  .kpi-v { font-size: 26px; }
  .stat3 b { font-size: 14px; }
  .stp { width: 52px; }
  .opt { flex-wrap: wrap; }
  .opt-side { text-align: left; width: 100%; padding-left: 32px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .opt-side b { display: inline; }
  .hide-m { display: none; }
  .bigstep { grid-template-columns: 50px 50px 1fr 50px 50px; }
  .bigstep input { font-size: 24px; }
  .fin-stats b { font-size: 15px; }
}
@media (max-width: 1100px) and (min-width: 900px) { .hide-m { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
