:root {
  --bg: #eef4f3;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --line: #dce8e5;
  --line-strong: #c4d7d3;
  --text: #173432;
  --muted: #6f8582;
  --primary: #0a8078;
  --primary-2: #19a392;
  --primary-soft: #e3f4f1;
  --blue: #3c7dd9;
  --orange: #ed9b36;
  --red: #dc5a5a;
  --yellow: #e1be43;
  --grey: #8b9a98;
  --shadow: 0 14px 38px rgba(33, 69, 65, .10);
  --sidebar-w: 82px;
  --header-h: 76px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: "Vazirmatn", Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.auth-locked .app-shell { pointer-events: none; user-select: none; filter: blur(2px) saturate(.82); }
.pilot-login { --login-blue: #2469e8; --login-blue-2: #1f5ed8; --login-navy: #0b2f66; --login-muted: #6e7c90; --login-line: #e2e9f2; --login-card: rgba(255,255,255,.97); position: fixed; inset: 0; z-index: 320; min-width: 320px; display: grid; grid-template-columns: minmax(0, 58%) minmax(420px, 42%); direction: ltr; background: radial-gradient(circle at 15% 12%, rgba(52,111,190,.08), transparent 28%), linear-gradient(180deg,#f8fbff 0%,#f3f7fc 100%); color: #133a74; overflow: auto; }
.pilot-login svg { width: 1em; height: 1em; display: block; fill: currentColor; }
.pilot-login-showcase, .pilot-login-panel { direction: rtl; min-height: 100vh; }
.pilot-login-showcase { display: flex; align-items: center; justify-content: center; padding: clamp(22px,2vw,36px); }
.pilot-showcase-image { width: 100%; height: calc(100vh - 44px); object-fit: contain; object-position: center; display: block; filter: drop-shadow(0 22px 36px rgba(25,56,97,.08)); }
.pilot-login-panel { padding: 36px clamp(24px,4vw,62px); display: flex; align-items: center; justify-content: center; }
.pilot-login-card { width: min(100%,620px); min-height: min(900px,calc(100vh - 72px)); padding: clamp(34px,4vw,58px) clamp(30px,4vw,66px) 42px; border: 1px solid rgba(213,220,229,.86); border-radius: 24px; background: var(--login-card); box-shadow: 0 16px 40px rgba(35,66,104,.10); display: flex; flex-direction: column; }
.pilot-brand-block { display: flex; align-items: center; justify-content: center; gap: 18px; }
.pilot-brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.pilot-brand-text strong { color: var(--login-navy); font-size: clamp(26px,2.2vw,36px); font-weight: 900; }
.pilot-brand-text span { margin-top: 11px; color: #666a71; font-size: clamp(16px,1.55vw,23px); line-height: 1; font-weight: 700; direction: ltr; letter-spacing: 0; }
.pilot-tec-badge { flex: 0 0 auto; min-width: 105px; height: 76px; padding: 0 13px; display: grid; place-items: center; background: linear-gradient(145deg,#f58977,#f17463); color: #fff; font-family: Arial,sans-serif; font-size: 47px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.pilot-welcome-copy { margin-top: clamp(54px,7vh,88px); text-align: center; }
.pilot-welcome-copy h1 { margin: 0; color: var(--login-navy); font-size: clamp(25px,2vw,31px); font-weight: 900; line-height: 1.4; }
.pilot-welcome-copy p { margin: 19px 0 0; color: #7e8999; font-size: clamp(14px,1.12vw,17px); line-height: 1.8; }
.pilot-form-body { margin-top: 45px; }
.pilot-form-group { display: block; color: #1a355c; font-size: 15px; font-weight: 800; }
.pilot-form-group + .pilot-form-group { margin-top: 35px; }
.pilot-form-group > span:first-child { display: block; margin: 0 6px 13px; }
.pilot-input-shell { position: relative; height: 68px; display: block; }
.pilot-input-shell input { width: 100%; height: 100%; padding: 0 56px 0 18px; border: 1px solid #d8e0e9; border-radius: 13px; outline: 0; background: #fff; color: #1a355c; box-shadow: 0 5px 12px rgba(35,66,104,.05); font-size: 15px; direction: rtl; text-align: right; transition: border-color .18s ease, box-shadow .18s ease; }
.pilot-input-shell input::placeholder { color: #a4afbd; }
.pilot-input-shell input:focus { border-color: rgba(44,105,232,.65); box-shadow: 0 0 0 4px rgba(44,105,232,.10), 0 5px 12px rgba(35,66,104,.05); }
.pilot-field-icon { position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 24px; height: 24px; display: grid; place-items: center; color: #8d98a6; font-size: 24px; pointer-events: none; }
.pilot-password-shell input { padding-inline-start: 58px; }
.pilot-password-toggle { position: absolute; left: 14px; top: 50%; translate: 0 -50%; }
.pilot-icon-button { width: 38px; height: 38px; border: 0; border-radius: 10px; padding: 0; display: grid; place-items: center; background: transparent; color: #8c98a8; font-size: 22px; }
.pilot-icon-button:hover { background: #f3f6fa; }
.pilot-icon-button:focus-visible { outline: 3px solid rgba(44,105,232,.18); }
.pilot-password-toggle .pilot-eye-closed { display: none; }
.pilot-password-toggle[aria-pressed="true"] .pilot-eye-open { display: none; }
.pilot-password-toggle[aria-pressed="true"] .pilot-eye-closed { display: block; }
.pilot-login-status { min-height: 22px; margin: 12px 5px 4px; color: var(--login-muted); font-size: 12px; line-height: 1.8; }
.pilot-login-status.is-error { color: #d93c3c; }
.pilot-login-status.is-loading { color: var(--login-blue); }
.pilot-login-status.is-ok { color: #128a61; }
.pilot-login-submit { width: 100%; min-height: 74px; margin-top: 9px; border: 0; border-radius: 12px; background: linear-gradient(100deg,var(--login-blue),var(--login-blue-2)); box-shadow: 0 10px 24px rgba(36,105,232,.20); color: #fff; font-size: 18px; font-weight: 800; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.pilot-login-submit:hover { filter: brightness(1.02); box-shadow: 0 13px 28px rgba(36,105,232,.27); transform: translateY(-1px); }
.pilot-login-submit:disabled { cursor: wait; opacity: .72; transform: none; }
.pilot-login-arrow { grid-column: 3; grid-row: 1; justify-self: center; align-self: center; font-size: 27px; font-weight: 400; line-height: 1; }
.pilot-login-submit span:last-child { grid-column: 2; grid-row: 1; justify-self: center; align-self: center; line-height: 1.4; }
.pilot-auth-meta { margin-top: auto; padding-top: 44px; border-top: 1px solid var(--login-line); display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 28px; text-align: center; }
.pilot-meta-item { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pilot-meta-label { color: #8a95a4; font-size: 14px; font-weight: 600; }
.pilot-meta-value { color: #4c5c72; font-size: 17px; font-weight: 700; }
.pilot-support-number { direction: ltr; unicode-bidi: isolate; }
.pilot-meta-divider { width: 1px; height: 58px; background: var(--login-line); }
#pilotNetworkBadge { color: #128a61; }
#pilotNetworkBadge.is-offline { color: #d93c3c; }
@media (max-width: 1180px) {
  .pilot-login { grid-template-columns: minmax(0,54%) minmax(390px,46%); }
  .pilot-login-panel { padding-inline: 24px; }
  .pilot-login-card { padding-inline: 38px; }
}
@media (max-width: 960px) {
  .pilot-login { display: block; }
  .pilot-login-showcase, .pilot-login-panel { min-height: auto; }
  .pilot-login-showcase { padding: 16px 16px 4px; }
  .pilot-showcase-image { height: auto; max-height: 360px; }
  .pilot-login-panel { padding: 14px 16px 40px; }
  .pilot-login-card { width: min(100%,680px); min-height: auto; padding: 34px 24px 30px; margin-inline: auto; }
  .pilot-welcome-copy { margin-top: 40px; }
  .pilot-auth-meta { margin-top: 50px; }
}
@media (max-width: 560px) {
  .pilot-login-card { border-radius: 18px; }
  .pilot-login-showcase { padding-top: 10px; }
  .pilot-showcase-image { max-height: 240px; }
  .pilot-brand-block { gap: 12px; }
  .pilot-tec-badge { min-width: 85px; height: 64px; font-size: 39px; }
  .pilot-brand-text strong { font-size: 24px; }
  .pilot-brand-text span { font-size: 14px; }
  .pilot-input-shell { height: 62px; }
  .pilot-login-submit { min-height: 66px; font-size: 16px; }
  .pilot-auth-meta { gap: 16px; }
  .pilot-meta-value { font-size: 15px; }
}
.app-shell { height: 100vh; display: grid; grid-template-columns: 1fr var(--sidebar-w); grid-template-rows: var(--header-h) 1fr; }
.app-header { grid-column: 1 / 3; grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 22px 0 18px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 2px 14px rgba(30,70,66,.05); z-index: 20; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 800; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.demo-pill { padding: 7px 11px; background: #fff3dc; color: #9b6714; border: 1px solid #f5ddb3; border-radius: 999px; font-size: 11px; font-weight: 700; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.user-chip .avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: white; font-weight: 800; }
.user-chip div { display: flex; flex-direction: column; }
.user-chip strong { font-size: 12px; }
.user-chip small { font-size: 10px; color: var(--muted); }
.logout-btn { min-width: 82px; height: 42px; border: 1px solid #e4d7d7; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; background: linear-gradient(180deg,#fff,#fff8f8); color: #9b4545; font-size: 12px; font-weight: 800; line-height: 1; box-shadow: 0 5px 14px rgba(139,65,65,.07); }
.logout-btn svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.logout-btn:hover { border-color: #dfb9b9; background: linear-gradient(180deg,#fff8f8,#fff1f1); color: var(--red); box-shadow: 0 8px 18px rgba(220,90,90,.13); transform: translateY(-1px); }
.logout-btn:focus-visible { outline: 3px solid rgba(220,90,90,.18); outline-offset: 2px; }
.right-sidebar { grid-column: 2; grid-row: 2; background: #173d3a; padding: 12px 8px; display: flex; flex-direction: column; gap: 7px; z-index: 15; }
.nav-item { border: 0; color: #bed0cd; background: transparent; border-radius: 13px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 100%; }
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item label { font-size: 9.5px; cursor: pointer; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #fff; color: var(--primary); box-shadow: 0 8px 22px rgba(0,0,0,.15); }
.sidebar-spacer { flex: 1; }
.main-area { grid-column: 1; grid-row: 2; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.page-view { height: 100%; }
.workspace-page { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 9px; }
.workspace-topline { min-height: 33px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.breadcrumb { display: flex; gap: 7px; align-items: center; font-size: 12px; }
.breadcrumb button { border: 0; background: transparent; color: var(--primary); }
.workspace-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10.5px; }
.save-status { color: var(--primary); font-weight: 700; }
.save-status.dirty { color: var(--orange); }
.kpi-strip { display: grid; grid-template-columns: repeat(6,minmax(120px,1fr)); gap: 8px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 17px; }
.kpi-card strong { display: block; font-size: 17px; line-height: 1.1; }
.kpi-card small { color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.workspace-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; gap: 9px; direction: ltr; }
.left-dock, .central-workspace { direction: rtl; }
.left-dock { display: grid; grid-template-rows: minmax(210px, .8fr) minmax(280px, 1.2fr); gap: 9px; min-height: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgba(37,76,71,.05); min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.panel-head { padding: 11px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { margin: 0; font-size: 13px; }
.panel-head small { color: var(--muted); font-size: 9.5px; }
.panel-collapse { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; color: var(--muted); }
.panel-body { min-height: 0; overflow: auto; }
.details-body { padding: 12px; }
.empty-details { height: 100%; min-height: 150px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11px; }
.empty-details .big { font-size: 34px; opacity: .45; display: block; margin-bottom: 8px; }
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / 3; }
.field label { font-size: 9px; color: var(--muted); }
.field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px; background: var(--surface-2); color: var(--text); font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 700; }
.status-badge.ok { background:#e3f5ea;color:#257446; }.status-badge.warn{background:#fff1dc;color:#a96612}.status-badge.bad{background:#ffe3e3;color:#a73b3b}.status-badge.neutral{background:#eef2f1;color:#60716f}
.inventory-tabs { display: flex; padding: 8px 9px 0; gap: 4px; }
.inventory-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 6px; font-size: 10px; color: var(--muted); }
.inventory-tabs button.active { color: var(--primary); border-color: var(--primary); font-weight: 700; }
.search-row { margin: 8px 9px; position: relative; }
.search-row input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 8px 31px; background: var(--surface-2); font-size: 10px; }
.search-row button { position: absolute; left: 6px; top: 5px; border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.quick-filters { padding: 0 9px 7px; display: flex; gap: 5px; overflow-x: auto; }
.quick-filters button { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 8px; font-size: 8.5px; color: var(--muted); }
.quick-filters button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.inventory-list { border-top: 1px solid var(--line); }
.inventory-item { padding: 9px 10px; border-bottom: 1px solid #edf3f1; display: grid; grid-template-columns: 1fr auto; gap: 6px; cursor: pointer; position: relative; }
.inventory-item:hover { background: #f7fbfa; }
.inventory-item.selected { background: var(--primary-soft); box-shadow: inset -3px 0 var(--primary); }
.inventory-item.dragging { opacity: .45; }
.inventory-item h4 { margin: 0; font-size: 10.5px; }
.inventory-item .meta { display: flex; flex-wrap: wrap; gap: 5px 9px; color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.inventory-item .loc { text-align: left; font-size: 8.5px; color: var(--muted); }
.inventory-item .loc strong { display:block;color:var(--text);font-size:9px; }
.central-workspace { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.toolbar { min-height: 57px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: #fbfdfd; overflow-x: auto; }
.tool-group { display: flex; gap: 3px; }
.tool-btn { min-width: 48px; height: 41px; border: 1px solid transparent; background: transparent; border-radius: 9px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.tool-btn span { font-size: 16px; line-height: 1; }.tool-btn label { font-size: 8px; cursor:pointer; }
.tool-btn:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.tool-btn.active { background: var(--primary-soft); border-color: #b9e0d9; color: var(--primary); }
.tool-group.compact .tool-btn { min-width: 34px; width: 34px; }
.tool-btn.danger:hover { color: var(--red); border-color:#f0c7c7;background:#fff6f6; }
.tool-separator { width: 1px; height: 29px; background: var(--line); flex: 0 0 auto; }
.view-switcher { display:flex;border:1px solid var(--line);border-radius:10px;padding:2px;background:#f2f7f6; }
.view-switcher button { border:0;background:transparent;border-radius:7px;padding:6px 9px;font-size:9px;color:var(--muted); }
.view-switcher button.active { background:#fff;color:var(--primary);box-shadow:0 2px 7px rgba(31,76,71,.11);font-weight:700; }
.toolbar-spacer { flex: 1; }
.level-switcher, .snap-control { display:flex;align-items:center;gap:5px;color:var(--muted);font-size:8.5px;white-space:nowrap; }
.level-switcher select,.snap-control select { border:1px solid var(--line);border-radius:8px;background:#fff;padding:5px 7px;color:var(--text);font-size:9px; }
.primary-btn { border:0;border-radius:10px;background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;padding:8px 13px;font-weight:700;font-size:10px;box-shadow:0 7px 15px rgba(10,128,120,.18);white-space:nowrap; }
.primary-btn:hover { filter:brightness(.98);transform:translateY(-1px); }
.workspace-canvas-wrap { flex:1;min-height:0;position:relative;background:#f5f9f8;overflow:hidden;direction:ltr; }
#layoutCanvas,#babylonCanvas,#isoCanvas { width:100%;height:100%;display:block;touch-action:none; }
.babylon-host { position:absolute;inset:0;background:#f1f6f5; }
.babylon-host.split { left:50%;border-left:2px solid var(--line-strong); }
.workspace-canvas-wrap.split-mode #layoutCanvas { width:50%; }
.iso-fallback { position:absolute;inset:0; }
.three-status { position:absolute;top:12px;left:12px;padding:6px 9px;background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:9px;font-size:9px;color:var(--muted); }
.canvas-notice { position:absolute;top:10px;right:10px;z-index:6;background:rgba(255,255,255,.94);border:1px solid var(--line);box-shadow:0 5px 15px rgba(28,69,65,.09);border-radius:10px;padding:7px 10px;font-size:9px;color:var(--muted);pointer-events:none; }
.canvas-controls { position:absolute;left:11px;bottom:12px;display:flex;align-items:center;gap:3px;background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:10px;padding:4px;box-shadow:0 5px 16px rgba(30,70,66,.1);z-index:10;direction:ltr; }
.canvas-controls button { width:28px;height:28px;border:0;background:transparent;border-radius:7px;color:var(--text);font-size:15px; }.canvas-controls button:hover{background:var(--primary-soft);color:var(--primary)}
.canvas-controls span { font-size:8px;color:var(--muted);padding:0 5px;min-width:40px;text-align:center; }
.canvas-legend { position:absolute;right:11px;bottom:12px;display:flex;gap:10px;background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:10px;padding:7px 10px;font-size:8px;color:var(--muted);z-index:10;direction:rtl; }
.canvas-legend span { display:flex;align-items:center;gap:4px; }.state { width:9px;height:9px;border-radius:3px;display:inline-block; }.state.empty{background:#fff;border:1px solid #aac1bd}.state.occupied{background:#33a995}.state.warning{background:#e3bc46}.state.expired{background:#db5d5d}.state.blocked{background:#82918f}
.factory-overview { padding:18px;overflow:auto; }
.page-heading { display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:12px; }.page-heading h2{margin:0;font-size:20px}.page-heading p{margin:4px 0;color:var(--muted);font-size:11px}.legend{display:flex;gap:13px;font-size:9px;color:var(--muted)}.dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-left:4px}.dot.raw{background:#3588dd}.dot.finished{background:#d52c91}.dot.packaging{background:#4dad37}
.factory-map-card { max-width:1040px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:var(--shadow); }
.factory-map { position:relative;aspect-ratio:1/1;overflow:hidden;border-radius:12px;background:#f9fbfb;touch-action:none;user-select:none; }.factory-map img{width:100%;height:100%;object-fit:fill;display:block;pointer-events:none}.map-hotspots{position:absolute;inset:0;width:100%;height:100%}.warehouse-hotspot{stroke-width:8;cursor:pointer;transition:.2s;fill-opacity:.25}.warehouse-hotspot:hover{fill-opacity:.5;filter:drop-shadow(0 0 9px rgba(10,128,120,.35))}.warehouse-hotspot.raw{fill:#2783dc;stroke:#2783dc}.warehouse-hotspot.finished{fill:#d4258c;stroke:#d4258c}.warehouse-hotspot.packaging{fill:#56ad35;stroke:#56ad35}.map-instruction{position:absolute;top:12px;right:12px;background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:10px;padding:8px 11px;font-size:10px;color:var(--muted)}
.generic-page { display:grid;place-items:center;padding:30px; }.generic-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:40px;text-align:center;box-shadow:var(--shadow);max-width:470px}.generic-icon{font-size:48px;color:var(--primary)}.generic-card h2{margin:8px 0}.generic-card p{color:var(--muted);font-size:11px}
.modal-backdrop { position:fixed;inset:0;background:rgba(21,49,47,.35);backdrop-filter:blur(4px);z-index:100;display:grid;place-items:center;padding:20px; }.modal-card{background:#fff;border:1px solid var(--line);border-radius:21px;padding:28px;text-align:center;max-width:410px;box-shadow:0 28px 70px rgba(20,55,52,.25)}.modal-icon{width:60px;height:60px;border-radius:18px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:30px;margin:0 auto 12px}.modal-card h3{margin:0 0 8px}.modal-card p{color:var(--muted);font-size:11px;line-height:2}.modal-actions{margin-top:16px}
.toast-container { position:fixed;left:18px;top:92px;z-index:200;display:flex;flex-direction:column;gap:7px; }.toast{background:#fff;border:1px solid var(--line);border-right:4px solid var(--primary);box-shadow:var(--shadow);border-radius:11px;padding:9px 12px;min-width:240px;font-size:10px;animation:toastIn .25s ease}.toast.error{border-right-color:var(--red)}.toast.warn{border-right-color:var(--orange)}@keyframes toastIn{from{opacity:0;transform:translateX(-15px)}to{opacity:1;transform:none}}
@media (max-width:1200px){:root{--sidebar-w:72px}.workspace-layout{grid-template-columns:285px 1fr}.kpi-strip{grid-template-columns:repeat(3,1fr)}.brand-text{display:none}.tool-btn label{display:none}.tool-btn{min-width:35px;width:35px}}
@media (max-width:900px){body{overflow:auto}.app-shell{min-height:100vh;height:auto;grid-template-columns:1fr;grid-template-rows:70px 1fr 65px}.app-header{grid-column:1;grid-row:1}.right-sidebar{position:fixed;bottom:0;left:0;right:0;height:64px;grid-column:1;grid-row:auto;flex-direction:row;padding:5px;z-index:50}.nav-item{min-height:52px}.nav-item label{font-size:8px}.sidebar-spacer{display:none}.main-area{grid-column:1;grid-row:2;height:calc(100vh - 134px)}.workspace-layout{grid-template-columns:1fr}.left-dock{display:none}.workspace-meta{display:none}.kpi-strip{display:none}.user-chip div,.demo-pill{display:none}.logout-btn{min-width:42px;width:42px;padding:0}.logout-btn span{display:none}}

/* v0.2 overrides and additional components */
body { font-family: Vazirmatn, Tahoma, Arial, sans-serif; }
.workspace-meta { gap: 11px; }
.inline-setting { border: 1px solid var(--line); background: #fff; color: var(--primary); border-radius: 9px; padding: 5px 9px; font-size: 9px; font-weight: 700; }
.inline-setting:hover { background: var(--primary-soft); }
.workspace-layout { grid-template-columns: 345px 1fr; }
.left-dock { grid-template-rows: minmax(255px, .95fr) minmax(300px, 1.05fr); }
.inventory-tabs { gap: 1px; }
.inventory-tabs button { padding: 7px 2px; font-size: 9px; }
.multi-selection-info { margin: 0 9px 8px; padding: 7px 9px; border-radius: 9px; border: 1px dashed #92c8bf; background: var(--primary-soft); color: var(--primary); font-size: 9px; line-height: 1.7; }
.inventory-item { grid-template-columns: 18px 1fr auto; align-items: start; }
.selection-check { width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; color: white; font-size: 9px; margin-top: 1px; }
.inventory-item.multi-selected .selection-check { background: var(--primary); border-color: var(--primary); }
.inventory-item.multi-selected { background: #eff9f7; }
.inventory-item .meta { max-width: 210px; }
.inventory-item .loc { min-width: 86px; }
.tool-btn.aisle-tool span { color: #d95454; }
.state.aisle { background: rgba(237,104,104,.25); border: 1px dashed #d95353; }

.form-modal { width: min(520px, 94vw); max-width: 520px; text-align: right; padding: 22px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 15px; }
.modal-head h3 { margin: 0 0 3px; font-size: 15px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 10px; }
.modal-x { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; font-size: 20px; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-form-grid label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 10px; }
.modal-form-grid label.full { grid-column: 1 / 3; }
.modal-form-grid input, .modal-form-grid textarea, .modal-form-grid select { width: 100%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 9px 10px; resize: vertical; }
.check-row { display: flex; align-items: center; gap: 7px; margin-top: 13px; color: var(--text); font-size: 10px; }
.secondary-btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; padding: 8px 13px; font-size: 10px; }
.danger-primary { background: linear-gradient(135deg,#bd4949,#dc6666); }

.details-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.details-actions button { flex: 1; min-width: 120px; }
.row-summary-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.row-summary-head strong { font-size: 11px; }
.row-summary-head span { color: var(--muted); font-size: 9px; }
.row-adjuster { border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); padding: 9px; margin: 10px 0; }
.row-adjuster-head { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: var(--muted); margin-bottom: 7px; }
.row-adjuster-controls { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; }
.row-adjuster-controls select, .row-adjuster-controls button { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px 8px; font-size: 9px; }
.row-adjuster-controls button { color: var(--primary); font-weight: 700; min-width: 36px; }
.level-summaries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 9px; }
.level-summary { border: 1px solid var(--line); border-radius: 9px; padding: 7px 4px; background: #fff; text-align: center; }
.level-summary strong { display: block; font-size: 12px; }
.level-summary small { color: var(--muted); font-size: 7.5px; }
.slot-matrix { direction: ltr; display: grid; gap: 4px; overflow-x: auto; padding-bottom: 5px; }
.slot-matrix-row { display: grid; grid-template-columns: 34px repeat(var(--slots), minmax(25px,1fr)); gap: 3px; align-items: center; min-width: max-content; }
.slot-level-label { direction: rtl; color: var(--muted); font-size: 8px; text-align: right; }
.slot-cell { width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; display: grid; place-items: center; font-size: 7px; color: var(--muted); cursor: pointer; }
.slot-cell.occupied { color: #fff; border-color: transparent; }
.slot-cell.ibc::after { content: 'I'; font-weight: 800; }
.slot-cell.drum::after { content: 'D'; font-weight: 800; }
.rect-kind-switch { display: flex; gap: 6px; }
.rect-kind-switch button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px; font-size: 9px; }
.rect-kind-switch button.active { background: var(--primary-soft); color: var(--primary); border-color: #aad8d0; }

#layoutCanvas { cursor: crosshair; }
.canvas-notice { max-width: 360px; }
.babylon-host.split { left: 50%; }
.workspace-canvas-wrap.split-mode #layoutCanvas { width: 50%; }
.three-status { direction: rtl; }

@media(max-width:1350px){.workspace-layout{grid-template-columns:315px 1fr}.toolbar{gap:4px}.tool-btn{min-width:43px}.workspace-meta span:nth-of-type(2){display:none}}
@media(max-width:1100px){.workspace-layout{grid-template-columns:280px 1fr}.level-summaries{grid-template-columns:repeat(2,1fr)}.toolbar-spacer{display:none}.workspace-meta{display:none}}


/* v0.3 — editable factory warehouse map and developer settings */
.factory-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.active-warehouse-chip { display:inline-flex; align-items:center; min-height:34px; padding:7px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--primary); font-size:10px; font-weight:700; }
.map-add-btn { min-height:34px; padding-inline:14px; }
.map-add-btn.active { background:#a34747; box-shadow:0 0 0 3px rgba(163,71,71,.13); }
.factory-map.adding-warehouse { cursor:crosshair; }
.factory-map.adding-warehouse .map-hotspots { cursor:crosshair; }
.warehouse-region { cursor:pointer; }
.warehouse-region .warehouse-shape { fill:rgba(255,255,255,.68); stroke:#536663; stroke-width:5; stroke-dasharray:14 9; vector-effect:non-scaling-stroke; transition:.18s ease; }
.warehouse-region:hover .warehouse-shape { fill:rgba(26,139,124,.12); stroke:var(--primary); stroke-width:7; }
.warehouse-region.active .warehouse-shape { fill:rgba(26,139,124,.18); stroke:var(--primary); stroke-width:8; stroke-dasharray:none; }
.warehouse-region.empty-workspace .warehouse-shape { fill:rgba(255,255,255,.54); }
.warehouse-region .warehouse-title { fill:#223b38; font-family:Vazirmatn,Tahoma,Arial,sans-serif; font-size:30px; font-weight:800; paint-order:stroke; stroke:rgba(255,255,255,.95); stroke-width:7px; stroke-linejoin:round; pointer-events:none; }
.warehouse-region .warehouse-status-text { fill:#536663; font-family:Vazirmatn,Tahoma,Arial,sans-serif; font-size:16px; font-weight:600; paint-order:stroke; stroke:rgba(255,255,255,.95); stroke-width:5px; pointer-events:none; }
.warehouse-region.active .warehouse-status-text { fill:var(--primary); }
.warehouse-editor-modal { max-width:600px; }
.warehouse-workspace-status { margin-top:14px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); padding:10px 12px; font-size:10px; color:var(--muted); line-height:1.9; }
.warehouse-workspace-status strong { color:var(--text); }
.warehouse-editor-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.modal-action-spacer { flex:1; }
.warehouse-delete-btn { color:#b34848; border-color:#e5baba; }
.warehouse-delete-btn.hidden { display:none; }
.settings-content { width:min(680px,100%); text-align:right; }
.settings-content > h2 { margin:0 0 6px; }
.settings-content > p { margin:0 0 18px; color:var(--muted); }
.developer-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface-2); padding:16px; text-align:right; }
.developer-avatar { width:54px; height:54px; display:grid; place-items:center; border-radius:16px; background:var(--primary-soft); color:var(--primary); font-size:20px; font-weight:800; }
.developer-info strong { display:block; font-size:14px; margin-bottom:3px; }
.developer-info span { display:block; color:var(--muted); font-size:10px; }
.developer-link { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:8px 12px; border-radius:10px; background:#0a66c2; color:#fff; text-decoration:none; font-size:10px; font-weight:700; white-space:nowrap; }
.developer-link:hover { filter:brightness(.95); }
.settings-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.settings-meta div { border:1px solid var(--line); border-radius:11px; background:#fff; padding:10px 12px; }
.settings-meta small { display:block; color:var(--muted); margin-bottom:3px; }
.settings-meta strong { font-size:11px; }
@media(max-width:700px){.page-heading{align-items:flex-start;gap:12px;flex-direction:column}.developer-card{grid-template-columns:auto 1fr}.developer-link{grid-column:1/3}.settings-meta{grid-template-columns:1fr}.warehouse-editor-actions .modal-action-spacer{display:none}}

/* Readable typography controls — isolated from warehouse data and layout state. */
.generic-page:has(.typography-settings-page) { display:block; overflow:auto; padding:22px; }
.generic-card.settings-card { width:min(900px,100%); max-width:900px; margin:0 auto; padding:24px; text-align:right; }
.typography-settings-page { width:100%; }
.typography-settings-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.typography-settings-heading h2 { margin:0 0 5px; }
.typography-settings-heading p { margin:0; color:var(--muted); line-height:1.8; }
.typography-settings-section { margin-bottom:14px; border:1px solid var(--line); border-radius:16px; background:#fff; overflow:hidden; }
.typography-section-head { display:flex; align-items:center; gap:11px; padding:14px 16px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.typography-section-head > span { flex:0 0 38px; width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:var(--primary-soft); color:var(--primary); font-size:17px; font-weight:900; }
.typography-section-head h3 { margin:0 0 3px; font-size:13px; }
.typography-section-head p { margin:0; color:var(--muted); font-size:9px; line-height:1.7; }
.typography-setting-row { display:grid; grid-template-columns:minmax(230px,1fr) minmax(280px,1.1fr); align-items:center; gap:22px; padding:13px 16px; border-bottom:1px solid #edf3f1; }
.typography-setting-row:last-child { border-bottom:0; }
.typography-setting-row.is-global { background:#fbfefd; }
.typography-setting-copy strong { display:block; margin-bottom:3px; font-size:11px; }
.typography-setting-copy span { display:block; color:var(--muted); font-size:8.5px; line-height:1.7; }
.typography-setting-copy small { display:inline-block; margin-top:5px; color:var(--primary); font-size:8px; font-weight:800; }
.typography-setting-control { display:grid; grid-template-columns:minmax(130px,1fr) 128px; align-items:center; gap:12px; direction:ltr; }
.typography-setting-control > input[type="range"] { width:100%; accent-color:var(--primary); cursor:pointer; }
.typography-setting-control > div { display:grid; grid-template-columns:62px 1fr; align-items:center; gap:7px; }
.typography-setting-control input[type="number"] { width:62px; min-height:34px; padding:5px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--text); text-align:center; direction:ltr; }
.typography-setting-control output { color:var(--primary); font-size:9px; font-weight:800; text-align:right; direction:rtl; white-space:nowrap; }
.typography-settings-note { display:flex; align-items:center; gap:10px; margin-bottom:14px; padding:12px 14px; border:1px solid #b8d9d3; border-radius:13px; background:var(--primary-soft); }
.typography-settings-note > span { flex:0 0 30px; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:var(--primary); color:#fff; font-weight:900; }
.typography-settings-note strong { display:block; margin-bottom:2px; color:var(--primary); font-size:10px; }
.typography-settings-note p { margin:0; color:#47736d; font-size:8.5px; line-height:1.7; }
.right-sidebar .nav-item { min-height:68px; }
.right-sidebar .nav-item label { line-height:1.35; text-align:center; white-space:normal; }
@media(max-width:700px){.generic-page:has(.typography-settings-page){padding:10px}.generic-card.settings-card{padding:15px}.typography-settings-heading{align-items:stretch;flex-direction:column}.typography-setting-row{grid-template-columns:1fr;gap:10px}.typography-setting-control{grid-template-columns:1fr 118px}.typography-section-head{align-items:flex-start}.right-sidebar .nav-item{min-height:52px}}


/* v0.4 — factory map editor, custom background, drag and resize */
.factory-map-card { max-width:1120px; }
.factory-map-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:0 4px 10px; color:var(--muted); font-size:10px; }
.factory-map-meta span:first-child { color:var(--text); font-weight:700; }
.map-image-btn { min-height:34px; padding-inline:12px; white-space:nowrap; }
.warehouse-region { cursor:grab; touch-action:none; }
.warehouse-region:active { cursor:grabbing; }
.warehouse-region.selected .warehouse-shape { fill:rgba(26,139,124,.22); stroke:#0b6f63; stroke-width:9; stroke-dasharray:18 8; }
.warehouse-region .warehouse-code-text { fill:#38504d; font-family:Vazirmatn,Tahoma,Arial,sans-serif; font-size:14px; font-weight:700; paint-order:stroke; stroke:rgba(255,255,255,.95); stroke-width:4px; pointer-events:none; }
.warehouse-resize-handle { fill:#fff; stroke:#0b6f63; stroke-width:5; vector-effect:non-scaling-stroke; cursor:nwse-resize; }
.warehouse-region:not(.selected) .warehouse-resize-handle { display:none; }
.factory-selection-toolbar { position:absolute; left:12px; bottom:12px; z-index:6; display:flex; align-items:center; gap:7px; flex-wrap:wrap; max-width:calc(100% - 24px); border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.96); padding:8px 10px; box-shadow:0 10px 24px rgba(25,49,46,.13); backdrop-filter:blur(6px); }
.factory-selection-toolbar.hidden { display:none; }
.factory-selection-toolbar strong { margin-inline-end:4px; font-size:11px; }
.factory-selection-toolbar button { min-height:31px; padding:6px 9px; font-size:9px; }
.factory-map.dragging-warehouse .map-instruction { opacity:.25; }
.factory-map.adding-warehouse .warehouse-region { pointer-events:none; opacity:.75; }
.warehouse-editor-modal textarea { resize:vertical; }
@media(max-width:800px){.factory-actions{width:100%}.factory-actions button{flex:1}.active-warehouse-chip{width:100%;justify-content:center}.factory-map-meta{align-items:flex-start;flex-direction:column}.factory-selection-toolbar{right:8px;left:8px;bottom:8px}.factory-selection-toolbar button{flex:1}.warehouse-region .warehouse-title{font-size:24px}.warehouse-region .warehouse-status-text{font-size:14px}}

/* v0.7 — tank module, reusable 3D asset library and parametric generator */
.tank-tool span,.asset-tool span{font-size:17px}.asset-tool{border-color:#c9c3eb}.asset-tool:hover{background:#f1effd}.dependency-badge{display:inline-flex;align-items:center;min-height:34px;padding:7px 11px;border:1px solid #b7d9d2;border-radius:10px;background:#eef9f6;color:#096f63;font-size:9px;font-weight:800}.asset-library-page{padding:18px 22px;overflow:auto}.library-heading{align-items:flex-start}.library-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.library-shell{display:grid;grid-template-columns:230px minmax(0,1fr);gap:14px;min-height:calc(100vh - 175px)}.library-sidebar,.library-content{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 9px 24px rgba(28,53,49,.06)}.library-sidebar{padding:13px}.library-content{padding:14px;overflow:hidden}.library-status-card{border:1px solid #c6ded9;background:var(--primary-soft);border-radius:12px;padding:11px;display:flex;flex-direction:column;gap:4px;margin-bottom:10px}.library-status-card strong{font-size:11px}.library-status-card span{font-size:9px;color:var(--primary);font-weight:700}.library-status-card small{font-size:8px;color:var(--muted);line-height:1.7}.library-search input{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:9px;font-size:9px}.asset-category-filters{display:flex;flex-direction:column;gap:5px;margin-top:10px}.asset-category-filters button{border:1px solid transparent;border-radius:9px;background:transparent;text-align:right;padding:7px 9px;font-size:9px;color:var(--muted)}.asset-category-filters button:hover,.asset-category-filters button.active{border-color:#b9d9d3;background:var(--primary-soft);color:var(--primary);font-weight:700}.library-metrics{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:12px}.library-metric{border:1px solid var(--line);border-radius:9px;background:#fff;padding:7px;text-align:center}.library-metric strong{display:block;font-size:13px}.library-metric small{font-size:7.5px;color:var(--muted)}.library-toolbar-row{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}.library-toolbar-row strong{font-size:13px}.library-view-note{font-size:8px;color:var(--muted)}.asset-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:11px;overflow:auto;max-height:calc(100vh - 235px);padding:2px}.asset-card{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;transition:.18s ease}.asset-card:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(22,60,54,.10);border-color:#b1d3cd}.asset-card-preview{height:122px;position:relative;display:grid;place-items:center;background:linear-gradient(145deg,#edf5f3,#f9fbfb);overflow:hidden}.asset-card-preview canvas{width:100%;height:100%}.asset-source-badge{position:absolute;top:8px;right:8px;border-radius:8px;background:rgba(255,255,255,.92);padding:4px 6px;font-size:7px;font-weight:800;color:var(--primary)}.asset-card-body{padding:10px}.asset-card-body h4{margin:0 0 4px;font-size:11px}.asset-card-body p{margin:0;color:var(--muted);font-size:8px;line-height:1.6;min-height:26px}.asset-card-meta{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.asset-card-meta span{border:1px solid var(--line);border-radius:7px;padding:3px 5px;font-size:7px;color:var(--muted)}.asset-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.asset-card-actions button{border:1px solid var(--line);border-radius:8px;background:#fff;padding:6px;font-size:8px}.asset-card-actions .place-asset{background:var(--primary);color:#fff;border-color:var(--primary)}.empty-library{grid-column:1/-1;min-height:260px;display:grid;place-items:center;text-align:center;color:var(--muted);border:1px dashed var(--line-strong);border-radius:14px}.generation-mode-tabs{display:flex;gap:5px;margin-bottom:12px}.generation-mode-tabs button{flex:1;border:1px solid var(--line);background:#fff;border-radius:9px;padding:7px;font-size:9px}.generation-mode-tabs button.active{background:var(--primary-soft);color:var(--primary);border-color:#9fd2c8;font-weight:800}.generation-notice{margin-top:11px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:9px;font-size:9px;color:var(--muted);line-height:1.7}.generation-notice.warn{border-color:#eccb92;background:#fff8ea;color:#91611a}.asset-preview-modal{width:min(850px,94vw)}#assetPreviewCanvas{width:100%;height:360px;border:1px solid var(--line);border-radius:13px;background:linear-gradient(#edf4f2,#fafcfc)}.asset-preview-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px}.asset-preview-meta div{border:1px solid var(--line);border-radius:9px;padding:8px;background:var(--surface-2)}.asset-preview-meta small{display:block;color:var(--muted);font-size:7px}.asset-preview-meta strong{font-size:10px}.warehouse-points-info{border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:9px;font-size:8px;color:var(--muted);line-height:1.8}.warehouse-corner-handle{fill:#fff;stroke:#0b6f63;stroke-width:5;vector-effect:non-scaling-stroke;cursor:move}.warehouse-region:not(.selected) .warehouse-corner-handle{display:none}.warehouse-region.locked .warehouse-shape{stroke:#8a7c45}.warehouse-lock-mark{fill:#725f1d;font-size:24px;pointer-events:none}.warehouse-region.invalid .warehouse-shape{fill:rgba(214,70,70,.24);stroke:#c73c3c}.tank-kpi .kpi-icon{color:#247e91}.asset-kpi .kpi-icon{color:#6b61aa}.tank-property-card,.asset-instance-card{border:1px solid var(--line);border-radius:11px;background:var(--surface-2);padding:9px;margin-bottom:9px}.fill-meter{height:9px;border-radius:999px;background:#dbe6e3;overflow:hidden;margin:7px 0}.fill-meter i{display:block;height:100%;background:linear-gradient(90deg,#33a995,#0e7469);border-radius:inherit}.details-section-title{font-size:9px;font-weight:800;color:var(--primary);margin:10px 0 6px}.asset-footprint-note{font-size:8px;color:var(--muted);line-height:1.7}.canvas-legend .state.tank{background:#39a69a;border-radius:50%}.canvas-legend .state.asset{background:#6f67aa}.generator-job{border:1px solid var(--line);border-radius:9px;padding:8px;margin-top:7px;background:#fff;font-size:8px}.generator-job strong{display:block;font-size:9px}.generator-job span{color:var(--muted)}
@media(max-width:1050px){.library-shell{grid-template-columns:1fr}.library-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:10px}.asset-category-filters{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr)}.library-metrics{margin:0}.asset-preview-meta{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.library-actions{width:100%}.library-actions button{flex:1}.library-sidebar{display:block}.asset-category-filters{display:grid;grid-template-columns:repeat(2,1fr)}.asset-library-grid{grid-template-columns:1fr}.asset-preview-meta{grid-template-columns:1fr 1fr}}

/* v0.9 — reliable GLB runtime, UTF-8 backend and safe AI fallback */
.dependency-badge.warn{border-color:#e7c58e;background:#fff8e9;color:#8a5a13}
.dependency-badge.verified{border-color:#9ed4ca;background:#eaf8f5;color:#087568}.dependency-badge.error{border-color:#e7b2b2;background:#fff1f1;color:#a23a3a}
.generation-notice.error{border-color:#e7b2b2;background:#fff1f1;color:#a23a3a}
.actual-asset-preview{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:8px;background:linear-gradient(145deg,#edf5f3,#f9fbfb)}
.asset-preview-stage{position:relative;width:100%;height:360px;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:linear-gradient(#edf4f2,#fafcfc)}
.asset-preview-stage #assetPreviewCanvas{position:absolute;inset:0;border:0;border-radius:0}
.asset-preview-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:12px;background:linear-gradient(#edf4f2,#fafcfc)}
.generation-progress{display:flex;align-items:center;gap:10px;margin-top:12px;border:1px solid #b8d9d3;border-radius:11px;background:#eff9f6;padding:10px;color:#176c63}
.generation-progress strong{font-size:10px}.generation-progress small{font-size:8px;color:var(--muted)}
.spinner{width:22px;height:22px;border:3px solid #c5dfda;border-top-color:var(--primary);border-radius:50%;animation:v8spin .8s linear infinite;flex:none}
@keyframes v8spin{to{transform:rotate(360deg)}}
.asset-source-badge{z-index:2}

/* Shared AI settings — one secure connection, separate feature models. */
.shared-ai-settings-section{margin-bottom:14px;border:1px solid #b8d9d3;border-radius:16px;background:#fff;overflow:hidden;transition:box-shadow .25s,border-color .25s}
.shared-ai-settings-section.attention{border-color:var(--primary);box-shadow:0 0 0 4px rgba(26,139,124,.13)}
.shared-ai-section-head>span{background:linear-gradient(145deg,#e8f7f3,#eaeafd);color:#5c55a5}
.shared-ai-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:15px 16px}
.shared-ai-form label{display:flex;flex-direction:column;gap:6px;color:var(--text);font-size:9px;font-weight:800}
.shared-ai-form label.shared-ai-full{grid-column:1/-1}
.shared-ai-form input,.shared-ai-form select{width:100%;min-height:38px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);padding:8px 10px;color:var(--text);font:inherit;font-weight:500}
.shared-ai-settings-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px 15px}
.shared-ai-action-buttons{display:flex;align-items:center;gap:7px;flex:none}.shared-ai-action-buttons button{min-height:36px}
.shared-ai-status{flex:1;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:9px 11px;color:var(--muted);font-size:8.5px;line-height:1.8}
.shared-ai-status.is-ok{border-color:#acd9cf;background:#eff9f6;color:#0b7467}.shared-ai-status.is-warn{border-color:#e7c58e;background:#fff8e9;color:#8a5a13}.shared-ai-status.is-error{border-color:#e7b2b2;background:#fff1f1;color:#a23a3a}

/* AI layout assistant — resizable native-tool panel on the right of the Canvas. */
.workspace-stage{flex:1;min-height:0;min-width:0;display:flex;direction:ltr;overflow:hidden}
.workspace-stage>.workspace-canvas-wrap{flex:1;min-width:0}
.layout-assistant-drawer{--layout-assistant-width:370px;position:relative;flex:0 0 var(--layout-assistant-width);width:var(--layout-assistant-width);min-width:0;height:100%;border-left:1px solid var(--line);background:#fff;direction:rtl;overflow:hidden;display:flex;flex-direction:column;transition:flex-basis .22s ease,width .22s ease}
.layout-assistant-drawer.is-collapsed{flex-basis:46px;width:46px}
.layout-assistant-toggle{width:100%;min-height:48px;border:0;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#f7fbfa,#fff);display:flex;align-items:center;justify-content:space-between;padding:8px 11px;color:var(--text);cursor:pointer;flex:none}
.layout-assistant-toggle:hover{background:#f1f8f6}
.layout-assistant-title{display:flex;align-items:center;gap:8px}.layout-assistant-title i{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;background:linear-gradient(145deg,#dff4ef,#e9e8fb);color:#5d57a9;font-style:normal;font-size:14px}.layout-assistant-title strong{font-size:11px}.layout-assistant-title small{border:1px solid var(--line);border-radius:999px;background:#fff;padding:3px 7px;color:var(--muted);font-size:7.5px}.layout-assistant-title small.is-ready{border-color:#acd9cf;color:#0b7467}.layout-assistant-title small.is-warn{border-color:#e7c58e;color:#8a5a13}
.layout-assistant-title small.is-error{border-color:#e7b2b2;color:#a23a3a}.layout-assistant-chevron{font-size:23px;color:var(--muted);transition:transform .2s}.layout-assistant-drawer:not(.is-collapsed) .layout-assistant-chevron{transform:rotate(180deg)}
.layout-assistant-drawer.is-collapsed .layout-assistant-toggle{height:100%;padding:7px;flex-direction:column;justify-content:center;gap:5px}.layout-assistant-drawer.is-collapsed .layout-assistant-title strong,.layout-assistant-drawer.is-collapsed .layout-assistant-title small{display:none}.layout-assistant-drawer.is-collapsed .layout-assistant-chevron{display:none}
.layout-assistant-resize-handle{position:absolute;z-index:12;top:0;bottom:0;left:-4px;width:8px;cursor:ew-resize;touch-action:none}.layout-assistant-resize-handle:hover,.layout-assistant-resize-handle.is-resizing{background:rgba(98,91,168,.16)}.layout-assistant-drawer.is-collapsed .layout-assistant-resize-handle{display:none}
.layout-assistant-body{flex:1;min-height:0;overflow:auto;padding:10px 11px 12px;background:#fbfdfc;display:flex;flex-direction:column}
.layout-assistant-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.layout-assistant-intro strong{display:block;font-size:10px;margin-bottom:2px}.layout-assistant-intro p{margin:0;color:var(--muted);font-size:8px;line-height:1.6}.layout-assistant-intro button{flex:none;min-height:32px;padding:6px 9px;font-size:8px}
.layout-assistant-conversation{display:flex;flex-direction:column;gap:6px;min-height:110px;flex:1;overflow:auto;padding:2px}.assistant-message{max-width:92%;border-radius:11px;padding:7px 9px;font-size:8.5px;line-height:1.7}.assistant-message.is-assistant{align-self:flex-start;background:#eef7f5;border:1px solid #c7e1dc;color:#315f59}.assistant-message.is-user{align-self:flex-end;background:#625ba8;color:#fff}.assistant-message.is-error{align-self:flex-start;background:#fff1f1;border:1px solid #e7b2b2;color:#a23a3a}
.layout-assistant-proposal{margin-top:7px;border:1px solid #b8d9d3;border-radius:12px;background:#fff;padding:9px}.layout-assistant-proposal h4{margin:0 0 3px;font-size:10px}.layout-assistant-proposal p{margin:0;color:var(--muted);font-size:8px;line-height:1.7}.layout-proposal-metrics{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}.layout-proposal-metrics span{border:1px solid var(--line);border-radius:8px;background:var(--surface-2);padding:4px 7px;font-size:7.5px}.layout-analysis-list{margin:6px 0;padding:0;list-style:none;display:grid;gap:4px}.layout-analysis-list li{font-size:8px;color:#536663}.layout-analysis-list li.is-risk{color:#ad3f3f}.layout-analysis-list li.is-warning{color:#94651a}.layout-proposal-actions{display:flex;justify-content:flex-end;gap:6px}.layout-proposal-actions button{min-height:30px;padding:5px 9px;font-size:8px}
.layout-assistant-quick-prompts{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}.layout-assistant-quick-prompts button,.layout-assistant-modes button{border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);padding:5px 8px;font-size:7.5px;cursor:pointer}.layout-assistant-quick-prompts button:hover,.layout-assistant-modes button.active{border-color:#9fcfc6;background:var(--primary-soft);color:var(--primary)}
.layout-assistant-composer{display:grid;grid-template-columns:minmax(120px,1fr) auto;align-items:end;gap:7px;flex:none}.layout-assistant-modes{display:flex;gap:3px;grid-column:1/-1}.layout-assistant-composer textarea{resize:none;min-height:42px;max-height:90px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:8px 10px;color:var(--text);font-family:inherit;font-size:9px;line-height:1.6}.layout-assistant-composer>.primary-btn{min-height:42px;white-space:nowrap}
.layout-assistant-preview{position:absolute;z-index:4;pointer-events:none;overflow:visible}.layout-assistant-preview .preview-shape{fill:rgba(91,83,171,.14);stroke:#625ba8;stroke-width:2;stroke-dasharray:7 5;vector-effect:non-scaling-stroke}.layout-assistant-preview .preview-shape.is-remove{fill:rgba(210,65,65,.12);stroke:#cf4141}.layout-assistant-preview .preview-marker{fill:#fff;stroke:#625ba8;stroke-width:3;vector-effect:non-scaling-stroke}.layout-assistant-preview .preview-marker.is-warning{stroke:#df9b2f}.layout-assistant-preview .preview-marker.is-risk{stroke:#d14b4b}.layout-assistant-preview text{fill:#39336f;font:800 11px Vazirmatn,Tahoma,sans-serif;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
@media(max-width:900px){.layout-assistant-drawer{--layout-assistant-width:min(390px,72vw)}.layout-assistant-title small{display:none}.layout-assistant-intro p{display:none}}
@media(max-width:700px){.shared-ai-form{grid-template-columns:1fr}.shared-ai-form label{grid-column:1/-1}.shared-ai-settings-actions{align-items:stretch;flex-direction:column}.shared-ai-action-buttons{width:100%}.shared-ai-action-buttons button{flex:1}.layout-assistant-drawer{--layout-assistant-width:min(340px,82vw)}}

/* Factory-map boundary states: editable is always red; locked uses the chosen color. */
.warehouse-region:not(.locked) .warehouse-shape,
.warehouse-region:not(.locked):hover .warehouse-shape,
.warehouse-region:not(.locked).active .warehouse-shape,
.warehouse-region:not(.locked).selected .warehouse-shape {
  fill: rgba(220, 63, 63, .06);
  stroke: #dc3f3f;
  stroke-width: 5;
  stroke-dasharray: 14 9;
}
.warehouse-region.locked .warehouse-shape,
.warehouse-region.locked:hover .warehouse-shape,
.warehouse-region.locked.active .warehouse-shape,
.warehouse-region.locked.selected .warehouse-shape {
  fill: var(--warehouse-lock-fill, #2478d024);
  stroke: var(--warehouse-lock-color, #2478d0);
  stroke-width: 2;
  stroke-dasharray: none;
}
.warehouse-region:not(.locked) .warehouse-corner-handle {
  display: block;
  fill: #fff;
  stroke: #dc3f3f;
  stroke-width: 5;
}
.warehouse-region.locked .warehouse-corner-handle { display: none; }
.warehouse-region.invalid .warehouse-shape { fill: rgba(220, 63, 63, .22); stroke: #b91c1c; }
.warehouse-color-note { color: var(--muted); font-size: 9px; line-height: 1.8; }

/* Capacity report — isolated, read-only reporting page. */
.capacity-report-page { padding: 16px 18px 24px; overflow: auto; direction: rtl; background: var(--bg); }
.capacity-report-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.capacity-report-heading h2 { margin: 0; font-size: 20px; }
.capacity-report-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.capacity-report-live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid #b8d9d3; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.capacity-report-filters { display: grid; grid-template-columns: minmax(170px,1fr) minmax(170px,1fr) minmax(260px,1.25fr); gap: 9px; padding: 11px; margin-bottom: 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 6px 20px rgba(37,76,71,.05); }
.capacity-report-filters > label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 9px; }
.capacity-report-filters select { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); font-size: 10px; }
.capacity-report-mode { display: flex; flex-direction: column; gap: 5px; }
.capacity-report-mode > span { color: var(--muted); font-size: 9px; }
.capacity-report-mode > div { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.capacity-report-mode button { min-height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 9px; }
.capacity-report-mode button.active { color: #fff; background: var(--primary); box-shadow: 0 3px 9px rgba(10,128,120,.22); font-weight: 800; }
.capacity-report-kpis { display: grid; grid-template-columns: repeat(5,minmax(145px,1fr)); gap: 8px; margin-bottom: 11px; }
.capacity-report-kpi { min-height: 76px; display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 17px rgba(37,76,71,.045); }
.capacity-report-kpi-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 16px; }
.capacity-report-kpi div { min-width: 0; }
.capacity-report-kpi small { display: block; color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.capacity-report-kpi strong { display: block; margin-top: 2px; color: var(--text); font-size: 16px; line-height: 1.35; white-space: nowrap; }
.capacity-report-kpi strong em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 600; }
.capacity-report-kpi div > span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.capacity-report-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(310px,.95fr); gap: 10px; align-items: start; }
.capacity-report-span-2 { grid-column: 1 / -1; }
.capacity-report-section { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 6px 20px rgba(37,76,71,.05); }
.capacity-report-section-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin-bottom: 8px; border-bottom: 1px solid #edf3f1; }
.capacity-report-section-head h3 { margin: 0 0 8px; font-size: 12px; }
.capacity-report-empty-banner { margin-bottom: 10px; padding: 10px 12px; border: 1px dashed #a8cfc8; border-radius: 11px; color: #216e65; background: #f0faf8; font-size: 9px; }
.capacity-report-scope-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 8px 11px; border: 1px solid #c9dfdb; border-radius: 11px; color: var(--muted); background: #f8fbfa; font-size: 8px; }
.capacity-report-scope-summary strong { color: var(--primary); font-size: 8.5px; }
.capacity-report-empty { min-height: 125px; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); text-align: center; }
.capacity-report-empty span { font-size: 28px; opacity: .5; }
.capacity-report-empty p { margin: 0; font-size: 9px; }
.capacity-report-bars { height: 265px; display: flex; align-items: stretch; gap: 10px; overflow-x: auto; padding: 4px 3px 0; direction: rtl; }
.capacity-report-bar-column { min-width: 82px; flex: 1 0 82px; display: grid; grid-template-rows: 215px auto auto; align-items: end; gap: 4px; padding: 0 4px; border: 0; border-radius: 9px; color: var(--text); background: transparent; }
.capacity-report-bar-column:hover { background: #f7fbfa; }
.capacity-report-bar-track { width: 50px; height: 210px; display: flex; align-items: flex-end; justify-self: center; border-radius: 8px 8px 3px 3px; background: #f1f5f4; overflow: hidden; }
.capacity-report-bar-stack { width: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.capacity-report-bar-segment { min-height: 0; display: grid; place-items: center; overflow: hidden; color: #fff; font-size: 8px; font-weight: 800; transition: filter .15s ease; }
.capacity-report-bar-segment:hover { filter: brightness(.92); }
.capacity-report-bar-segment.is-occupied, .capacity-report-legend .is-occupied, .capacity-report-donut-segment.is-occupied, .capacity-report-donut-legend .is-occupied { background: #1b9b75; stroke: #1b9b75; }
.capacity-report-bar-segment.is-empty, .capacity-report-legend .is-empty, .capacity-report-donut-segment.is-empty, .capacity-report-donut-legend .is-empty { background: #cbd7d5; stroke: #cbd7d5; color: #45605c; }
.capacity-report-bar-segment.is-blocked, .capacity-report-legend .is-blocked, .capacity-report-donut-segment.is-blocked, .capacity-report-donut-legend .is-blocked { background: #d85b5b; stroke: #d85b5b; }
.capacity-report-bar-column > strong { overflow: hidden; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.capacity-report-bar-column > small { color: var(--muted); font-size: 7.5px; }
.capacity-report-legend, .capacity-report-heat-legend { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 8px; }
.capacity-report-legend i, .capacity-report-heat-legend i { width: 9px; height: 9px; display: inline-block; margin-left: 4px; border-radius: 3px; vertical-align: -1px; }
.capacity-report-donut-wrap { min-height: 255px; display: grid; grid-template-columns: minmax(180px,1fr) minmax(145px,.75fr); align-items: center; gap: 6px; }
.capacity-report-donut { width: min(100%,225px); justify-self: center; overflow: visible; }
.capacity-report-donut-base { fill: none; stroke: #eef3f2; stroke-width: 23; }
.capacity-report-donut-segment { fill: none; stroke-width: 23; transition: stroke-width .15s ease; }
.capacity-report-donut-segment:hover { stroke-width: 27; }
.capacity-report-donut text { fill: var(--muted); font-family: Vazirmatn,Tahoma,Arial,sans-serif; font-size: 9px; }
.capacity-report-donut .capacity-report-donut-total { fill: var(--text); font-size: 19px; font-weight: 800; }
.capacity-report-donut-legend { display: flex; flex-direction: column; gap: 7px; }
.capacity-report-donut-legend div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid #edf3f1; border-radius: 8px; }
.capacity-report-donut-legend i { width: 9px; height: 9px; border-radius: 3px; }
.capacity-report-donut-legend span { color: var(--muted); font-size: 8px; }
.capacity-report-donut-legend strong { font-size: 9px; }
.capacity-report-donut-legend small { grid-column: 3; color: var(--muted); font-size: 7px; }
.capacity-report-heatmap-selector { display: flex; justify-content: flex-start; margin-bottom: 8px; }
.capacity-report-heatmap-selector label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.capacity-report-heatmap-selector select { min-width: 170px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 9px; }
.capacity-report-table-scroll { width: 100%; overflow: auto; }
.capacity-report-heatmap { width: 100%; min-width: 520px; border-spacing: 5px; border-collapse: separate; }
.capacity-report-heatmap th { padding: 5px 7px; color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.capacity-report-heatmap tbody th { color: var(--text); text-align: right; }
.capacity-report-heatmap td { min-width: 80px; height: 34px; padding: 4px; border-radius: 7px; color: #28423e; text-align: center; font-size: 8px; font-weight: 800; }
.capacity-report-heatmap td.is-low, .capacity-report-heat-legend .is-low { background: #ccebdc; }
.capacity-report-heatmap td.is-medium, .capacity-report-heat-legend .is-medium { background: #f3e6a4; }
.capacity-report-heatmap td.is-high, .capacity-report-heat-legend .is-high { background: #f4c083; }
.capacity-report-heatmap td.is-very-high, .capacity-report-heat-legend .is-very-high { background: #ef9690; }
.capacity-report-heatmap td.is-blocked { color: #fff; background: #d85b5b; }
.capacity-report-heatmap td.is-na { color: #a7b4b2; background: #f4f7f6; }
.capacity-report-tanks { display: flex; flex-direction: column; gap: 8px; }
.capacity-report-tank-row { display: grid; grid-template-columns: minmax(170px,.9fr) minmax(220px,2fr) minmax(150px,.75fr); align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid #e8f0ee; border-radius: 11px; background: #fbfdfd; }
.capacity-report-tank-row > div:first-child strong { display: block; font-size: 9px; }
.capacity-report-tank-row > div:first-child span { color: var(--muted); font-size: 8px; }
.capacity-report-progress { height: 11px; overflow: hidden; border-radius: 999px; background: #dce8e6; }
.capacity-report-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#55b8ad,#27869e); }
.capacity-report-tank-row > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.capacity-report-tank-row b { color: #247f91; font-size: 11px; }
.capacity-report-tank-row small { color: var(--muted); font-size: 7.5px; }
.capacity-report-tank-row.is-over-capacity { border-color: #e9c6a3; background: #fffaf3; }
.capacity-report-tank-row.is-over-capacity .capacity-report-progress i { background: linear-gradient(90deg,#d88839,#e0a24e); }
.capacity-report-tank-row.is-over-capacity b, .capacity-report-tank-row.is-over-capacity small { color: #9a641e; }
.capacity-report-space-bar { width: 100%; height: 28px; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f1f5f4; }
.capacity-report-space-bar span { height: 100%; transition: filter .15s ease; }
.capacity-report-space-bar span:hover { filter: brightness(.92); }
.capacity-report-space .is-storage, .capacity-report-physical-list .is-storage { background: #77c8bd; }
.capacity-report-space .is-circulation, .capacity-report-physical-list .is-circulation { background: #8dc1e4; }
.capacity-report-space .is-remaining, .capacity-report-physical-list .is-remaining { background: #c8e8c4; }
.capacity-report-space-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 9px; }
.capacity-report-space-cards article { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 6px; padding: 8px; border: 1px solid #e8f0ee; border-radius: 9px; }
.capacity-report-space-cards i { width: 9px; height: 28px; grid-row: 1 / 3; border-radius: 4px; }
.capacity-report-space-cards small { color: var(--muted); font-size: 8px; }
.capacity-report-space-cards strong { grid-column: 2; font-size: 10px; }
.capacity-report-space-cards span { grid-column: 3; grid-row: 1 / 3; color: var(--muted); font-size: 9px; font-weight: 800; }
.capacity-report-space > p { margin: 9px 0 0; color: var(--muted); font-size: 8px; text-align: center; }
.capacity-report-physical-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 9px; }
.capacity-report-physical-list > article { min-width: 0; padding: 10px; border: 1px solid #e8f0ee; border-radius: 11px; background: #fbfdfd; }
.capacity-report-physical-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.capacity-report-physical-list-head strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.capacity-report-physical-list-head span { color: var(--muted); font-size: 7.5px; white-space: nowrap; }
.capacity-report-physical-list-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 7px; }
.capacity-report-physical-list-values > span { display: grid; grid-template-columns: 7px 1fr; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 6.8px; }
.capacity-report-physical-list-values i { width: 6px; height: 18px; grid-row: 1 / 3; border-radius: 3px; }
.capacity-report-physical-list-values b { grid-column: 2; overflow: hidden; color: var(--text); font-size: 7.5px; text-overflow: ellipsis; white-space: nowrap; }
.capacity-report-physical-list-values small { grid-column: 2; color: var(--muted); font-size: 6.5px; }
.capacity-report-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.capacity-report-table th, .capacity-report-table td { padding: 8px 7px; border-bottom: 1px solid #edf3f1; text-align: center; font-size: 8px; white-space: nowrap; }
.capacity-report-table thead th { position: sticky; top: 0; color: var(--muted); background: #f7faf9; font-weight: 800; }
.capacity-report-table tbody th, .capacity-report-table tfoot th { text-align: right; font-weight: 800; }
.capacity-report-table tbody tr[data-open-warehouse] { cursor: pointer; }
.capacity-report-table tbody tr[data-open-warehouse]:hover { background: #f0f9f7; }
.capacity-report-table tfoot { color: var(--primary); background: var(--primary-soft); font-weight: 800; }
@media (max-width: 1120px) {
  .capacity-report-kpis { grid-template-columns: repeat(3,minmax(145px,1fr)); }
  .capacity-report-grid { grid-template-columns: 1fr; }
  .capacity-report-span-2 { grid-column: auto; }
  .capacity-report-tank-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 820px) {
  .capacity-report-filters { grid-template-columns: 1fr; }
  .capacity-report-kpis { grid-template-columns: repeat(2,minmax(140px,1fr)); }
  .capacity-report-donut-wrap { grid-template-columns: 1fr; }
  .capacity-report-space-cards { grid-template-columns: 1fr; }
  .capacity-report-scope-summary { align-items: flex-start; flex-direction: column; }
  .capacity-report-physical-list-values { grid-template-columns: 1fr; }
}

/* Inventory and batches — isolated, read-only traceability dashboard. */
.inventory-batches-page{padding:18px 22px 28px;overflow:auto;background:var(--bg);direction:rtl}
.inventory-batches-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.inventory-batches-heading h2{margin:0;font-size:20px}.inventory-batches-heading p{margin:4px 0 0;color:var(--muted);font-size:10px}.inventory-batches-heading>div:last-child{display:flex;align-items:center;gap:8px}.inventory-batches-heading>div:last-child>span{display:inline-flex;align-items:center;min-height:34px;padding:7px 10px;border:1px solid #b8d9d3;border-radius:999px;color:var(--primary);background:var(--primary-soft);font-size:8.5px;font-weight:800;white-space:nowrap}
.inventory-batches-filters{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:9px;margin-bottom:12px;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(28,53,49,.05)}.inventory-batches-filters label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:8px}.inventory-batches-filters input,.inventory-batches-filters select{width:100%;min-height:35px;padding:7px 8px;border:1px solid var(--line);border-radius:9px;color:var(--text);background:var(--surface-2);font-size:9px}.inventory-batches-filters fieldset{grid-column:span 2;display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:7px;min-width:0;margin:0;padding:0;border:0}.inventory-batches-filters fieldset legend{grid-column:1/-1;margin-bottom:5px;color:var(--muted);font-size:8px}.inventory-batches-filters fieldset span{align-self:center;color:var(--muted);font-size:8px}.inventory-batches-search{grid-column:span 2}.inventory-batches-filter-actions{grid-column:span 2;display:flex;align-items:end;gap:7px}.inventory-batches-filter-actions button{flex:1;min-height:35px}
.inventory-batches-kpis{display:grid;grid-template-columns:repeat(8,minmax(105px,1fr));gap:8px;margin-bottom:10px}.inventory-batches-kpi{min-width:0;display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff;box-shadow:0 5px 14px rgba(28,53,49,.045)}.inventory-batches-kpi>span{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:var(--primary);background:var(--primary-soft);font-size:15px}.inventory-batches-kpi div{min-width:0}.inventory-batches-kpi small{display:block;overflow:hidden;color:var(--muted);font-size:7.3px;text-overflow:ellipsis;white-space:nowrap}.inventory-batches-kpi strong{display:block;margin-top:2px;color:var(--text);font-size:14px;white-space:nowrap}.inventory-batches-kpi em{color:var(--muted);font-size:7px;font-style:normal;font-weight:600}
.inventory-batches-units{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:10px;padding:8px 11px;border:1px solid #c7ddd9;border-radius:11px;color:var(--muted);background:#f7fbfa;font-size:8px}.inventory-batches-units>strong{color:var(--text)}.inventory-batches-units span{padding:4px 7px;border-radius:7px;color:var(--primary);background:var(--primary-soft)}.inventory-batches-units b{margin-right:3px}
.inventory-batches-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:11px}.inventory-batches-section{min-width:0;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(28,53,49,.05)}.inventory-batches-span-2{grid-column:1/-1}.inventory-batches-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.inventory-batches-section-head h3{margin:0;font-size:11.5px}.inventory-batches-empty-state{min-height:125px;display:grid;place-items:center;align-content:center;gap:7px;color:var(--muted);text-align:center}.inventory-batches-empty-state span{font-size:27px;opacity:.45}.inventory-batches-empty-state p{margin:0;font-size:8.5px}
.inventory-batches-horizontal-chart{display:flex;flex-direction:column;gap:10px;min-height:150px;justify-content:center}.inventory-batches-horizontal-chart>div{display:grid;grid-template-columns:minmax(90px,140px) 1fr 75px;align-items:center;gap:9px}.inventory-batches-horizontal-chart strong{overflow:hidden;font-size:8.5px;text-overflow:ellipsis;white-space:nowrap}.inventory-batches-horizontal-chart span{height:15px;overflow:hidden;border-radius:999px;background:#e8f0ee}.inventory-batches-horizontal-chart i{display:block;min-width:4px;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--primary-2))}.inventory-batches-horizontal-chart b{color:var(--primary);font-size:8px;text-align:left;white-space:nowrap}
.inventory-batches-donut-wrap{min-height:150px;display:grid;grid-template-columns:170px 1fr;align-items:center;gap:10px}.inventory-batches-donut-wrap svg{width:165px;max-width:100%;margin:auto}.inventory-batches-donut-base,.inventory-batches-donut-wrap circle:not(.inventory-batches-donut-base){fill:none;stroke-width:19}.inventory-batches-donut-base{stroke:#edf3f1}.inventory-batches-donut-wrap circle.is-0,.inventory-batches-donut-legend i.is-0{stroke:#0a8078;background:#0a8078}.inventory-batches-donut-wrap circle.is-1,.inventory-batches-donut-legend i.is-1{stroke:#3c7dd9;background:#3c7dd9}.inventory-batches-donut-wrap circle.is-2,.inventory-batches-donut-legend i.is-2{stroke:#ed9b36;background:#ed9b36}.inventory-batches-donut-wrap circle.is-3,.inventory-batches-donut-legend i.is-3{stroke:#8b68b5;background:#8b68b5}.inventory-batches-donut-wrap circle.is-4,.inventory-batches-donut-legend i.is-4{stroke:#6f8582;background:#6f8582}.inventory-batches-donut-wrap text{fill:var(--muted);font-family:Vazirmatn,Tahoma,Arial,sans-serif;font-size:8px}.inventory-batches-donut-wrap .inventory-batches-donut-total{fill:var(--text);font-size:16px;font-weight:800}.inventory-batches-donut-legend{display:flex;flex-direction:column;gap:6px}.inventory-batches-donut-legend>div{display:grid;grid-template-columns:8px 1fr auto auto;align-items:center;gap:6px}.inventory-batches-donut-legend i{width:7px;height:7px;border-radius:50%}.inventory-batches-donut-legend span,.inventory-batches-donut-legend small{color:var(--muted);font-size:7.5px}.inventory-batches-donut-legend strong{font-size:8.5px}
.inventory-batches-table-scroll{width:100%;overflow:auto}.inventory-batches-table{width:100%;border-collapse:separate;border-spacing:0}.inventory-batches-table th,.inventory-batches-table td{padding:8px 7px;border-bottom:1px solid #edf3f1;text-align:center;font-size:7.7px;white-space:nowrap}.inventory-batches-table thead th{position:sticky;top:0;z-index:1;color:var(--muted);background:#f7faf9;font-weight:800}.inventory-batches-table tbody tr:hover{background:#fbfefd}.inventory-batches-table tbody th{text-align:right}.inventory-batches-table td>small,.inventory-batches-table th>small{display:block;margin-top:3px;color:var(--muted);font-size:6.8px}.inventory-batches-table th button{border:0;color:inherit;background:transparent;font:inherit;font-weight:inherit;white-space:nowrap}.inventory-batches-table th button span{margin-right:3px;color:#9ab0ac}.inventory-batches-location-count{display:inline-grid;min-width:25px;min-height:22px;place-items:center;border-radius:7px;background:#edf4f2}.inventory-batches-location-count.is-multi{color:#7c5516;background:#fff1d9;font-weight:800}.inventory-batches-badge{display:inline-flex;align-items:center;min-height:21px;padding:3px 6px;border-radius:999px;color:#316e66;background:#e9f5f2;font-size:7px;font-weight:700}.inventory-batches-badge.is-qc-quarantine,.inventory-batches-badge.is-qc-rejected{color:#a34545;background:#fdeaea}.inventory-batches-badge.is-unassigned{color:#79591d;background:#fff2d9}.inventory-batches-badge.is-dispatched{color:#687775;background:#edf1f0}.inventory-batches-link{border:0;padding:4px 6px;color:var(--primary);background:transparent;font-size:7.5px;font-weight:800;white-space:nowrap}.inventory-batches-link:hover{text-decoration:underline}
.inventory-batches-unassigned-list{display:flex;flex-direction:column;gap:6px}.inventory-batches-unassigned-list article{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px;border:1px solid #edf3f1;border-radius:10px;background:#fbfdfd}.inventory-batches-package-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;color:#91702e;background:#fff2d9}.inventory-batches-unassigned-list strong{display:block;overflow:hidden;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.inventory-batches-unassigned-list small,.inventory-batches-unassigned-list div>span{display:block;margin-top:2px;color:var(--muted);font-size:6.8px}.inventory-batches-unassigned-list button{border:1px solid var(--line);border-radius:7px;padding:5px 7px;color:var(--primary);background:#fff;font-size:6.8px}.inventory-batches-more-note{margin:8px 0 0;color:var(--muted);font-size:7.5px;text-align:center}
.inventory-batches-timeline{position:relative;display:flex;flex-direction:column;padding-right:8px}.inventory-batches-timeline:before{content:"";position:absolute;top:7px;bottom:7px;right:13px;width:1px;background:#dce8e5}.inventory-batches-timeline article{position:relative;display:grid;grid-template-columns:12px 1fr;gap:9px;padding:0 0 10px}.inventory-batches-timeline article>i{z-index:1;width:11px;height:11px;margin-top:4px;border:3px solid #d7efeb;border-radius:50%;background:var(--primary)}.inventory-batches-timeline article.is-dispatch>i{border-color:#f5e1c2;background:#c9852f}.inventory-batches-timeline time{float:left;color:var(--muted);font-size:6.8px;direction:ltr}.inventory-batches-timeline strong{display:block;font-size:8px}.inventory-batches-timeline p{margin:2px 0;color:var(--text);font-size:7px}.inventory-batches-timeline small{color:var(--muted);font-size:6.5px}
.inventory-batches-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;color:var(--muted);font-size:7.5px}.inventory-batches-pagination>div{display:flex;align-items:center;gap:6px}.inventory-batches-pagination button{min-height:27px;padding:5px 9px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:#fff;font-size:7.5px}.inventory-batches-pagination button:disabled{opacity:.45;cursor:not-allowed}.inventory-batches-pagination strong{color:var(--text)}
.inventory-batch-details-backdrop{position:fixed;inset:0;z-index:120;display:flex;justify-content:flex-start;background:rgba(20,49,46,.3);backdrop-filter:blur(3px)}.inventory-batch-details{width:min(720px,94vw);height:100%;overflow:auto;padding:20px;border-right:1px solid var(--line);background:#fff;box-shadow:20px 0 55px rgba(18,49,45,.2)}.inventory-batch-details-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding-bottom:13px;border-bottom:1px solid var(--line)}.inventory-batch-details-head small{color:var(--primary);font-size:8px;font-weight:800}.inventory-batch-details-head h3{margin:4px 0;font-size:15px}.inventory-batch-details-head p{margin:0;color:var(--muted);font-size:8px}.inventory-batch-details-head button{width:33px;height:33px;border:1px solid var(--line);border-radius:9px;color:var(--muted);background:var(--surface-2);font-size:19px}.inventory-batch-details-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin:12px 0}.inventory-batch-details-summary article{padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}.inventory-batch-details-summary small{display:block;color:var(--muted);font-size:7px}.inventory-batch-details-summary strong{display:block;margin-top:3px;font-size:13px}.inventory-batch-details-quantities{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.inventory-batch-details-quantities span{padding:6px 9px;border-radius:8px;color:var(--primary);background:var(--primary-soft);font-size:8px}
@media(max-width:1200px){.inventory-batches-filters{grid-template-columns:repeat(4,minmax(120px,1fr))}.inventory-batches-kpis{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.inventory-batches-page{padding:14px}.inventory-batches-grid{grid-template-columns:1fr}.inventory-batches-span-2{grid-column:1}.inventory-batches-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-batches-kpis{grid-template-columns:repeat(2,1fr)}.inventory-batches-heading{flex-direction:column}.inventory-batches-heading>div:last-child{width:100%;justify-content:space-between}.inventory-batches-donut-wrap{grid-template-columns:150px 1fr}}
@media(max-width:560px){.inventory-batches-page{padding:10px}.inventory-batches-filters{grid-template-columns:1fr}.inventory-batches-filters fieldset,.inventory-batches-search,.inventory-batches-filter-actions{grid-column:1}.inventory-batches-kpis{grid-template-columns:1fr 1fr}.inventory-batches-kpi{padding:8px}.inventory-batches-horizontal-chart>div{grid-template-columns:90px 1fr 58px}.inventory-batches-donut-wrap{grid-template-columns:1fr}.inventory-batches-donut-legend{display:grid;grid-template-columns:1fr 1fr}.inventory-batches-pagination{align-items:flex-start;flex-direction:column}.inventory-batch-details-summary{grid-template-columns:1fr 1fr}}

/* Expiry and alerts — isolated, read-only exception dashboard. */
.expiry-alerts-page{padding:18px 22px 28px;overflow:auto;background:var(--bg);direction:rtl}.expiry-alerts-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:12px}.expiry-alerts-heading h2{margin:0;font-size:20px}.expiry-alerts-heading p{margin:4px 0 0;color:var(--muted);font-size:10px}.expiry-alerts-heading>div:last-child{display:flex;align-items:center;gap:8px}.expiry-alerts-heading>div:last-child>span{display:inline-flex;align-items:center;min-height:34px;padding:7px 10px;border:1px solid #e8c99a;border-radius:999px;color:#94631b;background:#fff6e7;font-size:8.5px;font-weight:800;white-space:nowrap}
.expiry-alerts-filters{display:grid;grid-template-columns:repeat(5,minmax(135px,1fr));gap:9px;margin-bottom:12px;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(28,53,49,.05)}.expiry-alerts-filters label{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:8px}.expiry-alerts-filters input,.expiry-alerts-filters select{width:100%;min-height:35px;padding:7px 8px;border:1px solid var(--line);border-radius:9px;color:var(--text);background:var(--surface-2);font-size:9px}.expiry-alerts-search{grid-column:span 2}.expiry-alerts-filter-actions{grid-column:span 2;display:flex;align-items:end;gap:7px}.expiry-alerts-filter-actions button{flex:1;min-height:35px}
.expiry-alerts-kpis{display:grid;grid-template-columns:repeat(8,minmax(105px,1fr));gap:8px;margin-bottom:10px}.expiry-alerts-kpi{min-width:0;display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:13px;background:#fff;box-shadow:0 5px 14px rgba(28,53,49,.045)}.expiry-alerts-kpi>span{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:#a56619;background:#fff0d8;font-size:15px;font-weight:900}.expiry-alerts-kpi:nth-child(2)>span{color:#b83f3f;background:#fee8e8}.expiry-alerts-kpi div{min-width:0}.expiry-alerts-kpi small{display:block;overflow:hidden;color:var(--muted);font-size:7.3px;text-overflow:ellipsis;white-space:nowrap}.expiry-alerts-kpi strong{display:block;margin-top:2px;color:var(--text);font-size:14px;white-space:nowrap}.expiry-alerts-kpi em{color:var(--muted);font-size:7px;font-style:normal;font-weight:600}
.expiry-alerts-summary-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding:8px 11px;border:1px solid #ead8b9;border-radius:11px;color:#80633b;background:#fffaf1;font-size:8px}.expiry-alerts-summary-line strong{color:#8e5c18}.expiry-alerts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.expiry-alerts-section{min-width:0;padding:13px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(28,53,49,.05)}.expiry-alerts-span-2{grid-column:1/-1}.expiry-alerts-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.expiry-alerts-section-head h3{margin:0;font-size:11.5px}.expiry-alerts-empty-state{min-height:120px;display:grid;place-items:center;align-content:center;gap:7px;color:var(--muted);text-align:center}.expiry-alerts-empty-state span{font-size:27px;opacity:.45}.expiry-alerts-empty-state p{margin:0;font-size:8.5px}
.expiry-alerts-critical{border-color:#edd0c6;background:linear-gradient(180deg,#fff,#fffaf8)}.expiry-alerts-critical-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.expiry-alerts-critical-list article{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:1px solid #f0ded7;border-radius:11px;background:#fff}.expiry-alerts-critical-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;font-size:17px;font-weight:900}.expiry-alerts-critical-icon.is-critical{color:#b53e3e;background:#fee8e8}.expiry-alerts-critical-icon.is-high{color:#9a621c;background:#fff0d8}.expiry-alerts-critical-list article>div>div{display:flex;align-items:center;gap:6px}.expiry-alerts-critical-list article>div>div small{color:var(--muted);font-size:6.8px}.expiry-alerts-critical-list strong{display:block;margin-top:4px;font-size:8.5px}.expiry-alerts-critical-list p{margin:3px 0;color:var(--text);font-size:7.3px}.expiry-alerts-critical-list article>div>span{display:block;color:var(--muted);font-size:6.8px}.expiry-alerts-critical-list b{display:block;margin-top:4px;color:#8b5a20;font-size:7px;font-weight:700}.expiry-alerts-critical-list article>button{border:1px solid var(--line);border-radius:7px;padding:5px 7px;color:var(--primary);background:#fff;font-size:6.8px;white-space:nowrap}
.expiry-alerts-severity{display:inline-flex;align-items:center;min-height:21px;padding:3px 7px;border-radius:999px;font-size:7px;font-weight:800}.expiry-alerts-severity.is-critical{color:#ae3636;background:#fee5e5}.expiry-alerts-severity.is-high{color:#936019;background:#fff0d4}.expiry-alerts-severity.is-medium{color:#356b9a;background:#e8f2fb}.expiry-alerts-severity.is-informational{color:#47736d;background:#e8f4f1}
.expiry-alerts-expiry-chart{display:flex;flex-direction:column;justify-content:center;gap:11px;min-height:165px}.expiry-alerts-expiry-chart>div{display:grid;grid-template-columns:90px 1fr 62px;align-items:center;gap:8px}.expiry-alerts-expiry-chart span{font-size:8px}.expiry-alerts-expiry-chart i{height:15px;overflow:hidden;border-radius:999px;background:#edf2f1}.expiry-alerts-expiry-chart b{display:block;min-width:4px;height:100%;border-radius:inherit}.expiry-alerts-expiry-chart b.is-expired,.expiry-alerts-expiry-chart b.is-critical{background:#d95050}.expiry-alerts-expiry-chart b.is-high{background:#e99a35}.expiry-alerts-expiry-chart b.is-medium{background:#4e8ccb}.expiry-alerts-expiry-chart b.is-informational{background:#58a99d}.expiry-alerts-expiry-chart strong{color:var(--muted);font-size:7.5px;text-align:left}
.expiry-alerts-warehouse-chart{display:flex;flex-direction:column;justify-content:center;gap:11px;min-height:145px}.expiry-alerts-warehouse-chart>div{display:grid;grid-template-columns:110px 1fr 30px;align-items:center;gap:8px}.expiry-alerts-warehouse-chart strong{overflow:hidden;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.expiry-alerts-warehouse-chart>div>span{height:16px;display:flex;overflow:hidden;border-radius:999px;background:#edf2f1}.expiry-alerts-warehouse-chart>div>span i{height:100%}.expiry-alerts-warehouse-chart b{font-size:8px;text-align:left}.expiry-alerts-chart-legend{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:8px;color:var(--muted);font-size:7px}.expiry-alerts-chart-legend span{display:flex;align-items:center;gap:4px}.expiry-alerts-chart-legend i{width:7px;height:7px;border-radius:50%}.expiry-alerts-warehouse-chart .is-critical,.expiry-alerts-chart-legend .is-critical{background:#d95050}.expiry-alerts-warehouse-chart .is-high,.expiry-alerts-chart-legend .is-high{background:#e99a35}.expiry-alerts-warehouse-chart .is-medium,.expiry-alerts-chart-legend .is-medium{background:#4e8ccb}.expiry-alerts-warehouse-chart .is-informational,.expiry-alerts-chart-legend .is-informational{background:#58a99d}
.expiry-alerts-donut-wrap{min-height:165px;display:grid;grid-template-columns:175px 1fr;align-items:center;gap:10px}.expiry-alerts-donut-wrap svg{width:165px;max-width:100%;margin:auto}.expiry-alerts-donut-base,.expiry-alerts-donut-wrap circle:not(.expiry-alerts-donut-base){fill:none;stroke-width:18}.expiry-alerts-donut-base{stroke:#edf3f1}.expiry-alerts-donut-wrap circle.is-0,.expiry-alerts-donut-wrap div i.is-0{stroke:#d35454;background:#d35454}.expiry-alerts-donut-wrap circle.is-1,.expiry-alerts-donut-wrap div i.is-1{stroke:#8264ad;background:#8264ad}.expiry-alerts-donut-wrap circle.is-2,.expiry-alerts-donut-wrap div i.is-2{stroke:#e39a3d;background:#e39a3d}.expiry-alerts-donut-wrap circle.is-3,.expiry-alerts-donut-wrap div i.is-3{stroke:#4f8db5;background:#4f8db5}.expiry-alerts-donut-wrap text{fill:var(--muted);font-family:Vazirmatn,Tahoma,Arial,sans-serif;font-size:8px}.expiry-alerts-donut-wrap .expiry-alerts-donut-total{fill:var(--text);font-size:16px;font-weight:800}.expiry-alerts-donut-wrap>div{display:flex;flex-direction:column;gap:7px}.expiry-alerts-donut-wrap p{display:grid;grid-template-columns:8px 1fr auto auto;align-items:center;gap:6px;margin:0}.expiry-alerts-donut-wrap p i{width:7px;height:7px;border-radius:50%}.expiry-alerts-donut-wrap p span,.expiry-alerts-donut-wrap p small{color:var(--muted);font-size:7.3px}.expiry-alerts-donut-wrap p strong{font-size:8px}
.expiry-alerts-table-scroll{width:100%;overflow:auto}.expiry-alerts-table{width:100%;border-collapse:separate;border-spacing:0}.expiry-alerts-table th,.expiry-alerts-table td{padding:8px 7px;border-bottom:1px solid #edf3f1;text-align:center;font-size:7.6px;white-space:nowrap}.expiry-alerts-table thead th{position:sticky;top:0;z-index:1;color:var(--muted);background:#f7faf9;font-weight:800}.expiry-alerts-table tbody tr:hover{background:#fbfefd}.expiry-alerts-table tbody th{text-align:right}.expiry-alerts-table th small,.expiry-alerts-table td small{display:block;margin-top:3px;color:var(--muted);font-size:6.7px}.expiry-alerts-table th button{border:0;color:inherit;background:transparent;font:inherit;font-weight:inherit;white-space:nowrap}.expiry-alerts-table th button span{margin-right:3px;color:#9ab0ac}.expiry-alerts-master-table td:nth-child(6),.expiry-alerts-master-table td:nth-child(7){max-width:230px;overflow:hidden;text-overflow:ellipsis}.expiry-alerts-link{border:0;padding:4px 6px;color:var(--primary);background:transparent;font-size:7.5px;font-weight:800;white-space:nowrap}.expiry-alerts-link:hover{text-decoration:underline}.expiry-alerts-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;color:var(--muted);font-size:7.5px}.expiry-alerts-pagination>div{display:flex;align-items:center;gap:6px}.expiry-alerts-pagination button{min-height:27px;padding:5px 9px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:#fff;font-size:7.5px}.expiry-alerts-pagination button:disabled{opacity:.45;cursor:not-allowed}.expiry-alerts-pagination strong{color:var(--text)}
.expiry-alerts-unsupported{display:grid;grid-template-columns:1fr 1fr;gap:8px}.expiry-alerts-unsupported article{display:flex;align-items:center;gap:9px;padding:10px;border:1px dashed #c9d9d6;border-radius:11px;background:#fafcfc}.expiry-alerts-unsupported article>span{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:9px;color:var(--muted);background:#edf3f1;font-size:15px}.expiry-alerts-unsupported strong{display:block;font-size:8.5px}.expiry-alerts-unsupported p{margin:3px 0 0;color:var(--muted);font-size:7.2px;line-height:1.8}
@media(max-width:1200px){.expiry-alerts-filters{grid-template-columns:repeat(4,minmax(130px,1fr))}.expiry-alerts-kpis{grid-template-columns:repeat(4,1fr)}.expiry-alerts-search,.expiry-alerts-filter-actions{grid-column:span 2}}
@media(max-width:900px){.expiry-alerts-page{padding:14px}.expiry-alerts-grid{grid-template-columns:1fr}.expiry-alerts-span-2{grid-column:1}.expiry-alerts-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.expiry-alerts-kpis{grid-template-columns:repeat(2,1fr)}.expiry-alerts-heading{flex-direction:column}.expiry-alerts-heading>div:last-child{width:100%;justify-content:space-between}.expiry-alerts-critical-list{grid-template-columns:1fr}.expiry-alerts-summary-line{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.expiry-alerts-page{padding:10px}.expiry-alerts-filters{grid-template-columns:1fr}.expiry-alerts-search,.expiry-alerts-filter-actions{grid-column:1}.expiry-alerts-kpis{grid-template-columns:1fr 1fr}.expiry-alerts-kpi{padding:8px}.expiry-alerts-critical-list article{grid-template-columns:34px 1fr}.expiry-alerts-critical-list article>button{grid-column:2}.expiry-alerts-donut-wrap{grid-template-columns:1fr}.expiry-alerts-unsupported{grid-template-columns:1fr}.expiry-alerts-pagination{align-items:flex-start;flex-direction:column}}
