* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 1180px;
  height: 100%;
  font-family:
    "Segoe UI",
    Arial,
    sans-serif;
  background: #1c1c1c;
  color: #efefef;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.janela {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* =====================================================
   BARRA DE TÍTULO
===================================================== */

.barra-titulo {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  color: white;
  background:
    linear-gradient(
      180deg,
      #303030,
      #202020
    );
  border-bottom:
    1px solid #555;
}

.marca {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}

.marca-icone {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background:
    linear-gradient(
      135deg,
      #db2525,
      #8c1111
    );
}

.janela-acoes {
  display: flex;
  height: 100%;
}

.janela-acoes span {
  width: 48px;
  display: grid;
  place-items: center;
  color: #ddd;
}


/* =====================================================
   ABAS
===================================================== */

.abas-principais {
  height: 42px;
  display: flex;
  align-items: stretch;
  padding-left: 18px;
  background: #f1f1f1;
  border-bottom: 1px solid #aaa;
}

.abas-principais button {
  min-width: 110px;
  padding: 0 16px;
  color: #181818;
  background: transparent;
  border: 0;
  border-bottom:
    3px solid transparent;
  font-size: 13px;
}

.abas-principais button:hover {
  background: #e3e3e3;
}

.abas-principais button.ativo {
  font-weight: 700;
  background: white;
  border-bottom-color: #d82828;
}


/* =====================================================
   RIBBON
===================================================== */

.ribbon {
  min-height: 140px;
  display: flex;
  background: #f5f5f5;
  color: #202020;
  border-bottom: 1px solid #888;
}

.grupo-ribbon {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 12px 18px 28px;
  border-right: 1px solid #bbb;
}

.grupo-ribbon small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  text-align: center;
  color: #777;
  font-size: 11px;
}

.grupo-ribbon.acoes {
  margin-left: auto;
}

.ribbon-botao {
  width: 92px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #222;
}

.ribbon-botao span {
  font-size: 31px;
}

.ribbon-botao:hover {
  background: #e9e9e9;
  border-color: #bbb;
}


/* =====================================================
   PESQUISA
===================================================== */

.barra-pesquisa {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  background:
    linear-gradient(
      180deg,
      #353535,
      #292929
    );
  border-bottom: 1px solid #555;
}

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

.pesquisa > span {
  font-size: 20px;
}

.pesquisa input {
  width: 360px;
  height: 34px;
  padding: 0 12px;
  color: white;
  background: #3d3d3d;
  border: 1px solid #5c5c5c;
  outline: none;
}

.pesquisa input:focus {
  border-color: #e58a15;
}

.pesquisa select {
  height: 34px;
  width: 200px;
  padding: 0 10px;
  color: white;
  background: #444;
  border: 1px solid #666;
}

.indicadores {
  margin-left: auto;
  display: flex;
  gap: 0;
}

.indicadores span {
  padding: 8px 12px;
  background: #252525;
  border: 1px solid #555;
  font-size: 12px;
}

.indicadores strong {
  color: #fff;
}


/* =====================================================
   CONTEÚDO
===================================================== */

.conteudo {
  flex: 1;
  display: grid;
  grid-template-columns:
    minmax(800px, 1fr)
    280px;
  gap: 8px;
  padding: 8px;
  background: #232323;
}

.painel-lista,
.painel-filtros {
  border: 1px solid #555;
  background: #303030;
}

.cabecalho-painel {
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #f0f0f0;
  color: #222;
}


/* =====================================================
   TABELA
===================================================== */

.tabela-wrapper {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead th {
  height: 37px;
  padding: 0 10px;
  background: #353535;
  color: white;
  border:
    1px solid #5b5b5b;
  font-size: 12px;
  text-align: left;
}

tbody td {
  height: 34px;
  padding: 0 10px;
  color: #ededed;
  background: #303030;
  border:
    1px solid #515151;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

tbody tr:hover td {
  background: #414141;
}

tbody tr.selecionado td {
  background: #60491e;
}

thead th:nth-child(1) {
  width: 75px;
}

thead th:nth-child(2) {
  width: 130px;
}

thead th:nth-child(3) {
  width: 270px;
}

thead th:nth-child(4),
thead th:nth-child(5) {
  width: 115px;
  text-align: right;
}

tbody td:nth-child(4),
tbody td:nth-child(5) {
  text-align: right;
}

thead th:nth-child(6),
thead th:nth-child(7),
thead th:nth-child(8) {
  width: 90px;
  text-align: center;
}

tbody td:nth-child(6),
tbody td:nth-child(7),
tbody td:nth-child(8) {
  text-align: center;
}

thead th:nth-child(9) {
  width: 150px;
}

thead th:nth-child(10) {
  width: 70px;
  text-align: center;
}

tbody td:nth-child(10) {
  text-align: center;
}

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

.status::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.status.regular::before {
  background: #65c84f;
}

.status.abaixo::before {
  background: #f69b22;
}

.status.insuficiente::before {
  background: #ed4747;
}

.rodape-tabela {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 12px;
  background: #242424;
  border-top: 1px solid #555;
  color: #ddd;
  font-size: 12px;
}

.rodape-tabela-direita {
  margin-left: auto;
}


/* =====================================================
   FILTROS
===================================================== */

.painel-filtros {
  padding: 14px;
  background: #f3f3f3;
  color: #252525;
}

.painel-filtros h3 {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #bbb;
}

.filtro-bloco {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.filtro-bloco strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.filtro-bloco label {
  font-size: 13px;
}

.filtro-bloco select {
  height: 32px;
  padding: 0 8px;
}

.botao-limpar,
.botao-aplicar {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border: 0;
  color: white;
  font-weight: 700;
}

.botao-limpar {
  background: #414141;
}

.botao-aplicar {
  background:
    linear-gradient(
      180deg,
      #d93232,
      #b41d1d
    );
}


/* =====================================================
   BARRA INFERIOR
===================================================== */

.barra-inferior {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  background:
    linear-gradient(
      180deg,
      #333,
      #252525
    );
  border-top: 1px solid #555;
}

.barra-inferior button {
  height: 38px;
  min-width: 145px;
  padding: 0 16px;
  color: white;
  background: #303030;
  border: 1px solid #626262;
  border-radius: 3px;
  font-weight: 600;
}


/* =====================================================
   STATUS
===================================================== */

.barra-status {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 16px;
  background: #e9e9e9;
  color: #333;
  font-size: 12px;
  border-top: 1px solid #aaa;
}

.status-direita {
  margin-left: auto;
}

.status-direita strong {
  color: #169438;
}


/* =====================================================
   MODAL
===================================================== */

.oculto {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.modal-fundo {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.67);
}

.modal-caixa {
  position: relative;
  width: 720px;
  background: #f3f3f3;
  color: #222;
  border:
    1px solid #777;
  box-shadow:
    0 25px 90px rgba(0,0,0,.7);
}

.modal-caixa > header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 17px;
  color: white;
  background:
    linear-gradient(
      180deg,
      #333,
      #222
    );
}

.modal-caixa header h2 {
  margin: 0;
  font-size: 16px;
}

.modal-caixa header button {
  width: 48px;
  height: 48px;
  color: white;
  background: transparent;
  border: 0;
  font-size: 25px;
}

.modal-caixa form {
  padding: 20px;
}

.grade-formulario {
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 15px;
}

.grade-formulario label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.grade-formulario input,
.grade-formulario select {
  height: 36px;
  padding: 0 9px;
  border: 1px solid #aaa;
}

.campo-grande {
  grid-column: 1 / -1;
}

.checkbox-formulario {
  flex-direction: row !important;
  align-items: center;
}

.checkbox-formulario input {
  width: 18px;
  height: 18px;
}

.modal-caixa form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid #ccc;
}

.modal-caixa footer button {
  height: 38px;
  min-width: 120px;
  border: 0;
  font-weight: 700;
}

.botao-secundario {
  background: #ddd;
}

.botao-salvar {
  color: white;
  background: #248c38;
}
