/* ===========================================================================
   Satın alma akışı — satin-al.html
   ===========================================================================
   Önceki sürümde genel bir `button{background:#24634e;color:white}` kuralı
   vardı: office-auth.js'in ürettiği "primary" ve "text-btn" sınıfları etkisiz
   kalıyor, Giriş Yap / Hesap Oluştur / Google / Parolamı Unuttum dördü de
   aynı dolu yeşil blok olarak çıkıyordu. Hiyerarşi yoktu.

   Burada office-theme.css ile aynı tokenlar ve aynı bileşen dili kullanılır;
   sayfa uygulamadan kopuk görünmez. HTML'e dokunulmadı.
   =========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../vendor/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../vendor/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0a1512; --ink-2: #2c3a34; --muted: #5a6b63; --muted-2: #7c8a83;
  --line: #dde5e0; --line-2: #c4d0c9;
  --surface: #ffffff; --surface-2: #f4f7f4; --surface-3: #eaf0ec;
  --brand: #14563c; --brand-dark: #0f4230; --brand-soft: #e6f2ea; --brand-ink: #0b3325;
  --warn: #7d5100; --warn-bg: #fff6e3; --warn-line: #f0dcaf;
  --danger: #a32717; --danger-bg: #fef0ed;
  --ok: #1a6534; --ok-bg: #e7f6e9; --ok-line: #c2e3c8;
  --sh-1: 0 1px 2px rgba(10,21,18,.06);
  --sh-2: 0 2px 10px rgba(10,21,18,.07);
  --sh-3: 0 12px 32px rgba(10,21,18,.10);
  --font: 'Plus Jakarta Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --dur: 180ms; --ease: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--surface-2); color: var(--ink);
  font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7fb98f; outline-offset: 2px; border-radius: 6px; }

/* --- ÜST ÇUBUK ------------------------------------------------------------ */
header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px max(24px, calc((100% - 1100px) / 2));
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-size: 25px; font-weight: 800; letter-spacing: -1.1px;
  text-decoration: none; color: var(--ink);
}
.brand span { color: #7ea45e; }
header > a:not(.brand) {
  font-size: 14px; font-weight: 650; color: var(--muted);
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
header > a:not(.brand):hover { background: var(--surface-2); color: var(--ink); }

main { max-width: 1148px; margin: auto; padding: 40px 24px 64px; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.6px;
  color: var(--muted-2); text-transform: uppercase;
}
h1 {
  font-size: clamp(30px, 4.4vw, 42px); letter-spacing: -1.4px;
  line-height: 1.12; margin: 10px 0 12px; font-weight: 750;
}
main > p { color: var(--muted); max-width: 60ch; margin: 0 0 8px; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; margin: 0 0 4px; }

/* --- ADIM GÖSTERGESİ ------------------------------------------------------
   Eskiden ince bir alt çizgiydi; hangi adımda olduğun belli olmuyordu.
   Şimdi numaralı, tamamlananı işaretli bir şerit. */
.steps {
  display: flex; gap: 10px; list-style: none; padding: 0; margin: 28px 0 24px;
  counter-reset: step;
}
.steps li {
  flex: 1; min-width: 0; counter-increment: step;
  padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.steps li::before {
  content: counter(step);
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
  font-size: 12px; font-weight: 700;
}
.steps [aria-current="step"] {
  border-color: var(--brand); color: var(--ink); box-shadow: var(--sh-1);
}
.steps [aria-current="step"]::before { background: var(--brand); color: #fff; }

/* --- UYARI ŞERİDİ ---------------------------------------------------------
   Ödemenin kapalı olduğu bilgisi; ticari olarak en önemli satır. */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border: 1px solid var(--warn-line);
  background: var(--warn-bg); color: var(--warn);
  border-radius: 12px; font-size: 14px; font-weight: 600; margin: 0 0 24px;
}
.notice::before {
  content: 'i'; flex: 0 0 20px; height: 20px; border-radius: 50%;
  background: var(--warn); color: var(--warn-bg);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}

/* --- DÜZEN ---------------------------------------------------------------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 24px; align-items: start;
}
.card {
  min-width: 0; padding: 28px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1);
}
.card > section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.card > section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* --- DÜĞMELER -------------------------------------------------------------
   office-auth.js "office-btn", "office-btn primary" ve "text-btn" üretiyor.
   Uygulamadaki ile aynı hiyerarşi burada da geçerli. */
button, .office-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; margin: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: 650 14px/1 var(--font); cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
button:hover:not(:disabled), .office-btn:hover:not(:disabled) { background: var(--surface-2); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }

button.primary, .office-btn.primary,
#continue, #payment {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
button.primary:hover:not(:disabled), .office-btn.primary:hover:not(:disabled),
#continue:hover:not(:disabled), #payment:hover:not(:disabled) {
  background: var(--brand-dark); border-color: var(--brand-dark);
}
button.secondary, .secondary { background: var(--surface-2); }
/* Metin düğmesi: çerçevesiz, üçüncül. "Parolamı Unuttum" artık dolu yeşil
   bir blok değil. */
button.text-btn, .text-btn {
  border-color: transparent; background: none; color: var(--brand);
  padding: 0 6px; min-height: 36px; text-decoration: underline;
  text-underline-offset: 3px;
}
button.text-btn:hover:not(:disabled) { background: var(--brand-soft); }

/* Hesap kapısı: office-auth.js host'u inline flex yapıyor; aralığı biz veriyoruz. */
#account { gap: 10px !important; align-items: center; margin-bottom: 18px; }
#account .office-note {
  font-size: 14px; color: var(--muted); font-weight: 600;
  background: var(--surface-2); border-radius: 999px; padding: 8px 14px;
}

#choose, #review, #pay { display: grid; gap: 14px; }
#choose > p, #review > p, #pay > p { margin: 0; color: var(--muted); font-size: 14px; }
#message {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 14px; font-weight: 600;
}
#message:empty { display: none; }

/* --- FORM ALANLARI -------------------------------------------------------- */
label { display: block; font-weight: 650; font-size: 13px; color: var(--ink-2); margin: 0; }
select, input {
  font: inherit; width: 100%; max-width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); min-height: 46px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
select:hover, input:hover { border-color: var(--line-2); }
select:focus, input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}
input[type="checkbox"] { width: auto; min-height: 0; }

/* --- FATURA BİLGİLERİ ----------------------------------------------------- */
dl {
  display: grid; grid-template-columns: minmax(130px, auto) 1fr;
  gap: 0; overflow-wrap: anywhere; margin: 8px 0 0;
}
dt {
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 10px 0; border-bottom: 1px solid var(--surface-3);
}
dd {
  margin: 0; padding: 10px 0; font-weight: 600; font-size: 14px;
  border-bottom: 1px solid var(--surface-3);
}
dl > dt:last-of-type, dl > dd:last-of-type { border-bottom: 0; }

/* --- PAKET ÖZETİ ----------------------------------------------------------
   Sağ sütun: sayfanın ticari çıpası. Kendi kartı, net tutarı ve yapışkan
   konumu var. */
.summary {
  align-self: start; position: sticky; top: 92px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--brand-soft) 100%);
  border-color: var(--ok-line);
}
.summary .eyebrow { color: var(--brand); }
.summary h2 { font-size: 21px; margin: 6px 0 6px; }
.summary > p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.summary dl { grid-template-columns: 1fr auto; }
.summary dt { font-size: 13px; }
.summary dd { text-align: right; font-size: 15px; }
.summary dd#total {
  font-size: 28px; font-weight: 750; letter-spacing: -1px;
  font-variant-numeric: tabular-nums; color: var(--brand-ink);
}
.summary hr { border: 0; border-top: 1px solid var(--ok-line); margin: 18px 0; }
.summary #tax { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.summary p:last-child { font-size: 13px; color: var(--muted); }

/* --- ÖDEME ADIMI ---------------------------------------------------------- */
#pay strong {
  display: block; padding: 14px 18px; border-radius: 12px;
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #f0c5bc; font-size: 14px;
}

footer {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
footer a { color: var(--muted); }

/* --- DİYALOG -------------------------------------------------------------- */
dialog {
  max-width: calc(100% - 32px); width: 520px; max-height: 86vh; overflow: auto;
  border: 0; border-radius: 18px; padding: 26px; color: var(--ink);
  box-shadow: var(--sh-3); font: inherit;
}
dialog::backdrop { background: rgba(10,34,25,.5); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 16px; }
.office-dialog-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.office-dialog-head h2 { font-size: 19px; }
.office-error:not(:empty) {
  display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0;
  padding: 12px 14px; border-radius: 10px;
  background: var(--danger-bg); border: 1px solid #f0c5bc;
  color: var(--danger); font-size: 13px; font-weight: 600;
}
.office-error:not(:empty)::before { content: '!'; font-weight: 800; }
.auth-status {
  font-size: 13px; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted);
}

/* --- DUYARLILIK ----------------------------------------------------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; grid-row: 1; }
  main { padding: 28px 20px 56px; }
}
@media (max-width: 680px) {
  header { padding: 14px 20px; }
  .brand { font-size: 22px; }
  .card { padding: 20px; }
  .steps { gap: 6px; }
  .steps li { padding: 10px; font-size: 12px; gap: 8px; }
  .steps li::before { flex-basis: 20px; height: 20px; font-size: 11px; }
  h1 { font-size: 28px; letter-spacing: -1px; }
  dl { grid-template-columns: 1fr; }
  dt { padding-bottom: 0; border-bottom: 0; }
  dd { padding-top: 2px; }
  #account { flex-direction: column; align-items: stretch !important; }
  #account button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Düğme grubu: tek satırda, dar ekranda alt alta ve tam genişlik. */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
#choose > a, #review > a.office-btn, #pay > a.office-btn { justify-self: start; }
@media (max-width: 680px) {
  .actions { flex-direction: column; }
  .actions > * { width: 100%; }
  #choose > button, #choose > a, #pay > a.office-btn { width: 100%; }
}
.consents{border:1px solid #d8e1da;border-radius:12px;padding:12px 14px;margin:14px 0;display:grid;gap:10px}.consents legend{font-weight:700;padding:0 6px}.consents label{display:flex;gap:10px;align-items:flex-start;line-height:1.45}.consents input{width:20px;height:20px;margin-top:2px;flex:none}.consent-note{margin:0;font-size:13px;color:#5b6b63}
.iyzico-pay-logo{display:block;height:31px;width:auto;max-width:100%;margin:0 0 12px}

/* --- ÖDEME SONUCU ---------------------------------------------------------
   iyzico'dan dönüşte tek, net ekran: başarılı / onaylanmadı / doğrulanıyor. */
.result { max-width: 640px; margin: 8px 0 32px; text-align: left; }
.result .result-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-size: 28px; font-weight: 800; margin-bottom: 18px;
  background: var(--surface-3); color: var(--ink-2);
}
.result.ok .result-icon { background: var(--brand-soft); color: var(--brand); }
.result.bad .result-icon { background: #fdecea; color: #a1281b; }
.result h2 { font-size: 26px; letter-spacing: -.6px; margin: 0 0 10px; }
.result p { color: var(--ink-2); line-height: 1.6; margin: 0 0 10px; }
.result dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0 20px; font-size: 14px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 650; }
.result .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* --- DÖNEM SEÇİMİ ---------------------------------------------------------- */
.periods { border: 0; padding: 0; margin: 14px 0 6px; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.periods legend { font-weight: 650; font-size: 14px; margin-bottom: 8px; padding: 0; }
.periods label { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); font-size: 14px; }
.periods label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.periods input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.periods .save { font-style: normal; font-size: 11px; font-weight: 750; color: var(--brand); background: #fff; border: 1px solid var(--brand); border-radius: 999px; padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
@media (max-width: 560px) { .periods { grid-template-columns: 1fr; } }
