/* ==========================================================================
   RUPEECO - AUTHENTICATION & SYSTEM PAGES
   --------------------------------------------------------------------------
   Sign in, two-factor, access denied and error. Loaded AFTER qz-theme.css,
   so every colour, radius and control comes from the same tokens as the
   portals - these pages are the front door of the same product.
   ========================================================================== */

body.rc-auth {
    min-height: 100vh;
    margin: 0;
    background: var(--qz-bg);
    color: var(--qz-text);
}

.rc-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --- Brand panel (left) -------------------------------------------------- */
.rc-auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(53, 88, 163, 0.45) 0%, rgba(53, 88, 163, 0) 60%),
        linear-gradient(160deg, var(--rc-navy-800) 0%, var(--rc-navy-900) 55%, var(--rc-navy-950) 100%);
}

/* Two quiet loops echo the mark: orange top-right, green bottom-left. */
.rc-auth-brand::before,
.rc-auth-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.rc-auth-brand::before {
    width: 520px;
    height: 520px;
    right: -260px;
    top: -260px;
    border: 56px solid rgba(249, 115, 22, 0.10);
}

.rc-auth-brand::after {
    width: 460px;
    height: 460px;
    left: -240px;
    bottom: -250px;
    border: 56px solid rgba(0, 166, 81, 0.13);
}

.rc-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--qz-r-pill);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--qz-fs-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    width: fit-content;
}

.rc-auth-eyebrow i { color: var(--rc-green-300); font-size: 10px; }

.rc-auth-headline {
    margin: 0 0 14px;
    max-width: 16ch;
    font-size: clamp(1.9rem, 2.8vw, 2.6rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
}

.rc-auth-headline em { font-style: normal; color: #7BE2AE; }

.rc-auth-lede {
    margin: 0;
    max-width: 46ch;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
}

.rc-auth-rails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
}

.rc-auth-rails li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: var(--qz-r-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    font-size: var(--qz-fs-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.86);
}

.rc-auth-rails i { font-size: 12px; color: rgba(255, 255, 255, 0.55); }

/* Abstract settlement visual - shape only, no invented figures. */
.rc-auth-visual {
    position: relative;
    max-width: 460px;
    padding: 18px 18px 12px;
    border-radius: var(--qz-r-xl);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.rc-auth-visual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: var(--qz-fs-xs);
    color: rgba(255, 255, 255, 0.6);
}

.rc-auth-visual-head .rc-live { display: inline-flex; align-items: center; gap: 6px; color: #7BE2AE; font-weight: 600; }
.rc-auth-visual-head .rc-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rc-green-500); box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.25); animation: qz-pulse 2.4s var(--qz-ease) infinite; }
.rc-auth-visual svg { display: block; width: 100%; height: auto; }

.rc-auth-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: var(--qz-fs-xs);
    color: rgba(255, 255, 255, 0.62);
}

.rc-auth-trust span { display: inline-flex; align-items: center; gap: 7px; }
.rc-auth-trust i { color: var(--rc-green-300); }

/* --- Form side (right) ----------------------------------------------------- */
.rc-auth-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.rc-auth-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(50% 40% at 100% 0%, rgba(249, 115, 22, 0.05) 0%, rgba(249, 115, 22, 0) 70%),
        radial-gradient(50% 40% at 0% 100%, rgba(0, 166, 81, 0.06) 0%, rgba(0, 166, 81, 0) 70%);
}

.rc-auth-card {
    width: 100%;
    max-width: 420px;
    animation: qz-rise var(--qz-t-slow) var(--qz-ease) both;
}

.rc-auth-card--boxed {
    padding: 32px;
    border-radius: var(--qz-r-2xl);
    background: var(--qz-surface-strong);
    border: 1px solid var(--qz-border);
    box-shadow: var(--qz-shadow-lg);
}

/* The logo, shown at its supplied colours and proportions - height only. */
.rc-auth-logo {
    display: block;
    height: 48px;
    width: auto;
    margin-bottom: 28px;
}

.rc-auth-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--qz-fs-xs);
    font-weight: 600;
    color: var(--qz-muted);
}

.rc-auth-step b {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--qz-navy);
    color: #fff;
    font-size: 0.65rem;
}

.rc-auth-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--qz-text);
}

.rc-auth-sub { margin: 0 0 26px; font-size: var(--qz-fs-body); color: var(--qz-muted); line-height: 1.55; }

.rc-field { margin-bottom: 16px; }

.rc-field-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 7px;
    font-size: var(--qz-fs-sm);
    font-weight: 600;
    color: var(--qz-text);
}

.rc-field-label a { font-weight: 500; font-size: var(--qz-fs-xs); color: var(--qz-navy); }
.rc-field-label a:hover { color: var(--rc-green-700); }

.rc-auth-input { position: relative; }

.rc-auth-input > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--qz-muted-2);
    font-size: 14px;
    pointer-events: none;
    transition: color var(--qz-t-fast) var(--qz-ease);
}

body.rc-auth .rc-auth-input .form-control {
    min-height: 48px;
    padding-left: 42px;
    font-size: 0.9375rem;
}

.rc-auth-input:focus-within > i { color: var(--qz-navy); }
.rc-auth-input .form-control.has-toggle { padding-right: 48px; }

.rc-reveal {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--qz-r-sm);
    background: transparent;
    color: var(--qz-muted);
    cursor: pointer;
}

.rc-reveal:hover { background: var(--qz-navy-tint); color: var(--qz-navy); }

body.rc-auth .rc-submit { width: 100%; min-height: 48px; margin-top: 8px; font-size: 0.9375rem; }

.rc-auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: var(--qz-r-md);
    background: var(--qz-danger-bg);
    border: 1px solid var(--qz-danger-line);
    color: var(--qz-danger);
    font-size: var(--qz-fs-sm);
    font-weight: 500;
    animation: qz-pop var(--qz-t) var(--qz-ease);
}

.rc-auth-alert i { margin-top: 2px; }

.rc-auth-note {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--qz-r-md);
    background: var(--qz-navy-tint);
    border: 1px solid var(--qz-border);
    font-size: var(--qz-fs-sm);
    color: var(--qz-text-2);
    line-height: 1.5;
}

.rc-auth-note.is-visible { display: block; animation: qz-pop var(--qz-t) var(--qz-ease); }

.rc-auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--qz-border);
    font-size: var(--qz-fs-xs);
    color: var(--qz-muted);
}

/* --- 2FA code field ------------------------------------------------------ */
body.rc-auth .rc-code {
    min-height: 58px;
    text-align: center;
    font-family: var(--qz-font-mono);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5em;
    padding-left: calc(14px + 0.5em);
}

.rc-setup {
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--qz-r-lg);
    background: var(--qz-surface-sunken);
    border: 1px solid var(--qz-border);
    text-align: center;
}

.rc-setup ol { text-align: left; margin: 0 0 14px; padding-left: 18px; font-size: var(--qz-fs-sm); color: var(--qz-text-2); line-height: 1.6; }

.rc-qr {
    display: inline-block;
    padding: 12px;
    border-radius: var(--qz-r-md);
    background: #fff;
    border: 1px solid var(--qz-border);
    margin-bottom: 12px;
}

.rc-qr img, .rc-qr canvas { display: block; }

.rc-manual-key {
    font-family: var(--qz-font-mono);
    font-size: var(--qz-fs-sm);
    padding: 8px 10px;
    border-radius: var(--qz-r-sm);
    background: #fff;
    border: 1px dashed var(--qz-border-strong);
    word-break: break-all;
    color: var(--qz-text);
}

/* --- Centered system page (access denied / error) ------------------------ */
.rc-system {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.rc-system .rc-auth-card { max-width: 480px; text-align: center; }
.rc-system .rc-auth-logo { margin: 0 auto 26px; height: 40px; }
.rc-system .qz-state-icon { margin: 0 auto 16px; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 1199px) {
    .rc-auth-brand { padding: 40px; }
}

@media (max-width: 991px) {
    .rc-auth-shell { grid-template-columns: minmax(0, 1fr); }
    .rc-auth-brand { display: none; }
    .rc-auth-main { min-height: 100vh; padding: 32px 16px; }
}

@media (max-width: 575px) {
    .rc-auth-card--boxed { padding: 24px 18px; border-radius: var(--qz-r-xl); }
    .rc-auth-title { font-size: 1.4rem; }
}
