.oc-shell {
  margin: -10px -12px 0;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f5f7fb;
  color: #122033;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.oc-side {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(90deg, #132238 0%, #0f766e 100%);
  color: #fff;
  min-height: 66px;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  align-items: start;
  justify-content: flex-start;
  justify-items: start;
  gap: 4px;
  overflow: hidden;
}

.oc-side-kicker {
  display: inline-flex;
  width: auto;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.oc-side h3 {
  flex: 0 0 auto;
  margin: 0;
  writing-mode: horizontal-tb;
  transform: none;
  text-align: left;
  font-size: 18px;
  line-height: 1.05;
  color: #fff;
  white-space: nowrap;
}

.oc-side p {
  flex: none;
  min-width: 120px;
  margin: 0;
  max-height: none;
  writing-mode: horizontal-tb;
  transform: none;
  text-align: left;
  color: rgba(255, 255, 255, .82);
  font-size: 11.2px;
  line-height: 1.28;
  overflow: hidden;
}

.oc-main {
  min-width: 0;
  padding: 10px 6px 14px;
  display: grid;
  align-content: start;
  gap: 10px;
}

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

.oc-toolbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.oc-toolbar-ico {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 900;
}

.oc-toolbar-title strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
}

.oc-toolbar-title span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

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

.oc-filter {
  height: 32px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: #17324a;
  font-size: 12px;
  font-weight: 800;
}

.oc-save-state {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #d8e3ee;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.oc-save-state.dirty {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

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

.oc-kpi {
  background: #fff;
  border: 1px solid #d8e3ee;
  border-top: 3px solid #0f766e;
  border-radius: 10px;
  min-height: 68px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.oc-kpi span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.oc-kpi strong {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oc-kpi strong.neg { color: #b91c1c; }

.oc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.oc-panel {
  background: #fff;
  border: 1px solid #d8e3ee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.oc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 10px;
  background: #fbfdff;
  border-bottom: 1px solid #d8e3ee;
}

.oc-panel-head strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.oc-panel-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.35;
}

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

.oc-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.oc-table th {
  background: #eef6f7;
  border-right: 1px solid #d1e4e7;
  border-bottom: 1px solid #d8e3ee;
  padding: 9px 6px;
  text-align: center;
  color: #365166;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
}

.oc-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e8eef5;
  padding: 6px;
  background: #fff;
  vertical-align: middle;
}

.oc-table th:nth-child(1), .oc-table td:nth-child(1) { width: 22%; }
.oc-table th:nth-child(2), .oc-table td:nth-child(2),
.oc-table th:nth-child(3), .oc-table td:nth-child(3),
.oc-table th:nth-child(4), .oc-table td:nth-child(4) { width: 13%; }
.oc-table th:nth-child(5), .oc-table td:nth-child(5),
.oc-table th:nth-child(6), .oc-table td:nth-child(6) { width: 12%; }
.oc-table th:nth-child(7), .oc-table td:nth-child(7) { width: 8%; }
.oc-table th:nth-child(8), .oc-table td:nth-child(8) { width: 7%; text-align: center; }

.oc-input {
  width: 100%;
  height: 31px;
  min-width: 0;
  border: 1px solid #cbd8e6;
  border-radius: 7px;
  background: #fff;
  padding: 4px 6px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
}

.oc-input:focus {
  outline: 2px solid rgba(15, 118, 110, .14);
  border-color: #5eead4;
}

.oc-input:disabled {
  background: #f1f5f9;
  border-color: #d7e0ea;
  color: #475569;
  cursor: not-allowed;
}

.oc-money {
  text-align: right;
  font-family: var(--mono);
}

.oc-desvio {
  font-family: var(--mono);
  color: #047857;
}

.oc-desvio strong,
.oc-desvio span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oc-desvio span {
  margin-top: 2px;
  font-size: 9.5px;
  color: #64748b;
}

.oc-desvio.neg,
.oc-desvio.neg span {
  color: #b91c1c;
}

.oc-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.oc-status-positivo { background: #dcfce7; color: #166534; }
.oc-status-atencao { background: #fef3c7; color: #92400e; }
.oc-status-critico { background: #fee2e2; color: #991b1b; }

.oc-icon-btn {
  width: 29px;
  height: 29px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.oc-icon-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.oc-icon-btn:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.oc-icon-btn.danger {
  color: #dc2626;
}

.oc-icon-btn.danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
}

.oc-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.oc-action-btn {
  height: 29px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
}

.oc-action-btn:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.oc-empty {
  display: none;
  padding: 18px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 980px) {
  .oc-shell { grid-template-columns: 1fr; }
  .oc-side { flex-wrap: wrap; min-height: 64px; }
  .oc-side p { flex-basis: 100%; }
  .oc-grid { grid-template-columns: 1fr; }
  .oc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .oc-side { align-items: flex-start; flex-direction: column; min-height: 0; }
  .oc-toolbar { align-items: flex-start; flex-direction: column; }
  .oc-toolbar-actions { width: 100%; justify-content: flex-start; }
  .oc-kpis { grid-template-columns: 1fr; }
}
