/* 🚀 AUTH PREMIUM CSS - DESIGN ULTRA MODERN */
/* StockMeUp - Authentication Pages Styling */
/* Data: 2025-01-03 */

/* ===== CSS VARIABLES ===== */
:root {
    --auth-primary: #667eea;
    --auth-secondary: #764ba2;
    --auth-accent: #f093fb;
    --auth-success: #10b981;
    --auth-warning: #f59e0b;
    --auth-danger: #ef4444;
    --auth-info: #3b82f6;
    --auth-text-primary: #1f2937;
    --auth-text-secondary: #6b7280;
    --auth-text-muted: #9ca3af;
    --auth-bg-primary: #ffffff;
    --auth-bg-secondary: #f8fafc;
    --auth-bg-tertiary: #f1f5f9;
    --auth-border: #e5e7eb;
    --auth-border-light: #f3f4f6;
    --auth-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --auth-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --auth-radius-sm: 6px;
    --auth-radius-md: 10px;
    --auth-radius-lg: 15px;
    --auth-radius-xl: 20px;
}

/* ===== AUTH PAGE LAYOUT ===== */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 50%, var(--auth-accent) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.premium-auth-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
    min-height: 100vh;
    margin: 0 auto;
}

.premium-auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.premium-auth-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="authPattern" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="white" opacity="0.1"/><circle cx="10" cy="10" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="50" r="1.5" fill="white" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23authPattern)"/></svg>');
    animation: floatPattern 20s ease-in-out infinite;
}

@keyframes floatPattern {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* ===== FLOATING ELEMENTS ===== */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.floating-element-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element-2 {
    width: 120px;
    height: 120px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.floating-element-4 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    right: 10%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

/* ===== AUTH CONTENT ===== */
.premium-auth-content {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 0;
}

.premium-auth-header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 500px;
}

.premium-auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* NOR 3D brand lockup (login header) */
.premium-auth-logo.nor-brand-lockup {
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.35rem;
}

.nor-brand-frame {
    position: relative;
    width: min(300px, 78vw);
    border-radius: 22px;
    padding: 2px;
    background:
        linear-gradient(135deg, rgba(192, 132, 252, 0.95) 0%, rgba(99, 102, 241, 0.75) 45%, rgba(34, 211, 238, 0.95) 100%);
    box-shadow:
        0 18px 40px rgba(15, 10, 40, 0.4),
        0 0 36px rgba(124, 58, 237, 0.28),
        0 0 28px rgba(34, 211, 238, 0.18);
    animation: norBrandFloat 5.5s ease-in-out infinite;
}

.nor-brand-frame::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 28px;
    background: radial-gradient(ellipse at 50% 40%, rgba(167, 139, 250, 0.35), transparent 65%);
    z-index: -1;
    pointer-events: none;
}

.nor-brand-3d {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    object-fit: cover;
    object-position: center 42%;
    aspect-ratio: 4 / 3;
    background: #0b0b10;
    user-select: none;
    -webkit-user-drag: none;
}

.nor-brand-subtitle {
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.4);
    margin-left: 0.36em;
}

@keyframes norBrandFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.premium-logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.premium-logo-icon i {
    font-size: 1.5rem;
    color: white;
}

.premium-logo-icon.nor-logo-mark {
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 100%),
        linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.3) 55%, rgba(56, 189, 248, 0.25) 100%);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
}

.premium-logo-icon.nor-logo-mark .nor-logo-img {
    width: 34px;
    height: 34px;
    display: block;
}

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

.premium-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-primary {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-primary.nor-wordmark {
    letter-spacing: 0.22em;
    background: linear-gradient(105deg, #ffffff 0%, #e0e7ff 40%, #c4b5fd 70%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(30, 27, 75, 0.25));
}

.logo-secondary {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -0.5rem;
}

.logo-secondary.nor-tagline {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.75);
}

.premium-badge {
    display: none;
}

.premium-auth-title-section {
    color: white;
}

.premium-auth-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, white, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-auth-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
    margin: 0;
}

/* ===== AUTH CARD ===== */
.premium-auth-main {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.premium-auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--auth-radius-xl);
    box-shadow: var(--auth-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
}

.premium-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-secondary), var(--auth-accent));
}

.premium-auth-card-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--auth-bg-secondary), var(--auth-bg-tertiary));
    border-bottom: 1px solid var(--auth-border-light);
}

.premium-auth-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.premium-auth-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    margin: 0;
}

.premium-auth-card-body {
    padding: 2rem;
}

.premium-auth-card-footer {
    padding: 1rem 2rem 2rem;
    background: var(--auth-bg-secondary);
    border-top: 1px solid var(--auth-border-light);
}

/* ===== AUTH FORMS ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    font-size: 1rem;
    color: var(--auth-text-primary);
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-input--password .form-control {
    padding-right: 3rem;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--auth-text-muted);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--auth-text-secondary);
    z-index: 2;
    pointer-events: none;
}

/* Toggle show/hide password */
.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.55rem;
    background: transparent;
    color: var(--auth-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 0;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
    color: var(--auth-primary);
    background: rgba(102, 126, 234, 0.1);
    outline: none;
}

.password-toggle-btn[aria-pressed="true"] {
    color: var(--auth-primary);
}

/* Password strength — compact, under the field */
.password-strength-host {
    width: 100%;
    margin-top: 0.15rem;
}

.password-strength-host[hidden] {
    display: none !important;
}

.password-strength {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.password-strength__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.password-strength__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--auth-text-muted);
}

.password-strength__text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-text-secondary);
}

.password-strength__bar {
    width: 100%;
    height: 4px;
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    overflow: hidden;
}

.password-strength__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.28s ease, background 0.28s ease;
    background: #ef4444;
}

.password-strength.is-weak .password-strength__fill { background: #ef4444; }
.password-strength.is-fair .password-strength__fill { background: #f97316; }
.password-strength.is-medium .password-strength__fill { background: #f59e0b; }
.password-strength.is-good .password-strength__fill { background: #84cc16; }
.password-strength.is-strong .password-strength__fill { background: #10b981; }

.password-strength.is-weak .password-strength__text { color: #dc2626; }
.password-strength.is-fair .password-strength__text { color: #ea580c; }
.password-strength.is-medium .password-strength__text { color: #d97706; }
.password-strength.is-good .password-strength__text { color: #65a30d; }
.password-strength.is-strong .password-strength__text { color: #059669; }

/* Previne indicatorul vechi lipit lângă input */
.form-input > .password-strength {
    display: none !important;
}

/* ===== AUTH BUTTONS ===== */
.btn-auth {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--auth-radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-auth-primary {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: white;
}

.btn-auth-secondary {
    background: linear-gradient(135deg, var(--auth-text-secondary), var(--auth-text-muted));
    color: white;
}

.btn-auth-success {
    background: linear-gradient(135deg, var(--auth-success), #059669);
    color: white;
}

.btn-auth-warning {
    background: linear-gradient(135deg, var(--auth-warning), #d97706);
    color: white;
}

.btn-auth-danger {
    background: linear-gradient(135deg, var(--auth-danger), #dc2626);
    color: white;
}

.btn-auth-info {
    background: linear-gradient(135deg, var(--auth-info), #2563eb);
    color: white;
}

/* ===== AUTH LINKS ===== */
.premium-auth-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.premium-auth-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--auth-radius-sm);
}

.premium-auth-link:hover {
    color: var(--auth-primary);
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.premium-auth-link i {
    font-size: 0.8rem;
}

/* ===== AUTH FOOTER ===== */
.premium-auth-footer {
    margin-top: 3rem;
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.premium-auth-footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.premium-auth-footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.premium-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--auth-radius-sm);
}

.premium-footer-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.premium-auth-footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.premium-footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.premium-footer-version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin: 0;
    font-weight: 500;
}

/* ===== AUTH ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== AUTH RESPONSIVE ===== */
@media (max-width: 768px) {
    .premium-auth-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .premium-auth-content {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .premium-auth-title {
        font-size: 2.5rem;
    }
    
    .premium-auth-subtitle {
        font-size: 1rem;
    }
    
    .premium-auth-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .premium-auth-card-header,
    .premium-auth-card-body,
    .premium-auth-card-footer {
        padding: 1.5rem;
    }
    
    .premium-auth-footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .floating-element {
        display: none;
    }
    
    .premium-auth-header,
    .premium-auth-main,
    .premium-auth-footer {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .premium-auth-title {
        font-size: 2rem;
    }
    
    .premium-auth-card-header,
    .premium-auth-card-body,
    .premium-auth-card-footer {
        padding: 1rem;
    }
    
    .premium-auth-logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nor-brand-frame {
        width: min(240px, 82vw);
        border-radius: 18px;
    }

    .nor-brand-3d {
        border-radius: 16px;
    }

    .nor-brand-subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.28em;
    }
    
    .premium-logo-text {
        align-items: center;
    }
    
    .premium-auth-header,
    .premium-auth-main,
    .premium-auth-footer {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== AUTH UTILITIES ===== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--auth-text-muted) !important;
}

/* ===== CENTERING UTILITIES ===== */
.center-horizontal {
    margin-left: auto;
    margin-right: auto;
}

.center-vertical {
    display: flex;
    align-items: center;
}

.center-both {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FLEXBOX CENTERING ===== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-center-vertical {
    display: flex;
    align-items: center;
}

.flex-center-horizontal {
    display: flex;
    justify-content: center;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* ===== AUTH ALERTS ===== */
.alert-auth {
    padding: 1rem 1.5rem;
    border-radius: var(--auth-radius-md);
    margin-bottom: 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-auth-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.alert-auth-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.alert-auth-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-auth-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.alert-auth i {
    font-size: 1.1rem;
}

/* ===== LEGAL / HELP / CONTACT PAGES (large panel) ===== */
.auth-legal-page .premium-auth-container {
    max-width: 1100px;
    align-items: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.auth-legal-page .premium-auth-content {
    width: 100%;
    max-width: 960px;
}

.auth-legal-page .premium-auth-title {
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    margin-bottom: 0.35rem;
}

.auth-legal-page .premium-auth-header {
    margin-bottom: 1rem;
}

.auth-legal-page .premium-auth-main,
.auth-legal-page .premium-auth-footer {
    max-width: 960px;
}

.auth-legal-page .premium-auth-card {
    max-width: 960px;
    width: 100%;
}

.auth-legal-page .premium-auth-card-header {
    padding: 1.35rem 1.75rem 1rem;
}

.auth-legal-page .premium-auth-card-body {
    padding: 1.25rem 1.75rem 1.5rem;
    max-height: min(72vh, 680px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.auth-legal-page .premium-auth-card-footer {
    padding: 0.85rem 1.75rem 1.25rem;
}

.auth-legal-page .premium-auth-icon {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
}

.legal-page {
    color: var(--auth-text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.legal-lead {
    color: var(--auth-text-primary);
    margin: 0 0 1.25rem;
    font-size: 1.02rem;
}

.legal-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.legal-scroll h3,
.legal-page h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 1.1rem 0 0.4rem;
}

.legal-scroll p,
.legal-page p {
    margin: 0 0 0.65rem;
}

.legal-updated {
    margin-top: 1.25rem !important;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
}

.legal-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.legal-quick-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.95rem 1rem;
    text-align: left;
    text-decoration: none;
    color: var(--auth-text-primary);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: var(--auth-radius-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.legal-quick-card i {
    color: var(--auth-primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.legal-quick-card span {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.legal-quick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.45);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.12);
    color: var(--auth-text-primary);
}

.legal-faq {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.legal-faq-item {
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background: #fff;
    overflow: hidden;
}

.legal-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 0.8rem 0.95rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    position: relative;
    padding-right: 2.2rem;
}

.legal-faq-item summary::-webkit-details-marker {
    display: none;
}

.legal-faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--auth-text-muted);
    transition: transform 0.2s ease;
}

.legal-faq-item[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.legal-faq-body {
    padding: 0 0.95rem 0.9rem;
    border-top: 1px solid var(--auth-border-light);
    padding-top: 0.75rem;
}

.legal-faq-body ol,
.legal-faq-body ul {
    margin: 0 0 0.5rem;
    padding-left: 1.15rem;
}

.legal-faq-body li {
    margin-bottom: 0.3rem;
}

.legal-faq-body a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.legal-faq-body a:hover {
    text-decoration: underline;
}

.legal-contact-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.35rem;
}

.legal-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--auth-radius-md);
    border: 1px solid rgba(102, 126, 234, 0.16);
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.legal-meta-item:not(.legal-meta-item--static):hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.legal-meta-item i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: #fff;
    flex-shrink: 0;
}

.legal-meta-item strong {
    display: block;
    font-size: 0.78rem;
    color: var(--auth-text-muted);
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.legal-meta-item span {
    display: block;
    color: var(--auth-text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-word;
}

.legal-textarea {
    min-height: 120px;
    resize: vertical;
    padding: 0.85rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    width: 100%;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-textarea:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-input--select .form-control {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.legal-char-hint {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    text-align: right;
}

.legal-flash-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.legal-flash {
    padding: 0.7rem 0.85rem;
    border-radius: var(--auth-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.legal-flash-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #059669;
}

.legal-flash-error,
.legal-flash-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #dc2626;
}

.legal-flash-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
    color: #d97706;
}

.legal-flash-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #2563eb;
}

@media (max-width: 900px) {
    .auth-legal-page .premium-auth-main,
    .auth-legal-page .premium-auth-footer,
    .auth-legal-page .premium-auth-card,
    .auth-legal-page .premium-auth-content {
        max-width: 100%;
    }

    .auth-legal-page .premium-auth-card-body {
        max-height: min(68vh, 620px);
        padding: 1.1rem 1.25rem 1.25rem;
    }
}

@media (max-width: 576px) {
    .legal-quick-grid {
        grid-template-columns: 1fr;
    }

    .legal-quick-card {
        justify-content: flex-start;
    }

    .auth-legal-page .premium-auth-card {
        max-width: 100%;
    }

    .auth-legal-page .premium-auth-card-body {
        max-height: min(62vh, 560px);
        padding: 1rem;
    }

    .legal-contact-meta {
        grid-template-columns: 1fr;
    }
}
