:root {
  color-scheme: light;
  --ink: #1f302b;
  --muted: #61736d;
  --line: #d8e1dd;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --surface-soft: #edf4f1;
  --green: #20372f;
  --green-2: #708b81;
  --green-3: #526f65;
  --accent: #8ca198;
  --danger: #b94d48;
  --warning: #a76f18;
  --sidebar-width: 232px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--canvas); }
button, select, input { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
.is-hidden { display: none !important; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .9fr) minmax(520px, 1.35fr); background: var(--surface); }
.login-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 7vw, 100px); color: white; background: var(--green); }
.login-brand-panel::before, .login-brand-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-brand-panel::before { width: 520px; height: 520px; right: -280px; top: -190px; }
.login-brand-panel::after { width: 380px; height: 380px; left: -220px; bottom: -170px; }
.login-brand-content { position: relative; z-index: 1; max-width: 500px; }
.login-brand-logo { display: block; width: min(100%, 310px); height: auto; margin: 0 auto clamp(36px, 6vh, 70px); }
.login-brand-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 18px; border-radius: 50% 50% 50% 15px; color: var(--green); background: #dce7e2; font-size: 30px; font-weight: 700; }
.login-product { margin-bottom: clamp(50px, 9vh, 100px); color: #c5d3cd; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.login-brand-panel h1 { margin-bottom: 22px; font-size: clamp(34px, 4vw, 58px); line-height: 1.08; letter-spacing: -.035em; }
.login-intro { max-width: 440px; color: #c5d3cd; font-size: 15px; line-height: 1.7; }
.login-copyright { position: absolute; bottom: 30px; color: #8fa49b; font-size: 11px; }
.login-form-panel { display: grid; place-items: center; padding: 40px; background: #f7f9f8; }
.login-card { width: min(100%, 430px); padding: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 70px rgba(31,48,43,.1); }
.login-card h2 { margin-bottom: 8px; font-size: 30px; }
.login-help { margin-bottom: 30px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-mobile-brand { display: none; }
.login-mobile-brand img { display: block; width: min(100%, 190px); height: auto; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 600; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field-label-row label { margin-bottom: 7px; }
.link-button { padding: 0 0 7px; border: 0; color: var(--green-3); background: transparent; font-size: 10px; cursor: pointer; }
.form-field input, .form-field select { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; outline: none; color: var(--ink); background: #fbfcfb; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.form-field input:focus, .form-field select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.form-field input.invalid { border-color: var(--danger); }
.password-field { position: relative; }
.password-field input { padding-right: 72px; }
.password-toggle { position: absolute; right: 5px; top: 5px; height: 34px; padding: 0 9px; border: 0; color: var(--green-3); background: transparent; font-size: 10px; font-weight: 600; cursor: pointer; }
.field-error { display: block; min-height: 14px; padding-top: 4px; color: var(--danger); font-size: 10px; }
.remember-option { display: flex; align-items: center; gap: 8px; margin: -2px 0 18px; color: var(--muted); font-size: 11px; cursor: pointer; }
.remember-option input { accent-color: var(--green); }
.login-message { min-height: 16px; margin-bottom: 8px; color: var(--danger); font-size: 11px; }
.login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 46px; padding: 0 17px; border: 0; border-radius: 8px; color: white; background: var(--green); font-weight: 600; cursor: pointer; }
.login-submit:hover { background: #172b24; }
.login-demo { margin: 18px 0 0; color: #8a9892; font-size: 9px; line-height: 1.5; text-align: center; }

.app-shell { height: 100vh; min-height: 0; display: grid; grid-template: 66px minmax(0, 1fr) 28px / var(--sidebar-width) 1fr; }
.assistant-launcher { position: fixed; z-index: 1001; right: 22px; bottom: 46px; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 18px 18px 18px 6px; color: white; background: var(--green); box-shadow: 0 12px 30px rgba(20,48,39,.3); font-size: 24px; cursor: pointer; }
.assistant-launcher:hover { background: #172b24; transform: translateY(-1px); }
.assistant-panel { position: fixed; z-index: 1000; right: 22px; bottom: 108px; width: min(410px, calc(100vw - 28px)); height: min(650px, calc(100dvh - 140px)); overflow: hidden; border: 1px solid rgba(31,48,43,.16); border-radius: 17px; background: white; box-shadow: 0 24px 70px rgba(18,32,27,.28); }
.assistant-panel:not([hidden]) { display: grid; grid-template-rows: auto max-content minmax(0,1fr) auto; }
.assistant-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; color: white; background: var(--green); }
.assistant-panel > header div:first-child { display: grid; gap: 1px; }
.assistant-panel > header small { color: #bcd0c8; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.assistant-panel > header strong { font-size: 15px; }
.assistant-panel > header button { width: 32px; height: 32px; border: 0; border-radius: 7px; color: white; background: transparent; font-size: 20px; cursor: pointer; }
.assistant-panel > header button:hover { background: rgba(255,255,255,.1); }
.assistant-history { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.assistant-history:empty { display: none; }
.assistant-history button { flex: 0 0 auto; max-width: 145px; overflow: hidden; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.assistant-history button.is-active { border-color: var(--green-2); color: var(--green); background: var(--surface-soft); }
.assistant-messages { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px; background: #f5f8f6; }
.assistant-welcome { margin: auto; max-width: 260px; color: var(--muted); text-align: center; }
.assistant-welcome > span { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 15px 15px 15px 5px; color: white; background: var(--green-2); font-size: 20px; }
.assistant-welcome strong { color: var(--ink); font-size: 14px; }.assistant-welcome p { font-size: 11px; line-height: 1.55; }
.assistant-message { max-width: 86%; padding: 10px 12px; border-radius: 12px; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.assistant-message.is-user { align-self: flex-end; color: white; background: var(--green-2); border-bottom-right-radius: 4px; }
.assistant-message.is-assistant { align-self: flex-start; border: 1px solid var(--line); background: white; border-bottom-left-radius: 4px; }
.assistant-message.is-pending { color: var(--muted); }
.assistant-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px 12px; background: white; }
.assistant-form textarea { resize: none; width: 100%; max-height: 100px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; font: inherit; font-size: 12px; }
.assistant-form textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.assistant-form button { align-self: end; width: 40px; height: 40px; border: 0; border-radius: 10px; color: white; background: var(--green); cursor: pointer; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 5; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--canvas); }
.menu-button { gap: 4px; align-content: center; }
.menu-button span { display: block; width: 18px; height: 2px; background: currentColor; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 190px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 12%; color: white; background: var(--green-2); font-size: 19px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .13em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.context-switcher { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.context-switcher label { color: var(--muted); font-size: 12px; }
.context-switcher select { min-width: 240px; padding: 9px 34px 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.topbar-actions, .user-button { display: flex; align-items: center; }
.topbar-actions { position: relative; gap: 8px; }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.user-button { gap: 9px; padding: 5px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.user-button:hover, .user-button[aria-expanded="true"] { border-color: var(--line); background: var(--canvas); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: var(--green-3); font-size: 11px; font-weight: 700; }
.user-copy { text-align: left; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.user-chevron { width: 15px; height: 15px; margin-left: 2px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.user-button[aria-expanded="true"] .user-chevron { transform: rotate(180deg); }
.user-menu { position: absolute; z-index: 10; top: 54px; right: 0; width: 252px; overflow: hidden; border: 1px solid rgba(31,48,43,.12); border-radius: 13px; background: var(--surface); box-shadow: 0 18px 45px rgba(31,48,43,.16), 0 3px 10px rgba(31,48,43,.06); }
.user-menu::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--green-2); }
.user-menu-header { display: flex; align-items: center; gap: 11px; padding: 18px 16px 14px; background: #fafcfb; }
.user-menu-avatar { width: 38px; height: 38px; flex: 0 0 auto; }
.user-menu strong, .user-menu small { display: block; }
.user-menu strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.user-menu small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.user-menu-actions { padding: 7px; border-top: 1px solid var(--line); }
.user-menu-footer { padding: 7px; border-top: 1px solid var(--line); background: #fafcfb; }
.user-menu button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; font-size: 11px; font-weight: 500; cursor: pointer; transition: color .15s, background .15s; }
.user-menu button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--green-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.user-menu button:hover { color: var(--green); background: var(--surface-soft); }
.user-menu button:focus-visible { outline: 2px solid rgba(82,111,101,.35); outline-offset: -2px; }
.user-menu .logout-action { color: var(--danger); }
.user-menu .logout-action svg { stroke: var(--danger); }
.user-menu .logout-action:hover { color: #9f3e3a; background: #faeceb; }

.sidebar { overflow-y: auto; padding: 22px 14px; background: #263b34; transition: margin .2s ease; }
.nav-label { margin: 21px 12px 7px; color: #9bafa7; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 2px; }
.nav-module + .nav-module { margin-top: 16px; }
.nav-module-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0 0 5px; padding: 4px 10px; border: 0; color: #9bafa7; background: transparent; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-align: left; text-transform: uppercase; cursor: pointer; }
.nav-module-toggle:hover { color: #e5eeea; }
.nav-module-indicator { display: grid; place-items: center; width: 18px; height: 18px; color: #b6c7c0; font-size: 15px; line-height: 1; transition: transform .16s ease; }
.nav-module-toggle[aria-expanded="false"] .nav-module-indicator { transform: rotate(-90deg); }
.nav-module-items[hidden] { display: none; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 7px; color: #d4dfda; font-size: 13px; text-decoration: none; }
.nav-item span { width: 18px; color: #a8bcb4; text-align: center; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(140,161,152,.28); box-shadow: inset 3px 0 #a8bbb3; }
.nav-item.active span { color: #d8e4df; }

.workspace { min-width: 0; overflow: auto; padding: 20px 16px 24px; overscroll-behavior: contain; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 5px; color: var(--green-3); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(28px, 3vw, 40px); font-weight: 600; }
h2 { margin-bottom: 0; font-size: 20px; font-weight: 600; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.primary-button { padding: 10px 16px; border: 1px solid var(--green); border-radius: 8px; color: white; background: var(--green); cursor: pointer; }
.primary-button:hover { background: #172b24; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 10px rgba(23,33,28,.035); }
.metric-card { padding: 18px 20px; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 5px 0 4px; font-size: 31px; font-weight: 600; }
.metric-card small { color: var(--muted); font-size: 10px; }
.metric-card .positive { color: var(--green-3); }
.metric-card .warning { color: var(--warning); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; }
.panel { padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.text-button { border: 0; color: var(--green-3); background: transparent; font-size: 11px; cursor: pointer; }
.production-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(120px, 1fr) 38px; align-items: center; gap: 18px; padding: 15px 0; border-top: 1px solid #edf0ee; }
.production-row:first-child { border-top: 0; }
.production-row strong, .production-row small { display: block; }
.production-row strong { font-size: 12px; }
.production-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.production-row b { font-size: 11px; text-align: right; }
.progress { overflow: hidden; height: 6px; border-radius: 99px; background: var(--surface-soft); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.badge { padding: 5px 8px; border-radius: 99px; color: var(--danger); background: #faeceb; font-size: 9px; font-weight: 700; }
.alert-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid #edf0ee; }
.alert-item:first-of-type { border-top: 0; }
.alert-icon { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; font-weight: 700; }
.danger { color: var(--danger); background: #faeceb; }
.warning-bg { color: var(--warning); background: #fcf2dc; }
.info { color: #35698a; background: #e7f1f7; }
.alert-item strong { font-size: 11px; }
.alert-item p { margin: 4px 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.alert-item small { color: #99a19d; font-size: 9px; }
.statusbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 0 18px; color: #d1dcd7; background: var(--green); font-size: 9px; }
.statusbar span { display: flex; align-items: center; gap: 5px; }
.status-spacer { margin-left: auto; }
.status-online { width: 6px; height: 6px; border-radius: 50%; background: #55b985; }
.data-page { min-width: 0; }
.planning-controls { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.planning-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.planning-controls input, .planning-controls select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.planning-control-actions { display: flex; gap: 7px; }
.planning-control-actions button { min-width: 145px; white-space: nowrap; }
.planning-publication-status { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.planning-publication-status .data-message { margin: 0; }
.planning-status-badge { flex: none; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.planning-status-badge.is-preview { color: #775817; background: #fff0c9; }
.planning-status-badge.is-published { color: #28604c; background: #dceee7; }
.planning-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.planning-summary .metric-card strong { font-size: 23px; }
.planning-issues { margin-bottom: 18px; padding: 18px 20px; border: 1px solid #ead7bc; border-radius: 10px; background: #fffaf2; }
.planning-issues .panel-heading { margin-bottom: 8px; }
.planning-issue { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid #f0e4d2; color: var(--muted); font-size: 11px; }
.planning-issue strong { color: var(--warning); }
.planning-issue-actions { display: flex; align-items: center; gap: 9px; }
.planning-issues > summary { cursor: pointer; list-style: none; }
.planning-issues > summary::-webkit-details-marker { display: none; }
.planning-details-indicator::before { content: 'Expandir'; display: inline-block; min-width: 54px; color: var(--green-3); font-size: 10px; font-weight: 700; text-align: right; }
.planning-issues[open] .planning-details-indicator::before { content: 'Recolher'; }
.planning-issues:not([open]) .panel-heading { margin-bottom: 0; }
.planning-gantt-panel { margin-bottom: 18px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.planning-gantt-panel .panel-heading { margin-bottom: 14px; }
.planning-gantt-panel .panel-heading small { color: var(--muted); font-size: 10px; }
.planning-gantt-actions { display: flex; align-items: end; gap: 14px; }
.planning-export-actions { display: flex; gap: 6px; }
.planning-export-actions button { width: 38px; height: 36px; padding: 8px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--green-3); background: white; cursor: pointer; }
.planning-export-actions button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.planning-export-actions button:hover { border-color: var(--green-2); background: var(--surface-soft); }
.planning-gantt-actions label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.planning-gantt-actions select { min-width: 210px; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.planning-gantt-actions label:last-child select { min-width: 100px; }
.planning-gantt { overflow-x: auto; max-height: none; border: 1px solid var(--line); border-radius: 8px; background: white; --gantt-info-width: 468px; --gantt-day-width: 96px; }
.planning-gantt-grid { position: relative; min-width: max-content; }
.planning-gantt-header, .planning-gantt-row { display: grid; grid-template-columns: var(--gantt-info-width) auto; min-height: 48px; }
.planning-gantt-header { position: sticky; z-index: 5; top: 0; min-height: 46px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.planning-gantt-info { position: sticky; z-index: 3; left: 0; display: grid; grid-template-columns: 86px 78px 78px 138px 88px; align-items: center; min-width: var(--gantt-info-width); padding: 0 10px; border-right: 1px solid var(--line); background: white; }
.planning-gantt-header .planning-gantt-info { z-index: 7; background: var(--surface-soft); }
.planning-gantt-info span { overflow: hidden; padding: 0 6px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.planning-gantt-header .planning-gantt-info span { color: var(--muted); font-weight: 700; text-transform: uppercase; }
.planning-gantt-days { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--gantt-day-width); min-width: max-content; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--gantt-day-width) - 1px), var(--line) calc(var(--gantt-day-width) - 1px), var(--line) var(--gantt-day-width)); }
.planning-gantt-day { display: grid; place-items: center; width: var(--gantt-day-width); color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; }
.planning-gantt-day.is-non-working { color: #8f8178; background: #eeeae6; }
.planning-gantt-day.is-past-working { background: #e9edeb; }
.planning-gantt-day.is-holiday { color: #8b554d; background: #eaded9; }
.planning-gantt-day.is-today { color: #8f302d; background: #fff2f0; font-weight: 850; }
.planning-gantt-day.is-today.is-non-working { background: #eadfda; }
.planning-gantt-today-marker { position: absolute; z-index: 6; top: 0; bottom: 0; width: 2px; background: #d75d56; box-shadow: 0 0 0 1px rgb(255 255 255 / 55%); pointer-events: none; }
.planning-gantt-today-marker span { position: sticky; top: 4px; display: block; width: max-content; margin: 4px 0 0 5px; padding: 2px 5px; border-radius: 4px; color: white; background: #c94f49; font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.planning-gantt-row { border-bottom: 1px solid #edf0ee; }
.planning-gantt-total { display: grid; grid-template-columns: var(--gantt-info-width) auto; min-height: 38px; border-bottom: 2px solid #b9c9c3; color: var(--green); background: #f1f6f4; }
.planning-gantt-total-label { position: sticky; z-index: 3; left: 0; display: flex; align-items: center; justify-content: space-between; min-width: var(--gantt-info-width); padding: 0 16px; border-right: 1px solid #cbd8d3; background: #eaf2ef; font-size: 10px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.planning-gantt-total-label strong { color: var(--green-3); font-size: 10px; }
.planning-gantt-total-label { cursor: help; }
.planning-gantt-total-label:focus-visible { outline: 3px solid rgba(112,139,129,.28); outline-offset: -3px; }
.planning-gantt-total-days { display: grid; grid-auto-flow: column; grid-auto-columns: var(--gantt-day-width); min-width: max-content; }
.planning-gantt-total-days span { display: grid; place-items: center; width: var(--gantt-day-width); border-right: 1px solid #d5e0dc; color: #91a09a; font-size: 9px; font-weight: 700; }
.planning-gantt-total-days span.has-quantity { color: var(--green); background: #dfece7; font-weight: 850; }
.planning-gantt-total-days span.is-non-working { color: #a29790; background: #eeeae6; }
.planning-gantt-total-days span.is-past-working { background: #e9edeb; }
.planning-gantt-section { position: sticky; z-index: 4; left: 0; display: flex; align-items: center; min-height: 34px; padding: 0 14px; border-bottom: 1px solid #cfdbd6; color: var(--green); background: #dfe9e5; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.planning-gantt-row:hover .planning-gantt-info { background: #f8faf9; }
.planning-gantt-track { position: relative; min-height: 48px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--gantt-day-width) - 1px), #e6ece9 calc(var(--gantt-day-width) - 1px), #e6ece9 var(--gantt-day-width)); }
.planning-gantt-non-working-day { position: absolute; top: 0; bottom: 0; background: #f1eeeb; border-right: 1px solid #ded8d3; pointer-events: none; }
.planning-gantt-past-working-day { position: absolute; top: 0; bottom: 0; background: #f0f2f1; border-right: 1px solid #dfe4e2; pointer-events: none; }
.planning-gantt-bar { z-index: 1; }
.planning-gantt-bar { position: absolute; top: 9px; height: 30px; min-width: 34px; overflow: hidden; padding: 0 3px; border: 1px solid #59786c; border-radius: 6px; color: white; background: #708b81; box-shadow: 0 2px 6px rgba(31,48,43,.16); font-size: 8px; font-weight: 800; line-height: 28px; letter-spacing: -.02em; text-align: center; text-overflow: clip; white-space: nowrap; cursor: grab; touch-action: none; user-select: none; transition: box-shadow .15s ease, filter .15s ease; }
.planning-gantt-bar.is-dragging { z-index: 8; cursor: grabbing; filter: saturate(1.15); box-shadow: 0 8px 18px rgba(31,48,43,.3); }
.planning-gantt-bar.is-late { border-color: #a8433f; background: #bd5b56; }
.planning-gantt-bar.is-fixed { border-style: dashed; background: #526f65; }
.planning-gantt-bar.is-started { background: #82918c; }
.planning-gantt-bar.is-started[style*="--completed-percent"] { background: linear-gradient(to right, #82918c 0, #82918c var(--completed-percent), #708b81 var(--completed-percent), #708b81 100%); }
.planning-gantt-bar.is-late.is-started[style*="--completed-percent"] { background: linear-gradient(to right, #82918c 0, #82918c var(--completed-percent), #bd5b56 var(--completed-percent), #bd5b56 100%); }
.planning-gantt-bar:focus-visible { outline: 3px solid rgba(200,156,67,.38); outline-offset: 2px; }
.planning-gantt-tooltip { position: fixed; z-index: 1000; width: min(330px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; overflow-x: hidden; overflow-y: auto; border: 1px solid rgba(32,62,52,.16); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.98); box-shadow: 0 14px 36px rgba(22,43,36,.2), 0 3px 9px rgba(22,43,36,.1); opacity: 0; pointer-events: none; transform: translateY(5px) scale(.98); transition: opacity .14s ease, transform .14s ease; backdrop-filter: blur(8px); }
.planning-gantt-tooltip.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.planning-tooltip-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: white; background: linear-gradient(135deg, #27483d, #55776b); }
.planning-tooltip-header strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.planning-tooltip-header span { flex: none; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.planning-tooltip-header .is-late { color: #8f302d; background: #ffe4e1; }
.planning-tooltip-header .is-on-time { color: #244e3f; background: #dceee7; }
.planning-tooltip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px 15px 12px; }
.planning-tooltip-meta div, .planning-tooltip-period { display: grid; gap: 3px; min-width: 0; }
.planning-tooltip-meta small, .planning-tooltip-period small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.planning-tooltip-meta span { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.planning-tooltip-meta div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.planning-tooltip-period { position: relative; padding: 12px 62px 13px 15px; border-top: 1px solid var(--line); background: #f7faf8; }
.planning-tooltip-period span { font-size: 10px; font-weight: 650; }
.planning-tooltip-period em { position: absolute; right: 14px; bottom: 12px; padding: 4px 7px; border-radius: 5px; color: var(--green-3); background: #e3ece8; font-size: 9px; font-style: normal; font-weight: 800; }
.planning-tooltip-delivery { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-top: 1px solid var(--line); background: white; }
.planning-tooltip-delivery small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.planning-tooltip-delivery strong { color: var(--green-3); font-size: 10px; text-align: right; }
.planning-tooltip-delivery.is-late strong { color: var(--danger); }
.planning-tooltip-hint { padding: 9px 15px; border-top: 1px solid var(--line); color: var(--muted); background: #f4f8f6; font-size: 8px; font-weight: 700; text-align: center; }
.order-planning-search { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.order-planning-search label { display: grid; flex: 1; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.order-planning-search input { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.order-route-panel { padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.order-route-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.order-route-heading-actions { display: flex; align-items: center; gap: 14px; }
.planning-export-actions button:disabled { cursor: not-allowed; opacity: .45; }
.order-route-legend i { width: 9px; height: 9px; margin-left: 7px; border-radius: 2px; background: #82918c; }
.order-route-legend i:nth-of-type(2) { background: #708b81; }.order-route-legend i:nth-of-type(3) { background: #bd5b56; }
.order-route-gantt { overflow: auto; border: 1px solid var(--line); border-radius: 8px; --route-info-width: 700px; --route-day-width: 58px; }
.order-route-days span.is-today { color: #8f302d; background: #fff2f0; font-weight: 850; }
.order-route-grid { min-width: max-content; }
.order-route-header,.order-route-row { display: grid; grid-template-columns: var(--route-info-width) auto; min-height: 52px; }
.order-route-header { position: sticky; z-index: 5; top: 0; min-height: 44px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.order-route-info { position: sticky; z-index: 3; left: 0; display: grid; grid-template-columns: 235px 130px 120px 120px 95px; align-items: center; min-width: var(--route-info-width); padding: 0 8px; border-right: 1px solid var(--line); background: white; }
.order-route-header .order-route-info { z-index: 6; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.order-route-info > span { overflow: hidden; padding: 0 7px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-route-operation { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding-left: calc(7px + var(--route-depth) * 18px) !important; font-weight: 750; }
.order-route-operation > span { overflow: hidden; text-overflow: ellipsis; }
.order-times-button { flex: none; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--green-3); background: white; font: inherit; font-size: 8px; font-weight: 750; cursor: pointer; }
.order-times-button:hover { border-color: var(--green-2); background: var(--surface-soft); }
.order-times-dialog { width: min(920px, calc(100vw - 32px)); }
.order-times-dialog .data-table-wrap { max-height: 55vh; }
.order-times-alert { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; margin-top: 12px; padding: 9px 13px; border-radius: 7px; color: #fff; box-shadow: 0 3px 10px rgb(30 48 42 / 14%); font-size: 10px; font-weight: 650; line-height: 1.35; }
.order-times-alert-icon { display: grid; flex: 0 0 18px; place-items: center; width: 18px; height: 18px; }
.order-times-alert-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.order-times-alert-text { min-width: 0; }
.order-times-alert.is-info { background: #2d6f95; }
.order-times-alert.is-success { background: #39745f; }
.order-times-alert.is-warning { color: #392b0d; background: #e9b949; }
.order-times-alert.is-error { background: #b84f4b; }
.order-route-operation::before { content: '↳'; margin-right: 5px; color: var(--green-2); }.order-route-operation[style*="--route-depth: 0"]::before { content: '●'; font-size: 7px; }
.order-route-days { display: grid; grid-auto-flow: column; grid-auto-columns: var(--route-day-width); min-width: max-content; }
.order-route-days span { display: grid; place-items: center; width: var(--route-day-width); color: var(--muted); font-size: 9px; font-weight: 700; }
.order-route-row { border-bottom: 1px solid #edf0ee; }.order-route-row:hover .order-route-info { background: #f8faf9; }
.order-route-track { position: relative; min-height: 52px; background-image: repeating-linear-gradient(to right,transparent 0,transparent calc(var(--route-day-width) - 1px),#e5ebe8 calc(var(--route-day-width) - 1px),#e5ebe8 var(--route-day-width)); }
.order-route-non-working-day { position: absolute; top: 0; bottom: 0; background: #f1eeeb; border-right: 1px solid #ded8d3; pointer-events: none; }
.order-route-past-working-day { position: absolute; top: 0; bottom: 0; background: #f0f2f1; border-right: 1px solid #dfe4e2; pointer-events: none; }
.order-route-days span.is-non-working { color: #8f8178; background: #eeeae6; }
.order-route-days span.is-past-working { background: #e9edeb; }
.order-route-days span.is-holiday { color: #8b554d; background: #eaded9; }
.order-route-bar { position: absolute; top: 11px; z-index: 2; height: 30px; min-width: 7px; overflow: hidden; padding: 0 8px; border-radius: 6px; color: white; background: #708b81; font-size: 9px; font-weight: 700; line-height: 30px; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 6px rgba(31,48,43,.15); }
.order-route-bar { cursor: help; }
.order-route-bar:focus-visible { outline: 3px solid rgba(200,156,67,.38); outline-offset: 2px; }
.order-route-bar.is-completed { background: #82918c; }.order-route-bar.is-progress { background: #c4973f; }.order-route-bar.is-late { background: #bd5b56; }
.planning-alert-order { padding: 0; border: 0; color: #295f50; background: transparent; font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.planning-alert-severity { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.planning-alert-severity.is-critical { color: #8f302d; background: #ffe4e1; }
.planning-alert-severity.is-warning { color: #775411; background: #fff1ca; }
.order-route-delivery { position: absolute; z-index: 1; top: 0; bottom: 0; width: 2px; background: #d14842; }
.holiday-toolbar { display: grid; grid-template-columns: 180px minmax(220px, 1fr) 130px auto auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.holiday-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.holiday-toolbar input[type="date"], .holiday-toolbar input[type="text"], .holiday-toolbar input:not([type]), .holiday-toolbar select { height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.holiday-toolbar .holiday-active { display: flex; align-items: center; height: 39px; gap: 7px; }
.holiday-calendar-panel { margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.holiday-calendar-header { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; margin-bottom: 12px; }
.holiday-calendar-header > div { display: flex; align-items: center; justify-content: center; gap: 10px; }
.holiday-calendar-header strong { min-width: 155px; color: var(--ink); font-size: 15px; text-align: center; text-transform: capitalize; }
.holiday-calendar-header button { min-width: 38px; height: 36px; }
.holiday-calendar-header #holidayCurrentMonth { height: auto; padding: 4px 8px; border: 0; color: var(--green-3); background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.holiday-calendar-legend { display: flex; justify-content: center; gap: 18px; margin: -3px 0 12px; color: var(--muted); font-size: 9px; font-weight: 700; }
.holiday-calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.holiday-calendar-legend i { display: grid; place-items: center; width: 17px; height: 17px; color: white; font-size: 8px; font-style: normal; font-weight: 900; }
.holiday-calendar-legend .is-fixed i { border-radius: 50%; background: #3e7162; }
.holiday-calendar-legend .is-variable i { border-radius: 4px; background: #bd7b35; }
.holiday-calendar-legend .is-inactive i { border: 1px dashed #9ca7a2; border-radius: 4px; background: #e7eae8; }
.holiday-calendars { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; }
.holiday-calendar-month { min-width: 0; padding: 10px; border: 1px solid #e3e9e6; border-radius: 9px; background: #fafcfb; }
.holiday-calendar-month h3 { margin: 0 0 7px; color: var(--ink); font-size: 12px; text-align: center; text-transform: capitalize; }
.holiday-calendar-weekdays, .holiday-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.holiday-calendar-weekdays span { padding: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; }
.holiday-calendar-day { position: relative; min-height: 46px; padding: 6px; border: 1px solid #e0e7e4; border-radius: 6px; color: var(--ink); background: #fbfcfb; text-align: left; cursor: pointer; }
.holiday-calendar-day:hover { border-color: var(--green-2); background: #f2f7f5; }
.holiday-calendar-empty { min-height: 46px; }
.holiday-calendar-day.is-weekend { background: #f1eeeb; }
.holiday-calendar-day.is-today { box-shadow: inset 0 0 0 2px #c89c43; }
.holiday-calendar-day.is-holiday { font-weight: 850; }
.holiday-calendar-day.is-fixed { border-color: #6c9b8d; color: #285447; background: #dcebe6; }
.holiday-calendar-day.is-variable { border-color: #d6a269; color: #754719; background: #f5e6d2; }
.holiday-calendar-day.is-fixed::after { content: '◆'; position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: white; background: #3e7162; font-size: 7px; font-weight: 900; }
.holiday-calendar-day.is-variable::after { content: '↕'; position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 4px; color: white; background: #bd7b35; font-size: 10px; font-weight: 900; }
.holiday-calendar-day small { display: block; overflow: hidden; margin-top: 5px; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.holiday-calendar-day.is-inactive { opacity: .58; filter: grayscale(.35); }
.holiday-calendar-help { margin: 10px 2px 0; color: var(--muted); font-size: 9px; }
@media (max-width: 980px) { .holiday-calendars { overflow-x: auto; grid-template-columns: repeat(3, minmax(270px, 1fr)); } }
.order-route-state { font-weight: 750; }.order-route-state.state-atrasada { color: var(--danger); }.order-route-state.state-concluída { color: #667770; }
.planning-capacity-tooltip-body { display: grid; gap: 5px; padding: 15px; background: #f8fbf9; }
.planning-capacity-tooltip-body small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.planning-capacity-tooltip-body strong { color: var(--green); font-size: 17px; }
.planning-capacity-tooltip-body span { color: var(--muted); font-size: 10px; }
.planning-gantt-empty { padding: 28px; color: var(--muted); font-size: 12px; text-align: center; }
.planning-gantt-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.planning-gantt-pagination button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; cursor: pointer; }
.planning-gantt-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.planning-details { margin-top: 14px; }
.planning-details summary { margin-bottom: 12px; color: var(--green-3); font-size: 11px; font-weight: 700; cursor: pointer; }
.planning-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.planning-toolbar > span { color: var(--muted); font-size: 11px; }
.planning-table-wrap { max-height: calc(100dvh - 500px); }
.planning-late { color: var(--danger); font-weight: 700; }
.planning-ok { color: var(--green-3); font-weight: 700; }
.table-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.table-toolbar > span { color: var(--muted); font-size: 11px; }
.product-list-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #f3f6f5; }
.product-list-tabs button { min-height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.product-list-tabs button:hover { color: var(--green); background: rgba(255,255,255,.7); }
.product-list-tabs button[aria-selected="true"] { border-color: #bfd2ca; color: var(--green); background: white; box-shadow: 0 3px 9px rgba(28,67,54,.08); }
.packing-date-filters { display: flex; align-items: end; gap: 8px; }
.packing-date-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.packing-date-filters input { height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: white; font: inherit; font-size: 11px; }
.packing-date-filters input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.table-search { display: grid; gap: 5px; width: min(360px, 100%); color: var(--muted); font-size: 10px; font-weight: 600; }
.table-search input { height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: white; }
.table-search input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.data-table-wrap { overflow: auto; max-height: calc(100vh - 345px); border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 2px 10px rgba(23,33,28,.035); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { position: sticky; z-index: 2; top: 0; padding: 11px 13px; color: var(--muted); background: var(--surface-soft); box-shadow: 0 1px 0 var(--line); font-size: 10px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
.data-table thead th.is-sortable { padding-right: 28px; cursor: pointer; user-select: none; }
.data-table thead th.is-sortable::after { position: absolute; right: 10px; color: #9caaa5; content: '\2195'; font-size: 11px; }
.data-table thead th.is-sortable:hover, .data-table thead th.is-sortable:focus-visible { color: var(--green); background: #e8efec; outline: none; }
.data-table thead th[aria-sort="ascending"]::after { color: var(--green); content: '\2191'; }
.data-table thead th[aria-sort="descending"]::after { color: var(--green); content: '\2193'; }
.data-table td { max-width: 280px; overflow: hidden; padding: 11px 13px; border-top: 1px solid #edf0ee; font-size: 11px; text-overflow: ellipsis; }
.data-table tbody tr:hover { background: #f8faf9; }
.size-chart-split { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.size-chart-filters { justify-content: flex-start; align-items: flex-end; }
.size-chart-filters label { display: grid; gap: 5px; min-width: 170px; color: var(--muted); font-size: 10px; font-weight: 600; }
.size-chart-filters select { height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; font: inherit; }
.size-chart-filters .table-search { width: min(325px, 100%); }
.size-chart-filters > #sizeChartCount { margin-left: auto; padding-bottom: 12px; color: var(--muted); font-size: 10px; }
.size-chart-panel { min-width: 0; }
.size-chart-panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 32px; }
.size-chart-panel-heading h2 { margin: 0; color: var(--ink); font-size: 14px; }
.size-chart-panel-heading span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.size-chart-group-table tbody tr { cursor: pointer; }
.size-chart-group-table tbody tr.is-selected { background: #e9f2ee; box-shadow: inset 3px 0 var(--green-2); }
.size-chart-group-table tbody tr.is-selected:hover { background: #e1ede8; }
.size-chart-group-table tbody tr:focus-visible { outline: 2px solid var(--green-2); outline-offset: -2px; }
@media (max-width: 900px) { .size-chart-split { grid-template-columns: 1fr; } .size-chart-panel .data-table-wrap { max-height: 330px; } }
.data-table tbody tr.is-inactive-record { color: #8e625f; background: #fff5f4; }
.data-table tbody tr.is-inactive-record:hover { background: #ffedeb; }
.record-status { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.record-status.is-active { color: #246044; background: #dceee5; }
.record-status.is-inactive { color: #973c37; background: #ffe1de; }
.data-table tbody tr { position: relative; z-index: 0; }
.data-table tbody tr:has(.row-context-menu[open]) { z-index: 50; }
.row-context-cell { position: relative; z-index: 1; width: 46px; overflow: visible; text-align: right; }
.row-context-trigger { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--green-3); background: transparent; font: inherit; font-size: 19px; font-weight: 800; line-height: 1; cursor: pointer; }
.row-context-trigger:hover, .row-context-trigger:focus-visible { border-color: var(--line); background: var(--surface-soft); outline: none; }
.production-context-popup { position: fixed; z-index: 10000; display: grid; min-width: 140px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 30px rgba(22,43,36,.24); }
.production-context-popup button { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 0; border-bottom: 1px solid #edf1ef; color: var(--ink); background: white; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.production-context-popup button svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.production-context-popup button span { flex: 1; }
.production-context-popup button:last-child { border-bottom: 0; }
.production-context-popup button:hover, .production-context-popup button:focus-visible { background: var(--surface-soft); outline: none; }
.production-context-popup button.is-danger { color: var(--danger); }
.row-context-cell:has(.row-context-menu[open]) { z-index: 60; }
.row-context-menu { position: relative; z-index: 1; display: inline-block; }
.row-context-menu[open] { z-index: 70; }
.row-context-menu summary { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 6px; color: var(--green-3); font-size: 19px; font-weight: 800; line-height: 1; cursor: pointer; list-style: none; }
.row-context-menu summary::-webkit-details-marker { display: none; }
.row-context-menu[open] summary { border-color: var(--line); background: var(--surface-soft); }
.row-context-menu > div { position: absolute; z-index: 80; top: 34px; right: 0; display: grid; min-width: 130px; overflow: hidden; isolation: isolate; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 10px 24px rgba(22,43,36,.22); }
.row-context-menu > div button { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 0; border-bottom: 1px solid #edf1ef; color: var(--ink); background: white; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.row-context-menu > div button svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row-context-menu > div button:last-child { border-bottom: 0; }
.row-context-menu > div button:hover { background: var(--surface-soft); }
.row-context-menu > div button.is-danger { color: var(--danger); }
.data-table tbody tr:nth-last-child(-n+3) .row-context-menu > div { top: auto; bottom: 34px; }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.table-action-button { width: 36px; height: 34px; padding: 7px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; cursor: pointer; }
.table-action-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.table-action-button:hover { border-color: var(--green-2); background: var(--surface-soft); }
.table-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.table-pagination select, .table-pagination button { height: 32px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font: inherit; font-size: 11px; }
.table-pagination select { padding: 0 7px; }
.table-pagination button { min-width: 32px; padding: 0 8px; cursor: pointer; }
.table-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.row-action { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-3); background: white; font-size: 10px; cursor: pointer; }
.row-action:hover { border-color: var(--green-2); background: var(--surface-soft); }
.data-message { margin: 14px 2px 0; color: var(--muted); font-size: 11px; }
.record-dialog { width: min(920px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); overflow: hidden; padding: 0; border: 0; border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 28px 80px rgba(18,32,27,.28); }
.record-dialog.product-size-dialog { width: min(1180px, calc(100vw - 32px)); }
.record-dialog.product-dialog { width: min(1280px, calc(100vw - 28px)); max-height: min(900px, calc(100vh - 28px)); }
.record-dialog.manufacturing-order-dialog { width: min(1180px, calc(100vw - 28px)); max-height: min(880px, calc(100vh - 28px)); }
.record-dialog::backdrop { background: rgba(17,31,26,.55); backdrop-filter: blur(2px); }
.record-dialog form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: inherit; }
.record-dialog header, .record-dialog footer { display: flex; align-items: center; gap: 10px; padding: 19px 22px; }
.record-dialog header { justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); color: white; background: var(--green); box-shadow: 0 3px 12px rgba(22,43,36,.14); }
.record-dialog header h2 { color: white; font-size: 18px; }
.record-dialog header .eyebrow { margin-bottom: 3px; color: #bcd0c8; }
.dialog-close { width: 34px; height: 34px; border: 1px solid transparent; border-radius: 7px; color: white; background: transparent; font-size: 24px; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); outline: none; }
.dialog-body { overflow: auto; padding: 20px 22px 25px; }
.dialog-message { min-height: 15px; margin-bottom: 8px; color: var(--danger); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.product-size-fields { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px 8px; }
.form-grid.product-dialog-host { display: block; }
.product-dialog-layout { display: grid; gap: 18px; }
.product-dialog-summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 19px; border: 1px solid #dce8e3; border-radius: 11px; background: linear-gradient(135deg,#f4f9f7,#fbfcfb); }
.product-dialog-summary > div { display: grid; gap: 3px; min-width: 0; }
.product-dialog-summary span:first-child { color: var(--green-2); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.product-dialog-summary strong { overflow: hidden; color: var(--green); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.product-dialog-summary small { color: var(--muted); font-size: 10px; }
.product-dialog-status { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #bcd9cd; border-radius: 999px; color: #25664f; background: #eaf6f1; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.product-dialog-identity { overflow: hidden; border: 1px solid #cfded8; border-radius: 11px; background: white; box-shadow: 0 5px 16px rgba(28,67,54,.05); }
.product-identity-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #dfe8e4; background: #f5f8f7; }
.product-identity-heading strong { color: var(--green); font-size: 10px; }
.product-identity-heading small { color: var(--muted); font-size: 8px; }
.product-identity-grid { display: grid; grid-template-columns: 1.15fr 1fr .8fr 1fr; gap: 13px; padding: 14px; }
.product-identity-grid label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.product-identity-grid input, .product-identity-grid select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: #fbfcfb; font-size: 11px; }
.product-identity-grid input:focus, .product-identity-grid select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.product-identity-grid input:disabled, .product-identity-grid select:disabled { color: #8a9892; background: var(--surface-soft); }
.product-dialog-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #f3f6f5; }
.product-dialog-tab { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; color: #71817b; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.product-dialog-tab > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #cedbd6; border-radius: 8px; color: #71847c; background: white; font-size: 9px; font-weight: 800; }
.product-dialog-tab > span:last-child { display: grid; gap: 2px; min-width: 0; }
.product-dialog-tab strong { font-size: 11px; }
.product-dialog-tab small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.product-dialog-tab[aria-selected="true"] { border-color: #bad2c9; color: var(--green); background: white; box-shadow: 0 4px 12px rgba(28,67,54,.08); }
.product-dialog-tab[aria-selected="true"] > span:first-child { border-color: var(--green-2); color: white; background: var(--green-2); }
.product-dialog-tab:focus-visible { outline: 3px solid rgba(112,139,129,.2); }
.product-tab-panel { min-height: 315px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.product-tab-panel.is-section-collapsed { min-height: 0; }
.product-tab-panel[data-product-panel="product"] { display: flex; min-height: 540px; flex-direction: column; }
.product-tab-panel[data-product-panel="product"].is-hidden { display: none; }
.product-tab-heading { margin-bottom: 15px; padding-bottom: 11px; border-bottom: 1px solid #e8eeeb; }
.product-section-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.product-section-toggle:hover h3, .product-section-toggle:hover strong { color: var(--green-2); }
.product-section-toggle:focus-visible { border-radius: 6px; outline: 3px solid rgba(112,139,129,.18); }
.product-section-indicator { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; border: 1px solid #cedbd6; border-radius: 7px; color: var(--green-2); background: #f7faf8; font-size: 16px; transition: transform .16s ease; }
.product-section-toggle[aria-expanded="false"] .product-section-indicator { transform: rotate(-90deg); }
.product-tab-heading h3 { color: var(--green); font-size: 13px; }
.product-tab-heading p { margin-top: 3px; color: var(--muted); font-size: 9px; }
.product-fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; }
.product-fields-grid[hidden], .product-supplier-grid[hidden] { display: none; }
.product-fields-grid label { min-width: 0; }
.product-fields-grid .pair-first { grid-column: 1; }
.product-fields-grid .pair-second { grid-column: 2; }
.product-combined-field { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(150px,.42fr) minmax(280px,1fr); align-items: center; gap: 14px; padding: 11px 13px; border: 1px solid #dfe8e4; border-radius: 9px; background: #f8faf9; }
.product-combined-label { color: var(--green); font-size: 10px; font-weight: 750; }
.product-combined-controls { display: grid; grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); align-items: center; gap: 7px; }
.product-combined-controls input { text-align: center; }
.product-combined-separator { color: var(--green-2); font-size: 15px; font-weight: 800; text-align: center; }
.product-supplier-section { margin-top: auto; padding-top: 22px; }
.product-supplier-heading { padding-top: 15px; border-top: 1px solid #dfe8e4; }
.product-supplier-heading > span:first-child { display: grid; gap: 2px; }
.product-supplier-heading strong { color: var(--green); font-size: 11px; }
.product-supplier-heading small { color: var(--muted); font-size: 8px; }
.product-supplier-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; margin-top: 12px; }
.product-supplier-grid label { display: grid; min-width: 0; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.product-supplier-grid input, .product-supplier-grid select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: #fbfcfb; font-size: 11px; }
.product-fields-grid label:has(input[name="ProductDescription"]), .product-fields-grid label:has(input[name="DocumentDescription"]), .product-fields-grid label:has(input[name="ProductNotes"]), .product-fields-grid label:has(input[name="Annotations"]), .product-fields-grid label:has(input[name="Finishing"]) { grid-column: span 2; }
.product-size-fields .product-size-main-field { grid-column: span 5; }
.product-size-fields .product-size-field { min-width: 0; }
.product-size-fields .product-size-field input { padding-inline: 7px; text-align: center; }
.form-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.form-grid input, .form-grid select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; outline: none; color: var(--ink); background: #fbfcfb; font-size: 11px; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.form-grid input:disabled, .form-grid select:disabled { color: #8a9892; background-color: var(--surface-soft); }
.form-grid .lookup-field { position: relative; gap: 5px; }
.form-grid .lookup-select { height: 42px; padding: 0 40px 0 12px; appearance: none; border-color: #bfcfc9; color: var(--green); background-color: white; background-image: linear-gradient(45deg, transparent 50%, #587268 50%), linear-gradient(135deg, #587268 50%, transparent 50%), linear-gradient(to right, #e1e9e5, #e1e9e5); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px, calc(100% - 34px) 8px; background-size: 5px 5px, 5px 5px, 1px 25px; background-repeat: no-repeat; font-weight: 650; cursor: pointer; }
.form-grid .lookup-select:hover { border-color: var(--green-2); background-color: #fbfdfc; }
.form-grid .lookup-select:disabled { cursor: default; opacity: 1; }
.manufacturing-order-form { display: block; }
.manufacturing-order-layout { display: grid; gap: 14px; }
.manufacturing-order-header, .manufacturing-order-section { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.manufacturing-order-header > h3 { padding: 12px 16px; color: white; background: var(--green); font-size: 14px; text-align: center; }
.manufacturing-order-section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--green); background: #f5f8f7; }
.manufacturing-order-section > header small { color: var(--muted); font-size: 9px; }
.manufacturing-order-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px 16px; padding: 16px; }
.manufacturing-order-fields label { min-width: 0; }
.manufacturing-order-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.manufacturing-order-tabs span { padding: 9px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; color: var(--green); background: white; font-size: 10px; font-weight: 750; }
.manufacturing-order-tabs span:last-child { color: var(--muted); background: #f5f7f6; }
.manufacturing-order-production { border-top-left-radius: 0; }
.manufacturing-order-field-ProductCode, .manufacturing-order-field-RequisitionNumber { grid-column: span 2; }
.manufacturing-order-field-EntityCode, .manufacturing-order-field-SecondaryEntityCode { grid-column: span 2; }
@media (max-width: 800px) { .manufacturing-order-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.lookup-field-hint { color: #83938d; font-size: 8px; font-weight: 500; letter-spacing: .01em; }
.password-input-control { position: relative; display: flex; align-items: center; }
.password-input-control input { padding-right: 66px; }
.password-view-button { position: absolute; right: 5px; height: 28px; padding: 0 9px; border: 0; border-left: 1px solid var(--line); color: var(--green-3); background: transparent; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.password-view-button:hover, .password-view-button:focus-visible { color: var(--green); background: var(--surface-soft); outline: none; }
.account-dialog { width: min(560px, calc(100vw - 32px)); }
.schedule-dialog { width: min(980px, calc(100vw - 32px)); }
.schedule-days { display: grid; gap: 13px; }
.schedule-day { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; }
.schedule-day-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 13px; border-bottom: 1px solid var(--line); }
.schedule-day h3 { color: var(--green-3); font-size: 12px; }
.schedule-day-actions { display: flex; align-items: center; gap: 6px; }
.schedule-replicate, .schedule-clear { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-3); background: white; font: inherit; font-size: 10px; font-weight: 600; cursor: pointer; }
.schedule-replicate:hover { border-color: var(--green-2); background: var(--surface-soft); }
.schedule-clear { color: var(--danger); }
.schedule-clear:hover { border-color: #e7c4c1; background: #fff8f7; }
.dialog-message.is-success { color: var(--green-3); }
.schedule-shifts { display: grid; grid-template-columns: 64px repeat(4, minmax(105px, 1fr)); align-items: center; gap: 8px 12px; padding: 10px 13px 13px; }
.schedule-heading { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.schedule-shifts strong { color: var(--muted); font-size: 11px; }
.schedule-shifts input { width: 100%; height: 35px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; font: inherit; }
.schedule-shifts input:focus { border-color: var(--green-2); outline: none; box-shadow: 0 0 0 3px rgba(112,139,129,.13); }
.account-help { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.compact-field input { text-align: center; }
#sizeChartDialog { width: min(1180px, calc(100vw - 32px)); }
#sizeChartFields .size-fields-group { grid-column: 1 / -1; min-width: 0; margin: 2px 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
#sizeChartFields .size-fields-group legend { padding: 0 7px; color: var(--green-3); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
#sizeChartFields .size-fields-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 9px; }
#sizeChartFields .size-fields-grid label { min-width: 0; text-align: center; }
#sizeChartFields .size-fields-grid input { min-width: 0; padding-inline: 5px; }
@media (max-width: 900px) { #sizeChartFields .size-fields-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 560px) { #sizeChartFields .size-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.record-dialog footer { border-top: 1px solid var(--line); background: #fafbfa; }
.dialog-spacer { flex: 1; }
.secondary-button, .danger-button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.secondary-button { color: var(--ink); }
.danger-button { border-color: #e7c4c1; color: var(--danger); background: #fff8f7; }
.danger-button:hover { background: #faeceb; }
.stock-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.table-loading { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #d9e7e1; border-radius: 8px; background: #f2f8f5; color: var(--green-1); font-size: 13px; }
.table-loading span { display: inline-block; font-size: 20px; animation: stock-hourglass 1.2s steps(2, end) infinite; }
@keyframes stock-hourglass { to { transform: rotate(180deg); } }
.stock-summary .metric-card strong { font-size: 20px; }
.stock-table-wrap { max-height: calc(100dvh - 410px); }
.stock-negative { color: var(--danger) !important; font-weight: 700; }
.stock-sizes { display: grid; gap: 16px; margin-top: 22px; }
.stock-size-card { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.stock-size-card h3 { margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.stock-size-table { min-width: 850px; }
.operational-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.shop-floor-toolbar { display: flex; align-items: end; gap: 16px; margin-bottom: 14px; }
.shop-floor-toolbar label { display: grid; gap: 5px; min-width: 290px; color: var(--muted); font-size: 10px; font-weight: 700; }
.shop-floor-toolbar select { height: 40px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.shop-floor-toolbar input { height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.shop-floor-toolbar span { margin-left: auto; padding-bottom: 10px; color: var(--muted); font-size: 10px; }
.shop-floor-week-navigation { display: flex; align-items: center; gap: 6px; height: 40px; }
.shop-floor-week-navigation button { height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--green-3); background: white; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.shop-floor-week-navigation strong { min-width: 150px; color: var(--ink); font-size: 10px; text-align: center; }
.shop-floor-tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 4px; width: max-content; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.shop-floor-tabs button { padding: 7px 18px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.shop-floor-tabs button.is-active { color: white; background: var(--green-3); box-shadow: 0 1px 4px rgba(25,52,43,.2); }
.shop-floor-table-wrap { max-height: calc(100dvh - 330px); }
.shop-floor-chart { min-width: 800px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: white; }
.shop-floor-chart-header, .shop-floor-chart-row { display: grid; grid-template-columns: 190px minmax(700px, 1fr); min-height: 54px; border-bottom: 1px solid var(--line); }
.shop-floor-chart-header { min-height: 42px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 700; }
.shop-floor-chart-row { min-height: 22px; }
.shop-floor-machine { display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; border-right: 1px solid var(--line); }
.shop-floor-machine small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.shop-floor-timeline { position: relative; min-height: 54px; background-image: linear-gradient(to right, transparent 99%, var(--line) 99%); background-size: calc(100% / 15) 100%; }
.shop-floor-order-track { min-width: 0; }
.shop-floor-order-lane { position: relative; height: 22px; border-bottom: 1px solid #eef2f0; background-image: linear-gradient(to right, transparent 99%, var(--line) 99%); }
.shop-floor-inactive-day { position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none; background: #edf1ef; }
.shop-floor-order-lane:last-child { border-bottom: 0; }
.shop-floor-order-lane .shop-floor-bar { top: 2px; z-index: 1; height: 18px; min-width: 58px; padding: 0 4px; border-radius: 4px; font-size: 8px; line-height: 18px; letter-spacing: -.02em; text-align: center; }
.shop-floor-order-lane .shop-floor-bar.is-locked { padding-left: 18px; }
.shop-floor-lock-icon { position: absolute; left: 4px; font-size: 9px; line-height: inherit; }
.shop-floor-order-code { display: block; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.shop-floor-axis { display: grid; grid-template-columns: repeat(7, 1fr); align-items: center; text-align: center; }
.shop-floor-axis span { align-self: stretch; display: grid; place-items: center; }
.shop-floor-axis span.is-inactive-day { color: #7f8c87; background: #e4eae7; }
.shop-floor-bar { position: absolute; top: 10px; height: 34px; min-width: 58px; overflow: hidden; padding: 0 5px; border-radius: 5px; color: white; background: var(--green-2); font-size: 8px; font-weight: 800; line-height: 34px; text-align: center; text-overflow: clip; white-space: nowrap; }
.shop-floor-bar.is-late { background: var(--danger); }
.shop-floor-bar { touch-action: none; cursor: grab; }
.shop-floor-bar.is-dragging { z-index: 4; cursor: grabbing; opacity: .78; box-shadow: 0 5px 14px rgba(20,48,39,.3); }
.shop-floor-bar.is-locked { cursor: not-allowed; filter: saturate(.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.shop-floor-empty-machine { display: grid; place-items: center; height: 100%; color: #9ba8a3; font-size: 10px; }
.shop-floor-approval-actions { display: flex; gap: 6px; white-space: nowrap; }
.shop-floor-approval-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-3); background: white; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.shop-floor-approval-actions button.is-reject { color: var(--danger); }
.shop-floor-decision { display: inline-flex; padding: 4px 7px; border-radius: 999px; color: #6d786f; background: #edf1ef; font-size: 9px; font-weight: 800; }
.shop-floor-decision.is-approved { color: #246044; background: #dceee5; }
.shop-floor-decision.is-rejected { color: #973c37; background: #ffe4e1; }
.shop-floor-production { overflow: hidden; border: 1px solid #d7e2dd; border-radius: 16px; background: #f7faf8; box-shadow: 0 14px 35px rgba(24,54,44,.07); }
.shop-floor-console-header { display: grid; grid-template-columns: auto max-content minmax(420px,1fr) auto; align-items: center; gap: 14px; min-height: 82px; padding: 13px 24px; color: white; background: linear-gradient(112deg,#173d34 0%,#285c4d 68%,#347060 100%); }
.shop-floor-console-symbol { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.22); border-radius: 13px; color: #173d34; background: #d9eee5; font-size: 17px; }
.shop-floor-console-header p { margin: 0 0 2px; color: #bcd4ca; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.shop-floor-console-header h2 { margin: 0; color: white; font-size: 21px; }.shop-floor-console-header div:nth-child(2)>span { display: block; margin-top: 4px; color: #d4e3dd; font-size: 10px; }
.shop-floor-console-online { display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 7px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 99px; color: #e1eee9; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 700; }.shop-floor-console-online i { width: 7px; height: 7px; border-radius: 50%; background: #8ce0b7; box-shadow: 0 0 0 4px rgba(140,224,183,.13); }
.shop-floor-console-layout { min-height: 0; }
.shop-floor-production-steps { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; min-width: 0; padding: 0 12px; background: transparent; }
.shop-floor-production-steps::before { position: absolute; top: 50%; right: calc(16.667% + 18px); left: calc(16.667% + 18px); height: 2px; border-radius: 99px; background: rgba(220,239,231,.35); content: ''; transform: translateY(-50%); }
.shop-floor-production-steps span { position: relative; z-index: 1; display: grid; grid-template-columns: 30px 10px 1fr; align-items: center; gap: 7px; min-height: 40px; padding: 3px 7px; color: rgba(235,246,241,.65); }
.shop-floor-production-steps b { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(224,241,234,.42); border-radius: 8px; color: #e6f2ed; background: rgba(255,255,255,.08); font-size: 8px; }
.shop-floor-production-steps i { z-index: 1; width: 8px; height: 8px; border: 2px solid rgba(36,87,71,.9); border-radius: 50%; background: rgba(222,240,232,.5); }
.shop-floor-production-steps em { width: max-content; padding: 2px 5px; background: transparent; font-size: 9px; font-style: normal; font-weight: 800; }.shop-floor-production-steps small { display: block; margin-top: 2px; font-size: 7px; font-weight: 500; }
.shop-floor-production-steps span.is-active { color: white; }.shop-floor-production-steps span.is-active b { border-color: #9cd6bf; color: #173d34; background: #d9eee5; box-shadow: 0 4px 11px rgba(9,35,27,.2); }.shop-floor-production-steps span.is-active i { background: #8ce0b7; box-shadow: 0 0 0 3px rgba(140,224,183,.2); }
.shop-floor-console-main { display: grid; grid-template-columns: minmax(360px,2fr) minmax(0,3fr); align-items: start; gap: 12px; min-width: 0; padding: 14px 20px 20px; }
.shop-floor-console-main .shop-floor-operation-card { margin-top: 0; }
.shop-floor-console-main.has-operation .shop-floor-operation-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.shop-floor-console-main .shop-floor-quantities { grid-column: 1 / -1; margin-top: 2px; }
.shop-floor-scan-card,.shop-floor-operation-card,.shop-floor-quantities { border: 1px solid #dbe5e0; border-radius: 13px; background: white; box-shadow: 0 3px 12px rgba(23,55,45,.035); }
.shop-floor-scan-card { padding: 15px; }.shop-floor-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding-bottom: 9px; border-bottom: 1px solid #edf1ef; }.shop-floor-card-title span { color: #203c33; font-size: 13px; font-weight: 800; }.shop-floor-card-title small { color: var(--muted); font-size: 9px; }
.shop-floor-scan-form { display: grid; grid-template-columns: minmax(0,1fr); align-items: end; gap: 12px; margin-top: 16px; }.shop-floor-scan-form label { display: grid; gap: 6px; color: #5f716a; font-size: 9px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.shop-floor-scan-input { position: relative; }.shop-floor-scan-input i { position: absolute; top: 50%; left: 14px; color: #548574; font-size: 10px; font-style: normal; transform: translateY(-50%); }
.shop-floor-scan-input input { width: 100%; height: 48px; padding: 0 14px 0 40px; border: 1px solid #bdcec7; border-radius: 9px; color: #1d352d; background: #fbfdfc; font: inherit; font-size: 13px; font-weight: 650; outline: none; }.shop-floor-scan-input input:focus { border-color: #397561; background: white; box-shadow: 0 0 0 4px rgba(57,117,97,.12); }
.shop-floor-scan-form .primary-button { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; height: 48px; font-size: 11px; font-weight: 800; }
.shop-floor-identified { display: flex; align-items: center; gap: 12px; margin-top: 11px; padding: 9px 10px 9px 13px; border: 1px solid #cae2d8; border-left: 4px solid #397561; border-radius: 9px; background: #f0f8f4; }.shop-floor-identified>div { flex: 1; }.shop-floor-identified span,.shop-floor-identified strong { display: block; }.shop-floor-identified span { color: #668077; font-size: 8px; font-weight: 800; text-transform: uppercase; }.shop-floor-identified strong { margin-top: 2px; color: #214f41; font-size: 12px; }
.shop-floor-scan-card .data-message { min-height: 16px; margin: 11px 0 0; font-size: 10px; }
.shop-floor-operation-card { display: grid; gap: 10px; margin-top: 12px; padding: 14px 16px; border-left: 4px solid #397561; }.shop-floor-operation-card h2 { margin: 2px 0 0; font-size: 18px; }.shop-floor-operation-card .panel-heading { margin: 0; }
.shop-floor-operation-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); column-gap: 18px; row-gap: 3px; }.shop-floor-operation-facts span { min-width: 0; padding: 3px 0 6px; border: 0; border-bottom: 1px solid #e5ece8; border-radius: 0; color: #7a8a84; background: transparent; font-size: 8px; font-weight: 700; text-transform: uppercase; }.shop-floor-operation-facts strong { display: block; margin-top: 2px; overflow: hidden; color: #263b34; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }
.shop-floor-operation-action { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 3px; color: #687a73; font-size: 10px; }.shop-floor-operation-action .primary-button { min-width: 210px; min-height: 45px; font-weight: 800; }
.shop-floor-state { padding: 6px 10px; border-radius: 99px; color: #795200; background: #fff4d6; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }.shop-floor-state.is-running { color: #245e4a; background: #dff0e8; }.shop-floor-state.is-complete { color: #66736e; background: #edf1ef; }
.shop-floor-quantities { margin-top: 10px; padding: 15px; }.shop-floor-quantities .panel-heading { margin-bottom: 9px; }.shop-floor-quantities .panel-heading>span { max-width: 330px; color: #7b8984; font-size: 9px; text-align: right; }.shop-floor-quantities .data-table-wrap { max-height: 340px; border-radius: 9px; }.shop-floor-quantity-input { width: 90px; padding: 8px; border: 1px solid #c6d3ce; border-radius: 7px; text-align: right; font: inherit; font-weight: 750; }.shop-floor-quantity-input:focus { border-color: #397561; outline: none; box-shadow: 0 0 0 3px rgba(57,117,97,.1); }.shop-floor-quantity-cell small { display: block; margin-bottom: 4px; color: #899690; font-size: 8px; }
.shop-floor-quantity-heading-side { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }.shop-floor-quantity-heading-side>#shopFloorQuantityStatus { max-width: 330px; color: #7b8984; font-size: 9px; text-align: right; }.shop-floor-production-timer { display: grid; min-width: 210px; padding: 12px 18px; border: 1px solid #cfe0d9; border-radius: 12px; color: #60786f; background: #f7fbf9; text-align: center; }.shop-floor-production-timer span { font-size: 11px; }.shop-floor-production-timer strong { margin: 2px 0; color: #205849; font-size: 29px; line-height: 1.05; letter-spacing: .02em; }.shop-floor-production-timer small { font-size: 10px; }
.shop-floor-quantities .data-table thead th { padding-block: 13px; color: #506961; background: #eaf2ee; font-size: 11px; font-weight: 850; }
.shop-floor-quantities .data-table tbody th { min-width: 135px; color: #304b42; font-size: 12px; font-weight: 850; }
.shop-floor-quantity-cell { min-width: 145px; padding: 13px 12px !important; }
.shop-floor-quantity-cell .shop-floor-planned-value { margin-bottom: 7px; color: #315f50; font-size: 11px; font-weight: 850; letter-spacing: .01em; }
.shop-floor-quantity-cell .shop-floor-accumulated-value { margin-top: -3px; color: #7c8b85; font-size: 8px; font-weight: 650; }
.shop-floor-quantity-input { width: 112px; height: 44px; font-size: 15px; }
.shop-floor-quantities .data-table th:last-child,.shop-floor-quantities .data-table td:last-child { position: sticky; right: 0; z-index: 2; min-width: 145px; border-left: 2px solid #d6e2dd; box-shadow: -7px 0 13px rgba(30,59,49,.05); }
.shop-floor-quantities .data-table thead th:last-child { z-index: 3; background: #dfece6; }
.shop-floor-color-total { background: #f2f7f5; text-align: center; }
.shop-floor-color-total small,.shop-floor-color-total strong { display: block; }.shop-floor-color-total small { color: #71847c; font-size: 9px; font-weight: 750; }.shop-floor-color-total strong { margin-top: 5px; color: #214f41; font-size: 18px; }
.shop-floor-production-summary { display: grid; grid-template-columns: 1fr 1fr minmax(190px,.8fr); gap: 10px; margin-top: 14px; }.shop-floor-production-summary span,.shop-floor-production-summary label { display: grid; align-content: center; min-height: 78px; padding: 11px 14px; border: 1px solid #e0e7e4; border-radius: 9px; color: #798881; background: #f8faf9; font-size: 8px; font-weight: 750; text-transform: uppercase; }.shop-floor-production-summary strong { display: block; margin-top: 4px; color: #203b32; font-size: 19px; }.shop-floor-production-summary label { color: #9d3e38; background: #fff9f8; }.shop-floor-production-summary input { width: 100%; height: 34px; margin-top: 5px; padding: 0 9px; border: 1px solid #dfbbb8; border-radius: 6px; color: #902f2b; background: white; font: inherit; font-size: 14px; font-weight: 800; }
.shop-floor-final-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e6ebe9; }.shop-floor-final-actions label { margin-right: auto; color: #66766f; font-size: 10px; }.shop-floor-final-actions .danger-button { min-width: 220px; min-height: 44px; border: 0; color: white; background: #a83b36; font-weight: 800; }.shop-floor-final-actions .danger-button:hover { background: #8f302c; }
.shop-floor-final-actions p { max-width: 360px; margin: 0; color: #a13b36; font-size: 10px; font-weight: 700; text-align: right; }
@media(max-width:1100px){.shop-floor-console-main{display:block}.shop-floor-console-main .shop-floor-operation-card{margin-top:16px}}
@media(max-width:1250px){.shop-floor-console-header{grid-template-columns:auto 1fr auto}.shop-floor-production-steps{grid-column:1/-1;grid-row:2}.shop-floor-console-online{grid-column:3;grid-row:1}}
@media(max-width:950px){.shop-floor-production-steps{padding:5px 0}.shop-floor-production-steps::before{right:calc(33.333% - 23px);left:41px}.shop-floor-production-steps span{grid-template-columns:30px 1fr;min-height:auto}.shop-floor-production-steps span i{display:none}.shop-floor-console-main{padding:12px}.shop-floor-operation-facts{grid-template-columns:1fr 1fr}.shop-floor-quantities .panel-heading,.shop-floor-quantity-heading-side{align-items:flex-start;flex-direction:column}.shop-floor-quantity-heading-side>#shopFloorQuantityStatus{text-align:left}}
@media(max-width:650px){.shop-floor-console-header{grid-template-columns:auto 1fr;padding:12px}.shop-floor-console-online{display:none}.shop-floor-production-steps em small{display:none}.shop-floor-scan-form{grid-template-columns:1fr}.shop-floor-scan-form .primary-button{width:100%}.shop-floor-operation-facts,.shop-floor-production-summary{grid-template-columns:1fr}.shop-floor-final-actions{align-items:stretch;flex-direction:column}.shop-floor-final-actions .danger-button{width:100%}}
.operational-alert-metric { border-color: #e7c4c1; background: #fffafa; }
.operational-alert-metric strong, .operational-alert-metric small { color: var(--danger); }
.operational-tabs { display: flex; gap: 4px; width: max-content; margin-bottom: 14px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.operational-tabs button { min-width: 120px; padding: 8px 20px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.operational-tabs button[aria-selected="true"] { color: white; background: var(--green-3); box-shadow: 0 1px 4px rgba(25,52,43,.2); }
.operational-tabs button:focus-visible { outline: 3px solid rgba(57,117,97,.22); outline-offset: 2px; }
.operational-toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 12px; }
.operational-toolbar > label:not(.table-search) { display: grid; gap: 5px; min-width: 150px; color: var(--muted); font-size: 10px; font-weight: 600; }
.operational-toolbar select, .operational-toolbar input[type="date"] { height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.operational-toolbar select { padding-right: 32px; }
.operational-toolbar > span { margin-left: auto; padding-bottom: 10px; color: var(--muted); font-size: 11px; }
.operational-layout { display: grid; grid-template-columns: minmax(590px, 1.25fr) minmax(380px, .75fr); gap: 14px; min-height: 540px; }
.operational-orders-wrap { max-height: calc(100dvh - 325px); }
.operational-orders-table td:first-child strong, .operational-orders-table td:first-child small { display: block; }
.operational-production-table { min-width: 1080px; }
.operational-production-table td:first-child strong, .operational-production-table td:first-child small, .operational-production-table td:nth-child(2) strong, .operational-production-table td:nth-child(2) small { display: block; }
.operational-production-table td:first-child small, .operational-production-table td:nth-child(2) small { max-width: 210px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.operational-production-table tr { cursor: pointer; }
.operational-production-table tr.is-selected { background: #edf4f1; box-shadow: inset 3px 0 var(--green-2); }
.operational-orders-table td:first-child small { max-width: 230px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; }
.operational-orders-table tr { cursor: pointer; }
.operational-orders-table tr.is-selected { background: #edf4f1; box-shadow: inset 3px 0 var(--green-2); }
.operational-progress { display: inline-block; width: 74px; height: 6px; margin-right: 7px; overflow: hidden; border-radius: 99px; background: #e5ebe8; vertical-align: middle; }
.operational-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.operational-orders-table td > small { color: var(--muted); font-size: 9px; }
.operational-status { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 7px; border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; text-transform: uppercase; }
.operational-status.is-open { color: #775817; background: #fff0c9; }
.operational-status.is-closed { color: #28604c; background: #dceee7; }
.operational-status.is-late { color: #8f302d; background: #ffe4e1; }
.operational-detail { align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 2px 10px rgba(23,33,28,.035); }
.operational-empty { display: grid; place-items: center; min-height: 420px; padding: 40px; color: var(--muted); text-align: center; }
.operational-empty > span { font-size: 35px; }
.operational-empty strong { margin-top: 12px; color: var(--ink); font-size: 15px; }
.operational-empty p { max-width: 300px; margin: 6px 0 0; font-size: 11px; line-height: 1.5; }
.operational-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 18px 19px 14px; border-bottom: 1px solid var(--line); }
.operational-detail-header h2 { font-size: 20px; }
.operational-detail-header p:last-child { max-width: 390px; margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.operational-order-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 13px 19px; background: #f8faf9; }
.operational-order-facts div { min-width: 0; }
.operational-order-facts small, .operational-order-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-order-facts small { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.operational-order-facts strong { margin-top: 3px; font-size: 10px; }
.operational-overall-progress { display: flex; align-items: center; gap: 12px; padding: 12px 19px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.operational-overall-progress > span { flex: none; }
.operational-overall-progress strong { color: var(--green); font-size: 13px; }
.operational-overall-progress > div { flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: #e5ebe8; }
.operational-overall-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.operational-level { padding: 15px 19px; border-bottom: 1px solid var(--line); }
.operational-level:last-child { border-bottom: 0; }
.operational-level-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.operational-level-heading > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 6px; color: white; background: var(--green-2); font-size: 9px; font-weight: 800; }
.operational-level-heading small, .operational-level-heading strong { display: block; }
.operational-level-heading small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.operational-level-heading strong { margin-top: 1px; font-size: 10px; }
.operational-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.operational-choice-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.operational-choice-list button:hover { border-color: var(--green-2); background: #f8faf9; }
.operational-choice-list button.is-active { border-color: #91aa9f; background: #edf4f1; box-shadow: inset 3px 0 var(--green-2); }
.operational-choice-list button > span { min-width: 0; }
.operational-choice-list button strong, .operational-choice-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-choice-list button strong { font-size: 10px; }
.operational-choice-list button small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.operational-choice-list button b { color: var(--green-3); font-size: 10px; }
.operational-choice-list button em { flex: none; font-style: normal; }
.operational-operation-list { grid-template-columns: 1fr; max-height: 180px; overflow: auto; }
.operational-execution-list { display: grid; gap: 4px; max-height: 175px; overflow: auto; }
.operational-execution-list article { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 6px; background: #f8faf9; }
.operational-execution-dot { width: 8px; height: 8px; border: 2px solid #b8882e; border-radius: 50%; background: white; }
.operational-execution-dot.is-closed { border-color: var(--green-2); background: var(--green-2); }
.operational-execution-list strong, .operational-execution-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operational-execution-list strong { font-size: 9px; }
.operational-execution-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.operational-level-empty { grid-column: 1 / -1; margin: 0; padding: 11px; border-radius: 6px; color: var(--muted); background: #f8faf9; font-size: 9px; text-align: center; }
.app-shell.menu-collapsed { --sidebar-width: 0px; }
.app-shell.menu-collapsed .sidebar { overflow: hidden; width: 0; padding-inline: 0; }

@media (max-width: 900px) {
  .login-screen { grid-template-columns: minmax(280px, .7fr) minmax(440px, 1fr); }
  .login-brand-panel { padding: 44px; }
  .login-card { padding: 34px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .stock-summary { grid-template-columns: repeat(2, 1fr); }
  .operational-metrics { grid-template-columns: repeat(2, 1fr); }
  .operational-layout { grid-template-columns: 1fr; }
  .operational-orders-wrap { max-height: 420px; }
  .content-grid { grid-template-columns: 1fr; }
  .context-switcher label, .user-copy { display: none; }
  .context-switcher select { min-width: 180px; }
  .workspace { padding: 18px 16px 24px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-gantt { --gantt-info-width: 430px; }
  .planning-gantt-info { grid-template-columns: 70px 70px 1fr 82px; }
  .planning-gantt-info span:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  .app-shell { grid-template: 60px minmax(0, 1fr) 32px / 1fr; }
  .topbar { gap: 8px; min-width: 0; padding-inline: 12px; }
  .brand { min-width: 0; }
  .brand > span:last-child, .context-switcher { display: none; }
  .topbar-actions { margin-left: auto; }
  .notification-button { display: none; }
  .sidebar { position: fixed; inset: 60px auto 32px 0; z-index: 20; width: min(284px, 84vw); padding-bottom: 28px; box-shadow: 10px 0 30px rgba(0,0,0,.18); }
  .app-shell.menu-collapsed .sidebar { width: min(284px, 84vw); transform: translateX(-100%); }
  .workspace { grid-column: 1; padding: 16px 12px 22px; }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  .page-heading > div { min-width: 0; }
  .statusbar { gap: 12px; padding-inline: 12px; }
  .statusbar span:nth-child(2), .statusbar span:nth-child(3) { display: none; }
  .data-table-wrap { max-height: calc(100dvh - 290px); }
  .record-dialog { width: min(680px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); }
  .record-dialog header, .record-dialog footer { padding: 16px; }
  .dialog-body { padding: 16px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.product-size-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .product-size-fields .product-size-main-field { grid-column: span 5; }
  .product-fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .assistant-panel { inset: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .assistant-launcher { right: 14px; bottom: 44px; }
  .login-screen { display: block; min-height: 100vh; padding: 24px 16px; background: #f7f9f8; }
  .login-brand-panel { display: none; }
  .login-form-panel { display: block; padding: 0; background: transparent; }
  .login-card { margin: 5vh auto 0; padding: 28px 22px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 38px; font-size: 12px; letter-spacing: .12em; }
  .login-card { width: 100%; }
  .page-heading { flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .primary-button { min-height: 42px; white-space: nowrap; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .production-row { grid-template-columns: 1fr 36px; }
  .production-row .progress { grid-row: 2; grid-column: 1 / -1; }
  .table-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .packing-date-filters { align-items: stretch; }
  .packing-date-filters label { flex: 1; }
  .operational-toolbar { align-items: stretch; flex-direction: column; }
  .operational-toolbar > label:not(.table-search) { width: 100%; }
  .operational-toolbar > span { margin-left: 0; padding: 0; }
  .operational-layout { display: block; }
  .operational-detail { margin-top: 12px; }
  .operational-order-facts { grid-template-columns: repeat(2, 1fr); }
  .table-actions { justify-content: flex-start; }
  .table-pagination { justify-content: flex-start; }
  .table-search { width: 100%; }
  .table-toolbar > span { text-align: right; }
  .data-table { min-width: max-content; }
  .data-table th, .data-table td { padding-inline: 10px; }
  .record-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .record-dialog form { height: 100%; }
  .record-dialog footer { flex-wrap: wrap; }
  .record-dialog footer .danger-button { order: 3; width: 100%; }
  .record-dialog footer .dialog-spacer { display: none; }
  .record-dialog footer .secondary-button, .record-dialog footer .primary-button { flex: 1; }
  .secondary-button, .danger-button { min-height: 42px; }
  .planning-controls, .planning-summary { grid-template-columns: 1fr; }
  .planning-controls .primary-button { width: 100%; }
  .planning-control-actions { flex-direction: column; }
  .planning-toolbar { align-items: stretch; flex-direction: column; }
  .planning-gantt-panel .panel-heading, .planning-gantt-actions { align-items: stretch; flex-direction: column; }
  .order-route-panel .panel-heading, .order-route-heading-actions { align-items: stretch; flex-direction: column; }
  .planning-gantt-actions select { width: 100%; }
}

@media print {
  body > * { display: none !important; }
  body.printing-table > .print-table-document { display: block !important; }
  .print-table-document { color: #000; font-family: Arial, sans-serif; }
  .print-table-document h1 { font-size: 18pt; }
  .print-table-document table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .print-table-document th, .print-table-document td { padding: 6px; border: 1px solid #777; text-align: left; vertical-align: top; }
  .print-table-document th { background: #eee; }
}

.settings-panel { max-width: 760px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(31,48,43,.06); }
.settings-help { margin: 6px 0 22px; color: var(--muted); }
.planning-mode-options { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.planning-mode-options legend { margin-bottom: 10px; font-weight: 700; color: var(--text); }
.planning-mode-option { display: flex; align-items: flex-start; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.planning-mode-option:has(input:checked) { border-color: var(--green-2); background: #f0f7f4; }
.planning-mode-option input { margin-top: 3px; accent-color: var(--green); }
.planning-mode-option span { display: grid; gap: 5px; }
.planning-mode-option small { color: var(--muted); line-height: 1.45; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.planning-horizon-setting { display: grid; gap: 7px; margin-top: 20px; color: var(--ink); font-size: 12px; font-weight: 700; }
.planning-horizon-setting > span { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.planning-horizon-setting input { width: 100px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.planning-horizon-setting small { color: var(--muted); font-weight: 400; }
.dashboard-metric { width: 100%; border: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; transition: transform .15s, box-shadow .15s; }
.dashboard-metric:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,48,43,.1); }
.dashboard-planning-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 18px; margin-top: 18px; }
.dashboard-section-panel .data-table-wrap { max-height: 390px; }
.dashboard-section-table { min-width: 720px; }
.dashboard-load { display: flex; align-items: center; gap: 8px; min-width: 115px; }
.dashboard-load > span { width: 72px; height: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.dashboard-load i { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.dashboard-load b { font-size: 11px; }
.dashboard-danger { color: var(--danger); font-weight: 700; }
.dashboard-alert { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font: inherit; }
.dashboard-alert:first-child { border-top: 0; }
.dashboard-alert:hover { background: var(--surface-soft); }
.dashboard-empty { padding: 24px 8px; color: var(--muted); text-align: center; }
.dashboard-deliveries-panel { margin-top: 18px; }
.dashboard-risk { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.dashboard-risk.is-late { color: #8d302c; background: #f8dedc; }
.dashboard-risk.is-risk { color: #835b16; background: #faedcf; }
.dashboard-risk.is-ok { color: #335e4f; background: #deeee8; }

@media (max-width: 980px) { .dashboard-planning-grid { grid-template-columns: 1fr; } }

@media (max-width: 420px) {
  .login-screen { padding: 16px 12px; }
  .login-card { margin-top: 2vh; padding: 24px 18px; }
  .login-mobile-brand { margin-bottom: 28px; }
  .field-label-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .field-label-row .link-button { padding-bottom: 0; }
  h1 { font-size: 27px; }
  .metric-grid { grid-template-columns: 1fr; }
  .stock-summary { grid-template-columns: 1fr; }
  .operational-metrics { grid-template-columns: 1fr; }
  .operational-choice-list { grid-template-columns: 1fr; }
  .metric-card { padding: 16px; }
  .panel { padding: 16px; }
  .panel-heading { align-items: flex-start; gap: 10px; }
  .production-row { gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.product-size-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-size-fields .product-size-main-field { grid-column: span 3; }
  .product-dialog-summary { align-items: flex-start; }
  .product-identity-heading { align-items: flex-start; flex-direction: column; }
  .product-dialog-tabs { grid-template-columns: 1fr; }
  .product-dialog-tab { min-height: 48px; }
  .product-fields-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-fields-grid > label:not(.product-format-field):not(.product-measure-field) { grid-column: 1 / -1; }
  .product-combined-field { grid-template-columns: 1fr; gap: 7px; }
  .product-fields-grid label:has(input[name="ProductDescription"]), .product-fields-grid label:has(input[name="DocumentDescription"]), .product-fields-grid label:has(input[name="ProductNotes"]), .product-fields-grid label:has(input[name="Annotations"]), .product-fields-grid label:has(input[name="Finishing"]) { grid-column: auto; }
  .user-button { padding-right: 0; }
}

@media (max-height: 650px) and (min-width: 641px) {
  .workspace { padding-top: 22px; }
  .page-heading { margin-bottom: 18px; }
  .data-table-wrap { max-height: calc(100dvh - 290px); }
}
