/* Reset e Estilos Globais Focados em Mobile - Tema Escuro */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #0f172a;
  /* Fundo bem escuro (slate-900) */
  color: #f1f5f9;
  /* Texto claro */
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  /* Limita largura para simular app mobile em telas grandes */
  min-height: 100vh;
  background: #1e293b;
  /* Superfície dos containers (slate-800) */
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.app-header {
  background: #0f172a;
  color: #38bdf8;
  /* Detalhe azul claro neon */
  padding: 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #334155;
}

.app-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

.app-content {
  flex: 1;
  padding: 16px;
  padding-bottom: 80px;
  /* Espaço para a navbar inferior */
}

/* Componentes de Formulário */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #94a3b8;
}

.form-control {
  width: 100%;
  padding: 12px;
  background-color: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: #38bdf8;
}

/* Garante legibilidade nos menus dropdown (select) */
.form-control option {
  background-color: #0f172a;
  color: #f8fafc;
}

.btn-primary {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:active {
  background: #1d4ed8;
}

/* Cards Mobile */
.card {
  background: #334155;
  /* Fundo do card (slate-700) */
  border: 1px solid #475569;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Barra de Navegação Inferior (App) */
.app-navbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
}

.nav-item {
  text-decoration: none;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
}

.nav-item i {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.nav-item:hover,
.nav-item:active {
  color: #38bdf8;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-success {
  background-color: #064e3b;
  color: #a7f3d0;
  border: 1px solid #047857;
}

/* Correção para acionamento de calendários em telas touch/mobile */
.mobile-date-picker {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  /* Altura ideal recomendada para toques em telas mobile */
}

/* Garante que o ícone nativo do calendário fique visível no Chrome/Webkit */
.mobile-date-picker::-webkit-calendar-picker-indicator {
  display: block;
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
}

.form-group {
  position: relative;
}

/* Estilos para Telas de Autenticação (Login e Registro) */
body.auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 16px;
  background-color: #090d16;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.auth-container {
  width: 100%;
  max-width: 380px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.auth-container h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #38bdf8;
  font-size: 1.4rem;
}

.auth-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.auth-link a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}