/* hub.css — sistema visual único do Hub Lisfer.
   Todas as páginas carregam este arquivo; o <style> de cada página só
   guarda o que é específico daquela tela, sempre usando os tokens abaixo. */

/* ============================================================
   Tokens
   ============================================================ */
:root {
  /* marca */
  --brand: #F5AD00;
  --brand-hover: #E09E00;
  --brand-ink: #1F1500;            /* texto sobre o amarelo */
  --brand-soft: #FFF5DB;
  --brand-text: #8A5A00;           /* "amarelo" legível sobre branco */

  /* tinta (preto Lisfer) */
  --ink: #111315;
  --ink-2: #1B1E21;
  --ink-3: #272B30;
  --ink-line: rgba(255, 255, 255, 0.08);
  --ink-text: #E6E8EA;
  --ink-muted: #9AA1A8;

  /* superfícies */
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F7F8F9;
  --surface-3: #EEF0F3;
  --border: #E1E4E8;
  --border-strong: #C9CED4;

  /* texto */
  --text: #14181C;
  --text-2: #49525C;
  --text-3: #646D77;

  /* estados */
  --success: #1B7A3A;
  --success-soft: #E2F2E7;
  --danger: #C2262E;
  --danger-hover: #A91F26;
  --danger-soft: #FCE9EA;
  --info: #1E5BC6;
  --info-soft: #E4ECFB;
  --warning-text: #8A5A00;
  --warning-soft: #FFF5DB;

  /* forma */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(17, 19, 21, 0.05);
  --shadow-sm: 0 1px 2px rgba(17, 19, 21, 0.05), 0 2px 6px rgba(17, 19, 21, 0.04);
  --shadow-md: 0 2px 4px rgba(17, 19, 21, 0.05), 0 8px 20px rgba(17, 19, 21, 0.08);
  --shadow-lg: 0 8px 16px rgba(17, 19, 21, 0.08), 0 20px 40px rgba(17, 19, 21, 0.12);

  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);

  /* tipografia */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-display: "Archivo", var(--font-sans);

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 24px;

  /* espaço (base 4) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;

  --sidebar-w: 240px;
  --content-max: 1240px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; color: var(--text); }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

::selection { background: var(--brand); color: var(--brand-ink); }
input, textarea { caret-color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* campos já têm o próprio destaque de foco (borda + halo) */
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.tabular, td, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.93em; }
.muted { color: var(--text-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================================
   App shell: menu lateral + área de conteúdo
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.app-sidebar {
  position: sticky; top: 0; align-self: flex-start;
  width: var(--sidebar-w); flex: none; height: 100vh;
  background: var(--ink); color: var(--ink-text);
  display: flex; flex-direction: column;
  border-right: 1px solid #000;
}

.sb-brand {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 22px 20px 18px; text-decoration: none;
}
.sb-brand img { height: 30px; width: auto; }
.sb-brand .sb-product {
  font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-muted);
  letter-spacing: 0.04em; padding: 2px 7px; border: 1px solid var(--ink-line); border-radius: var(--r-xs);
  white-space: nowrap;
}

.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.sb-group { margin-top: 18px; }
.sb-group:first-child { margin-top: 4px; }
.sb-group-title {
  font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-muted);
  padding: 0 10px 6px;
}

.sb-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: var(--r-md);
  color: var(--ink-text); text-decoration: none; font-size: var(--fs-base); font-weight: 500;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.sb-link svg { width: 18px; height: 18px; flex: none; color: var(--ink-muted); transition: color var(--t-fast) ease; }
.sb-link:hover { background: var(--ink-2); }
.sb-link:hover svg { color: var(--ink-text); }
.sb-link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sb-link[aria-current="page"] { background: var(--ink-3); color: #FFFFFF; font-weight: 600; }
.sb-link[aria-current="page"] svg { color: var(--brand); }
.sb-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.sb-sub { margin: 2px 0 4px 19px; padding-left: 9px; border-left: 1px solid var(--ink-line); }
.sb-sub .sb-link { height: 32px; font-size: var(--fs-sm); color: var(--ink-muted); }
.sb-sub .sb-link:hover { color: var(--ink-text); }
.sb-sub .sb-link[aria-current="page"] { color: #FFFFFF; }
.sb-sub .sb-link[aria-current="page"]::before { left: -22px; }

.sb-link.is-soon { color: var(--ink-muted); cursor: default; }
.sb-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-link.is-soon:hover { background: transparent; }
.sb-link.is-soon svg { color: #5E656C; }

.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--ink-line);
}
.sb-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  font-size: var(--fs-sm); font-weight: 700;
}
.sb-user-name { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-mail { display: block; font-size: var(--fs-2xs); font-weight: 400; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
.sb-logout {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--r-md); border: 0; background: transparent; color: var(--ink-muted);
}
.sb-logout:hover { background: var(--ink-2); color: #FFFFFF; }
.sb-logout:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sb-logout svg { width: 18px; height: 18px; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* barra superior só no modo compacto (telas estreitas) */
.app-topbar {
  display: none; position: sticky; top: 0; z-index: 30;
  height: 56px; padding: 0 12px 0 8px; align-items: center; gap: 8px;
  background: var(--ink); color: #FFFFFF;
}
.app-topbar img { height: 24px; width: auto; }
.app-menu-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-md);
  background: transparent; color: #FFFFFF;
}
.app-menu-btn:hover { background: var(--ink-2); }
.app-menu-btn:focus-visible, .sb-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.app-menu-btn svg { width: 22px; height: 22px; }
.app-scrim { display: none; }

/* ============================================================
   Cabeçalho de página
   ============================================================ */
.page { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 28px 32px 56px; }
.page-narrow { max-width: 820px; }

.page-header {
  display: flex; align-items: flex-end; gap: var(--s-4) var(--s-6); flex-wrap: wrap;
  margin-bottom: var(--s-6);
}
.page-header-text { flex: 1 1 320px; min-width: 0; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--text-3); margin-bottom: 6px;
}
.breadcrumb a { color: var(--text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb svg { width: 14px; height: 14px; color: var(--border-strong); }
.page-title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.01em; }
.page-desc { margin-top: 4px; font-size: var(--fs-md); color: var(--text-2); max-width: 68ch; }
.page-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

.stack { display: flex; flex-direction: column; gap: var(--s-6); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-3); }
.cluster { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* ============================================================
   Painel (o único container de conteúdo)
   ============================================================ */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.panel-head {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { font-size: var(--fs-md); font-weight: 600; }
.panel-head .panel-sub { font-size: var(--fs-sm); color: var(--text-3); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px; }
.panel-foot {
  display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.count-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ============================================================
   Botões
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid transparent; font-size: var(--fs-base); font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none; user-select: none;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.5; }

.btn-primary { background: var(--ink); color: #FFFFFF; box-shadow: var(--shadow-xs); }
.btn-primary:hover:not(:disabled) { background: #000000; }
.btn-primary:active:not(:disabled) { background: var(--ink-3); }

.btn-brand { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-xs); }
.btn-brand:hover:not(:disabled) { background: var(--brand-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--text-3); }
.btn-secondary:active:not(:disabled) { background: var(--surface-3); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }

.btn-danger { background: var(--danger); color: #FFFFFF; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn-sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); border-radius: var(--r-sm); gap: 6px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: var(--fs-md); }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: var(--r-md); border: 1px solid transparent; background: transparent; color: var(--text-3);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.is-confirming { background: var(--danger); color: #FFFFFF; width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 600; }
.icon-btn.is-confirming:hover { background: var(--danger-hover); color: #FFFFFF; }

.link-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none;
  color: var(--text); font-size: var(--fs-sm); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn svg { width: 14px; height: 14px; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; opacity: 0.85;
  animation: hub-spin 0.7s linear infinite;
}
@keyframes hub-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Formulários
   ============================================================ */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; }
.col-12 { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label {
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-2);
}
.field .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: var(--fs-xs); color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-size: var(--fs-base);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.textarea { height: auto; min-height: 72px; padding: 9px 12px; line-height: 1.45; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #8C949C; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 19, 21, 0.12);
}
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input.mono { font-family: var(--font-mono); font-size: var(--fs-sm); }
.input.mono::placeholder { font-family: var(--font-sans); font-size: var(--fs-base); }

.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646D77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
input[type="date"].input { padding-right: 8px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }

.input-group { display: flex; min-width: 0; }
.input-group > .input { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }

.segmented {
  display: inline-flex; flex: none; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--r-md);
}
.segmented button {
  height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2); font-size: var(--fs-sm); font-weight: 600;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.input-group > .segmented { border-radius: var(--r-md) 0 0 var(--r-md); border: 1px solid var(--border-strong); padding: 2px; }
.input-group > .segmented button { height: 32px; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text); }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

.form-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.form-error { font-size: var(--fs-sm); font-weight: 500; color: var(--danger); }
.form-error:empty, .form-success:empty { display: none; }
.form-success { font-size: var(--fs-sm); font-weight: 500; color: var(--success); }

/* ============================================================
   Selos de status
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge svg { width: 13px; height: 13px; flex: none; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge-ink { background: var(--ink); color: #FFFFFF; }
.badge-pending { background: var(--warning-soft); color: var(--warning-text); }
.badge-pending .dot { background: var(--brand); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }

/* ============================================================
   Tabela de dados
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 600; font-size: var(--fs-xs); color: var(--text-3);
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.table .mono { color: var(--text-2); }
.table-compact td { padding: 7px 14px; }

/* ============================================================
   Avisos, vazio, carregando
   ============================================================ */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); line-height: 1.45;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert strong { font-weight: 600; }
.alert-danger { background: var(--danger-soft); border-color: #F3C4C7; color: #8E1B21; }
.alert-warning { background: var(--warning-soft); border-color: #F2DC9F; color: #6B4600; }
.alert-info { background: var(--info-soft); border-color: #C2D4F5; color: #17469A; }

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 36px 20px; color: var(--text-3);
}
.empty svg { width: 28px; height: 28px; color: var(--border-strong); margin-bottom: 4px; }
.empty-title { font-size: var(--fs-base); font-weight: 600; color: var(--text-2); }
.empty-text { font-size: var(--fs-sm); max-width: 44ch; }

.skeleton {
  display: block; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%);
  background-size: 200% 100%; animation: hub-shimmer 1.2s ease-in-out infinite;
}
@keyframes hub-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skeleton-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.skeleton-row:last-child { border-bottom: 0; }

/* ============================================================
   Upload de arquivo
   ============================================================ */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 32px 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--text-3); cursor: pointer;
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--surface); }
.dropzone:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dropzone svg { width: 28px; height: 28px; color: var(--text-3); margin-bottom: 4px; }
.dropzone-title { font-size: var(--fs-base); color: var(--text); }
.dropzone-title strong { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dropzone-text { font-size: var(--fs-sm); }
.dropzone input[type="file"] { display: none; }

.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm);
}
.file-item svg { width: 18px; height: 18px; flex: none; color: var(--danger); }
.file-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-item .size { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ============================================================
   Notificação (toast)
   ============================================================ */
.toast-region {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--ink); color: #FFFFFF; box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); font-weight: 500; pointer-events: auto;
  animation: hub-toast-in var(--t-base) var(--ease-out);
}
.toast svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.toast.is-error svg { color: #FF8A8F; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity var(--t-base) ease, transform var(--t-base) ease; }
@keyframes hub-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 1100px) {
  .form-grid .col-2 { grid-column: span 3; }
  .form-grid .col-3 { grid-column: span 4; }
  .form-grid .col-4 { grid-column: span 6; }
  .form-grid .col-5 { grid-column: span 6; }
}

@media (max-width: 900px) {
  .app { display: block; }
  .app-topbar { display: flex; }
  .app-sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; height: 100vh; height: 100dvh;
    transform: translateX(-100%); transition: transform var(--t-base) var(--ease-out);
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .app-sidebar { transform: none; }
  .app.nav-open .app-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(17, 19, 21, 0.45); }
  .page { padding: 20px 16px 48px; }
  .page-title { font-size: var(--fs-xl); }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid > * { grid-column: 1 / -1 !important; }
  .form-grid > .col-half { grid-column: span 1 !important; }
  .panel-body { padding: 16px; }
  .panel-head, .panel-foot { padding: 12px 16px; }
  .toast-region { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- cores de apoio (listas do quadro e pessoas) ----------
   Só para separar e reconhecer de relance; a cor nunca substitui o texto. */
/* --k = cor forte (faixa, ponto, avatar), --k-on = texto sobre ela, --k-soft = fundo claro, --k-text = texto sobre o fundo claro */
.k-cinza    { --k: #6B7480; --k-soft: #E6E9ED; --k-text: #3E464F; --k-on: #FFFFFF; }
.k-amarelo  { --k: var(--brand); --k-soft: var(--brand-soft); --k-text: var(--brand-text); --k-on: var(--brand-ink); }
.k-azul     { --k: #2563D9; --k-soft: #E4ECFB; --k-text: #1A4FAF; --k-on: #FFFFFF; }
.k-roxo     { --k: #7048D1; --k-soft: #EEE9FB; --k-text: #5634A8; --k-on: #FFFFFF; }
.k-turquesa { --k: #0E8584; --k-soft: #DCF2F1; --k-text: #0A6564; --k-on: #FFFFFF; }
.k-laranja  { --k: #D9620F; --k-soft: #FDEBDD; --k-text: #A54809; --k-on: #FFFFFF; }
.k-rosa     { --k: #C2387A; --k-soft: #FBE6EF; --k-text: #9C2860; --k-on: #FFFFFF; }
.k-verde    { --k: #1F8A43; --k-soft: #E2F2E7; --k-text: var(--success); --k-on: #FFFFFF; }

.av-k {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--k, var(--brand)); color: var(--k-on, var(--brand-ink));
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.02em;
}

/* conta do Mercado Livre (Full): ponto + nome na cor da conta */
.full-conta { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 7px; border-radius: var(--r-pill); background: var(--k-soft); color: var(--k-text); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.full-conta-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); flex: none; }
