/* ===== ETIQUETAS-WEB — design tokens, reset e tipografia ===== */
:root {
  /* paleta clara */
  --bg: #f4f6fb;
  --bg-elev: #ffffff;
  --bg-sunken: #eceff6;
  --bg-hover: #f0f3fa;
  --border: #dfe4ee;
  --border-strong: #c7cfdd;
  --text: #16203a;
  --text-2: #4a5570;
  --text-3: #7b869e;
  --primary: #1d4ed8;
  --primary-2: #1e40af;
  --primary-soft: #e4ecff;
  --primary-text: #ffffff;
  --accent: #0e9f6e;
  --accent-soft: #dcf5ea;
  --warn: #d97706;
  --warn-soft: #fdf1dc;
  --danger: #dc2626;
  --danger-soft: #fde8e8;
  --info: #0369a1;
  --info-soft: #e0f2fe;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #ffffff;
  --sidebar-active: rgba(255, 255, 255, 0.10);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.10);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, 0.14);
  --shadow-3: 0 24px 48px rgba(16, 24, 40, 0.22);
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "Courier New", monospace;
  --grid-info: #fff8dc; /* colunas de consulta (legado clInfoBk) */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 68px;
  --header-h: 58px;
  --focus: 0 0 0 3px rgba(29, 78, 216, 0.28);
  --t-fast: 120ms cubic-bezier(.2, .8, .2, 1);
  --t-med: 220ms cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elev: #111a2d;
  --bg-sunken: #0e1626;
  --bg-hover: #172238;
  --border: #223050;
  --border-strong: #2f4166;
  --text: #e6ebf5;
  --text-2: #aab6cc;
  --text-3: #7d8aa5;
  --primary: #3b82f6;
  --primary-2: #60a5fa;
  --primary-soft: #16294f;
  --primary-text: #ffffff;
  --accent: #34d399;
  --accent-soft: #0f2f26;
  --warn: #fbbf24;
  --warn-soft: #3a2a08;
  --danger: #f87171;
  --danger-soft: #3f1515;
  --info: #7dd3fc;
  --info-soft: #0b2a3a;
  --sidebar-bg: #070d19;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-active: rgba(255, 255, 255, 0.10);
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 24px 48px rgba(0, 0, 0, 0.7);
  --grid-info: #1b2436;
  --focus: 0 0 0 3px rgba(96, 165, 250, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 8px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--primary-soft); }
img { max-width: 100%; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-2 { gap: 12px; } .gap-3 { gap: 16px; } .gap-4 { gap: 24px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.w-100 { width: 100%; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* boot */
.boot { height: 100vh; display: grid; place-content: center; gap: 14px; justify-items: center; color: var(--text-2); }
.boot-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); box-shadow: var(--shadow-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.92); opacity: 0.75; } }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* scrollbars discretos */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
