/* AsansorMarket — Auth pages (login/register) scoped premium styles */
.am-auth-shell {
    --am-auth-navy: #071a33;
    --am-auth-navy-2: #0f2747;
    --am-auth-blue: #1a4f86;
    --am-auth-gold: #d4a012;
    --am-auth-line: #e2e8f0;
    --am-auth-soft: #f8fafc;
    --am-page-pad: clamp(0.75rem, 2vw, 1.5rem);
    --mavi-content-max: min(calc(100% - 2 * var(--am-page-pad)), 1760px);
    color: #0f172a;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.am-auth-shell *,
.am-auth-shell *::before,
.am-auth-shell *::after {
    box-sizing: border-box;
}

.am-auth-shell .hidden {
    display: none !important;
}

/* Login & register: header–footer arası tam yükseklik, kart ortada */
body[data-page="login"] main,
body[data-page="register"] main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    padding: 0 !important;
    overflow-x: clip;
}

body[data-page="login"] #root,
body[data-page="register"] #root {
    overflow-x: clip;
    max-width: 100%;
}

body[data-page="login"] .am-auth-shell,
body[data-page="register"] .am-auth-shell {
    flex: 1;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.am-auth-page-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: var(--mavi-content-max);
    margin-inline: auto;
    min-width: 0;
    min-height: auto;
    padding: clamp(12px, 2.5vw, 28px) var(--am-page-pad);
    box-sizing: border-box;
    overflow-x: clip;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.1), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 48%, #f8fafc 100%);
}

.am-auth-card {
    display: grid;
    width: 100%;
    max-width: min(1120px, calc(100vw - 2 * var(--am-page-pad) - 16px));
    margin: 0 auto;
    overflow: hidden;
    border-radius: clamp(16px, 2.5vw, 32px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.1);
}

.am-auth-card--register {
    max-width: min(1180px, calc(100vw - 2 * var(--am-page-pad) - 16px));
}

@media (min-width: 900px) {
    .am-auth-card {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        min-height: clamp(480px, 68vh, 680px);
    }

    .am-auth-card--register {
        min-height: clamp(520px, 72vh, 740px);
    }
}

@media (min-width: 1280px) {
    .am-auth-card {
        max-width: min(1180px, calc(100vw - 2 * var(--am-page-pad) - 32px));
    }
}

.am-auth-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 44px);
    color: #fff;
    background: linear-gradient(135deg, #071a33 0%, #0f2747 42%, #1a4f86 100%);
}

.am-auth-hero::before {
    content: "";
    position: absolute;
    inset: -30% auto auto -10%;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 68%);
    pointer-events: none;
}

.am-auth-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(212, 160, 18, 0.2), transparent 70%);
    pointer-events: none;
}

.am-auth-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    min-height: 100%;
}

.am-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #bfdbfe;
}

.am-auth-title {
    margin: 14px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff !important;
}

.am-auth-subtitle {
    margin: 14px 0 0;
    max-width: 42ch;
    font-size: clamp(14px, 1.8vw, 15px);
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.92) !important;
}

.am-auth-features {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.am-auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0 !important;
}

.am-auth-feature-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(212, 160, 18, 0.16);
    color: #fde68a;
}

.am-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(22px, 4vw, 44px);
    background: #fff;
}

.am-auth-panel-head {
    margin-bottom: 28px;
}

.am-auth-panel-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #64748b;
}

.am-auth-panel-title {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a !important;
}

.am-auth-panel-text {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #64748b !important;
}

.am-auth-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c !important;
    font-size: 14px;
    line-height: 1.5;
}

.am-auth-alert.hidden {
    display: none !important;
}

.am-auth-form {
    display: grid;
    gap: clamp(14px, 2vw, 18px);
    min-width: 0;
}

.am-auth-field-grid {
    display: grid;
    gap: clamp(14px, 2vw, 18px);
    min-width: 0;
}

@media (min-width: 640px) {
    .am-auth-field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.am-auth-field {
    min-width: 0;
}

.am-auth-field-error {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: #be123c !important;
}

.am-auth-input--error {
    border-color: #fca5a5 !important;
    background: #fff5f5 !important;
}

.am-auth-check--block {
    align-items: flex-start;
    line-height: 1.55;
}

.am-auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #334155 !important;
}

.am-auth-input-wrap {
    position: relative;
}

.am-auth-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: clamp(13px, 2vw, 15px) 16px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #f8fafc;
    color: #0f172a !important;
    font-size: clamp(14px, 1.8vw, 15px);
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.am-auth-input:focus {
    outline: none;
    border-color: #1a4f86;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 79, 134, 0.12);
}

.am-auth-input-wrap .am-auth-input {
    padding-right: 48px;
}

.am-auth-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.am-auth-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.am-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.am-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569 !important;
    cursor: pointer;
    user-select: none;
}

.am-auth-check input {
    width: 18px;
    height: 18px;
    accent-color: #0f2747;
}

.am-auth-link {
    font-size: 13px;
    font-weight: 700;
    color: #1a4f86 !important;
    text-decoration: none;
}

.am-auth-link:hover {
    text-decoration: underline;
}

.am-auth-submit {
    width: 100%;
    padding: 16px 20px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #0f2747 0%, #1a4f86 100%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(15, 39, 71, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.am-auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(15, 39, 71, 0.28);
}

.am-auth-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

.am-auth-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    background: #fff;
    color: #0f2747 !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.am-auth-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.am-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    color: #94a3b8 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.am-auth-divider::before,
.am-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.am-auth-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.am-auth-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #475569 !important;
}

@media (max-width: 899px) {
    .am-auth-page-wrap {
        align-items: flex-start;
        min-height: auto;
        padding: clamp(10px, 3vw, 18px) var(--am-page-pad);
    }

    .am-auth-card,
    .am-auth-card--register {
        min-height: auto;
        border-radius: clamp(14px, 4vw, 20px);
    }

    .am-auth-hero {
        padding: clamp(18px, 4.5vw, 26px);
    }

    .am-auth-hero-inner {
        gap: 16px;
    }

    .am-auth-kicker {
        font-size: 10px;
        letter-spacing: 0.18em;
        padding: 6px 12px;
    }

    .am-auth-title {
        font-size: clamp(20px, 5.5vw, 26px);
        line-height: 1.12;
    }

    .am-auth-subtitle {
        max-width: none;
        font-size: clamp(13px, 3.5vw, 15px);
    }

    .am-auth-features,
    .am-auth-features--compact {
        display: none;
    }

    .am-auth-panel {
        padding: clamp(18px, 4.5vw, 26px);
    }

    .am-auth-panel-head {
        margin-bottom: 18px;
    }

    .am-auth-panel-title {
        font-size: clamp(20px, 5vw, 24px);
    }

    .am-auth-field-grid {
        grid-template-columns: 1fr;
    }

    .am-auth-trust {
        margin-top: 14px;
    }

    .am-auth-trust-item {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .am-auth-page-wrap {
        padding: 8px var(--am-page-pad);
    }

    .am-auth-card {
        border-radius: 14px;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    }

    .am-auth-hero,
    .am-auth-panel {
        padding: 16px;
    }

    .am-auth-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-auth-submit,
    .am-auth-secondary {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 14px;
    }

    .am-auth-trust-item {
        flex: 1 1 100%;
    }
}

@media (max-width: 360px) {
    .am-auth-title {
        font-size: 18px;
    }

    .am-auth-input {
        padding: 12px 14px;
        border-radius: 12px;
    }
}
