* { box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }
body { margin: 0; background: #f4f6f8; color: #222; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; background: #111827; color: #fff;
}
.topbar h1 { margin: 0; font-size: 20px; }
.muted { margin: 6px 0 0; opacity: .8; font-size: 13px; }

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

.container { max-width: 1100px; margin: 20px auto; padding: 0 16px; }

.card {
  background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

h2 { margin: 0 0 14px; font-size: 18px; }

.grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.7fr;
  gap: 12px;
}
label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; }
input, select {
  width: 100%; padding: 10px;
  border: 1px solid #d1d5db; border-radius: 8px;
}

.checks { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.checks label { font-weight: 500; margin: 0; display:flex; gap:8px; align-items:center; }

.btn {
  border: none; border-radius: 10px; padding: 10px 14px;
  cursor: pointer; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e5e7eb; color: #111;
}
.btn.primary { background: #2563eb; color: #fff; }
.btn.danger { background: #ef4444; color: #fff; }

.msg { margin-top: 10px; font-size: 13px; }

.table-wrap { overflow:auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #eee; padding: 10px; font-size: 13px; text-align: left; }
th { background: #f9fafb; }

.actions { display:flex; gap:8px; }
.small { padding: 8px 10px; border-radius: 8px; }


.grid-3 { grid-template-columns: 1.6fr 0.7fr 0.7fr; }

/* ===== Disponibilidade avancada ===== */
.subcard{
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
.subcard h3{ margin: 0 0 10px 0; font-size: 14px; }

.grid-4 { grid-template-columns: 1.4fr 1.0fr 0.8fr 0.8fr; }
.grid-5 { grid-template-columns: 1.4fr 1.0fr 1.0fr 0.8fr 0.8fr; }
.grid-1 { grid-template-columns: 1fr; }

.btn.ghost{
  background: transparent;
  border: 1px solid #d1d5db;
}

.table{ width: 100%; border-collapse: collapse; }
.table th{ background: #f9fafb; }

/* Organização premium da aba ADM */
.admin-group { margin-bottom: 18px; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 28px rgba(15,23,42,.10); background:#fff; border:1px solid #e5e7eb; }
.admin-group-head { width:100%; border:0; background:#111827; color:#fff; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; text-align:left; }
.admin-group-head strong { display:block; font-size:19px; letter-spacing:.2px; }
.admin-group-head small { display:block; margin-top:4px; color:#cbd5e1; font-size:13px; font-weight:500; }
.admin-group-head b { font-size:26px; line-height:1; }
.admin-group-body { display:none; padding:16px; background:#f8fafc; }
.admin-group.open .admin-group-body { display:block; }
.admin-group .card { margin-bottom:14px; box-shadow:none; border:1px solid #e5e7eb; }
.card h2 { display:flex; align-items:center; gap:8px; }
.card h2::before { content:''; width:8px; height:24px; border-radius:99px; background:#2563eb; display:inline-block; }
.subcard { background:#f9fafb; }
.checks label { background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px; padding:8px 10px; }
@media (max-width: 760px) { .topbar { flex-direction:column; align-items:flex-start; gap:12px; } .grid, .grid-4, .grid-5 { grid-template-columns:1fr; } }
.api-status-grid { display:grid; grid-template-columns: repeat(4, minmax(160px,1fr)); gap:12px; margin-top:12px; }
.api-status-card { border:1px solid #e5e7eb; border-radius:14px; padding:12px; background:#fff; display:flex; flex-direction:column; gap:6px; }
.api-status-card strong { font-size:14px; }
.api-status-card span { font-size:12px; font-weight:800; border-radius:999px; padding:5px 8px; align-self:flex-start; }
.api-status-card small { color:#64748b; word-break:break-all; }
.api-status-card.ok span { background:#dcfce7; color:#166534; }
.api-status-card.pendente span { background:#fef3c7; color:#92400e; }
@media (max-width: 900px) { .api-status-grid { grid-template-columns:1fr 1fr; } }
@media (max-width: 560px) { .api-status-grid { grid-template-columns:1fr; } }
.grid-2 { grid-template-columns: 1fr 1fr; }
.field-hint { display:block; margin-top:5px; font-size:12px; color:#64748b; }
.api-form { background:#f8fafc; }
@media (max-width: 760px) { .grid-2 { grid-template-columns:1fr; } }
