:root,
body.theme-dark {
  --wms-bg: #111827;
  --wms-sidebar: #151f2e;
  --wms-surface: #1c2738;
  --wms-surface-2: #202d40;
  --wms-soft: #263449;
  --wms-line: rgba(148, 163, 184, .18);
  --wms-text: #e5ecf6;
  --wms-muted: #94a3b8;
  --wms-primary: #3b82f6;
  --wms-cyan: #06b6d4;
  --wms-green: #22c55e;
  --wms-amber: #f59e0b;
  --wms-red: #ef4444;
  --wms-violet: #8b5cf6;
  --wms-shadow: 0 18px 42px rgba(0, 0, 0, .24);
  --wms-topbar: #172133;
  --wms-input: #111827;
  --wms-table-head: #182235;
}

body.theme-light {
  --wms-bg: #f3f6fb;
  --wms-sidebar: #ffffff;
  --wms-surface: #ffffff;
  --wms-surface-2: #f8fafc;
  --wms-soft: #eef4ff;
  --wms-line: rgba(15, 23, 42, .12);
  --wms-text: #1d2939;
  --wms-muted: #667085;
  --wms-primary: #2563eb;
  --wms-cyan: #0891b2;
  --wms-green: #059669;
  --wms-amber: #d97706;
  --wms-red: #dc2626;
  --wms-violet: #7c3aed;
  --wms-shadow: 0 14px 34px rgba(16, 24, 40, .08);
  --wms-topbar: #ffffff;
  --wms-input: #f8fafc;
  --wms-table-head: #f8fafc;
}* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--wms-bg); color: var(--wms-text); font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
small { color: var(--wms-muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 274px minmax(0, 1fr); }
.sidebar { background: var(--wms-sidebar); border-right: 1px solid var(--wms-line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.24) transparent; }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 16px; }
.mobile-menu-toggle { display: none; margin-left: auto; border: 1px solid var(--wms-line); background: var(--wms-surface-2); color: var(--wms-text); border-radius: 10px; padding: 8px 10px; font: inherit; font-weight: 700; align-items: center; gap: 7px; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(148,163,184,.18); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.32); background-clip: padding-box; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; padding: 5px; background: var(--wms-surface); border: 1px solid var(--wms-line); }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--wms-cyan), var(--wms-primary)); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: 0 14px 30px rgba(6, 182, 212, .22); }
.brand-title { font-size: 16px; font-weight: 650; }
.brand-subtitle { color: var(--wms-muted); font-size: 12px; margin-top: 2px; }
.nav-section { display: grid; gap: 3px; margin-top: 4px; }
.nav-label { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; margin: 14px 12px 6px; }
.nav-link { min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 7px 11px; border-radius: 10px; color: #bac7d8; font-weight: 600; }
.nav-link:hover { background: rgba(148,163,184,.10); color: #fff; }
.nav-link.active { background: rgba(59, 130, 246, .16); color: #dbeafe; }
.nav-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(148,163,184,.10); color: #93c5fd; font-size: 14px; font-weight: 400; flex: 0 0 26px; }
.nav-link.active .nav-icon { background: rgba(59,130,246,.24); color: #fff; }
.nav-icon .bi { line-height: 1; }
.nav-group { display: grid; gap: 3px; }
.nav-parent { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; justify-content: flex-start; text-align: left; }
.nav-parent span:not(.nav-icon) { flex: 1; }
.nav-caret { margin-left: auto; color: var(--wms-muted); font-size: 12px; transition: transform .16s ease; }
.nav-submenu { display: none; gap: 3px; margin: 1px 0 4px 14px; padding-left: 12px; border-left: 1px solid var(--wms-line); }
.nav-group.open > .nav-submenu { display: grid; }
.nav-group.open > .nav-parent .nav-caret { transform: rotate(180deg); }
.nav-sub-link { min-height: 34px; padding-left: 8px; font-size: 13px; font-weight: 600; }
.nav-sub-link .nav-icon { width: 23px; height: 23px; flex-basis: 23px; font-size: 12px; border-radius: 7px; }
.nav-placeholder { cursor: default; opacity: .58; }
.nav-placeholder:hover { background: transparent; color: #bac7d8; }
body.theme-light .nav-placeholder:hover { color: #475467; }
@media (max-width: 1120px) { .nav-group { grid-column: 1 / -1; } .nav-submenu { margin-left: 12px; } }

.main { min-width: 0; }
.topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--wms-topbar); border-bottom: 1px solid var(--wms-line); position: sticky; top: 0; z-index: 5; }
.search { width: min(460px, 42vw); border: 1px solid var(--wms-line); background: var(--wms-input); color: var(--wms-text); border-radius: 10px; padding: 11px 14px; font: inherit; outline: none; }
.search::placeholder { color: #64748b; }
.search:focus { border-color: rgba(59,130,246,.72); box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.top-actions { display: flex; align-items: center; gap: 10px; color: var(--wms-muted); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--wms-line); background: var(--wms-surface); border-radius: 10px; display: grid; place-items: center; font-weight: 650; color: #cbd5e1; }
.user-chip { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--wms-line); padding-left: 12px; color: #dbe4ef; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--wms-cyan), var(--wms-violet)); color: #fff; display: grid; place-items: center; font-weight: 700; }

.workspace { padding: 24px 28px 34px; }
.command-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow { color: #67e8f9; font-size: 12px; text-transform: uppercase; letter-spacing: .10em; font-weight: 700; margin-bottom: 6px; }
.page-title h1 { margin: 0; font-size: 25px; line-height: 1.15; }
.page-title p { margin: 8px 0 0; color: var(--wms-muted); }
.context-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--wms-line); border-radius: 999px; padding: 9px 13px; background: var(--wms-surface); color: #cbd5e1; white-space: nowrap; }

.grid-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.kpi, .panel, .table-panel, .quick-card { background: var(--wms-surface); border: 1px solid var(--wms-line); border-radius: 14px; box-shadow: var(--wms-shadow); }
.kpi { padding: 17px; position: relative; overflow: hidden; min-height: 116px; }
.kpi::after { content: ""; position: absolute; right: -25px; top: -30px; width: 92px; height: 92px; border-radius: 50%; background: rgba(6, 182, 212, .09); }
.kpi-label { color: var(--wms-muted); font-size: 12.5px; font-weight: 600; }
.kpi-value { margin-top: 12px; font-size: 27px; line-height: 1; font-weight: 700; }
.kpi-foot { margin-top: 12px; color: var(--wms-muted); font-size: 12.5px; }
.good { color: var(--wms-green); } .warn { color: var(--wms-amber); } .danger { color: var(--wms-red); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .55fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { padding: 16px; }
.panel-head, .table-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-title { margin: 0; font-size: 16px; font-weight: 700; }
.panel-note { margin: 5px 0 0; color: var(--wms-muted); font-size: 12.5px; }
.button { border: 0; border-radius: 10px; padding: 10px 14px; background: linear-gradient(135deg, var(--wms-primary), var(--wms-cyan)); color: #fff; font-weight: 650; cursor: pointer; }
.button.secondary { background: var(--wms-soft); color: #dbeafe; }

.pulse-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pulse { border: 1px solid var(--wms-line); border-radius: 12px; padding: 13px; background: var(--wms-surface-2); }
.pulse strong { display: block; font-size: 20px; margin-top: 7px; }
.chart-bars { display: grid; gap: 13px; }
.chart-row { display: grid; grid-template-columns: 112px 1fr 46px; align-items: center; gap: 12px; }
.chart-label { color: var(--wms-muted); font-size: 12.5px; font-weight: 600; }
.bar-track { height: 10px; background: rgba(148, 163, 184, .14); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--wms-primary); border-radius: inherit; }
.bar-fill.green { background: var(--wms-green); } .bar-fill.amber { background: var(--wms-amber); } .bar-fill.violet { background: var(--wms-violet); } .bar-fill.cyan { background: var(--wms-cyan); }
.chart-value { text-align: right; font-weight: 650; }

.warehouse-map { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.slot { min-height: 42px; border-radius: 9px; display: grid; place-items: center; background: rgba(148,163,184,.10); color: #94a3b8; font-size: 11px; font-weight: 700; border: 1px solid rgba(148,163,184,.08); }
.slot.loaded { background: rgba(34,197,94,.16); color: #86efac; border-color: rgba(34,197,94,.28); }
.slot.busy { background: rgba(245,158,11,.17); color: #fcd34d; border-color: rgba(245,158,11,.30); }
.slot.blocked { background: rgba(239,68,68,.14); color: #fca5a5; border-color: rgba(239,68,68,.26); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--wms-muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #64748b; }
.legend .l1 { background: var(--wms-green); } .legend .l2 { background: var(--wms-amber); } .legend .l3 { background: var(--wms-red); }

.timeline { display: grid; gap: 13px; }
.timeline-item { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.timeline-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(59,130,246,.16); color: #bfdbfe; font-size: 12px; font-weight: 700; }
.timeline-title { font-weight: 650; }
.timeline-meta { color: var(--wms-muted); font-size: 12.5px; margin-top: 3px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.quick-card { padding: 14px; min-height: 82px; display: grid; align-content: center; gap: 5px; box-shadow: none; background: var(--wms-surface-2); }
.quick-card b { font-size: 12.5px; }
.quick-card span { color: var(--wms-muted); font-size: 12px; }

.table-panel { overflow: hidden; }
.table-toolbar { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--wms-line); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--wms-line); text-align: left; vertical-align: middle; }
th { color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--wms-table-head); }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.status.ok { background: rgba(34,197,94,.14); color: #86efac; }
.status.warn { background: rgba(245,158,11,.15); color: #fcd34d; }
.status.block { background: rgba(239,68,68,.14); color: #fca5a5; }
.status.info { background: rgba(59,130,246,.15); color: #bfdbfe; }

@media (max-width: 1120px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--wms-line); } .nav-section { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nav-label { grid-column: 1 / -1; } .topbar { position: relative; } .dashboard-grid { grid-template-columns: 1fr; } .grid-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { body { font-size: 14px; } .topbar, .command-head { align-items: stretch; flex-direction: column; } .workspace { padding: 16px; } .search { width: 100%; } .top-actions { justify-content: space-between; } .grid-kpis, .pulse-grid, .quick-grid, .nav-section { grid-template-columns: 1fr; } .warehouse-map { grid-template-columns: repeat(4, minmax(0, 1fr)); } .chart-row { grid-template-columns: 92px 1fr 42px; } table { min-width: 760px; } .sidebar { padding: 12px; } .brand { padding-bottom: 8px; } .mobile-menu-toggle { display: inline-flex; } .sidebar:not(.mobile-nav-open) .nav-section { display: none; } .sidebar.mobile-nav-open .nav-section { display: grid; } }





.theme-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--wms-line); border-radius: 999px; background: var(--wms-surface); }
.theme-option { border: 0; border-radius: 999px; padding: 7px 11px; background: transparent; color: var(--wms-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.theme-option.active { background: linear-gradient(135deg, var(--wms-primary), var(--wms-cyan)); color: #fff; }
body.theme-light .sidebar { scrollbar-color: rgba(100,116,139,.28) transparent; }
body.theme-light .sidebar::-webkit-scrollbar-thumb { background: rgba(100,116,139,.18); background-clip: padding-box; }
body.theme-light .sidebar::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.30); background-clip: padding-box; }
body.theme-light .nav-link { color: #475467; }
body.theme-light .nav-link:hover { color: var(--wms-text); }
body.theme-light .nav-link.active { background: #eef4ff; color: #1d4ed8; }
body.theme-light .nav-icon { background: #eef2f7; color: #2563eb; }
body.theme-light .nav-link.active .nav-icon { background: #dbeafe; color: #1d4ed8; }
body.theme-light .kpi::after { background: rgba(37,99,235,.08); }
body.theme-light .slot { background: #eef2f7; color: #64748b; border-color: #e2e8f0; }
body.theme-light .slot.loaded { background: #dcfce7; color: #047857; border-color: #bbf7d0; }
body.theme-light .slot.busy { background: #fef3c7; color: #b45309; border-color: #fde68a; }
body.theme-light .slot.blocked { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
body.theme-light .status.ok { background: #dcfce7; color: #047857; }
body.theme-light .status.warn { background: #fef3c7; color: #b45309; }
body.theme-light .status.block { background: #fee2e2; color: #b91c1c; }
body.theme-light .status.info { background: #dbeafe; color: #1d4ed8; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, rgba(59,130,246,.20), transparent 34%), var(--wms-bg); }
.login-card { width: min(430px, 100%); background: var(--wms-surface); border: 1px solid var(--wms-line); border-radius: 16px; box-shadow: var(--wms-shadow); padding: 26px; }
.login-brand { padding: 0 0 22px; }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-form label { display: grid; gap: 7px; color: var(--wms-muted); font-size: 13px; font-weight: 600; }
.form-control { width: 100%; border: 1px solid var(--wms-line); background: var(--wms-input); color: var(--wms-text); border-radius: 10px; padding: 11px 13px; font: inherit; outline: none; }
.form-control:focus { border-color: rgba(59,130,246,.72); box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.login-note { margin: 16px 0 0; color: var(--wms-muted); font-size: 12.5px; }

.remember-option { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 9px !important; color: var(--wms-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; }
.remember-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--wms-primary); cursor: pointer; }
.remember-option span { line-height: 1.2; }

.config-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--wms-line); padding-bottom: 10px; }
.config-tab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--wms-line); border-radius: 999px; padding: 9px 13px; background: var(--wms-surface); color: var(--wms-muted); font-size: 12.5px; font-weight: 650; }
.config-tab.active { background: rgba(59,130,246,.16); color: #dbeafe; border-color: rgba(59,130,246,.32); }
.config-tab.disabled { opacity: .62; cursor: default; }
.config-table-gap { margin-top: 18px; }
body.theme-light .config-tab.active { background: #eef4ff; color: #1d4ed8; border-color: #bfdbfe; }
.alert-message { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; border: 1px solid var(--wms-line); border-radius: 10px; padding: 11px 13px; background: var(--wms-surface); font-size: 13px; font-weight: 650; }
.alert-message.success { color: var(--wms-green); border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.10); }
.alert-message.danger { color: var(--wms-red); border-color: rgba(239,68,68,.28); background: rgba(239,68,68,.10); }
.button .bi { margin-right: 6px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2, 6, 23, .68); backdrop-filter: blur(8px); }
.modal-backdrop.open { display: flex; }
.modal-card { width: min(1080px, 100%); max-height: min(88vh, 920px); display: flex; flex-direction: column; background: var(--wms-surface); border: 1px solid var(--wms-line); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.38); overflow: hidden; }
.modal-form { display: flex; min-height: 0; flex-direction: column; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--wms-line); background: var(--wms-surface-2); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head p { margin: 6px 0 0; color: var(--wms-muted); }
.modal-close { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--wms-line); border-radius: 10px; background: var(--wms-surface); color: var(--wms-muted); cursor: pointer; }
.modal-body { overflow: auto; padding: 18px 20px 4px; scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.24) transparent; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(148,163,184,.20); border-radius: 999px; }
.form-section { border: 1px solid var(--wms-line); border-radius: 12px; padding: 15px; margin-bottom: 14px; background: var(--wms-surface-2); }
.form-section h3 { margin: 0 0 13px; font-size: 14px; color: var(--wms-text); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.form-grid label { display: grid; gap: 7px; color: var(--wms-muted); font-size: 12.5px; font-weight: 650; }
.form-grid textarea { resize: vertical; min-height: 78px; }
.file-control { padding: 9px 11px; }
.form-grid small { color: var(--wms-muted); font-size: 11.5px; font-weight: 500; }
.form-span-2 { grid-column: span 2; }
.form-field-error { min-height: 15px; color: var(--wms-red); font-size: 11.5px; font-weight: 650; }
.form-control.is-invalid { border-color: rgba(239,68,68,.88); box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--wms-line); background: var(--wms-surface-2); }
body.modal-locked { overflow: hidden; }
body.theme-light .modal-backdrop { background: rgba(15,23,42,.42); }
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .modal-backdrop { padding: 14px; } }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } .form-span-2 { grid-column: auto; } .modal-card { max-height: 94vh; } .modal-actions { flex-direction: column-reverse; } .modal-actions .button { width: 100%; } }
/* Padronizacao dos campos dos modais */
.form-grid .form-control { min-height: 42px; height: 42px; display: block; padding: 10px 12px; line-height: 20px; }
.form-grid select.form-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--wms-muted) 50%), linear-gradient(135deg, var(--wms-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-grid textarea.form-control { height: auto; min-height: 86px; line-height: 1.45; padding-top: 10px; padding-bottom: 10px; }
.form-grid input[type="file"].form-control { height: 42px; min-height: 42px; padding: 8px 12px; line-height: 20px; }
.form-grid input[type="file"].form-control::file-selector-button { height: 26px; margin: -2px 10px -2px 0; border: 0; border-radius: 7px; padding: 0 10px; background: var(--wms-soft); color: var(--wms-text); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.form-grid label { align-content: start; }
.button:disabled { cursor: not-allowed; opacity: .48; filter: saturate(.72); box-shadow: none; }
.action-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--wms-amber); }
.actions-cell { width: 84px; white-space: nowrap; }
.icon-action { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--wms-line); border-radius: 9px; background: var(--wms-surface-2); color: var(--wms-muted); cursor: pointer; transition: border-color .16s ease, color .16s ease, transform .16s ease; }
.icon-action:hover { border-color: rgba(59,130,246,.45); color: #bfdbfe; transform: translateY(-1px); }
body.theme-light .icon-action:hover { color: #1d4ed8; }



.entry-add-item { margin-top: 12px; }
.entry-items-table .icon-action:disabled { opacity: .42; cursor: not-allowed; transform: none; }


.entry-items-note { margin-bottom: 14px; }


.nav-nested { margin-left: 12px; border-left: 1px solid rgba(148,163,184,.14); padding-left: 8px; }
.nav-nested > .nav-sub-link { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; justify-content: flex-start; text-align: left; }
.nav-nested > .nav-submenu { margin-left: 8px; }
.nav-nested .nav-submenu .nav-sub-link { padding-left: 8px; }
.module-roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.roadmap-card { border: 1px solid var(--wms-line); border-radius: 12px; padding: 14px; background: var(--wms-surface-2); }
.roadmap-card h3 { margin: 0 0 7px; font-size: 14px; }
.roadmap-card p { margin: 0; color: var(--wms-muted); font-size: 12.5px; line-height: 1.45; }
@media (max-width: 900px) { .module-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .module-roadmap { grid-template-columns: 1fr; } }


.nav-branch { display: grid; gap: 3px; }
.nav-branch > .nav-sub-link { width: 100%; border: 0; background: transparent; cursor: pointer; justify-content: flex-start; text-align: left; font-size: 13px; font-weight: 600; min-height: 34px; padding-left: 8px; }
.nav-branch > .nav-submenu { margin-left: 14px; }
.nav-branch .nav-submenu .nav-sub-link { padding-left: 8px; }


.xml-summary-head { margin-bottom: 14px; }



.table-scroll:has(.xml-list-table) { overflow-x: hidden; }
.xml-list-table { table-layout: fixed; width: 100%; min-width: 0; font-size: 11.5px; }
.xml-list-table th,
.xml-list-table td { white-space: nowrap; vertical-align: middle; padding: 8px 7px; overflow: hidden; text-overflow: ellipsis; }
.xml-list-table th { font-size: 10.5px; letter-spacing: .025em; }
.xml-list-table th:nth-child(1), .xml-list-table td:nth-child(1) { width: 4%; text-align: center; }
.xml-list-table th:nth-child(2), .xml-list-table td:nth-child(2) { width: 8%; }
.xml-list-table th:nth-child(3), .xml-list-table td:nth-child(3) { width: 7%; }
.xml-list-table th:nth-child(4), .xml-list-table td:nth-child(4) { width: 22%; }
.xml-list-table td:nth-child(4) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.xml-list-table th:nth-child(5), .xml-list-table td:nth-child(5) { width: 26%; }
.xml-list-table th:nth-child(6), .xml-list-table td:nth-child(6) { width: 5%; text-align: right; }
.xml-list-table th:nth-child(7), .xml-list-table td:nth-child(7) { width: 7%; text-align: right; }
.xml-list-table th:nth-child(8), .xml-list-table td:nth-child(8) { width: 9%; text-align: right; }
.xml-list-table td:nth-child(8) .status { display: inline-block; width: 100%; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; padding: 4px 5px; font-size: 10.5px; }



.operational-wms-grid { align-items: stretch; grid-template-columns: minmax(260px, .9fr) minmax(420px, 1.2fr); }
.ops-notes-field textarea { min-height: 118px; resize: vertical; }
.ops-cross-card { border: 1px solid var(--wms-line); border-radius: 12px; padding: 12px; background: rgba(148, 163, 184, .045); display: grid; grid-template-columns: minmax(190px, .9fr) minmax(260px, 1.1fr); gap: 12px; align-items: stretch; }
.ops-cross-main,
.ops-radio-card { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px; border: 1px solid rgba(148, 163, 184, .18); border-radius: 10px; background: rgba(15, 23, 42, .25); color: var(--wms-text); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.ops-cross-main:hover,
.ops-radio-card:hover { border-color: rgba(56, 189, 248, .42); background: rgba(56, 189, 248, .08); }
.ops-cross-main input,
.ops-radio-card input { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; accent-color: #38bdf8; }
.ops-cross-main span,
.ops-radio-card span { display: grid; gap: 3px; min-width: 0; }
.ops-cross-main strong,
.ops-radio-card strong { font-size: 12.5px; line-height: 1.2; font-weight: 750; color: var(--wms-text); }
.ops-cross-main small,
.ops-radio-card small { color: var(--wms-muted); font-size: 11.2px; line-height: 1.3; font-weight: 600; }
.ops-order-panel { display: grid; gap: 8px; }
.ops-order-panel[hidden] { display: none !important; }
.ops-options-title { color: var(--wms-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.ops-radio-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
body.theme-light .ops-cross-main,
body.theme-light .ops-radio-card { background: #f8fafc; border-color: #e2e8f0; }
body.theme-light .ops-cross-main:hover,
body.theme-light .ops-radio-card:hover { background: #eef6ff; border-color: #bfdbfe; }
@media (max-width: 900px) { .operational-wms-grid, .ops-cross-card, .ops-radio-row { grid-template-columns: 1fr; } }




.field-hint { display: block; margin-top: 6px; color: #fca5a5; font-size: 11.5px; font-weight: 650; }
body.theme-light .field-hint { color: #b91c1c; }


.xml-list-table th:nth-child(9), .xml-list-table td:nth-child(9) { width: 12%; text-align: center; }
.inline-action-form { display: inline; margin: 0; }
.icon-action.danger-action { color: #fca5a5; }
.icon-action.danger-action:hover { border-color: rgba(239,68,68,.48); color: #fecaca; }
.action-muted { color: var(--wms-muted); font-weight: 700; }
body.theme-light .icon-action.danger-action { color: #b91c1c; }
body.theme-light .icon-action.danger-action:hover { color: #991b1b; }

.toolbar-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.button.danger-button { background: linear-gradient(135deg, #dc2626, #991b1b); box-shadow: 0 10px 25px rgba(220,38,38,.22); }
.button.danger-button:hover { filter: brightness(1.04); }
.select-col input[type="checkbox"] { width: 15px; height: 15px; accent-color: #38bdf8; }

.confirm-modal { width: min(520px, 100%); }
.confirm-box { display: flex; gap: 13px; align-items: flex-start; border: 1px solid rgba(245,158,11,.28); border-radius: 12px; padding: 14px; background: rgba(245,158,11,.10); }
.confirm-box > .bi { color: var(--wms-amber); font-size: 22px; margin-top: 1px; }
.confirm-box strong { display: block; color: var(--wms-text); font-size: 14px; margin-bottom: 4px; }
.confirm-box small { display: block; color: var(--wms-muted); font-size: 12.5px; line-height: 1.45; }

.field-hint[hidden] { display: none !important; }


.empty-state { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; text-align: center; color: var(--wms-muted); }
.empty-state .bi { font-size: 34px; color: var(--wms-amber); }
.empty-state h2 { margin: 0; color: var(--wms-text); font-size: 18px; }
.empty-state p { margin: 0; font-size: 13px; }
.cd-actions-panel { margin-bottom: 14px; }

.xml-preview-nf-table { table-layout: fixed; min-width: 760px; font-size: 12px; }
.xml-preview-nf-table th,
.xml-preview-nf-table td { padding: 8px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xml-preview-nf-table th:nth-child(1), .xml-preview-nf-table td:nth-child(1) { width: 11%; }
.xml-preview-nf-table th:nth-child(2), .xml-preview-nf-table td:nth-child(2) { width: 10%; }
.xml-preview-nf-table th:nth-child(3), .xml-preview-nf-table td:nth-child(3) { width: 28%; }
.xml-preview-nf-table th:nth-child(4), .xml-preview-nf-table td:nth-child(4) { width: 30%; }
.xml-preview-nf-table th:nth-child(5), .xml-preview-nf-table td:nth-child(5) { width: 7%; text-align: right; }
.xml-preview-nf-table th:nth-child(6), .xml-preview-nf-table td:nth-child(6) { width: 7%; text-align: right; }
.xml-preview-nf-table th:nth-child(7), .xml-preview-nf-table td:nth-child(7) { width: 9%; text-align: right; }

.toolbar-filter label { display: flex; align-items: center; gap: 8px; color: var(--wms-muted); font-size: 12px; font-weight: 700; }
.toolbar-filter .form-control { min-height: 38px; height: 38px; min-width: 190px; padding: 8px 30px 8px 10px; }

.cd-actions-panel .table-toolbar { align-items: center; padding-top: 16px; padding-bottom: 16px; }
.cd-actions-panel .panel-note { max-width: 380px; line-height: 1.35; }
.cd-actions-panel .toolbar-actions { align-items: center; }
.cd-actions-panel .button { min-height: 38px; padding: 9px 14px; }
.cd-actions-panel .toolbar-filter .form-control { width: 190px; }

.recebimento-table { table-layout: fixed; min-width: 980px; font-size: 12px; }
.recebimento-table th,
.recebimento-table td { padding: 8px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recebimento-table td small { display: block; color: var(--wms-muted); overflow: hidden; text-overflow: ellipsis; }
.button.mini { min-height: 30px; padding: 6px 10px; font-size: 12px; border-radius: 9px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.recebimento-detail { border-color: rgba(59,130,246,.30); }

.action-menu { position: relative; }
.action-menu-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; min-width: 260px; padding: 6px; border: 1px solid var(--wms-line); border-radius: 12px; background: var(--wms-surface); box-shadow: var(--wms-shadow); }
.action-menu-list button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 9px; padding: 10px 11px; background: transparent; color: var(--wms-text); font: inherit; font-size: 13px; font-weight: 650; text-align: left; cursor: pointer; }
.action-menu-list button:hover { background: rgba(59,130,246,.12); }
.recebimento-table .select-col { width: 42px; text-align: center; }
.recebimento-table .select-col input { width: 15px; height: 15px; accent-color: #38bdf8; }

.cd-actions-panel { overflow: visible; }
.cd-actions-panel .table-toolbar { overflow: visible; }
.recebimento-table th:nth-child(3), .recebimento-table td:nth-child(3) { width: 30%; }
.recebimento-table td:nth-child(3) { white-space: normal; line-height: 1.3; }
.recebimento-table td:nth-child(3) small { margin-top: 2px; }


.recebimento-table th:nth-child(6), .recebimento-table td:nth-child(6),
.recebimento-table th:nth-child(7), .recebimento-table td:nth-child(7) { text-align: right; }
.recebimento-detail table th:nth-child(3), .recebimento-detail table td:nth-child(3),
.recebimento-detail table th:nth-child(4), .recebimento-detail table td:nth-child(4) { text-align: right; }



.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; white-space: nowrap; }
.sort-link:hover { color: var(--wms-text); }
.sort-muted { opacity: .42; }


.conference-card { display: grid; gap: 14px; }
.conference-product h2 { margin: 4px 0 6px; font-size: 18px; }
.conference-product p { margin: 0; color: var(--wms-muted); }
.conference-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.conference-kpis > div { border: 1px solid var(--wms-line); background: var(--wms-surface-2); border-radius: 14px; padding: 13px; }
.conference-kpis span { display: block; color: var(--wms-muted); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.conference-kpis strong { font-size: 26px; color: var(--wms-text); }
.camera-box { position: relative; height: 190px; border: 1px dashed rgba(56,189,248,.45); border-radius: 16px; overflow: hidden; background: #020617; display: grid; place-items: center; }
.camera-box video { width: 100%; height: 100%; object-fit: cover; }
.camera-scan-frame { position: absolute; left: 4%; right: 4%; top: 50%; height: 82px; transform: translateY(-50%); border: 2px solid #38bdf8; border-radius: 10px; box-shadow: 0 0 0 999px rgba(2,6,23,.28), 0 0 22px rgba(56,189,248,.5); pointer-events: none; }
.camera-scan-frame::after { content: 'Alinhe o código nesta faixa'; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; color: #bae6fd; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #020617; }
.camera-scan-frame.scan-success { animation: scanFrameSuccess .55s ease; }
.camera-placeholder { color: #dbeafe; padding: 18px; text-align: center; font-weight: 700; }
.conference-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button.ghost { background: transparent; border: 1px solid var(--wms-line); box-shadow: none; color: var(--wms-text); }
.conference-log { border-radius: 12px; padding: 10px 12px; background: rgba(148,163,184,.10); color: var(--wms-muted); font-weight: 700; }
.conference-log.ok { background: rgba(34,197,94,.14); color: #86efac; }
.conference-log.scan-success { animation: scanSuccess .65s ease; }
.conference-log.error { background: rgba(239,68,68,.14); color: #fca5a5; }
.conference-finish-form { display: grid; grid-template-columns: minmax(160px, 220px) auto; gap: 12px; align-items: end; }
@keyframes scanSuccess { 0% { transform: scale(1); box-shadow: 0 0 0 rgba(34,197,94,0); } 35% { transform: scale(1.025); box-shadow: 0 0 0 5px rgba(34,197,94,.18); } 100% { transform: scale(1); box-shadow: 0 0 0 rgba(34,197,94,0); } }
@keyframes scanFrameSuccess { 0%, 100% { border-color: #38bdf8; } 35% { border-color: #22c55e; box-shadow: 0 0 0 999px rgba(2,6,23,.22), 0 0 25px rgba(34,197,94,.9); } }
.scan-error-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; background: rgba(2,6,23,.72); }
.scan-error-modal-card { width: min(360px, 100%); border: 1px solid rgba(248,113,113,.55); border-radius: 16px; padding: 22px; text-align: center; background: var(--wms-surface, #172033); color: var(--wms-text, #f8fafc); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.scan-error-modal-card i { color: #f87171; font-size: 32px; }
.scan-success-modal .scan-error-modal-card { border-color: rgba(34,197,94,.55); }
.scan-success-modal-card i { color: #4ade80; font-size: 32px; }
.scan-error-modal-card strong { display: block; margin-top: 8px; font-size: 17px; }
.scan-error-modal-count { display: block; margin-top: 12px; color: #fca5a5; font-size: 28px; font-weight: 800; }
.scan-result-modal { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 20px; background: rgba(2,6,23,.68); }
.scan-result-card { width: min(440px, 100%); border-radius: 16px; padding: 24px; text-align: center; background: var(--wms-surface, #172033); color: var(--wms-text, #f8fafc); box-shadow: 0 18px 50px rgba(0,0,0,.4); border: 1px solid var(--wms-line); }
.scan-result-card i { display: block; font-size: 36px; margin-bottom: 8px; }
.scan-result-card.ok i { color: #4ade80; }
.scan-result-card.warn { border-color: rgba(251,191,36,.55); }
.scan-result-card.warn i { color: #fbbf24; }
.scan-result-card strong { display: block; font-size: 18px; }
.scan-result-card p { color: var(--wms-muted); margin: 10px 0 18px; }
.scan-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 700px) { .conference-kpis, .conference-finish-form { grid-template-columns: 1fr; } .camera-box { height: 170px; } }
