/* ===== Login — duas colunas (foto 55% / acesso 45%), conforme portal-ribal-login*.png ===== */
.login {
  display: grid;
  grid-template-columns: 54.7fr 45.3fr;
  min-height: 100vh; min-height: 100svh;
}

/* --- coluna da foto --- */
.login__visual { position: relative; overflow: hidden; background: #050608; isolation: isolate; }
.login__photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% center;
  z-index: -2;
}
.login__visual::after { /* véu para dar leitura ao logo e ao lema */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 34%);
}
.login__logo {
  position: absolute; left: clamp(24px, 3.3vw, 56px); top: clamp(24px, 4.4vh, 44px);
  height: clamp(40px, 5.4vw, 60px); width: auto;
}
.login__motto {
  position: absolute; left: clamp(24px, 3.3vw, 56px); bottom: clamp(40px, 9vh, 92px);
  color: #d4d8dd; font-size: clamp(11px, .85vw, 14px); letter-spacing: .34em;
}
.login__motto::after {
  content: ""; display: block; width: 70px; height: 3px; margin-top: 16px; background: var(--accent);
}

/* --- coluna de acesso --- */
.login__panel {
  position: relative; display: grid; place-items: center;
  padding: clamp(32px, 6vh, 72px) clamp(24px, 4vw, 64px);
  background: var(--panel);
}
.login__theme { position: absolute; top: 20px; right: 24px; }
.login__box { width: min(100%, 410px); margin-top: 2vh; }

.login__title {
  font-size: clamp(40px, 4.05vw, 68px); font-weight: 300; line-height: 1.05;
  letter-spacing: -.02em; text-align: center; color: var(--text); white-space: nowrap;
}
.login__title strong { font-weight: 700; }
.login__rule { display: block; width: 48px; height: 4px; margin: 22px auto 20px; background: var(--accent); border-radius: 2px; }
.login__lead { text-align: center; color: var(--muted); font-weight: 400; font-size: clamp(15px, 1.25vw, 21px); line-height: 1.35; }

.signin { margin-top: clamp(40px, 8vh, 84px); display: grid; gap: 16px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  height: 58px; width: 100%;
  border: 1px solid var(--btn-border); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text);
  font-size: 18px; font-weight: 700; text-decoration: none;
  transition: transform .2s, opacity .2s, box-shadow .2s;
}
.btn__g { width: 22px; height: 22px; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; pointer-events: none; transform: none; box-shadow: none; }
.login__hint { text-align: center; font-size: 14px; color: var(--muted); }
.login__hint strong { font-weight: 600; color: var(--soft); }

.form__msg {
  padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45;
  color: #ffb4b6; background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .4);
}
.form__msg[data-tone="info"] { color: var(--soft); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
:root[data-theme="light"] .form__msg { color: #a3161b; }
:root[data-theme="light"] .form__msg[data-tone="info"] { color: var(--soft); }

.login__restricted {
  display: flex; align-items: center; gap: 16px; margin-top: clamp(28px, 5vh, 52px);
  color: var(--muted); font-size: 14px; text-align: center;
}
.login__restricted::before, .login__restricted::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login__help { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }

.noscript { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; text-align: center; font-size: 13px; background: var(--surface); color: var(--muted); }

/* --- tablet / mobile: foto vira faixa no topo --- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login__visual { height: clamp(150px, 26vh, 240px); }
  .login__photo { object-position: 35% 62%; }
  .login__motto { display: none; }
  .login__logo { height: 44px; left: 20px; top: 18px; }
  .login__panel { align-items: start; padding-top: 36px; padding-bottom: 40px; }
  .login__box { margin-top: 0; }
  .login__theme { top: 14px; right: 16px; background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .25); color: #fff; }
  .login__title { font-size: 42px; }
  .signin { margin-top: 32px; }
}
