/**
 * Shell admin — alinhado ao tracking/header.php (Traceable)
 */

body.tracking-shell {
  background: #f5f7fa;
  padding-top: 20px;
}

.admin-content-wrapper {
  padding: 0 30px 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-main {
  display: block;
  min-height: 200px;
}

.header-wrapper {
  font-family: 'Inter', sans-serif;
}

.custom-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  min-width: 220px;
  animation: shellSlideDown 0.2s ease-out forwards;
}

.custom-dropdown.show {
  display: block;
}

@keyframes shellSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards e tabelas no admin */
body.tracking-shell .card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  background: #fff;
}

body.tracking-shell .content-wrapper.admin-content-wrapper {
  padding-bottom: 30px;
}

body.tracking-shell .admin-main .content-wrapper {
  padding: 0;
  max-width: none;
}

.page-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title h1,
.page-title h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.page-title p {
  color: #64748b;
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.clean-table-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.clean-table-card .table-responsive {
  overflow-x: auto;
}

.table-clean {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table-clean th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  border: none;
  padding: 14px 20px;
  letter-spacing: 0.04em;
  text-align: left;
}
.table-clean td {
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  padding: 14px 20px;
  color: #334155;
}
.table-clean tr:last-child td {
  border-bottom: none;
}
.table-clean tr:hover td {
  background-color: #f8fafc;
}

.shell-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.shell-metric-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.shell-metric-card .metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}
.shell-metric-card .metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.shell-metric-card .metric-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem;
}

.auth-card {
  max-width: 420px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}
.auth-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.auth-card .auth-sub {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.form-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.form-check-row input[type="checkbox"] {
  width: auto;
}

.badge-status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-status.ok {
  background: #dcfce7;
  color: #166534;
}
.badge-status.off {
  background: #f1f5f9;
  color: #64748b;
}
.badge-status.admin {
  background: #dbeafe;
  color: #1d4ed8;
}

.responses-filter-card {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}
.responses-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto;
  gap: 1rem;
  align-items: end;
}
@media (max-width: 800px) {
  .responses-filter-grid {
    grid-template-columns: 1fr;
  }
}
.responses-filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 2px;
}
.responses-result-count {
  margin: -0.5rem 0 1rem;
}
.responses-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 1rem 1.25rem;
  border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
  .admin-content-wrapper {
    padding: 0 16px 24px;
  }
}

.response-status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.response-status-select {
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  max-width: 150px;
}

.response-status-inline-form {
  margin: 0;
}

.app-footer {
  font-family: 'Inter', sans-serif;
}

body:not(.tracking-shell) .app-footer-public {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  border-radius: 12px;
}

#scrollTop.tw-visible {
  opacity: 1;
  visibility: visible;
}
