/* =========================================================================
   RedRogue — public / sign-in layout (login, forgot, reset, verify, ...)
   Loaded by include-top-public.php after rr-ui.css. Everything is scoped
   under .rr-sign so the backend is unaffected.
   ========================================================================= */

html,
body.rr-auth {
    height: auto;
    min-height: 100%;
}

body.rr-auth {
    margin: 0;
    background: var(--rr-surface);
}

/* ---------- Layout ---------- */
.rr-sign {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    min-height: 100vh;
    font-family: var(--rr-font-body);
    color: var(--rr-ink);
    background: var(--rr-surface);
}

.rr-sign__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.rr-sign__form-wrap {
    width: 100%;
    max-width: 440px;
}

.rr-sign__foot {
    width: 100%;
    max-width: 440px;
    margin: 48px 0 0;
    font-size: .8125rem;
    color: var(--rr-muted);
}

/* ---------- Brand panel ---------- */
.rr-sign__brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 56px 48px;
    background: var(--rr-charcoal);
    color: #fff;
}

/* The logo's banded globe, blown up and cropped off the panel edge */
.rr-sign__bands {
    position: absolute;
    left: -40%;
    bottom: -30%;
    width: 115%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: repeating-linear-gradient(to bottom, var(--rr-red) 0 9.5%, transparent 9.5% 12.5%);
    pointer-events: none;
}

/* The logo's grey crescent, echoed as a faint ring */
.rr-sign__bands::before {
    content: "";
    position: absolute;
    inset: -9% -14% 9% 14%;
    border-radius: 50%;
    border: 42px solid rgba(255, 255, 255, .045);
}

.rr-sign__brand-copy {
    position: relative;
    max-width: 420px;
}

.rr-sign__tagline {
    margin: 0 0 16px;
    font-family: var(--rr-font-display);
    font-weight: 600;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -.025em;
    color: #fff;
}

.rr-sign__brand-text {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
}

/* ---------- Header ---------- */
.rr-sign__logo {
    display: inline-block;
    margin-bottom: 40px;
}

.rr-sign__logo img {
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* h3 covers the existing forgot/reset/verify pages and the password-reset component */
.rr-sign__title,
.rr-sign__form-wrap h3 {
    margin: 0 0 6px;
    font-family: var(--rr-font-display);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: var(--rr-title-tracking);
    color: var(--rr-heading);
}

.rr-sign__form-wrap h3 {
    margin-bottom: 24px;
}

.rr-sign__lead {
    margin: 0 0 32px;
    font-size: .9375rem;
    color: var(--rr-muted);
}

/* ---------- Fields ---------- */
.rr-sign .form-group {
    margin-bottom: 20px;
}

.rr-sign label {
    margin-bottom: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--rr-heading);
}

.rr-sign .form-control,
.rr-sign .form-control-lg {
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1rem;
    color: var(--rr-ink);
    background: var(--rr-surface);
    border: 1px solid var(--rr-line);
    border-radius: var(--rr-radius);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.rr-sign .form-control:hover { border-color: var(--rr-line-hover); }

.rr-sign .form-control:focus {
    border-color: var(--rr-red);
    box-shadow: 0 0 0 4px var(--rr-red-soft);
}

/* Chrome autofill: keep the field colour instead of pale yellow/blue */
.rr-sign .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px var(--rr-surface) inset;
    -webkit-text-fill-color: var(--rr-ink);
}

/* Legacy input-group + <icon-box> markup (forgot / reset / verify pages) */
.rr-sign .input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.rr-sign .input-group-append .input-group-text,
.rr-sign .input-group-append .btn {
    height: 48px;
    border-radius: 0 var(--rr-radius) var(--rr-radius) 0;
}

.rr-sign .input-group-text {
    background: var(--rr-canvas);
    border-color: var(--rr-line);
    color: var(--rr-muted);
}

.rr-sign .alert {
    border-radius: var(--rr-radius);
}

/* ---------- Checkbox ---------- */
.rr-sign .custom-control {
    margin-bottom: 28px;
}

.rr-sign .custom-control-label {
    font-weight: 500;
    color: var(--rr-muted);
    cursor: pointer;
}

.rr-sign .custom-control-label::before {
    border-radius: 4px;
    border-color: var(--rr-line-hover);
    background-color: var(--rr-surface);
}

/* ---------- Buttons (legacy pages use btn-info / btn-primary) ---------- */
.rr-sign .btn-info,
.rr-sign .btn-primary {
    color: #fff;
    background: var(--rr-red);
    border-color: var(--rr-red);
    font-weight: 600;
}

.rr-sign .btn-info:hover,
.rr-sign .btn-primary:hover {
    background: var(--rr-red-hover);
    border-color: var(--rr-red-hover);
}

.rr-sign .btn-info:not(.btn-lg):not(.btn-block) {
    border-radius: var(--rr-radius);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .rr-sign { grid-template-columns: 1fr; }
    .rr-sign__brand { display: none; }
    .rr-sign__main { justify-content: flex-start; padding-top: 64px; }
}

@media (max-width: 575.98px) {
    .rr-sign__main { padding: 40px 16px; }
    .rr-sign__logo { margin-bottom: 32px; }
    .rr-sign__logo img { width: 160px; }
    .rr-sign__title,
    .rr-sign__form-wrap h3 { font-size: 1.625rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rr-sign * { transition: none !important; }
}
