/* Cartões de tema e atalhos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px;
  display: grid; gap: 10px; box-shadow: var(--shadow); min-height: 128px; align-content: start;
  text-decoration: none; color: inherit; position: relative; text-align: left;
  transition: transform .2s var(--ease), border-color .2s;
}
a.card:hover, button.card:hover { transform: translateY(-2px); border-color: var(--hover-line); }
a.card:active, button.card:active { transform: scale(.98); }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--primary);
}
.card b { font-size: 1rem; line-height: 1.25; }
.card small { color: var(--text-muted); font-size: .8125rem; line-height: 1.35; }
.card-wrap { position: relative; display: grid; }
.card-wrap > .fav { position: absolute; top: 6px; right: 6px; }
.card.soon { box-shadow: none; }

/* Ícones em grade e lista alternam entre as cores das companhias (--tom-*, só na paleta "todas"); nas demais ficam com a cor da paleta. */
.grid > :nth-child(4n+1) .ico, .list > :nth-child(4n+1) .ico { background: var(--tom-1-bg, var(--surface-2)); color: var(--tom-1-fg, var(--primary)); }
.grid > :nth-child(4n+2) .ico, .list > :nth-child(4n+2) .ico { background: var(--tom-2-bg, var(--surface-2)); color: var(--tom-2-fg, var(--primary)); }
.grid > :nth-child(4n+3) .ico, .list > :nth-child(4n+3) .ico { background: var(--tom-3-bg, var(--surface-2)); color: var(--tom-3-fg, var(--primary)); }
.grid > :nth-child(4n) .ico, .list > :nth-child(4n) .ico { background: var(--tom-4-bg, var(--surface-2)); color: var(--tom-4-fg, var(--primary)); }
.grid > * .card.soon .ico, .grid > .card.soon .ico { background: var(--surface-2); color: var(--text-muted); }

/* Linha de lista (resultados de busca, favoritos, ajustes) */
.list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px 10px 16px;
  text-decoration: none; color: inherit; background: transparent; border: 0; width: 100%; text-align: left;
}
.row + .row { border-top: 1px solid var(--line); }
a.row:hover, button.row:hover { background: var(--surface-2); }
.row .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); flex: none; }
.row .txt { flex: 1; display: grid; gap: 2px; min-width: 0; }
.row .txt b { font-size: .9375rem; }
.row .txt small { color: var(--text-muted); font-size: .8125rem; }
.row .txt b .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: 1px; }
.row > .i:last-child { color: var(--text-muted); }

.tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); justify-self: start; }
.tag.warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag.ok { background: var(--ok-bg); color: var(--ok-fg); }

/* Estado vazio */
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty .ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.empty p { color: var(--text-muted); max-width: 36ch; }

.icon-btn.is-fav { color: var(--accent); }
.icon-btn.is-fav svg { fill: currentColor; }

.row-wrap { position: relative; display: flex; align-items: center; }
.row-wrap + .row-wrap { border-top: 1px solid var(--line); }
.row-wrap .row { flex: 1; }
.row-wrap .row-spacer { width: 40px; }
.row-wrap > .icon-btn { position: absolute; right: 6px; }
