/* =========================================================
   EXTRANET GA - COMISSIONAMENTO EXECUTIVO
   Mantém a identidade escura do sistema.
   ========================================================= */

.cex-shell {
  width: 100%;
  color: #eef4ff;
}

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

.cex-eyebrow {
  margin-bottom: 5px;
  color: #6f9ee9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.cex-head h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  color: #f7faff;
}

.cex-head p {
  margin: 7px 0 0;
  color: #8d9bb0;
  font-size: 13px;
}

.cex-actions {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.cex-actions label {
  display: grid;
  gap: 5px;
}

.cex-actions label span {
  color: #8e9cb1;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.cex-actions input,
.cex-actions button {
  height: 38px;
  border: 1px solid #26364d;
  border-radius: 9px;
  background: #111c2b;
  color: #ecf3ff;
  padding: 0 12px;
}

.cex-actions button {
  cursor: pointer;
  background: #173d76;
  border-color: #285a9e;
  font-weight: 700;
}

.cex-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid #233147;
}

.cex-tab {
  min-width: 145px;
  height: 39px;
  border: 1px solid #26364d;
  border-radius: 9px;
  background: #121d2c;
  color: #aebbd0;
  cursor: pointer;
  font-weight: 750;
}

.cex-tab.active {
  border-color: #3387ff;
  background: #173b70;
  color: #fff;
  box-shadow: inset 0 -2px 0 #3b91ff;
}

.cex-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.cex-kpi {
  min-height: 115px;
  padding: 17px;
  border: 1px solid #26364d;
  border-radius: 13px;
  background: #111b29;
}

.cex-kpi span {
  display: block;
  margin-bottom: 12px;
  color: #aab7ca;
  font-size: 12px;
  font-weight: 750;
}

.cex-kpi strong {
  display: block;
  font-size: 25px;
  line-height: 1.15;
  color: #f5f8fd;
}

.cex-kpi small {
  display: block;
  margin-top: 8px;
  color: #78879c;
  font-size: 11px;
}

.cex-kpi.primary {
  border-color: #2e66b5;
}

.cex-kpi.paid strong,
.cex-green {
  color: #45cc88 !important;
}

.cex-kpi.late strong,
.cex-orange {
  color: #f0a145 !important;
}

.cex-kpi.canceled strong,
.cex-red {
  color: #ef6b6b !important;
}

.cex-panel,
.cex-mini {
  border: 1px solid #26364d;
  border-radius: 13px;
  background: #111b29;
}

.cex-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.cex-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 17px;
  border-bottom: 1px solid #223047;
}

.cex-panel-head h3,
.cex-mini h4 {
  margin: 0;
  color: #eef4ff;
  font-size: 15px;
}

.cex-panel-head p {
  margin: 4px 0 0;
  color: #78879c;
  font-size: 11px;
}

.cex-table-scroll {
  overflow-x: auto;
}

.cex-matrix,
.cex-store-table,
.cex-detail-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.cex-matrix th,
.cex-matrix td,
.cex-store-table th,
.cex-store-table td,
.cex-detail-table th,
.cex-detail-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #202d40;
  text-align: right;
  font-size: 12px;
  white-space: nowrap;
}

.cex-matrix th:first-child,
.cex-matrix td:first-child,
.cex-store-table th:first-child,
.cex-store-table td:first-child,
.cex-detail-table th:first-child,
.cex-detail-table td:first-child {
  text-align: left;
}

.cex-matrix thead th,
.cex-store-table thead th,
.cex-detail-table thead th {
  background: #152235;
  color: #8fa2bc;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cex-table-title td {
  padding-top: 15px;
  background: #0f1926;
  color: #f4f7fc;
  font-size: 13px;
  font-weight: 800;
  text-align: left !important;
}

.cex-table-total td {
  background: #14233a;
  color: #71a8ff;
  font-weight: 800;
}

.cex-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cex-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8090a7;
}

.cex-status.paid {
  color: #57cf90;
}

.cex-status.paid i {
  background: #45cc88;
}

.cex-status.late {
  color: #f2aa52;
}

.cex-status.late i {
  background: #f0a145;
}

.cex-status.canceled {
  color: #ef7a7a;
}

.cex-status.canceled i {
  background: #ef6b6b;
}

.cex-total-cell {
  font-weight: 800;
}

.cex-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.cex-mini {
  padding: 16px;
}

.cex-mini h4 {
  margin-bottom: 13px;
}

.cex-mini > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid #202d40;
}

.cex-mini > div:last-child {
  border-bottom: 0;
}

.cex-mini span {
  color: #8c9ab0;
  font-size: 12px;
}

.cex-mini strong {
  color: #eef4ff;
  font-size: 13px;
}

.cex-small-value {
  font-size: 11px !important;
}

.cex-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.cex-badge.pago {
  background: rgba(69,204,136,.12);
  color: #52cf8f;
}

.cex-badge.inadimplente {
  background: rgba(240,161,69,.12);
  color: #f0a145;
}

.cex-badge.cancelado {
  background: rgba(239,107,107,.12);
  color: #ef7777;
}

.cex-empty,
.cex-error,
.cex-loading {
  padding: 34px 22px;
  border: 1px solid #26364d;
  border-radius: 13px;
  background: #111b29;
  text-align: center;
  color: #8f9eb4;
}

.cex-empty strong,
.cex-error strong {
  display: block;
  margin-bottom: 7px;
  color: #e9f1fc;
}

.cex-empty p,
.cex-error p {
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

.cex-source-note {
  margin-top: 12px;
  color: #6f7f95;
  font-size: 10px;
  text-align: right;
}

.cex-source-note span {
  color: #8e9db2;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .cex-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .cex-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .cex-kpis,
  .cex-bottom-grid {
    grid-template-columns: 1fr;
  }

  .cex-actions {
    width: 100%;
  }
}