/* ============================================================================
   AUTH SAYFALARI — Editorial Mystique (krem, Fraunces italic, hairline)
   /auth/giris.html, /auth/kayit.html, /auth/sifremi-unuttum.html, /auth/sifre-sifirla.html
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400;1,9..144,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=IM+Fell+English:ital@0;1&display=swap');
@import url('/lib/motion.css');

:root {
    /* Gül kurusu blush — landing ile aynı kanonik token seti */
    --bg-deep:        #D2A597;
    --bg-base:        #E0B8AD;
    --bg-surface:     #FFFFFF;
    --bg-elevated:    #DAB1A6;
    --gold-bright:    #C2906B;
    --gold-muted:     #A2754F;
    --gold-glow:      rgba(194, 144, 107, 0.12);
    --amethyst:       #9B5C61;
    --amethyst-glow:  rgba(155, 92, 97, 0.10);
    --crimson:        #9B5C61;
    --celestial:      #6E5752;
    --rose-deep:      #8B4F55;
    --text-primary:   #2B1F1D;
    --text-secondary: #6E5752;
    --text-muted:     #A2897F;
    --border-gold:    rgba(150, 95, 88, 0.20);
    --border-subtle:  rgba(150, 95, 88, 0.10);
    --error:          #A8362A;
    --success:        #2D6B3A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tek bir yumuşak sıcak ışık lekesi — editorial sade hava */
.auth-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.auth-stars::before {
    content: '';
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194, 144, 107, 0.08) 0%, transparent 70%);
    filter: blur(60px);
    top: -240px;
    right: -180px;
    animation: drift 28s ease-in-out infinite;
}
@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-40px, 30px); }
}

/* Üst bar (geri dön) */
.auth-topbar {
    position: relative;
    z-index: 10;
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.auth-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: color 0.3s ease;
    font-weight: 500;
}
.auth-back::before {
    content: '—';
    margin-right: 0.4rem;
    color: var(--gold-bright);
}
.auth-back svg { display: none; }
.auth-back:hover {
    color: var(--text-primary);
}

.auth-brand {
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Ana içerik */
.auth-main {
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 92px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 5rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-surface);
    border: 1px solid var(--border-gold);
    border-radius: 0;
    padding: 3.5rem 3rem;
    position: relative;
    box-shadow: 0 12px 40px rgba(26, 24, 20, 0.04);
    animation: cardEnter 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Sol altın rule — editorial anchor */
.auth-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3.5rem;
    bottom: 3.5rem;
    width: 2px;
    background: var(--gold-bright);
    opacity: 0.65;
}
.auth-card::after { display: none; }

/* Header */
.auth-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.auth-symbol {
    width: 38px;
    height: 38px;
    margin: 0 0 1.5rem;
    color: var(--gold-bright);
    opacity: 0.8;
    stroke-width: 1.2;
}

.auth-title {
    font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-transform: none;
    margin-bottom: 0.85rem;
    font-variation-settings: "opsz" 120, "SOFT" 50;
}

.auth-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.55;
    font-weight: 400;
    font-style: italic;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.auth-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(26, 24, 20, 0.22);
    border-radius: 0;
    color: var(--text-primary);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    padding: 0.7rem 0 0.65rem;
    transition: border-color 0.3s ease;
    width: 100%;
}

.auth-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.5;
}

.auth-input:focus {
    outline: none;
    border-bottom-color: var(--gold-bright);
}

.auth-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 0.35rem;
    font-style: italic;
}

/* Onay kutuları */
.auth-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--gold-bright);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-checkbox a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-bright);
    transition: color 0.3s;
}
.auth-checkbox a:hover {
    color: var(--gold-bright);
}

/* Ana buton — derin kuru gül fill, roz altın on hover */
.auth-btn {
    background: var(--rose-deep);
    border: 1px solid var(--rose-deep);
    color: #FBEEE9;
    border-radius: 0;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    padding: 1.1rem 2.5rem;
    cursor: pointer;
    transition: background 0.4s ease, color 0.4s ease, letter-spacing 0.4s ease, border-color 0.4s ease;
    margin-top: 0.5rem;
    position: relative;
}

.auth-btn:hover:not(:disabled) {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    color: #FBEEE9;
    letter-spacing: 0.36em;
}

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

/* Alt bilgi linki */
.auth-footer {
    margin-top: 2.25rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.auth-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-style: normal;
    border-bottom: 1px solid var(--gold-bright);
    transition: color 0.3s, border-color 0.3s;
    padding-bottom: 1px;
}

.auth-footer a:hover {
    color: var(--gold-bright);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-style: italic;
}

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

/* "Şifremi Unuttum" linki container — auth-divider sonrası */
.auth-card > div[style*="text-align: center"] a {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--gold-bright) !important;
    font-style: italic;
}

/* Mesaj kutuları */
.auth-message {
    padding: 0.85rem 1rem;
    border-radius: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    display: none;
    font-style: italic;
}

.auth-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-message.error {
    background: rgba(168, 54, 42, 0.06);
    border-left: 2px solid var(--error);
    color: var(--error);
}

.auth-message.success {
    background: rgba(45, 107, 58, 0.06);
    border-left: 2px solid var(--success);
    color: var(--success);
}

.auth-message.info {
    background: rgba(42, 51, 68, 0.06);
    border-left: 2px solid var(--celestial);
    color: var(--celestial);
}

/* Şifre güç göstergesi */
.auth-password-strength {
    margin-top: 0.4rem;
    height: 2px;
    background: var(--border-subtle);
    border-radius: 0;
    overflow: hidden;
}

.auth-password-strength-bar {
    height: 100%;
    width: 0%;
    background: var(--error);
    transition: width 0.3s, background 0.3s;
}

.auth-password-strength.weak   .auth-password-strength-bar { width: 30%; background: var(--error);       }
.auth-password-strength.medium .auth-password-strength-bar { width: 65%; background: var(--gold-muted);  }
.auth-password-strength.strong .auth-password-strength-bar { width: 100%; background: var(--success);    }

.auth-password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-style: italic;
}

/* Spinner */
.auth-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(250, 247, 242, 0.3);
    border-top-color: #FBEEE9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobil */
@media (max-width: 600px) {
    .auth-topbar {
        padding: 1.25rem 1.5rem;
    }
    .auth-main {
        padding: 2rem 1.25rem 4rem;
    }
    .auth-card {
        padding: 2.5rem 1.75rem;
    }
    .auth-card::before {
        top: 2.5rem;
        bottom: 2.5rem;
    }
    .auth-title {
        font-size: 2.1rem;
    }
    .auth-back, .auth-brand {
        font-size: 0.7rem;
        letter-spacing: 0.22em;
    }
}
