:root {
  --brass: #C6A15B;
  --positive: #7FB68C;
  --negative: #C9694F;
  --ink: #14201D;
  --surface: #1C2B27;
  --surface2: #233530;
  --line: rgba(241, 237, 226, 0.10);
  --paper: #F1EDE4;
  --muted: #8FA39A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; margin: 0; }

a { color: inherit; text-decoration: none; }

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

.sidebar {
  width: 226px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; color: var(--brass); font-size: 14px; font-weight: 600;
}
.brand-mark.large { width: 56px; height: 56px; font-size: 20px; margin: 0 auto 14px; }

.brand-label { font-family: 'Fraunces', serif; font-size: 14px; line-height: 1.25; }

.empresa-box {
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.empresa-label { font-size: 10.5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }

select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date] {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--paper);
  padding: 7px 8px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  width: 100%;
  outline: none;
}

.nav { flex: 1; }
.nav-item {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  margin-bottom: 3px;
  font-size: 13px;
  color: var(--muted);
}
.nav-item:hover { background: var(--surface); }
.nav-item.active { background: var(--surface2); color: var(--brass); font-weight: 500; }

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 12px;
}
.usuario-nome { color: var(--paper); margin-bottom: 6px; font-weight: 500; }
.sidebar-footer a { display: block; color: var(--muted); padding: 3px 0; }
.sidebar-footer a:hover { color: var(--brass); }

.conteudo { flex: 1; padding: 26px 30px; min-width: 0; }

.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title h1 { font-size: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.muted { color: var(--muted); }

.form-vertical { display: flex; flex-direction: column; gap: 12px; }
.form-vertical label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }

button, .btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--brass);
  color: var(--ink);
}
button:hover { opacity: 0.92; }

.aviso { font-size: 13px; color: var(--brass); margin-bottom: 10px; }
.erro { font-size: 13px; color: var(--negative); margin-bottom: 10px; }

/* Tela de login */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px 34px;
  width: 320px;
  display: flex; flex-direction: column; gap: 14px;
  text-align: center;
}
.login-card h1 { font-size: 18px; margin-bottom: 8px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); text-align: left; }

/* Telas internas: formulários, tabelas, listas de configuração */
details.card summary {
  cursor: pointer;
  font-family: 'Fraunces', serif;
  font-size: 15px;
  list-style: none;
}
details.card summary::-webkit-details-marker { display: none; }
details.card summary::before { content: '+ '; color: var(--brass); }
details.card[open] summary::before { content: '− '; }
details.card[open] summary { margin-bottom: 14px; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}
.grid-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.form-actions { margin-top: 12px; grid-column: 1 / -1; }

.tabela-scroll { overflow-x: auto; }
.tabela-simples { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela-simples th { text-align: left; color: var(--muted); font-size: 11.5px; border-bottom: 1px solid var(--line); padding: 0 8px 10px; }
.tabela-simples td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

.link-danger, .link-brass, .link-muted {
  background: none; border: none; padding: 2px 6px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.link-danger { color: var(--negative); }
.link-brass { color: var(--brass); }
.link-muted { color: var(--muted); }

.subtitulo { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.bloco-empresa { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bloco-empresa-nome { font-size: 13px; font-weight: 500; color: var(--brass); margin-bottom: 8px; }
.linha-banco { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.linha-banco input[type=text] { flex: 1; }
.linha-banco input[type=number] { width: 110px; }
.linha-banco-nome { flex: 1; font-size: 13px; }
