/* =========================================================
   FaturaKartı — ortak temel
   Renk dili fatura koçanından gelir: gece mavisi mürekkep,
   koçanın sarı / pembe / mavi nüshaları, kopyalandı yeşili.
   ========================================================= */
:root {
  --ink: #0b1533;
  --ink-2: #16234d;
  --ink-3: #26356a;
  --cobalt: #3d5afe;
  --cobalt-2: #2c45dd;
  --cobalt-soft: #e8ecff;
  --sun: #ffd23f;
  --sun-2: #ffc400;
  --sun-soft: #fff6d6;
  --rose: #ff8fab;
  --rose-soft: #ffe8ee;
  --sky: #8fd3ff;
  --sky-soft: #e4f4ff;
  --mint: #19d3a2;
  --mint-ink: #067a5c;
  --mint-soft: #ddf8ef;
  --err: #e5484d;
  --err-soft: #fdeceb;
  --paper: #f4f6fb;
  --white: #fff;
  --line: #e1e6f2;
  --line-2: #cdd5e6;
  --muted: #5b6787;
  --text: #0b1533;
  --display: "Bricolage", "Outfit", system-ui, sans-serif;
  --body: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow: 0 1px 2px rgba(11, 21, 51, .06), 0 8px 24px -12px rgba(11, 21, 51, .18);
  --shadow-lg: 0 2px 4px rgba(11, 21, 51, .05), 0 30px 60px -24px rgba(11, 21, 51, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font: 400 16px/1.6 var(--body); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
img { max-width: 100%; display: block; }
small { font-size: .86rem; color: var(--muted); }
s { opacity: .55; font-weight: 400; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sun); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 58ch; }
.tnum { font-variant-numeric: tabular-nums; }

/* İkon */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.ic-sm { width: 1em; height: 1em; }
.ic-lg { width: 1.6em; height: 1.6em; }
.ic-bubble { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--cobalt-soft); color: var(--cobalt); flex: none; }
.ic-bubble.sun { background: var(--sun-soft); color: #8a6500; }
.ic-bubble.rose { background: var(--rose-soft); color: #b3264f; }
.ic-bubble.sky { background: var(--sky-soft); color: #0b6aa6; }
.ic-bubble.mint { background: var(--mint-soft); color: var(--mint-ink); }
.ic-bubble.ink { background: var(--ink); color: var(--sun); }

/* Düğmeler */
.btn { --bg: var(--white); --fg: var(--text); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: .65em 1.25em;
  border: 1.5px solid var(--bd); border-radius: var(--r); background: var(--bg); color: var(--fg);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn-primary { --bg: var(--cobalt); --fg: #fff; --bd: var(--cobalt); box-shadow: 0 8px 20px -10px rgba(61, 90, 254, .8); }
.btn-primary:hover { --bg: var(--cobalt-2); --bd: var(--cobalt-2); }
.btn-sun { --bg: var(--sun); --fg: var(--ink); --bd: var(--sun); box-shadow: 0 8px 20px -10px rgba(255, 196, 0, .9); }
.btn-sun:hover { --bg: var(--sun-2); --bd: var(--sun-2); }
.btn-ink { --bg: var(--ink); --fg: #fff; --bd: var(--ink); }
.btn-ink:hover { --bg: var(--ink-3); --bd: var(--ink-3); }
.btn-mint { --bg: var(--mint); --fg: var(--ink); --bd: var(--mint); }
.btn-ghost { --bg: transparent; }
.btn-on-dark { --bg: rgba(255, 255, 255, .08); --fg: #fff; --bd: rgba(255, 255, 255, .25); }
.btn-on-dark:hover { --bg: rgba(255, 255, 255, .14); border-color: #fff; }
.btn-danger { --fg: var(--err); --bd: #f3c3c1; }
.btn-danger:hover { --bg: var(--err-soft); border-color: var(--err); }
.btn-sm { min-height: 38px; padding: .4em .85em; font-size: .92rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 56px; padding: .8em 1.6em; font-size: 1.06rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 48px; padding: 0; }
.btn s { opacity: .6; }

/* Formlar */
.form { display: grid; gap: 1.15rem; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; min-width: 0; }
legend { display: flex; align-items: center; gap: .6rem; font: 700 1.12rem var(--display); letter-spacing: -.01em; padding: 0; margin-bottom: .35rem; }
.legend-note { color: var(--muted); font-size: .95rem; margin: -.4rem 0 0; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: .94rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 50px; padding: .7em .95em; border: 1.5px solid var(--line-2); border-radius: 12px;
  background: var(--white); color: var(--text); font: 400 16px/1.4 var(--body); /* 16px: iOS yakınlaştırmasını önler */
  transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa4bd; }
input:hover, select:hover, textarea:hover { border-color: #aab4cc; }
input:focus, select:focus, textarea:focus { border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(61, 90, 254, .16); outline: 0; }
input:disabled { background: var(--paper); color: var(--muted); }
select { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6787' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8em center / 18px; padding-right: 2.6em; }
input[type=color] { width: 56px; height: 50px; padding: 4px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--white); cursor: pointer; }
input[type=file] { font: inherit; max-width: 100%; }
.input-ic { position: relative; }
.input-ic > .ic { position: absolute; left: .9em; top: 50%; transform: translateY(-50%); color: #8a95b2; pointer-events: none; }
.input-ic > input, .input-ic > select { padding-left: 2.75em; }
.input-ic:focus-within > .ic { color: var(--cobalt); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--err); }
.error { display: flex; gap: .4rem; align-items: flex-start; color: #c1272d; font-size: .9rem; font-weight: 500; margin: 0; }
.ok { display: flex; gap: .4rem; align-items: center; color: var(--mint-ink); font-size: .9rem; font-weight: 600; margin: 0; min-height: 1.4em; }
.grid2 { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: .97rem; padding: .3rem 0; cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; flex: none; margin: 1px 0 0; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--white); display: grid; place-items: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.check input::after { content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--cobalt); border-color: var(--cobalt); }
.check input:checked::after { opacity: 1; }
.check small { display: block; margin-top: .1rem; }
.check a { font-weight: 600; color: var(--cobalt); }
/* Anahtar (switch) görünümlü onay kutusu */
.switch { display: flex; gap: .9rem; align-items: center; justify-content: space-between; padding: .6rem 0; cursor: pointer; }
.switch input { appearance: none; position: relative; width: 48px; height: 28px; flex: none; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background-color .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--mint); }
.switch input:checked::after { transform: translateX(20px); }
.switch span { display: grid; }
.switch small { margin-top: .1rem; }

.choice { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border: 1.5px solid var(--line-2); border-radius: var(--r); cursor: pointer; background: var(--white); transition: border-color .15s, background-color .15s; }
.choice:hover { border-color: #aab4cc; }
.choice:has(input:checked) { border-color: var(--cobalt); background: var(--cobalt-soft); box-shadow: 0 0 0 3px rgba(61, 90, 254, .12); }
.choice input { appearance: none; width: 22px; height: 22px; flex: none; border: 1.5px solid var(--line-2); border-radius: 50%; background: #fff; display: grid; place-items: center; }
.choice input:checked { border: 7px solid var(--cobalt); }
.choice b { display: block; }
.choice small { display: block; }
.choice .ic-bubble { margin-left: auto; }
.hp { position: absolute; left: -9999px; }

/* Bildirimler */
.flash { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--r); margin: 0 0 1rem; font-weight: 500; }
.flash .ic { margin-top: .1em; }
.flash-ok { background: var(--mint-soft); color: #05573f; }
.flash-error { background: var(--err-soft); color: #9b1c21; }
.flash-info { background: var(--sun-soft); color: #6b4e00; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: .55rem;
  transform: translate(-50%, 16px) scale(.96); background: var(--ink); color: #fff; padding: .75rem 1.2rem .75rem 1rem; border-radius: 99px;
  font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); max-width: 92vw; }
.toast::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1533' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* Etiketler */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; padding: .28rem .7rem; border-radius: 99px; background: var(--paper); color: var(--muted); white-space: nowrap; line-height: 1.3; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok, .pill-odendi, .pill-tamamlandi, .pill-gonderildi { background: var(--mint-soft); color: var(--mint-ink); }
.pill-wait, .pill-bekliyor, .pill-yeni { background: var(--sun-soft); color: #7a5a00; }
.pill-err, .pill-iptal, .pill-iade, .pill-hata { background: var(--err-soft); color: #b0242a; }
.pill-info, .pill-hazirlaniyor, .pill-baskida, .pill-kargoda { background: var(--cobalt-soft); color: var(--cobalt-2); }

/* Kopyalanabilir satır (örnek kart, havale bilgileri) */
.copyrows { list-style: none; margin: 0; padding: 0; }
.copyrow { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 62px; padding: .7rem .9rem; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .15s; }
.copyrow:hover { background: var(--paper); }
.copyrow .ic-bubble { width: 38px; height: 38px; border-radius: 11px; }
.copyrow-text { display: grid; min-width: 0; flex: 1; }
.copyrow-label { font-size: .8rem; color: var(--muted); }
.copyrow-value { font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.copyrow-act { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--muted); flex: none; transition: all .2s var(--ease); }
.copyrow.copied .copyrow-act { background: var(--mint); border-color: var(--mint); color: var(--ink); transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
