/* ========== Auth Page Layout ========== */
.auth-page {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 600px;
}

/* ========== Left Side - Branding ========== */
.auth-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-branding {
    text-align: center;
}

.brand-logo {
    font-size: 80px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 40px 0;
}

.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, background 0.2s;
}

.highlight-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.25);
}

.highlight-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.highlight-text {
    font-size: 16px;
    font-weight: 500;
}

/* ========== Right Side - Form ========== */
.auth-right {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    margin-bottom: 32px;
    text-align: center;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.auth-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ========== Tabs ========== */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #333;
}

/* ========== Forms ========== */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.form-input::placeholder {
    color: #999;
}

/* Code Input Group */
.code-input-wrapper {
    display: flex;
    gap: 12px;
}

.flex-1 {
    flex: 1;
}

.send-code-btn {
    padding: 0 20px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 110px;
}

.send-code-btn:hover {
    background: #5568d3;
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.link-text {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.link-text:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.link-primary {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link-primary:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ========== Responsive Design ========== */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 40px 30px;
    }

    .auth-page {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 30px 20px;
    }

    .auth-tabs {
        flex-direction: column;
    }

    .tab-btn {
        padding: 12px;
    }

    .brand-title {
        font-size: 24px;
    }

    .auth-title {
        font-size: 24px;
    }

    .code-input-wrapper {
        flex-direction: column;
    }

    .send-code-btn {
        width: 100%;
    }
}

/* Loading State */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 14px;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #e0e0e0;
    transition: all 0.3s;
}

.strength-bar.weak::before {
    width: 33%;
    background: #f44336;
}

.strength-bar.medium::before {
    width: 66%;
    background: #ff9800;
}

.strength-bar.strong::before {
    width: 100%;
    background: #4caf50;
}

.strength-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
