/* =========================================================
   baskan.site — ortak tasarım sistemi (site + panel)
   Mobil öncelikli: temel stiller telefona göre, @media ile büyür.
   ========================================================= */

:root {
  --ink: #1B1740;
  --ink-2: #3D3A5C;
  --muted: #6B6889;
  --line: #E7E5EF;
  --line-2: #D9D6E4;
  --bg: #FFFFFF;
  --bg-soft: #F7F6FB;
  --cream: #FFF7EF;
  --accent: #FF8A1F;
  --accent-btn: #E8590C;
  --accent-btn-hover: #C2410C;
  --accent-50: #FFF1E3;
  --success: #15803D;
  --success-50: #ECFDF3;
  --danger: #DC2626;
  --danger-50: #FEF2F2;
  --info: #1D4ED8;
  --info-50: #EFF4FF;
  --warn: #B45309;
  --warn-50: #FFFBEB;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(27, 23, 64, .06);
  --shadow: 0 1px 3px rgba(27, 23, 64, .06), 0 8px 24px rgba(27, 23, 64, .06);
  --shadow-lg: 0 24px 60px rgba(27, 23, 64, .16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 12px;
  font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(232, 89, 12, .35); outline-offset: 2px;
}
.btn-primary { background: var(--accent-btn); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--accent-btn-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2A2560; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-light:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: #fff; color: var(--danger); border-color: #F5C2C2; }
.btn-danger:hover { background: var(--danger-50); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }

/* ---------- Formlar ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  font: 400 16px/1.4 var(--font); color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-btn); box-shadow: 0 0 0 4px rgba(232, 89, 12, .12); outline: none; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: flex; align-items: center; padding: 0 12px; background: var(--bg-soft);
  border: 1px solid var(--line-2); border-inline-end: 0; border-radius: 12px 0 0 12px;
  color: var(--muted); font-size: 14px; white-space: nowrap;
}
.input-group .input { border-radius: 0 12px 12px 0; min-width: 0; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.pw-field { position: relative; }
.pw-field .input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--bg-soft); }
.pw-toggle[aria-pressed="true"] { color: var(--accent-btn); }
.input-validation-error { border-color: var(--danger) !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-btn); flex: none; }
.form-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- Bildirimler ---------- */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: var(--success-50); color: var(--success); border-color: #BBF7D0; }
.alert-error { background: var(--danger-50); color: var(--danger); border-color: #FECACA; }
.alert-info { background: var(--info-50); color: var(--info); border-color: #C7D7FE; }
.alert-warn { background: var(--warn-50); color: var(--warn); border-color: #FDE68A; }
.alert ul { margin: 0; padding-inline-start: 18px; }

/* ---------- Kart / rozet ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap;
}
.badge-accent { background: var(--accent-50); color: var(--accent-btn-hover); }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand-logo { height: 42px; width: auto; }
.brand-logo-full { height: 120px; width: auto; }

/* ---------- Giriş / kayıt sayfaları ---------- */
.auth {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 28px 16px 40px; background: radial-gradient(1200px 500px at 50% -10%, var(--accent-50), transparent 70%), var(--bg-soft);
}
.auth .brand { margin-bottom: 24px; }
.auth-card { width: 100%; max-width: 460px; padding: 24px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--accent-btn-hover); font-weight: 600; }
.slug-status { font-size: 13px; margin-top: 6px; min-height: 18px; }
.slug-status.ok { color: var(--success); }
.slug-status.bad { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (min-width: 640px) { .auth { justify-content: center; } .auth-card { padding: 32px; } }

/* ---------- Dil seçici ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.lang-switch a { padding: 6px 10px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); }
.lang-switch a.active { background: var(--ink); color: #fff; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Çerez bildirimi ---------- */
.cookie-bar {
  position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  max-width: 720px; margin: 0 auto; padding: 14px 16px;
  background: var(--ink); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 13px;
}
.cookie-bar p { margin: 0; flex: 1 1 260px; }
.cookie-bar a { color: #FFC58F; }

/* ---------- Davet / kampanya kodu alanı ---------- */
.code-input { text-transform: uppercase; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; }
.code-input::placeholder { text-transform: none; font-family: var(--font); letter-spacing: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.label-row label { margin-bottom: 0; }
.small-link { font-size: 13px; font-weight: 600; color: var(--accent-btn-hover); text-decoration: none; }
.small-link:hover { text-decoration: underline; }
.auth-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.auth-icon.ok { background: var(--success-50); color: var(--success); }
.auth-icon.warn { background: var(--warn-50); color: var(--warn); }

/* Telefon alanı: ülke seçici + biçimlenen numara (Scripts/phone.js) */
.phone-field { position: relative; display: flex; align-items: stretch; width: 100%; }
.phone-field > .input { border-radius: 0 12px 12px 0; min-width: 0; flex: 1; letter-spacing: .02em; }
.phone-cc { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 46px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-inline-end: 0;
  border-radius: 12px 0 0 12px; background: var(--bg-soft, #F6F5FA); color: var(--ink); font: 600 15px/1 var(--font); cursor: pointer; }
.phone-cc:focus-visible { outline: none; border-color: var(--accent-btn); box-shadow: 0 0 0 4px rgba(232, 89, 12, .12); }
.phone-cc .caret { font-size: 11px; color: var(--muted); }
.phone-field .flag, .phone-list .flag { font-family: "Twemoji Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; }
.phone-field.invalid .phone-cc { border-color: var(--danger); }
.phone-list { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-start: 0; width: min(320px, 100%); max-width: 92vw; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(27, 23, 64, .16); padding: 8px; }
.phone-list ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.phone-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14.5px; }
.phone-list li:hover, .phone-list li:focus { background: var(--bg-soft, #F6F5FA); outline: none; }
.phone-list li[aria-selected="true"] { font-weight: 700; }
.phone-list li .name { flex: 1; }
.phone-list li .dial { color: var(--muted); font-variant-numeric: tabular-nums; }
.phone-list li.none { color: var(--muted); cursor: default; }
