/* --- Form Izgara (Grid) Yapısı --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* --- Form Input Grupları & Elemanları --- */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.input-group label,
.input-group .form-label,
.input-group .control-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group input,
.input-group select,
.input-group textarea,
.input-group .form-control {
    width: 100%;
    padding: 11px 15px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.input-group textarea {
    resize: vertical;
    min-height: 90px;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #94a3b8;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus,
.input-group .form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15);
}

.input-group select {
    cursor: pointer;
}

/* Şifre Alanı ve Göz İkonu */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    box-shadow: none !important;
}

.toggle-password:hover {
    color: #2563eb;
}

/* --- Form Butonları --- */
button#btnsubmit,
.btn-login-submit {
    width: 100%;
    margin-top: 12px;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.25s ease;
    font-family: inherit;
}

button#btnsubmit:hover,
.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Giriş Tipi Seçim Butonları (Segmented Toggle) */
.login-type {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    margin-bottom: 22px;
}

.login-type a,
.login-type button {
    margin: 0;
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    color: #64748b;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: none;
    font-family: inherit;
}

.login-type a.active,
.login-type button.active {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.login-type a.active:hover,
.login-type button.active:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.login-type a.active i,
.login-type button.active i {
    color: #ffffff;
}

.login-type a:hover:not(.active),
.login-type button:hover:not(.active) {
    background: #e2e8f0;
    color: #1e293b;
    transform: none;
}

/* --- Form Yardımcı Sınıfları & Checkbox --- */
.full-width {
    grid-column: 1 / -1;
}

.checkbox {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 0.88rem;
}

.checkbox input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

/* --- Bağlantılar, Ayırıcılar ve Şifremi Unuttum --- */
.login-divider {
    display: flex;
    align-items: center;
    margin: 22px 0 16px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.login-divider span {
    padding: 0 12px;
}

.register-callout {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.register-callout a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.register-callout a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.8rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* --- Form Hata / Validasyon Mesajları --- */
.text-danger {
    color: #dc2626;
}

.field-validation-error,
.text-danger.small.field-validation-error {
    display: block;
    margin-top: 4px;
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
}

#btnmesaj {
    display: none;
    width: 100%;
    padding: 12px 16px;
    margin: 12px 0 16px 0;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.5;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

/* Boş olduğunda kesinlikle gizli tut */
#btnmesaj:empty {
    display: none !important;
}

/* JS tarafından display:initial veya block verildiğinde modern flex düzenini koru */
#btnmesaj[style*="display: initial"],
#btnmesaj[style*="display: inline"],
#btnmesaj[style*="display: block"],
#btnmesaj.show {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

/* Otomatik FontAwesome Hata İkonu */
#btnmesaj::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ef4444;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Backend'den gelen <b style='color:red; padding:7px;'> etiketinin stilini temizle */
#btnmesaj b,
#btnmesaj strong {
    color: inherit !important;
    padding: 0 !important;
    font-weight: 600 !important;
    display: inline !important;
}

.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.warning::before {
    content: "⚠️";
    font-size: 1.1rem;
}

.success-message {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    border-radius: 12px;
    color: #334155;
    line-height: 1.7;
    font-size: 0.92rem;
}

.success-message p {
    margin: 0 0 12px;
    text-align: left;
    color: #475569;
}

.success-message p:last-child {
    margin-bottom: 0;
}

.success-message strong {
    color: #15803d;
}

.success-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

/* --- Mobil Uyum (Form İçin) --- */
@media(max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: 1;
    }
}

/* --- SMS Doğrulama & Geri Sayım Sayacı (Countdown Timer) Stilleri --- */
.sms-info-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    color: #1e3a8a;
    font-size: 0.88rem;
    line-height: 1.45;
}

.sms-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sms-info-text {
    flex: 1;
}

.sms-info-text strong {
    color: #1e3a8a;
    font-weight: 700;
}

/* 6 Haneli OTP Kod Kutuları */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 16px;
}

.otp-input {
    width: 46px;
    height: 54px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.otp-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.18);
    background: #f8fafc;
}

.otp-input.filled {
    border-color: #3b82f6;
    background: #f0fdf4;
}

/* Dinamik Geri Sayım Sayacı Rozeti */
.countdown-timer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 18px 0;
    gap: 10px;
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.countdown-badge.active {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.countdown-badge.expired {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.countdown-time {
    font-family: 'Inter', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Tekrar Kod Gönder Butonu */
.btn-resend-sms {
    background: transparent;
    border: none;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-resend-sms:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-resend-sms:not(:disabled):hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-resend-sms i {
    transition: transform 0.3s ease;
}

.btn-resend-sms:not(:disabled):hover i {
    transform: rotate(180deg);
}

/* --- Matematiksel Güvenlik Doğrulama Kodu (Captcha) Stilleri --- */
.captcha-group {
    margin-bottom: 16px;
}

.captcha-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.captcha-question-box {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    user-select: none;
}

.captcha-text {
    font-family: 'Inter', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: 1px;
}

.btn-refresh-captcha {
    background: transparent;
    border: none;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: none !important;
}

.btn-refresh-captcha:hover {
    background: #dbeafe;
    color: #1d4ed8;
    transform: rotate(180deg);
}

.captcha-input {
    width: 105px !important;
    text-align: center;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    padding: 10px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.captcha-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15) !important;
    background: #f8fafc !important;
}


