/* NGD Reja Paneli — dizayn tizimi v2 (SPEC §10.2)
   Tamoyillar: tinch palitra (navy + bitta aksent), 4/8 px qadam, yumshoq chegaralar,
   kam soya, tabular raqamlar, matn o'rniga belgilar. Internetsiz: shrift — assets/fonts. */

@font-face { font-family: "InterNGD"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "InterNGD"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "InterNGD"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "InterNGD"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Inter-Bold.woff2") format("woff2"); }

:root {
  /* brend */
  --navy: #003366; --slate: #4D6582;
  --primary: #0B3D6E; --primary-600: #002A55; --primary-soft: #EAF0F7; --primary-fg: #0B3D6E; --on-primary: #fff;
  --accent: #0F8C8C; --accent-soft: #E6F4F3;
  /* sirtlar */
  --bg: #F5F6F8; --surface: #FFFFFF; --surface-2: #F9FAFB; --surface-3: #F2F4F7;
  --border: #E3E6EB; --border-2: #EDEFF3; --border-strong: #CDD3DC;
  --text: #0F1B2D; --text-2: #3A475A; --muted: #677489; --faint: #98A2B3;
  /* semantik (sokin) */
  --success: #1A7F5A; --success-bg: #EAF6F0; --success-bar: #3BA77A;
  --warn: #C98A1B; --warn-bg: #FBF4E4; --warn-text: #94640B; --warn-bar: #E0A73E;
  --danger: #C4413B; --danger-bg: #FCEEED; --danger-bar: #DA5B54;
  --info: #3466B0; --info-bg: #ECF2FB;
  --navy-bg: var(--primary-soft); --teal-bg: var(--accent-soft); --violet-bg: #F1EEFA; --violet: #6650B5;
  /* shakl */
  --radius-xs: 4px; --radius-sm: 6px; --radius: 8px; --radius-lg: 12px; --radius-xl: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .22), 0 4px 10px -4px rgba(16, 24, 40, .08);
  --focus: 0 0 0 3px rgba(11, 61, 110, .18);
  --ring: rgba(11, 61, 110, .55);
  --font: "InterNGD", "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sb-w: 232px; --tb-h: 56px;
  /* Gantt */
  --band-day: transparent; --band-night: rgba(15, 27, 45, .028);
  --grid: rgba(15, 27, 45, .045); --day-line: rgba(15, 27, 45, .14);
  --hatch: rgba(103, 116, 137, .30); --dt-bg: rgba(103, 116, 137, .07);
  --op-text: #fff; --op-mix: 100%;
  color-scheme: light;
}
[data-theme="dark"] {
  --primary: #4F86CF; --primary-600: #3F74BC; --primary-soft: rgba(79, 134, 207, .14); --primary-fg: #9DC0EC; --on-primary: #fff;
  --accent: #3BB8B0; --accent-soft: rgba(59, 184, 176, .13);
  --bg: #0A111D; --surface: #101928; --surface-2: #131D2E; --surface-3: #182335;
  --border: #212D41; --border-2: #1A2537; --border-strong: #2E3C54;
  --text: #E7ECF3; --text-2: #BAC4D3; --muted: #8592A7; --faint: #5E6B80;
  --success: #4CC194; --success-bg: rgba(76, 193, 148, .12); --success-bar: #3FA87F;
  --warn: #E3AE4A; --warn-bg: rgba(227, 174, 74, .12); --warn-text: #E8B85C; --warn-bar: #D49A35;
  --danger: #EF7A73; --danger-bg: rgba(239, 122, 115, .13); --danger-bar: #D9625B;
  --info: #79A6E8; --info-bg: rgba(121, 166, 232, .13);
  --violet-bg: rgba(150, 128, 230, .14); --violet: #B3A3F2;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03);
  --focus: 0 0 0 3px rgba(79, 134, 207, .3);
  --ring: rgba(157, 192, 236, .7);
  --band-night: rgba(130, 160, 220, .035);
  --grid: rgba(231, 236, 243, .04); --day-line: rgba(231, 236, 243, .13);
  --hatch: rgba(133, 146, 167, .32); --dt-bg: rgba(133, 146, 167, .07);
  --op-mix: 80%;
  color-scheme: dark;
}

/* ---------------- Asos ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 13.5px/1.5 var(--font); letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "cv11" 1, "ss01" 1;
}
a { color: var(--primary-fg); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.012em; color: var(--text); }
h2 { font-size: 14.5px; }
h3 { font-size: 13.5px; }
p { margin: 0; }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.mono, .num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "cv11" 1, "ss01" 1, "zero" 0; }
.mono { letter-spacing: -.005em; }
code, .code { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.xs { font-size: 11.5px; }
.block { display: block; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.success-t, .success-t b { color: var(--success); } .warn-t { color: var(--warn-text); } .danger-t { color: var(--danger); }
mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
::selection { background: color-mix(in srgb, var(--primary) 22%, transparent); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 28%, transparent); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 45%, transparent); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Sidebar ---------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40; color: #B9C7D9;
  display: flex; flex-direction: column; transition: width .2s var(--ease), transform .2s var(--ease);
  background: linear-gradient(180deg, #00315F 0%, #00284F 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04);
}
[data-theme="dark"] .sidebar { background: #0C1626; box-shadow: inset -1px 0 0 var(--border); }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: var(--tb-h); flex: none; }
.sb-logo { flex: none; background: #fff; border-radius: 8px; padding: 4px 6px; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.sb-logo img { display: block; width: 50px; height: auto; }
.sb-title { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.sb-title b { color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.sb-title span { font-size: 11px; color: #7F97B4; }
.sb-nav { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; flex: 1; overflow-y: auto; overflow-x: hidden; }
.sb-grp { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6E87A6; padding: 16px 10px 6px; white-space: nowrap; }
.sb-nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; color: #B9C7D9; font-weight: 500; font-size: 13px; white-space: nowrap; position: relative; transition: background .15s, color .15s; }
.sb-nav a .ic { opacity: .75; transition: opacity .15s; }
.sb-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-nav a:hover .ic { opacity: 1; }
.sb-nav a.active { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.sb-nav a.active .ic { opacity: 1; color: #7FD6CF; }
.sb-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .1); color: #DCE6F2; padding: 0 6px; min-width: 20px; text-align: center; line-height: 18px; border-radius: 9px; font-variant-numeric: tabular-nums; }
.sb-count:empty { display: none; }
.sb-foot { padding: 8px 10px 12px; border-top: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: column; gap: 2px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; color: #fff; min-width: 0; }
.sb-av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #00284F; background: linear-gradient(135deg, #CFE3F7, #9FD8D2); }
.sb-uinfo { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-uinfo b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-uinfo span { font-size: 11px; color: #7F97B4; white-space: nowrap; }
.sb-collapse { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: 0; background: none; color: #8FA6C2; border-radius: 7px; white-space: nowrap; font-size: 12.5px; font-weight: 500; transition: background .15s, color .15s; }
.sb-collapse:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-ver { font-size: 10.5px; color: #58718F; padding: 6px 10px 0; white-space: nowrap; }
.sb-collapsed { --sb-w: 60px; }
.sb-collapsed .sb-title, .sb-collapsed .sb-nav span, .sb-collapsed .sb-collapse span, .sb-collapsed .sb-count, .sb-collapsed .sb-uinfo, .sb-collapsed .sb-grp { display: none; }
.sb-collapsed .sb-nav .sb-grp { display: block; height: 1px; padding: 0; margin: 10px 8px; background: rgba(255, 255, 255, .08); font-size: 0; }
.sb-collapsed .sb-brand { padding: 0 8px; justify-content: center; }
.sb-collapsed .sb-logo { padding: 3px 4px; }
.sb-collapsed .sb-logo img { width: 34px; }
.sb-collapsed .sb-nav a, .sb-collapsed .sb-collapse, .sb-collapsed .sb-user { justify-content: center; padding: 0; }
.sb-collapsed .sb-user { padding: 6px 0; }
.sb-collapsed .sb-collapse .ic { transform: scaleX(-1); }
.sb-collapsed .sb-logout .ic, .sb-collapsed .sb-pw .ic { transform: none; }
.sb-collapse.sb-logout { display: flex !important; }
.sb-collapsed .sb-ver { text-align: center; padding: 6px 0 0; font-size: 9.5px; }
.sb-scrim { display: none; }

/* ---------------- Top bar ---------------- */
.main-col { flex: 1; min-width: 0; margin-left: var(--sb-w); transition: margin-left .2s var(--ease); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--tb-h); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .tb-menu { display: none; }
.tb-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tb-title h1 { font-size: 15px; font-weight: 600; white-space: nowrap; }
.tb-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-sub:not(:empty)::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); margin: 0 10px 0 0; vertical-align: middle; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip-shift { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.chip-shift .ic { color: var(--muted); }
.chip-mock { background: var(--warn-bg); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); height: 24px; font-size: 11px; font-weight: 600; border-radius: 6px; }
.theme-btn .ti-sun { display: none; }
[data-theme="dark"] .theme-btn .ti-sun { display: inline-block; }
[data-theme="dark"] .theme-btn .ti-moon { display: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 8px 24px; font-size: 12.5px; font-weight: 500; background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }

#app { padding: 24px; flex: 1; outline: none; max-width: 1680px; width: 100%; animation: fadeUp .22s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------------- Primitivlar ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 20px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 28px; }
.card-hd h2 { display: flex; align-items: center; gap: 8px; }
.card-hd p { font-size: 12px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 500; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .06s; user-select: none; text-decoration: none; }
.btn .ic { margin-left: -2px; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(0, 30, 60, .2), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }
.btn-quiet { background: none; color: var(--text-2); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.94); }
.btn-danger-soft { background: var(--surface); color: var(--danger); border-color: var(--border); box-shadow: var(--shadow-xs); }
.btn-danger-soft:hover:not(:disabled) { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-lg { height: 40px; font-size: 13.5px; padding: 0 18px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 15px; height: 15px; border: 2px solid currentColor; border-color: #fff #fff #fff transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost.loading::after { border-color: var(--muted) var(--muted) var(--muted) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid transparent; background: none; color: var(--muted); transition: background .15s, color .15s, border-color .15s; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.icon-btn.bordered { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }

.input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-xs); }
.input::placeholder { color: var(--faint); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); box-shadow: var(--focus); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input.invalid { border-color: var(--danger); }
.input-sm { height: 32px; width: auto; }
select.input { padding-right: 28px; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23677489' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
input[type="datetime-local"].input, input[type="date"].input { padding-right: 6px; }
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator, [data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75); }
input[type="number"].input::-webkit-inner-spin-button { opacity: .4; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field-lbl { font-size: 12px; font-weight: 500; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.field-err { font-size: 11.5px; color: var(--danger); display: none; font-weight: 500; }
.field.has-err .field-err { display: block; }
.field.has-err .input { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.input-unit { position: relative; }
.input-unit em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11.5px; color: var(--faint); pointer-events: none; }
.input-unit .input { padding-right: 40px; }
.form-err { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; font-weight: 500; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius); padding: 2px; gap: 2px; }
.seg button { height: 28px; padding: 0 12px; border: 0; background: none; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px rgba(16, 24, 40, .04); }
[data-theme="dark"] .seg button.on { background: var(--border-strong); box-shadow: none; }
.seg-full { display: flex; }
.seg-full button { flex: 1; justify-content: center; }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 500; font-size: 12.5px; box-shadow: var(--shadow-xs); transition: all .15s; }
.chip-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.chip-toggle.on { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

.switch { position: relative; display: inline-block; width: 32px; height: 18px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 9px; background: color-mix(in srgb, var(--muted) 35%, var(--border)); transition: background .18s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }
.switch input:disabled + i { opacity: .5; }
.switch-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; user-select: none; color: var(--text-2); }
.switch-inline.sm { font-size: 12px; gap: 6px; }
.switch-inline.sm .switch { transform: scale(.85); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; cursor: pointer; }
.switch-row span:first-child { display: flex; flex-direction: column; }
.switch-row small { color: var(--muted); font-size: 11.5px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge-engine { background: var(--primary-soft); color: var(--primary-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 0; font-variant-numeric: tabular-nums; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-warn { background: var(--warn-bg); color: var(--warn-text); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-navy { background: var(--primary-soft); color: var(--primary-fg); }
.pill-muted { background: var(--surface-3); color: var(--muted); }
.pill-btn { cursor: pointer; height: 24px; padding: 0 9px; transition: box-shadow .15s; }
.pill-btn:hover { box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent); }
.pill-btn:disabled { cursor: default; box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.tag-navy { background: var(--primary-soft); color: var(--primary-fg); }
.tag-slate { background: var(--surface-3); color: var(--text-2); }
.tag-teal { background: var(--accent-soft); color: var(--accent); }
.tag-violet { background: var(--violet-bg); color: var(--violet); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-warn { background: var(--warn-bg); color: var(--warn-text); }
.rchip { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.rchip-print { background: var(--primary-soft); color: var(--primary-fg); }
.rchip-diecut { background: var(--accent-soft); color: var(--accent); }
.rchip.ico { width: 22px; padding: 0; }
.rarr { color: var(--faint); margin: 0 2px; font-size: 11px; display: inline-flex; vertical-align: middle; }
.route { display: inline-flex; align-items: center; gap: 0; }
.mchip { display: inline-block; font: 500 10.5px/18px var(--font); font-variant-numeric: tabular-nums; padding: 0 5px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); margin: 1px 2px 1px 0; }
.swatch { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: hsl(var(--h) 45% 55%); vertical-align: 1px; }
.delta { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.good { background: var(--success-bg); color: var(--success); }
.delta.bad { background: var(--danger-bg); color: var(--danger); }
.delta.neutral { background: var(--surface-3); color: var(--muted); }
b.delta { height: auto; padding: 1px 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.lg.success { background: var(--success-bar); } .lg.warn { background: var(--warn-bar); } .lg.danger { background: var(--danger-bar); }
.lg.hatch, .lg.setup { background: color-mix(in srgb, var(--muted) 30%, transparent); }
.kbd { display: inline-block; font: 500 10.5px/16px var(--font); padding: 0 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.meter { display: block; height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 2px; background: var(--primary); transform-origin: left; animation: grow .7s var(--ease) both; }
.meter > i.success { background: var(--success-bar); } .meter > i.warn { background: var(--warn-bar); } .meter > i.danger { background: var(--danger-bar); }
.dot-s { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-s.success { background: var(--success-bar); } .dot-s.warn { background: var(--warn-bar); } .dot-s.danger { background: var(--danger-bar); } .dot-s.muted { background: var(--faint); }
.info-dot { display: inline-grid; place-items: center; color: var(--faint); cursor: help; vertical-align: middle; }
.info-dot:hover { color: var(--muted); }

/* ---------------- Skeleton / Empty / Error ---------------- */
.sk { border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--border-2) 40%, var(--surface-3) 80%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sk-row { display: flex; gap: 16px; align-items: center; padding: 6px 0; }
.sk-gantt { min-height: 420px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 16px; color: var(--muted); }
.empty-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-2); }
.empty p { max-width: 360px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.error-card { display: flex; gap: 16px; padding: 24px; align-items: flex-start; color: var(--danger); }
.error-card h3 { color: var(--text); margin-bottom: 4px; } .error-card p { color: var(--muted); margin-bottom: 12px; }

/* ---------------- Bosh sahifa ---------------- */
.grid-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s; min-height: 124px; }
.kpi[data-href] { cursor: pointer; }
.kpi[data-href]:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-ic { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); flex: none; }
.kpi-lbl { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-val.txt { font-size: 19px; letter-spacing: -.015em; }
.kpi-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.kpi-viz { margin-top: auto; }
.kpi-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; display: flex; gap: 2px; }
.kpi-bar i { display: block; height: 100%; border-radius: 2px; animation: grow .8s var(--ease) both; transform-origin: left; background: var(--tone); }
.kpi-bar i.success { background: var(--success-bar); } .kpi-bar i.warn { background: var(--warn-bar); } .kpi-bar i.danger { background: var(--danger-bar); }
.kpi-bar i.rest { background: color-mix(in srgb, var(--primary) 55%, transparent); }
.kpi-bar i.u { background: var(--danger-bar); }
.kpi-pair { display: grid; grid-template-columns: 30px 1fr; gap: 3px 8px; align-items: center; font-size: 10.5px; color: var(--muted); }
.kpi-pair i { display: block; height: 4px; border-radius: 2px; transform-origin: left; animation: grow .8s var(--ease) both; }
.kpi-pair i.f { background: color-mix(in srgb, var(--muted) 40%, transparent); }
.kpi-pair i.o { background: var(--success-bar); }
.spark { display: block; width: 100%; height: 28px; overflow: visible; }
.spark path.l { fill: none; stroke: var(--tone); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark path.a { fill: var(--tone); opacity: .08; }
.spark circle { fill: var(--surface); stroke: var(--tone); stroke-width: 1.5; }
.kpi-navy { --tone: var(--primary-fg); --tone-bg: var(--primary-soft); }
.kpi-danger { --tone: var(--danger); --tone-bg: var(--danger-bg); }
.kpi-warn { --tone: var(--warn-text); --tone-bg: var(--warn-bg); }
.kpi-info { --tone: var(--info); --tone-bg: var(--info-bg); }
.kpi-success { --tone: var(--success); --tone-bg: var(--success-bg); }
.kpi-slate { --tone: var(--text-2); --tone-bg: var(--surface-3); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; margin: 16px 0; }
.load-svg { display: block; overflow: visible; }
.lc-grid { stroke: var(--border-2); }
.lc-100 { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.lc-ax { fill: var(--faint); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.lc-group { fill: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.lc-lbl { fill: var(--text-2); font-size: 12.5px; font-weight: 500; }
.lc-track { fill: var(--surface-3); }
.lc-hit { fill: transparent; }
.lc-row { cursor: default; }
.lc-row[data-href] { cursor: pointer; }
.lc-row:hover .lc-hit { fill: var(--surface-2); }
.lc-bar { transition: filter .15s; }
.lc-row:hover .lc-bar { filter: brightness(1.05); }
.lc-bar.success { fill: var(--success-bar); } .lc-bar.warn { fill: var(--warn-bar); } .lc-bar.danger { fill: var(--danger-bar); }
.lc-setup { fill: #fff; opacity: .38; }
[data-theme="dark"] .lc-setup { fill: #000; opacity: .32; }
.lc-grow { transform-box: fill-box; transform-origin: left; animation: grow .8s var(--ease) both; }
.lc-val { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lc-val.success-t { fill: var(--text-2); } .lc-val.warn-t { fill: var(--warn-text); } .lc-val.danger-t { fill: var(--danger); }
.ai-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 0 8px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.ins-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ins { display: flex; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: var(--radius); position: relative; transition: background .15s; }
.ins + .ins { box-shadow: 0 -1px 0 var(--border-2); }
.ins[data-href], .ins[data-orders], .ins[data-machine] { cursor: pointer; }
.ins:hover { background: var(--surface-2); }
.ins:hover + .ins, .ins:hover { box-shadow: none; }
.ins-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--lv-bg); color: var(--lv); }
.ins-body { flex: 1; min-width: 0; }
.ins-body b { font-size: 13px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ins-body p { font-size: 12px; color: var(--muted); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ins-num { flex: none; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--lv); background: var(--lv-bg); padding: 0 7px; height: 22px; line-height: 22px; border-radius: 6px; }
.ins-go { color: var(--faint); align-self: center; transition: transform .15s, color .15s; }
.ins:hover .ins-go { transform: translateX(2px); color: var(--muted); }
.ins-success { --lv: var(--success); --lv-bg: var(--success-bg); }
.ins-info { --lv: var(--info); --lv-bg: var(--info-bg); }
.ins-warn { --lv: var(--warn-text); --lv-bg: var(--warn-bg); }
.ins-danger { --lv: var(--danger); --lv-bg: var(--danger-bg); }
.pl-viz { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.pl-viz .bars { flex: 1; display: grid; gap: 2px; }
.pl-viz .bars i { display: block; height: 4px; border-radius: 2px; }
.pl-viz .bars i.f { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.pl-viz .bars i.o { background: var(--primary); }
[data-theme="dark"] .pl-viz .bars i.o { background: var(--primary-fg); }

/* ---------------- Jadvallar ---------------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 0 12px; height: 36px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 0 12px; height: 44px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl-hover tbody tr { transition: background .12s; }
.tbl-hover tbody tr:hover td { background: var(--surface-2); }
.tbl tr[data-href], .tbl tr[data-id] { cursor: pointer; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.sort-ar { display: inline-flex; opacity: 0; margin-left: 2px; vertical-align: -2px; transition: transform .15s, opacity .15s; }
.tbl th.sortable:hover .sort-ar { opacity: .5; }
.tbl th.sorted { color: var(--text); }
.tbl th.sorted .sort-ar { opacity: 1; }
.tbl th.sorted.asc .sort-ar { transform: rotate(180deg); }
.card > .table-wrap .tbl th:first-child, .table-card .tbl th:first-child { border-top-left-radius: var(--radius-lg); }
.table-card { overflow: hidden; }
.table-card .table-wrap { max-height: calc(100vh - 210px); overflow: auto; }
.card-pad > .table-wrap { margin: 0 -20px -20px; }
.card-pad > .table-wrap .tbl th:first-child, .card-pad > .table-wrap .tbl td:first-child { padding-left: 20px; }
.card-pad > .table-wrap .tbl th:last-child, .card-pad > .table-wrap .tbl td:last-child { padding-right: 20px; }
.cell-name { min-width: 200px; max-width: 320px; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.due-soon { color: var(--warn-text); font-weight: 500; }
.due-past { color: var(--danger); font-weight: 600; }
.due { display: inline-flex; align-items: center; gap: 7px; }
.row-done td { opacity: .5; }
.mach-chips { white-space: nowrap; }
.mchip.more { background: var(--primary-soft); color: var(--primary-fg); }
.actions { text-align: right; }
.actions .icon-btn { opacity: 0; transition: opacity .12s; }
tr:hover .actions .icon-btn, .actions .icon-btn:focus-visible { opacity: 1; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 16px; height: 40px; border-top: 1px solid var(--border); font-size: 12px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl-foot b { color: var(--text); font-weight: 600; }
.tf-stat { display: inline-flex; align-items: center; gap: 6px; }
.tf-stat + .tf-stat { margin-left: 14px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0; margin-bottom: 12px; background: none; border: 0; box-shadow: none; }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 32px; }
.tb-gap { flex: 1; }
.toolbar #o-demo { margin-left: auto; }

/* ---------------- Uskunalar ---------------- */
.mgroup { margin-bottom: 28px; }
.mgroup-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mgroup-hd h2 { font-size: 14px; }
.mgroup-hd .count { font-size: 11.5px; color: var(--muted); background: var(--surface-3); padding: 0 7px; border-radius: 10px; line-height: 20px; font-variant-numeric: tabular-nums; }
.mgroup-hd .tb-gap { flex: 1; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mcard { padding: 16px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .15s, border-color .15s, opacity .15s; }
.mcard:hover { border-color: var(--border-strong); }
.mcard.dirty { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent); }
.mcard.inactive { opacity: .62; }
.mcard.inactive .m-ic { filter: grayscale(1); }
.mcard-hd { display: flex; align-items: center; gap: 12px; }
.m-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.m-ic.print { background: var(--primary-soft); color: var(--primary-fg); }
.m-ic.diecut { background: var(--accent-soft); color: var(--accent); }
.m-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.m-title b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-title span { font-size: 11.5px; }
.m-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.m-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.m-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 500; min-width: 0; }
.m-fields label > span { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-fields em { font-style: normal; font-weight: 400; color: var(--faint); }
.m-fields .input { height: 32px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.m-dts { border-radius: var(--radius); padding: 8px 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.m-dts-hd { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.m-dts-hd em { margin-left: auto; font-style: normal; font-size: 11px; background: var(--surface-3); border-radius: 8px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.m-dts ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.m-dts li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 2px 2px 2px 8px; border-left: 2px solid var(--faint); background: var(--surface); border-radius: 0 6px 6px 0; }
.m-dts li.active { border-left-color: var(--danger); }
.dt-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt-reason { flex: 1; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-dts p { margin-top: 2px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(196, 65, 59, .5); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(196, 65, 59, .45); } 70% { box-shadow: 0 0 0 6px rgba(196, 65, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(196, 65, 59, 0); } }
.mcard-ft { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border-2); }
.m-load { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; font-size: 11.5px; color: var(--muted); }
.m-load .meter { grid-column: 1 / -1; }

/* ---------------- Drawer / Modal / Toast / Tooltip ---------------- */
.drawer-back, .modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(8, 15, 28, .32); opacity: 0; transition: opacity .2s; }
[data-theme="dark"] .drawer-back, [data-theme="dark"] .modal-back { background: rgba(0, 0, 0, .5); }
.drawer-back.in, .modal-back.in { opacity: 1; }
.drawer { position: absolute; right: 8px; top: 8px; bottom: 8px; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(calc(100% + 16px)); transition: transform .26s var(--ease); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.drawer-back.in .drawer { transform: none; }
.drawer-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--border-2); }
.drawer-hd h3 { font-size: 15px; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 20px 20px 4px; }
.drawer-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-2); background: var(--surface-2); }
.route-pick { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius); }
.est-box { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); margin-bottom: 18px; color: var(--muted); }
.est-box div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--text); font-size: 12.5px; }
.est-box .est-i { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-variant-numeric: tabular-nums; }
.modal-back { display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border); transform: translateY(6px) scale(.985); transition: transform .2s var(--ease); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-back.in .modal { transform: none; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 20px; }
.modal-hd h3 { font-size: 15px; }
.modal-bd { padding: 12px 20px 8px; overflow-y: auto; }
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.confirm-row { display: flex; gap: 14px; align-items: flex-start; }
.confirm-row p { padding-top: 7px; color: var(--text-2); }
.confirm-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.confirm-ic.danger { background: var(--danger-bg); color: var(--danger); }
.confirm-ic.info { background: var(--info-bg); color: var(--info); }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 10px 10px 10px 12px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.98); opacity: 0; transition: transform .22s var(--ease), opacity .22s; }
.toast.in { transform: none; opacity: 1; }
.toast.out { transform: translateX(24px); opacity: 0; }
.toast-ic { color: var(--tc); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--tc) 12%, transparent); flex: none; align-self: flex-start; }
.toast-body { flex: 1; min-width: 0; }
.toast-msg { font-weight: 500; font-size: 13px; }
.toast-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.toast-x { border: 0; background: none; color: var(--faint); padding: 3px; border-radius: 5px; display: grid; place-items: center; align-self: flex-start; }
.toast-x:hover { color: var(--text); background: var(--surface-3); }
.toast-act { flex: none; }
.toast-success { --tc: var(--success); } .toast-error { --tc: var(--danger); } .toast-warn { --tc: var(--warn); } .toast-info { --tc: var(--info); }
#tip { position: fixed; left: 0; top: 0; z-index: 130; pointer-events: none; max-width: 340px; padding: 10px 12px; border-radius: 10px; background: rgba(15, 22, 36, .97); color: #E7ECF3; font-size: 12px; line-height: 1.45; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .06); opacity: 0; transition: opacity .12s; font-variant-numeric: tabular-nums; }
[data-theme="dark"] #tip { background: rgba(28, 38, 58, .98); box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
#tip.on { opacity: 1; }
#tip .muted { color: #8F9BB0; }
.tip-hd { font-weight: 600; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.tip-hd:empty { display: none; }
.tip-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.tip-grid > span { color: #8F9BB0; }
.tip-grid b { font-weight: 500; }
.tip-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tip-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .1); margin: 8px 0 2px; }
.tip-bar i { display: block; height: 100%; }
.tip-txt { color: #C5CEDB; max-width: 300px; }
#tip .success-t { color: #5ED3A2; } #tip .danger-t { color: #FF8F87; } #tip .warn-t { color: #F1C267; }
#tip .tag-slate { background: rgba(255, 255, 255, .1); color: #C9D6E6; } #tip .tag-danger { background: rgba(239, 122, 115, .22); color: #FFB3AD; } #tip .tag-navy { background: rgba(121, 166, 232, .22); color: #C3D8FA; } #tip .tag-teal { background: rgba(59, 184, 176, .2); color: #8FE3DC; }
.tip-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 11.5px; }

/* ---------------- Reja ---------------- */
.plan-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.plan-layout.side-hidden { grid-template-columns: minmax(0, 1fr); }
.plan-layout.side-hidden .plan-side { display: none !important; }
.side-toggle.on { background: var(--primary-soft); color: var(--primary-fg); }
.plan-side { padding: 18px; position: sticky; top: calc(var(--tb-h) + 16px); max-height: calc(100vh - var(--tb-h) - 32px); overflow-y: auto; }
.side-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 16px; }
.side-t .ic { color: var(--muted); }
.side-sub { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 10px; }
.side-sep { height: 1px; background: var(--border-2); margin: 18px 0 16px; }
.slider-f { gap: 4px; margin-bottom: 12px; }
.slider-hd { display: flex; justify-content: space-between; align-items: center; }
.slider-hd output { font-size: 12px; font-weight: 600; color: var(--text); min-width: 24px; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--primary); height: 18px; margin: 0; cursor: pointer; }
.lock-keep { margin: 0 0 12px; padding: 8px 10px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-fg); font-size: 12px; width: 100%; }
.lock-keep span { display: inline-flex; gap: 6px; align-items: center; }
.mini-plans { display: flex; flex-direction: column; gap: 2px; margin-top: -4px; }
.mini-plans a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 7px 8px; border-radius: var(--radius); color: var(--text); font-size: 12px; transition: background .15s; font-variant-numeric: tabular-nums; }
.mini-plans a:hover { background: var(--surface-2); }
.mini-plans a.on { background: var(--primary-soft); }
.mini-plans b { grid-row: span 2; align-self: center; font-size: 12px; color: var(--primary-fg); font-weight: 600; }
.mini-plans em { font-style: normal; color: var(--muted); font-size: 11px; }
.plan-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.ph-l { min-width: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plan-head h2 { font-size: 15px; white-space: nowrap; }
.ph-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ph-meta > span:not(.badge) { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ph-meta .ic { color: var(--faint); }
.ph-r { display: flex; gap: 6px; align-items: center; flex: none; }
.cmp-wrap { display: flex; flex-direction: column; gap: 8px; }
.cmp-title { display: none; }
.cmp-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cmp { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cmp-hd { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); font-weight: 500; }
.cmp-ic { color: var(--faint); display: inline-flex; }
.cmp-val { display: flex; align-items: baseline; gap: 4px; flex-wrap: nowrap; }
.cmp-val b { font-size: 22px; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.cmp-val small { color: var(--muted); font-weight: 500; font-size: 12px; }
.cmp-val .delta { margin-left: auto; align-self: center; }
.cmp-bars { display: flex; flex-direction: column; gap: 4px; }
.cmp-bars div { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.cmp-bars i { height: 4px; border-radius: 2px; display: block; min-width: 2px; transform-origin: left; animation: grow .7s var(--ease) both; }
.cmp-bars i.fifo { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.cmp-bars i.opt { background: var(--primary); }
[data-theme="dark"] .cmp-bars i.opt { background: var(--primary-fg); }
.cmp-bars em { font-style: normal; text-align: right; font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.plan-bottom { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
.uns-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.uns-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 6px 8px 6px 10px; border-radius: var(--radius); background: var(--warn-bg); font-size: 12.5px; }

/* ---------------- Gantt ---------------- */
.gantt-card { position: relative; overflow: hidden; }
.gt-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; min-height: 48px; }
.gt-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.gt-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gt-legend i { display: inline-block; width: 16px; height: 8px; border-radius: 2px; }
.lg-run { background: #4E79A7; }
.lg-setup { background: color-mix(in srgb, #4E79A7 30%, var(--surface)); }
.lg-down { background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, var(--dt-bg) 1px 4px); box-shadow: inset 0 0 0 1px var(--hatch); }
.lg-now { width: 2px !important; height: 12px !important; background: var(--danger); border-radius: 1px !important; }
.lg-urgent { background: var(--surface-3); box-shadow: inset 0 2px 0 var(--danger); }
.lg-late { background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--danger); }
.zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: var(--radius); background: var(--surface-3); }
.zoom .icon-btn.sm { width: 26px; height: 26px; }
.zoom .icon-btn:hover { background: var(--surface); }
.zoom .btn-sm { height: 26px; background: var(--surface); box-shadow: var(--shadow-xs); border-color: transparent; }
.zoom-v { font-size: 11px; color: var(--muted); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.gt-host { position: relative; }
.gt-scroll { overflow: auto; max-height: calc(100vh - 190px); min-height: 360px; position: relative; overscroll-behavior: contain; cursor: default; }
.gt-scroll.grabbing { cursor: grabbing; user-select: none; }
.gt-inner { position: relative; }
.gt-head { position: sticky; top: 0; z-index: 12; display: flex; background: var(--surface); border-bottom: 1px solid var(--border); }
.gt-corner { position: sticky; left: 0; z-index: 13; width: 184px; flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 12px 8px 16px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.gt-axis { position: relative; height: 56px; flex: none; }
.ax-days, .ax-shifts, .ax-hours { position: relative; }
.ax-days { height: 26px; }
.ax-shifts { height: 6px; }
.ax-hours { height: 24px; }
.ax-day { position: absolute; top: 0; height: 56px; border-left: 1px solid var(--day-line); }
.ax-day span { position: sticky; left: 192px; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 8px 0; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text); }
.ax-day span em { font-style: normal; font-weight: 500; color: var(--muted); }
.ax-shift { position: absolute; top: 1px; height: 4px; border-radius: 2px; overflow: hidden; border-left: 2px solid var(--surface); }
.ax-shift span { display: none; }
.ax-shift.day { background: color-mix(in srgb, var(--warn-bar) 55%, transparent); }
.ax-shift.night { background: color-mix(in srgb, var(--primary) 40%, transparent); }
[data-theme="dark"] .ax-shift.night { background: color-mix(in srgb, var(--primary-fg) 35%, transparent); }
.ax-h { position: absolute; bottom: 6px; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ax-h::before { content: ""; position: absolute; left: 50%; bottom: -6px; height: 3px; border-left: 1px solid var(--border-strong); }
.ax-h.mid { color: var(--text-2); font-weight: 600; }
.ax-mark { position: absolute; top: 0; bottom: 0; width: 0; z-index: 2; pointer-events: none; }
.ax-mark span { position: absolute; font-size: 10px; font-weight: 600; white-space: nowrap; padding: 0 5px; line-height: 16px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.now-mark span { background: var(--danger); color: #fff; left: 0; transform: translateX(-50%); bottom: 4px; }
.now-mark::after { display: none; }
.hz-mark { border-left: 1px dashed var(--border-strong); }
.hz-mark span { background: var(--surface-3); color: var(--muted); bottom: 4px; left: 4px; }
.gt-body { display: flex; position: relative; }
.gt-labels { position: sticky; left: 0; z-index: 10; width: 184px; flex: none; background: var(--surface); border-right: 1px solid var(--border); }
.gl-group { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; background: var(--surface-2); border-bottom: 1px solid var(--border-2); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gl-group .rchip { display: none; }
.gl-group em { font-style: normal; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.gl-row { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border-2); transition: background .2s; cursor: pointer; }
.gl-row:hover { background: var(--surface-2); }
.gl-row.hl { background: var(--primary-soft); box-shadow: inset 2px 0 0 var(--primary); }
.gl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.gl-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; line-height: 1.2; }
.gl-name b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.gl-name span { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.gl-load { display: contents; }
.ld { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld.success { color: var(--text-2); } .ld.warn { color: var(--warn-text); } .ld.danger { color: var(--danger); }
.ld.ghost { color: var(--faint); font-weight: 500; font-size: 10.5px; margin-left: 4px; }
.ld-bar { display: block; width: 100%; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; position: relative; }
.ld-bar i { display: block; height: 100%; border-radius: 2px; }
.ld-bar i.success { background: var(--success-bar); } .ld-bar i.warn { background: var(--warn-bar); } .ld-bar i.danger { background: var(--danger-bar); }
.ld-bar b { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--faint); opacity: .7; }
.gt-canvas { position: relative; flex: none; }
.gt-bg, .gt-rows, .gt-dts, .gt-ops, .gt-grid { position: absolute; inset: 0; }
.gt-grid { background-image: linear-gradient(to right, var(--grid) 0 1px, transparent 1px); pointer-events: none; }
.band { position: absolute; top: 0; bottom: 0; }
.band.day { background: var(--band-day); }
.band.night { background: var(--band-night); }
.day-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--day-line); }
.pre-h { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 6%, transparent) 6px 7px); }
.beyond { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--muted) 6%, transparent); }
.beyond span { display: none; }
.h-line { position: absolute; top: 0; bottom: 0; width: 0; }
.h-line.end { border-left: 1px dashed var(--border-strong); }
.h-line.start { border-left: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.gr-group { position: absolute; left: 0; right: 0; background: var(--surface-2); border-bottom: 1px solid var(--border-2); }
.gr-row { position: absolute; left: 0; right: 0; border-bottom: 1px solid var(--border-2); transition: background .2s; }
.gr-row:hover { background: color-mix(in srgb, var(--primary) 2.5%, transparent); }
.gr-row.hl { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.lane-tag { position: absolute; left: 6px; font-size: 9px; font-weight: 600; letter-spacing: .06em; color: var(--faint); pointer-events: none; }
.dt { position: absolute; border-radius: 4px; background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, var(--dt-bg) 1px 6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hatch) 70%, transparent); display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 1; }
.dt span { font-size: 10.5px; font-weight: 500; color: var(--muted); background: var(--surface); padding: 0 6px; line-height: 16px; border-radius: 4px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.dt span:empty { display: none; }
.gt-ops { z-index: 2; }
.op {
  position: absolute; display: flex; border-radius: 4px; cursor: pointer;
  --c-run: color-mix(in srgb, var(--c) var(--op-mix), var(--surface));
  --c-set: color-mix(in srgb, var(--c) 26%, var(--surface));
  transition: opacity .18s, box-shadow .15s, filter .18s;
  box-shadow: 0 0 0 1px var(--surface);
}
.op-setup { flex: none; height: 100%; border-radius: 4px 0 0 4px; background: var(--c-set); }
.op.short-setup .op-setup { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.op-run { flex: 1; min-width: 1px; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 6px; overflow: hidden; background: var(--c-run); color: var(--op-text); border-radius: 4px; }
.op-setup + .op-run { border-radius: 0 4px 4px 0; }
.op-t { font: 600 11px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.op-k { font-size: 10.5px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.op:hover { z-index: 3; filter: brightness(1.06); box-shadow: 0 0 0 1px var(--surface), 0 4px 10px -2px rgba(16, 24, 40, .25); }
.op.urgent .op-run { box-shadow: inset 0 2px 0 var(--danger); }
.op.urgent .op-setup { box-shadow: inset 0 2px 0 var(--danger); }
.op.late { box-shadow: 0 0 0 1px var(--surface), 0 0 0 2.5px var(--danger); }
.op-late { position: absolute; top: -5px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--danger); color: #fff; font: 700 9px/13px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--surface); z-index: 1; }
.op-lock { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; border-radius: 4px; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #0F1B2D; }
.op.locked .op-run { padding-right: 21px; }
.op.overflow { filter: saturate(.25); opacity: .5; }
.op.ghost { cursor: default; box-shadow: none; }
.op.ghost .op-run { background: color-mix(in srgb, var(--c) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); color: var(--muted); }
.op.ghost .op-setup { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); border-right: 0; }
.op.ghost .op-t { font-size: 9.5px; font-weight: 500; color: var(--text-2); }
.op.ghost:hover { filter: none; box-shadow: none; }
.has-sel .op:not(.hl) { opacity: .22; filter: saturate(.4); }
.op.hl { z-index: 4; }
.op.hl:not(.ghost) { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--text), 0 6px 14px -4px rgba(16, 24, 40, .35); }
.op.hl.ghost .op-run { box-shadow: inset 0 0 0 1.5px var(--text); }
.gt-svg { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; overflow: visible; }
.gt-svg marker path { fill: var(--text-2); }
.link { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 4 3; animation: dash 1.4s linear infinite; }
.link-dot { fill: var(--surface); stroke: var(--text-2); stroke-width: 1.5; }
@keyframes dash { to { stroke-dashoffset: -14; } }
.link-lbl rect { fill: var(--text); stroke: none; }
.link-lbl text { font: 600 10px var(--font); fill: var(--surface); font-variant-numeric: tabular-nums; }
.now-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--danger); z-index: 6; pointer-events: none; }
.now-line::before { content: ""; position: absolute; top: -3px; left: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.now-line span { display: none; }
.gt-hint { display: none; }
.op-card { position: fixed; right: 24px; top: calc(var(--tb-h) + 16px); width: 312px; max-height: calc(100vh - var(--tb-h) - 32px); overflow-y: auto; z-index: 12; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 16px; animation: slideIn .22s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.oc-hd { display: flex; justify-content: space-between; align-items: center; }
.oc-hd > div { display: flex; gap: 8px; align-items: center; }
.oc-no { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.oc-name { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; }
.oc-status { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-size: 12.5px; font-weight: 500; }
.oc-status em { margin-left: auto; font-style: normal; font-weight: 500; font-size: 11.5px; opacity: .85; font-variant-numeric: tabular-nums; }
.oc-status.good { background: var(--success-bg); color: var(--success); }
.oc-status.bad { background: var(--danger-bg); color: var(--danger); }
.oc-chain { list-style: none; margin: 14px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.oc-chain li { position: relative; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); display: flex; flex-direction: column; gap: 4px; }
.oc-chain li::before { content: ""; position: absolute; left: -21px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.oc-chain li.cur { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, var(--border)); background: var(--primary-soft); }
.oc-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.oc-time { font-size: 12.5px; font-variant-numeric: tabular-nums; font-weight: 500; }
.oc-sub { font-size: 11.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.oc-sub span { display: inline-flex; align-items: center; gap: 4px; }
.oc-gap { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.oc-fifo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-2); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------------- Hisoblash oynasi ---------------- */
.run-back { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(8, 15, 28, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.run-back.in { opacity: 1; }
.run-card { width: min(400px, calc(100vw - 32px)); background: var(--surface); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-lg); text-align: center; border: 1px solid var(--border); }
.run-card h3 { font-size: 15px; margin: 16px 0 4px; font-variant-numeric: tabular-nums; }
.run-card p { font-size: 12.5px; min-height: 20px; }
.run-anim { height: 64px; position: relative; margin: 0 auto; width: 100%; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); overflow: hidden; }
.run-anim i { position: absolute; left: 12px; height: 6px; border-radius: 3px; top: calc(9px + var(--i) * 10px); background: var(--primary); animation: runbar 1.8s cubic-bezier(.6, 0, .4, 1) infinite alternate; animation-delay: calc(var(--i) * -.37s); opacity: calc(.9 - var(--i) * .12); }
[data-theme="dark"] .run-anim i { background: var(--primary-fg); }
@keyframes runbar { 0% { width: 30px; transform: translateX(0); } 50% { width: 110px; } 100% { width: 50px; transform: translateX(260px); } }
.run-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin: 16px 0 12px; }
.run-bar i { display: block; height: 100%; width: 4%; background: var(--primary); border-radius: 2px; transition: width .25s linear; }
[data-theme="dark"] .run-bar i { background: var(--primary-fg); }
.run-steps { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.run-steps span { display: inline-flex; align-items: center; gap: 5px; }
.run-steps span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: background .2s; }
.run-steps span.on { color: var(--text); font-weight: 500; }
.run-steps span.on::before { background: var(--accent); }

/* ---------------- Eksport ---------------- */
.export-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.ex-side h2 { font-size: 14.5px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.ex-side h2 .ic { color: #1D6F42; }
[data-theme="dark"] .ex-side h2 .ic { color: #5BC98A; }
.ex-side > p { display: none; }
.ex-side .btn-block { margin-top: 18px; }
.ex-side .xs { margin-top: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kv dd { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.ex-prev { overflow: hidden; display: flex; flex-direction: column; }
.ex-tabs { display: flex; gap: 2px; padding: 8px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--border); overflow-x: auto; }
.ex-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; background: none; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.ex-tabs button:hover { color: var(--text); }
.ex-tabs button.on { background: var(--surface); border-color: var(--border); color: #1D6F42; margin-bottom: -1px; }
[data-theme="dark"] .ex-tabs button.on { color: #5BC98A; }
.ex-sheet { padding: 16px; overflow: auto; max-height: calc(100vh - 170px); }
.xl { font-family: Calibri, Carlito, var(--font); font-size: 12.5px; }
.xl-title { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.xl-title img { background: #fff; border-radius: 4px; padding: 2px; border: 1px solid var(--border); }
.xl-title div { display: flex; flex-direction: column; }
.xl-title b { font-size: 14px; }
.xl-title span { color: var(--muted); font-size: 12px; }
.xl-tbl { border-collapse: collapse; margin-bottom: 16px; min-width: 360px; }
.xl-tbl th { background: #003366; color: #fff; font-weight: 600; padding: 6px 9px; border: 1px solid #1F4C7A; text-align: left; white-space: nowrap; font-size: 12px; }
.xl-tbl td { padding: 5px 9px; border: 1px solid var(--border); white-space: nowrap; }
.xl-tbl tbody tr:nth-child(even) td { background: var(--surface-2); }
.xl-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.xl-ops { width: 100%; }
.xl-name { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.xl-sep td { background: var(--primary-soft) !important; font-weight: 600; color: var(--primary-fg); }
.xl-total td { font-weight: 600; background: var(--surface-3) !important; border-top: 2px solid var(--slate); }
.xl-note { color: var(--danger); font-weight: 600; }
.xl-ins { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }

/* ---------------- Sozlamalar ---------------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sec-t { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 14px; padding-top: 18px; border-top: 1px solid var(--border-2); }
.sec-t .ic { color: var(--faint); }
.card-hd + .sec-t { border-top: 0; padding-top: 0; }
.form-ft { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border-2); }
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.assume { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: a; display: flex; flex-direction: column; gap: 8px; }
.assume li { counter-increment: a; display: grid; grid-template-columns: 20px 1fr; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.assume li::before { content: counter(a); width: 20px; height: 20px; border-radius: 5px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.info-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
details.disclose > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary .chev { margin-left: auto; color: var(--faint); transition: transform .2s; }
details.disclose[open] > summary .chev { transform: rotate(180deg); }
.health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.health > div { padding: 10px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.health span { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.health b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* ---------------- Ma'lumotnomalar / Boshqaruv (CRUD) ---------------- */
.crud-card { overflow: hidden; }
.crud-card .table-wrap { max-height: calc(100vh - 200px); overflow: auto; }
.role-pill.admin { background: var(--primary-soft); color: var(--primary-fg); }
.role-pill.planner { background: var(--accent-soft); color: var(--accent); }
.role-pill.viewer { background: var(--surface-3); color: var(--muted); }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); flex: none; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 11.5px; color: var(--muted); }
.cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cnt.z { color: var(--faint); background: transparent; }
.pw-once { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); margin-top: 6px; }
.pw-once code { flex: 1; font-size: 14px; letter-spacing: .04em; user-select: all; color: var(--text); }
.audit-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.audit-filters .input { width: auto; }
.audit-filters .search { flex: 1 1 200px; }
.act { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.act i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.act.create i { background: var(--success-bar); } .act.update i { background: var(--info); } .act.delete i { background: var(--danger-bar); }
.act.login i, .act.logout i { background: var(--primary); } .act.login_failed i { background: var(--warn-bar); } .act.plan i { background: var(--accent); }
.tbl tr.exp td { background: var(--surface-2); }
.tbl tr.diff-row td { height: auto; padding: 0 12px 12px 52px; background: var(--surface-2); }
.diff { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-2); }
.diff dt { color: var(--muted); }
.diff dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.diff s { color: var(--danger); text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.diff ins { color: var(--success); text-decoration: none; }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.lock-screen { min-height: calc(100vh - var(--tb-h) - 48px); display: grid; place-items: center; }
.lock-card { width: min(400px, 100%); padding: 28px; }
.lock-card .lk-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--warn-bg); color: var(--warn-text); margin-bottom: 16px; }
.lock-card h2 { font-size: 17px; margin-bottom: 18px; }
.ro-hide { }
body.role-viewer .need-planner, body.role-viewer .need-admin, body.role-planner .need-admin { display: none !important; }
.no-perm { opacity: .5; pointer-events: none; }

/* ---------------- Kirish sahifasi ---------------- */
.lg-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.lg-art { position: relative; overflow: hidden; background: linear-gradient(160deg, #00396F 0%, #00284F 60%, #001E3D 100%); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; }
.lg-art .lg-logo { align-self: flex-start; }
.lg-art h2 { color: #fff; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; max-width: 360px; }
.lg-art small { color: #7F97B4; font-size: 12px; }
.lg-gantt { position: absolute; inset: 30% -10% auto 10%; display: flex; flex-direction: column; gap: 10px; opacity: .9; }
.lg-gantt div { height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.lg-gantt div:nth-child(2) { margin-left: 18%; width: 46%; background: rgba(127, 214, 207, .45); }
.lg-gantt div:nth-child(1) { width: 30%; background: rgba(255, 255, 255, .32); }
.lg-gantt div:nth-child(3) { margin-left: 8%; width: 58%; background: rgba(159, 192, 236, .38); }
.lg-gantt div:nth-child(4) { margin-left: 40%; width: 34%; background: rgba(224, 167, 62, .5); }
.lg-gantt div:nth-child(5) { margin-left: 26%; width: 50%; background: rgba(255, 255, 255, .2); }
.lg-main { display: grid; place-items: center; padding: 32px 16px; }
.lg-card { width: 100%; max-width: 360px; }
.lg-brand { display: none; align-items: center; gap: 12px; margin-bottom: 28px; }
.lg-logo { background: #fff; border-radius: 9px; padding: 5px 7px; display: inline-flex; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.lg-brand b { display: block; font-size: 14px; }
.lg-brand span { font-size: 12px; color: var(--muted); }
.lg-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.lg-card .lg-lead { color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.lg-err { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: var(--radius); margin-bottom: 16px; background: var(--danger-bg); color: var(--danger); font-size: 12.5px; font-weight: 500; }
.lg-info { font-size: 13px; line-height: 1.6; color: var(--text-2); display: flex; flex-direction: column; gap: 12px; }
.lg-info code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); border-radius: 5px; padding: 2px 6px; }
.lg-card .input { height: 40px; }
.lg-card .btn-lg { margin-top: 8px; }
.lg-foot { margin-top: 28px; font-size: 11.5px; color: var(--faint); }
@media (max-width: 860px) {
  .lg-wrap { grid-template-columns: 1fr; }
  .lg-art { display: none; }
  .lg-brand { display: flex; }
}

/* ---------------- Moslashuvchanlik ---------------- */
@media (max-width: 1400px) {
  .grid-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .plan-layout { grid-template-columns: 1fr; }
  .plan-side { position: static; max-height: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 18px; }
  .plan-side .side-t, .plan-side .side-sep, .plan-side .side-sub { grid-column: 1 / -1; }
  .plan-side .mini-plans { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .dash-grid, .grid-2 { grid-template-columns: 1fr; }
  .cmp-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  :root:not(.sb-open-force) { --sb-w: 60px; }
  .sidebar .sb-title, .sidebar .sb-nav span, .sidebar .sb-collapse span, .sidebar .sb-count, .sidebar .sb-uinfo { display: none; }
  .sidebar .sb-grp { font-size: 0; height: 1px; padding: 0; margin: 10px 8px; background: rgba(255, 255, 255, .08); }
  .sidebar .sb-brand { padding: 0 8px; justify-content: center; }
  .sidebar .sb-logo img { width: 34px; }
  .sidebar .sb-nav a, .sidebar .sb-collapse, .sidebar .sb-user { justify-content: center; padding: 0; }
  .sidebar .sb-ver { text-align: center; padding: 6px 0 0; font-size: 9.5px; }
  .chip-shift { display: none; }
}
@media (max-width: 760px) {
  .main-col { margin-left: 0; }
  .sidebar { width: 232px; transform: translateX(-100%); }
  .sidebar .sb-title, .sidebar .sb-nav span, .sidebar .sb-collapse span, .sidebar .sb-uinfo { display: initial; }
  .sidebar .sb-uinfo { display: flex; }
  .sidebar .sb-grp { font-size: 10.5px; height: auto; padding: 16px 10px 6px; margin: 0; background: none; }
  .sidebar .sb-brand { padding: 0 14px; justify-content: flex-start; }
  .sidebar .sb-nav a, .sidebar .sb-user { justify-content: flex-start; padding: 0 10px; }
  .sidebar .sb-logo img { width: 50px; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8, 15, 28, .4); }
  .sb-collapse:not(.sb-logout):not(.sb-pw) { display: none !important; }
  .topbar .tb-menu { display: inline-grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .tb-sub, .chip-mock { display: none; }
  #btn-plan span { display: none; }
  #btn-plan { padding: 0 10px; }
  #app { padding: 16px; }
  .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-val { font-size: 22px; }
  .frow, .frow3, .m-fields { grid-template-columns: 1fr; }
  .plan-side { grid-template-columns: 1fr; }
  .plan-bottom { grid-template-columns: 1fr; }
  .cmp-strip { grid-template-columns: 1fr; }
  .op-card { left: 12px; right: 12px; width: auto; }
  .search { max-width: none; }
  .toast { min-width: 0; max-width: calc(100vw - 32px); }
  #toasts { left: 16px; right: 16px; }
  .drawer { right: 0; top: 0; bottom: 0; border-radius: 0; }
  .health { grid-template-columns: 1fr; }
}

/* ---------------- Chop etish ---------------- */
@media print {
  .sidebar, .topbar, .plan-side, .gt-toolbar, .gt-hint, #toasts, .op-card, .toolbar { display: none !important; }
  .main-col { margin: 0; }
  #app { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .gt-scroll { max-height: none; overflow: visible; }
  .plan-layout, .dash-grid { display: block; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Buyurtmalar jadvali: № va amallar ustuni yopishqoq */
.tbl-orders th, .tbl-orders td { padding-left: 10px; padding-right: 10px; }
.tbl-orders .cell-name { max-width: 300px; }
.tbl-orders th:first-child, .tbl-orders td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); padding-left: 16px; }
.tbl-orders th:first-child { z-index: 3; background: var(--surface-2); }
.tbl-orders tbody tr:hover td:first-child { background: var(--surface-2); }
.tbl-orders th:last-child, .tbl-orders td:last-child { position: sticky; right: 0; background: var(--surface); padding-right: 12px; }
.tbl-orders th:last-child { background: var(--surface-2); z-index: 3; }
.tbl-orders tbody tr:hover td:last-child { background: var(--surface-2); }
.tbl-orders td:last-child:empty, .tbl-orders th:last-child:empty { padding: 0; }

.oc-name, .clamp, .tip-name, .ins-body p, .uns-list li span { overflow-wrap: anywhere; }

/* Raqamli maydonlar: spin tugmalarisiz, toza */
input[type="number"].input { -moz-appearance: textfield; }
input[type="number"].input::-webkit-inner-spin-button, input[type="number"].input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Uskuna kartasi: "Saqlash" faqat o'zgarish bo'lganda */
.mcard:not(.dirty) [data-save] { display: none; }
.m-dts:not(:has(li)) { padding: 6px 10px; }

/* ---------------- Tafsilot paneli (o'ng) ---------------- */
.dp { position: fixed; top: calc(var(--tb-h) + 8px); right: 8px; bottom: 8px; width: min(400px, calc(100vw - 16px)); z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(calc(100% + 24px)); opacity: 0; transition: transform .24s var(--ease), opacity .2s; pointer-events: none; }
.dp.in { transform: none; opacity: 1; pointer-events: auto; }
.dp-hd { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--border-2); min-height: 52px; }
.dp-back[hidden] { display: none; }
.dp-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; overflow: hidden; }
.dp-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dp-bd { flex: 1; overflow-y: auto; padding: 14px 16px 16px; overscroll-behavior: contain; }
.dp-sk { display: flex; flex-direction: column; gap: 12px; }
.dp-name { color: var(--text-2); font-size: 12.5px; margin-bottom: 12px; overflow-wrap: anywhere; }
.dp-status { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius); font-size: 13px; }
.dp-status b { font-weight: 600; }
.dp-status em { margin-left: auto; font-style: normal; font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; }
.dp-status.good { background: var(--success-bg); color: var(--success); }
.dp-status.bad { background: var(--danger-bg); color: var(--danger); }
.dp-status.warn { background: var(--warn-bg); color: var(--warn-text); }
.dp-status.muted { background: var(--surface-3); color: var(--muted); }
.slk { margin: 12px 0 4px; }
.slk-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-3); }
.slk-bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.slk-bar i.ok { background: color-mix(in srgb, var(--success-bar) 45%, transparent); }
.slk-bar i.bad { background: color-mix(in srgb, var(--danger-bar) 55%, transparent); }
.slk-bar b { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 1px; transform: translateX(-1px); }
.slk-bar b.fin { background: var(--text); }
.slk-bar b.due { background: var(--danger); }
.slk-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.slk-lbl span { display: inline-flex; align-items: center; gap: 4px; }
.dp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 16px 0 4px; font-size: 12.5px; }
.dp-facts dt { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.dp-facts dt .ic { color: var(--faint); }
.dp-facts dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dp-h { display: flex; align-items: center; gap: 6px; margin: 20px 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dp-h .ic { color: var(--faint); }
.dp-h .cnt { text-transform: none; letter-spacing: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st { display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; }
.st:not(.st-end)::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: -2px; width: 1px; background: var(--border); }
.st-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; z-index: 1; }
.st.print .st-ic { background: var(--primary-soft); color: var(--primary-fg); }
.st.diecut .st-ic { background: var(--accent-soft); color: var(--accent); }
.st-end.ok .st-ic { background: var(--success-bg); color: var(--success); }
.st-end.bad .st-ic { background: var(--danger-bg); color: var(--danger); }
.st-body { padding: 4px 0 12px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.st-hd { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.st-time { font-size: 12.5px; font-weight: 500; }
.st-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); gap: 1px; }
.st-bar i { display: block; height: 100%; }
.st-sub { display: flex; align-items: center; gap: 12px; font-size: 11.5px; }
.st-sub > span { display: inline-flex; align-items: center; gap: 4px; }
.st-gap { list-style: none; display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 0 0 8px 38px; margin-top: -6px; font-variant-numeric: tabular-nums; }
.lnk { cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .15s, color .15s; }
.lnk:hover { color: var(--primary-fg); text-decoration-color: currentColor; }
.lnk-area { cursor: pointer; }
.dp-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 12px; }
.dp-hist li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-2); align-items: baseline; }
.dp-hist li:last-child { border-bottom: 0; }
.dp-hist li > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.dp-hist b { font-weight: 500; }
.dp-ft { display: flex; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.dp-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.dp-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); cursor: pointer; transition: background .12s; min-width: 0; }
.dp-list li:hover, .dp-list li:focus-visible { background: var(--surface-2); }
.dp-list li > .ic:last-child { color: var(--faint); flex: none; }
.dp-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.dp-list li > div b { font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.dp-list li > div span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-list li em { font-style: normal; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-list.compact li { padding: 6px 8px; }
.dp-li-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.dp-li-ic.ok { background: var(--success-bg); color: var(--success); }
.dp-li-ic.warn { background: var(--warn-bg); color: var(--warn-text); }
.dp-li-ic.bad { background: var(--danger-bg); color: var(--danger); }
.dp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dp-kpis > div { padding: 10px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dp-kpis span { font-size: 11px; color: var(--muted); }
.dp-kpis b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-kpis b small { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.dp-kpis .meter { margin-top: 2px; }
.hstrip { display: block; width: 100%; height: 44px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.hs-night { fill: var(--band-night); }
.hs-busy { fill: var(--primary); opacity: .75; }
[data-theme="dark"] .hs-busy { fill: var(--primary-fg); opacity: .6; }
.hs-setup { fill: var(--warn-bar); }
.hs-day { stroke: var(--day-line); stroke-width: 1; }
.hs-ax { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.spd { display: flex; flex-direction: column; gap: 8px; }
.spd > div { display: grid; grid-template-columns: 74px 1fr 52px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.spd b { text-align: right; color: var(--text); font-weight: 600; }
.spd .meter { height: 6px; position: relative; }
.spd .meter > i { background: var(--primary); }
[data-theme="dark"] .spd .meter > i { background: var(--primary-fg); }
.spd .meter > i.success { background: var(--success-bar); }
.spd .meter.rng s { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--success-bar) 25%, transparent); text-decoration: none; }
i.meter { display: block; }
body.dp-open #toasts { right: 420px; }

/* ---------------- Global qidiruv ---------------- */
.tb-search { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--faint); font-size: 12.5px; min-width: 200px; transition: border-color .15s, color .15s; }
.tb-search:hover { border-color: var(--border-strong); color: var(--muted); }
.tb-search span:not(.kbd) { flex: 1; text-align: left; }
.cmdk-back { position: fixed; inset: 0; z-index: 140; background: rgba(8, 15, 28, .28); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; opacity: 0; transition: opacity .15s; }
.cmdk-back.in { opacity: 1; }
.cmdk { width: min(600px, 100%); background: var(--surface); border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-6px) scale(.985); transition: transform .18s var(--ease); }
.cmdk-back.in .cmdk { transform: none; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--border-2); color: var(--faint); }
.cmdk-in input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; color: var(--text); height: 100%; }
.cmdk-in input::-webkit-search-cancel-button { display: none; }
.cmdk-res { max-height: min(60vh, 460px); overflow-y: auto; padding: 6px; }
.cmdk-g { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 10px 10px 4px; }
.cmdk-it { display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 40px; border-radius: var(--radius); cursor: pointer; min-width: 0; }
.cmdk-it.on { background: var(--primary-soft); }
.cmdk-it b { font-weight: 500; white-space: nowrap; }
.cmdk-s { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-ic { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.cmdk-it.on .cmdk-ic { background: var(--surface); color: var(--primary-fg); }
.cmdk-it em { font-style: normal; }
.cmdk-empty { display: flex; align-items: center; gap: 8px; padding: 18px 12px; font-size: 13px; }
#toasts { left: 50%; right: auto; transform: translateX(-50%); align-items: center; }
body.dp-open #toasts { right: auto; }
.drawer-back { z-index: 90; }
@media (max-width: 1100px) { .tb-search { min-width: 0; } .tb-search span { display: none; } }
@media (max-width: 760px) { .dp { top: var(--tb-h); right: 0; bottom: 0; width: 100vw; border-radius: 0; } #toasts { left: 16px; right: 16px; transform: none; } }

/* ================================================================== */
/* v1.3 — Keyingi qadamlar, Navbat, Ma'lumotlar, Import, Tahlil         */
/* ================================================================== */
.sb-count.sb-p1 { background: var(--danger-bar); color: #fff; }
.m-ic.lamination { background: var(--danger-bg); color: var(--danger); }
.m-ic.gluing { background: var(--violet-bg); color: var(--violet); }
.chip-soft { height: 26px; font-size: 12px; background: var(--surface-3); color: var(--text-2); }
.chip-soft.xs { height: 22px; font-size: 11px; padding: 0 8px; }
.info-t { color: var(--info); }
.live-dot.ok { background: var(--success); box-shadow: 0 0 0 0 rgba(26, 127, 90, .5); animation: pulse-ok 1.8s infinite; }
@keyframes pulse-ok { 0% { box-shadow: 0 0 0 0 rgba(26, 127, 90, .45); } 70% { box-shadow: 0 0 0 6px rgba(26, 127, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 127, 90, 0); } }
.seg-sm button { height: 24px; padding: 0 9px; font-size: 12px; }
.seg button em { font-style: normal; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Top bar: hal qilish rejimi */
.seg-preset button { height: 26px; padding: 0 10px; font-size: 12px; }
.badge-preset { background: var(--accent-soft); color: var(--accent); }
.badge-preset b { font-weight: 600; }

/* ---------------- Keyingi qadamlar ---------------- */
.ns-block { margin-bottom: 16px; }
.ns-block .card-hd h2 { gap: 8px; }
.ns-block .card-hd h2 > .ic { color: var(--accent); }
.pcs { display: inline-flex; gap: 4px; margin-left: 4px; }
.pc { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc.p1 { background: var(--danger-bg); color: var(--danger); } .pc.p2 { background: var(--warn-bg); color: var(--warn-text); } .pc.p3 { background: var(--surface-3); color: var(--muted); }
.pdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pdot.p1 { background: var(--danger-bar); } .pdot.p2 { background: var(--warn-bar); } .pdot.p3 { background: var(--faint); }
.ns-hd-r { display: flex; align-items: center; gap: 6px; }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.ns { --pr: var(--faint); --pr-bg: var(--surface-3); --pr-t: var(--muted);
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 12px 15px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; overflow: hidden; min-height: 116px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ns::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pr); }
.ns:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.ns:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.ns.p1 { --pr: var(--danger-bar); --pr-bg: var(--danger-bg); --pr-t: var(--danger); }
.ns.p2 { --pr: var(--warn-bar); --pr-bg: var(--warn-bg); --pr-t: var(--warn-text); }
.ns-top { display: flex; align-items: center; gap: 7px; }
.ns-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--pr-bg); color: var(--pr-t); flex: none; }
.ns-k { font-size: 11px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-pr { margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 0 7px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--pr-bg); color: var(--pr-t); flex: none; }
.ns-t { font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ns-ft { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.ns-val { font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ns-val small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.ns-do { margin-left: auto; background: var(--primary); color: var(--on-primary); border-color: transparent; }
.ns-do:hover:not(:disabled) { background: var(--primary-600); }
.ns-go { margin-left: auto; color: var(--faint); transition: transform .15s, color .15s; }
.ns:hover .ns-go { transform: translateX(2px); color: var(--muted); }
.ns-m { height: 3px; margin-top: -2px; }
.sk-ns { cursor: default; }
.sk-ns::before { display: none; }
.ns-page .ns-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* Drawer: qadam tafsiloti */
.nsd-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.nsd-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.nsd-ic.p1, .nsd-pr.p1 { background: var(--danger-bg); color: var(--danger); }
.nsd-ic.p2, .nsd-pr.p2 { background: var(--warn-bg); color: var(--warn-text); }
.nsd-pr.p3 { background: var(--surface-3); color: var(--muted); }
.nsd-val { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.nsd-val small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.nsd-why { color: var(--text-2); font-size: 13px; margin: 12px 0 14px; }
.nsd-how { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); background: var(--info-bg); color: var(--info); font-size: 12.5px; margin: 12px 0; }
.nsd-id { margin-top: 18px; }
.ns-q { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); margin: 0 0 14px; color: var(--accent); }
.ns-q p { flex: 1; min-width: 200px; color: var(--text); font-weight: 500; font-size: 13px; }
.ns-q-b { display: flex; gap: 6px; align-items: center; }

/* Navbat (dispatch) */
.dq-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.dq-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dq-hd h3 { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lg.lg-set { background: color-mix(in srgb, var(--warn-bar) 55%, transparent); } .lg.lg-runx { background: var(--primary); } .lg.lg-urg { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--danger); }
.dq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 24px; }
.dq-lane { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.dq-m { display: flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 6px; margin-left: -6px; border-radius: 7px; min-width: 0; text-align: left; }
.dq-m:hover { background: var(--surface-2); }
.dq-m b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dq-m .m-ic, .an-m .m-ic, .sh-lbl .m-ic { width: 22px; height: 22px; border-radius: 6px; }
.dq-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.dq-op { position: relative; padding: 5px 8px 6px 9px; border-radius: 7px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 3px; transition: box-shadow .12s, background .12s; }
.dq-op:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-xs); }
.dq-op.urg { box-shadow: inset 2.5px 0 0 var(--danger), inset 0 0 0 1px var(--border-2); }
.dq-op.late { background: var(--danger-bg); }
.dq-op.run { background: var(--success-bg); }
.dq-no { display: flex; align-items: center; gap: 5px; min-width: 0; }
.dq-no b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dq-bar { display: flex; height: 3px; border-radius: 2px; overflow: hidden; background: var(--surface-3); }
.dq-bar i { display: block; height: 100%; }
.dq-bar i.s { background: color-mix(in srgb, var(--warn-bar) 55%, transparent); }
.dq-bar i.r { flex: 1; background: var(--primary); opacity: .8; }
.dq-t { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.dq-empty { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 12.5px; }

/* ---------------- Tor joylar (sexlar) ---------------- */
.sh { display: flex; flex-direction: column; gap: 2px; }
.sh-row { display: grid; grid-template-columns: 22px minmax(110px, 170px) minmax(0, 1fr) 56px minmax(90px, auto); align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: var(--radius); cursor: pointer; transition: background .12s; }
.sh-row:hover { background: var(--surface-2); }
.sh-rank { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--muted); font-variant-numeric: tabular-nums; }
.sh-row.top .sh-rank { background: var(--danger); color: #fff; }
.sh-lbl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sh-lbl b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-gap { color: var(--faint); display: inline-grid; place-items: center; font-style: normal; }
.sh-fl { color: var(--danger); display: inline-grid; place-items: center; font-style: normal; }
.sh-bar { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.sh-bar i { display: block; height: 100%; border-radius: 5px; background: color-mix(in srgb, var(--primary) 70%, transparent); transform-origin: left; animation: grow .8s var(--ease) both; }
.sh-bar i.warn { background: var(--warn-bar); }
.sh-bar i.top { background: linear-gradient(90deg, var(--danger-bar), color-mix(in srgb, var(--danger-bar) 75%, var(--warn-bar))); }
.sh-row.top { background: color-mix(in srgb, var(--danger-bg) 55%, transparent); }
.sh-row.top:hover { background: var(--danger-bg); }
.sh-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-q { display: inline-flex; align-items: baseline; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sh-q b { font-size: 13px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-q em { font-style: normal; color: var(--faint); }
.sh-flag { display: inline-flex; align-items: center; gap: 4px; justify-content: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--danger); color: #fff; white-space: nowrap; }
.lg.lg-top { background: var(--danger-bar); }
.lg.lg-gap { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); border-radius: 50%; }

/* Soatlar (stacked) */
.hb { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--surface-3); gap: 1px; }
.hb i { display: block; height: 100%; transform-origin: left; animation: grow .8s var(--ease) both; }
.h-run { background: #4E79A7; } .h-setup { background: var(--warn-bar); } .h-repair { background: var(--danger-bar); } .h-waiting { background: #79A6E8; } .h-other { background: color-mix(in srgb, var(--muted) 40%, transparent); }
#tip .tip-bar i.h-other { background: rgba(255, 255, 255, .28); }
#tip .lg { width: 7px; height: 7px; vertical-align: 0; }
.lg.lg-spd { background: var(--success-bar); }
.sd-list li { align-items: flex-start; }
.sd-list li > div .hb { margin-top: 6px; }

/* ---------------- Tahlil sahifasi ---------------- */
.fd-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.fd { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid transparent; font-size: 12.5px; font-weight: 500; max-width: 100%; transition: box-shadow .15s; }
.fd span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd:hover { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.fd-danger { background: var(--danger-bg); color: var(--danger); } .fd-warn { background: var(--warn-bg); color: var(--warn-text); } .fd-info { background: var(--info-bg); color: var(--info); } .fd-success { background: var(--success-bg); color: var(--success); }
.an-top { margin-bottom: 16px; }
.drs { display: flex; flex-direction: column; gap: 4px; }
.drs-row { display: grid; grid-template-columns: minmax(100px, 150px) minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 5px 0; font-size: 12.5px; }
.drs-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.drs-b { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.drs-b i { display: block; height: 100%; border-radius: 4px; transform-origin: left; animation: grow .8s var(--ease) both; }
.drs-row b { text-align: right; font-variant-numeric: tabular-nums; } .drs-row b small { color: var(--muted); font-weight: 500; }
.an-m { display: flex; align-items: center; gap: 9px; min-width: 0; }
.an-m > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.an-m b { font-weight: 500; white-space: nowrap; }
.an-m .xs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.an-tbl td { height: 50px; }
.spm { display: grid; grid-template-columns: minmax(50px, 90px) 40px; gap: 8px; align-items: center; }
.spm .meter { height: 6px; }
.spm b { text-align: right; font-size: 12px; }
.spark.sm { width: 72px; height: 22px; --tone: var(--primary-fg); }

/* ---------------- Kalibrlash ---------------- */
.cb-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cb-tbl td { height: 60px; vertical-align: middle; }
.cb-tbl tr.cb-same td { opacity: .55; }
.cf { display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.cf-r { position: relative; height: 12px; border-radius: 6px; background: var(--surface-3); }
.cf-r s { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: color-mix(in srgb, var(--success-bar) 35%, transparent); text-decoration: none; }
.cf-r b.cur { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--primary-fg); }
.cf-r i.sug { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px var(--surface); }
.cf.same .cf-r i.sug { background: var(--faint); }
.cf-v { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.cf-v .ic { color: var(--faint); }
.cf-v .delta { height: 18px; font-size: 10.5px; margin-left: 2px; }
.cdots { display: inline-flex; gap: 3px; }
.cdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cdots.c1 i:nth-child(-n+1), .cdots.c2 i:nth-child(-n+2), .cdots.c3 i { background: var(--success-bar); box-shadow: none; }
.cdots.c1 i:first-child { background: var(--warn-bar); }
.lg.lg-band { background: color-mix(in srgb, var(--success-bar) 35%, transparent); width: 14px; }
.lg.lg-cur { width: 2px; height: 12px; background: var(--primary-fg); border-radius: 1px; }
.lg.lg-sug { background: var(--success); border-radius: 50%; }
.drawer-ft #cb-n { margin-right: auto; align-self: center; }

/* Uskuna paneli: tezlik diagrammasi */
.sc { display: flex; flex-direction: column; gap: 6px; }
.sc-svg { width: 100%; height: 58px; display: block; overflow: visible; }
.sc-grid { stroke: var(--grid); stroke-width: 1; }
.sc-ax { font-size: 9.5px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.sc-track { stroke: var(--surface-3); stroke-width: 6; stroke-linecap: round; }
.sc-band { fill: color-mix(in srgb, var(--success-bar) 30%, transparent); }
.sc-med { stroke: var(--success); stroke-width: 2; }
.sc-dot { fill: var(--success); stroke: var(--surface); stroke-width: 2; }
.sc-conf { stroke: var(--primary-fg); stroke-width: 2.5; stroke-linecap: round; }
.sc-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted); }
.sc-leg span { display: inline-flex; align-items: center; gap: 5px; }
.sc-leg b { color: var(--text); font-weight: 600; }
.sc-k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sc-k.conf { width: 3px; background: var(--primary-fg); border-radius: 1px; } .sc-k.med { background: var(--success); border-radius: 50%; } .sc-k.bnd { background: color-mix(in srgb, var(--success-bar) 35%, transparent); width: 14px; }
.sc-set { display: flex; align-items: center; gap: 5px; } .sc-set b { color: var(--text); }

/* ---------------- Ma'lumotlar sifati ---------------- */
.ring { display: block; }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke: var(--tn, var(--primary)); stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.ok { --tn: var(--success-bar); --tn-t: var(--success); } .warn { --tn: var(--warn-bar); --tn-t: var(--warn-text); } .bad { --tn: var(--danger-bar); --tn-t: var(--danger); }
.dqa-top { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dqa-ov { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.ov-ring { position: relative; }
.ov-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ov-c b { font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--tn-t); font-variant-numeric: tabular-nums; }
.ov-c b small { font-size: 15px; font-weight: 500; }
.ov-c span { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.ov-leg { display: flex; gap: 14px; }
.ov-leg span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.ov-leg i { width: 8px; height: 8px; border-radius: 50%; background: var(--tn); }
.rings { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 4px; }
.rg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border: 0; background: none; border-radius: var(--radius); transition: background .12s; }
.rg:hover { background: var(--surface-2); }
.rg-r { position: relative; display: inline-grid; }
.rg-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tn-t); }
.rg > b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.rg-l { font-size: 11.5px; color: var(--muted); line-height: 1.2; text-align: center; }
.rg em { position: absolute; top: 6px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 600; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tn); color: #fff; font-variant-numeric: tabular-nums; }
.rg.ok em { background: var(--surface-3); color: var(--muted); }
.fbars { display: flex; flex-direction: column; gap: 2px; }
.fb { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(130px, auto) 16px; align-items: center; gap: 14px; padding: 9px 8px; margin: 0 -8px; border: 0; background: none; border-radius: var(--radius); text-align: left; transition: background .12s; }
.fb:hover, .fb.on { background: var(--surface-2); }
.fb.on { box-shadow: inset 0 0 0 1px var(--border); }
.fb > .ic:last-child { color: var(--faint); }
.fb-l { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.fb-l b { color: var(--text); font-weight: 500; }
.fb-bar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; background: var(--surface-3); gap: 1px; }
.fb-bar i { display: block; height: 100%; transform-origin: left; animation: grow .8s var(--ease) both; }
.fb-bar i.ok, .lg.fb-ok { background: var(--success-bar); }
.fb-bar i.est, .lg.fb-est { background: repeating-linear-gradient(135deg, var(--warn-bar) 0 4px, color-mix(in srgb, var(--warn-bar) 60%, transparent) 4px 7px); }
.fb-bar i.miss, .lg.fb-miss { background: var(--danger-bar); }
.fb-n { display: flex; gap: 8px; align-items: baseline; justify-content: flex-end; font-size: 12.5px; }
.fb-n em { font-style: normal; color: var(--faint); }
.aff { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-2); }
.aff-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.aff-hd > b { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.aff-tpl { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius); background: var(--primary-soft); margin-bottom: 10px; }
.bulk .check span { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 18px; }
.bulk .input { width: auto; min-width: 200px; background: var(--surface); }
.aff-tw { max-height: 420px; overflow: auto; border: 1px solid var(--border-2); border-radius: var(--radius); }
.aff-tw .tbl td { height: 42px; }
.aff-tw .input-sm { min-width: 180px; }
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.sdot.miss, .sdot.error { background: var(--danger-bar); } .sdot.est { background: var(--warn-bar); } .sdot.new { background: var(--success-bar); } .sdot.update { background: var(--info); } .sdot.skip { background: var(--faint); }
.tbl tr.dirty td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.tbl tr.saved td { background: color-mix(in srgb, var(--success-bg) 70%, transparent); }
.dd-hd { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.dd-hd > div { display: flex; flex-direction: column; }
.dd-v { font-size: 28px; font-weight: 600; letter-spacing: -.03em; color: var(--tn-t); font-variant-numeric: tabular-nums; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.how li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.how li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.how li > div b { font-weight: 500; font-size: 12.5px; }
.how li > div span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srcs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.srcs li { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 4px 12px; align-items: center; }
.src-t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.src-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-b { grid-column: 1; height: 6px; border-radius: 3px; background: transparent; }
.src-b > i { display: block; height: 100%; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.src-b > i > i { display: block; height: 100%; background: color-mix(in srgb, var(--primary) 65%, transparent); border-radius: 3px; }
.src-b.trunc > i { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--danger-bar) 45%, transparent) 0 3px, transparent 3px 6px); }
.src-n { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 12.5px; font-weight: 600; }
.src-n em { font-style: normal; color: var(--faint); font-weight: 400; margin-left: 3px; }
.ih li { gap: 10px; }
.ih-n { font-size: 12px; color: var(--muted); }
.ih-iss { display: inline-flex; gap: 3px; }
.iss { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-style: normal; }
.iss.error { background: var(--danger-bg); color: var(--danger); } .iss.warn { background: var(--warn-bg); color: var(--warn-text); }
.tr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tr-kpis > div { padding: 10px; border-radius: var(--radius); background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.tr-kpis span { font-size: 11px; color: var(--muted); } .tr-kpis b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-kpis .ok b { color: var(--success); } .tr-kpis .bad b { color: var(--danger); }

/* ---------------- Import ---------------- */
.imp-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; margin-bottom: 16px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; padding: 24px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--border-strong); background: var(--surface); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop.over .drop-ic { transform: translateY(-3px); }
.drop-ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-fg); margin-bottom: 6px; transition: transform .15s; }
.drop b { font-size: 14px; }
.drop .muted { font-size: 12px; }
.drop-types { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.drop.busy { pointer-events: none; }
.drop-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: inherit; }
.drop-busy .run-bar { width: 260px; margin: 0 0 8px; display: block; }
.drop-busy .run-bar i { width: 30px; animation: runbar 1.4s ease-in-out infinite alternate; }
.no-perm-card { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); min-height: 120px; }
.ib { display: flex; flex-direction: column; gap: 12px; }
.ib-st { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); font-size: 12.5px; }
.ib-st.ok { background: var(--success-bg); color: var(--success); } .ib-st.off { background: var(--surface-3); color: var(--muted); }
.ib-st b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-k { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ib-k > div { display: flex; flex-direction: column; } .ib-k span { font-size: 11px; color: var(--muted); } .ib-k b { font-size: 16px; font-weight: 600; }
.rep { margin-bottom: 16px; }
.rep-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rep-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-fg); flex: none; }
.rep-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rep-t > b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-t > span { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.rep-act { margin-left: auto; display: flex; gap: 8px; }
.pb { margin-bottom: 14px; }
.pb-bar { position: relative; height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.pb-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.pb-bar i.ghost { background: repeating-linear-gradient(135deg, var(--border-strong) 0 1px, transparent 1px 5px); }
.pb-bar i.got { background: color-mix(in srgb, var(--primary) 72%, var(--surface)); }
.pb-bar i.cut { background: repeating-linear-gradient(135deg, var(--danger-bar) 0 3px, color-mix(in srgb, var(--danger-bar) 25%, transparent) 3px 6px); border-radius: 0 6px 6px 0; }
.pb-l { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pb-l span { display: inline-flex; align-items: center; gap: 3px; }
.rms { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rm { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rm > span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.rm > b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rm.warn > b { color: var(--warn-text); } .rm.danger > b { color: var(--danger); }
.rm.sum { grid-column: span 2; }
.sb { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; margin: 6px 0 2px; }
.sb i { display: block; height: 100%; transform-origin: left; animation: grow .8s var(--ease) both; }
.sb i.new { background: var(--success-bar); } .sb i.update { background: var(--info); } .sb i.skip { background: color-mix(in srgb, var(--muted) 35%, transparent); } .sb i.error { background: var(--danger-bar); }
.sb-l { display: flex; gap: 12px; font-size: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.iss-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 500; cursor: help; }
.iss-chip.error { background: var(--danger-bg); color: var(--danger); } .iss-chip.warn { background: var(--warn-bg); color: var(--warn-text); } .iss-chip.info { background: var(--info-bg); color: var(--info); }
.iss-chip.frozen { background: var(--surface-3); color: var(--text-2); }
.sheets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sh-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-fg); font-size: 11.5px; }
.sh-chip b { font-weight: 500; } .sh-chip em { font-style: normal; font-weight: 600; }
.sh-chip.off { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--border); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--faint) 60%, transparent); }
.rep-tb { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rep-tw { max-height: 460px; overflow: auto; border: 1px solid var(--border-2); border-radius: var(--radius); }
.rep-tw .tbl td { height: 38px; }
.tbl tr.rs-skip td { color: var(--muted); }
.tbl tr.rs-error td { background: color-mix(in srgb, var(--danger-bg) 50%, transparent); }

@media (max-width: 1200px) {
  .dq { grid-template-columns: minmax(0, 1fr); }
  .imp-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) { .seg-preset { display: none; } }
@media (max-width: 760px) {
  .ns-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dq-lane { grid-template-columns: minmax(0, 1fr); }
  .sh-row { grid-template-columns: 22px minmax(0, 1fr) 56px; }
  .sh-row .sh-bar { grid-column: 1 / -1; grid-row: 2; }
  .sh-row .sh-q { display: none; }
  .dqa-top { grid-template-columns: minmax(0, 1fr); }
  .fb { grid-template-columns: 100px minmax(0, 1fr) 16px; }
  .fb-n { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .rm.sum { grid-column: auto; }
  .rep-act { margin-left: 0; width: 100%; }
  .tr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .ns-grid { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================== */
/* v1.3 — Scheduler v2: Gantt (barcha sexlar, smenasiz vaqt, xavf)     */
/* ================================================================== */
.gl-group .gl-sl { margin-left: auto; font-size: 10.5px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cal-off { position: absolute; border-radius: 3px; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--hatch) 70%, transparent) 0 1px, transparent 1px 7px); background-color: color-mix(in srgb, var(--surface-2) 70%, transparent); z-index: 0; display: flex; align-items: center; justify-content: center; }
.cal-off span { font-size: 10px; color: var(--faint); display: inline-flex; align-items: center; gap: 3px; background: var(--surface); border-radius: 4px; padding: 0 5px; line-height: 15px; }
.op-p75 { position: absolute; z-index: 0 !important; height: 6px; border-radius: 0 3px 3px 0; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent) 0 3px, transparent 3px 5px); pointer-events: none; }
.badge-preset .bp-ver { background: var(--accent); color: var(--surface); border-radius: 4px; padding: 0 4px; font-size: 10px; line-height: 15px; margin-right: 2px; }
.risk-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: help; }
.risk-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.risk-chip.warn b, .risk-chip.warn .ic { color: var(--warn-text); }

/* ================================================================== */
/* v1.3 — Sinov (backtest)                                             */
/* ================================================================== */
:root { --bt-v2: var(--primary); --bt-sheet: #D08A3E; --bt-fifo: #6E819B; --bt-v1: #A5679F; --bt-act: color-mix(in srgb, var(--muted) 16%, transparent); }
.bt-v2 { --bc: var(--bt-v2); } .bt-manual_sheet { --bc: var(--bt-sheet); } .bt-fifo { --bc: var(--bt-fifo); } .bt-v1 { --bc: var(--bt-v1); }
.bt-top { align-items: stretch; margin-bottom: 16px; }
.view-backtest > section.card + section.card { margin-top: 16px; }
.bt-bars { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.bt-bars.sm { gap: 8px; }
.bt-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 62px; align-items: center; gap: 10px; cursor: pointer; border-radius: 8px; padding: 4px 6px; margin: 0 -6px; transition: background .15s; }
.bt-row:hover { background: var(--surface-2); }
.bt-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.bt-l .ic { color: var(--bc); }
.bt-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-3); }
.bt-bars.sm .bt-track { height: 9px; }
.bt-track > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--bc); }
.bt-v2 .bt-track > i { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 30%, transparent); }
.bt-ghost { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed color-mix(in srgb, var(--bt-v2) 60%, transparent); }
.bt-row em { font-style: normal; text-align: right; font-size: 15px; font-weight: 600; color: var(--text); }
.bt-row.bt-v2 em { color: var(--bt-v2); font-size: 17px; }
.bt-row em small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.bt-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bt-note b { color: var(--text); }
.bt-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bt-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.bt-kpi:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bt-kpi-l { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-kpi b { font-size: 20px; font-weight: 600; color: var(--text); }
.bt-kpi b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.bt-kpi > small { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-busy { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; cursor: help; }
.bt-busy > div { display: grid; grid-template-columns: 76px minmax(0, 1fr) 44px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.bt-busy span { display: inline-flex; align-items: center; gap: 5px; }
.bt-busy > div > i { height: 8px; border-radius: 4px; background: var(--surface-3); position: relative; }
.bt-busy > div > i > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.bt-busy .pl { background: var(--bt-v2); } .bt-busy .ac { background: var(--slate); }
.bt-busy b { text-align: right; color: var(--text); }
.bt-lg { gap: 6px; }
.bt-lgi { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 11.5px; cursor: pointer; }
.bt-lgi i { width: 14px; height: 3px; border-radius: 2px; background: var(--bc); display: inline-block; }
.bt-lgi.off { opacity: .45; text-decoration: line-through; }
.bt-lgi.bt-act { cursor: help; } .bt-lgi.bt-act i { height: 9px; width: 9px; background: color-mix(in srgb, var(--muted) 30%, transparent); }
.bt-chart { width: 100%; min-height: 250px; }
.bt-svg { display: block; }
.bt-grid { stroke: var(--border-2); stroke-width: 1; }
.bt-ax { fill: var(--faint); font-size: 10.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.bt-ax.sm { font-size: 9.5px; } .bt-ax.sun { fill: var(--danger); }
.bt-abar { fill: var(--bt-act); }
.bt-ln { fill: none; stroke: var(--bc); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bt-ln.bt-v2 { stroke-width: 2.8; }
.bt-ln.bt-v1, .bt-ln.bt-fifo { stroke-dasharray: 1 0; opacity: .85; }
.bt-pt { fill: var(--surface); stroke: var(--bc); stroke-width: 1.6; }
.bt-pt.bt-v2 { fill: var(--bc); }
.bt-hit { fill: transparent; cursor: pointer; }
.bt-hit:hover { fill: color-mix(in srgb, var(--primary) 7%, transparent); }
.bt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bc); margin-right: 5px; vertical-align: 0; }
.bt-causes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bt-ch { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.bt-chips { display: flex; flex-direction: column; gap: 8px; }
.bt-chip { position: relative; overflow: hidden; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.bt-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bt-chip > i { position: absolute; left: 0; bottom: 0; height: 3px; }
.bt-chip.bt-miss { --cc: var(--info); } .bt-chip.bt-extra { --cc: var(--warn); }
.bt-chip > i, i.bt-miss, i.bt-extra { background: var(--cc, var(--info)); }
i.bt-miss { --cc: var(--info); } i.bt-extra { --cc: var(--warn); }
.bt-ci { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc, var(--info)) 13%, transparent); color: var(--cc, var(--info)); }
.bt-ci.big { width: 40px; height: 40px; border-radius: 10px; }
.bt-cl { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-chip b { font-size: 14px; }
.bt-gap { display: flex; flex-direction: column; gap: 5px; }
.bt-gr { display: grid; grid-template-columns: 96px minmax(0, 1fr) 48px; align-items: center; gap: 10px; font-size: 12px; padding: 1px 4px; margin: 0 -4px; border-radius: 6px; }
.bt-gr.link { cursor: pointer; } .bt-gr.link:hover { background: var(--surface-2); }
.bt-gr > span { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-gr b { text-align: right; }
.bt-gt { position: relative; height: 10px; background: linear-gradient(var(--border), var(--border)) center / 1px 100% no-repeat; }
.bt-gt i { position: absolute; top: 1px; bottom: 1px; border-radius: 3px; }
.bt-pos { background: var(--bt-v2); } .bt-neg { background: var(--slate); }
.lg.bt-pos { background: var(--bt-v2); } .lg.bt-neg { background: var(--slate); }
.bt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bt-st { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 11px; cursor: help; }
.bt-st b { font-size: 17px; color: var(--text); font-weight: 600; }
.bt-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border-2); font-size: 12px; color: var(--muted); }
.bt-foot span { display: inline-flex; align-items: center; gap: 5px; cursor: help; }
.bt-cause-hd { display: flex; gap: 12px; align-items: flex-start; }
.bt-cause-hd b { font-size: 22px; }
.bt-cause-hd p { margin: 4px 0 0; line-height: 1.45; }
.bt-cmp { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 16px; font-size: 12px; color: var(--muted); }
.bt-cmp b { color: var(--text); }
.bt-days { display: flex; flex-direction: column; gap: 3px; }
.bt-dr { display: grid; grid-template-columns: 74px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 12px; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; cursor: pointer; }
.bt-dr:hover { background: var(--surface-2); }
.bt-dr > span { color: var(--text-2); }
.bt-dr > i { height: 8px; border-radius: 4px; background: var(--surface-3); position: relative; }
.bt-dr > i > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.bt-fill { background: var(--bc); }
.bt-dr b { text-align: right; }
.bt-tbl th.on, .bt-tbl td.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
@media (max-width: 900px) {
  .bt-causes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .bt-row { grid-template-columns: 64px minmax(0, 1fr) 52px; gap: 8px; }
  .bt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-gr { grid-template-columns: 78px minmax(0, 1fr) 42px; }
}
