/* =========================================
   BOTÕES E TAGS
   ========================================= */
.btn { background: var(--teal-d); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--teal); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--track); }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 16px; font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.tag { font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; align-self: start; justify-self: end; white-space: nowrap; }
.tag.Ativa { color: var(--ok); } .tag.Planejada { color: var(--warn); } .tag.Encerrada { color: var(--off); }

/* =========================================
   CONTAINERS GENÉRICOS (Box, Summary, Grid)
   ========================================= */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.box-col { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--surface); }

.hero { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 8px; }
.summary { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 32px; overflow: hidden; }
.summary div { flex: 1 1 180px; padding: 20px 22px; border-right: 1px solid var(--line); }
.summary div:last-child { border-right: 0; }
.summary strong { display: block; font-size: 30px; font-weight: 600; line-height: 1.1; }
.summary span { color: var(--muted); font-size: 14px; }

.list { display: flex; flex-direction: column; gap: 12px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text); text-decoration: none; cursor: pointer; font-weight: 500; }
.breadcrumb a:hover { color: var(--teal); text-decoration: underline; }

/* =========================================
   FORMULÁRIOS, MODAIS E TOASTS
   ========================================= */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 24px; width: min(460px, 92vw); }
dialog::backdrop { background: rgba(7, 31, 64, .55); }
label { display: block; font-size: 14px; font-weight: 500; margin: 14px 0 5px; }
input, select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.input-group { margin-bottom: 16px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .summary { flex-direction: column; }
  .summary div { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; }
  .summary div:last-child { border-bottom: 0; }
  .box { padding: 18px 16px; }
  .hero { align-items: stretch; }
  .hero > .btn, .hero > a.btn { width: 100%; text-align: center; }
  .row { flex-direction: column; gap: 0; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  dialog { padding: 18px; width: min(460px, 94vw); max-height: 90vh; overflow-y: auto; }
  .table-header { display: none !important; }
  .table-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 14px 16px !important;
  }
}