/* ===================================================
   Login Page Styles
   Página pública de acceso al sistema.
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: #3d211a;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(201,174,151,.2)  0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(201,174,151,.12) 0%, transparent 40%);
}

body::before {
  content: '⚖';
  position: fixed;
  font-size: min(80vw, 560px);
  opacity: .04;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  color: #c9ae97;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 1.1rem;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.38);
}
@media (min-width: 480px) {
  .login-card { padding: 2.25rem 2.5rem; border-radius: 1.4rem; }
}

/* Marca */
.card-brand {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: 1rem;
}
.brand-icon {
  width: 36px; height: 36px;
  background: #3d211a;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.brand-text strong { display: block; font-size: .88rem; font-weight: 700; color: #3d211a; line-height: 1.2; }
.brand-text small  { font-size: .66rem; color: #94a3b8; }

/* Frase del dia */
.daily-quote {
  background: linear-gradient(135deg, #fdf8f4, #f5ece4);
  border-left: 3px solid #c9ae97;
  border-radius: .6rem;
  padding: .65rem .85rem;
  margin-bottom: 1rem;
  color: #3d211a;
  font-size: .78rem;
  line-height: 1.5;
  font-style: italic;
}
@media (min-width: 480px) {
  .daily-quote { font-size: .84rem; line-height: 1.6; padding: .85rem 1rem; margin-bottom: 1.4rem; }
}
.daily-quote cite {
  display: block; margin-top: .3rem;
  font-size: .68rem; font-style: normal; color: #94a3b8; font-weight: 600;
}

/* Encabezado */
.form-header { margin-bottom: 1rem; }
.form-header h1 { font-size: 1.25rem; font-weight: 700; color: #3d211a; }
@media (min-width: 480px) { .form-header h1 { font-size: 1.45rem; } .form-header { margin-bottom: 1.3rem; } }
.form-header p { font-size: .8rem; color: #64748b; margin-top: .2rem; }

/* Campos */
label { display: block; font-size: .78rem; font-weight: 600; color: #374151; margin-bottom: .3rem; }
.field { margin-bottom: .8rem; }
input[type="text"], input[type="password"] {
  width: 100%; padding: .7rem .9rem;
  border: 1.5px solid #d1d5db; border-radius: .6rem;
  font-size: .9rem; font-family: inherit; background: #fafafa; color: #111;
  transition: border-color .2s, box-shadow .2s;
}
input:focus {
  outline: none; border-color: #c9ae97;
  box-shadow: 0 0 0 3px rgba(201,174,151,.22); background: #fff;
}

.error-box {
  background: #fef2f2; border: 1px solid #fca5a5;
  border-radius: .55rem; padding: .6rem .85rem;
  font-size: .8rem; color: #dc2626; margin-bottom: .9rem;
}

.btn-primary {
  width: 100%; padding: .75rem;
  background: #3d211a; color: #fffff0;
  border: none; border-radius: .6rem;
  font-size: .93rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .2s, transform .1s; margin-top: .15rem;
}
.btn-primary:hover  { background: #5c3228; }
.btn-primary:active { transform: scale(.98); }

.divider {
  display: flex; align-items: center; gap: .6rem;
  margin: .9rem 0; font-size: .75rem; color: #94a3b8;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

.btn-webauthn {
  width: 100%; padding: .7rem;
  background: transparent; color: #3d211a;
  border: 1.5px solid #d1d5db; border-radius: .6rem;
  font-size: .85rem; font-weight: 600; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: .2s;
}
.btn-webauthn:hover { border-color: #c9ae97; background: rgba(201,174,151,.08); }

/* Mensajes Django */
.django-messages { margin-bottom: .9rem; }
.django-msg { padding: .6rem .85rem; border-radius: .5rem; font-size: .78rem; margin-bottom: .4rem; }
.django-msg.warning { background:#fffbeb; color:#d97706; border:1px solid #fcd34d; }
.django-msg.error   { background:#fef2f2; color:#dc2626; border:1px solid #fca5a5; }
.django-msg.success { background:#f0fdf4; color:#16a34a; border:1px solid #86efac; }

/* WebAuthn status */
.login-status { display:none; margin-top:.75rem; padding:.6rem .9rem; border-radius:.5rem; font-size:.8rem; text-align:center; }
.login-status.danger  { background:#fef2f2; color:#dc2626; border:1px solid #fca5a5; }
.login-status.success { background:#f0fdf4; color:#16a34a; border:1px solid #86efac; }
.login-status.info    { background:#eff6ff; color:#2563eb; border:1px solid #93c5fd; }
.login-status.warning { background:#fffbeb; color:#d97706; border:1px solid #fcd34d; }

.card-footer { margin-top: 1.1rem; text-align: center; font-size: .68rem; color: #94a3b8; }
