/* iRenta Owner Portal - sign-in pages (login, verify, forgot, reset) */
:root {
  --brand: #39609b;
  --navy: #1c355c;
  --deep: #0d1622;
  --accent: #f0a85b;
  --ink: #18212d;
  --muted: #687385;
  --line: #dde3ea;
  --field: #f8fafc;
  --danger: #c2413b;
  --ok: #2f8a5b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.auth {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--deep);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--navy); text-decoration: underline; }

.auth-wrap { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 100vh; }

/* ---------- hero ---------- */
.auth-hero { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 56px; }
.auth-hero::before {
  content: ''; position: absolute; inset: -4%;
  background: url('/static/img/login-bg.jpg') center 60% / cover no-repeat;
  animation: kenburns 32s ease-in-out infinite alternate;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 20% 100%, rgba(13, 22, 34, .92) 0%, rgba(13, 22, 34, .55) 45%, rgba(13, 22, 34, .15) 100%),
    linear-gradient(180deg, rgba(13, 22, 34, .45) 0%, rgba(13, 22, 34, 0) 30%);
}
.auth-hero > * { position: relative; z-index: 1; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -1%); } }

.hero-logo img { height: 42px; width: auto; display: block; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); }
.hero-copy { max-width: 520px; animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ''; width: 28px; height: 1.5px; background: var(--accent); }
.hero-copy h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 46px; line-height: 1.12; margin: 16px 0 14px; letter-spacing: -.01em; }
.hero-copy h2 em { font-style: italic; color: #ffe2c2; }
.hero-copy p { font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .82); margin: 0 0 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip svg { width: 15px; height: 15px; opacity: .9; }

/* ---------- panel ---------- */
.auth-panel { background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 36px 28px; position: relative; }
.auth-card { width: 100%; max-width: 384px; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.badge-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(135deg, #eaf0f9, #f6f9fd); color: var(--brand); box-shadow: inset 0 0 0 1px #dbe5f2; }
.badge-icon svg { width: 24px; height: 24px; }
.auth-card h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 34px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.01em; }
.auth-card .lead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 28px; }
.auth-card .lead b { color: var(--ink); font-weight: 600; }

/* floating-label fields */
.field { position: relative; margin-bottom: 16px; }
.field input {
  width: 100%; height: 58px; padding: 24px 46px 8px 46px;
  font: 500 15px/1 'Inter', sans-serif; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:hover { border-color: #c9d2dd; }
.field input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(57, 96, 155, .13); }
.field label {
  position: absolute; left: 46px; top: 19px; font-size: 15px; color: var(--muted); pointer-events: none;
  transition: top .18s, font-size .18s, color .18s, letter-spacing .18s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label {
  top: 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand);
}
.field .ico { position: absolute; left: 15px; top: 19px; width: 20px; height: 20px; color: #9aa5b4; transition: color .2s; pointer-events: none; }
.field input:focus ~ .ico { color: var(--brand); }
.field .eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px;
  color: #9aa5b4; cursor: pointer; display: grid; place-items: center; }
.field .eye:hover { color: var(--brand); background: #eef3fa; }
.field .eye svg { width: 20px; height: 20px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 24px; font-size: 14px; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--ink); font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #d3dae3; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s cubic-bezier(.3, .7, .3, 1.3); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(57, 96, 155, .2); }

/* button */
.btn-go {
  width: 100%; height: 54px; border: 0; border-radius: 14px; cursor: pointer;
  font: 600 15px/1 'Inter', sans-serif; letter-spacing: .01em; color: #fff;
  background: linear-gradient(135deg, #4a76b8 0%, var(--brand) 45%, var(--navy) 100%);
  box-shadow: 0 14px 28px -14px rgba(28, 53, 92, .75), inset 0 1px 0 rgba(255, 255, 255, .18);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-go:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 18px 32px -14px rgba(28, 53, 92, .85), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-go:active { transform: translateY(0); }
.btn-go svg { width: 18px; height: 18px; transition: transform .2s; }
.btn-go:hover svg { transform: translateX(3px); }
.btn-go[disabled] { opacity: .75; cursor: default; transform: none; }
.btn-go .spin { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost { display: block; text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.btn-ghost:hover { color: var(--brand); }

/* alerts */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; margin-bottom: 20px; animation: rise .4s both; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note.err { background: #fdf0ef; color: #8f2c27; box-shadow: inset 0 0 0 1px #f5d0cd; }
.note.info { background: #eef4fb; color: #274b7d; box-shadow: inset 0 0 0 1px #d5e2f3; }
.note.ok { background: #edf7f1; color: #23683f; box-shadow: inset 0 0 0 1px #cde8d8; }

/* one-time code boxes */
.otp { display: flex; gap: 10px; justify-content: space-between; margin: 6px 0 22px; }
.otp input {
  width: 100%; min-width: 0; height: 62px; text-align: center; padding: 0;
  font: 600 26px/1 'Inter', sans-serif; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
}
.otp input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(57, 96, 155, .13); transform: translateY(-1px); }
.otp input.filled { background: #fff; border-color: #b9c8dc; }
.otp .sep { flex: none; width: 10px; align-self: center; height: 2px; background: var(--line); border-radius: 2px; }
.otp.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.resend { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.resend button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
.resend button:hover { text-decoration: underline; }

.secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #eef1f5;
  font-size: 12.5px; color: var(--muted); text-align: center; }
.secure svg { width: 15px; height: 15px; flex: none; color: var(--ok); }

.auth-foot { margin-top: auto; padding-top: 32px; font-size: 12px; color: #9aa5b4; text-align: center; }
.auth-foot a { color: #9aa5b4; font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { min-height: 230px; padding: 26px 24px 54px; }
  .hero-copy p, .chips { display: none; }
  .hero-copy h2 { font-size: 28px; margin: 10px 0 0; }
  .hero-logo img { height: 34px; }
  .auth-panel { border-radius: 26px 26px 0 0; margin-top: -30px; padding: 36px 22px 22px; z-index: 2; justify-content: flex-start; }
}
@media (max-width: 380px) {
  .otp { gap: 6px; } .otp .sep { display: none; }
  .auth-card h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-hero::before, .auth-card, .hero-copy, .note { animation: none; }
}
