:root {
  --oeste-escuro: #212121;
  --oeste-azul: #0a355f;
  --oeste-ciano: #008faf;
  --oeste-ciano-escuro: #00809d;
  --oeste-claro: #e7e7e7;
  --branco: #ffffff;
  --vermelho: #b3261e;
  --verde: #1e7d3c;
  --amarelo: #b07a05;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--oeste-claro);
  color: var(--oeste-escuro);
}

a {
  color: inherit;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--oeste-azul);
  color: var(--branco);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -1px;
}

.sidebar .brand img {
  width: 32px;
  height: 32px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar nav a {
  text-decoration: none;
  color: var(--oeste-claro);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--oeste-ciano-escuro);
  color: var(--branco);
}

.sidebar .user {
  margin-top: auto;
  font-size: 13px;
  opacity: 0.85;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 16px;
}

.sidebar .user a {
  color: var(--oeste-claro);
}

.main {
  flex: 1;
  padding: 32px;
  max-width: 1100px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}

.card {
  background: var(--branco);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--branco);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card .label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 30px;
  font-weight: 900;
  color: var(--oeste-azul);
  margin-top: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

th {
  color: #666;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

tr:hover {
  background: #fafafa;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  background: var(--oeste-azul);
  color: var(--branco);
}

.btn:hover {
  background: var(--oeste-ciano-escuro);
}

.btn.secundario {
  background: var(--oeste-claro);
  color: var(--oeste-escuro);
}

.btn.perigo {
  background: var(--vermelho);
}

.btn.sucesso {
  background: var(--verde);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.pendente { background: #eee; color: #555; }
.badge.aguardando_aprovacao { background: #fff3cd; color: var(--amarelo); }
.badge.aprovada { background: #d7f0dd; color: var(--verde); }
.badge.recusada { background: #fbdada; color: var(--vermelho); }
.badge.conciliada { background: #d6ecf3; color: var(--oeste-azul); }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--oeste-azul);
}

.login-box {
  background: var(--branco);
  padding: 40px;
  border-radius: 16px;
  width: 340px;
  text-align: center;
}

.login-logo {
  width: 220px;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(10, 53, 95, 0.25);
  margin-bottom: 28px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.erro {
  color: var(--vermelho);
  font-size: 13px;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.section-title {
  font-weight: 800;
  font-size: 15px;
  margin: 24px 0 12px;
}

.muted {
  color: #777;
  font-size: 13px;
}
