:root {
    /* MASTER COLORS (Focus & Contrast) */
    --primary-blue: #0284c7;
    /* Sky Blue 600 */
    --deep-blue: #0c4a6e;
    /* Sky Blue 900 */
    --accent-blue: #38bdf8;
    /* Light Blue 400 */

    /* SLAVE COLORS (Support & Surfaces) */
    --bg-surface: rgba(15, 23, 42, 0.9);
    /* Dark surface for contrast on light BG */
    --glass-border: rgba(255, 255, 255, 0.1);

    /* TEXT HIERARCHY */
    --text-master: #ffffff;
    --text-slave: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Public Sans', -apple-system, sans-serif !important;
}

body {
    background-color: #f0f9ff;
    color: var(--text-master);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    /* Küçük ekranlarda kaydırma için */
    position: relative;
    font-family: 'Public Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    /* Mobil dokunma parlamasını kaldır */
}

/* iOS Safari pürüzsüz kaydırma */
* {
    -webkit-overflow-scrolling: touch;
}

/* Dinamik Gökyüzü Mavisi Arka Plan */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.mesh-bg span {
    position: absolute;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.7;
    animation: mesh-float 30s infinite alternate;
}

.mesh-bg span:nth-child(1) {
    background: #7dd3fc;
    top: -20%;
    left: -10%;
}

.mesh-bg span:nth-child(2) {
    background: #38bdf8;
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.mesh-bg span:nth-child(3) {
    background: #ffffff;
    top: 40%;
    left: 30%;
    opacity: 0.4;
    width: 40vw;
    height: 40vw;
}

@keyframes mesh-move {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(15%, 15%) scale(1.3) rotate(45deg);
    }
}

@keyframes mesh-float {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-20%, -40%) rotate(180deg) scale(1.2);
    }
}


/* 2. Ana Mimari */
.auth-wrapper {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 40px;
    z-index: 10;
}

/* 3. Maskot Etkileşim Katmanı (Kart içine entegre - Daire) */
.mascot-container {
    position: absolute;
    top: -85px;
    /* Karttan daha fazla bağımsız durması için artırıldı */
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    z-index: 20;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Daire Stili - Kart ile tam senkronize */
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Safari Fix */
    border: 3px solid rgba(20, 105, 190, 0.4);
    border-radius: 50%;
    padding: 15px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(20, 105, 190, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Etkileşim için SVG İç Sınıfları (Blade tarafında ID'ler ile eşleşir) */
#MaksenMaskot .pupil {
    transition: transform 0.3s ease-out, opacity 0.3s;
}

#MaksenMaskot .hand-left,
#MaksenMaskot #kollarveeller {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-in-out;
    transform-origin: center;
    opacity: 0;
    transform: translateY(5000px);
    pointer-events: none;
}

/* E-posta Odağı - Takip Etme */
body:has(.email-field:focus) .mascot-container {
    transform: translateX(-50%) translateY(5px);
}

body:has(.email-field:focus) #MaksenMaskot .pupil {
    transform: translate(1500px, 800px);
}

/* SVG İçi Stiller Buraya Taşındı */
#MaksenMaskot .pupil-group {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.mascot-look-down .pupil-group {
    transform: translate(1200px, 1500px);
}

.mascot-cover-eyes #kollarveeller {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease-out;
}

.mascot-cover-eyes .pupil-group {
    opacity: 0;
}

body:has(.password-field:focus) #MaksenMaskot #kollarveeller {
    opacity: 1;
    transform: translateY(0);
}

/* 4. Kurumsal Giriş Kartı (High Contrast Glass) */
.auth-card {
    flex: 0 0 420px;
    background: var(--bg-surface);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 100px 44px 48px 44px;
    /* Üst boşluk artırıldı */
    box-shadow: 0 40px 100px -20px rgba(12, 74, 110, 0.3);
    position: relative;
    margin-top: 60px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card-version {
    position: absolute;
    bottom: 12px;
    right: 20px;
    opacity: 0.5;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: var(--text-master);
    pointer-events: none;
}

.auth-header.text-center {
    width: 100%;
}

.portal-logo-text {
    font-size: 2.1rem !important;
    font-weight: 800 !important;
    letter-spacing: -1px;
    margin: 0 !important;
    color: var(--text-master);
    text-align: center;
    display: block;
    width: 100%;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

.portal-logo-text span {
    font-weight: 300 !important;
    color: var(--accent-blue);
    text-transform: none;
}

/* Apple Style Cam Girdiler */
.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 20px 18px 54px;
    color: #FFFFFF;
    font-size: 16px;
    /* iOS Auto-Zoom fix */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    -webkit-appearance: none;
    /* iOS Default styling removal */
    appearance: none;
}

.auth-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}


.auth-header {
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 5. Girdiler (Üretim Standartları) */
.form-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.input-group {
    position: relative;
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 20px 16px 52px;
    color: var(--text-main);
    font-size: 16px;
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(20, 105, 190, 0.15);
}

.input-group i:not(.bx-show):not(.bx-low-vision) {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 1.4rem;
    pointer-events: none;
}

.login-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s;
}

.login-toggle-btn:hover {
    color: var(--text-main);
}

/* 6. Switch ve Aksiyon Alanı */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
}

.ios-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ios-switch input {
    display: none;
}

.switch-body {
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.switch-body::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

input:checked+.switch-body {
    background: var(--primary-blue);
}

input:checked+.switch-body::after {
    transform: translateX(18px);
}

.forget-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.forget-link:hover {
    color: var(--primary-blue);
}

.auth-btn {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 18px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 32px;
    cursor: pointer;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.auth-btn:hover:not(:disabled) {
    background: #1d79d1;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20, 105, 190, 0.2);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 7. OTP Basamakları */
.otp-group {
    display: flex;
    gap: 12px;
    margin: 40px 0;
}

.otp-digit {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
}

.otp-digit:focus {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.08);
}

/* Temel Duyarlı Tasarım (Responsive) */
@media (max-width: 1024px) {
    .auth-wrapper {
        flex-direction: column;
        gap: 40px;
        padding: 60px 20px;
        align-items: center;
        min-height: auto;
    }

    .mascot-container {
        justify-content: center;
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin: -80px auto 20px auto;
        /* Yukarıda kartın dışına taşır, aşağıyı iter */
        z-index: 30;
    }

    .mascot-svg {
        max-width: 280px;
    }

    .auth-card {
        flex: none;
        width: 100%;
        max-width: 440px;
        padding-top: 60px;
        /* Üst boşluk dengelendi */
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 80px 24px 40px 24px;
        border-radius: 28px;
    }

    .mascot-svg {
        max-width: 220px;
    }

    .portal-logo-text {
        font-size: 1.8rem !important;
    }

    .auth-input {
        padding: 16px 20px 16px 48px;
        font-size: 16px;
    }
}

/* iOS Safe Area Fixes */
@supports (padding: env(safe-area-inset-bottom)) {
    .auth-wrapper {
        padding-top: calc(40px + env(safe-area-inset-top));
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}

[x-cloak] {
    display: none !important;
}

.a11y-hidden {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   Auth Utility Classes
   ═══════════════════════════════════════════════════════════ */
.auth-subtitle {
    color: var(--accent-blue);
    margin-top: 5px;
    font-weight: 500;
}

.auth-desc {
    color: var(--text-slave);
    font-size: 0.9rem;
}

.auth-highlight {
    color: var(--accent-blue);
    font-weight: 700;
}

.auth-countdown-label {
    color: #ef4444;
    font-weight: 700;
    font-size: 1.1rem;
}

.auth-countdown-inline {
    color: #ef4444;
    font-weight: 700;
}

.auth-error-icon {
    color: #ef4444;
    font-size: 4rem;
    margin-bottom: 20px;
}

.auth-text-muted {
    color: var(--text-slave);
}

.auth-btn.auth-btn-tight {
    margin-top: 20px;
}

.auth-primary-text {
    color: var(--primary-blue);
}

/* ═══════════════════════════════════════════════════════════
   Mascot Eye Tracking
   ═══════════════════════════════════════════════════════════ */
.pupil-group {
    transition: transform 0.05s linear;
}

.mascot-state-password #kollarveeller {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.mascot-state-password .pupil-group {
    transform: translate(0px, 0px) !important;
}