/* ==========================================
            FLORA CSS Library
      Autor: Santiago Elías Formichelli
    Framework Frontend para proyectos web
=========================================== */

/* ── Base ── */

body {
  background: #0A0A0F;
  margin: 0;
  margin-top: -4rem;
  font-family: 'IBMPlexSansVariable', system-ui, -apple-system, sans-serif;
  color: #E8E8FF;
  overflow-y: hidden;
  overflow-x: hidden;
}

/* ── Contenedor ── */

.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 35px;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.1), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.07), transparent 40%);
}

/* ── Card ── */

.auth-card {
  background: #111119;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  padding-top: 28px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: auth-aparecer 280ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes auth-aparecer {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Título ── */

.auth-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
}

/* ── Inputs ── */

.auth-group {
  margin-block: 20px;
  line-height: 1.4;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.auth-input {
  width: 97%;
  margin-left: -0.1rem;
  margin-top: 0.2rem;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1C1C2A;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.auth-input::placeholder {
  color: rgba(255,255,255,0.2);
}

.auth-input:hover {
  border-color: rgba(255,255,255,0.14);
}

.auth-input:focus {
  outline: none;
  background: #22222E;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ── Checkbox ── */

.auth-remember {
  margin: 14px 0;
}

.auth-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.auth-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #6366F1;
  cursor: pointer;
}

/* ── Mensajes ── */

.auth-error {
  color: #FCA5A5;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

.auth-status {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 10px 14px;
  margin-top: 1.2rem;
  margin-bottom: 18px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  color: #86EFAC;
}

/* ── Botón principal ── */

.auth-button {
  background: linear-gradient(to bottom, #5B52F0, #4F46E5);
  padding: 11px 20px;
  border: 1px solid rgba(79, 70, 229, 0.7);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  color: white;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 2px 8px rgba(79, 70, 229, 0.35);
  transition: all 150ms ease;
}

.auth-button:hover {
  background: linear-gradient(to bottom, #4F46E5, #4338CA);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 4px 14px rgba(79, 70, 229, 0.45);
  transform: translateY(-1px);
}

.auth-button:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* ── Links ── */

.auth-link {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 150ms ease;
  cursor: pointer;
  font-weight: 500;
}

.auth-link:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

/* ── Acciones ── */

.auth-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Logo ── */

.auth-logo {
  width: 100%;
  max-width: 90px;
  height: 90px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px auto;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.15),
    0 8px 20px rgba(0,0,0,0.5);
}

/* ── Nombre del sistema ── */

.auth-app-name {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.03em;
}

/* ── HR ── */

hr {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: var(--sp-8, 2rem) 0;
}

/* ── Logout ── */

.auth-logout {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color 150ms ease;
}

.auth-logout:hover {
  color: rgba(255,255,255,0.6);
}

/* ── Profile ── */

.profile-section-card {
  background: #111119;
  padding: 24px;
  margin-top: 28px;
  margin-bottom: 40px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-header {
  display: flex;
  flex-direction: column;
}

.profile-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
}

.profile-description {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  margin-top: 2px;
  margin-bottom: 0;
}

/* ── Danger button ── */

.danger-button {
  background: linear-gradient(to bottom, #EF4444, #DC2626);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #B91C1C;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  transition: all 150ms ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 6px rgba(220,38,38,0.3);
}

.danger-button:hover {
  background: linear-gradient(to bottom, #DC2626, #B91C1C);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.4);
}

/* ── Modal ── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: #1A1A26;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.7);
  animation: auth-aparecer 250ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
}

.modal-description {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.modal-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.input-text {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1C1C2A;
  color: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-text:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-error p {
  color: #FCA5A5;
  font-size: 12px;
  margin: 4px 0 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.secondary-button {
  padding: 10px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: all 150ms ease;
}

.secondary-button:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

/* ── Responsive ── */

@media (max-width: 580px) {
  .auth-input {
    width: 93%;
  }
}
