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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  font-size: 14px;
}

/* ── LOGIN ── */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #f5f7fa;
}
.login-card {
  background: #fff; border-radius: 12px; padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 100%; max-width: 360px;
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  justify-content: center; margin-bottom: 8px;
}
.login-brand { font-size: 20px; color: #1e293b; }
.login-brand strong { color: #4BC8E8; }
.login-subtitle { text-align: center; color: #94a3b8; font-size: 13px; margin-bottom: 24px; }
.alert-erro {
  background: #fee2e2; color: #991b1b; border-radius: 6px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px;
}
.f-label {
  display: block; font-size: 11px; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; margin-top: 14px;
}
.f-input {
  width: 100%; border: 1.5px solid #e2e8f0; border-radius: 6px;
  padding: 9px 12px; font-size: 14px; color: #1e293b;
  background: #f8fafc; transition: border-color .2s;
}
.f-input:focus { outline: none; border-color: #4BC8E8; background: #fff; }
.btn-primary {
  width: 100%; background: #4BC8E8; color: #fff; border: none;
  border-radius: 6px; padding: 11px; font-size: 14px; font-weight: 700;
  cursor: pointer; margin-top: 20px; transition: background .2s;
}
.btn-primary:hover { background: #35b8d8; }

/* ── HEADER ── */
.app-header {
  background: #fff; border-bottom: 2px solid #4BC8E8;
  padding: 0 24px; display: flex; align-items: center;
  height: 56px; position: sticky; top: 0; z-index: 10;
}
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo img { height: 32px; }
.header-brand { font-size: 16px; font-weight: 800; color: #1e293b; }
.header-brand span { color: #4BC8E8; }
.header-user {
  margin-left: auto; display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: #64748b;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #4BC8E8;
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.link-sair { color: #94a3b8; text-decoration: none; font-size: 13px; }
.link-sair:hover { color: #4BC8E8; }

/* ── ABAS ── */
.tabs { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 0 24px; }
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 14px 20px; font-size: 14px; font-weight: 500;
  color: #94a3b8; position: relative;
}
.tab-btn.active { color: #4BC8E8; font-weight: 700; }
.tab-btn.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: #4BC8E8; border-radius: 2px 2px 0 0;
}
.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

/* ── CONSULTA INDIVIDUAL ── */
.query-row { display: flex; gap: 10px; margin-bottom: 20px; }
.query-row .f-input { flex: 1; }
.btn-consultar {
  background: #4BC8E8; color: #fff; border: none; border-radius: 6px;
  padding: 0 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: background .2s;
}
.btn-consultar:hover { background: #35b8d8; }
.btn-consultar:disabled { background: #94a3b8; cursor: not-allowed; }

/* ── RESULT CARD ── */
.result-card {
  background: #fff; border-radius: 8px; border: 1px solid #e2e8f0;
  padding: 16px 20px; margin-bottom: 20px;
  display: flex; gap: 32px; align-items: center; flex-wrap: wrap;
}
.result-field { display: flex; flex-direction: column; gap: 4px; }
.result-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.result-value { font-size: 15px; font-weight: 600; color: #1e293b; }
.result-card.hidden { display: none; }

/* ── BADGES ── */
.badge {
  display: inline-block; border-radius: 4px;
  padding: 3px 8px; font-size: 12px; font-weight: 600;
}
.badge-sim    { background: #d1fae5; color: #065f46; }
.badge-nao    { background: #fee2e2; color: #991b1b; }
.badge-mei    { background: #fef3c7; color: #92400e; }
.badge-simples{ background: #e0f2fe; color: #0369a1; }
.badge-normal { background: #f1f5f9; color: #475569; }
.badge-erro   { background: #fce7f3; color: #9d174d; }

/* ── TABELA ── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.section-title { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
.export-btns { display: flex; gap: 8px; }
.btn-export {
  font-size: 12px; padding: 6px 14px; border-radius: 5px;
  font-weight: 600; cursor: pointer; background: #fff; transition: background .2s;
}
.btn-csv  { border: 1.5px solid #4BC8E8; color: #4BC8E8; }
.btn-xlsx { border: 1.5px solid #22c55e; color: #16a34a; }
.btn-csv:hover  { background: #f0f9fd; }
.btn-xlsx:hover { background: #f0fdf4; }
.btn-export:disabled { opacity: .4; cursor: not-allowed; }

.results-table-wrap { overflow-x: auto; }
table.results {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: 8px; overflow: hidden;
  border: 1px solid #e2e8f0;
}
table.results thead th {
  background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 700;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase; letter-spacing: .4px;
}
table.results tbody td {
  font-size: 13px; color: #334155; padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}
table.results tbody tr:last-child td { border-bottom: none; }
table.results tbody tr:hover td { background: #f8fafc; }
.table-empty { text-align: center; color: #94a3b8; padding: 32px !important; }

/* ── LOTE ── */
.upload-area {
  border: 2px dashed #4BC8E8; border-radius: 8px; background: #f0f9fd;
  padding: 40px; text-align: center; cursor: pointer; transition: background .2s;
  margin-bottom: 16px;
}
.upload-area:hover, .upload-area.drag-over { background: #e0f2fe; }
.upload-area input[type="file"] { display: none; }
.upload-icon { font-size: 36px; margin-bottom: 8px; }
.upload-text { font-size: 14px; color: #4BC8E8; font-weight: 600; }
.upload-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.upload-filename { font-size: 13px; color: #1e293b; margin-top: 8px; font-weight: 600; }

.progress-wrap { margin-bottom: 16px; display: none; }
.progress-bar { background: #e2e8f0; border-radius: 99px; height: 8px; }
.progress-fill { background: #4BC8E8; height: 8px; border-radius: 99px; width: 0%; transition: width .3s; }
.progress-text { font-size: 12px; color: #64748b; margin-top: 6px; }

.alert-info {
  background: #e0f2fe; color: #0369a1; border-radius: 6px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px; display: none;
}
