@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* RT-226 — shared Backoffice auth theme aligned with the Landlord dashboard. */
:root {
    --rewa-brand-primary: #2e5cff;
    --rewa-brand-primary-hover: #264fdf;
    --rewa-brand-primary-soft: #e7f0ff;
    --rewa-brand-deep: #0f232e;
    --rewa-surface-card: #ffffff;
    --rewa-border-default: #e2e8f0;
    --rewa-text-primary: #0f232e;
    --rewa-text-secondary: #334155;
    --rewa-text-muted: #64748b;
    --rewa-danger-bg: #fef3f2;
    --rewa-danger-fg: #a22016;
    --rewa-success-bg: #e7f8f0;
    --rewa-success-fg: #085f38;
    --rewa-radius-xl: 24px;
    --rewa-radius-2xl: 32px;
    --rewa-shadow-blue: 0 24px 52px rgba(46, 92, 255, 0.24);
    --rewa-motion-spring: cubic-bezier(.22, 1, .36, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.rt226-login-page {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--rewa-text-primary);
    background:
        radial-gradient(circle at 11% 12%, rgba(46, 92, 255, 0.16), transparent 28%),
        radial-gradient(circle at 91% 4%, rgba(15, 35, 46, 0.10), transparent 30%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #f4f7fb 100%);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rt226-login-page::before,
.rt226-login-page::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(10px);
    animation: rt226AuthDrift 18s ease-in-out infinite;
}

.rt226-login-page::before {
    top: 10%;
    left: -110px;
    width: 270px;
    height: 270px;
    background: rgba(46, 92, 255, 0.13);
}

.rt226-login-page::after {
    right: -80px;
    bottom: 10%;
    width: 230px;
    height: 230px;
    background: rgba(15, 35, 46, 0.10);
    animation-delay: 3s;
}

.rt226-login-orb {
    position: fixed;
    z-index: 0;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    filter: blur(2px);
    pointer-events: none;
    animation: rt226AuthDrift 16s ease-in-out 5s infinite;
}

.rt226-login-orb-one {
    top: 12%;
    left: 58%;
}

.rt226-login-orb-two {
    right: 18%;
    bottom: 16%;
    width: 76px;
    height: 76px;
    background: rgba(46, 92, 255, 0.10);
}

.rt226-login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.rt226-login-card {
    display: grid;
    width: min(1160px, 100%);
    min-height: min(760px, calc(100vh - 56px));
    grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
    overflow: hidden;
    border: 1px solid rgba(215, 226, 255, 0.95);
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 34px 110px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(22px);
    animation: rt226AuthArrive 720ms var(--rewa-motion-spring) both;
}

.rt226-login-card--single {
    max-width: 760px;
    min-height: auto;
    grid-template-columns: 1fr;
}

.rt226-login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 5vw, 64px);
    background:
        radial-gradient(circle at 0% 0%, rgba(46, 92, 255, 0.10), transparent 30%),
        rgba(255, 255, 255, 0.92);
}

.rt226-login-panel::after {
    content: "";
    position: absolute;
    inset: 28px 0 28px auto;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(226, 232, 240, 0.8), transparent);
}

.rt226-login-brand {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 12px;
    margin-bottom: 42px;
    padding: 10px 12px;
    border: 1px solid var(--rewa-border-default);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 35, 46, 0.06);
}

.rt226-login-brand-mark {
    display: inline-block;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 14px;
    background: transparent;
    box-shadow: var(--rewa-shadow-blue);
}

.rt226-login-brand-mark img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: cover;
}

.rt226-login-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--rewa-text-primary);
    font-family: "Sora", "Inter", sans-serif;
    font-weight: 700;
    line-height: 1.05;
}

.rt226-login-brand-copy small {
    color: var(--rewa-text-muted);
    font-family: "Inter", sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rt226-login-eyebrow {
    margin: 0 0 12px;
    color: var(--rewa-brand-primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.rt226-login-title {
    margin: 0;
    max-width: 440px;
    color: var(--rewa-text-primary);
    font-family: "Sora", "Inter", sans-serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.rt226-login-copy {
    max-width: 460px;
    margin: 18px 0 30px;
    color: var(--rewa-text-secondary);
    font-size: 16px;
    line-height: 1.72;
}

.rt226-login-alert,
.rt226-login-success {
    margin-bottom: 16px;
    padding: 14px 15px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    animation: rt226AuthRise 440ms var(--rewa-motion-spring) both;
}

.rt226-login-alert {
    border: 1px solid rgba(162, 32, 22, 0.16);
    background: var(--rewa-danger-bg);
    color: var(--rewa-danger-fg);
}

.rt226-login-success {
    border: 1px solid rgba(8, 95, 56, 0.14);
    background: var(--rewa-success-bg);
    color: var(--rewa-success-fg);
}

.rt226-login-form {
    display: grid;
    gap: 18px;
    max-width: 460px;
}

.rt226-field {
    animation: rt226AuthRise 520ms var(--rewa-motion-spring) both;
}

.rt226-field:nth-of-type(2) {
    animation-delay: 70ms;
}

.rt226-field label,
.rt226-remember label {
    display: block;
    margin-bottom: 9px;
    color: var(--rewa-text-secondary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.rt226-input {
    position: relative;
}

.rt226-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    transform: translateY(-50%);
    color: #90a3bd;
    font-size: 15px;
}

.rt226-input input {
    width: 100%;
    min-height: 52px;
    padding: 15px 16px 15px 48px;
    border: 1px solid var(--rewa-border-default);
    border-radius: 17px;
    outline: 0;
    background: #fbfdff;
    color: var(--rewa-text-primary);
    font-size: 15px;
    font-weight: 600;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--rewa-motion-spring), background-color 180ms ease;
}

.rt226-input input::placeholder {
    color: #9aaabd;
    font-weight: 500;
}

.rt226-input input:focus {
    border-color: var(--rewa-brand-primary);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(46, 92, 255, 0.12);
    transform: translateY(-1px);
}

.rt226-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--rewa-text-muted);
    font-size: 14px;
    animation: rt226AuthRise 520ms var(--rewa-motion-spring) 120ms both;
}

.rt226-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rt226-remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--rewa-brand-primary);
}

.rt226-remember label {
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
}

.rt226-login-action {
    position: relative;
    min-height: 54px;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: var(--rewa-brand-primary);
    box-shadow: var(--rewa-shadow-blue);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    transition: background-color 240ms ease, box-shadow 260ms ease, transform 260ms var(--rewa-motion-spring), opacity 200ms ease;
}

.rt226-login-action::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transition: transform 720ms ease;
}

.rt226-login-action:hover,
.rt226-login-action:focus {
    background: var(--rewa-brand-primary-hover);
    box-shadow: 0 28px 60px rgba(46, 92, 255, 0.3);
    transform: translateY(-2px);
}

.rt226-login-action:hover::before,
.rt226-login-action:focus::before {
    transform: translateX(110%);
}

.rt226-login-action[aria-busy="true"] {
    opacity: 0.78;
    pointer-events: none;
}

.rt226-login-secondary,
.rewa-auth-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 16px;
    border: 1px solid var(--rewa-border-default);
    border-radius: 16px;
    background: #ffffff;
    color: var(--rewa-brand-deep);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 220ms ease, transform 220ms var(--rewa-motion-spring);
}

.rt226-login-secondary:hover,
.rt226-login-secondary:focus,
.rewa-auth-secondary:hover,
.rewa-auth-secondary:focus {
    border-color: rgba(46, 92, 255, 0.28);
    background: var(--rewa-brand-primary-soft);
    color: var(--rewa-brand-primary-hover);
    box-shadow: 0 12px 24px rgba(46, 92, 255, 0.12);
    transform: translateY(-1px);
}

.rt226-login-note {
    max-width: 460px;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid #d9e5ff;
    border-radius: 18px;
    background: #f8fbff;
    color: var(--rewa-text-secondary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.rt226-login-footer {
    margin-top: 22px;
    color: #94a3b8;
    font-size: 12px;
}

.rt226-login-art {
    position: relative;
    display: flex;
    min-height: 660px;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: clamp(34px, 5vw, 60px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.20) 11%, rgba(255, 255, 255, 0) 24%),
        linear-gradient(180deg, rgba(46, 92, 255, 0.72) 0%, rgba(46, 92, 255, 0.24) 44%, rgba(15, 35, 46, 0.82) 100%),
        url("/uploads/fallback-login.jpg") center/cover no-repeat;
}

.rt226-login-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
        radial-gradient(circle at 88% 22%, rgba(46, 92, 255, 0.42), transparent 34%),
        linear-gradient(0deg, rgba(15, 35, 46, 0.62), transparent 48%);
    mix-blend-mode: screen;
}

.rt226-login-art::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -1px;
    width: 150px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
    filter: blur(10px);
}

.rt226-login-art-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.rt226-login-art h2 {
    margin: 0 0 16px;
    font-family: "Sora", "Inter", sans-serif;
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: -0.07em;
    text-shadow: 0 12px 40px rgba(15, 35, 46, 0.26);
}

.rt226-login-art p {
    max-width: 480px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    line-height: 1.68;
}

.rt226-login-proof-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.rt226-login-proof {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(18px);
}

.rt226-auth-qr,
.rewa-auth-qr {
    display: grid;
    width: min(260px, 100%);
    place-items: center;
    margin: 0 0 18px;
    padding: 18px;
    border: 1px solid var(--rewa-border-default);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 35, 46, 0.08);
}

.rt226-auth-qr img,
.rewa-auth-qr img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.rt226-auth-secret,
.rewa-auth-secret,
.rt226-auth-empty,
.rewa-auth-empty {
    margin: 0 0 18px;
    padding: 14px 15px;
    border: 1px solid var(--rewa-border-default);
    border-radius: 18px;
    background: #fbfdff;
    color: var(--rewa-text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.rt226-auth-codes,
.rewa-auth-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.rt226-auth-code-pill,
.rewa-auth-code-pill {
    padding: 12px 14px;
    border: 1px solid rgba(46, 92, 255, 0.18);
    border-radius: 16px;
    background: var(--rewa-brand-primary-soft);
    color: var(--rewa-brand-deep);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
}

.rt226-auth-actions,
.rewa-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.rt226-auth-actions form,
.rewa-auth-actions form {
    margin: 0;
}

@keyframes rt226AuthArrive {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes rt226AuthRise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes rt226AuthDrift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(22px, -28px, 0) scale(1.08);
    }
}

@media (max-height: 800px) and (min-width: 981px) {
    .rt226-login-shell {
        padding: 16px;
    }

    .rt226-login-card,
    .rt226-login-art {
        min-height: calc(100vh - 32px);
    }

    .rt226-login-panel {
        padding: 28px 44px;
    }

    .rt226-login-brand {
        margin-bottom: 20px;
    }

    .rt226-login-title {
        font-size: 38px;
        line-height: 1.02;
    }

    .rt226-login-copy {
        margin: 10px 0 18px;
        font-size: 14px;
        line-height: 1.5;
    }

    .rt226-login-form {
        gap: 12px;
    }

    .rt226-field label {
        margin-bottom: 6px;
    }

    .rt226-input input {
        min-height: 46px;
        padding-block: 12px;
    }

    .rt226-login-action {
        min-height: 48px;
    }

    .rt226-login-note {
        margin-top: 14px;
        padding: 10px 12px;
        font-size: 12px;
        line-height: 1.4;
    }

    .rt226-login-footer {
        margin-top: 10px;
    }

    .rt226-login-art {
        padding: 36px;
    }

    .rt226-login-art h2 {
        font-size: 44px;
    }
}

@media (max-width: 980px) {
    .rt226-login-card {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .rt226-login-panel::after {
        display: none;
    }

    .rt226-login-art {
        min-height: 440px;
        order: 0;
    }

    .rt226-login-art::after {
        inset: -1px 0 auto 0;
        width: auto;
        height: 120px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
    }
}

@media (max-width: 640px) {
    .rt226-login-shell {
        padding: 14px;
    }

    .rt226-login-card {
        border-radius: 28px;
    }

    .rt226-login-panel,
    .rt226-login-art {
        padding: 28px;
    }

    .rt226-login-art {
        min-height: 360px;
    }

    .rt226-login-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rt226-login-page *,
    .rt226-login-page *::before,
    .rt226-login-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
