/* ==========================================================================
   SMARTTRADER360 - KESİN MOBİL UYUMLULUK VE PREMIUM TASARIM CSS
   ========================================================================== */

* {
    box-sizing: border-box !important; /* Genişlik hesaplamalarını sabitleyen hayati kural */
    padding: 0;
    margin: 0;
}

html, body {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100dvh;
    background-color: #030712;
    overflow-x: hidden !important; /* Sağa sola yatay kaymayı tamamen engeller */
    position: relative;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at 10% 15%, rgba(14, 165, 233, 0.12), transparent 35%),
        radial-gradient(circle at 90% 85%, rgba(147, 51, 234, 0.1), transparent 40%),
        #030712;
    color: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

/* Ana Kapsayıcı - Kartı her ekranda esnek şekilde ortalar */
.auth-page-container {
    display: flex;
    width: 100%;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Kayıt Kartı - Fluid (Akışkan) Yapı */
.auth-card {
    width: 100%;
    max-width: 420px; /* Maksimum genişlik sınırlandı */
    padding: 40px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(8, 13, 28, 0.95));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

/* Marka ve Başlık Alanı */
.auth-brand {
    margin-bottom: 28px;
    text-align: center;
}

.auth-brand span {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.auth-card h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 70%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.demo-info {
    margin-top: 8px;
    color: #64748b;
    font-size: 13.5px;
    line-height: 1.4;
}

/* Form Düzeni */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* İnput Alanları */
.auth-input {
    width: 100% !important;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 18, 30, 0.7) !important;
    color: #f8fafc !important;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(13, 18, 30, 0.9) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.auth-input::placeholder {
    color: #475569;
}

/* GÖRSEL 3'TEKİ ÇİRKİN SARI OTO-DOLDURMA (AUTOFILL) RENGİNİ SİLME */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #0d121e inset !important; /* Sarı rengi bu koyu tona gömer */
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
}

/* GÖRSEL 3'TEKİ SÖZLEŞME METNİNİN SAĞA TAŞMASINI ÇÖZEN SİHİRLİ KISIM */
.terms-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100% !important;
    padding: 4px 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    box-sizing: border-box;
}

.terms-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px; /* Kutunun sıkışıp küçülmesini engeller */
    flex-shrink: 0;   /* Flexbox'ın kutuyu ezmesini önler */
    margin-top: 2px;
    accent-color: #0ea5e9;
}

.terms-box span {
    flex: 1; /* Yazının kalan tüm alanı kaplayıp aşağı kaymasını sağlar */
    min-width: 0; /* Flexbox text-wrap bug'ını çözer */
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Buton */
.auth-btn {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5ff 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.auth-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Alt Linkler (Görsel 5'teki Taşmayı Önleyen Düzen) */
.auth-links {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.auth-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #38bdf8;
}

/* Hata Kutusu */
.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 12px;
    border-radius: 12px;
    font-size: 13.5px;
    text-align: center;
    margin-bottom: 16px;
}

/* ==========================================================================
   ULTRA AGRESİF MOBİL EKALİBRASYONU (KAYMAYA KARŞI SON SAVUNMA Hattı)
   ========================================================================== */
@media (max-width: 480px) {
    .auth-page-container {
        padding: 12px; /* Ekran kenar boşluğunu daralttık */
    }

    .auth-card {
        padding: 28px 20px !important; /* İç boşluğu azalttık, form elementlerine alan açtık */
        border-radius: 20px;
        max-width: 100% !important; /* Kartın genişliğini ekrana kilitledik */
    }

    .auth-card h1 {
        font-size: 22px;
    }

    .auth-input, .auth-btn {
        min-height: 48px;
        font-size: 14px;
    }
}