:root {
  color-scheme: light;
  --ink: #18243a;
  --muted: #78849a;
  --line: #e6eaf0;
  --paper: #f5f7fa;
  --white: #ffffff;
  --navy: #101b2d;
  --blue: #2874f0;
  --blue-dark: #1d5fd1;
  --mint: #137b65;
  --mint-soft: #e9f7f2;
  --red: #c34243;
  --red-soft: #fff0ef;
  --amber: #a56a11;
  --amber-soft: #fff6e8;
  font-family: "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5.5vw, calc((100vw - 1200px) / 2));
  color: var(--white);
  background: var(--navy);
}

.topbar-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  font-family: "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.3px;
  text-decoration: none;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 9px;
  color: #b7d0ff;
  font-size: 16px;
}

.brand-light { color: #a9b5c8; font-weight: 500; }

.module-picker { position: relative; }

.module-picker-trigger {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 7px;
  background: rgba(255,255,255,.055);
  color: #d7dfeb;
  font-size: 11px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}

.module-picker-trigger:hover,
.module-picker-trigger[aria-expanded="true"] { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.11); }
.module-picker-trigger:focus-visible { outline: 2px solid #83aef7; outline-offset: 3px; }
.picker-chevron { color: #9fadc1; font-size: 15px; line-height: 1; }

.module-picker-menu {
  width: 280px;
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  padding: 8px;
  border: 1px solid #e6eaf0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(10,22,42,.22);
}

.picker-heading {
  display: block;
  padding: 8px 9px 6px;
  color: #929daf;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 1px;
}

.picker-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #35435b;
  text-align: left;
}

button.picker-item { cursor: pointer; }
.picker-item:not(.picker-item-disabled):hover { background: #f4f7fc; }
.picker-item.is-current { background: #eef4ff; }
.picker-item:focus-visible { outline: 2px solid #83aef7; outline-offset: -2px; }
.picker-item-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 17px; }
.home-picker-icon { background: #f0f3f7; color: #61728a; }
.reconciliation-picker-icon { background: #edf4ff; color: #3276e6; }
.movements-picker-icon { background: #fff4e8; color: #c38525; }
.indicators-picker-icon { background: #f1edff; color: #7862c7; }
.picker-item-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.picker-item-copy strong { color: #34425a; font-size: 10px; font-weight: 650; }
.picker-item-copy small { color: #8a95a7; font-size: 9px; }
.picker-item-check { color: #3075e4; font-size: 12px; }
.picker-item:not(.is-current) .picker-item-check { visibility: hidden; }
.picker-item-disabled { cursor: default; opacity: .58; }
.picker-divider { height: 1px; display: block; margin: 5px 4px; background: #edf0f4; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c5cfde;
  font-size: 12px;
}

.privacy-pill > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64d5af;
  box-shadow: 0 0 0 4px rgba(100,213,175,.12);
}

.topbar-actions { display: flex; align-items: center; gap: 20px; }
.base-picker { display: inline-flex; align-items: center; gap: 8px; color: #c5cfde; font-size: 11px; }
.base-picker select { min-height: 31px; padding: 0 25px 0 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: #1d2b40; color: #fff; font-size: 11px; }
.base-picker select:focus-visible { outline: 2px solid #83aef7; outline-offset: 2px; }

.page-shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

.intro {
  min-height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 38px 4px 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 12px;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -1.9px;
  line-height: 1.1;
}

h1 span { color: var(--blue); }

.intro-copy {
  max-width: 565px;
  margin-bottom: 0;
  color: #647189;
  font-size: 14px;
  line-height: 1.65;
}

.intro-decoration {
  width: 245px;
  height: 210px;
  position: absolute;
  top: 16px;
  right: 4%;
  opacity: .8;
}

.decoration-ring {
  position: absolute;
  border: 1px solid #dfe8f5;
  border-radius: 50%;
}

.ring-one { width: 164px; height: 164px; top: 20px; left: 36px; }
.ring-two { width: 122px; height: 122px; top: 41px; left: 57px; border-color: #d3e2f8; }
.decoration-dot {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 30px;
  right: 28px;
  border: 5px solid #dce9fb;
  border-radius: 50%;
  background: var(--blue);
}

.panel {
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(28,45,75,.035);
}

.upload-card { padding: 23px 26px 18px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 19px;
}

.section-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #edf4ff;
  color: var(--blue);
  font-size: 21px;
}

.section-heading h2 {
  margin: 0 0 3px;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 17px;
  letter-spacing: -.35px;
}

.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }

.import-form {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 145px 180px auto;
  align-items: end;
  gap: 12px;
}

.file-field {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px;
  border: 1px dashed #cbd6e5;
  border-radius: 9px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.file-field:hover, .file-field:focus-within { border-color: var(--blue); background: #f7faff; }
.file-field input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.file-icon {
  flex: none;
  padding: 5px 6px;
  border-radius: 5px;
  background: #e9f6f1;
  color: #188166;
  font-size: 9px;
  font-weight: 800;
}

.file-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.file-copy strong { overflow: hidden; color: #34425a; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-copy small { color: #8c97a9; font-size: 10px; }
.file-action { color: var(--blue); font-size: 11px; font-weight: 700; }
.folder-field { min-height: 52px; position: relative; display: flex; align-items: center; }
.folder-field input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.folder-picker-label { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid #dce5f2; border-radius: 8px; background: #fff; color: #43516a; font-size: 10px; font-weight: 650; cursor: pointer; }
.folder-field:hover .folder-picker-label, .folder-field:focus-within .folder-picker-label { border-color: var(--blue); background: #f7faff; }
.folder-picker-label span { color: var(--blue); font-size: 15px; }

.date-field, .snapshot-field, .compact-field { display: flex; flex-direction: column; gap: 6px; }
.date-field > span, .snapshot-field > span, .compact-field > span { color: #78849a; font-size: 10px; font-weight: 600; }

.date-field input, .snapshot-field select, .compact-field select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  outline: none;
  background: var(--white);
  color: #34425a;
  font-size: 12px;
}

.date-field input:focus, .snapshot-field select:focus, .compact-field select:focus, .search-field:focus-within { border-color: #90b4f8; box-shadow: 0 0 0 3px rgba(40,116,240,.09); }

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  transition: background .15s, transform .15s;
}

.button:active { transform: translateY(1px); }
.button-primary { padding: 0 16px; background: var(--blue); color: var(--white); }
.button-primary:hover { background: var(--blue-dark); }
.button-primary:disabled { cursor: wait; opacity: .65; }
.button-secondary { padding: 0 12px; border: 1px solid #e1e6ee; background: var(--white); color: #43516a; }
.button-secondary:hover { background: #f7f9fc; }
.button-danger { padding: 0 12px; background: var(--red); color: var(--white); }
.button-danger:hover { background: #b43e3b; }
.button-danger:disabled { cursor: not-allowed; opacity: .5; }

.status-message { min-height: 0; margin: 10px 0 0; color: var(--mint); font-size: 11px; }
.status-message:empty { display: none; }
.status-message.is-error { color: var(--red); }
.import-hint { margin: 10px 0 0; color: #78849a; font-size: 10px; line-height: 1.55; }
.import-hint strong { color: #526179; font-weight: 650; }

.data-backup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.data-backup-actions .button { min-height: 34px; }
.backup-note { margin: 7px 0 0; color: #78849a; font-size: 10px; line-height: 1.5; }

.privacy-note {
  margin: 10px 0 0;
  padding-top: 11px;
  border-top: 1px solid #f0f2f6;
  color: #8a95a7;
  font-size: 10px;
}

.privacy-note span { margin-right: 5px; color: var(--mint); }

.dashboard { margin-top: 40px; }

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.dashboard-heading h2, .panel-heading h3 {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.55px;
}

.dashboard-heading .eyebrow, .panel-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.muted-copy { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.snapshot-field { min-width: 220px; }
.snapshot-controls { display: flex; align-items: end; gap: 9px; }
.snapshot-controls .snapshot-field { min-width: 190px; }
.snapshot-controls .snapshot-field:last-child { min-width: 250px; }

.metric-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding: 4px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #eef1f6;
}

.metric-tab {
  flex: 1;
  position: relative;
  min-height: 48px;
  padding: 8px 13px 8px 27px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #66738a;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.metric-tab small { display: block; margin-top: 3px; color: #8994a6; font-size: 9px; font-weight: 500; }
.metric-tab.is-active { background: var(--white); color: #263650; box-shadow: 0 1px 5px rgba(28,45,75,.08); }
.metric-tab.is-active small { color: #75839b; }
.tab-indicator { width: 7px; height: 7px; position: absolute; top: 13px; left: 12px; border-radius: 50%; background: #b9c3d2; }
.metric-tab.is-active .tab-indicator { background: var(--blue); box-shadow: 0 0 0 3px #e6efff; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 106px;
  position: relative;
  overflow: hidden;
  padding: 15px 16px;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  background: var(--white);
}

.summary-card::after {
  width: 66px;
  height: 66px;
  position: absolute;
  right: -20px;
  bottom: -34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: .08;
}

.summary-label { display: block; margin-bottom: 9px; color: #7d899d; font-size: 10px; }
.summary-value { display: block; color: var(--ink); font-family: Manrope, "Segoe UI", sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.summary-hint { display: block; margin-top: 7px; color: #9aa4b3; font-size: 9px; }
.summary-card .summary-hint { line-height: 1.45; }
.summary-card.shortage { color: var(--red); }
.summary-card.shortage .summary-value { color: var(--red); }
.summary-card.surplus { color: var(--mint); }
.summary-card.surplus .summary-value { color: var(--mint); }
.summary-card.impact { color: var(--blue); }

.history-panel, .products-panel { padding: 20px 22px; }
.history-panel { margin-bottom: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: center; gap: 15px; }
.panel-heading > div:first-child { flex: 1; text-align: center; }
.history-heading { justify-content: space-between; }
.history-period-controls { display: flex; align-items: flex-end; gap: 8px; }
.history-period-controls .compact-field { display: flex; flex-direction: column; gap: 4px; color: #657187; font-size: 10px; }
.history-period-controls select { min-width: 105px; height: 34px; padding: 0 25px 0 9px; border: 1px solid #e1e6ee; border-radius: 8px; background: #fff; color: #34425a; font-size: 11px; }
.history-period-controls[hidden] { display: none; }
.panel-heading h3 { font-size: 16px; }
.history-explanation { margin: 11px 0 12px; color: #8893a5; font-size: 10px; }
.compact-field { align-items: center; text-align: center; }
.compact-field select { min-width: 110px; height: 34px; }

.history-chart { display: grid; grid-auto-columns: minmax(290px, 1fr); grid-auto-flow: column; grid-template-rows: 1fr; gap: 11px; padding: 3px 1px 9px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; }
.history-empty { width: 100%; padding: 18px 0; color: #8994a5; font-size: 11px; text-align: center; }
.daily-review { min-width: 0; overflow: hidden; border: 1px solid #edf0f4; border-radius: 9px; background: #fff; scroll-snap-align: start; }
.daily-review-heading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; background: #fafbfd; text-align: center; }
.daily-review-heading strong { color: #34425a; font-size: 11px; }
.daily-review-heading > span { overflow: hidden; color: #8994a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.daily-review-sticks { min-height: 150px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.daily-review-stick { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; padding: 10px 8px 11px; border: 0; background: #fff; color: #657187; text-align: center; cursor: pointer; transition: background .15s, opacity .15s; }
.daily-review-stick + .daily-review-stick { border-left: 1px solid #edf0f4; }
.daily-review-stick:hover:not(:disabled) { background: #f8faff; }
.daily-review-stick:focus-visible { position: relative; z-index: 1; outline: 2px solid rgba(40,116,240,.5); outline-offset: -3px; }
.daily-review-stick:disabled { cursor: default; opacity: .48; }
.daily-stick-value { color: #47566d; font-size: 10px; font-weight: 700; white-space: nowrap; }
.daily-stick-plot { width: 100%; height: 76px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #e7ebf1; background: linear-gradient(to bottom, transparent 49%, #f3f5f8 50%, transparent 51%); }
.daily-stick-plot > span { width: 12px; min-height: 0; display: block; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #f29588, #cf5252); transition: height .2s, filter .15s; }
.daily-review-stick.surplus .daily-stick-plot > span { background: linear-gradient(180deg, #63c4a4, #178366); }
.daily-review-stick:hover:not(:disabled) .daily-stick-plot > span { filter: brightness(.92); }
.daily-review-stick > strong { color: #34425a; font-size: 10px; }
.daily-review-stick.shortage > strong { color: var(--red); }
.daily-review-stick.surplus > strong { color: var(--mint); }
.daily-stick-count, .daily-stick-impact { color: #8994a5; font-size: 9px; }
.daily-stick-impact { color: #657187; font-weight: 650; }
.accumulated-review { width: 100%; }
.accumulated-position { cursor: pointer; }
.accumulated-position:hover:not(:disabled) { background: #f8faff; }
.accumulated-position .daily-stick-plot { max-width: 220px; }
.accumulated-position.shortage .daily-stick-plot > span { background: linear-gradient(180deg, #f29588, #cf5252); }

.product-heading { position: relative; min-height: 42px; margin-bottom: 17px; }
.product-heading > div:first-child { width: 100%; }
.detail-heading-actions { display: flex; align-items: flex-end; gap: 10px; }
.product-heading .detail-heading-actions { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
.filters { display: flex; align-items: end; gap: 10px; margin-bottom: 12px; }
.search-field {
  min-width: 220px;
  min-height: 36px;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  background: var(--white);
  color: #8591a4;
  font-size: 18px;
}

.search-field textarea { width: 100%; min-height: 20px; max-height: 68px; resize: vertical; border: 0; outline: 0; background: transparent; color: #34425a; font-family: inherit; font-size: 11px; line-height: 1.4; }
.search-field textarea::placeholder { color: #9aa4b3; }
.filters .compact-field select { height: 36px; }
.detail-heading-actions > .compact-field, .filters > .compact-field { display: flex; flex-direction: column; gap: 4px; }
.multi-filter { min-width: 145px; position: relative; z-index: 2; color: #34425a; font-size: 11px; text-align: left; }
.multi-filter[open] { z-index: 20; }
.multi-filter > summary { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px; border: 1px solid #e1e6ee; border-radius: 8px; background: #fff; cursor: pointer; list-style: none; white-space: nowrap; }
.multi-filter > summary::-webkit-details-marker { display: none; }
.multi-filter > summary::after { color: #64728a; content: "⌄"; font-size: 13px; }
.multi-filter-options { width: max-content; min-width: 100%; max-width: min(290px, 85vw); position: absolute; top: calc(100% + 5px); right: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid #e1e6ee; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(28,45,75,.16); }
.multi-filter-options label { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 6px; color: #536179; cursor: pointer; white-space: normal; }
.multi-filter-options label:hover { background: #f5f8fc; }
.multi-filter-options input { flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--blue); }
.multi-filter-options span { line-height: 1.35; }
.result-count { margin: 0 1px 10px auto; color: #8994a5; font-size: 10px; white-space: nowrap; }
.accumulated-period-controls { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: -4px 0 15px; padding: 13px 15px; border: 1px solid #e8ecf2; border-radius: 9px; background: #fafbfd; }
.accumulated-period-controls[hidden] { display: none; }
.accumulated-period-controls .compact-field { display: flex; flex-direction: column; gap: 5px; }
.accumulated-period-controls .compact-field span { color: #657187; font-size: 10px; }
.accumulated-period-controls select { min-width: 145px; }
.period-separator { padding-bottom: 8px; color: #8792a4; }
.period-caption { align-self: center; margin: 0 0 3px 8px; color: #7d899d; font-size: 10px; line-height: 1.45; }
.table-wrap { width: 100%; overflow-x: auto; }
.farol-panels { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.farol-panels[hidden] { display: none; }
.farol-list-panel, .farol-zero-panel { min-width: 0; overflow: hidden; border: 1px solid #e8ecf2; border-radius: 9px; background: #fff; }
.farol-list-panel h4, .farol-zero-panel h4 { display: flex; justify-content: center; gap: 6px; margin: 0; padding: 12px; border-bottom: 1px solid #edf0f4; background: #fafbfd; color: #34425a; font-size: 12px; }
.farol-list-panel h4 span, .farol-zero-panel h4 span { color: #8792a4; font-weight: 500; }
.shortage-panel h4 { color: var(--red); }
.surplus-panel h4 { color: var(--mint); }
.farol-list-panel table, .farol-zero-panel table { width: 100%; min-width: 0; table-layout: fixed; }
.farol-list-panel th, .farol-list-panel td, .farol-zero-panel th, .farol-zero-panel td { padding-right: 7px; padding-left: 7px; }
.selection-column { width: 22px; min-width: 22px; text-align: center !important; }
.selection-column input { width: 14px; height: 14px; accent-color: var(--blue); cursor: pointer; }
.selection-column input:disabled { cursor: not-allowed; }
.filters #justifySelectedButton { flex: none; white-space: normal; }
.period-comparison { display: block; margin-top: 4px; color: #8792a4; font-size: 9px; line-height: 1.4; white-space: normal; }
.farol-list-panel .difference-cell { flex-direction: column; align-items: center; gap: 2px; }
.farol-list-panel .difference-cell .reconciliation-breakdown { text-align: left; }
.farol-list-panel .product-name { min-width: 0; }
.farol-list-panel th:nth-child(2), .farol-zero-panel th:nth-child(2) { width: 42%; text-align: left; }
.farol-list-panel th:nth-child(3), .farol-zero-panel th:nth-child(3) { width: 12%; }
.farol-list-panel th:nth-child(4), .farol-zero-panel th:nth-child(4) { width: 24%; }
.farol-list-panel th:nth-child(5), .farol-zero-panel th:nth-child(5) { width: 22%; }
.farol-list-panel th.selection-column, .farol-zero-panel th.selection-column { width: 22px; }
.farol-zero-panel { margin-top: 12px; }
.farol-zero-panel[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead th {
  padding: 11px 9px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  background: #fafbfd;
  color: #8490a2;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

tbody td { padding: 13px 9px; border-bottom: 1px solid #f0f2f6; color: #3b4960; font-size: 11px; vertical-align: middle; }
.table-wrap tbody td { text-align: center; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
th.numeric, td.numeric { text-align: right; }
thead th.numeric { text-align: center; }
thead th:nth-child(2), tbody td:nth-child(2),
thead th:nth-child(4), tbody td:nth-child(4),
thead th:nth-child(6), tbody td:nth-child(6),
thead th:nth-child(7), tbody td:nth-child(7),
thead th:nth-child(8), tbody td:nth-child(8) { text-align: center; }
.product-name { min-width: 180px; text-align: center; }
.product-name strong { display: block; color: #263650; font-size: 11px; font-weight: 700; }
.product-name span { display: block; max-width: 270px; margin-top: 4px; overflow: hidden; color: #748197; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.farol-list-panel .product-name { text-align: left; overflow-wrap: anywhere; }
.farol-list-panel .product-name > span { max-width: none; white-space: normal; overflow-wrap: anywhere; }
.adjusted-marker, .pending-reason-marker { display: inline-block; margin-left: 7px; font-size: 10px; font-weight: 700; }
.adjusted-marker { color: #25846b; }
.pending-reason-marker { color: #a76b14; }
.product-actions { margin-top: 7px; }
.product-justification { margin-top: 8px; color: #536178; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.farol-list-panel .product-justification .mapping-detail { min-width: 0; max-width: none; margin: 0; text-align: left; }
.farol-list-panel .product-justification .mapping-detail-entry { align-items: flex-start; }
.farol-list-panel .product-justification .mapping-detail-entry > span { flex: 1; }
.farol-list-panel .product-justification .mapping-detail-entry small { color: #6f7c90; font-size: 10px; }
.farol-list-panel .pending-difference-reason strong { color: #8d5b12; font-size: 11px; }
.farol-list-panel .mapping-action { max-width: 100%; white-space: normal; }
.farol-list-panel .mapping-suggestion { max-width: 100%; margin: 0; text-align: left; }
.farol-list-panel .mapping-suggestion strong { margin-bottom: 4px; font-size: 11px; }
.farol-list-panel .mapping-suggestion small, .farol-list-panel .mapping-reason-pending { font-size: 10px; line-height: 1.5; }
.farol-list-panel .mapping-reason-pending { margin: 4px 0; color: #8d5b12; }
.difference-number { font-weight: 700; white-space: nowrap; }
.difference-number.shortage { color: var(--red); }
.difference-number.surplus { color: var(--mint); }
.difference-cell { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.difference-details-button { max-width: 170px; padding: 5px 7px; border: 1px solid #dfe8f7; border-radius: 6px; background: #f6f9ff; color: #2566ca; font-size: 9px; line-height: 1.35; white-space: normal; cursor: pointer; }
.difference-details-button:hover { border-color: #b7cdf4; background: #edf4ff; }
.relation-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.relation-export-actions .button { min-height: 32px; padding: 0 10px; font-size: 10px; }
.reconciliation-breakdown { display: block; min-width: 185px; max-width: 260px; color: #718097; font-size: 9px; font-weight: 400; line-height: 1.5; text-align: left; white-space: pre-line; }
.box-quantity { color: #58667c; white-space: nowrap; }
.farol-list-panel .box-quantity, .farol-zero-panel .box-quantity { display: inline-block; min-width: 0; white-space: normal; }
.money { color: #34425a; font-weight: 600; white-space: nowrap; }
.classification {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.classification.shortage { background: var(--red-soft); color: var(--red); }
.classification.surplus { background: var(--mint-soft); color: var(--mint); }
.classification.zero { background: #f0f2f5; color: #79869a; }
.classification.compensated { background: #eaf2ff; color: #3269b0; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 38px 15px; color: #8792a4; text-align: center; }
.empty-state strong { color: #4a5870; font-size: 12px; }
.empty-state span:last-child { font-size: 10px; }
.empty-icon { color: #a6b0bf; font-size: 24px; }
.cost-warning { margin: 10px 0 0; padding: 9px 10px; border-radius: 7px; background: var(--amber-soft); color: var(--amber); font-size: 10px; }

.dashboard-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 12px 2px 0; color: #8b96a7; font-size: 10px; }
.import-management-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: #8b96a7; font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.text-button:hover { color: var(--red); }
.global-error { margin-top: 14px; padding: 11px 13px; border: 1px solid #f3d4d2; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 11px; }
.base-empty-state { margin: 18px 0; padding: 16px 18px; border: 1px solid #dce5f2; border-radius: 10px; background: #fff; color: #52627a; font-size: 13px; }
.site-footer { padding: 29px 20px 24px; color: #96a0af; font-size: 10px; text-align: center; }
.site-footer span { margin: 0 5px; color: #c1c8d2; }

@media (max-width: 800px) {
  .intro-decoration { right: -60px; opacity: .45; }
  .import-form { grid-template-columns: 1fr 190px; }
  .file-field { grid-column: 1 / -1; }
  .folder-field { grid-column: 1; }
  .import-form .button-primary { grid-column: 1 / -1; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-heading { align-items: stretch; flex-direction: column; }
  .snapshot-controls { align-items: stretch; flex-direction: column; }
  .snapshot-controls .snapshot-field, .snapshot-controls .snapshot-field:last-child { width: 100%; min-width: 0; }
  .snapshot-field select { width: 100%; }
  .filters { align-items: stretch; flex-wrap: wrap; }
  .filters .search-field { min-width: 100%; flex-basis: 100%; }
  .filters .compact-field { min-width: 0; flex: 1; }
  .filters .multi-filter { width: 100%; min-width: 0; }
  .result-count { margin-left: auto; }
}

@media (max-width: 560px) {
  .topbar { height: 60px; padding: 0 20px; }
  .topbar-navigation { gap: 10px; }
  .topbar-actions { gap: 9px; }
  .base-picker { gap: 5px; font-size: 10px; }
  .base-picker select { min-height: 29px; padding-left: 7px; font-size: 10px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-mark { width: 28px; height: 28px; }
  .module-picker-trigger { min-height: 31px; gap: 5px; padding: 0 8px; font-size: 10px; }
  .module-picker-menu { position: fixed; top: 54px; right: 16px; left: 16px; width: auto; }
  .privacy-pill { font-size: 0; }
  .privacy-pill > span { width: 8px; height: 8px; }
  .page-shell { width: calc(100% - 32px); }
  .intro { min-height: 218px; padding: 29px 0; }
  .intro-decoration { top: 25px; right: -126px; }
  h1 { font-size: 34px; }
  .intro-copy { max-width: 360px; font-size: 12px; }
  .upload-card { padding: 17px 14px 14px; }
  .import-form { grid-template-columns: 1fr; }
  .file-field { grid-column: auto; }
  .folder-field { grid-column: auto; }
  .date-field input, .button-primary { width: 100%; }
  .dashboard { margin-top: 30px; }
  .dashboard-heading { align-items: stretch; flex-direction: column; }
  .snapshot-controls { align-items: stretch; flex-direction: column; }
  .snapshot-controls .snapshot-field, .snapshot-controls .snapshot-field:last-child { min-width: 0; }
  .snapshot-field select { width: 100%; }
  .metric-switch { flex-direction: column; }
  .summary-grid { gap: 8px; }
  .summary-card { min-height: 94px; padding: 12px; }
  .summary-value { font-size: 21px; }
  .history-panel, .products-panel { padding: 16px 13px; }
  .panel-heading { align-items: flex-start; }
  .history-heading { align-items: center; flex-wrap: wrap; }
  .history-heading > div:first-child { flex-basis: 100%; }
  .history-period-controls { width: 100%; justify-content: center; }
  .history-period-controls .compact-field { flex: 1; }
  .history-period-controls select { width: 100%; }
  .product-heading { align-items: center; }
  .detail-heading-actions { align-items: flex-end; flex-direction: column-reverse; gap: 6px; }
  .filters { align-items: stretch; flex-wrap: wrap; }
  .search-field { min-width: 100%; flex-basis: 100%; }
  .filters .compact-field { flex: 1; }
  .filters .multi-filter { width: 100%; min-width: 0; }
  .result-count { margin-left: auto; }
  .accumulated-period-controls { justify-content: space-between; gap: 7px; padding: 11px; }
  .accumulated-period-controls .compact-field { flex: 1; min-width: 0; }
  .accumulated-period-controls select { min-width: 0; width: 100%; }
  .period-separator { align-self: flex-end; padding-bottom: 10px; }
  .farol-panels { gap: 9px; }
  .dashboard-footer { align-items: flex-start; flex-direction: column; }
  .import-management-actions { justify-content: flex-start; }
  .history-chart { grid-auto-columns: minmax(250px, 85%); }
  .daily-review-metric { padding: 10px; }
  .daily-review-metric + .daily-review-metric { border-top: 1px solid #edf0f4; border-left: 0; }
  .daily-review-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

.home-view { padding: 18px 0 24px; }

.home-welcome {
  min-height: 258px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 38px 35px;
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  background: linear-gradient(110deg, #fff 0%, #fff 56%, #f5f8ff 100%);
  box-shadow: 0 4px 16px rgba(28,45,75,.035);
}

.home-welcome-copy { position: relative; z-index: 1; max-width: 625px; }
.home-welcome h1 { font-size: clamp(32px, 3.8vw, 43px); }
.home-welcome .intro-copy { max-width: 530px; }

.home-illustration { width: 265px; height: 215px; position: absolute; top: 20px; right: 6%; }
.illustration-grid {
  width: 170px;
  height: 150px;
  position: absolute;
  top: 29px;
  left: 47px;
  background-image: radial-gradient(#dce7f7 1.1px, transparent 1.1px);
  background-size: 14px 14px;
  opacity: .8;
}
.illustration-card {
  width: 142px;
  height: 112px;
  position: absolute;
  border: 1px solid #e5ebf5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 15px 34px rgba(40,70,120,.09);
}
.illustration-card-back { top: 35px; left: 87px; transform: rotate(8deg); background: #f7f9fd; }
.illustration-card-front { top: 61px; left: 48px; padding: 21px 17px; transform: rotate(-5deg); }
.illustration-line { width: 78px; height: 7px; display: block; margin: 0 0 11px; border-radius: 5px; background: #e9eef6; }
.illustration-line:first-child { width: 48px; height: 8px; margin-bottom: 16px; background: #cbdcff; }
.illustration-line.short { width: 55px; }
.illustration-check {
  width: 29px;
  height: 29px;
  position: absolute;
  right: 12px;
  bottom: 13px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8f7f1;
  color: #178366;
  font-size: 15px;
  font-weight: 700;
}
.illustration-orbit { width: 13px; height: 13px; position: absolute; top: 36px; right: 17px; border-radius: 50%; background: #5f93ed; box-shadow: 0 0 0 6px #e8f0fd; }

.module-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 34px 2px 17px; }
.module-section-heading .eyebrow { margin-bottom: 5px; }
.module-section-heading h2 { margin: 0; font-family: "Segoe UI", sans-serif; font-size: 22px; font-weight: 750; letter-spacing: -.5px; }
.module-section-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.module-total { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e7ebf1; border-radius: 20px; background: #fff; color: #6f7c90; font-size: 10px; white-space: nowrap; }
.module-total-dot { width: 7px; height: 7px; border-radius: 50%; background: #39a885; }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card {
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 18px 18px 15px;
  border: 1px solid #e6eaf0;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.module-card-active { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.module-card-active:hover { transform: translateY(-3px); border-color: #b7cdf4; box-shadow: 0 12px 28px rgba(40,70,120,.1); }
.module-card-active:focus-visible { outline: 3px solid rgba(40,116,240,.3); outline-offset: 3px; }
.module-card-disabled { background: #fafbfd; }
.module-card-top, .module-card-footer { display: flex; align-items: center; justify-content: space-between; }
.module-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; }
.module-icon svg { width: 23px; height: 23px; }
.reconciliation-icon { background: #edf4ff; color: #3276e6; }
.analysis-icon { background: #f1edff; color: #7862c7; }
.movements-icon { background: #fff4e8; color: #c38525; }
.indicators-icon { background: #f1edff; color: #7862c7; }
.module-status { padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 650; }
.module-status.available { background: #eaf7f2; color: #24846b; }
.module-status.upcoming { background: #f0f2f6; color: #8590a1; }
.module-card-content { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 19px 0 16px; }
.module-card-content strong { font-family: "Segoe UI", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.module-card-content > span { max-width: 260px; color: #7d899b; font-size: 10px; line-height: 1.55; }
.module-card-footer { padding-top: 12px; border-top: 1px solid #f0f2f5; color: #8490a2; font-size: 10px; }
.module-card-active .module-card-footer { color: #3879e3; font-weight: 650; }
.module-arrow { font-size: 16px; line-height: 1; }
.home-note { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 14px; border: 1px solid #e8edf5; border-radius: 9px; background: #f9fbfe; color: #7b8799; font-size: 10px; }
.home-note strong { color: #47566d; font-weight: 650; }
.home-note-icon { color: #6b91d3; font-size: 15px; }

.module-navigation { display: flex; align-items: center; gap: 11px; padding: 17px 0 4px; color: #8a95a6; font-size: 11px; }
.back-home-button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; border: 0; background: transparent; color: #56708f; font-size: 11px; }
.back-home-button:hover { color: var(--blue); }
.back-home-button > span { font-size: 16px; }
.nav-divider { color: #c3cad4; }
.current-module { color: #43516a; font-weight: 650; }
.analysis-picker-icon { color: #7862c7; }

.analysis-view { padding: 18px 0 30px; }
.analysis-welcome { padding: 29px 32px; border: 1px solid #e8ecf2; border-radius: 14px; background: linear-gradient(110deg, #fff 0%, #fff 58%, #f6f3ff 100%); }
.inventory-welcome { background: linear-gradient(110deg, #fff 0%, #fff 58%, #f1f6ff 100%); }
.analysis-welcome .eyebrow { margin-bottom: 8px; }
.analysis-welcome h1 { margin: 0; color: #263650; font-family: "Segoe UI", sans-serif; font-size: clamp(26px, 3vw, 35px); letter-spacing: -1px; }
.analysis-welcome p:last-child { max-width: 660px; margin: 9px 0 0; color: #7d899b; font-size: 11px; line-height: 1.6; }
.analysis-submodule-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 25px 0 12px; }
.analysis-submodule-heading .eyebrow { margin-bottom: 5px; }
.analysis-submodule-heading h2 { margin: 0; color: #293852; font-family: "Segoe UI", sans-serif; font-size: 17px; }
.analysis-submodule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.analysis-submodule-card { width: 100%; min-height: 112px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #e8ecf2; border-radius: 12px; background: #fff; color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.analysis-submodule-card:hover { transform: translateY(-2px); border-color: #d7cefa; box-shadow: 0 8px 20px rgba(49, 61, 84, .07); }
.analysis-submodule-card:focus-visible { outline: 2px solid rgba(120,98,199,.4); outline-offset: 3px; }
.analysis-submodule-icon { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #f3f0ff; color: #7862c7; font-size: 19px; }
.inventory-submodule-card:hover { border-color: #bfd5fa; box-shadow: 0 8px 20px rgba(49, 94, 160, .09); }
.inventory-submodule-card:focus-visible { outline-color: rgba(40,116,240,.4); }
.inventory-submodule-card .analysis-submodule-icon { background: #edf4ff; color: #3276e6; }
.inventory-submodule-card .analysis-submodule-arrow { color: #3276e6; }
.analysis-submodule-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 6px; }
.analysis-submodule-copy strong { color: #34425a; font-size: 13px; }
.analysis-submodule-copy small { color: #7d899b; font-size: 10px; line-height: 1.5; }
.analysis-submodule-arrow { color: #7862c7; font-size: 18px; }
.analysis-submodule-navigation { padding-top: 21px; }
.analysis-panel { margin-top: 16px; padding: 21px 23px; }
.analysis-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.analysis-panel-heading h2 { margin: 0; color: #293852; font-family: "Segoe UI", sans-serif; font-size: 17px; }
.analysis-panel-heading .eyebrow { margin-bottom: 6px; }
.analysis-panel-heading .muted-copy { margin: 6px 0 0; color: #8792a4; font-size: 10px; line-height: 1.5; }
.analysis-filters { display: flex; align-items: flex-end; gap: 10px; }
.analysis-filters .compact-field select { min-width: 190px; }
.analysis-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 20px 0 18px; }
.analysis-summary-card { min-width: 0; min-height: 94px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 14px 16px; border: 1px solid #e8ebf3; border-radius: 11px; background: linear-gradient(135deg, #fff 0%, #fbfaff 100%); color: inherit; text-align: left; cursor: pointer; box-shadow: 0 3px 10px rgba(49, 61, 84, .035); transition: border-color .15s, box-shadow .15s, transform .15s; }
.analysis-summary-card:hover { transform: translateY(-2px); border-color: #cfc5f4; box-shadow: 0 8px 18px rgba(77, 62, 139, .1); }
.analysis-summary-card:focus-visible { outline: 2px solid rgba(120,98,199,.4); outline-offset: 3px; }
.analysis-summary-card > span { color: #7b8799; font-size: 9px; }
.analysis-summary-card strong { margin-top: 4px; color: #34425a; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.analysis-summary-card > small { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #7862c7; font-size: 9px; font-weight: 650; }
.incidence-chart { display: block; }
/* Ranking de incidências: barras horizontais divididas em falta e sobra (cores validadas para daltonismo). */
.incidence-chart { --inc-shortage: #d9483b; --inc-surplus: #14969b; }
.incidence-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 10px; color: #4a5870; font-size: 10px; font-weight: 600; }
.incidence-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.incidence-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--inc-shortage); }
.incidence-swatch.surplus { background: var(--inc-surplus); }
.incidence-legend-note { margin-left: auto; color: #8792a4; font-weight: 500; }
.incidence-ranking { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.incidence-row { width: 100%; display: grid; grid-template-columns: 26px minmax(160px, 300px) minmax(0, 1fr) 96px; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.incidence-ranking li:nth-child(odd) .incidence-row { background: #fafbfd; }
.incidence-row:hover { border-color: #dfe5ee; background: var(--white) !important; box-shadow: 0 4px 12px rgba(49, 61, 84, .06); }
.incidence-row:focus-visible { outline: 2px solid rgba(40,116,240,.45); outline-offset: 1px; }
.incidence-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #eef1f6; color: #5b6880; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.incidence-ranking li:nth-child(-n+3) .incidence-rank { background: #293852; color: var(--white); }
.incidence-product { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.incidence-product strong { color: #293852; font-size: 11px; }
.incidence-product small { display: -webkit-box; overflow: hidden; color: #6b778a; font-size: 9.5px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.incidence-track { height: 20px; display: flex; gap: 2px; border-radius: 4px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), #edf0f5 calc(20% - 1px), #edf0f5 20%); }
.incidence-seg { min-width: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--white); font-size: 9.5px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--inc-shortage); }
.incidence-seg.surplus { background: var(--inc-surplus); }
.incidence-seg:first-child { border-radius: 4px 0 0 4px; }
.incidence-seg:last-child { border-radius: 0 4px 4px 0; }
.incidence-seg:only-child { border-radius: 4px; }
.incidence-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.incidence-total strong { color: #293852; font-size: 12px; font-variant-numeric: tabular-nums; }
.incidence-total small { color: #8792a4; font-size: 9px; white-space: nowrap; }
@media (max-width: 560px) {
  .incidence-legend-note { width: 100%; margin-left: 0; }
  .incidence-row { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "rank product total" "rank track track"; gap: 6px 10px; padding: 9px 8px; }
  .incidence-rank { grid-area: rank; align-self: start; }
  .incidence-product { grid-area: product; }
  .incidence-total { grid-area: total; align-self: start; }
  .incidence-track { grid-area: track; height: 16px; }
}
.incidence-column { min-width: 0; min-height: 242px; display: grid; grid-template-rows: auto 1fr auto auto; align-items: center; gap: 7px; padding: 12px 10px 10px; border: 1px solid #e8ebf3; border-radius: 11px; background: linear-gradient(150deg, #fff 0%, #faf9ff 100%); color: inherit; text-align: center; cursor: pointer; box-shadow: 0 3px 10px rgba(49, 61, 84, .035); transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.incidence-column:hover { transform: translateY(-3px); border-color: #cfc5f4; background: #fcfbff; box-shadow: 0 9px 20px rgba(77, 62, 139, .12); }
.incidence-column:focus-visible { outline: 2px solid rgba(120,98,199,.4); outline-offset: 2px; }
.incidence-column-count { color: #6853b8; font-size: 17px; font-weight: 800; line-height: 1; }
.incidence-column-count small { margin-left: 2px; color: #8994a5; font-size: 8px; font-weight: 550; }
.incidence-column-plot { width: 100%; height: 132px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-bottom: 1px solid #e9e7f2; background: repeating-linear-gradient(to top, transparent 0, transparent 31px, #f1eff7 32px); }
.incidence-column-bar { width: min(52%, 48px); min-height: 12px; display: block; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, #aa99f0 0%, #7059c9 100%); box-shadow: 0 3px 8px rgba(112, 89, 201, .2); transition: height .25s ease; }
.incidence-column:nth-child(5n + 2) .incidence-column-bar { background: linear-gradient(180deg, #87dbcf 0%, #36a895 100%); box-shadow: 0 3px 8px rgba(54, 168, 149, .2); }
.incidence-column:nth-child(5n + 3) .incidence-column-bar { background: linear-gradient(180deg, #ffd27b 0%, #e8a22a 100%); box-shadow: 0 3px 8px rgba(232, 162, 42, .2); }
.incidence-column:nth-child(5n + 4) .incidence-column-bar { background: linear-gradient(180deg, #91baff 0%, #4f81dd 100%); box-shadow: 0 3px 8px rgba(79, 129, 221, .2); }
.incidence-column:nth-child(5n) .incidence-column-bar { background: linear-gradient(180deg, #f4a8ba 0%, #d76b89 100%); box-shadow: 0 3px 8px rgba(215, 107, 137, .2); }
.incidence-column-product { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.incidence-column-product strong { color: #34425a; font-size: 10px; }
.incidence-column-product small { overflow: hidden; color: #8792a4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.incidence-column-date { overflow: hidden; color: #8994a5; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.analysis-summary-dialog { width: min(660px, calc(100vw - 32px)); max-height: min(76vh, 640px); }
.analysis-summary-dialog-list { display: flex; min-height: 90px; max-height: 52vh; flex-direction: column; gap: 7px; overflow: auto; padding: 2px; }
.analysis-summary-item { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid #edf0f4; border-radius: 9px; background: #fcfcfe; color: #47566d; text-align: left; }
.analysis-summary-item > strong, .analysis-summary-item > span:first-child > strong { color: #34425a; font-size: 11px; }
.analysis-summary-item > span { min-width: 0; }
.analysis-summary-item > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.analysis-summary-item small { color: #8792a4; font-size: 9px; line-height: 1.45; }
.analysis-summary-item > small { text-align: right; }
.analysis-summary-product { width: 100%; cursor: pointer; transition: border-color .15s, background .15s; }
.analysis-summary-product:hover { border-color: #cfc5f4; background: #fbfaff; }
.analysis-summary-product:focus-visible { outline: 2px solid rgba(120,98,199,.4); outline-offset: 1px; }
.analysis-summary-item-count { flex: 0 0 auto; color: #6a55b7; font-size: 10px; font-weight: 700; text-align: right; }
.analysis-summary-item-count small { display: block; margin-top: 4px; font-weight: 400; }
.analysis-details-table { min-width: 850px; }
.analysis-details-table td { text-align: center; }
.analysis-details-table .analysis-reason { min-width: 210px; color: #627087; font-size: 9px; line-height: 1.4; }
.analysis-details-table .mapping-action { font-size: 9px; }

@media (max-width: 800px) {
  .home-illustration { right: -25px; opacity: .65; }
  .home-welcome-copy { max-width: 70%; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .farol-panels { grid-template-columns: 1fr; }
  .accumulated-period-controls { flex-wrap: wrap; }
  .period-caption { flex-basis: 100%; margin: 3px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .home-view { padding-top: 10px; }
  .home-welcome { min-height: 290px; align-items: flex-start; padding: 28px 20px; }
  .home-welcome-copy { max-width: 100%; }
  .home-welcome h1 { max-width: 330px; font-size: 32px; }
  .home-welcome .intro-copy { max-width: 390px; padding-right: 5px; font-size: 11px; }
  .home-illustration { top: 128px; right: -99px; opacity: .25; }
  .module-section-heading { align-items: flex-start; flex-direction: column; margin-top: 27px; }
  .module-total { align-self: flex-start; }
  .module-grid { grid-template-columns: 1fr; gap: 10px; }
  .module-card { min-height: 182px; padding: 15px; }
  .module-card-content { padding: 15px 0 12px; }
  .home-note { align-items: flex-start; line-height: 1.5; }
  .module-navigation { padding-top: 13px; }
}

.mapping-panel { margin-bottom: 16px; padding: 18px 22px; }
.reconciliation-notice { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #f1dfb5; border-radius: 7px; background: #fff9e9; color: #80621d; font-size: 10px; line-height: 1.5; }
.mapping-explanation { margin: 9px 0 13px; color: #8490a2; font-size: 10px; line-height: 1.55; }
.mapping-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.mapping-stat { width: 100%; min-height: 76px; padding: 12px; border: 1px solid #edf0f4; border-radius: 8px; background: #fbfcfe; color: inherit; font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.mapping-stat:hover { border-color: #cbd9ed; background: #f7faff; }
.mapping-stat:active { transform: translateY(1px); }
.mapping-stat:focus-visible { outline: 2px solid rgba(40,116,240,.3); outline-offset: 2px; }
.mapping-stat span { display: block; color: #657187; font-size: 10px; font-weight: 600; line-height: 1.4; }
.mapping-stat strong { display: block; margin-top: 5px; color: #34425a; font-size: 19px; font-weight: 750; }
.mapping-stat.unmapped strong { color: var(--red); }
.mapping-stat.partial strong { color: var(--amber); }
.mapping-stat.mapped strong { color: var(--mint); }
.mapping-stat.compensated strong { color: #3269b0; }
.mapping-status { display: inline-flex; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.mapping-status.unmapped { background: var(--red-soft); color: var(--red); }
.mapping-status.partial { background: var(--amber-soft); color: var(--amber); }
.mapping-status.mapped { background: var(--mint-soft); color: var(--mint); }
.mapping-status.zero { background: #f0f2f5; color: #79869a; }
.mapping-status.compensated { background: #eaf2ff; color: #3269b0; }
.mapping-detail { min-width: 180px; max-width: 255px; margin: 0 auto; color: #657187; font-size: 10px; line-height: 1.5; text-align: center; }
.mapping-detail-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 3px 0; }
.mapping-detail-entry + .mapping-detail-entry { border-top: 1px solid #f0f2f5; }
.mapping-detail-entry strong { color: #47566d; font-weight: 650; }
.mapping-detail-entry small { display: block; margin-top: 2px; color: #929daf; font-size: 8px; }
.mapping-pending-reason { display: block; max-width: 230px; margin-top: 4px; color: #8793a7; font-size: 8px; line-height: 1.4; }
.mapping-detail-entry button { flex: none; padding: 1px 3px; border: 0; background: transparent; color: #9aa4b3; font-size: 12px; }
.mapping-detail-entry button:hover { color: var(--red); }
.mapping-suggestion { max-width: 230px; margin: 0 auto; color: #657187; font-size: 10px; line-height: 1.45; text-align: center; }
.mapping-suggestion strong { display: block; margin-bottom: 3px; color: #47566d; font-weight: 650; }
.mapping-suggestion small { display: block; margin-top: 3px; color: #929daf; font-size: 8px; }
.mapping-suggestion .mapping-action { margin-top: 6px; }
.mapping-reason-note { margin: -5px 0 12px; padding: 9px 10px; border: 1px solid #f1dfb5; border-radius: 7px; background: #fff9e9; color: #80621d; font-size: 10px; line-height: 1.5; }
.mapping-action { min-height: 30px; padding: 0 9px; border: 1px solid #dfe8f7; border-radius: 6px; background: #f6f9ff; color: #2566ca; font-size: 10px; font-weight: 650; white-space: nowrap; }
.mapping-action:hover { border-color: #b7cdf4; background: #edf4ff; }
.mapping-action-secondary { margin-top: 5px; border-color: #e6eaf0; background: #fff; color: #707e93; }
.mapping-action-secondary:hover { border-color: #cbd6e5; background: #f8f9fb; }
.mapping-off { color: #a0a9b6; font-size: 9px; }

.mapping-dialog {
  width: min(475px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(10,22,42,.28);
}
.mapping-dialog::backdrop { background: rgba(14,25,43,.48); backdrop-filter: blur(2px); }
.mapping-dialog form { padding: 22px; }
.difference-details-dialog { width: min(760px, calc(100vw - 28px)); max-width: none; max-height: min(86vh, 760px); padding: 0; overflow: hidden; border: 1px solid #e6eaf0; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(10,22,42,.28); }
.difference-details-dialog::backdrop { background: rgba(14,25,43,.48); backdrop-filter: blur(2px); }
.difference-details-content { display: flex; max-height: inherit; flex-direction: column; padding: 20px; }
.difference-details-content .dialog-heading { position: relative; flex: none; margin-bottom: 14px; }
.difference-details-content .dialog-heading > div { flex: 1; padding-right: 34px; }
.difference-details-content .dialog-heading .dialog-close { position: absolute; top: 0; right: 0; }
.difference-details-body { overflow: auto; padding: 15px 17px; border: 1px solid #edf0f4; border-radius: 8px; background: #fafbfd; color: #536178; font-size: 12px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.reconciliation-record-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.reconciliation-record-actions .button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.mapping-details-dialog { width: min(1120px, calc(100vw - 24px)); max-width: none; max-height: min(94vh, 900px); padding: 0; overflow: hidden; border: 1px solid #e6eaf0; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(10,22,42,.28); }
.mapping-details-dialog::backdrop { background: rgba(14,25,43,.48); backdrop-filter: blur(2px); }
.mapping-details-content { display: flex; max-height: inherit; flex-direction: column; padding: 16px; }
.mapping-details-content .dialog-heading { position: relative; flex: none; margin-bottom: 14px; }
.mapping-details-content .dialog-heading > div { flex: 1; text-align: center; }
.mapping-details-content .dialog-heading .dialog-close { position: absolute; top: 0; right: 0; }
.mapping-details-table-wrap { min-height: 120px; overflow: auto; border: 1px solid #edf0f4; border-radius: 8px; }
.mapping-details-table { width: 100%; min-width: 0; table-layout: fixed; }
.mapping-details-table thead th { position: sticky; z-index: 1; top: 0; }
.mapping-details-table td { padding: 8px 7px; }
.mapping-details-table td:first-child { text-align: left; }
.mapping-details-table th:nth-child(1), .mapping-details-table td:nth-child(1) { width: 22%; }
.mapping-details-table th:nth-child(2), .mapping-details-table td:nth-child(2) { width: 12%; }
.mapping-details-table th:nth-child(3), .mapping-details-table td:nth-child(3) { width: 37%; }
.mapping-details-table th:nth-child(4), .mapping-details-table td:nth-child(4) { width: 13%; }
.mapping-details-table th:nth-child(5), .mapping-details-table td:nth-child(5) { width: 16%; }
.mapping-details-table td:last-child { min-width: 0; overflow-wrap: anywhere; color: #627087; font-size: 10px; line-height: 1.45; }
.mapping-modal-quantity { display: block; margin-top: 4px; color: #8390a3; font-size: 9px; white-space: nowrap; }
.mapping-modal-reasons { text-align: center; }
.mapping-details-dialog .empty-state { min-height: 140px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading h2 { margin: 0; color: #263650; font-family: "Segoe UI", sans-serif; font-size: 17px; font-weight: 750; }
.dialog-heading p:last-child { margin: 5px 0 0; color: #8792a4; font-size: 10px; }
.dialog-close { width: 28px; height: 28px; display: grid; flex: none; place-items: center; border: 0; border-radius: 7px; background: #f3f5f8; color: #7c8798; font-size: 19px; line-height: 1; }
.dialog-field { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.dialog-field > span { color: #68758a; font-size: 10px; font-weight: 650; }
.dialog-field-hint { color: #8792a4; font-size: 9px; line-height: 1.4; }
.dialog-field input, .dialog-field select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #e1e6ee; border-radius: 7px; outline: none; background: #fff; color: #34425a; font-size: 11px; }
.dialog-field input:focus, .dialog-field select:focus { border-color: #90b4f8; box-shadow: 0 0 0 3px rgba(40,116,240,.09); }
.dialog-fields-row { display: flex; gap: 10px; }
.dialog-error { margin: 0 0 12px; color: var(--red); font-size: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid #edf0f4; }
.dialog-actions .button { min-height: 36px; padding: 0 12px; }
.report-management-dialog { width: min(660px, calc(100vw - 32px)); max-width: none; max-height: min(82vh, 720px); padding: 0; overflow: hidden; border: 1px solid #e6eaf0; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(10,22,42,.28); }
.report-management-dialog::backdrop { background: rgba(14,25,43,.48); backdrop-filter: blur(2px); }
.report-management-content { display: flex; max-height: inherit; flex-direction: column; padding: 20px; }
.report-management-content .dialog-heading { position: relative; flex: none; margin-bottom: 12px; }
.report-management-content .dialog-heading > div { flex: 1; padding-right: 28px; }
.report-management-content .dialog-heading .dialog-close { position: absolute; top: 0; right: 0; }
.report-management-warning { flex: none; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #f1dfb5; border-radius: 7px; background: #fff9e9; color: #80621d; font-size: 10px; line-height: 1.5; }
.report-management-toolbar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: #657187; font-size: 10px; }
.report-management-toolbar label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.report-management-toolbar input, .report-management-item input { accent-color: var(--blue); }
.report-management-list { min-height: 110px; max-height: 48vh; overflow: auto; margin-bottom: 12px; border: 1px solid #edf0f4; border-radius: 8px; }
.report-management-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.report-management-item + .report-management-item { border-top: 1px solid #edf0f4; }
.report-management-item:hover { background: #f8faff; }
.report-management-item-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.report-management-item-copy strong { color: #34425a; font-size: 11px; }
.report-management-item-copy small { overflow-wrap: anywhere; color: #8792a4; font-size: 9px; line-height: 1.4; }
.report-management-list > .empty-state { min-height: 110px; padding: 30px 15px; font-size: 10px; }
.mapping-filter-disabled { opacity: .6; }

@media (max-width: 800px) {
  .mapping-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mapping-detail { min-width: 140px; }
}

@media (max-width: 560px) {
  .mapping-panel { padding: 15px 13px; }
  .mapping-summary { gap: 7px; }
  .mapping-stat { padding: 9px; }
  .mapping-stat strong { font-size: 15px; }
  .product-heading { align-items: stretch; flex-wrap: wrap; }
  .product-heading > div:first-child { width: 100%; }
  .product-heading h3 { font-size: 15px; }
  .product-heading .detail-heading-actions { position: static; width: 100%; min-width: 0; align-items: flex-end; flex-direction: row; justify-content: center; transform: none; }
  .mapping-details-content { padding: 14px; }
  .mapping-details-dialog { width: calc(100vw - 20px); max-height: 94vh; }
  .difference-details-content { padding: 14px; }
  .difference-details-dialog { width: calc(100vw - 20px); max-height: 90vh; }
  .mapping-details-table { min-width: 680px; table-layout: auto; }
  .report-management-content { padding: 14px; }
  .report-management-dialog { max-height: 85vh; }
  .report-management-content .dialog-actions { flex-wrap: wrap; }
  .report-management-content .dialog-actions .button { flex: 1; }
  .dialog-fields-row { flex-direction: column; gap: 0; }
  .daily-review-heading { align-items: center; flex-direction: column; }
}

@media (max-width: 800px) {
  .analysis-panel-heading { align-items: stretch; flex-direction: column; }
  .analysis-filters .compact-field { flex: 1; }
  .analysis-filters .compact-field select { width: 100%; min-width: 0; }
  .incidence-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .analysis-view { padding-top: 10px; }
  .analysis-welcome { padding: 23px 19px; }
  .analysis-welcome h1 { font-size: 27px; }
  .analysis-submodule-heading { margin-top: 20px; }
  .analysis-submodule-card { min-height: 100px; padding: 14px; }
  .analysis-panel { padding: 16px 13px; }
  .analysis-filters { align-items: stretch; flex-direction: column; }
  .analysis-summary { grid-template-columns: 1fr; gap: 7px; }
  .analysis-summary-card { min-height: 72px; padding: 10px 12px; }
  .analysis-summary-card span { font-size: 8px; line-height: 1.4; }
  .analysis-summary-card strong { font-size: 19px; }
  .incidence-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .incidence-column { min-height: 214px; padding: 10px 8px 9px; }
  .incidence-column-plot { height: 112px; }
  .incidence-column-product strong { font-size: 9px; }
  .incidence-column-product small, .incidence-column-date { font-size: 7px; }
  .analysis-summary-dialog .mapping-details-content { padding: 14px; }
  .analysis-summary-item { gap: 8px; padding: 9px; }
}

.reconciliation-test-panel { margin-top: 16px; padding: 21px 23px; }
.reconciliation-test-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}
.reconciliation-test-form .compact-field { gap: 6px; }
.reconciliation-test-form .compact-field input,
.reconciliation-test-form .compact-field select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe5ed;
  border-radius: 7px;
  background: #fff;
  color: #34425a;
  font-size: 11px;
}
.reconciliation-test-file {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #6f7c90;
  font-size: 10px;
  font-weight: 650;
}
.reconciliation-test-file input {
  width: 100%;
  min-height: 38px;
  padding: 7px;
  border: 1px solid #dfe5ed;
  border-radius: 7px;
  background: #fff;
  color: #59677c;
  font-size: 10px;
}
.reconciliation-test-form .button { align-self: end; min-height: 38px; }
.reconciliation-test-warning {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #f1dfb5;
  border-radius: 8px;
  background: #fff9e9;
  color: #80621d;
  font-size: 10px;
  line-height: 1.55;
}
.reconciliation-test-results-heading { align-items: flex-start; }
.reconciliation-test-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.reconciliation-test-actions .button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.reconciliation-test-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0 13px;
}
.reconciliation-test-stat {
  min-width: 0;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  border: 1px solid #e8ebf3;
  border-radius: 9px;
  background: #fbfcfe;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.reconciliation-test-stat:hover { transform: translateY(-1px); border-color: #bfd5fa; background: #f7faff; }
.reconciliation-test-stat:focus-visible { outline: 2px solid rgba(40,116,240,.35); outline-offset: 2px; }
.reconciliation-test-stat > span { color: #7b8799; font-size: 9px; }
.reconciliation-test-stat strong { margin-top: 4px; color: #34425a; font-size: 20px; }
.reconciliation-test-stat small { margin-top: 3px; color: #8994a5; font-size: 8px; line-height: 1.4; }
.reconciliation-test-stat .reconciliation-test-stat-action { margin-top: 7px; color: #3472ce; font-size: 8px; font-weight: 650; }
.reconciliation-test-card-hint { margin: -5px 0 11px; color: #8994a5; font-size: 9px; }
.reconciliation-code-search { display: grid; gap: 5px; max-width: 460px; margin: 0 0 12px; color: #68758a; font-size: 9px; font-weight: 650; }
.reconciliation-code-search input { min-height: 36px; padding: 0 10px; border: 1px solid #dfe5ee; border-radius: 6px; color: #34425a; font: inherit; font-weight: 400; }
.reconciliation-code-search input:focus { border-color: #8fb5f0; outline: 2px solid rgba(40,116,240,.12); }
.reconciliation-list-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.reconciliation-list-filter { display: grid; gap: 4px; color: #68758a; font-size: 9px; font-weight: 650; }
.reconciliation-list-filter select { min-width: 180px; min-height: 34px; padding: 0 9px; border: 1px solid #dfe5ee; border-radius: 6px; background: #fff; color: #34425a; font: inherit; }
.reconciliation-result-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; }
.reconciliation-result-tab { padding: 7px 11px; border: 1px solid #e3e8f0; border-radius: 999px; background: #fff; color: #68758a; font-size: 9px; }
.reconciliation-result-tab.is-active { border-color: #b7cff6; background: #edf4ff; color: #245fb4; font-weight: 700; }
.reconciliation-result-tab:focus-visible { outline: 2px solid rgba(40,116,240,.35); outline-offset: 2px; }
.reconciliation-visible-count { margin: -3px 0 10px; color: #68758a; font-size: 9px; }
.reconciliation-list-exports { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 10px; }
.reconciliation-list-exports .button { min-height: 32px; padding: 0 10px; font-size: 9px; }
.reconciliation-test-alerts { display: grid; gap: 7px; margin-bottom: 12px; }
.reconciliation-test-alert {
  padding: 9px 11px;
  border: 1px solid #f1dfb5;
  border-radius: 7px;
  background: #fff9e9;
  color: #80621d;
  font-size: 9px;
  line-height: 1.5;
}
.reconciliation-test-alert p { margin: 0; }
.reconciliation-test-table-wrap { max-height: 62vh; overflow: auto; border: 1px solid #e8ecf2; border-radius: 8px; }
.reconciliation-test-table { width: 100%; min-width: 800px; border-collapse: collapse; font-size: 10px; }
.reconciliation-test-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 8px;
  background: #f3f6fa;
  color: #637087;
  text-align: center;
  white-space: nowrap;
}
.reconciliation-test-table td { padding: 8px; border-top: 1px solid #edf0f4; color: #47556b; text-align: center; vertical-align: middle; }
.reconciliation-test-table tbody tr { cursor: pointer; }
.reconciliation-test-table tbody tr:hover { background: #f7faff; }
.reconciliation-test-table tbody tr:focus-visible { outline: 2px solid rgba(40,116,240,.35); outline-offset: -2px; }
.reconciliation-test-table .reconciliation-product-code-cell { min-width: 78px; color: #34425a; white-space: nowrap; }
.reconciliation-test-table .reconciliation-product-description-cell { min-width: 250px; line-height: 1.4; }
.reconciliation-test-table .reconciliation-product-description-cell small { display: block; }
.reconciliation-test-table td small { margin-top: 4px; color: #8994a5; font-size: 8px; line-height: 1.35; }
.reconciliation-test-table .reconciliation-filter-empty { padding: 18px; color: #8994a5; text-align: center; }
.reconciliation-test-table th:first-child,
.reconciliation-test-table td.reconciliation-select-cell { width: 36px; text-align: center; }
.reconciliation-product-checkbox,
#reconciliationSelectVisible { width: 15px; height: 15px; accent-color: #3472ce; cursor: pointer; }
.reconciliation-selection-count { align-self: center; color: #78849a; font-size: 9px; }
.reconciliation-test-table .numeric { text-align: center; white-space: nowrap; }
.reconciliation-test-table .shortage { color: #a82424; font-weight: 700; }
.reconciliation-test-table .surplus { color: #176d3b; font-weight: 700; }
.reconciliation-test-table .zero { color: #78849a; }
.reconciliation-metric-dialog { width: min(920px, calc(100vw - 24px)); }
.reconciliation-metric-table { min-width: 760px; }
.mapping-details-table.reconciliation-metric-table th,
.mapping-details-table.reconciliation-metric-table td { text-align: center; }
.reconciliation-metric-table th:nth-child(n+3),
.reconciliation-metric-table td:nth-child(n+3) { white-space: nowrap; }
.reconciliation-metric-table .reconciliation-product-code-cell { min-width: 78px; }
.reconciliation-metric-table .reconciliation-product-description-cell { min-width: 220px; }
.reconciliation-test-footnote { margin: 10px 0 0; color: #8792a4; font-size: 9px; line-height: 1.5; }
.reconciliation-history-panel { margin-bottom: 24px; }
.reconciliation-test-history { display: grid; gap: 7px; margin-top: 12px; }
.reconciliation-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
  background: #fff;
}
.reconciliation-history-item:hover { border-color: #bfd5fa; background: #f9fbff; }
.reconciliation-history-open {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.reconciliation-history-open > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.reconciliation-history-item strong { color: #34425a; font-size: 10px; }
.reconciliation-history-item small { color: #8792a4; font-size: 8px; overflow-wrap: anywhere; }
.reconciliation-history-badge { flex: 0 0 auto; color: #80621d; font-size: 8px; font-weight: 650; }
.reconciliation-history-action { flex: 0 0 auto; min-height: 32px; padding: 0 10px; font-size: 9px; }
.reconciliation-history-empty { margin: 0; padding: 12px; color: #8792a4; font-size: 10px; }

@media (max-width: 800px) {
  .reconciliation-test-results-heading { align-items: stretch; }
  .reconciliation-test-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .reconciliation-test-panel { padding: 16px 13px; }
  .reconciliation-history-item,
  .reconciliation-history-open { align-items: flex-start; flex-direction: column; }
  .reconciliation-history-action { width: 100%; }
  .reconciliation-test-form { grid-template-columns: 1fr; }
  .reconciliation-test-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .reconciliation-test-stat { min-height: 76px; padding: 9px; }
  .reconciliation-test-stat strong { font-size: 17px; }
  .reconciliation-test-actions { flex-direction: column; }
  .reconciliation-test-actions .button { width: 100%; }
  .reconciliation-history-item { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 360px) {
  .incidence-chart { grid-template-columns: 1fr; }
  .incidence-column { min-height: 195px; }
  .incidence-column-plot { height: 100px; }
}

/* Login e permissões da versão na nuvem */
.nuvem-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--navy);
}
.nuvem-login-cartao {
  width: min(100%, 360px);
  display: grid;
  gap: 14px;
  padding: 28px 24px;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}
.nuvem-login-cartao .brand-mark { background: var(--navy); font-weight: 800; }
.nuvem-login-cartao h1 { margin: 0; font-size: 22px; }
.nuvem-login-cartao p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.nuvem-login-cartao label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.nuvem-login-cartao input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
}
.nuvem-login-cartao .nuvem-login-erro { color: #b42318; font-weight: 600; }
.nuvem-login-cartao .button { justify-content: center; min-height: 44px; }
.nuvem-sair {
  margin-left: 4px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: 600 11px "Segoe UI", sans-serif;
  cursor: pointer;
}

/* Telas de quem só consulta: o bloqueio de verdade está no banco. */
body[data-papel="leitor"] .reconciliation-test-panel:not(.reconciliation-history-panel):not(.reconciliation-visitor-panel),
body[data-papel="leitor"] .reconciliation-history-action,
body[data-papel="leitor"] .upload-card,
body[data-papel="leitor"] #clearHistoryButton,
body[data-papel="leitor"] #justifySelectedButton,
body[data-papel="leitor"] [data-action],
body[data-papel="leitor"] .group-classes-actions,
body[data-papel="leitor"] .group-classes-help,
body[data-papel="leitor"] .selection-column {
  display: none !important;
}

/* ---------- Diferenças por Curva, Embalagem e Rua ---------- */
.group-classes-actions { display: flex; align-items: center; }
.group-classes-upload { display: inline-flex; align-items: center; height: 36px; cursor: pointer; }
.group-classes-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.group-class-chip { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #f1e2c4; border-radius: 10px; background: var(--amber-soft); }
.group-class-chip > span:first-child { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #f3d9a6; color: var(--amber); font-size: 11px; font-weight: 800; }
.group-class-chip > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.group-class-chip strong { color: #34425a; font-size: 11px; }
.group-class-chip small { overflow: hidden; color: #7d899b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.group-class-chip.is-ready { border-color: #cfeadf; background: var(--mint-soft); }
.group-class-chip.is-ready > span:first-child { background: #c9eadc; color: var(--mint); }
.group-classes-message { margin: 12px 0 0; padding: 9px 12px; border-radius: 8px; background: var(--mint-soft); color: var(--mint); font-size: 10px; line-height: 1.5; }
.group-classes-message.is-error { background: var(--red-soft); color: var(--red); }
.group-classes-help { margin: 12px 0 0; color: #8792a4; font-size: 10px; line-height: 1.5; }
.analysis-date-field { align-items: flex-start; text-align: left; }
.analysis-date-field input { width: 150px; }
.analysis-period-clear { height: 34px; white-space: nowrap; }
.analysis-filters .compact-field input { height: 34px; padding: 0 10px; border: 1px solid #e1e6ee; border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; font-size: 11px; }
.analysis-filters .compact-field input:focus { border-color: #90b4f8; outline: none; box-shadow: 0 0 0 3px rgba(40,116,240,.09); }
.group-analysis-filters .compact-field select { min-width: 150px; }
.group-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 16px; }
.group-summary-card { --tone: var(--red); min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px 15px; border: 1px solid #e8ebf3; border-top: 3px solid var(--tone); border-radius: 11px; background: var(--white); color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.group-summary-card { --tone: #d9483b; }
.group-summary-card.surplus { --tone: #14969b; }
.group-summary-card.accumulated { --tone: #2566ca; }
.group-summary-card.covered { --tone: #c98a1e; }
.group-summary-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(49, 61, 84, .08); }
.group-summary-card:focus-visible { outline: 2px solid rgba(40,116,240,.4); outline-offset: 3px; }
.group-summary-card.is-active { border-color: var(--tone); box-shadow: 0 0 0 1px var(--tone), 0 8px 18px rgba(49, 61, 84, .08); }
.group-summary-card > span { color: #7b8799; font-size: 9px; font-weight: 650; }
.group-summary-card strong { color: var(--tone); font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.group-summary-card small { color: #7d899b; font-size: 9px; line-height: 1.4; }
.group-analysis-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-dimension-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #e6eaf0; border-radius: 10px; background: #f6f8fb; }
.group-dimension-tab { min-height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: #5b6880; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.group-dimension-tab:hover { color: #293852; }
.group-dimension-tab.is-active { background: var(--white); color: #1d5fd1; box-shadow: 0 1px 4px rgba(49, 61, 84, .12); }
.group-dimension-tab:focus-visible { outline: 2px solid rgba(40,116,240,.4); outline-offset: 2px; }
.group-measure-field { align-items: flex-start; text-align: left; }
.group-chart-caption { margin: 6px 0 10px; color: #4a5870; font-size: 11px; font-weight: 650; }
/* Mesmo visual do ranking da Incidência: linhas alternadas, faixa com guias, valor dentro da barra.
   Falta e sobra usam as cores validadas para daltonismo; o texto fica na cor do texto, não da série. */
.group-chart { display: flex; flex-direction: column; gap: 4px; }
.group-bar-row { --tone: #d9483b; width: 100%; display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr) 118px; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.group-chart > .group-bar-row:nth-child(odd) { background: #fafbfd; }
.group-chart.is-ranked .group-bar-row { grid-template-columns: 26px minmax(140px, 260px) minmax(0, 1fr) 118px; }
.group-bar-row.surplus { --tone: #14969b; }
.group-bar-row.accumulated { --tone: #2566ca; }
.group-bar-row.covered { --tone: #9a6412; }
.group-bar-row:hover:not(:disabled) { border-color: #dfe5ee; background: var(--white) !important; box-shadow: 0 4px 12px rgba(49, 61, 84, .06); }
.group-bar-row:focus-visible { outline: 2px solid rgba(40,116,240,.45); outline-offset: 1px; }
.group-bar-row:disabled { cursor: default; opacity: .55; }
.group-bar-row.is-missing .group-bar-label strong { color: #8792a4; font-style: italic; }
.group-bar-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #eef1f6; color: #5b6880; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.group-chart.is-ranked > .group-bar-row:nth-child(-n+3):not(.is-missing) .group-bar-rank { background: #293852; color: var(--white); }
.group-bar-label { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.group-bar-label strong { display: -webkit-box; overflow: hidden; color: #293852; font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.group-bar-label small, .group-bar-value small { color: #8792a4; font-size: 9px; white-space: nowrap; }
.group-bar-track { height: 20px; overflow: hidden; border-radius: 4px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), #edf0f5 calc(20% - 1px), #edf0f5 20%); }
.group-bar-fill { height: 100%; min-width: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 4px; background: var(--tone); color: var(--white); font-size: 9.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; transition: width .25s ease; }
.group-bar-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.group-bar-value strong { color: #293852; font-size: 12px; font-variant-numeric: tabular-nums; }
.group-matrix-wrap { margin-top: 18px; overflow-x: auto; }
.group-matrix { width: 100%; border-collapse: collapse; font-size: 10px; }
.group-matrix caption { padding-bottom: 8px; color: #4a5870; font-size: 11px; font-weight: 650; text-align: left; }
.group-matrix th, .group-matrix td { padding: 8px 10px; border-bottom: 1px solid #edf0f4; text-align: left; white-space: nowrap; }
.group-matrix thead th { color: #7b8799; font-size: 9px; font-weight: 650; }
.group-matrix tbody th { color: #34425a; font-weight: 650; }
.group-matrix .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.group-matrix td.shortage { color: var(--red); }
.group-matrix td.surplus { color: #0f7a7e; }
.group-matrix td.accumulated { color: #2566ca; }
.group-matrix td.covered { color: #8d5b12; }
.group-matrix td.is-zero { color: #b7bfcc; }
.group-matrix tr.is-missing th { color: #8792a4; font-style: italic; }
.group-matrix-total th, .group-matrix-total td { border-top: 2px solid #dfe4ec; font-weight: 800; }
.group-matrix-empty { color: #8792a4; text-align: center !important; }

@media (max-width: 900px) {
  .group-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-classes-status { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .group-analysis-toolbar { align-items: stretch; flex-direction: column; }
  .group-dimension-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .group-dimension-tab { padding: 0 6px; }
  .analysis-filters .compact-field input { width: 100%; }
  .group-summary { gap: 7px; }
  .group-summary-card { padding: 10px 11px; }
  .group-summary-card strong { font-size: 15px; }
  .group-bar-row, .group-chart.is-ranked .group-bar-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track"; gap: 6px 10px; padding: 9px 10px; }
  .group-chart.is-ranked .group-bar-row { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-areas: "rank label value" "rank track track"; }
  .group-bar-rank { grid-area: rank; align-self: start; }
  .group-bar-label { grid-area: label; }
  .group-bar-value { grid-area: value; }
  .group-bar-track { grid-area: track; height: 16px; }
}

/* Celular: linhas das tabelas viram cartões, sem rolagem lateral. */
@media (max-width: 560px) {
  .farol-list-panel thead, .farol-zero-panel thead { display: none; }
  .farol-list-panel table, .farol-zero-panel table,
  .farol-list-panel tbody, .farol-zero-panel tbody { display: block; width: 100%; }
  .farol-list-panel tbody tr, .farol-zero-panel tbody tr {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    grid-template-areas: "sel prod prod" "sel sit val" "sel dif dif" "sel notas notas";
    align-items: center;
    gap: 8px 10px;
    padding: 14px 12px;
    border-bottom: 1px solid #f0f2f6;
  }
  .farol-list-panel tbody tr:last-child, .farol-zero-panel tbody tr:last-child { border-bottom: 0; }
  .farol-list-panel tbody td, .farol-zero-panel tbody td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  .farol-list-panel tbody td.selection-column, .farol-zero-panel tbody td.selection-column { grid-area: sel; align-self: start; width: auto; padding-top: 2px; }
  .farol-list-panel tbody td.product-name, .farol-zero-panel tbody td.product-name { grid-area: prod; text-align: center; }
  .farol-list-panel .product-justification .mapping-detail-entry { flex: 1 1 120px; min-width: 0; }
  .farol-list-panel tbody td.product-notes, .farol-zero-panel tbody td.product-notes { grid-area: notas; }
  .farol-list-panel tbody td.col-situacao, .farol-zero-panel tbody td.col-situacao { grid-area: sit; }
  .farol-list-panel tbody td.col-diferenca, .farol-zero-panel tbody td.col-diferenca { grid-area: dif; }
  .farol-list-panel tbody td.col-valor, .farol-zero-panel tbody td.col-valor { grid-area: val; text-align: right; }
  .farol-list-panel .product-notes-empty, .farol-zero-panel .product-notes-empty { display: none; }
  .farol-list-panel .product-name > span, .farol-zero-panel .product-name > span { margin: 2px 0 0; }
  .farol-list-panel .product-name strong, .farol-zero-panel .product-name strong { font-size: 13px; }
  .farol-list-panel .product-name > span, .farol-zero-panel .product-name > span { max-width: none; font-size: 11px; white-space: normal; }
  .farol-list-panel .difference-cell, .farol-zero-panel .difference-cell {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px 10px;
  }
  .farol-list-panel .difference-number { font-size: 13px; }
  .farol-list-panel .difference-details-button { max-width: none; padding: 7px 10px; font-size: 10px; }
  .farol-list-panel .mapping-detail-entry, .farol-list-panel .mapping-detail-entry * { white-space: normal; overflow: visible; text-overflow: clip; }
  .farol-list-panel .mapping-action { min-height: 36px; }
  .farol-list-panel .period-comparison { display: inline; margin: 0 0 0 6px; }
  body[data-papel="leitor"] .farol-list-panel tbody tr,
  body[data-papel="leitor"] .farol-zero-panel tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "prod prod" "sit val" "dif dif" "notas notas";
  }

  .reconciliation-test-table-wrap { max-height: none; overflow: visible; border: 0; border-radius: 0; }
  .reconciliation-test-table, .reconciliation-test-table tbody { display: block; min-width: 0; }
  .reconciliation-test-table thead { display: block; }
  .reconciliation-test-table thead tr { display: flex; }
  .reconciliation-test-table thead th { display: none; }
  .reconciliation-test-table thead th:first-child {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ecf2;
    border-radius: 8px;
    text-align: left;
  }
  .reconciliation-test-table thead th:first-child::after { content: "Marcar ou desmarcar todos da lista"; font-weight: 600; }
  .reconciliation-test-table tbody tr {
    display: grid;
    grid-template-columns: 26px repeat(3, minmax(0, 1fr));
    grid-template-areas: "sel cod cod cod" "sel desc desc desc" "sel un cx pal";
    gap: 6px 8px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #e8ecf2;
    border-radius: 8px;
    background: #fff;
  }
  .reconciliation-test-table tbody td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  .reconciliation-test-table td.reconciliation-select-cell { grid-area: sel; width: auto; align-self: start; }
  .reconciliation-test-table .reconciliation-product-code-cell { grid-area: cod; min-width: 0; font-size: 13px; font-weight: 700; }
  .reconciliation-test-table .reconciliation-product-description-cell { grid-area: desc; min-width: 0; font-size: 11px; }
  .reconciliation-test-table td.numeric { white-space: normal; text-align: left; font-size: 11px; }
  .reconciliation-test-table td.numeric:nth-last-child(3) { grid-area: un; }
  .reconciliation-test-table td.numeric:nth-last-child(2) { grid-area: cx; }
  .reconciliation-test-table td.numeric:nth-last-child(1) { grid-area: pal; }
  .reconciliation-test-table td.numeric::before { display: block; margin-bottom: 2px; color: #8994a5; font-size: 9px; font-weight: 600; }
  .reconciliation-test-table td.numeric:nth-last-child(3)::before { content: "Diferença (UN)"; }
  .reconciliation-test-table td.numeric:nth-last-child(2)::before { content: "Caixas"; }
  .reconciliation-test-table td.numeric:nth-last-child(1)::before { content: "Pallets"; }
  .reconciliation-test-table .reconciliation-filter-empty { grid-column: 1 / -1; }
  .reconciliation-test-table tbody tr:has(.reconciliation-filter-empty) { display: block; }
  .reconciliation-product-checkbox, #reconciliationSelectVisible { width: 20px; height: 20px; }
  .selection-column input { width: 18px; height: 18px; }
}

/* Visão do visitante na Conciliação Diária */
.reconciliation-visitor-panel h2 { margin: 4px 0; }
.reconciliation-visitor-panel .muted-copy { margin: 0 0 12px; }
.reconciliation-visitor-table { min-width: 640px; }
.reconciliation-visitor-table tbody tr { cursor: default; }
.reconciliation-visitor-table .reconciliation-visitor-reason { color: #8d5b12; font-weight: 600; text-align: left; line-height: 1.4; }

/* Janela de usuários (administrador) */
.nuvem-usuarios {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
}
.nuvem-usuarios::backdrop { background: rgba(16, 27, 45, .55); }
.nuvem-usuarios-conteudo { display: grid; gap: 14px; padding: 20px; }
.nuvem-usuarios-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nuvem-usuarios-topo h2 { margin: 2px 0 0; font-size: 20px; }
.nuvem-usuarios-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfd;
}
.nuvem-usuarios-form h3 { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.nuvem-usuarios label { display: grid; gap: 5px; color: #536178; font-size: 11px; font-weight: 600; }
.nuvem-usuarios input, .nuvem-usuarios select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe5ee;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.nuvem-usuarios-legenda { grid-column: 1 / -1; margin: 0; padding-left: 18px; color: #78849a; font-size: 11px; line-height: 1.6; }
.nuvem-usuarios-form .button { grid-column: 1 / -1; justify-content: center; }
.nuvem-usuarios-status { margin: 0; color: var(--mint); font-size: 12px; font-weight: 600; }
.nuvem-usuarios-status.is-error { color: var(--red); }
.nuvem-usuarios-status:empty { display: none; }
.nuvem-usuarios-lista { display: grid; gap: 8px; }
.nuvem-usuarios-vazio { margin: 0; color: #78849a; font-size: 12px; }
.nuvem-usuario {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.nuvem-usuario-dados p { margin: 6px 0 2px; font-size: 12px; overflow-wrap: anywhere; }
.nuvem-usuario-dados small { color: #8792a4; font-size: 10px; }
.nuvem-usuario-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.nuvem-usuario-acoes .button { min-height: 36px; padding: 0 10px; font-size: 11px; }
.nuvem-excluir { color: var(--red); }
.nuvem-usuarios-botao { margin-left: 8px; }

@media (max-width: 560px) {
  .nuvem-usuarios-form { grid-template-columns: 1fr; }
  .nuvem-usuario { grid-template-columns: 1fr; align-items: stretch; }
  .nuvem-usuario-acoes .button { flex: 1; }
  .reconciliation-visitor-table { min-width: 0; }
  .reconciliation-visitor-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "cod un" "desc desc" "motivo motivo";
  }
  .reconciliation-visitor-table td.numeric:nth-last-child(2) { grid-area: un; text-align: right; font-size: 13px; }
  .reconciliation-visitor-table td.numeric:nth-last-child(2)::before { content: none; }
  .reconciliation-visitor-table .reconciliation-visitor-reason { grid-area: motivo; }
  .reconciliation-visitor-table thead { display: none; }
}

/* Farol: produto centralizado e justificativas em coluna própria, como cartões */
.farol-list-panel th.col-produto, .farol-zero-panel th.col-produto { width: 23%; text-align: center; }
.farol-list-panel th.col-justificativas, .farol-zero-panel th.col-justificativas { width: 37%; text-align: center; }
.farol-list-panel th.col-situacao, .farol-zero-panel th.col-situacao { width: 9%; }
.farol-list-panel th.col-diferenca, .farol-zero-panel th.col-diferenca { width: 17%; }
.farol-list-panel th.col-valor, .farol-zero-panel th.col-valor { width: 14%; }
.farol-list-panel .product-name, .farol-zero-panel .product-name { min-width: 0; text-align: center; }
.farol-list-panel .product-name strong, .farol-zero-panel .product-name strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  font-size: 13px;
}
.farol-list-panel .product-name strong small, .farol-zero-panel .product-name strong small { margin: 0; }
.farol-list-panel .product-name > span, .farol-zero-panel .product-name > span {
  max-width: none;
  margin: 5px auto 0;
  color: #5f6d83;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}
.product-notes { text-align: center; }
.product-notes-empty { color: #b3bcc8; }
.farol-list-panel .product-justification, .farol-zero-panel .product-justification {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
}
.farol-list-panel .product-justification .mapping-detail-entry,
.farol-zero-panel .product-justification .mapping-detail-entry {
  position: relative;
  flex: 0 1 172px;
  min-width: 140px;
  display: block;
  padding: 7px 20px 7px 9px;
  border: 1px solid #e3eaf5;
  border-radius: 8px;
  background: #f7f9fd;
  text-align: center;
}
.farol-list-panel .product-justification .mapping-detail-entry + .mapping-detail-entry { border-top: 1px solid #e3eaf5; }
.farol-list-panel .product-justification .mapping-detail-entry > span { display: block; color: #5b6880; font-size: 10px; line-height: 1.4; }
.farol-list-panel .product-justification .mapping-detail-entry strong { display: block; color: #34425a; font-size: 13px; }
.farol-list-panel .product-justification .mapping-detail-entry small { display: block; margin-top: 3px; color: #8a96a8; font-size: 9px; white-space: normal; }
.farol-list-panel .product-justification .mapping-detail-entry.is-memory { border-color: #d6e4fb; background: #f1f6ff; }
.farol-list-panel .product-justification .mapping-detail-entry.is-memory strong { color: #2566ca; }
.farol-list-panel .product-justification .mapping-detail-entry.pending-difference-reason { flex-basis: 100%; border-color: #f1dfb8; background: #fffaf0; }
.farol-list-panel .product-justification .mapping-detail-entry.pending-difference-reason strong { color: #8d5b12; font-size: 12px; }
.farol-list-panel .product-justification .mapping-detail-entry button { position: absolute; top: 3px; right: 3px; }
.farol-list-panel .product-actions, .farol-zero-panel .product-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; }
.farol-list-panel .mapping-reason-pending { margin: 0; text-align: center; }
.farol-list-panel .mapping-suggestion { max-width: 320px; margin: 0 auto; text-align: center; }
.farol-list-panel .mapping-action-secondary { margin-top: 0; }
.farol-list-panel .mapping-off { display: block; text-align: center; }
.farol-list-panel tbody td, .farol-zero-panel tbody td { vertical-align: middle; }
.farol-list-panel .product-justification .mapping-entry-reason { display: block; margin-top: 2px; color: #5b6880; font-size: 10px; line-height: 1.4; }
@media (max-width: 560px) {
  .farol-list-panel .product-justification .mapping-detail-entry { flex: 1 1 120px; min-width: 0; }
  .farol-list-panel .product-justification .mapping-detail-entry.pending-difference-reason { flex-basis: 100%; }
}

/* Farol: resumo das justificativas na linha e detalhe em janela */
.justification-summary {
  width: 100%;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0 auto;
  padding: 9px 12px;
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  background: #f7f9fd;
  color: #34425a;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.justification-summary:hover, .justification-summary:focus-visible { border-color: #b7cdf4; background: #eef4ff; box-shadow: 0 2px 8px rgba(37, 102, 202, .12); outline: none; }
.justification-summary strong { font-size: 12px; font-weight: 700; }
.justification-summary small { color: #6b788d; font-size: 10px; line-height: 1.35; }
.justification-summary.has-reason { border-color: #f1dfb8; background: #fffaf0; }
.justification-summary.has-reason small { color: #8d5b12; font-weight: 650; }
.justification-summary.has-reason:hover { border-color: #e6c88a; background: #fff4e0; }
.justification-summary.is-empty strong { color: #6b788d; }
.justification-summary-link { margin-top: 2px; color: #2566ca; font-size: 10px; font-weight: 650; }
.justification-dialog { width: min(640px, calc(100vw - 28px)); }
.justification-dialog .dialog-heading h2 { font-size: 16px; line-height: 1.35; }
.justification-dialog-body { overflow: auto; text-align: center; }
.justification-dialog-empty { margin: 8px 0; color: #8792a4; font-size: 12px; }
.justification-dialog-body .product-justification {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.justification-dialog-body .mapping-detail-entry {
  position: relative;
  display: block;
  padding: 10px 26px 10px 12px;
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  background: #f7f9fd;
  text-align: center;
}
.justification-dialog-body .mapping-detail-entry + .mapping-detail-entry { border-top: 1px solid #e3eaf5; }
.justification-dialog-body .mapping-detail-entry > span { display: block; }
.justification-dialog-body .mapping-detail-entry strong { display: block; color: #34425a; font-size: 15px; }
.justification-dialog-body .mapping-entry-reason { display: block; margin-top: 3px; color: #536178; font-size: 11px; line-height: 1.4; }
.justification-dialog-body .mapping-detail-entry small { display: block; margin-top: 4px; color: #8a96a8; font-size: 10px; white-space: normal; }
.justification-dialog-body .mapping-detail-entry.is-memory { border-color: #d6e4fb; background: #f1f6ff; }
.justification-dialog-body .mapping-detail-entry.is-memory strong { color: #2566ca; }
.justification-dialog-body .mapping-detail-entry.pending-difference-reason { grid-column: 1 / -1; border-color: #f1dfb8; background: #fffaf0; }
.justification-dialog-body .mapping-detail-entry.pending-difference-reason strong { color: #8d5b12; font-size: 14px; }
.justification-dialog-body .mapping-detail-entry button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 6px; font-size: 15px; }
.justification-dialog-body .mapping-detail-entry button:hover { background: #fdecec; }
.justification-dialog-body .mapping-off { display: block; color: #6b788d; font-size: 12px; }
.justification-dialog-body .product-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.justification-dialog-body .mapping-suggestion { max-width: 360px; margin: 0 auto; padding: 10px 12px; border: 1px dashed #c9d8f2; border-radius: 10px; font-size: 11px; text-align: center; }
.justification-dialog-body .mapping-suggestion strong { font-size: 12px; }
.justification-dialog-body .mapping-suggestion small { font-size: 10px; }
.justification-dialog-body .mapping-reason-pending { margin: 0; color: #8d5b12; font-size: 11px; }
.justification-dialog-body .mapping-action { min-height: 36px; padding: 0 14px; font-size: 11px; }
.justification-dialog-body .mapping-action-secondary { margin-top: 0; }
@media (max-width: 560px) {
  .justification-summary { max-width: none; }
  .justification-dialog-body .product-justification { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Diferenças acumuladas: calendário do inventário, encobertas e reposição OP 39 pendente */
.accumulated-period-controls input[type="date"] {
  min-width: 150px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  background: #fff;
  color: #34425a;
  font: inherit;
  font-size: 12px;
}
.accumulated-period-controls { flex-wrap: wrap; }
.covered-panel { margin-top: 12px; }
.covered-panel h4 { color: #8d5b12; }
.covered-explanation { margin: 0; padding: 8px 12px 0; color: #78849a; font-size: 10px; line-height: 1.5; text-align: center; }
.covered-panel tbody td { text-align: center; }
.pending39-signal {
  display: block;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid #f1dfb8;
  border-radius: 7px;
  background: #fffaf0;
  color: #8d5b12;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
}
.pending39-signal.is-negative { border-color: #f3c7c3; background: #fdf1f0; color: var(--red); }
.pending39-signal strong { color: var(--red); }
.pending39-import {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #e3eaf5;
  border-radius: 10px;
  background: #f7f9fd;
}
.pending39-import > div { display: grid; gap: 3px; min-width: 0; flex: 1 1 260px; }
.pending39-import strong { color: #34425a; font-size: 12px; }
.pending39-import small { color: #6b788d; font-size: 10px; line-height: 1.45; }
@media (max-width: 560px) {
  .accumulated-period-controls input[type="date"] { width: 100%; min-width: 0; }
  .pending39-import .button { width: 100%; }
  .covered-panel table, .covered-panel tbody { display: block; }
  .covered-panel thead { display: none; }
  .covered-panel tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; padding: 12px; border-bottom: 1px solid #f0f2f6; }
  .covered-panel tbody td { display: block; padding: 0; border: 0; }
  .covered-panel tbody td.product-name { grid-column: 1 / -1; }
}

/* Gráfico das diferenças acumuladas com o terceiro cartão (Sobras Acumuladas) */
.daily-review-sticks.has-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.daily-review-sticks.has-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.daily-review-stick.covered-real strong, .daily-review-stick.covered-real .daily-stick-value { color: #8d5b12; }
.daily-review-stick.covered-real .daily-stick-plot span { background: #d9a441; }
@media (max-width: 720px) { .daily-review-sticks.has-four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.daily-review-stick.accumulated-real > strong { color: #2566ca; }
.daily-review-stick.accumulated-real .daily-stick-plot > span { background: linear-gradient(180deg, #8db7f5, #2566ca); }

/* Sobras Acumuladas (lista) e pendências do Projeto 39 */
.accumulated-surplus-panel { margin-top: 12px; }
.accumulated-surplus-panel h4 { color: #2566ca; }
.accumulated-surplus-panel tbody td { text-align: center; }
.pending39-dialog { width: min(980px, calc(100vw - 24px)); }
.pending39-dialog-actions { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.pending39-table { min-width: 760px; table-layout: auto; }
.pending39-table th, .pending39-table td { text-align: center; }
.pending39-table td:nth-child(2) { min-width: 220px; }
@media (max-width: 560px) {
  .accumulated-surplus-panel table, .accumulated-surplus-panel tbody { display: block; }
  .accumulated-surplus-panel thead { display: none; }
  .accumulated-surplus-panel tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; padding: 12px; border-bottom: 1px solid #f0f2f6; }
  .accumulated-surplus-panel tbody td { display: block; padding: 0; border: 0; }
  .accumulated-surplus-panel tbody td.product-name { grid-column: 1 / -1; }
  .pending39-dialog-actions .button { width: 100%; }
}

/* Exportação de gráficos para reunião */
.chart-export-bar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.group-toolbar-actions { display: flex; align-items: flex-end; gap: 10px; }
.chart-export-button { min-height: 34px; padding: 0 14px; gap: 7px; white-space: nowrap; cursor: pointer; }
.chart-export-button:disabled { cursor: not-allowed; opacity: .5; }
.chart-export-dialog { width: min(1180px, calc(100vw - 24px)); }
.chart-export-preview { min-height: 0; flex: 1; overflow: auto; padding: 12px; border: 1px solid #e6eaf0; border-radius: 10px; background: #eef1f6; }
.chart-export-preview img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 20px rgba(16, 27, 45, .12); }
.chart-export-message { min-height: 16px; margin: 10px 0 4px; color: var(--mint); font-size: 11px; font-weight: 600; }
.chart-export-message.is-error { color: var(--red); }
.chart-export-dialog .dialog-actions .button { cursor: pointer; }
@media (max-width: 560px) {
  .group-toolbar-actions { align-items: stretch; flex-direction: column; }
  .chart-export-bar .chart-export-button { width: 100%; }
  .chart-export-dialog .dialog-actions .button { flex: 1; }
}
.chart-export-options { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 10px; margin: 0 0 12px; }
.chart-export-options .compact-field { display: flex; flex-direction: column; gap: 4px; }
.chart-export-options .compact-field[hidden] { display: none; }
.chart-export-options select { min-width: 200px; height: 34px; }
@media (max-width: 560px) {
  .chart-export-options { align-items: stretch; flex-direction: column; }
  .chart-export-options select { width: 100%; min-width: 0; }
}

/* ---------- Projeto 39 (Análises Controle) ---------- */
.project39-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project39-card { cursor: default; }
.project39-card:hover { transform: none; border-color: #e8ebf3; box-shadow: 0 3px 10px rgba(49, 61, 84, .035); }
.project39-card > small { color: #5b6880; font-weight: 600; }
.project39-filters { flex-wrap: wrap; }
.project39-search-field input { min-width: 200px; }
.project39-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.project39-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 12px; }
.project39-table th { position: sticky; top: 0; padding: 10px 12px; background: #f6f8fb; color: #5b6880; font-size: 10px; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--line); }
.project39-table thead th, .project39-table tbody td { text-align: left; }
.project39-table td { padding: 9px 12px; border-bottom: 1px solid #eef1f5; color: #34425a; vertical-align: top; }
.project39-table tbody tr:hover { background: #fafbfd; }
.project39-table thead th.numeric, .project39-table tbody td.numeric { text-align: right; white-space: nowrap; }
.project39-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.project39-table td strong { font-weight: 750; }
.project39-muted { color: var(--muted); }
.project39-pill, .project39-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.project39-pill.is-yes { background: #e3f5f2; color: #0f7c74; }
.project39-pill.is-no { background: #f1f3f7; color: #66728a; }
.project39-status.is-pending { background: #fff1e0; color: #b25d00; }
.project39-status.is-done { background: #e6f0ff; color: #1f5fc4; }
.project39-status.is-cancelled { background: #fde8e6; color: #b3352a; }
.project39-status.is-unchecked { background: #f1f3f7; color: #66728a; }
.project39-tabs { margin-bottom: 16px; }
.chart-export-pager { align-items: flex-end; }
.chart-export-page-label { min-width: 120px; padding-bottom: 9px; color: #34425a; font-size: 13px; text-align: center; }
.chart-export-pager .button:disabled { opacity: .45; cursor: not-allowed; }
.project39-export { align-self: flex-end; white-space: nowrap; }
.project39-export:disabled { opacity: .5; cursor: not-allowed; }
.project39-incidence-table { min-width: 760px; }
.project39-incidence-row { cursor: pointer; }
.project39-incidence-row:hover td, .project39-incidence-row:focus-visible td { background: #f4f1ff; }
.project39-incidence-row:focus-visible { outline: 2px solid rgba(120,98,199,.4); outline-offset: -2px; }
#project39ProductDialog .project39-table { min-width: 720px; }
.project39-chart { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(135deg, #fff 0%, #fbfaff 100%); }
.project39-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.project39-chart-head strong { color: #34425a; font-size: 13px; }
.project39-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #5b6880; font-size: 10px; }
.project39-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.project39-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.project39-swatch.done, .project39-seg.done { background: #2874f0; }
.project39-swatch.pending, .project39-seg.pending { background: #f29b38; }
.project39-swatch.unchecked, .project39-seg.unchecked { background: #a9b3c2; }
.project39-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.project39-bar-row { width: 100%; display: grid; grid-template-columns: 26px minmax(150px, 1.1fr) minmax(160px, 2fr) 96px minmax(110px, .9fr); align-items: center; gap: 12px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.project39-bar-row:hover, .project39-bar-row:focus-visible { border-color: #d9d0f7; background: #f6f3ff; outline: none; }
.project39-bar-rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eef1f6; color: #34425a; font-size: 11px; font-weight: 800; }
.project39-bar-row li:first-child .project39-bar-rank, .project39-ranking li:nth-child(-n+3) .project39-bar-rank { background: #34425a; color: #fff; }
.project39-bar-product { min-width: 0; display: flex; flex-direction: column; }
.project39-bar-product strong { color: #34425a; font-size: 12px; }
.project39-bar-product small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project39-bar-track { display: flex; height: 22px; border-radius: 6px; background: #f1f3f7; overflow: hidden; }
.project39-seg { display: grid; place-items: center; min-width: 2px; color: #fff; font-size: 10px; font-weight: 800; }
.project39-bar-total { display: flex; flex-direction: column; text-align: right; }
.project39-bar-total strong { color: #34425a; font-size: 12px; }
.project39-bar-total small, .project39-bar-value small { color: var(--muted); font-size: 10px; }
.project39-bar-value { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.project39-value-track { height: 5px; border-radius: 3px; background: #f1f3f7; overflow: hidden; }
.project39-value-track span { display: block; height: 100%; margin-left: auto; border-radius: 3px; background: #14969b; }
@media (max-width: 860px) {
  .project39-bar-row { grid-template-columns: 24px minmax(0, 1fr) 84px; }
  .project39-bar-track { grid-column: 2 / -1; grid-row: 2; }
  .project39-bar-value { grid-column: 2 / -1; grid-row: 3; text-align: left; }
  .project39-value-track span { margin-left: 0; }
}
.project39-more { margin-top: 10px; }
@media (max-width: 860px) { .project39-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .project39-search-field input { min-width: 0; width: 100%; } }
