@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #3c98bd;
  --card: #ffffff;
  --btn-primary: #5bcfb5;
  --btn-primary-hover: #3db89e;
  --btn-danger: #e53935;
  --btn-danger-hover: #c62828;
  --text-dark: #1a3a50;
  --text-body: #333;
  --text-muted: #888;
  --text-red: #e53935;
  --text-yellow: #f5a623;
  --input-bg: #e8e8e8;
  --border: #ddd;
  --nav-link: #2196b0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius-card: 20px;
  --radius-btn: 50px;
  --radius-input: 50px;
  --font: 'Poppins', sans-serif;

  color-scheme: light; /* Definindo o tema do site de acordo com o sistema do navegador do usuário */
}

html {
  scroll-behavior: smooth; /* Ao clicar em uma seção a scrollagem será suave */
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-body);
  min-height: 100vh;
}

/* ===== LAYOUT BASE ===== */

body.layout-flex {
  display: flex;
  flex-direction: column;
}

/* Páginas de card centralizado (login, cadastro, empresa, termos...):
   trava a altura no viewport para o scroll ficar DENTRO do .page-center,
   e não na página inteira. Não afeta as telas de admin (sem .page-center). */
body.layout-flex:has(.page-center) {
  min-height: 100vh;
  min-height: 100dvh;
}

.page-center {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 24px;
}

.page-center--top {
    align-items: stretch;
    overflow: hidden;
    padding: 24px;
  }

.main-area {
  padding: 16px 24px 32px;
}


/* ===== HEADER ===== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background-color: var(--bg);
  position: relative;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 13px;
  color: #0f2630;
  font-weight: 300;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 15px;
  position: relative;
}

.header-link {
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 17px;
}

.header-link:hover {
  text-decoration: underline;
}

.avatar-icon {
  width: 36px;
  height: 36px;
  border: 2px solid var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== DROPDOWN MENU ===== */

.dropdown-menu {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 180px;
  overflow: hidden;
  z-index: 100;
}

.dropdown-menu.aberto {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.dropdown-menu a:hover {
  background: #f5f5f5;
}

/* ===== CARD BASE ===== */

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.content-card {
  background: white;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}


/* ===== INNER NAV ===== */

.inner-nav {
  display: flex;
  gap: 32px;
  padding: 16px 28px;
  border-bottom: 1px solid #eee;
}

.inner-nav a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 600;
  font-size: 15px;
}

.inner-nav a:hover {
  text-decoration: underline;
}

.inner-nav a.active {
  border-bottom: 2px solid var(--nav-link);
  padding-bottom: 2px;
}


/* ===== PAGE TITLE ===== */

.page-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
}


/* ===== INPUTS ===== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
}

.form-group label .req {
  color: var(--text-red);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
  background: var(--input-bg);
  border: none;
  border-radius: var(--radius-input);
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-body);
  outline: none;
  width: 100%;
  transition: box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 2px var(--btn-primary);
}

/* ===== TOGGLE MOSTRAR/OCULTAR SENHA (olhinho) ===== */
.senha-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.senha-wrap input {
  padding-right: 44px;
}
.btn-olho {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-link);
  font-size: 15px;
  padding: 4px;
  display: flex;
  align-items: center;
}
.btn-olho:hover {
  color: var(--text-dark);
}

textarea {
  border-radius: 12px;
  resize: vertical;
  min-height: 80px;
}

textarea.textarea-descricao {
  min-height: 120px;
  border-radius: 12px;
}

textarea.textarea-justificativa {
  min-height: 220px;
  border: 2px solid #333;
  border-radius: 8px;
  background: white;
  resize: vertical;
  outline: none;
  width: 100%;
}

select {
  appearance: none;
  cursor: pointer;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

input[readonly],
input.readonly-field {
  background: #f0f0f0;
  color: var(--text-muted);
  pointer-events: none;
}

select.select-readonly {
  background: #f0f0f0;
  color: var(--text-muted);
  pointer-events: none;
}

.input-file-hidden {
  display: none;
}

.input-busca {
  max-width: 220px;
}

.input-data-filtro {
  max-width: 150px;
}

.input-qtd-tabela {
  width: 70px;
  padding: 4px 8px;
  text-align: center;
  background: var(--input-bg);
  border: none;
  border-radius: 8px;
}

.input-qtd-solicitar {
  width: 64px;
  padding: 4px 8px;
  background: var(--input-bg);
  border: none;
  border-radius: 8px;
  text-align: center;
}

.chk-tabela {
  width: 16px;
  height: 16px;
  accent-color: var(--btn-primary);
}

.form-group--entrar {
  text-align: left;
  margin-bottom: 16px;
}

.form-group--login {
  text-align: left;
  margin-bottom: 14px;
}

.select-wrap--filtro-tipo {
  min-width: 170px;
}

.select-wrap--filtro-setor {
  min-width: 150px;
}

.select-wrap--filtro-status {
  min-width: 160px;
}


/* ===== BUTTONS ===== */

.btn {
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--btn-primary);
  color: #1a3a50;
}

.btn-primary:hover {
  transition: .4s;
  background: var(--btn-primary-hover);
  color: white;
}

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

.btn-danger:hover {
  background: var(--btn-danger-hover);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
}

.btn-outline:hover {
  background: var(--text-dark);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  border: 2px solid var(--btn-danger);
  color: var(--btn-danger);
}

.btn-outline-danger:hover {
  background: var(--btn-danger);
  color: white;
}

.btn-outline-recusar {
  background: transparent;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
}

.btn-outline-recusar:hover {
  transition: .4s;
  border-color: var(--btn-danger);
  color: var(--btn-danger);
  background: transparent;
}

.btn-full {
  margin-top: 20px;
  width: 100%;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

.btn-md {
  padding: 10px 20px;
}

.btn-lg {
  padding: 12px 32px;
  font-size: 15px;
}

.btn-xl {
  padding: 12px;
  font-size: 15px;
  width: 100%;
}

.btn-logo {
  padding: 8px 20px;
  font-size: 13px;
}

.btn-modal-confirmar {
  padding: 12px 36px;
}

.btn-add-setor {
  padding: 10px 18px;
  white-space: nowrap;
}

.btn-rm {
  background: none;
  border: none;
  color: var(--text-red);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

.btn-rm:hover {
  background: #ffebee;
  border-radius: 6px;
}

.btn-entrar {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 15px;
}

.link-esqueci {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--nav-link);
  text-decoration: none;
}

.link-esqueci:hover {
  text-decoration: underline;
}

.texto-ajuda {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.4;
}

.msg-sucesso {
  color: #2e7d32;
  font-size: 13px;
  margin: 12px 0;
  display: none;
}

.msg-sucesso.show {
  display: block;
}

/* ===== TABLES ===== */

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

thead tr {
  background: #f0f0f0;
}

th {
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

td {
  padding: 14px 16px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

tr:last-child td {
  border-bottom: none;
}

td.red,
th.red {
  color: var(--text-red);
  font-weight: 600;
}

td.yellow {
  color: var(--text-yellow);
  font-weight: 600;
}

td.ok {
  color: #2e7d32;
}

tr.row-red td {
  color: var(--text-red);
  font-weight: 600;
}

tr.row-yellow td {
  color: var(--text-yellow);
  font-weight: 600;
}

.th-chk {
  width: 36px;
}

.th-left {
  text-align: left;
  padding-left: 16px;
}

.td-left {
  text-align: left;
  padding-left: 16px;
}

.td-validade-red {
  color: var(--text-red);
  font-weight: 600;
}

.td-validade-yellow {
  color: var(--text-yellow);
  font-weight: 600;
}

.td-status-red {
  color: var(--text-red);
  font-weight: 600;
}

.td-status-yellow {
  color: var(--text-yellow);
  font-weight: 600;
}

.td-status-solicitado {
  color: var(--text-yellow);
  font-weight: 600;
  font-size: 13px;
}

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

.table-footer {
  display: flex;
  gap: 12px;
  padding: 20px 28px;
}

.table-footer--col {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* ===== FILTER BAR ===== */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ===== ALERT BANNER ===== */

.alert-banner {
  background: var(--btn-danger);
  color: #f5a623;
  border-radius: var(--radius-btn);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 20px;
}

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

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal--lg {
  max-width: 740px;
}

.modal--md {
  max-width: 520px;
}

.modal--sm {
  max-width: 460px;
}

.modal--epi {
  max-width: 700px;
}

.modal--solicitar {
  max-width: 660px;
}

.modal h2 {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
}

.modal-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.modal-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
}

.modal-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-grid-excluir {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-titulo-esquerda {
  text-align: left;
  font-size: 20px;
  margin-bottom: 20px;
}

/* ===== ERROR MESSAGE ===== */

.error-msg {
  color: var(--text-red);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.error-msg.show {
  display: block;
}

.error-msg--estoque {
  font-size: 13px;
}

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

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-low {
  background: #ffebee;
  color: var(--text-red);
}

.badge-warn {
  background: #fff8e1;
  color: #f57f17;
}

.badge-info {
  background: #e3f2fd;
  color: #1565c0;
}

.s-val--verde {
  color: #2e7d32;
}

.s-val--amarelo {
  color: #f5a623;
}

.s-val--vermelho {
  color: #e53935;
}

/* ===== CHECKBOX ===== */

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--btn-primary);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-row label {
  font-size: 13px;
  color: var(--text-body);
  cursor: pointer;
}

.checkbox-row--mt {
  margin-top: 12px;
  margin-bottom: 28px;
}

/* ===== PÁGINA DE TERMOS ===== */

body.layout-flex:has(.termos-page-wrap) {
    min-height: 100dvh;
}

.termos-page-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.termos-titulo {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.termos-subtitulo {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  text-align: center;
  margin-bottom: 24px;
}

.termos-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 28px;
}

.termos-conteudo {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
}

.termos-secao {
  margin-bottom: 20px;
}
.termos-secao:last-child {
  margin-bottom: 0;
}

.termos-secao-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.termos-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: var(--btn-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.termos-secao-titulo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.termos-texto {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 8px;
}
.termos-texto:last-child { 
  margin-bottom: 0; 
}

.termos-confirmacao { 
  text-align: center; 
}
.termos-confirmacao-titulo { 
  font-size: 18px; 
  font-weight: 600;
  color: var(--text-dark); 
  margin-bottom: 4px;
}
.termos-confirmacao-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.termos-confirmacao .checkbox-row {
  text-align: left;
}

.termos-acoes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* ===== AVISO AMARELO ===== */

.aviso-amarelo {
  background: #fff8e1;
  border: 1px solid #f5a623;
  color: #7a5000;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  display: none;
}

.aviso-amarelo.show {
  display: block;
}

.aviso-amarelo--inline {
  font-size: 12px;
  color: #7a5000;
  background: #fff8e1;
  border: 1px solid #f5a623;
  border-radius: 8px;
  padding: 4px 10px;
  display: none;
}

.aviso-amarelo--inline.show {
  display: inline;
}

/* ===== CONFIRMAÇÃO INLINE SETORES ===== */

.confirm-inline {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.confirm-inline.show {
  display: flex;
}

.confirm-inline-txt {
  font-size: 13px;
}

/* ===== AVISO PENDENTE ===== */

.aviso-pendente {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  display: none;
}

.aviso-pendente.show {
  display: block;
}

/* ===== LOGIN / SIGNUP CARD ===== */

.login-card,
.signup-card {
  background: white;
  border-radius: 20px;
  padding: 48px 56px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
}

.login-card h1,
.signup-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-dark);
}

.google-btn {
  margin-top: 16px;
  font-size: 28px;
  color: #db4437;
  cursor: pointer;
  transition: transform 0.2s;
  display: inline-block;
}

.google-btn:hover {
  transform: scale(1.1);
}

/* ===== ENTRAR EMPRESA CARD ===== */

.card-entrar {
  background: white;
  border-radius: 20px;
  padding: 40px 48px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
}

.card-entrar h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-entrar p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}


/* ===== CADASTRAR EMPRESA CARD ===== */

.card-empresa {
  background: white;
  border-radius: 20px;
  padding: 36px 48px;
  width: 100%;
  max-width: 860px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.card-empresa h1 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.logo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  grid-row: span 2;
}

.logo-preview {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  display: none;
}

.logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}

.auto-field {
  background: #f0f0f0;
  color: var(--text-muted);
  pointer-events: none;
}

.footer-msg {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

.footer-msg a {
  color: var(--nav-link);
  font-weight: 600;
}

/* ===== SETORES EMPRESA CARD ===== */

.card-setores {
  background: white;
  border-radius: 20px;
  padding: 40px 48px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
}

.card-setores h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-end;
}

.add-row .form-group {
  flex: 1;
  text-align: left;
}

.setores-lista {
  margin-bottom: 24px;
}

.setor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

.setor-item .nome {
  font-weight: 500;
}

/* ===== DASHBOARD ===== */

.dashboard-body {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 180px 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.kpi-card {
  background: #f5f5f5;
  border-radius: 14px;
  padding: 18px 24px;
  grid-column: 1;
  grid-row: 1;
}

.kpi-card .label {
  font-size: 13px;
  font-weight: 600;
}

.kpi-card .value {
  font-size: 40px;
  font-weight: 700;
  margin-top: 4px;
}

.tabela-compra {
  grid-column: 1;
  grid-row: 2;
}

.tabela-compra h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.tabela-compra table {
  font-size: 13px;
}

.status-ca {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.status-ca h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.status-item {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-item .s-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.status-item .s-val {
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grafico-barras {
  grid-column: 3 / 5;
  grid-row: 1;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 16px;
}

.grafico-barras h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.grafico-linha {
  grid-column: 3 / 5;
  grid-row: 2;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 16px;
}

.grafico-linha h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ===== COMPLEMENTAR FUNCIONÁRIO ===== */

.card-complementar {
  background: white;
  border-radius: 20px;
  padding: 40px 48px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
}

.card-complementar h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
  line-height: 1.3;
}

.complementar-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== MEUS EQUIPAMENTOS ===== */

.meus-eq-body {
  padding: 24px 28px;
}

.meus-eq-titulo {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
}

.confirmacao-box {
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  margin-bottom: 8px;
}

.confirmacao-box p {
  font-size: 18px;
  color: #333;
  line-height: 1.7;
}

/* ===== SEÇÕES (empresa / setores) ===== */

.card-secao {
  background: white;
  border-radius: 20px;
  padding: 40px 48px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.card-secao--sm {
  max-width: 600px;
}

.card-secao--setores {
  max-width: 560px;
}

.card-secao h1 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.secao-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  align-items: start;
}

.secao-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.secao-col--stretch {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.secao-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: center;
}

.secao-actions--mt {
  margin-top: 24px;
}

.logo-secao-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.logo-secao-preview {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
  display: none;
}

.logo-secao-txt {
  font-size: 12px;
  color: var(--text-muted);
}


/* ===== SEÇÃO SETORES ===== */

.setores-table-wrap {
  margin-bottom: 20px;
}

.add-setor-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 12px;
}

.add-setor-row input {
  flex: 1;
}

/* ===== SPINNER INPUT ===== */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}


/* ===== UTILITÁRIO OCULTO (estado inicial JS) ===== */

.oculto {
  display: none;
}

/* ===== CORREÇÕES DE CLASSES NÃO USADAS NO HTML ===== */

.epis-body,
.func-body,
.historico-body {
  padding: 20px 28px;
}

/* ===== Utilitários (migrados de CSS inline) ===== */

/* Setores em checkbox no modal de cadastro de EPI */
.cad-setores-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0;
}

/* Label do filtro de data no histórico */
.label-filtro-data {
  align-self: center;
  font-size: 13px;
  color: #555;
  margin-right: 6px;
}

/* Bloco do reCAPTCHA centralizado */
.recaptcha-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px 0;
}
.recaptcha-box .error-msg {
  text-align: center;
}

/* Título "Minhas Solicitações" com espaçamento */
.titulo-secao-espaco {
  margin-top: 32px;
}

/* Botão copiar código na Seção Empresa */
.btn-copiar-codigo {
  margin-top: 6px;
}

/* CPF/alvo em cinza pequeno (sob nome no histórico e tabelas) */
.subtexto-cinza {
  font-size: 12px;
  color: #777;
}

/* Célula de "vazio" centralizada nas tabelas */
.celula-vazia {
  text-align: center;
  padding: 20px;
  color: #777;
}

/* Espaçamento entre botões de ação nas tabelas */
.btn-acao-espaco {
  margin: 2px;
}
.acoes-nowrap {
  white-space: nowrap;
}

/* Card KPI do dashboard (número grande centralizado) */
.kpi-centralizado {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kpi-valor-grande {
  font-size: 72px;
}

/* Label de cada checkbox de setor no modal de EPI */
.chk-setor-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

/* Tela de cadastro: elimina o scroll fantasma de poucos pixels */
.signup-scroll-fix {
  overflow-y: visible;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* ===== ENTREGAS PENDENTES DE CONFIRMAÇÃO ===== */
.pendentes-aviso {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
  }

.pendente-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
  }

.pendente-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

.pendente-info span {
    font-size: 13px;
    color: var(--text-muted);
  }

.pendente-acoes {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
  }

.modal-dica {
    font-size: 13px;
    color: var(--text-muted);
    margin: -4px 0 16px;
    line-height: 1.4;
}

/* ============================================================
/*  RESPONSIVIDADE
/* ============================================================ */

/* ===================== TABLET / NOTEBOOK PEQUENO (≤1024px) ===================== */
@media (max-width: 1024px) {
  .main-area {
    padding: 12px 16px 24px;
  }

  .header {
    padding: 14px 20px;
  }

  .inner-nav {
    gap: 22px;
    padding: 14px 20px;
  }

  .epis-body,
  .func-body,
  .historico-body {
    padding: 18px 20px;
  }

  .table-footer {
    padding: 16px 20px;
  }

  .modal {
    width: 94%;
    padding: 28px;
  }

  .form-grid {
    gap: 14px;
  }

  .modal-grid-2col {
    gap: 14px 20px;
  }

  .secao-grid {
    gap: 16px 24px;
  }

  /* Dashboard: o grid de 4 colunas (1fr 1fr 180px 1fr) não cabe num tablet →
     empilha em bloco, mas MANTÉM os gráficos (tablet tem espaço vertical de sobra) */
  .dashboard-body {
    display: block;
    padding: 20px;
  }

  .dashboard-body > * {
    margin-bottom: 16px;
  }
}

/* ---------- MOBILE (≤ 640px) ---------- */
@media (max-width: 640px) {

  /* HEADER empilhado e centralizado */
  .header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-align: center;
  }
  .header-right {
    justify-content: center;
  }
  .dropdown-menu {
    right: auto;
  }

  /* ===== NAV DO ADMIN — rolagem horizontal garantida (problema 3) ===== */
  .inner-nav {
    gap: 18px;
    padding: 14px 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .inner-nav a {
    flex: 0 0 auto; /* impede os itens de encolher/sumir */
  }

  /* ===== GRIDS em 1 COLUNA — reforçado (problemas 1 e 2) ===== */
  .form-grid,
  .secao-grid,
  .modal-grid-2col,
  .modal-grid-excluir {
    display: block !important; /* mata o grid de 2 colunas de vez */
  }
  .form-grid > *,
  .secao-grid > *,
  .modal-grid-2col > *,
  .modal-grid-excluir > * {
    width: 100%;
    margin-bottom: 14px;
  }
  /* Campos ocupam a largura toda e ficam mais altos e legíveis */
  .form-group input,
  .form-group select,
  .secao-col input,
  .secao-col select {
    width: 100%;
  }

  /* CARDS ocupam a largura com margem confortável */
  .card-empresa,
  .card-setores,
  .login-card,
  .signup-card,
  .card-secao,
  .card-entrar,
  .card-complementar {
    width: 100%;
    max-width: 100%;
    padding: 24px 18px;
  }

  /* Card pages no celular: a página inteira rola e o card sobe pro topo */
  body.layout-flex:has(.page-center) {
    height: auto;
    overflow: visible;
  }

  .page-center {
    align-items: flex-start;
    overflow: visible;
    padding: 16px 14px 32px;
  }

  /* ===== BOTÕES menos "gordinhos" (problema 2) ===== */
  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .secao-actions {
    flex-direction: column;
    gap: 10px;
  }

  .secao-actions .btn {
    width: 100%;
  }

  .btn-md, .btn-lg, .btn-full {
    padding: 11px 16px;
    font-size: 14px;
  }

  /* Rodapé da tabela (EPIs): botões empilhados, largura total, rótulo numa linha só */
  .table-footer {
    flex-direction: column;
    padding: 16px 20px;
  }

  .table-footer .btn {
    width: 100%;
  }

  .table-footer .btn, 
  .epis-body .btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  /* FILTROS empilhados */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-bar .input-busca,
  .filter-bar .select-wrap,
  .filter-bar select,
  .filter-bar input {
    width: 100%;
  }

  /* MODAIS quase tela cheia */
  .modal {
    width: 100%;
    max-width: 100%;
    padding: 22px 16px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* ===== DASHBOARD: 1 coluna + ESCONDER OS GRÁFICOS (problema 4) ===== */
  .dashboard-body {
    display: block;
    padding: 16px;
  }

  .dashboard-body > * {
    margin-bottom: 16px;
  }

  .grafico-barras,
  .grafico-linha {
    display: none; /* gráficos não aparecem no mobile — decisão consciente */
  }

  /* TABELAS mantêm rolagem horizontal legível */
  .table-overflow table {
    min-width: 560px;
  }
  .acoes-nowrap {
    white-space: normal;
  }

  .page-title {
    font-size: 22px;
  }
  .recaptcha-box {
    transform: scale(0.95);
    transform-origin: center;
  }

  .kpi-card {
    align-items: center;
    text-align: center;
    justify-content: center;
  }

  .historico-body .filter-bar {
    align-items: flex-start;
  }

  .label-filtro-data {
    align-self: flex-start;
    margin-bottom: 4px;
  }

  /* Termos: no celular a página inteira rola e a caixa tem altura própria */
  body.layout-flex:has(.termos-page-wrap) {
    height: auto;
    overflow: visible;
  }

  .page-center--top {
    align-items: flex-start;
    overflow: visible;
  }

  .termos-page-wrap {
    display: block;
  }

  .termos-titulo {
    font-size: 24px;
  }

  .termos-subtitulo {
    font-size: 14px;
  }

  .termos-card {
    display: block;
    padding: 20px 16px;
  }

  .termos-conteudo {
    height: 55vh;
    min-height: 240px;
    padding: 16px;
  }

  .termos-acoes {
    flex-direction: column;
  }

  .termos-acoes .btn {
    width: 100%;
  }

  /* Setores no modal de EPI: um por linha, sem texto cortado */
  .cad-setores-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chk-setor-label {
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
  }

  .chk-setor-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
  }

  .chk-setor-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--btn-primary);
  }

  .pendente-card {
    flex-direction: column;
    align-items: stretch;
  }

  .pendente-acoes {
    flex-direction: column;
  }

  .pendente-acoes .btn {
    width: 100%;
  }
}

/* ===================== CELULAR PEQUENO (≤380px) ===================== */
@media (max-width: 380px) {
  .main-area {
    padding: 8px 10px 20px;
  }

  .header {
    padding: 10px 12px;
  }

  .logo-title {
    font-size: 18px;
  }

  .page-title {
    font-size: 20px;
  }

  .inner-nav {
    gap: 14px;
    padding: 12px 12px;
  }

  .inner-nav a {
    font-size: 14px;
  }

  .epis-body,
  .func-body,
  .historico-body {
    padding: 14px 12px;
  }

  .table-footer {
    padding: 12px 12px;
  }

  .btn {
    padding: 10px 14px; 
    font-size: 14px;
  }

  .table-footer .btn,
  .epis-body .btn {
    padding: 11px 14px;
  }

  .card-empresa,
  .card-setores,
  .login-card,
  .signup-card,
  .card-secao,
  .card-entrar,
  .card-complementar {
    padding: 20px 14px;
  }

  .modal {
    padding: 18px 12px;
  }

  .modal-overlay {
    padding: 6px;
  }

  .table-overflow table {
    min-width: 480px;
  }

  .recaptcha-box {
    transform: scale(0.86);
    transform-origin: left center;
  }

  /* Termos */
  .termos-titulo {
    font-size: 22px;
  }

  .termos-card {
    padding: 16px 12px;
  }
}