/* ─────────────────────────────────────────────────────────
   Componentes compartilhados do admin
   (usados por Expediente, Configuração, etc.)
   ───────────────────────────────────────────────────────── */

/* ─── Botão de ação primário com ícone (Adicionar / Criar) ─── */
.add-btn {
  align-items: center;
  background: #C8A84E;
  border-radius: 6px;
  color: #0A0A0A;
  display: flex;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  transition: background 0.2s ease;
}
.add-btn:hover { background: #D4B872; }
.add-btn:disabled {
  background: #2A2A2A;
  color: #666;
  cursor: not-allowed;
}

/* ─── Estado vazio ─── */
.empty-state {
  align-items: center;
  border: 1px dashed #2A2A2A;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  padding: 3rem 1.5rem;
  text-align: center;
}
.empty-state-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #2A2A2A;
  border-radius: 50%;
  color: #555;
  display: flex;
  height: 54px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 54px;
}

/* ─── Modal ─── */
.modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  position: fixed;
  z-index: 50;
}
.modal.hidden { display: none; }
.modal.flex { display: flex; }

.modal-card {
  background: #141414;
  border: 1px solid #2A2A2A;
  border-radius: 10px;
  max-height: 90vh;
  max-height: 90dvh; /* desconta a barra do navegador mobile — rodapé não estoura */
  max-width: 30rem;
  overflow-y: auto;
  width: 100%;
}

@media (max-width: 640px) {
  .modal { padding: 0.75rem; }
}
.modal-card-sm { max-width: 23rem; }

.modal-header {
  align-items: center;
  border-bottom: 1px solid #2A2A2A;
  display: flex;
  justify-content: space-between;
  padding: 1.05rem 1.25rem;
}
.modal-body { padding: 1.25rem; }
.modal-footer {
  border-top: 1px solid #2A2A2A;
  display: flex;
  gap: 0.75rem;
  padding: 1.05rem 1.25rem;
}

/* ─── Campos de formulário ─── */
.field { margin-bottom: 1.1rem; }

.field-label {
  color: #888;
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.field-input,
.field-select {
  background: #0A0A0A;
  border: 1px solid #2A2A2A;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  padding: 0.6rem 0.7rem;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field-input:focus,
.field-select:focus {
  border-color: #C8A84E;
  outline: none;
}
.field-input::placeholder { color: #555; }
.field-select:disabled {
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}
/* Picker nativo de horas com tema escuro */
input[type="time"].field-input { color-scheme: dark; }

.field-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1fr;
}

/* ─── Botões ─── */
.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 6px;
  flex: 1;
  font-size: 0.85rem;
  padding: 0.65rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: #C8A84E;
  color: #0A0A0A;
  font-weight: 600;
}
.btn-primary:hover { background: #D4B872; }
.btn-secondary {
  background: transparent;
  border: 1px solid #2A2A2A;
  color: #888;
}
.btn-secondary:hover { border-color: #444; color: #fff; }
.btn-danger {
  background: #dc2626;
  color: #fff;
  font-weight: 600;
}
.btn-danger:hover { background: #ef4444; }

/* Modificador: botão de largura natural (fora de modal-footer) */
.btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.6rem 1.25rem;
}

/* ─── Erro de formulário ─── */
.form-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px;
  color: #fca5a5;
  font-size: 0.78rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
}
.form-error.hidden { display: none; }

/* ─── Ícone do modal de confirmação/exclusão ─── */
.delete-icon {
  align-items: center;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 50%;
  color: #f87171;
  display: flex;
  height: 52px;
  justify-content: center;
  margin: 0 auto;
  width: 52px;
}
