/* =========================================================
   Admin · Indicadores
   ========================================================= */

.admin-topbar {
  background: linear-gradient(135deg, var(--roxo-escuro), #2d1845) !important;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.topbar-link {
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.18);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

/* LOGIN */
.login-box {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 28px 20px;
  border: 1px solid var(--borda);
  box-shadow: var(--sombra-md);
  margin: 30px auto;
  max-width: 400px;
  text-align: center;
}

.login-box h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--texto);
}

.login-box p {
  font-size: 14px;
  color: var(--texto-suave);
  margin-bottom: 18px;
}

.login-box .search-input { text-align: center; letter-spacing: .2em; font-size: 18px; margin-bottom: 12px; }

.login-error {
  margin-top: 12px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
}

/* BTN */
.btn-primary {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--roxo-escuro), var(--roxo));
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 700;
  transition: transform .12s, filter .12s;
  box-shadow: var(--sombra-sm);
}

.btn-primary:active { transform: scale(.97); filter: brightness(.95); }

.btn-secondary {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  color: var(--texto-suave);
  border: 1px solid var(--borda);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
}

.btn-secondary:active { transform: scale(.97); }

/* FILTROS */
.admin-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-filters .search-input { grid-column: span 2; }

.admin-select {
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 2px solid var(--borda);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  color: var(--texto);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
}

.admin-select:focus { outline: none; border-color: var(--azul); }

.admin-count {
  font-size: 13px;
  color: var(--texto-suave);
  margin-bottom: 10px;
  padding: 0 4px;
}

/* LISTA */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-item {
  background: var(--bg-card);
  border: 1px solid var(--borda);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  box-shadow: var(--sombra-sm);
  transition: all .15s;
}

.admin-item:active { transform: scale(.98); }

.admin-item-info { min-width: 0; }

.admin-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 4px;
}

.admin-item-meta .badge {
  background: #eff6ff;
  color: var(--azul-escuro);
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.admin-item-meta .badge-dia { background: var(--azul); color: #fff; }
.admin-item-meta .badge-turno { background: #f0fdf4; color: #166534; }

.admin-item-nome {
  font-size: 14px;
  font-weight: 600;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-cong {
  font-size: 12px;
  color: var(--texto-suave);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.admin-item-edit {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #fde68a;
}

.admin-item.tbd .admin-item-nome { color: var(--texto-fraco); font-style: italic; }

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(2px);
}

.modal-box {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 22px 18px calc(22px + var(--safe-bot));
  width: 100%;
  max-width: 500px;
  box-shadow: 0 -8px 24px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-box h3 {
  font-size: 19px;
  color: var(--texto);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--texto-suave);
  margin-bottom: 18px;
}

.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 14px 0 6px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

/* SAVE STATUS */
.save-status {
  position: fixed;
  bottom: calc(20px + var(--safe-bot));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--sucesso);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0;
  transition: all .25s ease;
  z-index: 200;
}

.save-status.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.save-status.error { background: #dc2626; }

/* DESKTOP */
@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-box { border-radius: var(--r-lg); margin: 20px; }

  .admin-filters { grid-template-columns: 1fr 1fr 2fr; }
  .admin-filters .search-input { grid-column: auto; }
}
