/* ==========================================================================
   Reviews Sorted - Layout Framework (v8.0)
   ========================================================================== */

.rs-layout-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--rs-bg-surface); /* Pure premium feel */
}

.rs-layout-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.rs-layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--rs-space-8) clamp(var(--rs-space-6), 5vw, var(--rs-space-12));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--rs-bg-surface);
}

@media (max-width: 991.98px) {
    .rs-layout-main {
        padding: var(--rs-space-6) var(--rs-space-4);
    }
}

/* ==========================================================================
   Authentication Layouts
   ========================================================================== */

.rs-auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--rs-bg-app);
    padding: var(--rs-space-4);
}

.rs-auth-card {
    width: 100%;
    max-width: 440px;
    padding: var(--rs-space-8);
    box-shadow: var(--rs-shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.rs-auth-header {
    text-align: center;
    margin-bottom: var(--rs-space-8);
}

.rs-auth-title {
    font-size: var(--rs-font-size-2xl, 1.75rem);
    font-weight: 800;
    color: var(--rs-primary);
    margin-bottom: var(--rs-space-2);
    letter-spacing: -0.02em;
}

.rs-auth-subtitle {
    font-size: var(--rs-font-size-sm);
    color: var(--rs-text-muted);
    font-weight: 500;
}

.rs-auth-link {
    font-size: var(--rs-font-size-sm);
    font-weight: 600;
    color: var(--rs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rs-auth-link:hover {
    color: var(--rs-primary-dark);
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .rs-auth-card {
        padding: var(--rs-space-6) var(--rs-space-4);
        box-shadow: var(--rs-shadow-sm);
    }
}

/* ==========================================================================
   Alerts & Flash Messages (Overrides)
   ========================================================================== */

.alert {
    padding: var(--rs-space-4) var(--rs-space-5);
    margin-bottom: var(--rs-space-6);
    border: 1px solid transparent;
    border-radius: var(--rs-radius-md);
    font-size: var(--rs-font-size-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: var(--rs-shadow-sm);
}

.alert-success {
    background-color: var(--rs-success-bg, rgba(16, 185, 129, 0.1));
    border-color: var(--rs-success, rgba(16, 185, 129, 0.2));
    color: var(--rs-success-text, #065f46);
}

.alert-danger {
    background-color: var(--rs-danger-bg, rgba(239, 68, 68, 0.1));
    border-color: var(--rs-danger, rgba(239, 68, 68, 0.2));
    color: var(--rs-danger-text, #991b1b);
}

.alert-warning {
    background-color: var(--rs-warning-bg, rgba(245, 166, 35, 0.1));
    border-color: var(--rs-warning, rgba(245, 166, 35, 0.2));
    color: var(--rs-warning-text, #9a6500);
}

.alert-info {
    background-color: var(--rs-info-bg, rgba(59, 130, 246, 0.1));
    border-color: var(--rs-info, rgba(59, 130, 246, 0.2));
    color: var(--rs-info-text, #1e40af);
}

.alert .close {
    margin-left: auto;
    font-size: var(--rs-font-size-lg, 1.25rem);
    font-weight: 700;
    line-height: 1;
    color: inherit;
    text-shadow: none;
    opacity: 0.5;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.alert .close:hover {
    opacity: 1;
}