:root {
  --bg-app: #eef2f7;
  --bg-surface: #ffffff;
  --bg-surface-2: #f7f9fc;
  --bg-nav: #0f2338;
  --bg-nav-2: #122a43;
  --text: #1f2937;
  --text-soft: #5b6778;
  --primary: #21c7be;
  --primary-strong: #13a89f;
  --line: #d9e2ef;
  --line-strong: #c9d5e6;
  --success: #0f9f6e;
  --danger: #e84b5d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f5f8fc 0%, #edf2f8 100%);
}

.container { width: min(1320px, 94%); margin: 0 auto; }

/* Header + menu escuros */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-nav);
  border-bottom: 1px solid #1c3a5b;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: #e8f2ff;
}

.topbar strong { font-size: 1.9rem; letter-spacing: .2px; }

.badge {
  font-size: .75rem;
  border: 1px solid #2f527a;
  color: #c7dbf5;
  border-radius: 999px;
  padding: 4px 10px;
}

.menubar {
  background: var(--bg-nav-2);
  border-bottom: 1px solid #23466c;
}

.menubar-inner {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 10px 0 14px;
}

.menu-pill {
  background: #143353;
  border: 1px solid #2a547d;
  color: #d8e8fb;
  border-radius: 14px;
  padding: 10px 18px;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
}

.menu-pill.active {
  background: linear-gradient(90deg, var(--primary), #58d8ee);
  color: #052d2b;
  border-color: transparent;
}

/* Área principal clara */
main.container { padding-bottom: 26px; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17, 30, 45, 0.06);
}

.section { padding: 18px; }
.section h2 { margin: 0 0 8px; font-size: 2rem; }
.section p { margin: 0 0 14px; color: var(--text-soft); }

.grid { display: grid; gap: 14px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 14px 0; }
.cols-2 { grid-template-columns: 1.1fr 1fr; }
.row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.hidden { display: none; }
.tab-panel { margin-top: 10px; }

.kpi { padding: 16px; background: var(--bg-surface-2); }
.kpi h3 { margin: 0 0 8px; color: #556273; font-size: .95rem; font-weight: 600; }
.kpi p { margin: 0; font-size: 2rem; font-weight: 700; color: #14263c; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #24364c;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #1b2b40;
  border-radius: 12px;
  padding: 11px 12px;
  min-height: 44px; /* heurística: alvo de toque confortável */
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #72b2ff;
  box-shadow: 0 0 0 3px rgba(62, 148, 255, .18);
}

button {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #0f2338;
  color: #e8f2ff;
  border: 1px solid #2f527a;
}

button:not(.secondary) {
  background: linear-gradient(90deg, #2e72f0, #1ba5e2);
  color: #fff;
}

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  background: #fbfcff;
}

.flash { margin-top: 8px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.flash.ok { border: 1px solid #77d8b3; background: #eaf9f2; color: #0e7b55; }
.flash.err { border: 1px solid #f1a6b0; background: #fff1f3; color: #b42334; }

footer {
  text-align: center;
  color: #556273;
  font-size: .95rem;
  padding: 18px 0 30px;
}

/* Login mantém referência visual */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 15% 100%, #10b3f74a 0%, transparent 34%), linear-gradient(90deg, #050d23 0%, #081a40 64%, #07132f 100%);
}
.auth-card { width: min(520px, 94vw); padding: 34px; background: rgba(13, 27, 58, .94); border: 1px solid #284f7a; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.logo-block { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 10px; }
.logo-globe { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #46d85b; box-shadow: inset 0 0 0 2px #46d85b44; }
.logo-title { margin: 0; font-size: 2rem; letter-spacing: .8px; color: #e9f2ff; }
.logo-sub { margin: 0; color: #b8c6eb; letter-spacing: 1px; }
.subtitle { color: #9fb3d5; margin: 0 0 20px; }
.center { text-align: center; }
.auth-footer { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; color: #a8bbd8; }
.auth-footer a { color: #d7e5ff; text-decoration: none; }
.btn-gradient { width: 100%; background: linear-gradient(90deg, #2c67e8, #17b5e5); font-size: 1.05rem; }

@media (max-width: 980px) { .cols-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .section h2 { font-size: 1.5rem; }
  .topbar strong { font-size: 1.4rem; }
}
