/* USEPHA — Login centrado */
:root {
  --brand: #4b2c20;
  --brand-deep: #2f1a14;
  --gold: #c4a35a;
  --gold-soft: #e8d5a3;
  --text: #2a1f1a;
  --muted: #6b5a52;
  --line: #e4dbd4;
  --font: 'DM Sans', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  background-image: var(--login-photo);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(47,26,20,.88) 0%, rgba(75,44,32,.78) 50%, rgba(47,26,20,.9) 100%);
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-top {
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  width: 100%;
  gap: .75rem;
}

.login-back {
  align-self: auto;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color .2s;
}
.login-back:hover { color: #fff; }

.p-lang {
  position: relative;
  z-index: 5;
}
.p-lang summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .38rem .7rem .38rem .55rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  user-select: none;
  background: rgba(255, 255, 255, .1);
}
.p-lang summary::-webkit-details-marker,
.p-lang summary::marker { display: none; content: ''; }
.p-lang summary:hover,
.p-lang[open] summary {
  background: rgba(196, 163, 90, .25);
  border-color: var(--gold);
  color: var(--gold-soft);
}
.p-lang-globe {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  flex-shrink: 0;
}
.p-lang-caret {
  width: .65rem;
  height: .65rem;
  display: block;
  opacity: .8;
  transition: transform .2s;
}
.p-lang[open] .p-lang-caret { transform: rotate(180deg); }
.p-lang-code {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
}
.p-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 196px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
  padding: .4rem;
  overflow: hidden;
}
.p-lang-menu a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .7rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 7px;
}
.p-lang-menu a:hover { background: #f6f1ec; color: var(--brand); }
.p-lang-menu a.is-active { color: var(--brand); font-weight: 700; background: rgba(196, 163, 90, .14); }
.p-lang-item-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: .15rem .3rem;
  border-radius: 4px;
  background: #f6f1ec;
  color: var(--brand);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.p-lang-menu a.is-active .p-lang-item-code {
  background: var(--gold);
  color: var(--brand-deep);
}

.login-box {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 2.35rem 2.1rem 1.85rem;
  box-shadow: 0 24px 56px rgba(0,0,0,.3);
  text-align: center;
  animation: loginIn .55s cubic-bezier(.22,1,.36,1) both;
  border: 1px solid rgba(255,255,255,.08);
}

@keyframes loginIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand {
  margin-bottom: .75rem;
}
.login-brand img {
  height: 88px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

.login-tagline {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.35rem;
  font-weight: 600;
}

.login-box h1 {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}

.login-sub {
  color: var(--muted);
  font-size: .92rem;
  margin: 0 0 1.5rem;
  line-height: 1.45;
}

.login-alert {
  background: #fdecea;
  color: #9b2c2c;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .88rem;
  margin-bottom: 1.15rem;
  text-align: left;
}

.login-form {
  text-align: left;
}

.login-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text);
}

.login-field {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 .9rem;
  margin-bottom: 1.1rem;
  background: #faf8f6;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-field:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(75,44,32,.12);
}
.login-field i {
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
}
.login-field input {
  flex: 1;
  border: none;
  background: transparent;
  padding: .8rem 0;
  font-family: inherit;
  font-size: .95rem;
  color: var(--text);
  outline: none;
  width: 100%;
  min-width: 0;
}
.login-field input::placeholder {
  color: #a89890;
}
.login-toggle-pwd {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: .25rem;
  margin-right: -.25rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 4px;
}
.login-toggle-pwd:hover,
.login-toggle-pwd:focus-visible {
  color: var(--brand);
  outline: none;
}
.login-toggle-pwd i { font-size: 1.15rem; }

.login-btn {
  width: 100%;
  margin-top: .35rem;
  border: none;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: .95rem 1.25rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 20px rgba(75, 44, 32, .2);
}
.login-btn:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}
.login-btn:active { transform: translateY(0); }

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.login-footer a {
  color: var(--muted);
  font-size: .85rem;
  text-decoration: none;
  font-weight: 500;
}
.login-footer a:hover { color: var(--brand); }

@media (max-width: 480px) {
  .login-box { padding: 1.75rem 1.35rem 1.5rem; }
  .login-brand img { height: 72px; }
  .login-box h1 { font-size: 1.4rem; }
}
