
:root {
  --blomix-blue: #2e3b4e;
  --blomix-black: #232323;
  --blomix-gray: #4f4f4f;
  --blomix-bg: #ebebea;
  --blomix-orange: #f29220;
  --blomix-yellow: #f8b232;
  --erp-border: #d4d9df;
  --erp-text: #172534;
  --erp-muted: #58697a;
  --erp-card: #ffffff;
  --erp-sidebar-w: 290px;
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fa;
  color: #24313d;
  font-family: Arial, sans-serif;
}

.login-page {
  align-items: center;
  background:
    radial-gradient(circle at 56% 42%, rgba(242, 146, 32, 0.22), transparent 18%),
    linear-gradient(90deg, rgba(3, 15, 27, 0.96), rgba(4, 20, 35, 0.82)),
    linear-gradient(135deg, #071826, #102a40 44%, #06111d);
  color: #fff;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(540px, 1fr) minmax(480px, 620px);
  min-height: 100vh;
  overflow: hidden;
  padding: 56px 8vw;
  position: relative;
}

.login-page::before {
  background:
    linear-gradient(102deg, transparent 0 49%, rgba(242, 146, 32, 0.42) 49% 49.4%, transparent 49.4%),
    linear-gradient(0deg, transparent 0 62%, rgba(255, 255, 255, 0.08) 62% 62.4%, transparent 62.4%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 76px);
  content: "";
  inset: 0;
  opacity: 0.7;
  position: absolute;
}

.login-page::after {
  background:
    linear-gradient(130deg, transparent 0 48%, rgba(242, 146, 32, 0.9) 48% 49.2%, transparent 49.2%),
    radial-gradient(circle at 80% 25%, rgba(248, 178, 50, 0.55), transparent 4%),
    linear-gradient(180deg, rgba(35, 73, 105, 0.38), rgba(4, 15, 26, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  content: "";
  height: 390px;
  left: 38%;
  opacity: 0.34;
  position: absolute;
  top: 11%;
  transform: rotate(-2deg);
  width: 520px;
}

.login-copy,
.login-card,
.login-version {
  position: relative;
  z-index: 1;
}

.login-copy h1 {
  color: #fff;
  font-size: 58px;
  line-height: 1.06;
  margin: 0 0 24px;
  max-width: 820px;
}

.login-copy h1 span {
  color: var(--blomix-orange);
}

.login-copy > p {
  color: #e8eef5;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 46px;
  max-width: 680px;
}

.login-benefits {
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.login-benefits div {
  display: grid;
  gap: 6px;
  padding-left: 68px;
  position: relative;
}

.login-benefits div::before {
  align-items: center;
  background: rgba(4, 15, 26, 0.76);
  border: 1px solid rgba(242, 146, 32, 0.42);
  border-radius: 14px;
  color: var(--blomix-orange);
  content: "↗";
  display: flex;
  font-size: 25px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0;
  width: 52px;
}

.login-benefits strong {
  color: #fff;
  font-size: 18px;
}

.login-benefits span,
.login-copy footer {
  color: #eef2f5;
  font-size: 15px;
}

.login-copy footer {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 10px;
  margin-top: 120px;
}

.login-copy footer img {
  height: 28px;
  width: auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  color: var(--erp-text);
  display: grid;
  gap: 18px;
  justify-self: center;
  max-width: 650px;
  padding: 54px;
  width: 100%;
}

.login-card > img {
  justify-self: center;
  max-width: 390px;
  width: 76%;
}

.login-card h2 {
  color: var(--erp-text);
  font-size: 34px;
  margin: 26px 0 0;
  text-align: center;
}

.login-card > p {
  color: var(--erp-muted);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  text-align: center;
}

.login-card label {
  color: var(--erp-text);
  display: grid;
  font-size: 15px;
  font-weight: 900;
  gap: 9px;
}

.login-card input {
  border: 1px solid var(--erp-border);
  border-radius: 12px;
  font-size: 17px;
  min-height: 70px;
  padding: 0 18px;
}

.login-card .checkbox {
  align-items: center;
  display: flex;
  gap: 10px;
}

.login-card .checkbox input {
  min-height: auto;
}

.login-card button.primary {
  background: linear-gradient(90deg, #ff8a00, var(--blomix-orange));
  border-radius: 12px;
  font-size: 18px;
  min-height: 72px;
}

.login-card small {
  color: var(--erp-muted);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.login-version {
  bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  position: absolute;
  right: 22px;
}

.page {
  min-height: 100vh;
  padding: 24px;
}

.header {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: #28745a;
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  font-size: 28px;
  margin: 4px 0 0;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

h3 {
  font-size: 14px;
  margin: 0 0 10px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav button,
button {
  border: 1px solid #28745a;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
}

.nav button {
  background: #fff;
  color: #123c69;
}

.nav button.active,
button.primary {
  background: #28745a;
  color: #fff;
}

.panel,
.form,
.metric {
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(30, 42, 54, 0.05);
}

.panel,
.form {
  margin-bottom: 16px;
  padding: 16px;
}

.panel-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row h2 {
  margin-bottom: 4px;
}

.panel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.notification-off-banner {
  background: #fff7e8;
  border: 1px solid #f8b232;
  border-radius: 7px;
  color: #7a4b00;
  font-weight: 800;
  margin-top: 8px;
  padding: 8px 10px;
}

.compact-form {
  box-shadow: none;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 16px;
}

.metric {
  min-height: 84px;
  padding: 14px;
}

.metric span {
  color: #687887;
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}

.metric small {
  color: #667685;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

.analytics-dashboard {
  background: #232323;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 10px;
}

.clean-dashboard {
  gap: 14px;
  grid-template-columns: 1fr;
}

.dashboard-filterbar {
  background: #2f2f2f;
  border: 1px solid #3f3f3f;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 10px;
}

.dashboard-controls {
  display: grid;
  gap: 10px;
}

.period-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.period-strip button {
  background: #232323;
  border: 1px solid #4f4f4f;
  border-radius: 999px;
  color: #ebebea;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
}

.period-strip button.active {
  background: #f29220;
  border-color: #f29220;
  color: #232323;
}

.filter-grid.compact {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.filter-grid label {
  color: #f8b232;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.filter-grid select {
  background: #232323;
  border-color: #4f4f4f;
  color: #f8b232;
}

.analytics-sidebar {
  display: grid;
  gap: 10px;
  align-content: start;
}

.brand-block,
.analytics-card,
.analytics-sidebar label {
  background: #3b3b3b;
  border: 1px solid #232323;
  border-radius: 8px;
  color: #ffffff;
}

.brand-block {
  padding: 16px;
}

.brand-block strong {
  color: #ffffff;
  display: block;
  font-size: 34px;
  line-height: 1;
}

.brand-block span {
  color: #f8b232;
  display: block;
  font-size: 11px;
  margin-top: 4px;
  text-transform: uppercase;
}

.analytics-sidebar label {
  color: #f29220;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 10px;
}

.analytics-sidebar select {
  background: #2f2f2f;
  border-color: #4f4f4f;
  color: #f8b232;
}

.analytics-main {
  min-width: 0;
}

.analytics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.analytics-card {
  min-height: 120px;
  padding: 12px;
}

.analytics-card h2 {
  color: #f29220;
  font-size: 15px;
  margin: 0 0 10px;
}

.analytics-card.wide {
  grid-column: span 2;
}

.chart-card {
  grid-column: span 6;
  min-height: 260px;
}

.compact-chart {
  min-height: 260px;
}

.full-row {
  grid-column: 1 / -1;
}

.kpi-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
}

.dashboard-kpi {
  background: #3b3b3b;
  border: 1px solid #4f4f4f;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
}

.dashboard-kpi span {
  color: #f8b232;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-kpi strong {
  color: #f29220;
  font-size: 28px;
  line-height: 1.1;
}

.dashboard-kpi small {
  color: #ebebea;
  font-size: 12px;
}

.donut-layout {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.donut-chart {
  height: 190px;
  transform: rotate(-90deg);
  width: 190px;
}

.chart-legend {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chart-legend li {
  display: block;
}

.legend-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  display: grid;
  font-size: 12px;
  gap: 7px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  min-height: 28px;
  padding: 4px;
  text-align: left;
  width: 100%;
}

.legend-button.active,
.legend-button:hover {
  background: #2f2f2f;
  border-color: #f29220;
}

.legend-button span {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.legend-button em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-button strong {
  color: #ebebea;
  font-weight: 800;
}

.kpi-card {
  align-content: center;
  display: grid;
  justify-items: center;
  min-height: 90px;
}

.kpi-card span {
  color: #f8b232;
  font-size: 13px;
  font-weight: 800;
}

.kpi-card strong {
  color: #f8b232;
  font-size: 34px;
  line-height: 1.15;
}

.kpi-card.accent strong {
  color: #f29220;
  font-size: 58px;
}

.table-card {
  grid-column: span 2;
  min-height: 220px;
}

.mini-table {
  border: 1px solid #4f4f4f;
  border-radius: 6px;
  max-height: 190px;
  overflow: auto;
}

.mini-table div,
.mini-table button {
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: 95px minmax(0, 1fr) 80px;
  min-height: 0;
  padding: 7px 8px;
  text-align: left;
  width: 100%;
}

.mini-table div:first-child {
  background: #232323;
  color: #f8b232;
}

.mini-table span,
.mini-table button span {
  color: #f29220;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-table button:hover {
  background: #2f2f2f;
}

.bar-card {
  min-height: 300px;
}

.bar-chart {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  min-height: 220px;
}

.bar-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 0;
  padding: 6px 4px;
}

.bar-item.active,
.bar-item:hover {
  background: #2f2f2f;
  border-color: #f29220;
}

.bar-item strong {
  color: #ffffff;
  font-size: 12px;
}

.bar-item span {
  background: linear-gradient(180deg, #f8b232, #f29220);
  border-radius: 4px 4px 0 0;
  width: 100%;
}

.bar-item small {
  color: #ebebea;
  font-size: 11px;
}

.toolbar,
.form-grid,
.filter-panel {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin-bottom: 12px;
}

input,
select,
textarea {
  border: 1px solid #c5d0da;
  border-radius: 6px;
  color: #24313d;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.form-grid label,
.full-label,
.field-label {
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.lookup-row {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.lookup-row button {
  min-width: 74px;
}

.attachment-field {
  display: grid;
  gap: 7px;
}

.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-button {
  align-items: center;
  border: 1px solid #c5d0da;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
}

.file-button input {
  display: none;
}

.attachment-preview {
  font-size: 12px;
  min-height: 18px;
}

.validation-ok,
.validation-error {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  margin-right: 6px;
  padding: 3px 8px;
}

.validation-ok {
  background: #e6f4ec;
  color: #1f6b4f;
}

.validation-error {
  background: #fdecea;
  color: #9a2f25;
}

.modal-backdrop {
  align-items: center;
  background: rgba(35, 35, 35, 0.38);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 50;
}

.quick-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(35, 35, 35, 0.22);
  max-height: calc(100vh - 48px);
  max-width: min(980px, calc(100vw - 48px));
  overflow: auto;
  width: min(980px, calc(100vw - 48px));
}

.quick-modal-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.quick-modal-card label {
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.segmentos-field {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.checkbox-grid .checkbox,
.form-grid .checkbox-grid label.checkbox {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.checkbox-grid .checkbox input {
  flex: 0 0 auto;
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  color: #123c69;
  display: inline;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.th-sort {
  background: transparent;
  border: 0;
  color: #50677d;
  font-size: 12px;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.sort-toolbar {
  align-items: center;
  color: #667685;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
  margin: 0 0 10px;
}

.hidden-field {
  display: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.secondary {
  background: #fff;
  border-color: #c5d0da;
  color: #24313d;
}

.filter-panel {
  align-items: end;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.period-filter-panel {
  margin-bottom: 6px;
}

.inline-filter {
  align-items: center;
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
  grid-template-columns: auto 90px;
}

.inline-filter input {
  min-height: 36px;
}

.filter-panel input:first-child {
  grid-column: span 2;
}

.table-summary {
  color: #667685;
  font-size: 13px;
  font-weight: 700;
  margin: 2px 0 12px;
}

.selected-row {
  background: #eef6ff;
}

.details-row td {
  background: #f8fbfd;
  padding: 0 8px 14px;
}

.history-panel {
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  padding: 14px;
}

.history-title {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-title strong,
.history-title span {
  display: block;
}

.history-title span {
  color: #667685;
  font-size: 13px;
}

.history-title .history-title-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.history-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-workspace {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
}

.history-stack {
  display: grid;
  gap: 10px;
}

.operation-grid {
  border-top: 1px solid #e3e9ef;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  padding-top: 14px;
}

.operation-sidebar {
  align-self: start;
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.operation-buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.operation-card {
  background: #f8fbfd;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.operation-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operation-fields label,
.operation-card > label {
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.operation-card textarea {
  min-height: 78px;
}

.checkbox {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox input {
  min-height: auto;
  width: auto;
}

.action-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  white-space: nowrap;
}

.action-ok {
  background: #e6f4ec;
  color: #1f6b4f;
}

.action-due {
  background: #fdecea;
  color: #9a2f25;
}

.notification-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  align-items: center;
  background: #fff;
  border: 1px solid #e3e9ef;
  border-left: 5px solid #28745a;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.notification-card.is-high {
  border-left-color: #9a2f25;
}

.notification-card.is-upcoming {
  border-left-color: #28745a;
}

.notification-card.is-overdue {
  border-left-color: #b42318;
  background: #fff8f7;
}

.notification-card strong,
.notification-card span {
  display: block;
}

.notification-card span {
  color: #667685;
  font-size: 13px;
  margin-top: 4px;
}

.calendar-panel {
  background: #f8fbfd;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  padding: 12px;
}

.calendar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-day {
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  min-height: 72px;
  padding: 10px;
}

.calendar-day strong,
.calendar-day span {
  display: block;
}

.calendar-day span {
  color: #667685;
  font-size: 12px;
  margin-top: 6px;
}

.notification-calendar-full {
  background: #f8fbfd;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.notification-subtitle {
  border-top: 1px solid #e3e9ef;
  margin-top: 14px;
  padding-top: 14px;
}

.toggle-section-button {
  align-items: center;
  display: inline-flex;
  font-size: 14px;
  justify-content: center;
  min-width: 40px;
}

.hidden-section {
  display: none !important;
}

.calendar-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-toolbar strong {
  color: #123c69;
  font-size: 16px;
  text-transform: capitalize;
}

.month-calendar {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday {
  color: #667685;
  font-size: 12px;
  font-weight: 800;
  padding: 4px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-cell {
  background: #fff;
  border: 1px solid #e3e9ef;
  border-radius: 7px;
  color: #24313d;
  display: grid;
  justify-items: start;
  min-height: 74px;
  padding: 9px;
  text-align: left;
}

.calendar-cell strong,
.calendar-cell span {
  display: block;
}

.calendar-cell span {
  color: #667685;
  font-size: 12px;
}

.calendar-cell.empty {
  background: transparent;
  border: 0;
  pointer-events: none;
}

.calendar-cell.has-actions {
  border-color: #28745a;
  box-shadow: inset 0 0 0 1px rgba(40, 116, 90, 0.18);
}

.calendar-cell.has-actions span {
  color: #28745a;
  font-weight: 800;
}

.calendar-cell.has-actions.is-upcoming {
  border-color: #28745a;
  box-shadow: inset 0 0 0 1px rgba(40, 116, 90, 0.24);
}

.calendar-cell.has-actions.is-overdue {
  border-color: #b42318;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.22);
}

.calendar-cell.has-actions.is-overdue span {
  color: #b42318;
}

.calendar-cell.selected {
  background: #28745a;
  color: #fff;
}

.calendar-cell.selected span {
  color: #fff;
}

.calendar-cell.selected.is-overdue {
  background: #b42318;
  border-color: #b42318;
}

.calendar-cell.selected.is-upcoming {
  background: #28745a;
  border-color: #28745a;
}

.notification-list-below {
  margin-top: 10px;
}

.column-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  margin-bottom: 12px;
}

.column-filters label {
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.contact-list {
  display: grid;
  gap: 7px;
}

.contact-mini {
  display: grid;
  gap: 5px;
}

.contact-details {
  background: #f8fbfd;
  border: 1px solid #e3e9ef;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  max-width: 320px;
  padding: 8px;
}

.contact-details span {
  color: #667685;
  font-size: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.form-subsection {
  border-top: 1px solid #e3e9ef;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
}

.subsection-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.subsection-title strong,
.subsection-title span {
  display: block;
}

.subsection-title span {
  color: #667685;
  font-size: 12px;
  margin-top: 2px;
}

.existing-contacts,
.contact-form-list {
  display: grid;
  gap: 8px;
}

.existing-contacts > div,
.cliente-contato-row {
  background: #f8fbfd;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  padding: 10px;
}

.existing-contacts > div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 0.8fr) minmax(200px, 1fr) auto;
}

.existing-contacts span {
  color: #667685;
  font-size: 12px;
}

.cliente-contato-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.cliente-contato-row label {
  color: #667685;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.history-card {
  background: #ffffff;
  border: 1px solid #e3e9ef;
  border-radius: 8px;
  padding: 12px;
}

.history-card h3 {
  font-size: 14px;
  margin: 0 0 10px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  border-bottom: 1px solid #edf1f5;
  padding-bottom: 8px;
}

.movement-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(210px, 1.1fr) minmax(240px, 1.2fr) auto;
  min-height: 0;
  padding: 9px 0;
  text-align: left;
  width: 100%;
}

.movement-item:last-child {
  border-bottom: 0;
}

.movement-item:hover {
  background: #f8fbfd;
}

.movement-main,
.movement-item strong,
.movement-item span {
  display: block;
}

.movement-main strong {
  line-height: 1.25;
}

.movement-item span {
  color: #667685;
  font-size: 12px;
  margin-top: 2px;
}

.movement-item p {
  color: #24313d;
  font-weight: 400;
  margin: 0;
}

.movement-item small:empty {
  display: none;
}

.movement-item small {
  color: #28745a;
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin: 0;
}

.movement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 0;
}

.movement-actions button {
  min-height: 30px;
  padding: 5px 8px;
}

.history-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span {
  color: #667685;
  font-size: 12px;
  margin-top: 2px;
}

.history-item p {
  margin: 6px 0 0;
}

.danger {
  background: #fff5f4;
  border-color: #e2aaa5;
  color: #9a2f25;
}

.table-wrap {
  overflow-x: auto;
}

.meta-spreadsheet-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.meta-spreadsheet {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1500px;
  width: 100%;
}

.meta-spreadsheet th,
.meta-spreadsheet td {
  border-bottom: 1px solid #e3e9ef;
  border-right: 1px solid #e3e9ef;
  min-width: 110px;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.meta-spreadsheet th:first-child {
  background: #f8fbfd;
  color: #123c69;
  left: 0;
  min-width: 210px;
  position: sticky;
  text-align: left;
  z-index: 2;
}

.meta-spreadsheet thead th {
  background: #eef6ff;
  color: #456987;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-spreadsheet thead th:first-child {
  z-index: 3;
}

.money-input {
  text-align: right;
}

.meta-cell-input {
  font-size: 13px;
  min-height: 34px;
  padding: 6px 7px;
  text-align: right;
}

.real-row th,
.real-row td {
  background: #fbfcfe;
  color: #24313d;
  font-weight: 700;
}

.percent-row th,
.percent-row td {
  background: #fffdf4;
}

.meta-percent {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.meta-percent.is-good {
  background: #e6f4ec;
  color: #1f6b4f;
}

.meta-percent.is-low {
  background: #fff5d6;
  color: #7a5400;
}

table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e3e9ef;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #667685;
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.ok {
  background: #e6f4ec;
  color: #1f6b4f;
}

.warn {
  background: #fff5d6;
  color: #7a5400;
}

.muted {
  color: #667685;
}

.error {
  background: #fdecea;
  border-radius: 6px;
  color: #9a2f25;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.preview {
  font-family: Consolas, Monaco, monospace;
  min-height: 430px;
  white-space: pre;
}

@media (max-width: 900px) {
  .header {
    align-items: flex-start;
    display: grid;
  }

  .metrics,
  .analytics-dashboard,
  .dashboard-filterbar,
  .filter-grid.compact,
  .kpi-row,
  .analytics-grid,
  .analytics-card.wide,
  .chart-card,
  .table-card,
  .donut-layout,
  .toolbar,
  .form-grid,
  .filter-panel,
  .history-grid,
  .detail-workspace,
  .operation-grid,
  .operation-fields,
  .checkbox-grid,
  .notification-layout,
  .calendar-grid,
  .column-filters,
  .cliente-contato-row,
  .existing-contacts > div {
    grid-template-columns: 1fr;
  }

  .month-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-card.wide,
  .chart-card,
  .table-card,
  .full-row {
    grid-column: auto;
  }

  .panel-title-row {
    align-items: flex-start;
    display: grid;
  }
}


.compact-button {
  min-height: 32px;
  padding: 6px 10px;
}

.compact-detail-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.history-card-title {
  align-items: center;
  background: transparent;
  border: 0;
  display: flex;
  justify-content: space-between;
  min-height: auto;
  padding: 0;
  text-align: left;
  width: 100%;
}

.history-card-title h3 {
  margin: 0 0 10px;
}

.history-card-title span {
  color: #28745a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
}

.history-card.is-collapsible .history-card-title:hover h3 {
  color: #28745a;
}

.modal-operation-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.quick-modal-card .operation-card {
  border: 0;
  box-shadow: none;
  margin: 12px 0 0;
  padding: 0;
}

.audit-log-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 60vh;
  overflow: auto;
}

.audit-log-item {
  border-bottom: 1px solid #edf1f5;
  padding: 8px 0;
}

.audit-log-item strong,
.audit-log-item span {
  display: block;
}

.audit-log-item span {
  color: #667685;
  font-size: 12px;
  margin-top: 3px;
}

.audit-log-item p {
  margin: 5px 0 0;
}

.audit-change-list {
  display: grid;
  gap: 5px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.audit-change-list li {
  background: #f8fbfd;
  border: 1px solid #e3e9ef;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 7px 9px;
}

.audit-change-list span {
  color: #667685;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-change-list strong {
  color: #123c69;
  font-size: 13px;
}


/* ERP Blomix visual shell */
body {
  background: var(--blomix-bg);
  color: var(--erp-text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.erp-shell {
  min-height: 100vh;
}

.erp-sidebar {
  background: linear-gradient(180deg, var(--blomix-blue), #253244);
  border-right: 1px solid rgba(35, 35, 35, 0.18);
  bottom: 0;
  box-shadow: 8px 0 22px rgba(35, 35, 35, 0.12);
  left: 0;
  padding: 18px 15px;
  position: fixed;
  top: 0;
  width: var(--erp-sidebar-w);
  z-index: 20;
}

.erp-brand {
  border-bottom: 1px solid rgba(235, 235, 234, 0.18);
  margin-bottom: 16px;
  padding: 8px 0 18px;
}

.erp-brand img {
  display: block;
  height: auto;
  max-width: 255px;
  width: 100%;
}

.page {
  margin-left: var(--erp-sidebar-w);
  min-height: 100vh;
  padding: 0 28px 28px;
}

.header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 -28px 18px;
  min-height: 98px;
  padding: 18px 28px;
  position: sticky;
  top: 0;
  z-index: 15;
}

.header h1 {
  color: var(--erp-text);
  font-size: 25px;
  letter-spacing: 0;
  line-height: 1.15;
}

.header p {
  color: var(--erp-muted);
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0 0;
}

.eyebrow {
  color: var(--blomix-orange);
  font-size: 12px;
  letter-spacing: 0;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 6px;
  color: #eef2f5;
  display: flex;
  gap: 11px;
  justify-content: flex-start;
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.nav button span {
  align-items: center;
  color: var(--blomix-yellow);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  min-width: 18px;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-left-color: var(--blomix-orange);
  color: #ffffff;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--erp-border);
  color: var(--blomix-blue);
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 8px;
}

.user-chip {
  align-items: center;
  background: #fff;
  border: 1px solid var(--erp-border);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px auto;
  min-height: 52px;
  padding: 7px 12px 7px 8px;
  text-align: left;
}

.user-chip span {
  align-items: center;
  background: #eef1f4;
  border: 1px solid var(--erp-border);
  border-radius: 50%;
  color: var(--blomix-blue);
  display: flex;
  font-size: 12px;
  font-weight: 900;
  grid-row: span 2;
  height: 32px;
  justify-content: center;
  margin-right: 9px;
  width: 32px;
}

.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.2;
}

.user-chip strong {
  color: var(--erp-text);
  font-size: 13px;
}

.user-chip small {
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 700;
}

button,
.nav button,
.secondary,
.file-button {
  border-radius: 6px;
}

button.primary,
.period-strip button.active {
  background: var(--blomix-orange);
  border-color: var(--blomix-orange);
  color: #fff;
}

button.primary:hover {
  background: #d9780d;
  border-color: #d9780d;
}

.secondary,
.icon-button,
.file-button {
  background: #fff;
  border-color: var(--erp-border);
  color: var(--blomix-blue);
}

.panel,
.form,
.metric,
.history-panel,
.history-card,
.operation-sidebar,
.operation-card,
.notification-card,
.calendar-panel,
.notification-calendar-full {
  background: var(--erp-card);
  border-color: var(--erp-border);
  box-shadow: 0 1px 2px rgba(35, 35, 35, 0.04);
}

.metric span,
th,
.form-grid label,
.full-label,
.field-label,
.column-filters label,
.operation-fields label,
.operation-card > label,
.quick-modal-card label {
  color: var(--erp-muted);
}

.metric strong,
.history-title strong,
h2,
h3 {
  color: var(--erp-text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blomix-orange);
  box-shadow: 0 0 0 3px rgba(242, 146, 32, 0.16);
  outline: none;
}

.link-button,
.movement-item small,
.validation-ok,
.calendar-cell.has-actions span {
  color: #0f6b51;
}

.warn,
.badge.warn {
  background: #fff4db;
  color: #8a5400;
}

.ok,
.badge.ok,
.action-ok {
  background: #e7f3ee;
  color: #0f6b51;
}

.action-due {
  background: #fff0ed;
  color: #9a2f25;
}

.error {
  border-left: 4px solid #9a2f25;
}

.table-wrap table,
table {
  background: #fff;
}

th {
  color: #506174;
  font-size: 12px;
  letter-spacing: 0;
}

tr.selected-row,
.selected-row {
  background: #eef3f8;
}

.analytics-dashboard {
  background: var(--blomix-black);
}

.dashboard-filterbar,
.analytics-card,
.brand-block {
  background: #333333;
}

.analytics-card h2,
.dashboard-kpi span,
.brand-block span,
.mini-table div:first-child,
.kpi-card span {
  color: var(--blomix-yellow);
}

.dashboard-kpi strong,
.kpi-card.accent strong,
.mini-table span,
.mini-table button span {
  color: var(--blomix-orange);
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
    padding: 28px 18px;
  }

  .login-copy h1 {
    font-size: 40px;
  }

  .login-copy footer {
    margin-top: 34px;
  }

  .login-card {
    padding: 30px;
  }

  .erp-sidebar {
    position: static;
    width: auto;
  }

  .erp-brand img {
    max-width: 220px;
  }

  .page {
    margin-left: 0;
    padding: 0 14px 18px;
  }

  .header {
    margin: 0 -14px 16px;
    padding: 16px 14px;
    position: static;
  }

  .topbar-actions {
    justify-content: flex-start;
  }
}


/* Sidebar CRM como submenu do ERP */
.crm-nav-group {
  display: grid;
  gap: 8px;
}

.nav-module {
  background: rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--blomix-orange);
  border-radius: 6px;
  padding: 8px 9px 10px;
}

.nav-module-title {
  align-items: center;
  background: transparent;
  border: 0;
  color: #ffffff;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 30px;
  padding: 0 2px 8px;
  width: 100%;
}

.nav-module-title span {
  align-items: center;
  color: var(--blomix-yellow);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-width: 20px;
}

.nav-module-title strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.nav-submenu {
  display: grid;
  gap: 2px;
  padding-left: 23px;
}

.nav-submenu button,
.nav .nav-submenu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 0;
  border-radius: 5px;
  color: #f2f4f6;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: flex-start;
  gap: 8px;
  min-height: 31px;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.nav-submenu .nav-label,
.nav .nav-submenu .nav-label {
  color: inherit;
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  justify-content: flex-start;
  min-width: 0;
}

.beta-badge,
.nav .beta-badge {
  background: rgba(248, 178, 50, 0.22);
  border: 1px solid rgba(248, 178, 50, 0.5);
  border-radius: 999px;
  color: var(--blomix-yellow);
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-left: auto;
  min-width: 0;
  padding: 3px 7px;
  text-transform: uppercase;
}

.nav-submenu button.active,
.nav-submenu button:hover,
.nav .nav-submenu button.active,
.nav .nav-submenu button:hover {
  background: rgba(248, 178, 50, 0.28);
  color: #ffffff;
}


.module-link,
.nav .module-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 6px;
  color: #eef2f5;
  display: flex;
  gap: 11px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.module-link span,
.nav .module-link span {
  color: var(--blomix-yellow);
  font-size: 14px;
  font-weight: 900;
  min-width: 18px;
}

.module-link:hover,
.nav .module-link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

.nav-module:not(.is-open) {
  background: transparent;
  border-left-color: transparent;
  padding: 0;
}

.nav-module:not(.is-open) .nav-module-title {
  min-height: 40px;
  padding: 9px 10px;
}

.nav-module-title em {
  color: #dce3ea;
  font-style: normal;
  font-weight: 900;
  margin-left: auto;
}
