/* =============================================
   AUTH — Modern bağımsız giriş sayfası
   ============================================= */

:root {
    --auth-primary: #3b82f6;
    --auth-primary-deep: #2563eb;
    --auth-accent: #8b5cf6;
    --auth-ink: #0f172a;
    --auth-ink-soft: #64748b;
    --auth-surface: #ffffff;
    --auth-surface-muted: #f8fafc;
    --auth-line: #e2e8f0;
    --auth-radius-xl: 28px;
    --auth-radius-lg: 16px;
    --auth-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    --auth-glow: 0 12px 40px rgba(59, 130, 246, 0.35);
}

body.auth-page {
    font-family: var(--font-family);
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.08), transparent 42%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.07), transparent 38%),
        #f1f5f9;
    min-height: 100vh;
}

.auth a {
    color: inherit;
    text-decoration: none;
}

.auth__shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr;
}

/* ---- Showcase (sol panel) ---- */

.auth__showcase {
    display: none;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.auth__showcase-image {
    position: absolute;
    inset: 0;
    background-image: var(--auth-side-image);
    background-size: cover;
    background-position: center;
}

.auth__showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(88, 74, 196, 0.22) 0%,
        rgba(71, 96, 255, 0.38) 45%,
        rgba(45, 55, 140, 0.52) 100%
    );
}

.auth__showcase-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    min-height: 100%;
    padding: 2.5rem 2rem;
    text-align: center;
}

.auth__showcase-logo {
    display: block;
}

.auth__showcase-logo img {
    width: clamp(7.5rem, 14vw, 10.75rem);
    height: auto;
}

.auth__showcase-copy {
    max-width: 24rem;
    color: #ffffff;
}

.auth__showcase-title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.75rem, 3.2vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth__showcase-desc {
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    font-weight: 500;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

/* ---- Form tarafı ---- */

.auth__content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.5rem 1.25rem 2rem;
}

.auth__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth__brand img {
    width: clamp(6.5rem, 18vw, 8.25rem);
    height: auto;
}

.auth__home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    color: var(--auth-ink-soft);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth__home-link:hover {
    color: var(--auth-ink);
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.auth__body {
    width: min(100%, 26rem);
    margin: auto;
    animation: authFadeUp 0.7s ease both;
}

.auth__body--wide {
    width: min(100%, 32rem);
}

.auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--auth-primary-deep);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth__title {
    margin-bottom: 0.65rem;
    font-size: clamp(2rem, 5vw, 2.65rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--auth-ink);
}

.auth__title span {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth__subtitle {
    margin-bottom: 2rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--auth-ink-soft);
}

/* ---- Form ---- */

.auth-form__field + .auth-form__field,
.auth-form__row + .auth-form__field {
    margin-top: 1.1rem;
}

.auth-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.1rem;
}

.auth-form__row--start {
    margin-top: 0;
}

.auth-form__row .auth-form__field + .auth-form__field {
    margin-top: 0;
}

.auth-form__control--phone {
    gap: 0;
    padding-left: 0;
}

.auth-form__phone-prefix {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    padding: 0 0.85rem;
    border: 0;
    border-right: 1.5px solid var(--auth-line);
    background: var(--auth-surface-muted);
    color: var(--auth-ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-form__phone-prefix i {
    font-size: 0.65rem;
    color: #94a3b8;
}

.auth-form__flag {
    font-size: 1.1rem;
    line-height: 1;
}

.auth-form__control--phone .auth-form__input {
    padding-left: 0.85rem;
}

.auth-form__remember a {
    color: var(--auth-primary-deep);
    font-weight: 600;
}

.auth-form__remember a:hover {
    color: var(--auth-accent);
}

.auth-form__label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.auth-form__label-row .auth-form__label {
    margin-bottom: 0;
}

.auth-form__link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-primary);
    white-space: nowrap;
}

.auth-form__link:hover {
    color: var(--auth-primary-deep);
}

.auth-form__control {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1rem;
    min-height: 3.25rem;
    border-radius: var(--auth-radius-lg);
    background: var(--auth-surface);
    border: 1.5px solid var(--auth-line);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form__control:focus-within {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    background: #ffffff;
}

.auth-form__control > i {
    color: #94a3b8;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-form__control:focus-within > i {
    color: var(--auth-primary);
}

.auth-form__input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--auth-ink);
}

.auth-form__input:focus {
    outline: none;
}

.auth-form__input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.auth-form__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-form__toggle:hover {
    color: var(--auth-ink);
}

.auth-form__remember {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.15rem;
    font-size: 0.875rem;
    color: var(--auth-ink-soft);
    cursor: pointer;
    user-select: none;
}

.auth-form__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-form__checkbox-ui {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-form__checkbox:checked + .auth-form__checkbox-ui {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
    border-color: transparent;
}

.auth-form__checkbox:checked + .auth-form__checkbox-ui::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    margin-top: 1.35rem;
    padding: 0.95rem 1.25rem;
    border: 0;
    border-radius: var(--auth-radius-lg);
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
    color: #ffffff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--auth-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-form__submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 48px rgba(59, 130, 246, 0.42);
}

.auth-form__submit:active {
    transform: translateY(0);
}

.auth__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
}

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

.auth__signup {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--auth-ink-soft);
}

.auth__signup a {
    margin-left: 0.25rem;
    font-weight: 700;
    color: var(--auth-primary-deep);
}

.auth__signup a:hover {
    color: var(--auth-accent);
}

.auth__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-line);
    list-style: none;
}

.auth__trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.auth__trust i {
    color: var(--auth-primary);
    font-size: 0.7rem;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Register: form solda, görsel sağda ---- */

@media (min-width: 1024px) {
    .auth--register .auth__shell {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .auth--register .auth__showcase {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: 20px;
        border-bottom-left-radius: 20px;
    }
}

/* ---- Desktop ---- */

@media (min-width: 1024px) {
    .auth__shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .auth__showcase {
        display: block;
    }

    .auth__content {
        padding: 2rem 3.5rem;
    }

    .auth__body {
        margin: auto 0;
    }
}

/* ---- Mobil & tablet: görsel arka plan, form üstte ---- */

@media (max-width: 1023px) {
    body.auth-page {
        background: transparent;
    }

    .auth__shell {
        position: relative;
        display: block;
        min-height: 100vh;
    }

    .auth__showcase {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 0;
        min-height: 100vh;
        border-radius: 0;
        pointer-events: none;
    }

    .auth__showcase-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        min-height: auto;
        padding: clamp(2rem, 6vw, 3rem) 1.25rem 1rem;
        gap: 1.25rem;
        justify-content: flex-start;
    }

    .auth__showcase-title {
        font-size: clamp(1.5rem, 5.5vw, 1.85rem);
    }

    .auth__showcase-desc {
        font-size: clamp(0.9375rem, 2.8vw, 1.0625rem);
    }

    .auth__content {
        position: relative;
        z-index: 1;
        min-height: 100vh;
        padding: clamp(1rem, 3vw, 1.5rem);
        padding-top: clamp(11.5rem, 32vw, 14.5rem);
    }

    .auth__header {
        position: absolute;
        top: clamp(1rem, 3vw, 1.5rem);
        left: clamp(1rem, 3vw, 1.5rem);
        right: clamp(1rem, 3vw, 1.5rem);
        z-index: 2;
        margin-bottom: 0;
    }

    .auth__brand img {
        filter: brightness(0) invert(1);
    }

    .auth__home-link {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.22);
        color: #ffffff;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .auth__home-link:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.35);
        color: #ffffff;
        box-shadow: none;
    }

    .auth__intro {
        display: none;
    }

    .auth__body {
        width: 100%;
        max-width: 32rem;
        margin: 0 auto;
        padding: 1.5rem 1.25rem 1.75rem;
        border-radius: var(--auth-radius-xl);
        background: var(--auth-surface);
        box-shadow: var(--auth-shadow);
    }

    .auth-form__row {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .auth-form__row .auth-form__field + .auth-form__field {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .auth__home-link > span {
        display: none;
    }

    .auth__home-link {
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
        justify-content: center;
    }

    .auth__trust {
        gap: 0.5rem;
    }
}
