/* ===================================
   KyberLink Professional Login Page
   Landing Page Style Consistency
   =================================== */

/* Import variables from landing page */
:root {
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    --glass-bg-light: rgba(255, 255, 255, 0.9);
    --glass-border-light: rgba(148, 163, 184, 0.2);
    --glass-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    --text-primary-light: #1e293b;
    --text-secondary-light: #475569;
    --text-muted-light: #64748b;
    --bg-primary-light: #ffffff;
}

/* Reset and Base */
.login-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Full Screen Background */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary-light);
    z-index: 9999;
    overflow: hidden;
}

/* Subtle Grid Background */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    animation: gridFloat 20s linear infinite;
}

@keyframes gridFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(32px, 32px); }
}

/* Professional Login Card */
.login-card {
    position: relative;
    z-index: 10;
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border-light);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--glass-shadow);
    animation: cardEntrance 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo and Branding */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary-light);
    margin-bottom: 20px;
    line-height: 1.3;
}

.login-card-header {
    margin-bottom: 8px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary-light);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary-light);
    line-height: 1.4;
}

/* Login Form */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

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

.input-container input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--glass-border-light);
    border-radius: 16px;
    font-size: 16px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--text-primary-light);
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-container input::placeholder {
    color: var(--text-muted-light);
}

.input-container input:focus {
    outline: none;
    border: 2px solid #00d4ff;
    background: rgba(248, 250, 252, 1);
    box-shadow: 
        0 0 0 4px rgba(0, 212, 255, 0.1),
        0 4px 12px rgba(0, 212, 255, 0.15);
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 18px;
    font-size: 18px;
    z-index: 2;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    background: rgba(0, 212, 255, 0.1);
}

.toggle-icon {
    font-size: 16px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary-light);
    font-weight: 500;
}

.remember-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--glass-border-light);
    border-radius: 4px;
    background: rgba(248, 250, 252, 0.8);
    position: relative;
    transition: all 0.3s ease;
}

.remember-checkbox input:checked + .checkmark {
    background: var(--primary-gradient);
    border-color: #0ea5e9;
}

.remember-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Primary Button */
.primary-button {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.primary-button::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;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 212, 255, 0.3);
}

.primary-button:hover::before {
    left: 100%;
}

/* Social Login */
.social-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-border-light);
}

.social-divider span {
    background: var(--bg-primary-light);
    padding: 0 16px;
    color: var(--text-muted-light);
    font-size: 13px;
    position: relative;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.social-button {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid var(--glass-border-light);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--text-secondary-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.social-button:hover {
    background: rgba(248, 250, 252, 1);
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    color: #db4437;
}

.github-btn:hover {
    color: #333;
}

/* Sign Up Link */
.signup-link {
    text-align: center;
    margin-bottom: 24px;
}

.signup-link p {
    color: var(--text-secondary-light);
    font-size: 14px;
}

.create-account-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.create-account-link:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Security Features */
.security-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border-light);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(248, 250, 252, 0.6);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: translateY(-1px);
}

.feature-icon {
    font-size: 16px;
}

.feature-text {
    font-size: 12px;
    color: var(--text-secondary-light);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        margin: 20px;
        padding: 32px 24px;
        max-width: calc(100vw - 40px);
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-subtitle {
        font-size: 13px;
    }
    
    .input-container input {
        padding: 14px 18px 14px 46px;
        font-size: 15px;
    }
    
    .input-icon {
        left: 16px;
        font-size: 16px;
    }
    
    .primary-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .social-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .security-features {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .feature-item {
        padding: 6px 10px;
    }
    
    .feature-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .login-card {
        margin: 16px;
        padding: 24px 20px;
    }
    
    .page-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-subtitle {
        font-size: 12px;
    }
}
    
    .login-logo h1 {
        font-size: 28px;
    }
    
    .security-highlights {
        gap: 8px;
    }
    
    .security-card {
        padding: 12px 8px;
        min-width: 100px;
    }
    
    .security-card i {
        font-size: 20px;
    }
    
    .security-card span {
        font-size: 11px;
    }
}

/* Right Panel - Login Form */
.login-form-panel {
    flex: 1;
    padding: 80px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-title {
    text-align: center;
    margin-bottom: 40px;
}

.form-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.form-title p {
    color: #64748b;
    font-size: 18px;
}

.demo-banner {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #0ea5e9;
    font-weight: 500;
}

.demo-banner i {
    font-size: 16px;
}

/* Login Form */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    font-size: 15px;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.input-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-container input:focus {
    outline: none;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 0 4px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.password-visibility {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.password-visibility:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    font-size: 15px;
}

/* Custom Toggle Switch */
.remember-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: white;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-switch {
    background: rgba(255, 255, 255, 0.4);
}

.toggle-input:checked + .toggle-switch::before {
    transform: translateX(24px);
    background: #00d4ff;
}

.toggle-input {
    display: none;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Login Button */
.login-button {
    width: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #0ea5e9 30%, #8b5cf6 70%, #ec4899 100%);
    color: white;
    border: none;
    padding: 20px 24px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.login-button::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;
}

.login-button:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 212, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:active {
    transform: translateY(-2px);
}

/* Social Login Section */
.social-divider {
    text-align: center;
    margin: 32px 0 24px 0;
    position: relative;
}

.social-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.social-divider span {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    position: relative;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.social-btn {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Alternative Actions */
.alternative-options {
    text-align: center;
}

.alternative-options p {
    margin: 12px 0;
    color: #64748b;
    font-size: 15px;
}

.action-link {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: #0284c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
    }
    
    .login-brand-panel {
        padding: 40px 30px;
        min-height: 300px;
    }
    
    .login-form-panel {
        padding: 40px 30px;
    }
    
    .brand-content h2 {
        font-size: 28px;
    }
    
    .form-title h2 {
        font-size: 28px;
    }
}