/* ========================================
   AI Muhasebe — Materialize Pro Auth Pages
   Referans: auth-login-basic.html
   ======================================== */

/* ── CSS değişkenleri ─────────────────────── */
:root {
    --mat-auth-primary: #7c6bf5;
    --mat-auth-primary-dark: #6554d9;
    --mat-auth-primary-light: #e8e4fd;
    --mat-auth-bg: #f5f5f9;
    --mat-auth-card-bg: #ffffff;
    --mat-auth-text: #4b465c;
    --mat-auth-text-heading: #3a3541;
    --mat-auth-text-muted: #a5a3ae;
    --mat-auth-border: #dbdade;
    --mat-auth-radius: 0.375rem;
    --mat-auth-card-radius: 0.5rem;
    --mat-auth-shadow: 0 2px 6px rgba(75, 70, 92, 0.1);
    --mat-auth-inner-max-width: 450px;
}

/* ── Genel reset ──────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ── Arkaplan ─────────────────────────────── */
.mat-auth-body {
    background: var(--mat-auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    color: var(--mat-auth-text);
    font-size: 0.9375rem;
    line-height: 1.5;
    overflow: hidden;
}

/* ── Wrapper ──────────────────────────────── */
.mat-auth-wrapper {
    display: flex;
    flex-basis: 100%;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mat-auth-inner {
    width: 100%;
    max-width: var(--mat-auth-inner-max-width);
    padding: 1.5rem 0;
}

/* ── Kart ─────────────────────────────────── */
.mat-auth-card {
    background: var(--mat-auth-card-bg);
    border-radius: var(--mat-auth-card-radius);
    box-shadow: var(--mat-auth-shadow);
    padding: 2rem;
    animation: mat-auth-in 0.35s ease-out;
}

@keyframes mat-auth-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo / Brand ─────────────────────────── */
.mat-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.mat-auth-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--mat-auth-primary), var(--mat-auth-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    flex-shrink: 0;
}

.mat-auth-brand-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--mat-auth-text-heading);
    letter-spacing: -0.01em;
}

/* ── Başlıklar ────────────────────────────── */
.mat-auth-card .mat-auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mat-auth-text-heading);
    margin: 0 0 0.25rem;
}

.mat-auth-card .mat-auth-subtitle {
    font-size: 0.875rem;
    color: var(--mat-auth-text-muted);
    margin: 0 0 1.5rem;
}

/* ── Form floating outline ────────────────── */
.mat-form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.mat-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--mat-auth-text);
    margin-bottom: 0.375rem;
}

.mat-form-group .mat-input {
    display: block;
    width: 100%;
    padding: 0.5625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--mat-auth-text);
    background-color: var(--mat-auth-card-bg);
    border: 1px solid var(--mat-auth-border);
    border-radius: var(--mat-auth-radius);
    outline: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: inherit;
}

.mat-form-group .mat-input::placeholder {
    color: var(--mat-auth-text-muted);
}

.mat-form-group .mat-input:focus {
    border-color: var(--mat-auth-primary);
    box-shadow: 0 0 0 0.125rem rgba(124, 107, 245, 0.2);
}

.mat-form-group .mat-input.is-invalid {
    border-color: #ff4d49;
}

/* ── Şifre göster/gizle grubu ─────────────── */
.mat-password-group {
    position: relative;
    display: flex;
}

.mat-password-group .mat-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    flex: 1;
}

.mat-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.875rem;
    background: var(--mat-auth-card-bg);
    border: 1px solid var(--mat-auth-border);
    border-left: none;
    border-radius: 0 var(--mat-auth-radius) var(--mat-auth-radius) 0;
    cursor: pointer;
    color: var(--mat-auth-text-muted);
    font-size: 1.125rem;
    transition: color 0.15s ease;
}

.mat-password-toggle:hover {
    color: var(--mat-auth-text);
}

.mat-password-group:focus-within .mat-password-toggle {
    border-color: var(--mat-auth-primary);
}

.mat-password-group:focus-within .mat-input {
    border-color: var(--mat-auth-primary);
    box-shadow: 0 0 0 0.125rem rgba(124, 107, 245, 0.2);
}

.mat-password-group:focus-within .mat-password-toggle {
    box-shadow: 0.125rem 0 0 0 rgba(124, 107, 245, 0.2), 0 0.125rem 0 0 rgba(124, 107, 245, 0.2), 0 -0.125rem 0 0 rgba(124, 107, 245, 0.2);
}

/* ── Remember + forgot row ────────────────── */
.mat-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    margin-top: 0.375rem;
}

.mat-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--mat-auth-text);
    cursor: pointer;
}

.mat-check-item input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    border: 1.5px solid var(--mat-auth-border);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--mat-auth-primary);
}

.mat-auth-link {
    color: var(--mat-auth-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.mat-auth-link:hover {
    color: var(--mat-auth-primary-dark);
    text-decoration: underline;
}

/* ── Gönder butonu ────────────────────────── */
.mat-btn-primary {
    display: block;
    width: 100%;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    background: var(--mat-auth-primary);
    border: 1px solid var(--mat-auth-primary);
    border-radius: var(--mat-auth-radius);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    font-family: inherit;
}

.mat-btn-primary:hover {
    background: var(--mat-auth-primary-dark);
    border-color: var(--mat-auth-primary-dark);
    box-shadow: 0 2px 8px rgba(124, 107, 245, 0.35);
}

.mat-btn-primary:active {
    transform: scale(0.98);
}

.mat-btn-primary i {
    margin-right: 0.375rem;
}

/* ── Alert / Bildirim kutuları ─────────────── */
.mat-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--mat-auth-radius);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.mat-auth-alert i {
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.mat-auth-alert.is-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
}

.mat-auth-alert.is-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

.mat-auth-alert.is-info {
    background: var(--mat-auth-primary-light);
    border: 1px solid #c5bef7;
    color: #5344a8;
}

/* ── Bilgi kutusu (forgot password) ───────── */
.mat-info-box {
    background: var(--mat-auth-primary-light);
    border: 1px solid #c5bef7;
    border-radius: var(--mat-auth-radius);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #5344a8;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.mat-info-box i {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 1px;
}

/* ── Geri dön linki (forgot password) ─────── */
.mat-back-link {
    color: var(--mat-auth-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.mat-back-link:hover {
    color: var(--mat-auth-primary);
}

.mat-back-link i {
    font-size: 1.25rem;
}

/* ── Turnstile CAPTCHA ────────────────────── */
.cf-turnstile {
    display: flex;
    justify-content: flex-start;
}

/* ── Şifre grubu validasyon mesajı: alt satıra indir ── */
.mat-password-group {
    flex-wrap: wrap;
}

.mat-password-group .v-message {
    flex-basis: 100%;
    order: 3;
    margin-top: 4px;
}

/* ── Geri sayım kutusu (forgot password) ──── */
.mat-countdown-box {
    text-align: center;
    padding: 1.5rem;
    margin-top: 0.5rem;
}

.mat-countdown-icon {
    font-size: 2.5rem;
    color: var(--mat-auth-primary);
    margin-bottom: 0.75rem;
    animation: mat-pulse 2s ease-in-out infinite;
}

.mat-countdown-text {
    font-size: 0.875rem;
    color: var(--mat-auth-text-muted);
    margin-bottom: 0.75rem;
}

.mat-countdown-timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mat-auth-primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.mat-countdown-bar-wrap {
    width: 100%;
    height: 4px;
    background: var(--mat-auth-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.mat-countdown-bar {
    height: 100%;
    width: 0;
    background: var(--mat-auth-primary);
    border-radius: 2px;
    transition: width 1s linear;
}

.mat-countdown-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--mat-auth-text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.mat-countdown-link:hover {
    color: var(--mat-auth-primary);
}

@keyframes mat-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Divider ──────────────────────────────── */
.mat-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    font-size: 0.8125rem;
    color: var(--mat-auth-text-muted);
}

.mat-auth-divider::before,
.mat-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mat-auth-border);
}

/* ── Alt metin ────────────────────────────── */
.mat-auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--mat-auth-text-muted);
    margin-top: 1.25rem;
}

/* ── Arka plan dekor ──────────────────────── */
.mat-auth-mask {
    position: absolute;
    z-index: -1;
    width: 100%;
    bottom: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 480px) {
    .mat-auth-card {
        padding: 1.5rem 1.25rem;
    }

    .mat-auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .mat-otp-wrapper input {
        width: 36px;
        height: 42px;
        font-size: 1.125rem;
    }

    .mat-social-login {
        gap: 0.5rem;
    }
}

/* ── Form hint ────────────────────────────── */
.mat-form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--mat-auth-text-muted);
    margin-top: 0.25rem;
}

/* ========================================
   2FA — OTP Doğrulama Ekranı Stilleri
   Referans: Materialize auth-two-steps
   ======================================== */

/* İkon dairesel arka plan */
.mat-auth-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--mat-auth-primary-light);
    color: var(--mat-auth-primary);
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* 2FA mesaj metni */
.mat-otp-desc {
    text-align: center;
    color: var(--mat-auth-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* OTP giriş alanları sarmalayıcısı */
.mat-otp-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.mat-otp-wrapper input {
    width: 44px;
    height: 50px;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--mat-auth-text-heading);
    background: var(--mat-auth-card-bg);
    border: 1.5px solid var(--mat-auth-border);
    border-radius: var(--mat-auth-radius);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-appearance: textfield;
}

.mat-otp-wrapper input::-webkit-outer-spin-button,
.mat-otp-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mat-otp-wrapper input:focus {
    border-color: var(--mat-auth-primary);
    box-shadow: 0 0 0 3px rgba(124, 107, 245, 0.15);
}

.mat-otp-wrapper input.is-filled {
    border-color: var(--mat-auth-primary);
    background: var(--mat-auth-primary-light);
}

/* Tekrar gönder linki */
.mat-resend-row {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--mat-auth-text-muted);
}

.mat-resend-row a {
    color: var(--mat-auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.mat-resend-row a:hover {
    text-decoration: underline;
}

/* Tip bilgi kutusu */
.mat-otp-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: var(--mat-auth-radius);
    font-size: 0.8125rem;
    color: #795548;
}

.mat-otp-tip i {
    font-size: 1.125rem;
    color: #f9a825;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ========================================
   Register — Kayıt Ekranı Stilleri
   Referans: Materialize auth-register
   ======================================== */

/* Floating label alan sarmalayıcısı */
.mat-floating-group {
    position: relative;
    margin-bottom: 1rem;
}

.mat-floating-group .mat-input {
    padding-top: 1.25rem;
    padding-bottom: 0.375rem;
}

.mat-floating-group .mat-floating-label {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: var(--mat-auth-text-muted);
    pointer-events: none;
    transition: all 0.15s ease;
    background: transparent;
}

.mat-floating-group .mat-input:focus ~ .mat-floating-label,
.mat-floating-group .mat-input:not(:placeholder-shown) ~ .mat-floating-label {
    top: 0.375rem;
    transform: translateY(0);
    font-size: 0.6875rem;
    color: var(--mat-auth-primary);
}

/* Şartlar ve koşullar checkbox'ı */
.mat-terms-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: var(--mat-auth-text);
    line-height: 1.4;
}

.mat-terms-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 0.125rem;
    accent-color: var(--mat-auth-primary);
    cursor: pointer;
}

.mat-terms-item a {
    color: var(--mat-auth-primary);
    text-decoration: none;
}

.mat-terms-item a:hover {
    text-decoration: underline;
}

/* Ayırıcı çizgi (veya) */
.mat-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--mat-auth-text-muted);
    font-size: 0.8125rem;
}

.mat-auth-divider::before,
.mat-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mat-auth-border);
}

/* Sosyal giriş butonları */
.mat-social-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mat-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--mat-auth-radius);
    border: 1px solid var(--mat-auth-border);
    background: var(--mat-auth-card-bg);
    color: var(--mat-auth-text);
    font-size: 1.125rem;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.mat-social-btn:hover {
    border-color: var(--mat-auth-primary);
    background: var(--mat-auth-primary-light);
    box-shadow: 0 2px 8px rgba(124, 107, 245, 0.12);
}

.mat-social-btn.is-google { color: #ea4335; }
.mat-social-btn.is-facebook { color: #1877f2; }
.mat-social-btn.is-twitter { color: #1da1f2; }
.mat-social-btn.is-github { color: #24292e; }

/* Alt bilgi linki: "Hesabınız var mı?" */
.mat-auth-alt-link {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--mat-auth-text-muted);
    margin-top: 1.25rem;
}

.mat-auth-alt-link a {
    color: var(--mat-auth-primary);
    text-decoration: none;
    font-weight: 500;
}

.mat-auth-alt-link a:hover {
    text-decoration: underline;
}
