/* =========================================================================
   painel.sfind.app — folha de estilo unica (sem framework, sem build)
   Ordem: tokens → reset → layout → componentes → tabela → responsivo
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  color-scheme: light;

  --bg:            #f6f7f9;
  --surface:       #ffffff;
  --surface-2:     #fbfbfc;
  --surface-hover: #f3f4f6;
  --border:        #e3e6ea;
  --border-strong: #cfd4da;

  --text:          #15181d;
  --text-soft:     #5b6472;
  --text-faint:    #8b95a3;

  --accent:        #16a34a;
  --accent-soft:   #dcfce7;
  --accent-text:   #14532d;

  --red:    #dc2626;  --red-soft:    #fee2e2;  --red-text:    #7f1d1d;
  --green:  #16a34a;  --green-soft:  #dcfce7;  --green-text:  #14532d;
  --amber:  #d97706;  --amber-soft:  #fef3c7;  --amber-text:  #78350f;
  --blue:   #2563eb;  --blue-soft:   #dbeafe;  --blue-text:   #1e3a8a;
  --slate:  #64748b;  --slate-soft:  #e2e8f0;  --slate-text:  #1e293b;

  --radius:    10px;
  --radius-sm: 7px;
  --shadow:    0 1px 2px rgb(15 23 42 / 6%), 0 1px 3px rgb(15 23 42 / 4%);
  --shadow-lg: 0 10px 30px rgb(15 23 42 / 12%);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell-max: 1400px;
}

html[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] { color-scheme: dark; }
}

/* Paleta escura: aplicada no modo manual (data-theme="dark") e, mais abaixo,
   tambem no modo automatico quando o sistema esta em dark. */
html[data-theme="dark"] {
  --bg:            #0e1116;
  --surface:       #161a21;
  --surface-2:     #1b2029;
  --surface-hover: #212733;
  --border:        #262d38;
  --border-strong: #38414f;

  --text:          #e8ecf1;
  --text-soft:     #9aa5b4;
  --text-faint:    #6b7686;

  --accent-soft:   #052e16;
  --accent-text:   #86efac;

  --red-soft:    #3f1414;  --red-text:    #fca5a5;
  --green-soft:  #052e16;  --green-text:  #86efac;
  --amber-soft:  #3b2606;  --amber-text:  #fcd34d;
  --blue-soft:   #10214a;  --blue-text:   #93c5fd;
  --slate-soft:  #232a35;  --slate-text:  #cbd5e1;

  --shadow:    0 1px 2px rgb(0 0 0 / 40%);
  --shadow-lg: 0 10px 30px rgb(0 0 0 / 50%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg:            #0e1116;
    --surface:       #161a21;
    --surface-2:     #1b2029;
    --surface-hover: #212733;
    --border:        #262d38;
    --border-strong: #38414f;

    --text:          #e8ecf1;
    --text-soft:     #9aa5b4;
    --text-faint:    #6b7686;

    --accent-soft:   #052e16;
    --accent-text:   #86efac;

    --red-soft:    #3f1414;  --red-text:    #fca5a5;
    --green-soft:  #052e16;  --green-text:  #86efac;
    --amber-soft:  #3b2606;  --amber-text:  #fcd34d;
    --blue-soft:   #10214a;  --blue-text:   #93c5fd;
    --slate-soft:  #232a35;  --slate-text:  #cbd5e1;

    --shadow:    0 1px 2px rgb(0 0 0 / 40%);
    --shadow-lg: 0 10px 30px rgb(0 0 0 / 50%);
  }
}

/* Resolve o par cor/fundo do acento declarado via data-accent. */
[data-accent="red"]   { --accent: var(--red);   --accent-soft: var(--red-soft);   --accent-text: var(--red-text); }
[data-accent="green"] { --accent: var(--green); --accent-soft: var(--green-soft); --accent-text: var(--green-text); }
[data-accent="amber"] { --accent: var(--amber); --accent-soft: var(--amber-soft); --accent-text: var(--amber-text); }
[data-accent="blue"]  { --accent: var(--blue);  --accent-soft: var(--blue-soft);  --accent-text: var(--blue-text); }
[data-accent="slate"] { --accent: var(--slate); --accent-soft: var(--slate-soft); --accent-text: var(--slate-text); }

/* ---------- 2. Reset ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select { font: inherit; color: inherit; }

h1 { font-size: 1.125rem; margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Layout ---------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--green), #0d7a37);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%);
}

.shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 8px 20px 32px;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- 4. Componentes ---------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab, .btn, .icon-btn, .page { -webkit-tap-highlight-color: transparent; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 550;
  transition: background .12s, border-color .12s, color .12s;
}
.tab:hover { background: var(--surface-hover); color: var(--text); }
.tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent-text);
}

.tab__count {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* Caixa de entrada com links a triar: o contador vira um marcador de aviso. */
.tab.has-pending .tab__count {
  background: var(--amber);
  color: #fff;
  font-weight: 650;
}
.tab.has-pending:not(.is-active) { color: var(--text); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.toolbar--tight { margin: 0 0 4px; }

.field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 36px;
  transition: border-color .12s, box-shadow .12s;
}
.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field__icon { color: var(--text-faint); flex: none; }
.field__label { color: var(--text-soft); font-size: 12px; white-space: nowrap; }

.field--search { flex: 1 1 260px; min-width: 200px; }
.field--search input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  min-width: 0;
}
.field--select select {
  border: 0;
  outline: none;
  font-variant-numeric: tabular-nums;
  cursor: pointer;

  /* O popup do <select> e desenhado pelo sistema operacional. Com
     `background: none` o navegador assume o tema claro e pinta a lista de
     branco -- com o texto claro do painel por cima, ficava ilegivel.
     Declarar cor e fundo explicitamente (no select E nas options) resolve em
     Chrome, Edge e Firefox. */
  color-scheme: inherit;
  background-color: var(--surface);
  color: var(--text);
}

.field--select select option {
  background-color: var(--surface);
  color: var(--text);
}

.field--select select option:checked {
  background-color: var(--accent-soft);
  color: var(--accent-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-hover); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green);
  border-color: transparent;
  color: #fff;
}
.btn--primary:hover { background: #128a3f; }

.btn--ghost { background: none; border-color: transparent; color: var(--text-soft); }
.btn--ghost:hover { background: var(--surface-hover); color: var(--text); }

.btn--soft {
  height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
  background: var(--surface-2);
  color: var(--text-soft);
}
.btn--soft:hover { background: var(--surface-hover); color: var(--text); }
.btn--soft.is-done {
  background: var(--green-soft);
  border-color: transparent;
  color: var(--green-text);
}
.btn--soft[disabled] { opacity: .5; cursor: default; }

.btn--chip {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-text);
}
.btn--chip:hover { filter: brightness(0.96); background: var(--accent-soft); }

/* Botao visivel porem bloqueado: quem nao tem permissao ve o que existe e
   entende que existe, sem poder acionar. O `disabled` e so a camada visual --
   a permissao e conferida no servidor. */
.btn--chip.is-locked,
.btn--chip[disabled] {
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  color: var(--text-faint);
  cursor: not-allowed;
  opacity: .75;
  filter: none;
}
.btn--chip.is-locked:hover,
.btn--chip[disabled]:hover {
  background: var(--surface-2);
  filter: none;
}
.btn--chip.is-locked:active,
.btn--chip[disabled]:active { transform: none; }

.btn--danger {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
}
.btn--danger:hover {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red-text);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.icon-btn--sm { width: 24px; height: 24px; border-color: transparent; background: none; flex: none; }
.icon-btn--sm:hover { background: var(--surface-hover); }
.icon-btn.is-done { color: var(--green); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.flash {
  margin: 0;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.flash--muted {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-soft);
}

/* ---------- Cabecalho: quem esta logado --------------------------------- */

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whoami {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

.whoami__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.whoami__text { display: flex; flex-direction: column; line-height: 1.15; }
.whoami__name { font-size: 12.5px; font-weight: 600; }
.whoami__role { font-size: 10.5px; color: var(--text-faint); }

/* ---------- Tela de login ------------------------------------------------ */

.login {
  display: flex;
  justify-content: center;
  padding: 6vh 0 0;
}

.login__card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
}

.login__head { text-align: center; margin-bottom: 8px; }

.brand__mark--lg {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  margin-bottom: 12px;
}

.login__title { font-size: 1.3rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.login__sub { margin: 0; color: var(--text-soft); font-size: 13px; }

.login__alert {
  margin: 0 0 4px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  text-align: center;
}
.login__alert--error {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red-text);
}

.field--login {
  height: 42px;
  background: var(--surface-2);
}
.field--login input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
}

.login__go {
  height: 42px;
  margin-top: 4px;
  font-size: 14.5px;
}

@media (max-width: 560px) {
  .login { padding-top: 4vh; }
  .login__card { padding: 22px 18px 18px; }
  .whoami__text { display: none; }
  .whoami { padding: 3px; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.panel__head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.panel__title {
  position: relative;
  padding-left: 12px;
}
.panel__title::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.panel__meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.empty { padding: 48px 20px; text-align: center; }
.empty__title { margin: 0 0 4px; font-weight: 600; }
.empty__hint { margin: 0; color: var(--text-soft); font-size: 13px; }

.erro { padding: 20px; max-width: 760px; margin-inline: auto; }
.erro__intro { margin: 0 0 12px; color: var(--text-soft); font-size: 13.5px; }
.erro__lista { margin: 0; padding-left: 20px; display: grid; gap: 14px; font-size: 13.5px; }
.erro__lista li { line-height: 1.55; }
.erro__lista strong { display: block; margin-bottom: 4px; }
.erro__lista .trace { margin: 8px 0 0; }
.erro__dica {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}
.erro code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.erro__lista .trace code, .erro__dica code { background: transparent; border: 0; padding: 0; }

.trace {
  margin: 20px auto 0;
  max-width: 900px;
  text-align: left;
  font: 12px/1.5 var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow: auto;
}

/* ---------- 5. Tabela ---------------------------------------------------- */

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr.is-leaving { opacity: .35; }

/* `width: 1%` faz a celula encolher ate o conteudo: a largura que sobra vai
   toda para a coluna "Grupo", que e a que tem texto de tamanho variavel.
   Sem isso, desligar a coluna "Data" deixava um vazio entre link e grupo. */
.col-id      { width: 1%; color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.col-date    { width: 1%; color: var(--text-soft); font-size: 12px; white-space: nowrap; }
.col-link    { width: 1%; max-width: 360px; }
.col-name    { width: auto; min-width: 180px; }
.col-actions { width: 1%; white-space: nowrap; }

.linkcell { display: flex; align-items: center; gap: 4px; min-width: 0; }
.linkcell__url {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--blue);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkcell__url:hover { text-decoration: underline; }
.linkcell__url--plain { color: var(--text-soft); }

.actions { display: flex; gap: 4px; margin: 0; }

/* ---------- 6. Cards da pagina publica ---------------------------------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card__name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.card__cta {
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.card__cta:hover { filter: brightness(.96); }
.card__cta--plain {
  background: none;
  color: var(--text-soft);
  font-family: var(--mono);
  font-weight: 400;
  overflow-wrap: anywhere;
}

/* ---------- 7. Paginacao ------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.page {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.page:hover { background: var(--surface-hover); color: var(--text); }
.page.is-current {
  background: var(--green);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.page.is-disabled { opacity: .4; pointer-events: none; }
.page--gap { border-color: transparent; background: none; pointer-events: none; }

/* ---------- 8. Toast ----------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #10151d;
  color: #f4f6f8;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  opacity: 0;
  transition: opacity .18s, transform .18s;
  z-index: 60;
  max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--red); }

/* ---------- 9. Responsivo ------------------------------------------------
   Quatro faixas:
     > 1200px  desktop largo   — tabela completa
     <= 1200px desktop estreito— coluna de link encolhe
     <= 980px  tablet          — some a coluna ID, abas viram faixa rolavel
     <= 760px  celular         — cada linha da tabela vira um cartao
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  :root { --shell-max: 100%; }
  .col-link { max-width: 220px; }
  .col-name { min-width: 140px; }
}

@media (max-width: 980px) {
  .shell { padding: 16px; }

  /* Abas em faixa rolavel: nunca quebram para uma segunda linha. */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin-inline: -4px;
    padding-inline: 4px;
    scroll-snap-type: x proximity;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; scroll-snap-align: start; }

  .table .col-id, .table th.col-id { display: none; }

  .field--search { flex-basis: 100%; order: -1; }

  /* A barra da página pública tem só busca + botão: cabem na mesma linha. */
  .toolbar--tight .field--search { flex-basis: auto; order: 0; }
}

@media (max-width: 760px) {
  .shell { padding: 12px; gap: 12px; }
  .topbar__inner { padding: 10px 12px; }

  .toolbar { gap: 6px; }
  .field--select { flex: 1 1 auto; justify-content: space-between; }

  /* A tabela vira uma lista, mas mantendo a linguagem visual do desktop:
     mesmas superfícies, mesma separação por linha de 1px, sem virar
     "cartão flutuante" nem ganhar rótulos de formulário. Cada registro é um
     grid de quatro faixas: meta / nome / link / ações. */
  .table-wrap { overflow-x: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: auto; }

  .table tbody tr {
    display: grid;
    grid-template-columns: auto 1fr;
    /* Com a coluna "Data" desligada (panel.show_date = false) a area `date`
       simplesmente fica vazia -- o grid nao quebra. */
    grid-template-areas:
      "id   date"
      "name name"
      "link link"
      "acts acts";
    gap: 3px 8px;
    align-items: center;
    padding: 12px;
    margin: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
  }
  .table tbody tr:last-child { border-bottom: 0; }
  .table tbody tr:hover { background: var(--surface-hover); }
  .table tbody tr.is-leaving { opacity: .35; }

  /* Sem os rótulos "ID / DATA / LINK": o formato já diz o que é cada coisa. */
  .table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .table td::before { content: none; }

  .table .col-id {
    grid-area: id;
    display: block;
    font-size: 11.5px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
  }
  .table td.col-id::before { content: "#"; opacity: .55; }

  .col-date {
    grid-area: date;
    font-size: 11.5px;
    color: var(--text-faint);
    justify-self: start;
  }


  .col-name {
    grid-area: name;
    max-width: none;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .col-link { grid-area: link; max-width: none; }
  .linkcell { justify-content: flex-start; gap: 6px; }
  .linkcell__url { font-size: 12px; max-width: calc(100vw - 116px); }

  .col-actions {
    grid-area: acts;
    width: auto;
    white-space: normal;
    margin-top: 7px;
  }
  .actions { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .btn--chip { height: 30px; padding: 0 13px; font-size: 12.5px; }

  .panel__head { padding: 12px; }
  .cards { grid-template-columns: 1fr; padding: 10px; }

  .pagination { gap: 6px; }
  .page { min-width: 40px; height: 40px; }
  .toast { bottom: 14px; }
}

@media (max-width: 400px) {
  .brand__text { font-size: 13px; }
  .btn--chip { padding: 0 10px; font-size: 12px; }
  .page--gap { display: none; }
  .linkcell__url { max-width: calc(100vw - 100px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .topbar, .toolbar, .tabs, .pagination, .col-actions, .footer, .toast { display: none !important; }
  .panel { border: 0; box-shadow: none; }
}
