/*
 * Site / panel giriş yönlendirmesi — contact sayfası ile uyumlu token’lar
 */

html {
    scrollbar-gutter: stable;
}

.portal-page {
    padding-top: 80px;
    padding-bottom: clamp(48px, 8vw, 96px);
    font-family: var(--font-sans);
    color: var(--text-color);
    background: var(--bg-color);
    overflow-x: clip;
}

.portal-page__wrap {
    padding-bottom: calc(clamp(200px, 32vw, 340px) + env(safe-area-inset-bottom, 0px));
}

.container-apple {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

.portal-open-banner {
    margin: 0 0 22px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.12) 0%, rgba(255, 184, 0, 0.14) 100%);
    border: 1px solid rgba(30, 144, 255, 0.28);
    text-align: center;
}

body.dark-theme .portal-open-banner {
    border-color: rgba(77, 163, 255, 0.35);
    background: linear-gradient(135deg, rgba(77, 163, 255, 0.12) 0%, rgba(255, 201, 51, 0.08) 100%);
}

.portal-open-banner__text {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    font-weight: 500;
}

.portal-open-banner__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(30, 144, 255, 0.4);
    transition: background 0.2s ease, color 0.2s ease;
}

.portal-open-banner__link:hover {
    background: rgba(30, 144, 255, 0.1);
    color: var(--text-color);
}

body.dark-theme .portal-open-banner__link:hover {
    background: rgba(77, 163, 255, 0.15);
}

.portal-hero {
    position: relative;
    padding: clamp(72px, 12vw, 120px) 0 clamp(48px, 8vw, 80px);
    overflow: hidden;
}

.portal-hero__glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 85%;
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(30, 144, 255, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 70% 30%, rgba(255, 184, 0, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

body.dark-theme .portal-hero__glow {
    background:
        radial-gradient(ellipse 70% 55% at 50% 40%, rgba(77, 163, 255, 0.12) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 70% 30%, rgba(255, 201, 51, 0.08) 0%, transparent 55%);
}

.portal-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 48px);
    align-items: center;
}

@media (max-width: 720px) {
    .portal-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .portal-hero__visual {
        justify-self: center;
    }
}

.portal-hero__icon {
    font-size: 88px;
    line-height: 1;
    color: var(--primary-color);
    filter: drop-shadow(0 12px 28px rgba(30, 144, 255, 0.2));
    display: block;
}

body.dark-theme .portal-hero__icon {
    filter: drop-shadow(0 12px 28px rgba(77, 163, 255, 0.15));
}

.portal-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw + 0.6rem, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 14px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-hero__lead {
    font-size: clamp(1.05rem, 1.5vw + 0.85rem, 1.25rem);
    color: var(--home-apple-muted);
    max-width: 40ch;
    line-height: 1.6;
}

body.dark-theme .portal-hero__lead {
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .portal-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }
}

.portal-panel {
    padding-top: clamp(8px, 2vw, 24px);
    padding-bottom: clamp(32px, 6vw, 72px);
    max-width: 560px;
    margin: 0 auto;
}

.portal-form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(32px, 5vw, 52px);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.portal-form-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(30, 144, 255, 0.08);
}

body.dark-theme .portal-form-card:hover {
    box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.form-header {
    margin-bottom: 28px;
}

.form-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw + 0.9rem, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0;
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 2px;
    color: var(--text-color);
}

.premium-form input {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

body:not(.dark-theme) .premium-form input {
    background: rgba(255, 255, 255, 0.92);
}

.premium-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

body.dark-theme .premium-form input:focus {
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.2);
}

.portal-submit {
    margin-top: clamp(12px, 2.5vw, 20px);
    margin-bottom: clamp(8px, 2vw, 16px);
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
}

.portal-submit:hover {
    color: #fff;
}

/* ── Alan adı hatası popup (dialog) — contact modal ile aynı dil ── */
.portal-error-modal {
    padding: 0;
    border: none;
    max-width: calc(100vw - 32px);
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    margin: auto;
    background: transparent;
    overflow: visible;
    box-sizing: border-box;
}

.portal-error-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.dark-theme .portal-error-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.portal-error-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(28px, 5vw, 40px);
    box-shadow:
        var(--shadow-elevated),
        0 0 0 1px rgba(239, 68, 68, 0.12),
        0 12px 40px rgba(239, 68, 68, 0.08);
    text-align: center;
    max-height: min(85vh, calc(100vh - 48px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

body.dark-theme .portal-error-modal__panel {
    box-shadow:
        var(--shadow-elevated),
        0 0 0 1px rgba(248, 113, 113, 0.15),
        0 12px 40px rgba(0, 0, 0, 0.35);
}

.portal-error-modal__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.portal-error-modal__svg {
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 14px rgba(239, 68, 68, 0.35));
}

.portal-error-modal__title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.2vw + 0.5rem, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: var(--text-color);
    line-height: 1.2;
}

.portal-error-modal__text {
    margin: 0 0 24px;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.portal-error-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.portal-error-modal__btn {
    margin-top: 0;
    width: 100%;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
}

.portal-error-modal__btn:hover {
    color: #fff;
}

/* ── E-posta OTP doğrulama popup ── */
.portal-otp-modal {
    padding: 0;
    border: none;
    max-width: calc(100vw - 32px);
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    margin: auto;
    background: transparent;
    overflow: visible;
    box-sizing: border-box;
}

.portal-otp-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.dark-theme .portal-otp-modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
}

.portal-otp-modal__panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(26px, 5vw, 36px);
    box-shadow:
        var(--shadow-elevated),
        0 0 0 1px rgba(30, 144, 255, 0.12),
        0 12px 40px rgba(30, 144, 255, 0.08);
    text-align: center;
    max-height: min(90vh, calc(100vh - 48px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

body.dark-theme .portal-otp-modal__panel {
    box-shadow:
        var(--shadow-elevated),
        0 0 0 1px rgba(77, 163, 255, 0.18),
        0 12px 40px rgba(0, 0, 0, 0.35);
}

.portal-otp-modal__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.portal-otp-modal__icon .material-symbols-rounded {
    font-size: 52px;
    line-height: 1;
    color: var(--primary-color);
    filter: drop-shadow(0 4px 14px rgba(30, 144, 255, 0.25));
}

.portal-otp-modal__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
    color: var(--text-color);
    line-height: 1.2;
}

.portal-otp-modal__text {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.portal-otp-modal__hint {
    margin: 0 0 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted);
    opacity: 0.95;
}

.portal-otp-modal__banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.portal-otp-modal__err {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #b91c1c;
    font-size: 0.9rem;
}

body.dark-theme .portal-otp-modal__err {
    color: #fca5a5;
}

.portal-otp-modal__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
}

.portal-otp-modal__label {
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-color);
}

.portal-otp-modal__input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-family: Consolas, ui-monospace, monospace;
    font-size: 1.5rem;
    letter-spacing: 0.4em;
    padding: 14px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-color);
}

body:not(.dark-theme) .portal-otp-modal__input {
    background: rgba(255, 255, 255, 0.92);
}

.portal-otp-modal__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.18);
}

.portal-otp-modal__submit {
    margin-top: 4px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 12px 16px;
}

.portal-otp-modal__resend-form {
    margin: 14px 0 0;
}

.portal-otp-modal__resend {
    background: none;
    border: none;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.portal-otp-modal__resend:hover {
    color: var(--text-color);
}

.portal-otp-modal__actions {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.portal-otp-modal__close {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

.portal-otp-modal__close:hover {
    background: var(--glass-bg);
    color: var(--text-color);
}
