﻿

.tk-auth-container {
    width: 100%;
    max-width: 1100px;
    background: var(--rz-white);
    margin: 1.5rem auto;
    font-size: var(--size-2);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(93, 46, 142, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
    position: relative;
}

/* Toggle Button - Simple Icon Switch */
.tk-auth-mode-toggle-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--rz-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(93, 46, 142, 0.15);
}

    .tk-auth-mode-toggle-btn:hover {
        background: var(--rz-primary);
        box-shadow: 0 4px 12px rgba(93, 46, 142, 0.25);
    }

        .tk-auth-mode-toggle-btn:hover svg {
            color: white;
        }

    .tk-auth-mode-toggle-btn svg {
        width: 20px;
        height: 20px;
        color: var(--rz-primary);
        transition: color 0.2s ease;
    }

/* ===========================
           Left Side - Image Section
           =========================== */
.tk-auth-left {
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-info) 100%);
    position: relative;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

    .tk-auth-left::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
        background-size: 30px 30px;
        opacity: 0.3;
        animation: tk-auth-float 20s ease-in-out infinite;
    }

@keyframes tk-auth-float {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

/* Phone Animation Container */
.tk-auth-phones-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 380px;
    z-index: 1;
}

.tk-auth-phone {
    position: absolute;
    width: 160px;
    height: 320px;
    background: #1a1a1a;
    border-radius: 28px;
    padding: 5px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), z-index 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

    .tk-auth-phone:hover {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.6);
        transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), z-index 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0s;
    }

.tk-auth-phone-1 {
    left: 20px;
    top: 20px;
    z-index: 2;
}

.tk-auth-phone-2 {
    right: 20px;
    top: 50px;
    z-index: 1;
}

/* Login State Animation */
.tk-auth-container.tk-auth-login .tk-auth-phone-1 {
    transform: translateX(0) rotate(-5deg) scale(1);
    opacity: 1;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(93, 46, 142, 0.6);
}

.tk-auth-container.tk-auth-login .tk-auth-phone-2 {
    transform: translateX(30px) rotate(8deg) scale(0.95);
    opacity: 0.5;
}

/* Register State Animation */
.tk-auth-container.tk-auth-register .tk-auth-phone-1 {
    transform: translateX(-30px) rotate(8deg) scale(0.95);
    opacity: 0.5;
}

.tk-auth-container.tk-auth-register .tk-auth-phone-2 {
    transform: translateX(0) rotate(-5deg) scale(1);
    opacity: 1;
    z-index: 2;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(23, 162, 184, 0.6);
}

.tk-auth-phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 23px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tk-auth-phone-2 .tk-auth-phone-screen {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.tk-auth-phone-notch {
    width: 70px;
    height: 20px;
    background: #1a1a1a;
    border-radius: 0 0 14px 14px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Phone Content Design */
.tk-auth-phone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 35px 15px;
    color: white;
    text-align: center;
}

.tk-auth-phone-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: tk-auth-pulse 2s ease-in-out infinite;
}

    .tk-auth-phone-icon svg {
        width: 28px;
        height: 28px;
        stroke: white;
        stroke-width: 2;
    }

@keyframes tk-auth-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.tk-auth-phone-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tk-auth-phone-subtitle {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 300;
}

.tk-auth-phone-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.tk-auth-phone-feature {
    font-size: 0.65rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .tk-auth-phone-feature::before {
        content: '✓';
        width: 14px;
        height: 14px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.65rem;
    }

/* Decorative Tagline */
.tk-auth-tagline {
    margin-top: 30px;
    text-align: center;
    color: white;
    z-index: 1;
}

    .tk-auth-tagline h2 {
        font-size: 1.7rem;
        font-weight: 800;
        margin-bottom: 10px;
        text-shadow: 0 2px 20px rgba(0,0,0,0.2);
    }

    .tk-auth-tagline p {
        font-size: var(--size-2);
        opacity: 0.95;
        font-weight: 300;
    }

/* ===========================
           Right Side - Form Section
           =========================== */
.tk-auth-right {
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tk-auth-header {
    margin-bottom: 30px;
}

.tk-auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--rz-text);
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

    .tk-auth-title:focus {
        outline: none;
        box-shadow: none;
    }

.tk-auth-subtitle {
    font-size: var(--size-1);
    color: var(--rz-text-secondary);
    font-weight: 400;
}

/* Form Styles */
.tk-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tk-auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: tk-auth-slideIn 0.5s ease backwards;
}

    .tk-auth-form-group:nth-child(1) {
        animation-delay: 0.1s;
    }

    .tk-auth-form-group:nth-child(2) {
        animation-delay: 0.2s;
    }

    .tk-auth-form-group:nth-child(3) {
        animation-delay: 0.3s;
    }

    .tk-auth-form-group:nth-child(4) {
        animation-delay: 0.4s;
    }

    .tk-auth-form-group:nth-child(5) {
        animation-delay: 0.5s;
    }

@keyframes tk-auth-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tk-auth-form-label {
    font-size: var(--size-1);
    color: var(--rz-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .tk-auth-form-label svg {
        width: 16px;
        height: 16px;
        color: var(--rz-primary);
    }

.tk-auth-form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: var(--size-1);
    border: 2px solid var(--rz-border);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--rz-surface);
}

    .tk-auth-form-input:focus {
        border-color: var(--rz-primary);
        box-shadow: 0 0 0 4px rgba(93, 46, 142, 0.1);
    }

/* Password Toggle */
.tk-auth-password-wrapper {
    position: relative;
}

.tk-auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rz-text-secondary);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

    .tk-auth-password-toggle:hover {
        color: var(--rz-primary);
    }

    .tk-auth-password-toggle svg {
        width: 18px;
        height: 18px;
    }

/* Form Options */
.tk-auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--size-0);
    color: var(--rz-text-secondary);
}

.tk-auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .tk-auth-checkbox-wrapper input[type="checkbox"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
        accent-color: var(--rz-primary);
    }

.tk-auth-forgot-link {
    color: var(--rz-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .tk-auth-forgot-link:hover {
        color: var(--rz-primary-light);
        text-decoration: underline;
    }

/* Submit Button */
.tk-auth-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: var(--size-2);
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-info) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(93, 46, 142, 0.2);
}

    .tk-auth-submit-btn.tk-busy-btn {
        cursor: wait;
        opacity: 0.85;
        pointer-events: none;
        box-shadow: none;
        transform: none;
    }

        .tk-auth-submit-btn.tk-busy-btn::after {
            content: "";
            width: 22px;
            height: 22px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation: tk-spin 0.8s linear infinite;
        }

        .tk-auth-submit-btn.tk-busy-btn .btn-text {
            visibility: hidden;
        }

@keyframes tk-spin {
    to {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}

.tk-auth-submit-btn.tk-busy-btn:hover,
.tk-auth-submit-btn.tk-busy-btn:active {
    transform: none;
    box-shadow: none;
}

.tk-auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 46, 142, 0.3);
}

.tk-auth-submit-btn:active {
    transform: translateY(0);
}

/* Divider */
.tk-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    font-size: var(--size-0);
    color: var(--rz-text-secondary);
}

    .tk-auth-divider::before,
    .tk-auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--rz-border);
    }

/* Social Buttons */
.tk-auth-social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.tk-auth-social-btn {
    padding: 10px;
    border: 2px solid var(--rz-border);
    border-radius: 8px;
    background: var(--rz-surface);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--size-1);
}

    .tk-auth-social-btn:hover {
        border-color: var(--rz-primary);
        background: rgba(93, 46, 142, 0.05);
        transform: translateY(-2px);
    }

/* Toggle Mode */
.tk-auth-toggle-mode {
    text-align: center;
    margin-top: 20px;
    font-size: var(--size-1);
    color: var(--rz-text-secondary);
}

.tk-auth-toggle-link {
    color: var(--rz-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .tk-auth-toggle-link:hover {
        color: var(--rz-primary-light);
        text-decoration: underline;
    }

/* Icons */
.tk-auth-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Validation Messages */
.tk-auth-validation-message {
    color: #dc3545;
    font-size: var(--size-1);
    margin-top: 4px;
}

.validation-message {
    color: #dc3545;
    font-size: var(--size-1);
    margin-top: 4px;
}

/* ===========================
           Responsive Design
           =========================== */
@media (max-width: 968px) {
    .tk-auth-container {
        grid-template-columns: 1fr;
    }

    .tk-auth-left {
        display: none;
    }

    .tk-auth-right {
        padding: 35px 25px;
    }

    .tk-auth-mode-toggle-btn {
        right: 14px;
        top: 14px;
    }
}

@media (max-width: 480px) {
    .tk-auth-right {
        padding: 25px 18px;
    }

    .tk-auth-title {
        font-size: 1.6rem;
    }

    .tk-auth-social-buttons {
        grid-template-columns: 1fr;
    }

    .tk-auth-mode-toggle-btn {
        width: 34px;
        height: 34px;
    }

        .tk-auth-mode-toggle-btn svg {
            width: 18px;
            height: 18px;
        }
}
.tk-auth-terms-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
}

    .tk-auth-terms-wrapper input[type="checkbox"] {
        margin-top: 4px;
        cursor: pointer;
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        accent-color: #3b82f6;

    }

.tk-auth-terms-label {
    font-size: var(--size-1);
    margin-top: 4px;
    color: #64748b;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.tk-auth-terms-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

    .tk-auth-terms-link:hover {
        color: #2563eb;
        text-decoration: underline;
    }

.validation-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
}