/* ==========================================================================
   NOBLE PREMIUM ADMIN LOGIN STYLESHEET
   UI/UX: Minimalist, Quiet Luxury, Animated Dot-Matrix, Full Mobile Responsive
   ========================================================================== */

:root {
    --bg-main: #060504;
    --card-bg: rgba(15, 12, 10, 0.65);
    --noble-gold: #c5a880;
    --noble-gold-dim: rgba(197, 168, 128, 0.3);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.45);
    --border-subtle: rgba(197, 168, 128, 0.15);
    --input-bg: rgba(255, 255, 255, 0.02);
    --error-color: #ff453a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden; /* Mobilde yatay kaymayı kesinlikle engeller */
    position: relative;
    
    /* 404 Sayfasındaki Noktalı (Dot-Matrix) Arka Plan */
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    background-position: 0 0;
}

/* ==========================================================================
   1. BACKGROUND CHOREOGRAPHY (YANIP SÖNEN NOKTALAR)
   ========================================================================== */
.portal-aurora {
    position: fixed; /* Mobilde kaydırma yapıldığında arka planın sabit kalması için fixed yapıldı */
    inset: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(197, 168, 128, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(197, 168, 128, 0.04) 0%, transparent 50%);
    filter: blur(40px);
    animation: dotMatrixScanner 18s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes dotMatrixScanner {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-5%, 8%) scale(1.1); opacity: 1; }
    100% { transform: translate(8%, -5%) scale(0.9); opacity: 0.6; }
}

/* ==========================================================================
   2. LOGIN CARD & ENTRANCE ANIMATIONS
   ========================================================================== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    perspective: 1000px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    
    animation: cardFloatIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: center bottom;
}

@keyframes cardFloatIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.95) rotateX(5deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

.login-header { animation: fadeInUp 0.8s ease backwards; animation-delay: 0.2s; }
.login-form { animation: fadeInUp 0.8s ease backwards; animation-delay: 0.4s; }
.login-footer { animation: fadeInUp 0.8s ease backwards; animation-delay: 0.6s; }

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. BRANDING & HEADER
   ========================================================================== */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo img {
    width: 140px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 12px rgba(197, 168, 128, 0.2));
    transition: filter 0.5s ease;
}

.brand-logo img:hover {
    filter: drop-shadow(0 0 25px rgba(197, 168, 128, 0.5));
}

.login-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--noble-gold);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==========================================================================
   4. FORM INPUTS & FLOATING LABELS
   ========================================================================== */
.input-group {
    position: relative;
    margin-bottom: 28px;
}

.input-group input {
    width: 100%;
    padding: 16px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 16px; /* iOS Safari otomatik Zoom engellemesi için 16px kritik */
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 4px;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    background-color: #0d0b09;
    color: var(--noble-gold);
    letter-spacing: 1px;
}

.input-group input:focus {
    border-color: var(--noble-gold);
    box-shadow: 0 0 15px rgba(197, 168, 128, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 5px; /* Mobilde tıklama alanını büyütür */
}

.toggle-password:hover {
    color: var(--noble-gold);
    transform: translateY(-50%) scale(1.1);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   5. INTERACTIVE ELEMENTS (CHECKBOX & BUTTON)
   ========================================================================== */
.form-actions-row {
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: max-content;
}

.remember-me input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.remember-me input:checked + .checkbox-custom {
    background: var(--noble-gold);
    border-color: var(--noble-gold);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.3);
}

.remember-me input:checked + .checkbox-custom::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me .label-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.remember-me:hover .label-text {
    color: var(--text-main);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.1), rgba(197, 168, 128, 0.02));
    border: 1px solid var(--border-subtle);
    color: var(--noble-gold);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: buttonGlowPulse 3s infinite alternate ease-in-out;
}

@keyframes buttonGlowPulse {
    0% { box-shadow: 0 0 5px rgba(197, 168, 128, 0.05); }
    100% { box-shadow: 0 0 20px rgba(197, 168, 128, 0.2); border-color: rgba(197, 168, 128, 0.4); }
}

.btn-submit:hover {
    background: var(--noble-gold);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 168, 128, 0.3);
    animation: none;
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-submit.loading .btn-text { opacity: 0; }
.btn-submit.loading .btn-loader {
    opacity: 1;
    animation: spinLoader 0.6s linear infinite;
}

@keyframes spinLoader {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   6. FEEDBACK & ALERTS
   ========================================================================== */
.form-feedback {
    display: flex;
    align-items: center;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 10px;
    margin-bottom: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-feedback.active {
    opacity: 1;
    max-height: 60px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.feedback-icon {
    color: var(--error-color);
    margin-right: 12px;
    font-weight: bold;
}

.feedback-text {
    font-size: 0.85rem;
    color: #ffb3b0;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.login-footer {
    text-align: center;
    margin-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.login-footer span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN (TAM MOBİL UYUM)
   ========================================================================== */

/* Standart Akıllı Telefonlar */
@media (max-width: 576px) {
    body {
        background-size: 20px 20px; /* Noktalar mobilde daha sık dursun */
    }

    .login-container {
        padding: 16px;
    }

    .login-card {
        padding: 40px 24px; /* Mobilde ekranı tam kullanmak için iç boşluklar küçültüldü */
        border-radius: 20px;
    }

    .brand-logo img {
        width: 120px;
        margin-bottom: 20px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-header h1 {
        font-size: 0.95rem;
        letter-spacing: 3px;
    }

    .login-header p {
        font-size: 0.8rem;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .input-group input {
        padding: 15px 14px;
    }

    .btn-submit {
        padding: 15px;
        font-size: 0.85rem;
    }
}

/* Küçük Ekranlı Telefonlar (iPhone SE vb.) */
@media (max-width: 360px) {
    .login-card {
        padding: 32px 16px;
    }
    
    .brand-logo img {
        width: 110px;
    }
    
    .login-header h1 {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .form-actions-row {
        margin-bottom: 24px;
    }
}

/* Yatay (Landscape) Mobil Kullanım ve Kısa Ekranlar */
@media (max-height: 650px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        overflow-y: auto; /* Dikey kaydırmaya izin ver */
    }
    
    .login-container {
        margin: auto 0;
    }
}