/* ============================================================
   YtaPOS v2 — tasarım sistemi
   Sade, ferah, indigo vurgulu; yumuşak geçişler.
   ============================================================ */
:root {
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);

  --bg:        #f5f6fb;
  --bg-2:      #eceef6;
  --surface:   #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #f1f3f9;
  --line:      #e6e8f0;
  --line-2:    #d9dce8;
  --text:      #161a2e;
  --text-2:    #4a5070;
  --text-3:    #8a8fa8;
  --overlay:   rgba(17, 20, 40, .42);

  --ok:      #16a34a;  --ok-bg:      #e8f7ee;
  --warn:    #d97706;  --warn-bg:    #fef4e2;
  --danger:  #dc2626;  --danger-bg:  #fdecec;
  --info:    #0284c7;  --info-bg:    #e6f4fb;

  --table-empty: #ffffff;
  --table-busy:  #4f46e5;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(22, 26, 46, .05), 0 1px 1px rgba(22, 26, 46, .03);
  --sh-2: 0 6px 20px -6px rgba(22, 26, 46, .14), 0 2px 6px -2px rgba(22, 26, 46, .06);
  --sh-3: 0 24px 60px -18px rgba(22, 26, 46, .32);
  --ring: 0 0 0 3px rgba(99, 102, 241, .25);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: .14s;
  --t: .24s;
  --t-slow: .4s;

  --sidebar-w: 248px;
  --topbar-h: 60px;
  --fs: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --auto-dark: 1; }
}
:root[data-theme="dark"] {
  --bg:        #0e1020;
  --bg-2:      #151831;
  --surface:   #171a30;
  --surface-2: #1c2039;
  --surface-3: #232744;
  --line:      #2a2e4d;
  --line-2:    #363b5e;
  --text:      #eceefa;
  --text-2:    #b2b6d3;
  --text-3:    #7c81a3;
  --overlay:   rgba(4, 5, 14, .62);
  --brand-50:  #1e1f45;
  --brand-100: #26285a;
  --brand-200: #33367a;
  --ok-bg: #12301f; --warn-bg: #33270f; --danger-bg: #3a1618; --info-bg: #0f2a3a;
  --table-empty: #1c2039;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 8px 24px -8px rgba(0,0,0,.5);
  --sh-3: 0 28px 70px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, [contenteditable] { user-select: text; }
a { color: var(--brand-600); text-decoration: none; }
::selection { background: var(--brand-200); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }
.no-anim *, .no-anim *::before, .no-anim *::after { animation: none !important; transition: none !important; }

/* ---------- yardımcılar ---------- */
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.center { justify-content: center; }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ok { color: var(--ok); } .danger { color: var(--danger); } .warn { color: var(--warn); } .brand { color: var(--brand-600); }
:root[data-theme="dark"] .brand { color: var(--brand-300); }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--text-3); }

/* ---------- ikon ---------- */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }
.ic.xl { width: 30px; height: 30px; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast), color var(--t-fast);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55); }
.btn.primary:hover { background: var(--brand-700); }
.btn.grad { background: var(--brand-grad); border: 0; color: #fff; box-shadow: 0 8px 22px -8px rgba(99, 102, 241, .7); }
.btn.grad:hover { filter: brightness(1.06); }
.btn.soft { background: var(--brand-50); border-color: transparent; color: var(--brand-700); }
:root[data-theme="dark"] .btn.soft { color: var(--brand-300); }
.btn.soft:hover { background: var(--brand-100); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-soft { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok-soft { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.btn.warn-soft { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.btn.sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: var(--r); }
.btn.xl { height: 58px; font-size: 16px; border-radius: var(--r); }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 31px; }
.btn.block { width: 100%; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-400); box-shadow: var(--ring); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8fa8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .ic { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; }
.input-group .input { padding-left: 38px; }
.input-group .suffix { position: absolute; right: 12px; color: var(--text-3); font-size: 12.5px; pointer-events: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }

/* anahtar (toggle) */
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 30px; cursor: pointer; transition: background var(--t); }
.switch span::after { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t) var(--spring); }
.switch input:checked + span { background: var(--brand-600); }
.switch input:checked + span::after { transform: translateX(17px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.toggle-row + .toggle-row { margin-top: 8px; }
.toggle-row .t { font-weight: 600; font-size: 13.5px; }
.toggle-row .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--brand-600); cursor: pointer; }

/* seçim çipleri */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 40px; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all var(--t-fast); white-space: nowrap;
}
.chip:hover { border-color: var(--brand-300); color: var(--text); }
.chip.active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6); }
.chip .count { font-size: 11px; padding: 1px 7px; border-radius: 20px; background: var(--surface-3); color: var(--text-2); }
.chip.active .count { background: rgba(255,255,255,.22); color: #fff; }

/* segment */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; transition: all var(--t-fast); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

/* rozet */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
:root[data-theme="dark"] .badge.brand { color: var(--brand-300); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- kart ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }
.section-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--text-3); margin: 0 0 10px; }

/* istatistik kartları */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { position: relative; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; }
.stat .k { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat .ic-wrap { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.stat.hero { background: var(--brand-grad); border: 0; color: #fff; }
.stat.hero .k, .stat.hero .s { color: rgba(255,255,255,.78); }
.stat.hero .ic-wrap { background: rgba(255,255,255,.18); color: #fff; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.trend.up { background: var(--ok-bg); color: var(--ok); }
.trend.down { background: var(--danger-bg); color: var(--danger); }

/* ---------- tablo ---------- */
.tbl-wrap { overflow: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background var(--t-fast); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tfoot td { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.tbl .actions { white-space: nowrap; text-align: right; }

/* ---------- boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--text-3); }
.empty .em-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-500); }
.empty .em-ic .ic { width: 28px; height: 28px; }
.empty h4 { margin: 4px 0 0; color: var(--text); font-size: 15px; }
.empty p { margin: 0; font-size: 13px; max-width: 340px; line-height: 1.5; }

/* ============================================================
   UYGULAMA İSKELETİ
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; transition: grid-template-columns var(--t-slow) var(--ease); }
.app.collapsed { grid-template-columns: 76px 1fr; }
.app.fullscreen { grid-template-columns: 0 1fr; }
.app.fullscreen .sidebar { visibility: hidden; }

.sidebar { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-right: 1px solid var(--line); overflow: hidden; z-index: 20; }
.sb-brand { height: var(--topbar-h); display: flex; align-items: center; gap: 11px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 15px; letter-spacing: -.04em; box-shadow: 0 8px 18px -8px rgba(99,102,241,.8); flex: none; }
.sb-brand .name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.sb-brand .sub { font-size: 11px; color: var(--text-3); font-weight: 600; }
.sb-toggle { margin-left: auto; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 16px; }
.sb-group { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); padding: 14px 10px 6px; white-space: nowrap; }
.sb-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 11px; margin: 1px 0;
  border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.sb-item:hover { background: var(--surface-3); color: var(--text); }
.sb-item.active { background: var(--brand-50); color: var(--brand-700); }
:root[data-theme="dark"] .sb-item.active { color: #fff; background: var(--brand-100); }
.sb-item.active::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand-600); animation: grow-y var(--t) var(--ease); }
.sb-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sb-item .cnt { font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-600); color: #fff; display: grid; place-items: center; }
.sb-item .chev { transition: transform var(--t) var(--ease); }
.sb-item.open .chev { transform: rotate(180deg); }
.sb-sub { overflow: hidden; max-height: 0; transition: max-height var(--t-slow) var(--ease); }
.sb-sub.open { max-height: 400px; }
.sb-sub .sb-item { height: 36px; padding-left: 40px; font-size: 13px; }
.app.collapsed .sb-item .lbl, .app.collapsed .sb-item .cnt, .app.collapsed .sb-item .chev, .app.collapsed .sb-brand .txt, .app.collapsed .sb-group, .app.collapsed .sb-user .txt, .app.collapsed .sb-foot { display: none; }
.app.collapsed .sb-item { justify-content: center; padding: 0; }
.app.collapsed .sb-sub .sb-item { padding: 0; }
.app.collapsed .sb-brand { padding: 0 20px; }
.app.collapsed .sb-toggle { display: none; }
.sb-user { display: flex; align-items: center; gap: 10px; margin: 0 10px 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: background var(--t-fast); }
.sb-user:hover { background: var(--surface-3); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.sb-user .n { font-weight: 700; font-size: 13px; }
.sb-user .r { font-size: 11.5px; color: var(--text-3); }
.sb-foot { padding: 0 16px 12px; font-size: 11px; color: var(--text-3); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 10; }
.topbar .title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.topbar .crumb { font-size: 12px; color: var(--text-3); font-weight: 600; }
.topbar .search { flex: 1; max-width: 460px; margin-left: 12px; }
.topbar .search .input { height: 38px; background: var(--surface-2); border-color: transparent; }
.topbar .search .input:focus { background: var(--surface); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 20px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); cursor: pointer; border: 0; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-2); font-size: 13px; }

.view { flex: 1; min-height: 0; overflow: auto; position: relative; }
.page { padding: 22px 24px 40px; max-width: 1480px; margin: 0 auto; animation: page-in var(--t-slow) var(--ease) both; }
.page.full { max-width: none; padding: 0; height: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--text-3); font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
@media (max-width: 1200px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main-side { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* stagger giriş */
.stagger > * { animation: rise var(--t-slow) var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .08s; } .stagger > *:nth-child(4) { animation-delay: .11s; }
.stagger > *:nth-child(5) { animation-delay: .14s; } .stagger > *:nth-child(6) { animation-delay: .17s; }
.stagger > *:nth-child(7) { animation-delay: .2s; }  .stagger > *:nth-child(8) { animation-delay: .23s; }
.stagger > *:nth-child(n+9) { animation-delay: .26s; }

/* ============================================================
   KATMANLAR: modal, çekmece, bildirim
   ============================================================ */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; }
.layer .backdrop { position: absolute; inset: 0; background: var(--overlay); backdrop-filter: blur(3px); animation: fade-in var(--t) var(--ease) both; }
.layer.closing .backdrop { animation: fade-out var(--t) var(--ease) both; }
.modal {
  position: relative; margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  animation: pop-in var(--t-slow) var(--spring) both;
}
.modal.sm { width: min(420px, calc(100vw - 32px)); }
.modal.lg { width: min(820px, calc(100vw - 32px)); }
.modal.xl { width: min(1100px, calc(100vw - 32px)); }
.layer.closing .modal { animation: pop-out var(--t) var(--ease) both; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; flex: 1; }
.modal-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; font-weight: 500; }
.modal-body { padding: 4px 20px 18px; overflow: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.x-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: all var(--t-fast); flex: none; }
.x-btn:hover { background: var(--danger-bg); color: var(--danger); transform: rotate(90deg); }

.drawer {
  position: relative; margin-left: auto; height: 100%; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); box-shadow: var(--sh-3); animation: slide-in var(--t-slow) var(--ease) both;
}
.drawer.wide { width: min(640px, 100vw); }
.layer.closing .drawer { animation: slide-out var(--t) var(--ease) both; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 800; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 11px; min-width: 260px; max-width: 420px; padding: 12px 14px;
  border-radius: var(--r); background: var(--text); color: var(--surface); box-shadow: var(--sh-3); font-size: 13.5px; font-weight: 600;
  animation: toast-in var(--t-slow) var(--spring) both;
}
:root[data-theme="dark"] .toast { background: #f1f2fb; color: #161a2e; }
.toast.out { animation: toast-out var(--t) var(--ease) both; }
.toast .t-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast.ok .t-ic { background: var(--ok); color: #fff; }
.toast.danger .t-ic { background: var(--danger); color: #fff; }
.toast.warn .t-ic { background: var(--warn); color: #fff; }
.toast.info .t-ic { background: var(--brand-600); color: #fff; }

/* menü (popover) */
.menu { position: fixed; z-index: 250; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); animation: pop-in var(--t) var(--ease) both; transform-origin: top right; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.menu button:hover { background: var(--surface-3); color: var(--text); }
.menu button.danger { color: var(--danger); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* aksiyon ızgarası (Diğer menüsü) */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.action-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: center; font-weight: 600; font-size: 12.5px; color: var(--text-2); transition: all var(--t) var(--ease); }
.action-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand-200); color: var(--text); }
.action-tile .a-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 20px -10px currentColor; }
.action-tile .a-ic .ic { width: 24px; height: 24px; }
.action-tile[disabled] { opacity: .45; pointer-events: none; }

/* sayı tuş takımı */
.numpad-display { height: 64px; border-radius: var(--r); background: var(--surface-3); display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow: hidden; }
.numpad-display .unit { font-size: 15px; color: var(--text-3); margin-left: 6px; font-weight: 700; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.numpad button { height: 54px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-size: 19px; font-weight: 700; cursor: pointer; transition: all var(--t-fast); }
.numpad button:hover { background: var(--surface-3); }
.numpad button:active { transform: scale(.95); background: var(--brand-50); }
.numpad button.fn { font-size: 14px; color: var(--text-2); }
.quick-amounts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.quick-amounts .chip { flex: 1; justify-content: center; }

/* ============================================================
   GİRİŞ EKRANI
   ============================================================ */
.login { position: fixed; inset: 0; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); z-index: 50; }
.login-art { position: relative; overflow: hidden; background: var(--brand-grad); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.login-art .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .35; background: radial-gradient(circle at 30% 30%, #fff, transparent 60%); animation: float 12s ease-in-out infinite; }
.login-art h2 { font-size: 38px; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; max-width: 460px; position: relative; }
.login-art p { opacity: .85; max-width: 420px; line-height: 1.6; position: relative; margin: 0; }
.login-art .feat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; position: relative; }
.login-art .feat span { padding: 7px 12px; border-radius: 30px; background: rgba(255,255,255,.16); font-size: 12.5px; font-weight: 600; backdrop-filter: blur(4px); }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-card { width: min(400px, 100%); animation: rise var(--t-slow) var(--ease) both; }
.login-card h1 { font-size: 26px; letter-spacing: -.03em; margin: 18px 0 6px; }
.login-card .sub { color: var(--text-3); margin: 0 0 24px; }
.user-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-bottom: 18px; }
.user-pick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12.5px; transition: all var(--t-fast); }
.user-pick button:hover { border-color: var(--brand-300); transform: translateY(-2px); }
.user-pick button.active { border-color: var(--brand-600); box-shadow: var(--ring); }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 10px 0 4px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); transition: all var(--t-fast) var(--spring); }
.pin-dots i.on { background: var(--brand-600); border-color: var(--brand-600); transform: scale(1.1); }
.shake { animation: shake .4s ease both; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ============================================================
   MASALAR
   ============================================================ */
.zone-bar { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 20px; }
.tcard {
  position: relative; height: 128px; border-radius: var(--r-lg); padding: 13px 14px; cursor: pointer; overflow: hidden;
  background: var(--table-empty); border: 1px solid var(--line); box-shadow: var(--sh-1);
  display: flex; flex-direction: column; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t);
  animation: rise var(--t-slow) var(--ease) both;
}
.tcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand-200); }
.tcard:active { transform: scale(.98); }
.tcard .tn { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.tcard .tz { font-size: 11px; font-weight: 600; color: var(--text-3); }
.tcard .empty-lbl { margin-top: auto; font-size: 12px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tcard.busy { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 14px 28px -14px rgba(79, 70, 229, .8); }
.tcard.busy .tz { color: rgba(255,255,255,.75); }
.tcard.busy.t-mid { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 14px 28px -14px rgba(234, 88, 12, .8); }
.tcard.busy.t-long { background: linear-gradient(135deg, #ef4444, #be123c); box-shadow: 0 14px 28px -14px rgba(190, 18, 60, .8); }
.tcard.paying { outline: 3px solid #22c55e; outline-offset: -3px; }
.tcard .tmeta { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.tcard .tamt { white-space: nowrap; font-size: 18px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tcard .ttime { white-space: nowrap; font-size: 11.5px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 4px; }
.tcard .tbadges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.tcard .tbadges span { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; background: rgba(255,255,255,.2); }
.tcard .tq { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; opacity: 0; transform: translateX(6px); transition: all var(--t) var(--ease); }
.tcard:hover .tq { opacity: 1; transform: none; }
.tcard .tq button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(255,255,255,.22); color: #fff; display: grid; place-items: center; cursor: pointer; }
.tcard .tq button:hover { background: rgba(255,255,255,.36); }
.tcard .call { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: #fbbf24; color: #78350f; display: grid; place-items: center; animation: ring 1.2s ease-in-out infinite; }
.tcard .res-flag { position: absolute; right: 10px; top: 10px; }

/* ============================================================
   SİPARİŞ EKRANI (masa / hızlı sipariş)
   ============================================================ */
.order { display: grid; grid-template-columns: 116px minmax(0, 1fr) 380px; height: 100%; min-height: 0; }
.order-cats { overflow-y: auto; padding: 10px 8px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cat-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; border-radius: var(--r); border: 1px solid transparent; cursor: pointer; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-2); line-height: 1.2; transition: all var(--t-fast); }
.cat-tile:hover { background: var(--surface-3); }
.cat-tile.active { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
:root[data-theme="dark"] .cat-tile.active { color: #fff; }
.cat-tile .cimg { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; overflow: hidden; background-size: cover; background-position: center; box-shadow: var(--sh-1); }
.order-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.order-search { padding: 12px 16px; display: flex; gap: 10px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.prod-grid { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; }
.pcard {
  position: relative; border-radius: var(--r-lg); overflow: hidden; cursor: pointer; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--sh-1); display: flex; flex-direction: column;
  transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); animation: rise var(--t-slow) var(--ease) both;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand-200); }
.pcard:active { transform: scale(.96); }
.pcard .pimg { height: 96px; display: grid; place-items: center; font-size: 40px; background: var(--surface-3); background-size: cover; background-position: center; }
.pcard .pbody { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .pname { font-weight: 700; font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pprice { margin-top: auto; font-weight: 800; color: var(--brand-600); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .pcard .pprice { color: var(--brand-300); }
.pcard .pqty { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--brand-600); color: #fff; font-weight: 800; font-size: 12.5px; display: grid; place-items: center; box-shadow: 0 4px 10px -2px rgba(79, 70, 229, .6); animation: pop-in .3s var(--spring) both; }
.pcard.out { opacity: .5; }
.pcard.out::after { content: 'Tükendi'; position: absolute; top: 8px; left: 8px; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--danger); color: #fff; }
.pcard.flash { animation: flash .45s var(--ease); }
.prod-grid.compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.prod-grid.compact .pimg { display: none; }
.prod-grid.colored .pcard { border-top: 4px solid var(--pc, var(--brand-500)); }

.order-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.os-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.os-head .tname { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.os-body { flex: 1; overflow-y: auto; padding: 10px 12px; }
.os-sec { margin-bottom: 12px; }
.os-sec-h { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 12px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.os-sec-h .badge { margin-left: auto; }
.line { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 6px; animation: line-in var(--t) var(--ease) both; transition: background var(--t-fast), border-color var(--t-fast); }
.line.cart { border-style: dashed; border-color: var(--brand-300); background: var(--brand-50); }
.line.sel { border-color: var(--brand-500); background: var(--brand-50); }
.line.paid { opacity: .55; }
.line.paid .lname { text-decoration: line-through; }
.line .lname { font-weight: 700; font-size: 13px; line-height: 1.25; }
.line .lmeta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.line .lprice { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.qty button { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.qty button:hover { background: var(--surface-3); color: var(--text); }
.qty span { min-width: 26px; text-align: center; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.os-totals { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.os-totals .tr { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-2); }
.os-totals .tr b { color: var(--text); font-variant-numeric: tabular-nums; }
.os-totals .tr.grand { font-size: 18px; font-weight: 800; color: var(--text); padding-top: 6px; }
.os-actions { padding: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.os-actions .btn { height: 44px; flex-direction: column; gap: 2px; font-size: 11px; padding: 0 4px; }
.os-actions .btn.main { grid-column: 1 / -1; height: 52px; flex-direction: row; font-size: 15px; gap: 10px; }
@media (max-width: 1150px) { .order { grid-template-columns: 96px minmax(0, 1fr) 330px; } }

/* ödeme paneli */
.pay-hero { margin: -18px -20px 16px; padding: 22px 20px; background: var(--brand-grad); color: #fff; text-align: center; }
.pay-hero .l { font-size: 12px; opacity: .8; font-weight: 600; }
.pay-hero .v { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pay-hero .p { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.pay-box { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.pay-box .k { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.pay-box .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pay-m { height: 78px; border-radius: var(--r-lg); border: 0; color: #fff; font-weight: 800; font-size: 13.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; transition: transform var(--t-fast) var(--ease), filter var(--t-fast); box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); }
.pay-m:hover { filter: brightness(1.07); transform: translateY(-2px); }
.pay-m:active { transform: scale(.97); }
.pay-m .ic { width: 22px; height: 22px; }

/* ============================================================
   MUTFAK / TESLİM
   ============================================================ */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; animation: rise var(--t-slow) var(--ease) both; }
.kcard .kh { padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.kcard .kh .tn { font-weight: 800; font-size: 15px; }
.kcard.late .kh { background: var(--danger-bg); }
.kcard.mid .kh { background: var(--warn-bg); }
.kcard .ki { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.kcard .ki:last-of-type { border-bottom: 0; }
.kcard .ki .q { font-weight: 800; min-width: 30px; height: 26px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; }
.kcard .ki.done { opacity: .45; text-decoration: line-through; }
.kcard .kf { padding: 10px 14px; border-top: 1px solid var(--line); }

/* ============================================================
   GRAFİKLER (SVG)
   ============================================================ */
.chart { width: 100%; display: block; }
.chart .grid line { stroke: var(--line); }
.chart text { fill: var(--text-3); font-size: 10.5px; font-family: var(--font); }
.chart .bar { fill: var(--brand-500); transition: opacity var(--t-fast); transform-origin: bottom; animation: bar-up .7s var(--ease) both; }
.chart .bar:hover { opacity: .8; }
.chart .area { fill: url(#chartGrad); }
.chart .linep { fill: none; stroke: var(--brand-500); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.2s var(--ease) forwards; }
.hbar { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.hbar .hl { width: 38%; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .ht { flex: 1; height: 9px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.hbar .ht i { display: block; height: 100%; border-radius: 9px; background: var(--brand-grad); animation: grow-x .8s var(--ease) both; transform-origin: left; }
.hbar .hv { min-width: 90px; text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 13px; flex: 1; min-width: 0; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span:last-child { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* takvim (rezervasyon) */
.cal { display: grid; grid-template-columns: 64px 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal .hour { height: 44px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); padding: 4px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.cal .lane { position: relative; border-left: 1px solid var(--line); }
.cal .slot { height: 44px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast); }
.cal .slot:hover { background: var(--brand-50); }
.cal .ev { position: absolute; left: 8px; right: 8px; border-radius: 10px; padding: 6px 10px; background: var(--brand-600); color: #fff; font-size: 12px; font-weight: 600; overflow: hidden; cursor: pointer; box-shadow: var(--sh-2); animation: pop-in .35s var(--spring) both; }
.cal .now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 2; }
.cal .now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ayarlar */
.settings { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 0; padding: 8px; }
.settings-nav .sb-item { height: 38px; }
@media (max-width: 1000px) { .settings { grid-template-columns: 1fr; } .settings-nav { position: static; } }

/* görsel yükleme */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 22px; text-align: center; color: var(--text-3); cursor: pointer; transition: all var(--t-fast); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-600); }
.img-prev { width: 110px; height: 110px; border-radius: var(--r-lg); background: var(--surface-3); background-size: cover; background-position: center; display: grid; place-items: center; font-size: 44px; flex: none; }

/* yükleniyor */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--brand-100); border-top-color: var(--brand-600); animation: spin .8s linear infinite; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 400; transition: opacity var(--t-slow); }
.boot.out { opacity: 0; pointer-events: none; }
.boot .logo { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; animation: breathe 1.6s ease-in-out infinite; }

/* yazdırma */
#print-area { display: none; }
@media print {
  body { overflow: visible; background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #000; font-family: 'Courier New', monospace; font-size: 12px; }
}

/* ============================================================
   ANİMASYONLAR
   ============================================================ */
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.95) translateY(6px); } }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slide-out { to { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes line-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes bar-up { from { transform: scaleY(0); } to { transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -24px); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .55); } 100% { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ============================================================
   DAR EKRAN — telefon ve dikey tablet (mobil uygulama)
   ============================================================ */
.sb-scrim, .os-scrim, .os-peek { display: none; }
@media (hover: none) {
  ::-webkit-scrollbar { width: 0; height: 0; }
  .tcard .tq { opacity: 1; transform: none; }
  .btn:hover, .chip:hover, .tcard:hover, .pcard:hover, .action-tile:hover { transform: none; }
}
@media (max-width: 900px) {
  .app, .app.collapsed, .app.fullscreen { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform var(--t-slow) var(--ease); box-shadow: var(--sh-3); z-index: 60; }
  .app.nav-open .sidebar { transform: none; visibility: visible; }
  .app.fullscreen .sidebar { visibility: visible; }
  .sb-scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 55; opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); }
  .app.nav-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .app.collapsed .sb-item .lbl, .app.collapsed .sb-item .cnt, .app.collapsed .sb-item .chev, .app.collapsed .sb-brand .txt, .app.collapsed .sb-group, .app.collapsed .sb-user .txt, .app.collapsed .sb-foot { display: revert; }
  .app.collapsed .sb-item { justify-content: flex-start; padding: 0 11px; }
  .app.collapsed .sb-sub .sb-item { padding-left: 40px; }
  .sb-toggle { display: none; }
  .sb-item { height: 44px; }

  .topbar { padding: 0 8px 0 4px; gap: 6px; height: 56px; }
  .topbar .title { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }
  .topbar .crumb, .clock { display: none; }
  #tb-actions { margin-left: 4px !important; overflow-x: auto; scrollbar-width: none; justify-content: flex-end; }
  #tb-actions::-webkit-scrollbar { display: none; }
  .topbar .pill { height: 30px; padding: 0 10px; font-size: 11.5px; }

  .page { padding: 14px 12px 32px; }
  .page-head { margin-bottom: 14px; gap: 10px; align-items: flex-start; }
  .page-head h1 { font-size: 20px; }
  .page-head > .row, .page-head > div:last-child { flex-wrap: wrap; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat .v { font-size: 19px; }
  .card-head { padding: 12px 14px; flex-wrap: wrap; }
  .card-body { padding: 14px; }
  .form-grid.three { grid-template-columns: 1fr; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .toolbar { gap: 8px; }
  .toolbar .input-group, .toolbar .search { flex: 1 1 100%; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .settings-nav { display: flex; overflow-x: auto; gap: 4px; padding: 4px; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav .sb-group { display: none; }
  .settings-nav .sb-item { flex: none; height: 36px; }
  .settings-nav .sb-item.active::before { display: none; }
  .hbar .hl { width: 34%; }
  .hbar .hv { min-width: 80px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }

  /* katmanlar: modal alttan açılan sayfa olur */
  .modal { margin: auto 0 0; width: 100vw !important; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; animation: sheet-in var(--t-slow) var(--ease) both; }
  .layer.closing .modal { animation: sheet-out var(--t) var(--ease) both; }
  .modal-foot { border-radius: 0; flex-wrap: wrap; padding: 12px 16px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-body { padding: 4px 16px 16px; }
  .drawer, .drawer.wide { width: 100vw; }
  .drawer-head { padding: 14px 16px; }
  .drawer-body { padding: 16px; }
  .drawer-foot { padding: 12px 16px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { min-width: 0; max-width: none; }
  .menu { max-width: calc(100vw - 16px); }
  .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .action-tile { padding: 12px 4px 10px; font-size: 11.5px; }
  .action-tile .a-ic { width: 44px; height: 44px; border-radius: 14px; }

  /* giriş */
  .login-form-wrap { padding: 20px 16px; align-items: flex-start; overflow-y: auto; }
  .login-card { padding-top: 4vh; }
  .user-pick { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

  /* masalar */
  .zone-bar { padding: 10px 12px; }
  .tables-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }
  .tcard { height: 116px; padding: 11px 12px; }
  .tcard .tamt { font-size: 16px; }
  .kds { grid-template-columns: minmax(0, 1fr); }
  .cal { grid-template-columns: 48px 1fr; }
  .pf-foot { padding: 10px 12px !important; gap: 6px; }
  .pf-foot .grow { display: none; }
  .pf-foot .btn { padding: 0 10px; }
  .pf-foot .btn.lg { flex: 1; height: 44px; }
  .layout-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .card-head > .row { flex-wrap: wrap; }
}

/* sipariş ekranı: telefonda kategoriler üstte şerit, sepet alttan açılır */
@media (max-width: 760px) {
  .order { display: flex; flex-direction: column; position: relative; }
  .order-cats { flex: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 8px; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .order-cats::-webkit-scrollbar { display: none; }
  .cat-tile { flex: none; width: 74px; padding: 6px 2px; font-size: 11px; }
  .cat-tile .cimg { width: 42px; height: 42px; border-radius: 12px; font-size: 19px; }
  .cat-tile .cimg .ic { width: 20px; height: 20px; }
  .order-main { flex: 1; }
  .order-search { padding: 8px 10px; gap: 6px; }
  .prod-grid { padding: 10px 10px 86px; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .prod-grid.compact { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .pcard .pimg { height: 72px; font-size: 30px; }
  .pcard .pbody { padding: 7px 8px 9px; }
  .pcard .pname { font-size: 12.5px; }
  .pcard .pprice { font-size: 13px; }

  .order-side { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; height: 88%; border-left: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -18px 40px -16px rgba(22, 26, 46, .35); transform: translateY(calc(100% - 68px)); transition: transform var(--t-slow) var(--ease); }
  .order.sheet-open .order-side { transform: none; }
  .os-scrim { display: block; position: absolute; inset: 0; z-index: 39; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); }
  .order.sheet-open .os-scrim { opacity: 1; pointer-events: auto; }
  .os-peek { display: flex; align-items: center; gap: 10px; flex: none; height: 68px; padding: 0 16px; border: 0; background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; position: relative; }
  .os-peek::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
  .os-peek-n { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 800; animation: pop-in .3s var(--spring) both; }
  .os-peek b { font-size: 16px; }
  .os-peek-chev { transform: rotate(180deg); transition: transform var(--t) var(--ease); }
  .order.sheet-open .os-peek-chev { transform: none; }
  .os-head { padding: 4px 14px 10px; }
  .os-actions { padding: 10px; gap: 6px; }
}

@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
