/* ClouDrive Modern Auth Design System */

:root {
    --auth-bg-dark: #090d16;
    --auth-card-bg: rgba(17, 24, 39, 0.85);
    --auth-card-border: rgba(255, 255, 255, 0.1);
    --auth-primary: #6366f1;
    --auth-primary-hover: #4f46e5;
    --auth-primary-glow: rgba(99, 102, 241, 0.35);
    --auth-accent: #06b6d4;
    --auth-accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --auth-text-main: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-input-bg: rgba(15, 23, 42, 0.6);
    --auth-input-border: rgba(148, 163, 184, 0.2);
    --auth-input-focus: #6366f1;
}

/* Full Viewport Root - Strictly No Window Scrollbars */
.auth-layout-root {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 1.5rem;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--auth-bg-dark);
    color: var(--auth-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Ambient Glow Elements */
.auth-layout-root::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    animation: pulse-slow 10s ease-in-out infinite alternate;
}

.auth-layout-root::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0) 70%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: pulse-slow 12s ease-in-out infinite alternate-reverse;
}

@keyframes pulse-slow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
    100% { transform: scale(1.15) translate(30px, 30px); opacity: 1; }
}

/* Auth Container */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    height: 100%;
    max-height: 820px;
    display: flex;
}

.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

/* Scrollbar on individual panels only when needed */
.auth-hero::-webkit-scrollbar,
.auth-form-container::-webkit-scrollbar {
    width: 5px;
}

.auth-hero::-webkit-scrollbar-track,
.auth-form-container::-webkit-scrollbar-track {
    background: transparent;
}

.auth-hero::-webkit-scrollbar-thumb,
.auth-form-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.auth-hero::-webkit-scrollbar-thumb:hover,
.auth-form-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Left Hero Brand Panel */
.auth-hero {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-right: 1px solid var(--auth-card-border);
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    margin-bottom: 2rem;
}

.auth-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--auth-accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 10px 20px -5px var(--auth-primary-glow);
}

.auth-brand-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.auth-hero-headline {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.85rem;
    color: #f8fafc;
}

.auth-hero-headline span {
    background: var(--auth-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-desc {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 2rem;
}

.auth-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    transition: all 0.25s ease;
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.auth-feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.auth-feature-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: #f1f5f9;
}

.auth-feature-text p {
    font-size: 0.775rem;
    margin: 0;
    color: var(--auth-text-muted);
}

.auth-hero-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.775rem;
    color: var(--auth-text-muted);
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    font-weight: 500;
    font-size: 0.725rem;
}

.auth-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Right Form Section - Vertically Aligned at TOP */
.auth-form-container {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligned at top */
}

@media (max-width: 991px) {
    .auth-hero {
        display: none;
    }
    .auth-wrapper {
        max-height: 95vh;
    }
    .auth-form-container {
        padding: 2rem 1.5rem;
    }
}

.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-form-header p {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Input Fields with Vector Icons */
.auth-input-group {
    position: relative;
    margin-bottom: 1.15rem;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 1.1rem;
    transition: color 0.2s ease;
    pointer-events: none;
    z-index: 5;
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

.auth-form-control {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 0.75rem;
    color: #f8fafc;
    font-size: 0.925rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-form-control:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.85);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    color: #ffffff;
}

.auth-form-control::placeholder {
    color: #64748b;
}

/* Checkbox & Options */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    font-size: 0.85rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.auth-checkbox {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 0.35rem;
    background-color: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    cursor: pointer;
    accent-color: var(--auth-primary);
}

.auth-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.auth-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Primary Action Button */
.auth-btn-primary {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--auth-accent-gradient);
    border: none;
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px -5px var(--auth-primary-glow);
}

.auth-btn-primary:hover {
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

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

/* Passkey & Biometric Button */
.auth-btn-passkey {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-btn-passkey:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    color: #e2e8f0;
}

.auth-btn-passkey i {
    font-size: 1.1rem;
    color: #38bdf8;
}

/* Dividers */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    padding: 0 0.85rem;
}

/* Alert / Error / Info styling */
.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.auth-alert-info {
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #67e8f9;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.auth-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.auth-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.auth-icon-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-icon-badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.auth-icon-badge-info {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.auth-provider-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-btn-provider {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.auth-btn-provider:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.auth-validation-error {
    color: #f87171;
    font-size: 0.775rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Footer Section */
.auth-footer-links {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
}

