:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #687386;
    --line: #e3e8f0;
    --primary: #1769e0;
    --primary-dark: #0f54b8;
    --success: #12845c;
    --danger: #d14343;
    --warning-bg: #fff7db;
    --warning-border: #efd47b;
    --shadow: 0 22px 60px rgba(20, 42, 80, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 15%, rgba(23, 105, 224, .12), transparent 28%),
        radial-gradient(circle at 90% 85%, rgba(16, 132, 92, .09), transparent 28%),
        var(--bg);
}

button, input, textarea { font: inherit; }
.page { width: 100%; min-height: 100vh; padding: 48px 24px; display: grid; place-items: center; }
.payment-layout { width: min(1120px, 100%); display: grid; grid-template-columns: .82fr 1.18fr; background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.intro-panel { padding: 54px; color: #fff; background: linear-gradient(145deg, #0f315d, #1769e0 58%, #1a83d6); position: relative; overflow: hidden; }
.intro-panel::after { content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%; border: 70px solid rgba(255,255,255,.07); right: -175px; bottom: -145px; }
.brand-mark { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font-size: 24px; font-weight: 800; margin-bottom: 52px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; opacity: .78; font-weight: 700; }
.intro-panel h1 { margin: 14px 0 16px; font-size: clamp(32px, 4vw, 48px); line-height: 1.04; letter-spacing: -.04em; }
.intro-panel > p { margin: 0; max-width: 430px; line-height: 1.7; color: rgba(255,255,255,.82); }
.security-list { display: grid; gap: 18px; margin-top: 48px; position: relative; z-index: 1; }
.security-list > div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.security-list span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); font-weight: 800; }
.security-list p { margin: 0; line-height: 1.5; font-size: 14px; color: rgba(255,255,255,.78); }
.security-list strong { color: #fff; font-size: 15px; }
.card { background: var(--surface); }
.form-card { padding: 48px; }
.card-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.card-heading span { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.card-heading small { color: var(--muted); }
.alert { border: 1px solid; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; font-size: 14px; line-height: 1.5; }
.alert.warning { background: var(--warning-bg); border-color: var(--warning-border); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 20px; }
.field label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.field label em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; color: var(--text); background: #fbfcfe; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(23, 105, 224, .10); background: #fff; }
.field small { display: block; color: var(--muted); margin-top: 7px; font-size: 12px; }
.amount-input { position: relative; }
.amount-input input { padding-right: 56px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.amount-input span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 800; color: var(--primary); }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 13px; line-height: 1.5; margin: 2px 0 22px; }
.consent input { width: 17px; height: 17px; accent-color: var(--primary); }
.button { appearance: none; border: 0; text-decoration: none; border-radius: 13px; min-height: 52px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; background: var(--primary); color: #fff; font-weight: 800; cursor: pointer; transition: transform .15s, background .2s, opacity .2s; }
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button.primary { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.form-note { margin: 15px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.5; }
.payment-card { width: min(940px, 100%); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.payment-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 4px 22px; border-bottom: 1px solid var(--line); }
.payment-topbar h1 { margin: 0; font-size: 20px; }
.payment-topbar p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.amount-badge { padding: 11px 15px; border-radius: 12px; background: #edf5ff; color: var(--primary); font-size: 18px; font-weight: 800; white-space: nowrap; }
.iframe-wrap { min-height: 540px; padding-top: 12px; }
.result-card { width: min(560px, 100%); padding: 48px; border-radius: 24px; box-shadow: var(--shadow); text-align: center; }
.result-card h1 { margin: 18px 0 10px; font-size: 30px; letter-spacing: -.03em; }
.result-card p { margin: 0 auto 24px; color: var(--muted); line-height: 1.7; max-width: 450px; }
.result-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; color: #fff; font-size: 30px; font-weight: 900; }
.result-icon.success { background: var(--success); }
.result-icon.error { background: var(--danger); }
.result-icon.pending { background: var(--primary); }
.status-box { border: 1px solid var(--line); background: #f8fafc; border-radius: 13px; padding: 14px 16px; margin: 18px 0 24px; font-size: 14px; }
.status-box strong { display: block; margin-bottom: 4px; }
code { padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.06); }

@media (max-width: 860px) {
    .page { padding: 18px; }
    .payment-layout { grid-template-columns: 1fr; border-radius: 20px; }
    .intro-panel { padding: 34px; }
    .brand-mark { margin-bottom: 28px; }
    .security-list { margin-top: 28px; }
    .form-card { padding: 30px; }
}

@media (max-width: 580px) {
    .field-grid { grid-template-columns: 1fr; gap: 0; }
    .card-heading { align-items: start; flex-direction: column; }
    .payment-topbar { align-items: start; flex-direction: column; }
    .result-card { padding: 34px 24px; }
    .intro-panel { padding: 30px 24px; }
    .form-card { padding: 28px 22px; }
}

/* Form doğrulama */
.field-error {
    display: none;
    margin-top: 7px;
    color: var(--danger) !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.4;
}
.field-error:not(:empty) { display: block; }
.field input.is-invalid,
.field textarea.is-invalid {
    border-color: var(--danger);
    background: #fffafa;
    box-shadow: 0 0 0 4px rgba(209, 67, 67, .08);
}
.consent input.is-invalid { outline: 2px solid rgba(209, 67, 67, .35); outline-offset: 2px; }
.consent-error { margin: -14px 0 18px 30px; }

@media (max-width: 860px) {
    .intro-panel { display: none; }
    .payment-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 580px) {
    html, body { background: #fff; }
    .page { display: block; min-height: 100vh; padding: 0; }
    .payment-layout { min-height: 100vh; border-radius: 0; box-shadow: none; }
    .form-card { min-height: 100vh; padding: 26px 20px 32px; }
    .card-heading { margin-bottom: 24px; padding-bottom: 18px; }
    .card-heading span { font-size: 22px; }
    .amount-input input { font-size: 23px; }
}

/* PayTR iFrame görünürlüğü ve tarayıcı engeli için yedek bağlantı */
#paytriframe {
    display: block;
    width: 100%;
    min-height: 560px;
    border: 0;
    background: #fff;
}
.iframe-help {
    display: none;
    margin: 18px 0 4px;
    padding: 15px 16px;
    border: 1px solid #dbe7f5;
    border-radius: 12px;
    background: #f8fbff;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}
.iframe-help.is-visible { display: block; }
.iframe-help strong,
.iframe-help span { display: block; }
.iframe-help strong { margin-bottom: 3px; color: var(--text); }
.iframe-help a {
    display: inline-flex;
    margin-top: 8px;
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}
.iframe-help a:hover { text-decoration: underline; }

@media (max-width: 580px) {
    .payment-card { min-height: 100vh; border-radius: 0; padding: 18px 14px; box-shadow: none; }
    #paytriframe { min-height: 620px; }
}
