:root {
  --bg: #0b0f14;
  --card: #121a24;
  --border: #1e2a3a;
  --text: #e8eef7;
  --muted: #8fa3bf;
  --accent: #22c55e;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
.layout { display: flex; height: 100%; min-height: 0; overflow: hidden; }
nav { width: 220px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border); padding: 1.25rem; align-self: stretch; height: 100%; overflow-y: auto; }
nav h1 { font-size: 1.1rem; margin: 0 0 1rem; color: var(--accent); }
nav a { display: block; color: var(--muted); text-decoration: none; padding: 0.55rem 0.75rem; border-radius: 8px; margin-bottom: 0.25rem; }
nav a.active, nav a:hover { background: #1a2636; color: var(--text); }
nav a.nav-logout { margin-top: 1rem; color: #94a3b8; font-size: 0.88rem; }
nav a.nav-logout:hover { color: #fca5a5; }
main { flex: 1; min-width: 0; min-height: 0; padding: 0.65rem 0.5rem; overflow: hidden; display: flex; flex-direction: column; }
.panel { display: none; }
.panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
.panel-scroll.active { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.panel-cotacao.active { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; flex: 1; min-height: 0; overflow: hidden; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.card .label { color: var(--muted); font-size: 0.8rem; }
.card .value { font-size: 1.35rem; font-weight: 600; margin-top: 0.35rem; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.positive { color: var(--accent); }
.negative { color: #ef4444; }
form { display: grid; gap: 0.75rem; max-width: 420px; }
input, select, button { padding: 0.65rem 0.8rem; border-radius: 8px; border: 1px solid var(--border); background: #0f1520; color: var(--text); }
button { background: var(--accent); color: #041008; border: none; font-weight: 600; cursor: pointer; }
button.secondary { background: #1e2a3a; color: var(--text); }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 2rem; text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.15s, opacity 0.15s; }
.dropzone.drag { border-color: var(--accent); color: var(--text); }
.dropzone.loading { cursor: wait; border-color: var(--accent); color: var(--text); opacity: 0.92; pointer-events: none; }
.dropzone .dz-busy { display: flex; flex-direction: column; align-items: center; gap: 0.65rem; font-size: 0.9rem; }
.import-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: import-spin 0.75s linear infinite;
}
@keyframes import-spin { to { transform: rotate(360deg); } }
.msg { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }
h2 { margin: 0 0 1rem; font-size: 1.25rem; }