:root {
    --ri-dark: #0B0B0B;
    --ri-dark-light: #1A1A1A;
    --ri-dark-card: #141414;
    --ri-gold: #C8A75B;
    --ri-gold-dark: #A8893F;
    --ri-gold-light: #E8D48B;
    --ri-red: #D72638;
    --ri-red-dark: #B01E2E;
    --ri-muted: #777777;
    --ri-success: #27AE60;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--ri-dark);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left Panel - Branding */
.auth-branding {
    flex: 1;
    background: linear-gradient(160deg, #0B0B0B 0%, #1A1A1A 40%, #0B0B0B 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(ellipse at 30% 50%, rgba(200,167,91,0.06) 0%, transparent 60%);
    animation: brandGlow 10s ease-in-out infinite;
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(215,38,56,0.04) 0%, transparent 60%);
    animation: brandGlow 8s ease-in-out infinite reverse;
}

@keyframes brandGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.auth-branding-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(200,167,91,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(200,167,91,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-logo-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 32px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(200,167,91,0.2);
}

.auth-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.auth-brand-name .red { color: var(--ri-red); }
.auth-brand-name .gold { background: linear-gradient(135deg, var(--ri-gold), var(--ri-gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.auth-brand-tagline {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    margin-bottom: 48px;
}

.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 400px;
    margin: 0 auto;
}

.auth-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.auth-stat:hover {
    background: rgba(200,167,91,0.05);
    border-color: rgba(200,167,91,0.2);
    transform: translateY(-2px);
}

.auth-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.auth-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-branding-quote {
    margin-top: 48px;
    padding: 24px;
    border-left: 3px solid var(--ri-gold);
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-branding-quote p {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
    line-height: 1.7;
    margin: 0;
}

/* Right Panel - Form */
.auth-form-panel {
    flex: 0 0 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: #FFFFFF;
    border-right: 1px solid rgba(0,0,0,0.06);
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.auth-form-header {
    margin-bottom: 40px;
}

.auth-form-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 15px;
    color: #777777;
    margin: 0;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444444;
    margin-bottom: 8px;
}

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

.auth-input-wrapper .input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--ri-gold);
}

.auth-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    background: #F9F9F9;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    color: #1A1A1A;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder { color: #AAAAAA; }

.auth-input:focus {
    border-color: var(--ri-gold);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(200,167,91,0.12);
}

.auth-toggle-pw {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #AAAAAA;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.auth-toggle-pw:hover { color: var(--ri-gold); }

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ri-gold);
    border-radius: 4px;
}

.auth-remember span {
    font-size: 13px;
    color: #777777;
    font-weight: 500;
}

.auth-forgot-link {
    font-size: 13px;
    color: var(--ri-gold-dark, #B8860B);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot-link:hover {
    color: var(--ri-red, #DC3545);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--ri-gold), var(--ri-gold-dark));
    color: #0B0B0B;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit:hover {
    background: linear-gradient(135deg, var(--ri-gold-light), var(--ri-gold));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200,167,91,0.3);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #0B0B0B;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.auth-footer {
    text-align: center;
    margin-top: 32px;
}

.auth-footer span {
    font-size: 14px;
    color: #999999;
}

.auth-footer a {
    font-size: 14px;
    color: var(--ri-gold-dark);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-footer a:hover { color: var(--ri-gold); }

.auth-copyright {
    margin-top: 48px;
    text-align: center;
    font-size: 12px;
    color: #BBBBBB;
}

.auth-alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
}

.auth-alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.auth-form-inner::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--ri-gold), var(--ri-gold-light));
    border-radius: 2px;
    margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-branding { display: none; }
    .auth-form-panel {
        flex: 1;
        border-left: none;
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .auth-form-panel { padding: 32px 20px; }
    .auth-form-header h1 { font-size: 24px; }
}
