/* =========================================================
   RAIZE BACKOFFICE — AUTH SCREENS
   Mirrors raize/project/ui_kits/backoffice/Auth.jsx — a split
   ink-black brand panel + paper-white form panel.
   ========================================================= */

.raize-auth {
    display: flex;
    min-height: 100vh;
    background: var(--paper);
}

/* ---------- BRAND PANEL (left) ---------- */
.raize-auth-brand {
    flex: 0 0 480px;
    background: var(--ink);
    color: var(--surface);
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.raize-auth-brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand);
}

.raize-auth-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.raize-auth-brand-top img {
    height: 52px;
    width: auto;
}

.raize-auth-brand-top span {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--surface);
}

.raize-auth-brand-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.raize-auth-brand-eyebrow {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.raize-auth-brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--surface);
}

.raize-auth-brand-body {
    font-size: 14px;
    line-height: 22px;
    color: var(--muted-2);
    max-width: 360px;
    margin: 0;
}

.raize-auth-brand-stats {
    display: flex;
    gap: 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.raize-auth-brand-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.raize-auth-brand-stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
    color: var(--surface);
}

.raize-auth-brand-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted-2);
}

.raize-auth-brand-foot a {
    color: inherit;
    text-decoration: none;
    margin-left: 14px;
}

.raize-auth-brand-foot a:hover { color: var(--surface); }


/* ---------- FORM PANEL (right) ---------- */
.raize-auth-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    overflow: auto;
    position: relative;
}

.raize-auth-env {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.raize-auth-env .chip-dot {
    background: var(--success);
}

.raize-auth-card {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.raize-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    align-self: flex-start;
}

.raize-auth-back:hover { color: var(--ink); }

.raize-auth-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.raize-auth-header .t-micro {
    color: var(--brand-press);
}

.raize-auth-header h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--ink);
    line-height: 1.2;
}

.raize-auth-header p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 20px;
}

.raize-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted-2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.raize-auth-divider::before,
.raize-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

.raize-auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.raize-auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.raize-auth-link {
    font-size: 12px;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.raize-auth-link:hover { text-decoration: underline; }

.raize-auth-link-muted {
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
}

.raize-auth-link-muted:hover { color: var(--ink); }

/* Make MudTextField on auth screens read like design .input */
.raize-auth-card .mud-input-control { margin-top: 0 !important; }
.raize-auth-card .mud-input-control .mud-input-root { font-size: 13px; }

/* Big primary submit button */
.raize-auth-card .raize-auth-submit.mud-button-root {
    height: 42px;
    font-weight: 600;
}

/* Brand-yellow fill */
.raize-auth-card .raize-auth-submit.mud-button-filled-primary {
    background: var(--brand) !important;
    color: var(--brand-ink) !important;
    box-shadow: none !important;
}

.raize-auth-card .raize-auth-submit.mud-button-filled-primary:hover {
    background: var(--brand-hover) !important;
}

.raize-auth-card .raize-auth-submit.mud-button-root:disabled {
    opacity: 0.85;
}

.raize-auth-card .raize-auth-submit .mud-button-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.raize-auth-submit-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
}

/* Compact spinner sized to the label — avoids MudProgressCircular vertical drift */
.raize-auth-spinner {
    box-sizing: border-box;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    flex-shrink: 0;
    animation: raize-auth-spin 0.65s linear infinite;
}

@keyframes raize-auth-spin {
    to { transform: rotate(360deg); }
}

/* Responsive: stack panels under 980px */
@media (max-width: 980px) {
    .raize-auth { flex-direction: column; min-height: 100vh; }
    .raize-auth-brand {
        flex: 0 0 auto;
        padding: 24px 24px 28px;
    }
    .raize-auth-brand-mid { gap: 12px; }
    .raize-auth-brand-title { font-size: 28px; }
    .raize-auth-brand-top img { height: 40px; }
    .raize-auth-brand-top span { font-size: 16px; }
    .raize-auth-brand-body { font-size: 13px; line-height: 20px; }
    .raize-auth-brand-stats { padding-top: 10px; gap: 18px; }
    .raize-auth-form { padding: 28px 20px; }
}
