/* ============================================
   AUTH PAGES - ULTRA PREMIUM SAAS DESIGN
   Kozan Apartman Yönetimi - Login, Register, Forgot Password
   Version: 2.0 - SaaS Level
============================================ */

/* =============================================
   AUTH CONTAINER - FULL SCREEN EXPERIENCE
   ============================================= */
.kz-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 100px;
    /* Header clearance */
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

/* =============================================
   ANIMATED BACKGROUND - 3D DEPTH
   ============================================= */
.kz-auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(34, 211, 238, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #050810 0%, #0a0e1a 50%, #0f1629 100%);
}

/* Noise texture overlay */
.kz-auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

/* =============================================
   FLOATING ORBS - PREMIUM ANIMATION
   ============================================= */
.kz-auth-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

.kz-auth-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
    top: -250px;
    right: -200px;
    animation: orbFloat1 25s ease-in-out infinite;
}

.kz-auth-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.3), transparent 70%);
    bottom: -150px;
    left: -200px;
    animation: orbFloat2 30s ease-in-out infinite;
}

/* Third orb for extra depth */
.kz-auth-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-50px, 50px) scale(1.1);
    }

    50% {
        transform: translate(30px, -30px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -50px) scale(1.05);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(60px, -40px) scale(1.08);
    }

    66% {
        transform: translate(-40px, 60px) scale(0.92);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

/* =============================================
   AUTH CARD - GLASSMORPHISM EXCELLENCE
   ============================================= */
.kz-auth-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(145deg,
            rgba(15, 22, 41, 0.9) 0%,
            rgba(10, 14, 26, 0.95) 100%);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 80px rgba(99, 102, 241, 0.1);
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    position: relative;
}

/* Shine effect on card */
.kz-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.03),
            transparent);
    animation: cardShine 3s ease-in-out infinite;
    animation-delay: 1s;
    pointer-events: none;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) rotateX(10deg) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

@keyframes cardShine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 200%;
    }
}

/* Wide card for register */
.kz-auth-card.wide {
    max-width: 560px;
}

/* =============================================
   CARD HEADER - PREMIUM VISUAL
   ============================================= */
.kz-auth-header {
    padding: 3rem 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(180deg,
            rgba(99, 102, 241, 0.08) 0%,
            transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

/* Gradient line at top */
.kz-auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--saas-accent-1, #6366f1), transparent);
    border-radius: 2px;
}

.kz-auth-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.75rem;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.2) 0%,
            rgba(34, 211, 238, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #a5b4fc;
    position: relative;
    animation: iconFloat 4s ease-in-out infinite;
}

/* Glow ring */
.kz-auth-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--saas-accent-1, #6366f1), var(--saas-accent-2, #22d3ee));
    opacity: 0;
    z-index: -1;
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes iconGlow {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

.kz-auth-title {
    font-family: var(--saas-font-display, 'Space Grotesk', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--saas-text-primary, #f1f5f9);
    margin: 0;
    letter-spacing: -0.02em;
}

.kz-auth-subtitle {
    font-size: 1rem;
    color: var(--saas-text-muted, #64748b);
    margin: 0.75rem 0 0;
    line-height: 1.5;
}

/* =============================================
   CARD BODY - FORM AREA
   ============================================= */
.kz-auth-body {
    padding: 2.5rem;
}

/* =============================================
   FORM ELEMENTS - ULTRA PREMIUM
   ============================================= */
.kz-form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.kz-form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--saas-text-secondary, #94a3b8);
    margin-bottom: 0.625rem;
    transition: color 0.2s ease;
}

.kz-form-label i {
    font-size: 1rem;
    opacity: 0.7;
}

.kz-form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--saas-text-primary, #f1f5f9);
    font-family: var(--saas-font-body, 'Inter', sans-serif);
    font-size: 1rem;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.kz-form-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

/* Hover state */
.kz-form-input:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

/* Focus state - Premium glow */
.kz-form-input:focus {
    outline: none;
    border-color: var(--saas-accent-1, #6366f1);
    background: rgba(99, 102, 241, 0.05);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 0 30px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

/* Label color change on focus */
.kz-form-group:focus-within .kz-form-label {
    color: var(--saas-accent-1, #6366f1);
}

.kz-form-group:focus-within .kz-form-label i {
    opacity: 1;
}

/* Two column layout */
.kz-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Form hint text */
.kz-form-hint {
    font-size: 0.8rem;
    color: var(--saas-text-muted, #64748b);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =============================================
   TAB SWITCH - LOGIN PAGE
   ============================================= */
.kz-login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.kz-tab-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--saas-text-muted, #64748b);
    font-family: var(--saas-font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.kz-tab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--saas-text-secondary, #94a3b8);
}

.kz-tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
    color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

/* =============================================
   SUBMIT BUTTON - PREMIUM CTA
   ============================================= */
.kz-auth-submit {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: var(--saas-font-display, 'Space Grotesk', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.3s ease;
    box-shadow:
        0 8px 30px rgba(99, 102, 241, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Shine effect */
.kz-auth-submit::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 ease;
}

.kz-auth-submit:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 40px rgba(99, 102, 241, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.kz-auth-submit:hover::before {
    left: 100%;
}

.kz-auth-submit:active {
    transform: translateY(-1px);
}

/* Loading state */
.kz-auth-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.kz-auth-submit.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: buttonSpin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes buttonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   CARD FOOTER
   ============================================= */
.kz-auth-footer {
    padding: 1.5rem 2.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.15);
}

.kz-auth-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--saas-text-muted, #64748b);
}

.kz-auth-footer a {
    color: var(--saas-accent-1, #6366f1);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.kz-auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--saas-accent-1, #6366f1);
    transition: width 0.3s ease;
}

.kz-auth-footer a:hover {
    color: #818cf8;
}

.kz-auth-footer a:hover::after {
    width: 100%;
}

/* =============================================
   ALERTS - NOTIFICATIONS
   ============================================= */
.kz-auth-alert {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    animation: alertSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.kz-auth-alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kz-auth-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.kz-auth-alert.success::before {
    background: #10b981;
}

.kz-auth-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.kz-auth-alert.error::before {
    background: #ef4444;
}

.kz-auth-alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.kz-auth-alert.warning::before {
    background: #f59e0b;
}

.kz-auth-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* =============================================
   FORM VALIDATION
   ============================================= */
.kz-form-input.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.kz-form-input.is-invalid:focus {
    box-shadow:
        0 0 0 4px rgba(239, 68, 68, 0.12),
        0 0 30px rgba(239, 68, 68, 0.1);
}

.kz-form-input.is-valid {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.kz-invalid-feedback {
    font-size: 0.8rem;
    color: #fca5a5;
    margin-top: 0.5rem;
    display: none;
    align-items: center;
    gap: 6px;
}

.kz-form-input.is-invalid~.kz-invalid-feedback {
    display: flex;
}

/* =============================================
   PASSWORD STRENGTH INDICATOR
   ============================================= */
.kz-password-strength {
    margin-top: 0.75rem;
    display: flex;
    gap: 4px;
}

.kz-strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.kz-strength-bar.weak {
    background: #ef4444;
}

.kz-strength-bar.medium {
    background: #f59e0b;
}

.kz-strength-bar.strong {
    background: #10b981;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 576px) {
    .kz-auth-container {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .kz-auth-card {
        border-radius: 24px;
        max-width: 100%;
    }

    .kz-auth-header {
        padding: 2.5rem 1.75rem 1.75rem;
    }

    .kz-auth-body {
        padding: 1.75rem;
    }

    .kz-auth-footer {
        padding: 1.25rem 1.75rem;
    }

    .kz-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .kz-auth-icon {
        width: 72px;
        height: 72px;
        font-size: 1.8rem;
    }

    .kz-auth-title {
        font-size: 1.6rem;
    }

    .kz-auth-subtitle {
        font-size: 0.9rem;
    }

    .kz-auth-orb-1 {
        width: 400px;
        height: 400px;
        top: -150px;
        right: -150px;
    }

    .kz-auth-orb-2 {
        width: 300px;
        height: 300px;
        bottom: -100px;
        left: -150px;
    }
}

/* =============================================
   ANIMATIONS & SPECIAL EFFECTS
   ============================================= */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.kz-auth-card.shake {
    animation: shake 0.5s ease-in-out;
}

/* Focus visible for accessibility */
.kz-form-input:focus-visible,
.kz-auth-submit:focus-visible,
.kz-tab-btn:focus-visible {
    outline: 2px solid var(--saas-accent-1, #6366f1);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .kz-auth-orb,
    .kz-auth-orb-1,
    .kz-auth-orb-2,
    .kz-auth-orb-3,
    .kz-auth-icon,
    .kz-auth-card::before {
        animation: none;
    }

    .kz-auth-card {
        animation: none;
        opacity: 1;
    }
}