/* ==========================================================
   _structure.css — Estrutura base do layout
   ========================================================== */

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

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body > footer {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0 32px;
}

body > main {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5em 2em 1.5em;
}


/* --- Cabeçalho de página: título + breadcrumb + ação ------- */
main>header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5em;
  flex-wrap: wrap;
  justify-content: space-between;
}

main>header h1 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

main>header p {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0;
}

main footer:has(button) {
  display: flex;
  justify-content: flex-end;
}

dt {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.5rem;
}

dd {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

tr {
  border-bottom: 1px solid var(--line);
}

/* --- toolbar: filtros + busca ----------------------------- */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* --- search-field ----------------------------------------- */
.search-field {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  position: relative;
}

.search-field__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1.5px solid var(--line-dark);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
  font-size: .875rem;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}

.search-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 172, 182, .12);
}

/* --- filter-tabs ------------------------------------------ */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-md);
}

.filter-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* --- Cabeçalho de página: .head (título + ações) ----------- */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Botões de ação no cabeçalho */
.action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action button,
.action a.button {
  border: 1px solid var(--line-dark);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.action button:hover,
.action a.button:hover {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

/* --- Metadados: .meta (stats, info) ----------------------- */
.meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: .85rem;
  flex-direction: column;
}

.meta strong {
  color: var(--text);
  font-weight: 700;
}

/* --- Barra de progresso: .progress ------------------------ */
.progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar {
  flex: 1;
  min-width: 100px;
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.bar > div {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width .4s ease;
}

.progress label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color .15s;
  margin: 0 auto 0 0;
}

.back-link:hover {
  color: var(--text);
}

@media (max-width: 600px) {
  .meta {
    gap: 10px;
  }

  .action button,
  .action a.button {
    width: 100%;
  }
}

