/* Siparo tasarım sistemi — tokenlar ve temel bileşenler (03-TASARIM-SISTEMI-VE-UX.md) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-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, U+20BA; }
:root {
  --brand: #FF5A1F; --brand-600: #E84A12; --brand-50: #FFF1EB; --brand-ink: #fff;
  --bg: #F6F5F3; --surface: #FFFFFF; --surface-2: #EFEDEA; --surface-3: #E6E3DF;
  --ink: #16181D; --ink-2: #3A3E46; --muted: #6B7079; --line: #E3E1DD; --line-2: #D6D3CE;
  --success: #16A34A; --success-50: #EAF7EF; --warning: #D97706; --warning-50: #FEF5E7;
  --danger: #DC2626; --danger-50: #FDECEC; --info: #2563EB; --info-50: #EBF1FE;
  --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --sh-2: 0 8px 24px rgba(16,24,40,.12);
  --sh-3: 0 24px 64px rgba(16,24,40,.24);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
[data-theme="dark"] {
  --brand: #FF7A45; --brand-600: #FF5A1F; --brand-50: #3A2218; --brand-ink: #1A0F0A;
  --bg: #111214; --surface: #1B1D21; --surface-2: #24272C; --surface-3: #2C3036;
  --ink: #F2F3F5; --ink-2: #D0D3D9; --muted: #9AA0AA; --line: #2E3238; --line-2: #3A3F46;
  --success: #22C55E; --success-50: #132A1C; --warning: #F59E0B; --warning-50: #2E2210;
  --danger: #EF4444; --danger-50: #321618; --info: #3B82F6; --info-50: #152239;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 8px 24px rgba(0,0,0,.45); --sh-3: 0 24px 64px rgba(0,0,0,.6);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
[v-cloak] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Butonlar */
.btn { --bg-btn: var(--surface); --fg-btn: var(--ink); --bd-btn: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--bd-btn); background: var(--bg-btn); color: var(--fg-btn); font-weight: 600; cursor: pointer; user-select: none;
  transition: background .12s var(--ease), transform .08s var(--ease), box-shadow .12s var(--ease); white-space: nowrap; text-decoration: none !important; touch-action: manipulation; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { --bg-btn: var(--brand); --fg-btn: var(--brand-ink); --bd-btn: var(--brand); }
.btn-success { --bg-btn: var(--success); --fg-btn: #fff; --bd-btn: var(--success); }
.btn-danger { --bg-btn: var(--danger); --fg-btn: #fff; --bd-btn: var(--danger); }
.btn-ghost { --bg-btn: transparent; --bd-btn: transparent; }
.btn-soft { --bg-btn: var(--surface-2); --bd-btn: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 17px; }
.btn-xl { min-height: 64px; padding: 0 24px; font-size: 19px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.kbd { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, currentColor 14%, transparent); letter-spacing: .02em; }

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12px; color: var(--danger); }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input.is-invalid { border-color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s var(--ease); box-shadow: var(--sh-1); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::before { transform: translateX(18px); }

/* Kart / rozet */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.badge-brand { background: var(--brand-50); color: var(--brand-600); }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }

/* Tablo */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .r { text-align: right; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 9999; pointer-events: none; width: min(560px, calc(100% - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: #1F2227; color: #fff; box-shadow: var(--sh-2); font-weight: 500; animation: toast-in .18s var(--ease); }
.toast.error { background: var(--danger); }
.toast.success { background: #11803C; }
.toast .t-msg { flex: 1; }
.toast button { background: rgba(255,255,255,.16); border: 0; color: #fff; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* Modal / drawer */
.overlay { position: fixed; inset: 0; background: rgba(10,12,16,.48); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; animation: pop .18s var(--ease); }
.modal.wide { width: min(880px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { margin: 0; font-size: 18px; }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--surface); }
.drawer-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(10,12,16,.35); animation: fade .15s; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; animation: slide-in .2s var(--ease); }
.drawer .modal-b { flex: 1; overflow: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }

/* Numpad / PIN */
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { min-height: 58px; font-size: 22px; font-weight: 700; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; touch-action: manipulation; }
.numpad button:active { background: var(--surface-2); transform: scale(.97); }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); display: block; transition: .12s; }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .e-icon { font-size: 34px; margin-bottom: 8px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.logo-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.logo-mark .logo-img { height: 30px; width: auto; display: block; }
.logo-mark .logo-sym { height: 30px; width: 30px; flex: none; }
.logo-mark b { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 17px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
@media (max-width: 720px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.alert-warning { padding: 10px 14px; border-radius: 12px; background: var(--warning-50, #fff7e6); color: var(--warning); font-size: 14px; }
