body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.login-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.login-header p {
  margin: 0 0 24px;
  color: #6b7280;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  color: #4b5563;
}

.field input {
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.field input:focus {
  border-color: #19a2a7;
  box-shadow: 0 0 0 3px rgba(25, 162, 167, 0.12);
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-actions button {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  cursor: pointer;
  background: #19a2a7;
  color: white;
}

.login-actions .btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.login-actions button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-message {
  min-height: 22px;
  font-size: 14px;
  margin: 0;
}

.login-message.success {
  color: #15803d;
}

.login-message.error {
  color: #b91c1c;
}

/* ===== APP SHELL ===== */

.nav-btn {
  color: #6b7280; /* gris suave */
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: #E6F4F1;
}

.nav-btn.active {
  background: #19a2a7;
  color: white;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(34, 34, 34, 0.1);
}

/* 🔵 BOTÓN PRINCIPAL */
.btn-primary {
  background: #19a2a7;
  color: white;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 🟢 BOTÓN SUAVE */
.btn-soft {
  background: #D9F3F2;
  color: #19a2a7;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-soft:hover {
  background: #c1ecea;
}

/* ⚪ BOTÓN ICONO */
.btn-icon {
  padding: 8px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #E6F4F1;
}

/* 🔴 ICONO ELIMINAR */
.btn-danger {
  color: #e87777;
}

.btn-danger:hover {
  background: #f5cece;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-in 0.3s ease;
}

@media (max-width: 767px) {
  .nav-btn {
    -webkit-tap-highlight-color: transparent;
  }

  .nav-btn.active {
    background: #19a2a7;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(25, 162, 167, 0.18);
  }
}

@media (max-width: 767px) {
  input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
  }

  input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
  }
}

@media (max-width: 767px) {
  #p-fecha {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.2;
    color: #1f2937;
    background: #ffffff;
  }

  #p-fecha::-webkit-date-and-time-value {
    text-align: left;
  }

  #p-fecha::-webkit-datetime-edit,
  #p-fecha::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
    color: #1f2937;
  }

  #p-fecha::-webkit-calendar-picker-indicator {
    opacity: 1;
    margin: 0;
  }
}

@media (max-width: 767px) {
  #agenda-fecha {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.2;
    color: #1f2937;
    background: #ffffff;
  }

  #agenda-fecha::-webkit-date-and-time-value {
    text-align: left;
  }

  #agenda-fecha::-webkit-datetime-edit,
  #agenda-fecha::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
    color: #1f2937;
  }

  #agenda-fecha::-webkit-calendar-picker-indicator {
    opacity: 1;
    margin: 0;
  }
}

@media (max-width: 767px) {
  #gasto-fecha {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.2;
    color: #1f2937;
    background: #ffffff;
  }

  #gasto-fecha::-webkit-date-and-time-value {
    text-align: left;
  }

  #gasto-fecha::-webkit-datetime-edit,
  #gasto-fecha::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
    color: #1f2937;
  }

  #gasto-fecha::-webkit-calendar-picker-indicator {
    opacity: 1;
    margin: 0;
  }
}

.login-header {
  text-align: center;
}

.login-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
  user-select: none;
}

@media (max-width: 767px) {
  .login-logo {
    width: 200px;
    margin-bottom: 16px;
  }
}

/* Modal Nueva sesión - corregir input fecha en iPhone */
#modalSesion input[type="date"],
#s-fecha {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 18px;
}

/* Por si el contenedor del modal deja que algo sobresalga */
#modalSesion .bg-white {
  overflow: hidden;
}