/* Pivony iş ortağı portalı – stil dosyası
   Renkler logodan alınmıştır: siyah yazı + magenta (#CE2C8A) vurgu. */

:root {
  --ink: #0a0a0b;
  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e3e3e8;
  --line-strong: #c9c9d1;
  --bg: #f6f6f8;
  --card: #ffffff;
  --accent: #ce2c8a;
  --accent-dark: #b0226f;
  --accent-tint: #fcf0f6;
  --accent-ring: rgba(206, 44, 138, 0.22);
  --error: #b42318;
  --error-bg: #fef3f2;
  --error-line: #fecdca;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 4px 16px rgba(16, 16, 24, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; padding-top: 40px; padding-bottom: 40px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ── Üst bilgi ─────────────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 14px; min-height: 68px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 23px; width: auto; }
.brand-tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line);
}
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { background: var(--bg); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-dark); }

/* ── Sayfa girişi ─────────────────────────────────────── */
.page-intro { padding: 40px 0 24px; max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.dots { display: inline-flex; flex-direction: column; gap: 3px; }
.dots i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 0 0 10px; font-size: clamp(28px, 4vw, 38px); line-height: 1.15;
  letter-spacing: -0.02em; font-weight: 700; color: var(--ink);
}
.lead { margin: 0; font-size: 16.5px; color: #3c3c43; }

/* ── Yerleşim ─────────────────────────────────────────── */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start;
  padding-bottom: 56px;
}
.layout > .card:not(.card-soft) { grid-column: 1; }
.side { grid-column: 2; grid-row: 1; position: sticky; top: 20px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 32px;
}
.card-soft { background: #fff; padding: 24px; }
.card-soft h2 { font-size: 16px; margin: 0 0 14px; color: var(--ink); }

/* ── Form ─────────────────────────────────────────────── */
fieldset.section { border: 0; margin: 0; padding: 0 0 26px; min-width: 0; }
fieldset.section + fieldset.section { border-top: 1px solid var(--line); padding-top: 24px; }
legend {
  float: left; width: 100%; /* lejantı çerçeve çizgisinden çıkarır */
  display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 16px;
  font-size: 17px; font-weight: 600; color: var(--ink);
}
legend + * { clear: both; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.span-2 { grid-column: 1 / -1; }

.field label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.req { color: var(--accent); font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; min-height: 46px; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #a1a1aa; }
input:hover, textarea:hover { border-color: #a8a8b3; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .15); }

.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.hint:empty { display: none; }
.error { margin: 6px 0 0; font-size: 13px; color: var(--error); font-weight: 500; }
.error:empty { display: none; }

.check {
  display: grid !important; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  font-weight: 400 !important; font-size: 14px !important; line-height: 1.55;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfcfd; cursor: pointer;
}
.check:hover { border-color: var(--line-strong); }
.check input {
  width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer;
}
.field.has-error .check { border-color: var(--error); background: var(--error-bg); }
.privacy { margin-top: 10px; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Düğmeler ─────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-primary[disabled] { opacity: .65; cursor: progress; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-link {
  background: none; border: 0; padding: 0 4px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--muted); }
.small { font-size: 13px; margin: 0; }

/* ── Uyarılar ─────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px; font-size: 14px; }
.alert-error { background: var(--error-bg); border: 1px solid var(--error-line); color: #7a271a; }
.alert p { margin: 0 0 6px; }
.alert p:last-child { margin-bottom: 0; }

/* ── Kurallar paneli ──────────────────────────────────── */
.rules { list-style: none; counter-reset: r; margin: 0; padding: 0; }
.rules li {
  counter-increment: r; position: relative; padding: 0 0 12px 34px; margin: 0 0 12px;
  font-size: 13.5px; color: #3c3c43; border-bottom: 1px solid var(--line);
}
.rules li:last-child { border-bottom: 0; margin-bottom: 0; }
.rules li::before {
  content: counter(r); position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-dark); font-weight: 700; font-size: 12px;
}
.rules strong { color: var(--ink); }
.fallback {
  margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); font-size: 13px; color: #3c3c43;
}

/* ── Sonuç kartı ──────────────────────────────────────── */
.result h1, .result h2 { margin: 0 0 6px; font-size: 24px; color: var(--ink); letter-spacing: -0.01em; }
.result-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--ok-bg); margin-bottom: 14px; position: relative;
}
.result-icon::after {
  content: ""; position: absolute; left: 15px; top: 10px; width: 10px; height: 18px;
  border: solid var(--ok); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.result-company { margin: 0 0 18px; color: var(--muted); }
.result.is-error h1 { color: var(--error); }
.summary {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 18px;
  padding: 18px 20px; background: var(--bg); border-radius: var(--radius-sm);
}
.summary dt { color: var(--muted); font-size: 14px; }
.summary dd { margin: 0; font-weight: 600; color: var(--ink); }
.ref { font-family: var(--mono); font-size: 18px; letter-spacing: 0.03em; color: var(--accent-dark); }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fff7e6; color: #8a5300; border: 1px solid #f5d9a8;
}
.note {
  margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid var(--accent);
  background: var(--accent-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px;
}
.error-list { padding-left: 20px; color: var(--error); }

/* ── Alt bilgi ────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .wrap {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); }

/* ── Mobil ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { min-height: 60px; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand-tag { display: none; }
  .site-nav a { padding: 7px 10px; font-size: 13px; }
  .page-intro { padding: 26px 0 18px; }
  .lead { font-size: 15.5px; }
  .card { padding: 22px 18px; border-radius: 10px; }
  .grid { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .summary { grid-template-columns: 1fr; gap: 2px; }
  .summary dd { margin-bottom: 10px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea { font-size: 16px; } /* iOS yakınlaştırmasını önler */
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Hata varken açıklama metnini gizle (tekrarı önler) */
.field.has-error .hint { display: none; }
.actions + .small { margin-top: 12px; }

/* ── Giriş sayfaları ve oturum ─────────────────────────────────────────── */
.auth-wrap { max-width: 460px; padding-top: 56px; padding-bottom: 56px; }
.auth-card h1 { font-size: 26px; margin: 0 0 8px; }
.auth-card .lead { font-size: 15px; margin: 0 0 20px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .captcha { min-height: 78px; }
.btn-block { width: 100%; justify-content: center; }
.auth-links { margin: 18px 0 0; font-size: 14px; text-align: center; }
.auth-foot { margin: 18px 4px 0; font-size: 13px; color: var(--muted, #666); text-align: center; }
.alert-ok { background: #ecfdf3; border: 1px solid #abefc6; color: #085d3a; }
.auth-card .alert { margin-bottom: 18px; }
.user-nav { display: flex; align-items: center; gap: 10px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line, #e5e5e8); font-size: 13px; }
.user-email { color: var(--muted, #666); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
input[readonly] { background: var(--bg, #f5f5f7); color: #555; cursor: default; }
@media (max-width: 640px) { .user-email { display: none; } .user-nav { margin-left: 6px; padding-left: 8px; } }
