:root {
  --ink: #17202a;
  --muted: #65717f;
  --line: #dde4ea;
  --paper: #f7f9fb;
  --white: #ffffff;
  --brand: #2f6f4e;
  --brand-2: #1d526d;
  --accent: #c77d2b;
  --danger: #b42318;
  --warn: #b7791f;
  --ok: #237a4b;
  --shadow: 0 18px 45px rgba(23, 32, 42, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); color: var(--ink); overflow-x: hidden; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: white;
  border-radius: 7px;
  padding: 10px 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}
button.secondary { background: #e9eef1; color: var(--ink); }
button.warn { background: var(--accent); }
button.danger { background: var(--danger); }
button.icon { min-width: 39px; padding: 10px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.active { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 0 0 2px rgba(47,111,78,.18); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}
input[readonly] { background: #f3f6f7; color: #465566; }
textarea { min-height: 72px; resize: vertical; }
label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 700; }
small {
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.3;
}

.voiceTextareaWrap {
  position: relative;
  width: 100%;
}
.voiceTextareaWrap textarea {
  padding-right: 42px;
}
.voiceTextButton {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: #eef4e9;
  color: var(--green-dark);
  border: 1px solid #cbdab8;
  font-size: 14px;
  line-height: 1;
  box-shadow: none;
}
.voiceTextButton:hover {
  background: #e1ecd6;
}
.voiceTextButton:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.voiceTextButton.listening {
  background: #ffe2df;
  border-color: #d94a3a;
  color: #b52017;
}

.sensorOfferItemsEditor table {
  margin: 0;
}
.sensorOfferItemsEditor td,
.sensorOfferItemsEditor th {
  vertical-align: top;
}
.compactEmpty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
}

.accountingOverview,
.accountingSection {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}
.accountingSection .kpi,
.accountingOverview .kpi {
  min-height: 108px;
}
.accountingSection .sectionTitle,
.accountingOverview .sectionTitle {
  margin-bottom: 12px;
}

.lockedAccess {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f8faf7 0%, #eef4e9 100%);
}
.lockedAccessCard {
  width: min(520px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.lockedLogo {
  width: 230px;
  max-width: 100%;
  display: block;
  margin-bottom: 18px;
}
.lockedAccessCard h1 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: 0;
}
.lockedAccessCard p {
  margin: 0 0 18px;
  color: var(--muted);
}

.app { min-height: 100vh; display: grid; grid-template-columns: 255px minmax(0, 1fr); max-width: 100vw; overflow-x: hidden; }
.side {
  background: #15271f;
  color: white;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  width: 255px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  overflow: hidden;
}
.brand {
  padding: 5px 8px 15px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.brandLogo {
  width: 100%;
  max-height: 74px;
  object-fit: contain;
  background: white;
  border-radius: 7px;
  padding: 8px;
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: 0; }
.brand p { margin: 4px 0 0; color: rgba(255,255,255,.73); font-size: 13px; }
.roleBox {
  display: grid;
  gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
}
.roleBox label { color: rgba(255,255,255,.8); }
.roleBox select { border-color: rgba(255,255,255,.22); background: #21382e; color: white; }
.nav { display: grid; gap: 4px; overflow: auto; min-height: 0; padding-right: 2px; }
.nav button {
  text-align: left;
  background: transparent;
  color: rgba(255,255,255,.78);
  border-radius: 7px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.nav button.active { background: rgba(255,255,255,.16); color: white; }
.nav .lock { color: rgba(255,255,255,.45); }
.main {
  min-width: 0;
  max-width: calc(100vw - 255px);
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  grid-column: 2;
  scroll-behavior: smooth;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 17px 24px;
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 4;
}
.topbar h2 { margin: 0; font-size: 21px; }
.titleWithLogo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.releaseBadge {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4e4;
  color: var(--brand-2);
  border: 1px solid rgba(136, 173, 43, .32);
  font-size: 12px;
  font-weight: 800;
}
.updateNoticeModal ul {
  max-height: 46vh;
  overflow: auto;
  padding-right: 8px;
}
.versionBand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.versionMeta {
  display: grid;
  gap: 2px;
  min-width: 230px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}
.versionMeta b {
  font-size: 15px;
}
.versionMeta small {
  line-height: 1.25;
}
.versionBand h3 {
  margin: 3px 0;
}
.versionBand p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.moduleMark {
  width: 52px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.content { padding: 18px 18px 48px; display: grid; gap: 16px; max-width: 100%; overflow-x: hidden; }
.steelHero,
.steelHero ~ .band,
.steelHero ~ .grid {
  min-width: 0;
  max-width: 100%;
}
.steelHero .tabs {
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  padding-bottom: 4px;
}
.steelHero .tabs button {
  white-space: nowrap;
}
.steelImportThumb {
  display: block;
  width: 76px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.steelTableThumb {
  display: block;
  width: 64px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.steelDetailImageBox {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.steelDetailImageBox img {
  width: 180px;
  max-height: 130px;
  object-fit: contain;
}
.band {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.band.pad { padding: 18px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-grid.twoColForm { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.wide { grid-column: span 2; }
.full { grid-column: 1 / -1; }
.sectionTitle { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.sectionTitle h3 { margin: 0; font-size: 17px; }
.sectionTitle p { margin: 4px 0 0; color: var(--muted); }
.chartRangeSelect {
  min-width: 180px;
  align-self: start;
}
.kpi {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 6px;
  min-height: 104px;
  position: relative;
}
.clickableKpi {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.clickableKpi:hover,
.clickableKpi:focus,
.kpi:focus {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(18, 48, 35, .14);
  outline: none;
  transform: translateY(-1px);
}
.urgencyPanel {
  border-left: 5px solid var(--warn);
}
.urgencyPanel .riskList {
  margin-top: 8px;
}
.compactUrgency {
  box-shadow: none;
}
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi .value { font-size: clamp(18px, 1.35vw, 22px); font-weight: 800; line-height: 1.18; overflow-wrap: anywhere; }
.kpi .sub {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.3;
}
.accountingOverview {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbf7 100%);
}
.accountingKpiGrid .kpi {
  border-left-width: 5px;
  box-shadow: 0 6px 18px rgba(18, 48, 35, .05);
}
.accountingKpiGrid .kpi .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.accountingKpiGrid .kpi .value {
  font-size: clamp(19px, 1.45vw, 24px);
}
.kpiPositive { border-left-color: var(--ok); }
.kpiReceivable { border-left-color: #2f6f4e; }
.kpiPayable { border-left-color: #b42318; }
.kpiWarning { border-left-color: var(--warn); }
.kpiForecast { border-left-color: #4f7fb9; }
.kpiNeutral { border-left-color: #9aa8b5; }
.kpiInfo {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #cbdab8;
  background: #eef4e9;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  opacity: .85;
}
.chartCard { min-width: 0; }
.chart {
  width: 100%;
  height: 300px;
  max-height: 300px;
  display: block;
}
.chart text {
  font-size: 9px;
  fill: var(--muted);
  font-weight: 700;
}
.chart .chartValue {
  font-size: 10px;
  font-weight: 800;
}
.chart .chartLabel {
  font-size: 8.5px;
  font-weight: 700;
}
.chart .axis {
  stroke: #cbd5dc;
  stroke-width: 1.5;
}
.chart .zeroLine {
  stroke: #d7a14a;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.cashflowWeekGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.cashflowWeekCard {
  border: 1px solid var(--line);
  border-left: 5px solid #9aa6b2;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  min-width: 0;
}
.cashflowWeekCard.green { border-left-color: var(--brand); }
.cashflowWeekCard.red { border-left-color: var(--red); background: #fffafa; }
.cashflowWeekCard.neutral { border-left-color: #d7a14a; }
.cashflowWeekHead {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid #edf1ee;
  padding-bottom: 7px;
  margin-bottom: 7px;
}
.cashflowWeekHead b {
  font-size: 15px;
  color: var(--ink);
}
.cashflowWeekHead span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.cashflowWeekRows {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) auto;
  gap: 5px 8px;
  align-items: baseline;
}
.cashflowWeekRows span {
  color: var(--muted);
  font-size: 12px;
}
.cashflowWeekRows b {
  font-size: 13px;
  text-align: right;
}
.cashflowWeekRows .positive { color: var(--brand-dark); }
.cashflowWeekRows .negative { color: #9f2018; }
.workplacePanel h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--brand-dark);
}
.workplacePanel .tableWrap {
  max-height: 260px;
  overflow: auto;
}
.workplacePanel table {
  font-size: 12px;
}
.workplacePanel td,
.workplacePanel th {
  vertical-align: top;
}
.financeWarningBand {
  border-left: 5px solid var(--warn);
}
.warnRow {
  background: #fff7e6;
}
.warningRow {
  background: #fff7e6;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.badge.ok {
  background: #e6f4ed;
  color: var(--ok);
}
.badge.warn {
  background: #fff4d9;
  color: var(--warn);
}
.financeBlink {
  background: #fde8e6;
  animation: financeDuePulse 1.8s ease-in-out infinite;
}
@keyframes financeDuePulse {
  0%, 100% { box-shadow: inset 5px 0 0 var(--danger); }
  50% { box-shadow: inset 5px 0 0 rgba(180,35,24,.35); }
}
.traffic {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  width: max-content;
}
.traffic:focus {
  outline: 2px solid rgba(47,111,78,.25);
  outline-offset: 2px;
}
.traffic::before { content: ""; width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.trafficInfo {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 10px;
  line-height: 1;
  opacity: .7;
}
.traffic.green { background: #e6f4ed; color: var(--ok); }
.traffic.green::before { background: var(--ok); }
.traffic.yellow { background: #fff4d9; color: var(--warn); }
.traffic.yellow::before { background: #d69e2e; }
.traffic.red { background: #fde8e5; color: var(--danger); }
.traffic.red::before { background: var(--danger); }
.tabs, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { background: #e9eef1; color: var(--ink); }
.tabs button.active { background: var(--brand-2); color: white; }
.checkLine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  background: #f3f6f8;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
}
.checkLine input { width: auto; }
.backupUpload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 10px 13px;
  background: #e9eef1;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.backupUpload input { display: none; }
.filters { padding: 14px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.filters label { min-width: 150px; flex: 1; }
.tableWrap {
  overflow: auto;
  border-top: 1px solid var(--line);
  max-width: 100%;
  min-width: 0;
}
.tableWrap table.compact th,
.tableWrap table.compact td {
  padding: 7px 8px;
  font-size: 13px;
  vertical-align: middle;
}
.tableWrap table.compact input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.srOnly {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.steelHero ~ .band .tableWrap,
.steelHero ~ .grid .tableWrap {
  max-height: 68vh;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: min(860px, 100%);
  table-layout: auto;
  font-size: 13px;
}
.logBox {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 320px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}
.errorText {
  color: var(--danger);
  background: #fff3f0;
  border-color: #f3b3aa;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: auto-phrase;
  hyphens: none;
  line-height: 1.3;
}
th {
  font-size: 12px;
  color: var(--muted);
  background: #f3f6f8;
  position: sticky;
  top: 0;
  z-index: 1;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
tbody tr:hover {
  background: #f8faf9;
}
td.numCell,
td.moneyCell {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
td.actions {
  width: 170px;
  min-width: 150px;
  white-space: normal;
}
td.actions button,
.actions button {
  margin: 2px 2px 2px 0;
}
td.textCell {
  min-width: 90px;
}
td.numCell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 80px;
}
td:has(> .traffic),
td .traffic,
.moneyInput {
  white-space: nowrap;
}
.empty { padding: 24px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.pill { border-radius: 999px; padding: 4px 8px; background: #edf2f4; color: var(--ink); font-weight: 700; font-size: 12px; display: inline-block; }
.pill.green { background: #e7f3ec; color: #17643b; }
.pill.yellow { background: #fff6df; color: #8a5b00; }
.sensorHero {
  border-left: 5px solid #4f7fb9;
}
.sensorCardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.sensorCustomerCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: #fff;
  min-width: 0;
}
.sensorCardHead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.sensorMiniGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  font-size: 12px;
}
.sensorMiniGrid span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #f8faf7;
}
.sensorPhase {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}
.sensorPhase.blue { background: #e6f1fb; color: #1f5f93; border-color: #bdd8ef; }
.sensorPhase.green { background: #e8f4df; color: #356b19; border-color: #c6e1b5; }
.sensorPhase.grey { background: #edf0f2; color: #51606b; border-color: #d4dbe0; }
.sensorPhase.pink { background: #fde8ef; color: #9d224c; border-color: #f5bfd0; }
.sensorFileHeader {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fbfdf8;
}
.sensorFileHeader h3 {
  margin: 0 0 3px;
}
.fieldGroupLabel {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}
.checkGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.checkLine {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 700;
  color: var(--ink);
}
.sensorCalcBox {
  border: 1px solid #cfe0bd;
  background: #f7fbf2;
  border-radius: 8px;
  padding: 12px;
}
.mutedRow { background: #f8fafb; color: #607083; }
.riskList { display: grid; gap: 9px; }
.riskItem { border-left: 5px solid var(--accent); background: #fff; padding: 10px 12px; border-radius: 6px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.riskItem.red { border-left-color: var(--danger); }
.riskItem.yellow { border-left-color: var(--warn); }
.riskItem.green { border-left-color: var(--ok); }
.importCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 220px;
}
.importCard h3 { margin: 0; font-size: 18px; }
.importCard p { margin: 0; color: var(--muted); }
.stockBand {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.areaDash {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.areaDash .chartCard {
  box-shadow: none;
}
.doc h3 { margin-top: 0; }
.doc ul { margin-top: 6px; }
.doc li { margin-bottom: 4px; }
.modalBack {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 20, .52);
  display: none;
  place-items: center;
  padding: 18px;
  z-index: 20;
}
.modalBack.open { display: grid; }
.modal {
  width: min(1040px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0,0,0,.3);
}
.modal.smallModal { width: min(520px, 100%); }
.modal.storeInvoiceModal { width: min(640px, 100%); }
.modal header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal header h3 { margin: 0; }
.modal .body { padding: 18px; }
.hint { padding: 12px; border: 1px solid #bdd7c8; background: #eef8f2; border-radius: 8px; color: #194d31; overflow-wrap: anywhere; }
.error { padding: 12px; border: 1px solid #f2b8b1; background: #fde8e5; border-radius: 8px; color: var(--danger); font-weight: 700; overflow-wrap: anywhere; }
.error button { margin-top: 8px; }
.dangerText { color: var(--danger); font-weight: 800; }
.successBox { padding: 12px; border: 1px solid #b8dcc8; background: #e6f4ed; border-radius: 8px; color: var(--ok); font-weight: 800; overflow-wrap: anywhere; }
tr.rowWarning td { background: #fff8e8; }
tr.rowError td { background: #fde8e5; }
tr.rowWarn td { background: #fff7df; }
.steelImportBox {
  margin-top: 12px;
}
.steelImportPreview {
  margin-top: 14px;
}
.subtleBand {
  background: #fbfcfd;
  margin-top: 16px;
}
.steelTree,
.steelTree ul {
  list-style: none;
  margin: 0;
  padding-left: 16px;
}
.steelTree > li {
  padding-left: 0;
}
.treeRow {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 7px 0 7px calc(var(--tree-level, 0) * 10px);
}
.linkButton {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.linkButton:hover,
.linkButton:focus {
  text-decoration: underline;
}
.smallInput { max-width: 82px; }
.moneyInput { max-width: 120px; text-align: right; }
.printOnly { display: none; }
.hiddenLegacyDash { display: none !important; }
.statusMessage {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
  background: #f3f6f8;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.statusMessage small {
  flex-basis: 100%;
  font-weight: 700;
  color: inherit;
  opacity: .88;
}
.statusMessage.success, .statusMessage.saved {
  background: #e6f4ed;
  border-color: #b8dcc8;
  color: var(--ok);
}
.statusMessage.saving {
  background: #fff4d9;
  border-color: #e6c66d;
  color: var(--warn);
}
.statusMessage.error {
  background: #fde8e5;
  border-color: #f2b8b1;
  color: var(--danger);
}
.projectStatusGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.projectStatusCard {
  border: 1px solid var(--line);
  border-left: 6px solid var(--ok);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.projectStatusCard.yellow { border-left-color: var(--warn); background: #fffdf4; }
.projectStatusCard.red { border-left-color: var(--danger); background: #fff8f7; }
.projectStatusCard h4 {
  margin: 0 0 8px;
  font-size: 15px;
}
.projectStatusCard ul {
  margin: 0;
  padding-left: 18px;
  color: #40516a;
}
.projectStatusCard li { margin: 5px 0; }
.quickCheck {
  border: 1px solid #d9e3d5;
  border-left: 7px solid var(--brand);
  box-shadow: 0 12px 28px rgba(17, 54, 38, .08);
  background: linear-gradient(180deg, #fbfdf8 0%, #ffffff 100%);
}
.quickHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--ink);
}
.quickHeader div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.quickHeader b {
  font-weight: 800;
  color: var(--brand-dark);
}
.quickHeader strong {
  background: #edf5df;
  border: 1px solid #c9ddb4;
  border-radius: 999px;
  color: var(--brand-dark);
  padding: 8px 16px;
  font-size: 14px;
}
.quickColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.quickBlock {
  background: #fff;
  border: 1px solid #dce5dc;
  border-radius: 8px;
  padding: 14px;
}
.quickBlock h3,
.quickMeasures h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--brand-dark);
}
.quickGrid {
  display: grid;
  gap: 8px;
}
.quickLine {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) 86px minmax(76px, auto);
  gap: 8px 10px;
  align-items: center;
  border-bottom: 1px solid #eef2ee;
  padding-bottom: 7px;
}
.quickLine:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.quickLine span:first-child {
  font-size: 13px;
  font-weight: 650;
  color: #40516a;
}
.quickLine small {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  margin-top: -3px;
}
.quickBar {
  display: block;
  height: 18px;
  border: 1px solid rgba(18, 38, 32, .35);
  border-radius: 999px;
  background: #98bd38;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22);
}
.quickBar.red { background: #b42318; }
.quickBar.yellow { background: #d89b20; }
.quickBar.green { background: var(--brand); }
.quickBar.neutral { background: #d9e1e7; }
.quickBar b {
  display: block;
  text-align: center;
  font-size: 12px;
}
.quickLine > b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
  white-space: nowrap;
}
.quickMeasures {
  margin-top: 14px;
  border: 1px solid #dce5dc;
  border-left: 5px solid var(--warn);
  border-radius: 8px;
  background: #fffdf4;
  padding: 12px 14px;
}
.quickSourcePanel {
  margin-top: 14px;
  background: #f8faf9;
}
.quickSourcePanel summary {
  font-weight: 800;
  color: var(--brand);
}
.quickNote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.quickMeasures ul {
  margin: 4px 0 0;
  padding-left: 22px;
}
.reportDoc .quickCheck {
  margin: 14px 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.liveStatusBand {
  border-left: 5px solid var(--brand);
}
.disabledCard {
  opacity: .72;
  background: #f5f6f7;
}
.disabledCard button {
  background: #c9d1d8;
  color: #5f6b76;
  cursor: not-allowed;
}
.moduleTile {
  min-height: 108px;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  background: #f8faf9;
  color: var(--ink);
  border: 1px solid var(--line);
}
.moduleTile b {
  display: block;
  font-size: 15px;
  margin-bottom: 7px;
}
.moduleTile small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.reportModal { width: min(1180px, 100%); }
.reportDoc {
  display: grid;
  gap: 16px;
  background: #fff;
}
.reportHero {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8faf9;
}
.reportHero img {
  width: 100%;
  max-height: 82px;
  object-fit: contain;
}
.reportHero h2 {
  margin: 0 0 6px;
  font-size: 24px;
}
.reportHero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.reportSection {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.reportSection h3, .reportSection h4 {
  margin-top: 0;
}
.reportSection ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
}
.detailsPanel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.detailsPanel summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--brand-dark);
  list-style-position: inside;
}
.detailsPanel[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}
.detailsPanel .tableWrap {
  border: 0;
  border-radius: 0;
}
.datevDetails {
  border-radius: 4px;
}
.chiefDatevReport {
  background: #fff;
  color: #1d2530;
  padding: 14px;
}
.chiefDatevHeader {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid #c8d0d8;
  border-bottom: 0;
  background: #f4f6f8;
  padding: 10px 12px;
}
.chiefDatevHeader h3 {
  margin: 0 0 2px;
  font-size: 15px;
  letter-spacing: 0;
}
.chiefDatevHeader p,
.chiefDatevMeta,
.chiefDatevFooter {
  margin: 0;
  color: #4f5c68;
  font-size: 11px;
}
.chiefDatevMeta {
  text-align: right;
  white-space: nowrap;
}
.chiefDatevFooter {
  border: 1px solid #c8d0d8;
  border-top: 0;
  padding: 8px 12px;
  background: #fafbfc;
}
.chiefMatrixWrap {
  overflow: auto;
  max-height: 620px;
  border: 1px solid #c8d0d8;
}
.chiefMatrixTable {
  min-width: 1280px;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.25;
}
.chiefAreaMatrixWrap {
  max-height: 520px;
}
.chiefAreaDatevTable {
  min-width: 760px;
}
.chiefDatevTable th,
.chiefDatevTable td {
  border: 1px solid #d8dee5;
  padding: 5px 7px;
  vertical-align: middle;
}
.chiefDatevTable th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e8edf2;
  color: #1d2530;
  font-weight: 800;
  text-align: center;
}
.chiefDatevTable th.areaHead {
  background: #dfe6ec;
  border-left: 2px solid #aeb8c2;
}
.chiefDatevTable th[rowspan],
.chiefDatevTable td:first-child,
.chiefDatevTable td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}
.chiefDatevTable th[rowspan] {
  z-index: 3;
  background: #e8edf2;
}
.chiefDatevTable td:nth-child(2),
.chiefDatevTable th:nth-child(2) {
  left: 72px;
}
.chiefDatevTable td:first-child,
.chiefDatevTable th:first-child {
  min-width: 72px;
  text-align: right;
  color: #3d4a56;
}
.chiefDatevTable td:nth-child(2),
.chiefDatevTable th:nth-child(2) {
  min-width: 260px;
  max-width: 420px;
}
.chiefAreaDatevTable td:nth-child(2),
.chiefAreaDatevTable th:nth-child(2) {
  min-width: 320px;
  max-width: 520px;
}
.chiefAreaDatevTable td:nth-child(5),
.chiefAreaDatevTable th:nth-child(5) {
  min-width: 90px;
}
.chiefDatevTable .moneyCell {
  min-width: 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chiefDatevTable .negative {
  color: #a31313;
  font-weight: 700;
}
.chiefDatevTable tr:nth-child(even) td {
  background: #fbfcfd;
}
.chiefDatevTable tr:nth-child(even) td:first-child,
.chiefDatevTable tr:nth-child(even) td:nth-child(2) {
  background: #fbfcfd;
}
.chiefDatevTable .chiefKeyRow td {
  background: #f5f7f9;
  font-weight: 700;
}
.chiefDatevTable .chiefResultRow td,
.chiefDatevTable .chiefSumRow td {
  background: #edf2f6;
  border-top: 2px solid #7f8b96;
  border-bottom: 2px solid #7f8b96;
  font-weight: 800;
}
.rentalHero .kpi b {
  font-size: 21px;
}
.rentalTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.rentalTabs button {
  border: 1px solid var(--line);
  background: #eef3ef;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 800;
}
.rentalTabs button.active {
  background: var(--brand-dark);
  color: white;
  border-color: var(--brand-dark);
}
.crmPipelineScroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.crmPipelineColumn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  padding: 10px;
  min-height: 160px;
}
.crmPipelineColumn h4 {
  margin: 0 0 4px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.crmPipelineColumn h4 span {
  color: var(--brand-dark);
}
.crmPipelineColumn > small {
  color: var(--muted);
  font-weight: 800;
  display: block;
  margin-bottom: 8px;
}
.crmPipelineCard {
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 7px;
  padding: 8px;
  display: grid;
  gap: 3px;
  margin-bottom: 7px;
}
.crmPipelineCard b,
.crmPipelineCard span,
.crmPipelineCard em,
.crmPipelineCard strong {
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.crmPipelineCard em {
  color: var(--muted);
  font-style: normal;
}
.crmPipelineCard strong {
  color: var(--ink);
}
.crmPipelineEmpty {
  color: var(--muted);
  font-size: 12px;
  padding: 10px 0;
}
.crmCalendarGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.crmCalendarDay {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 10px;
  min-height: 128px;
}
.crmCalendarDay.today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(47,111,78,.16);
}
.crmCalendarDay h4 {
  margin: 0 0 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.crmCalendarDay h4 span {
  color: var(--brand-dark);
}
.crmCalendarCard {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 7px;
  background: white;
  padding: 8px;
  display: grid;
  gap: 3px;
  margin-bottom: 7px;
  cursor: pointer;
}
.crmCalendarCard.overdue {
  border-left-color: var(--danger);
  background: #fff7f5;
}
.crmCalendarCard b,
.crmCalendarCard span,
.crmCalendarCard small {
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.crmCalendarCard .actions {
  margin-top: 4px;
}
.mutedMini {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.foldedList {
  margin-top: 10px;
}
.foldedList > summary {
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
  color: var(--brand);
}
.foldedList[open] > summary {
  background: #eef4e9;
}
.foldedList[open] .foldedArrow {
  transform: rotate(180deg);
}
.foldedList .tableWrap {
  margin-top: 10px;
}
.foldedRows {
  display: grid;
  gap: 7px;
}
.foldedHint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 2px 0 0;
}
.foldedArrow {
  display: inline-block;
  transition: transform .15s ease;
}
.rentalCalendar {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.rentalLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.rentalLegend .rentalSlot {
  min-width: 88px;
}
.rentalCalendar table {
  min-width: 980px;
}
.rentalCalendar th:first-child,
.rentalCalendar td:first-child {
  position: sticky;
  left: 0;
  background: white;
  z-index: 1;
  min-width: 180px;
}
.rentalSlot {
  display: block;
  min-width: 72px;
  padding: 5px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.rentalSlot.free {
  background: #e6f4ec;
  color: #17663f;
}
.rentalSlot.reserved {
  background: #fff4d6;
  color: #8a5a00;
}
.rentalSlot.rented {
  background: #fde4df;
  color: #b42318;
}
.rentalSlot.maintenance {
  background: #edf2f7;
  color: #475467;
}
.rentalSlot.defect,
.rentalSlot.overdue {
  background: #fee4e2;
  color: #b42318;
}
.wideModal {
  width: min(1180px, calc(100vw - 36px));
}
.settingsGroupCard strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: #344054;
}
.settingsGroupCard {
  border-left: 5px solid var(--green);
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: relative; width: auto; height: auto; min-height: auto; overflow: visible; }
  .main { grid-column: 1; max-width: 100vw; height: auto; overflow: visible; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { position: static; flex-direction: column; align-items: stretch; }
  .cols-4, .cols-3, .cols-2, .form-grid { grid-template-columns: 1fr 1fr; }
  .projectStatusGrid { grid-template-columns: 1fr; }
  .quickColumns { grid-template-columns: 1fr; }
  .wide { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .content, .topbar { padding-left: 14px; padding-right: 14px; }
  .nav, .cols-4, .cols-3, .cols-2, .form-grid { grid-template-columns: 1fr; }
  .quickLine { grid-template-columns: minmax(120px, 1fr) 70px minmax(68px, auto); }
  .toolbar button, .toolbar select { flex: 1; }
  .filters label { min-width: 100%; }
  .reportHero { grid-template-columns: 1fr; }
  .modal,
  .wideModal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }
  .modal .body {
    padding: 14px;
  }
  .topbar h2 {
    font-size: 19px;
  }
  .titleWithLogo {
    align-items: flex-start;
  }
  .tableWrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 720px;
  }
  .kpi .value {
    font-size: clamp(20px, 8vw, 28px);
  }
}

@media print {
  body { background: white; }
  .side, .topbar, .noPrint { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .band { box-shadow: none; border: 0; }
  .modalBack.open { position: static; display: block; background: white; padding: 0; }
  .modal { max-height: none; width: 100%; box-shadow: none; border-radius: 0; }
  .modal header { display: none; }
  .modal .body { padding: 0; }
  .reportSection, .reportHero { break-inside: avoid; page-break-inside: avoid; }
  .quickCheck { border-width: 7px; }
  .quickHeader { font-size: 22px; }
  .chart { max-height: 180px; }
  .printOnly { display: block; }
}
