/**
 * DentiSoft 1.0 - Patient Portal Login Premium CSS
 * Cinematic, modern, healthcare + technology aesthetic
 * Split layout with glassmorphism and premium effects
 */

:root {
    --login-bg-dark: #080B10;
    --login-bg-light: #161D28;
    --login-navy: #0F141C;
    --login-cyan: #2FE0B0;
    --login-cyan-glow: rgba(47, 224, 176, 0.4);
    --login-blue: #8B7EFF;
    --login-blue-glow: rgba(139, 126, 255, 0.3);
    --login-text: #eaf3ff;
    --login-muted: #94a3b8;
    --login-glass: rgba(15, 23, 42, 0.65);
    --login-glass-border: rgba(255, 255, 255, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--login-bg-dark);
    color: var(--login-text);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* LEFT SIDE - Cinematic Background */
.login-left {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    overflow: hidden;
    background: 
        linear-gradient(135deg, rgba(8, 11, 16, 0.95), rgba(15, 20, 28, 0.92)),
        url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?w=1920&q=80') center/cover no-repeat;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, var(--login-cyan-glow), transparent 50%),
                radial-gradient(circle at 80% 70%, var(--login-blue-glow), transparent 50%);
    pointer-events: none;
}

.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.login-left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.login-brand img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(47, 224, 176, 0.3);
}

.login-brand span {
    font-family: 'Fraunces', serif;
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, var(--login-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-slogan {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 48px;
    line-height: 1.4;
}

.login-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.login-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border: 1px solid rgba(47, 224, 176, 0.15);
    border-radius: 16px;
    background: rgba(47, 224, 176, 0.05);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.login-stat:nth-child(2) {
    animation-delay: 0.4s;
}

.login-stat:nth-child(3) {
    animation-delay: 0.6s;
}

.login-stat:nth-child(4) {
    animation-delay: 0.8s;
}

.login-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(47, 224, 176, 0.3);
    border-radius: 50%;
    background: rgba(47, 224, 176, 0.1);
    color: var(--login-cyan);
    font-size: 1.5rem;
    box-shadow: 0 0 30px rgba(47, 224, 176, 0.2);
}

.login-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
}

.login-stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--login-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* RIGHT SIDE - Glassmorphism Card */
.login-right {
    flex: 0 0 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    background: linear-gradient(135deg, var(--login-bg-dark), var(--login-bg-light));
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, var(--login-cyan-glow), transparent 40%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px;
    border: 1px solid var(--login-glass-border);
    border-radius: 24px;
    background: var(--login-glass);
    backdrop-filter: blur(24px);
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(47, 224, 176, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.login-card-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-card-title {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.login-card-subtitle {
    font-size: 0.95rem;
    color: var(--login-muted);
    font-weight: 600;
    line-height: 1.5;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-label {
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.9);
}

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

.login-input-wrapper > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--login-cyan);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

.login-input {
    width: 100%;
    min-height: 52px;
    padding: 0 48px 0 48px;
    border: 1px solid rgba(47, 224, 176, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.login-input::placeholder {
    color: rgba(226, 232, 240, 0.4);
}

.login-input:focus {
    border-color: var(--login-cyan);
    background: rgba(47, 224, 176, 0.08);
    box-shadow: 0 0 0 4px rgba(47, 224, 176, 0.1), 0 0 20px rgba(47, 224, 176, 0.2);
}

.login-input:hover {
    border-color: rgba(47, 224, 176, 0.4);
}

.login-toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--login-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
    z-index: 2;
}

.login-toggle-password:hover {
    color: var(--login-cyan);
}

/* Form Extras */
.login-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -8px;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.login-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--login-cyan);
    cursor: pointer;
}

.login-checkbox label {
    font-size: 0.9rem;
    color: var(--login-muted);
    font-weight: 600;
    cursor: pointer;
}

.login-forgot {
    font-size: 0.9rem;
    color: var(--login-cyan);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-forgot:hover {
    color: #ffffff;
}

/* Button */
.login-btn {
    width: 100%;
    min-height: 54px;
    padding: 0 24px;
    border: none;
    border-radius: 14px;
    background: var(--login-cyan);
    color: #04211A;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(47, 224, 176, 0.4);
}

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

.login-btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .login-btn-content {
    opacity: 0;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn.loading::after::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Security Indicator */
.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px;
    border: 1px solid rgba(47, 175, 124, 0.2);
    border-radius: 10px;
    background: rgba(47, 175, 124, 0.08);
}

.login-security i {
    color: #2FAF7C;
    font-size: 1rem;
}

.login-security span {
    font-size: 0.8rem;
    color: #2FAF7C;
    font-weight: 700;
}

/* Alerts */
.login-alert {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    animation: fadeInDown 0.5s ease-out;
}

.login-alert.error {
    background: rgba(217, 97, 95, 0.12);
    color: #E6AEB8;
    border: 1px solid rgba(217, 97, 95, 0.28);
}

.login-alert.success {
    background: rgba(47, 175, 124, 0.12);
    color: #8FCDB0;
    border: 1px solid rgba(47, 175, 124, 0.28);
}

.login-alert i {
    margin-right: 8px;
}

/* Back Link */
.login-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--login-muted);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-back:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .login-right {
        flex: 0 0 480px;
        padding: 48px 36px;
    }
    
    .login-card {
        padding: 40px;
    }
}

@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        flex: 0 0 auto;
        min-height: 300px;
        padding: 40px 24px;
    }
    
    .login-brand img {
        width: 48px;
        height: 48px;
    }
    
    .login-brand span {
        font-size: 1.8rem;
    }
    
    .login-slogan {
        font-size: 1.1rem;
        margin-bottom: 24px;
    }
    
    .login-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-top: 24px;
    }
    
    .login-stat {
        padding: 16px;
    }
    
    .login-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .login-stat-value {
        font-size: 1.4rem;
    }
    
    .login-stat-label {
        font-size: 0.7rem;
    }
    
    .login-right {
        flex: 1;
        padding: 40px 24px;
    }
    
    .login-card {
        max-width: 100%;
        padding: 32px;
    }
}

@media (max-width: 640px) {
    .login-left {
        min-height: 240px;
        padding: 32px 20px;
    }
    
    .login-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-right {
        padding: 32px 20px;
    }
    
    .login-card {
        padding: 28px 24px;
    }
    
    .login-card-title {
        font-size: 1.6rem;
    }
    
    .login-card-subtitle {
        font-size: 0.85rem;
    }
    
    .login-input {
        min-height: 48px;
        padding: 0 44px 0 44px;
    }
    
    .login-btn {
        min-height: 50px;
    }
    
    .login-extras {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
