﻿:root {
  --primary: #1c5284;
  --primary-strong: #123b61;
  --success: #39e240;
  --surface: #ffffff;
  --line: #e5e5e5;
  --bg: #f6f8fb;
  --text: #17202a;
  --muted: #667085;
  --warning: #b7791f;
  --danger: #b42318;
  --neutral: #64748b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 430px) 1fr; background: #fff; }
.auth-panel { padding: 42px; display: flex; flex-direction: column; justify-content: center; gap: 22px; border-right: 1px solid var(--line); }
.auth-panel img { width: 220px; max-width: 70%; }
.auth-visual { background: linear-gradient(135deg, rgba(28,82,132,.95), rgba(57,226,64,.75)), url('/logo.jpeg'); background-size: cover; background-position: center; display: flex; align-items: end; padding: 48px; color: white; }
.auth-visual h1 { font-size: 42px; max-width: 720px; line-height: 1.05; margin: 0; letter-spacing: 0; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
label { font-size: 13px; font-weight: 700; color: #344054; }
input, select, textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--text); }
textarea { min-height: 86px; resize: vertical; }
.primary-btn, .success-btn, .ghost-btn, .danger-btn { min-height: 40px; border-radius: 8px; padding: 0 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primary-btn { background: var(--primary); color: white; }
.success-btn { background: var(--success); color: #06233b; }
.ghost-btn { background: #eef3f8; color: var(--primary); }
.danger-btn { background: #fee4e2; color: var(--danger); }
.link { color: var(--primary); font-weight: 700; }
.error { color: var(--danger); background: #fff3f1; border: 1px solid #ffd4cf; padding: 10px 12px; border-radius: 8px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { background: #0f2f4f; color: white; padding: 22px 16px; display: grid; grid-template-rows: auto 1fr auto; gap: 24px; }
.sidebar img { width: 180px; background: white; border-radius: 6px; padding: 6px 10px; }
.nav { display: grid; gap: 6px; align-content: start; }
.nav a { padding: 11px 12px; border-radius: 8px; color: #dbeafe; font-weight: 700; }
.nav a.active, .nav a:hover { background: #174c7d; color: #fff; }
.sidebar small { color: #cbd5e1; line-height: 1.45; }
.main { min-width: 0; }
.topbar { min-height: 68px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 28px; }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.content { padding: 26px 28px 42px; display: grid; gap: 22px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; }
.metric, .panel, .table-card { background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(18, 59, 97, .06); }
.metric { padding: 18px; display: grid; gap: 8px; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong { font-size: 30px; color: var(--primary); }
.panel { padding: 18px; display: grid; gap: 16px; }
.panel h2 { margin: 0; font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
.config-panel { min-height: 0; grid-template-rows: auto auto 1fr; align-content: start; }
.config-form-grid { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(220px, .8fr) 140px; gap: 14px; align-items: end; }
.config-form-grid .primary-btn { width: 100%; padding: 0 10px; white-space: nowrap; }
.config-panel .table-card { align-self: stretch; overflow: auto; }
.config-panel table { min-width: 720px; }
.table-card { overflow: hidden; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: middle; }
th { background: #f0f5fa; color: #344054; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
tr:hover td { background: #fbfdff; }
.badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 900; }
.badge.vigente { background: #e7fbe8; color: #126016; }
.badge.proximo_vencimento { background: #fff4dc; color: var(--warning); }
.badge.vencido { background: #fee4e2; color: var(--danger); }
.badge.obsoleto { background: #edf2f7; color: var(--neutral); }
.badge.pendente_aprovacao { background: #e0f2fe; color: #075985; }
.empty { padding: 28px; color: var(--muted); text-align: center; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topbar .actions { margin-left: auto; flex-wrap: nowrap; justify-content: flex-end; }
.topbar #logoutBtn { flex: 0 0 auto; min-width: 72px; }
.company-select { min-width: 220px; max-width: 340px; }
.hidden { display: none !important; }
.check-line { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 600; }
.check-line input { width: auto; }
.field-builder { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 12px; background: #fbfdff; }
.field-builder + .field-builder { margin-top: 12px; }
.success-message { color: #126016; background: #e7fbe8; border: 1px solid #b8f5bb; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.public-form-shell .auth-panel { max-width: 760px; width: 100%; }
@media (max-width: 980px) {
  .auth-shell, .app-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .sidebar { position: static; grid-template-rows: auto; }
  .metrics, .filters, .grid-2, .grid-3, .settings-grid, .config-form-grid { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 16px; align-items: flex-start; gap: 12px; flex-direction: column; }
  .content { padding: 18px 16px; }
}


