/*
  Hoja de estilos principal — Memosoft
  Objetivo: replicar la estética del aviso de "sitio en construcción"
  sobre fondo negro, con acentos en naranja de marca (#FF6600).
*/

input[type="time"]::-webkit-calendar-picker-indicator {
  display: none;
}

:root {
  /* Paleta de colores de la interfaz */
  --brand: #FF6600;
  --bg: #000000;
  --text: #e8e8e8;
  --subtle: #a8a8a8;
  --surface: #0b0b0b;
  --border: #1f1f1f;
  /* Variables específicas de campos */
  --input-bg: #111111;
  --input-disabled-bg: #1a1a1a;
  /* Variables para tareas desplegadas */
  --task-background: #151515;
  --task-text: var(--text);
  --task-hover: #1a1a1a;
  --input-border: #2a2a2a;
  --input-placeholder: #777777;
  /* Colores de estados */
  --color-success: #4CAF50;
  --color-warning: #FF6600;
  --color-info: #2196F3;
  --color-danger: #F44336;
  --color-neutral: #808080;
}

/* Tema claro mediante atributo en :root (html) */
[data-theme="light"] {
  --bg: #f7f7f7;
  --text: #121212;
  --subtle: #4d4d4d;
  --surface: #ffffff;
  --border: #e6e6e6;
  --input-bg: #ffffff;
  --input-disabled-bg: #f5f5f5;
  --task-background: #f5f5f5;
  --task-text: var(--text);
  --task-hover: #eeeeee;
  --input-border: #808080;
  --input-placeholder: #9a9a9a;
  --input-text: #121212;
}

/* Ajustes específicos de componentes en tema claro */
[data-theme="light"] .btn-secondary {
  background: #808080; /* fondo gris */
  color: #ffffff; /* texto blanco */
  border-color: #808080;
}

[data-theme="light"] .forgot a {
  color: #808080; /* texto de recuperar contraseña en gris */
}

/* Mejorar visibilidad de inputs en tema claro */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  border-color: #808080 !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: var(--brand) !important;
}

* {
  /* Modelo de caja consistente para todos los elementos */
  box-sizing: border-box;
  ::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent; /* fondo transparente */
}

::-webkit-scrollbar-thumb {
  background: rgba(136,136,136,0.7); /* el thumb sigue visible */
  border-radius: 5px;
}
}
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent; /* fondo transparente */
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 20%, transparent); /* el thumb sigue visible */
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand) 100%, transparent); /* el thumb sigue visible */
  border-radius: 5px;
}

html, body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  min-height: 100svh;
  grid-template-rows: 1fr auto;
  width: 100%;
  max-width: 100vw;
}

.page {
  display: grid;
  place-content: center; /* centra el grid vertical y horizontalmente */
  place-items: center;   /* centra los hijos en sus celdas */
  gap: 28px;
  padding: 24px;
}

.brand-block {
  /* Centra el bloque de marca */
  text-align: center;
}

.brand-symbol {
  /* Color del icono SVG = color de marca */
  color: var(--brand);
  display: grid;
  place-items: center;
}

.warning {
  /* Tamaños fluidos para el icono de advertencia */
  width: clamp(120px, 22vw, 220px);
  height: auto;
}

.title {
  /* Estilo del título principal en tres líneas */
  margin: 10px 0 0 0;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.title .line {
  /* Línea base del título */
  display: block;
  color: var(--brand);
  font-weight: 800;
  font-size: clamp(24px, 5.2vw, 60px);
}

.title .line.big {
  /* Énfasis visual para "CONSTRUCCIÓN" */
  font-size: clamp(36px, 7.6vw, 86px);
}

.title .line.brand {
  /* Línea de marca MEMOSOFT */
  font-size: clamp(18px, 3.5vw, 36px);
  letter-spacing: 2px;
  margin-top: 6px;
}

.login {
  /* Contenedor del formulario */
  width: max(380px, 100% );
  display: grid !important;
  place-items: center !important;
  gap: 18px !important;
}

.login-card {
  /* Tarjeta del formulario */
  width: min(100%, 480px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: grid;
  gap: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 40%);
}

/* Logo de Memosoft sobre el formulario */
.logo {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: clamp(22px, 4.5vw, 34px);
}

.field {
  /* Grupo de etiqueta + input */
  display: grid;
  gap: 8px;
}

.field label {
  /* Etiquetas de inputs */
  font-weight: 700;
  font-size: 14px;
  color: var(--subtle);
}

.field input {
  /* Campos de texto */
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--input-text, var(--text));
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}



.field input::placeholder {
  /* Color del placeholder */
  color: var(--input-placeholder);
}

.field input:focus {
  /* Enfoque accesible con halo sutil en color marca */
  border-color: var(--brand);
}

/* Personalización del autofill del navegador */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  /* Fondo transparente para que no se vea el azul */
  -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--input-text, var(--text)) !important;
  /* Transición suave para el cambio */
  transition: background-color 5000s ease-in-out 0s;
}

/* Para Firefox */
.field input:-moz-autofill {
  background-color: var(--input-bg) !important;
  color: var(--input-text, var(--text)) !important;
}

/* Para Edge/IE */
.field input:-ms-input-placeholder {
  color: var(--input-placeholder) !important;
}

/* Estilos para elementos select */
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--input-text, var(--text));
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}

.field select:focus {
  border-color: var(--brand);
}

.field select option {
  background: var(--input-bg);
  color: var(--input-text, var(--text));
  padding: 8px;
}


.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  align-items: stretch; /* Asegurar que los botones se estiren igual */
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  flex: 1;
  height: 48px; /* Altura fija para ambos botones */
  padding: 0 24px; /* Padding horizontal solo, sin vertical */
  margin: 0; /* Resetear márgenes */
  font-size: 16px; /* Tamaño de fuente consistente */
  font-weight: 700; /* Peso de fuente consistente */
  text-transform: uppercase; /* Mayúsculas consistentes */
  letter-spacing: 0.5px; /* Espaciado de letras consistente */
  border-radius: 10px; /* Radio de borde consistente */
  transition: all 0.2s ease; /* Transición consistente */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0; /* Permite que flex: 1 funcione correctamente */
  box-sizing: border-box; /* Asegurar que padding y border estén incluidos */
  line-height: 1; /* Resetear line-height */
  vertical-align: top; /* Alineación vertical consistente */
}


.btn-primary {
  /* Botón principal */
  margin-top: 6px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

/* Estado deshabilitado del botón primario */
.btn-primary.disabled {
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.3);
}

.btn-primary:enabled {
  /* Interacciones cuando el botón esté habilitado en el futuro */
  cursor: pointer;
}

.btn-primary:enabled:hover {
  /* Realce en hover */
  filter: brightness(1.08);
}

/* Efectos hover para botón primario */
.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 24px rgb(255 102 0 / 35%);
  filter: brightness(1.08);
}

/* Efecto de focus para botón primario */
.btn-primary:focus {
  background: color-mix(in srgb, var(--brand) 25%, transparent);
  color: var(--text);
  outline: 1px solid var(--brand);
  outline-width: 2px;
  transform: scale(1.02);
  transition: all 0.3s ease-in;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
  transform-origin: center center;
}

/* Texto de "olvidaste tu contraseña" debajo del botón ingresar */

.forgot {
  margin: 2px 0 0 0; /* menos separación del botón ingresar */
  text-align: center;
}

.forgot a {
  color: #ffffff; /* enlace en blanco */
  text-decoration: none;
  font-weight: 500; /* no en negrita */
}

.forgot a:hover,
.forgot a:focus {
  text-decoration: underline;
}

/* Separador entre botones */
.divider {
  height: 1px;
  width: 100%;
  background: #2a2a2a;
  margin: 10px 0;
}



/* Botón secundario */
.btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: #808080;
  color: #ffffff;
  border: 1px solid #808080;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.btn-secondary:enabled {
  cursor: pointer;
}

.btn-secondary:enabled:hover {
  filter: brightness(0.98);
}

.btn-secondary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 24px rgb(255 255 255 / 18%);
  border-color: #ffffff;
  filter: brightness(0.98);
}

/* Efecto de focus para botón secundario */
.btn-secondary:focus {
  background-color: white;
  color: #808080;
  outline: 1px solid #808080;
  outline-width: 2px;
  transform: scale(1.02);
  transition: all 0.3s ease-in;
  box-shadow: 0 8px 24px rgba(107, 114, 128, 0.3);
  transform-origin: center center;
}



.helper {
  /* Texto auxiliar debajo del botón */
  margin: 0;
  font-size: 12px;
  color: #8b8b8b;
  text-align: center;
}

.footer {
  /* Pie de página discreto */
  display: grid;
  place-items: center;
  padding: 20px 16px 36px;
  color: #6d6d6d;
  font-size: 12px;
}

.visually-hidden {
  /* Utilidad para contenido solo visible a lectores de pantalla */
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Ya no se requiere layout de dos columnas; el formulario queda centrado en todas las resoluciones */

/* Botón de cambio de tema */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: color-mix(in srgb, var(--bg) 75%, #ffffff 0%);
  border: 2px solid var(--brand); /* borde más notorio */
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 35%, #000 0%);
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  width: 22px;
  height: 22px;
  opacity: 0;
  transform: rotate(0deg) scale(1);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

/* Mostrar el icono de la acción contraria (para indicar el cambio)
    - En oscuro se ve el sol (sugerir cambiar a claro)
    - En claro se ve la luna (sugerir cambiar a oscuro) */
[data-theme="dark"] .icon-sun { opacity: 1; }
[data-theme="light"] .icon-moon { opacity: 1; }

/* Rotación solo al pasar el mouse */
.theme-toggle:hover .icon-sun,
.theme-toggle:hover .icon-moon {
  transform: rotate(180deg) scale(1.05);
}





/* Sistema de Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* Permite hacer clic a través del contenedor */
}

.toast {
  background: var(--surface);
  color: var(--text);
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  min-width: 320px;
  max-width: 450px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
  pointer-events: auto; /* Permite hacer clic en el toast */
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

/* Tipos de toast */
.toast.success {
  border-left: 4px solid #4CAF50;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.toast.error {
  border-left: 4px solid #f44336;
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
}

.toast.info {
  border-left: 4px solid #2196F3;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
}

.toast.warning {
  border-left: 4px solid #ff9800;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
}

/* Iconos para cada tipo de toast */
.toast::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.toast.success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.toast.error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.toast.info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.toast.warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}

/* Contenido del toast con padding para el icono */
.toast-content {
  padding-left: 38px;
}

/* Botón de cerrar */
.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Barra de progreso */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
  transform-origin: left;
  animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  
  /* Asegurar que el contenido se ajuste correctamente en móviles */
  body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .page {
    width: 100%;
    max-width: 100vw;
    padding: 16px;
  }
  
}

/* Desactivar botón nativo del navegador para campos de contraseña */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
}

input[type="password"]::-moz-text-security {
  display: none !important;
}

input[type="password"]::-webkit-text-security {
  display: none !important;
}

/* Desactivar botón nativo de Edge/Chrome */
input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
}

/* Desactivar botón nativo de Firefox */
input[type="password"]::-moz-text-security {
  display: none !important;
}

/* Posicionamiento relativo para el contenedor del campo */
.field {
  position: relative;
}

/* Estilos unificados para el botón de mostrar/ocultar contraseña */
.password-toggle {
  position: absolute;
  right: 14px;
  top: calc(50% + 12px); /* 50% del campo + altura del label (8px gap + ~4px label) */
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--brand);
  background: rgba(255, 102, 0, 0.1);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Clase para ocultar elementos */
.hidden {
  display: none !important;
}

/* ===== ANIMACIONES PARA NOTIFICACIONES ===== */

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== ESTILOS DE RECORDATORIOS ===== */

/* Items de recordatorio en inicio */
.recordatorio-item {
  padding: 12px;
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.recordatorio-item:hover {
  background-color: var(--task-hover);
}

.recordatorio-item:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* Estilo para recordatorios vencidos */
.text-danger.fw-bold {
  animation: pulse-danger 2s ease-in-out infinite;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Tabla de recordatorios */
.table-success {
  background-color: rgba(25, 135, 84, 0.1) !important;
}

[data-theme="light"] .table-success {
  background-color: rgba(25, 135, 84, 0.05) !important;
}

/* Filtros de recordatorios */
.filters-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-group {
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
}

.btn-check {
  position: absolute;
  clip: rect(0,0,0,0);
  pointer-events: none;
}

.btn-outline-primary {
  padding: 8px 16px;
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-primary:hover {
  background: var(--brand);
  color: #fff;
}

.btn-check:checked + .btn-outline-primary {
  background: var(--brand);
  color: #fff;
}

/* Mensaje cuando no hay recordatorios */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--subtle);
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.d-none {
  display: none;
}

/* Botón de nuevo recordatorio en inicio */
#btnNuevoRecordatorioInicio {
  display: flex;
  align-items: center;
  gap: 8px;
}
