h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  line-height: 1.5rem;
}

h1 {
  font-size: 2.25em;
}

a {
  color: var(--cor1);
  font-weight: 500;

  &:has(img) {
    line-height: 0;
  }
}

span {
  font-size: 0.8em;
  line-height: 1.2rem;
  color: var(--texto-70);
  display: inline-block;
}

p {
  margin: 0;
  line-height: 1.5em;
}


label:has(input:is([type="text"], [type="email"], [type="password"], [type="number"], [type="date"], [type="time"]), textarea, select) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: 0.5s;
  border: 1px solid #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: 600;
  /* letter-spacing: 0.025em; */
  color: var(--cor2);
  transition: 0.5s;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  width: 100%;

  &.cor2 {
    background: var(--bg-5);
  }

  &.fit {
    width: fit-content;
  }

  input, textarea {
    background: transparent;
    outline: unset;
    border: 2px solid #e2e8f0;
    background: #f7fafc;
    border-radius: var(--radius-50);
    padding: 8px;
    line-height: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.3s;
    /*-webkit-appearance: none;
    appearance: none;*/
    width: 100%;
    box-sizing: border-box;
  }

  select {
    padding: 8px;
    width: 100%;
    background: #f7fafc;
    box-sizing: border-box;
  }

  & input:focus,
  & input:focus-within,
  & input:focus-visible,
  & input:not(:placeholder-shown) {
    color: var(--texto-95);
  }

  img {
    width: 20px;
    position: absolute;
    right: 12px;
    bottom: 8px;
    opacity: 0.33;
    transition: 0.5s;
  }

  /*&:has(input:focus-within) {
    color: var(--texto-50);
  }

  &:has(input:not(:placeholder-shown)) {
    color: var(--texto-50);

    img {
      opacity: 0.82;
    }
  }*/
}

textarea {
  line-height: 1.37em !important;
  resize: vertical;
}

select {
  background: var(--bg-0);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-50);
  padding: 8px 16px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.3s;
  width: 100%;
  box-sizing: border-box;
  outline: unset;
  cursor: pointer;
}

/* ──────── BOTOES ──────── */
.btn {
  padding: 0.75rem 1rem;
  border-radius: 0.67rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  text-align: center;
  display: inline-block;
  background-color: var(--cor1);
  color: white;
  font-weight: 500;
  font-size: 0.95em;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.btn:hover {
  filter: brightness(1.25);
}

.btn-2 {
  background-color: var(--cor2);
  color: white;
}

.btn-2:hover {
  filter: brightness(1.25);
}

.btn-sucesso {
  background-color: #28a745;
  color: white;
}

.btn-sucesso:hover {
  background-color: #218838;
}

.btn-perigo {
  background-color: #dc3545;
  color: white;
}

.btn-perigo:hover {
  background-color: #c82333;
}

.btn-aviso {
  background-color: #ffc107;
  color: #212529;
}

.btn-aviso:hover {
  background-color: #e0a800;
}

.btn-info {
  background-color: #17a2b8;
  color: white;
}

.btn-info:hover {
  background-color: #138496;
}

.btn-cancelar {
  background-color: #6c757d;
  color: white;
}

.btn-cancelar:hover {
  background-color: #5a6268;
}

.form-linha {
    display: flex;
    gap: 12px;
}

.form-linha-fim {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.processando {
  pointer-events: none;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;

  img {
    filter: invert(1);
    width: 18px;
    /*margin-left: 12px;*/
  }
}

.pointer {
  cursor: pointer;
}

.ver-senha {
  cursor: pointer;
}

.erro, .vermelho {
  color: red !important;
  font-weight: 500;
}

.sucesso, .verde {
  color: rgb(8, 184, 66) !important;
  font-weight: 500;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    min-height: 100%;
    background: rgba(0, 0, 0, 0.33);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    display: grid;
    place-items: center;

    h2 {
      border-bottom: 1px solid rgba(155, 155, 155, 0.25);
    }

    &.ativo {
        opacity: 1;
        pointer-events: auto;
    }

    .container {
      width: 90%;
      max-width: 450px;
      background: #fff;
    }

    .modal-fechar {
      position: absolute;
      right: 16px;
      top: 16px;
      font-size: 1.37em;
      color: #211f1f;
      cursor: pointer;
    }
}

#main {
    background: #f8f9fa;
    min-height: 100vh;
    /* margin-left removido - controlado pelo body no menu.css */
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

#container {
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
    background: #f8f9fa;
}

.material-symbols-rounded {
  font-variation-settings:
  'FILL' 0,
  'wght' 100,
  'GRAD' -25,
  'opsz' 24
}

/* ──────── TOGGLE SWITCH ──────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--sucesso);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.radio-label {
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cor1);
    margin: 0px;
}

.radio-label span {
    font-size: 0.9rem;
    color: var(--texto-95);
}

.tabela-wrapper {
    overflow-x: auto;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabela thead {
    background: var(--cor2);
    color: white;
}

.tabela thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

.tabela thead th.texto-direita {
    text-align: right;
}

.tabela tbody tr {
    border-bottom: 1px solid var(--bg-90);
    transition: background 0.2s;
}

.tabela tbody tr:hover {
    background: var(--bg-95);
}

.tabela tbody td {
    padding: 16px;
    vertical-align: middle;
    font-weight: 500;
    color: #44484d;
}

.tabela .acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tabela .acoes span {
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 1.5rem;
    color: var(--texto-70);
}

.tabela .acoes span:hover {
    background: var(--bg-90);
    color: var(--texto-95);
}

td span {
  font-size: 1rem;
}

/* ──────── STATUS BADGE ──────── */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.status-badge.ativo {
    background: var(--sucesso);
    color: white;
}

.status-badge.inativo {
    background: var(--perigo);
    color: white;
}

/* ──────── LINHA VAZIA TABELA ──────── */
.linha-vazia {
    text-align: center;
    padding: 48px 16px !important;
    color: var(--texto-50);
}

.linha-vazia td {
    font-size: 0.95rem;
}
