*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f9fafb; --white: #ffffff; --border: #e5e7eb;
  --text: #111827; --text-muted: #6b7280; --text-light: #9ca3af;
  --primary: #111827; --primary-hover: #1f2937;
  --green: #16a34a; --green-bg: #dcfce7; --green-text: #15803d;
  --red: #dc2626; --red-bg: #fee2e2; --red-text: #b91c1c;
  --blue: #2563eb; --blue-bg: #dbeafe;
  --amber: #d97706; --amber-bg: #fef3c7;
  --radius: 10px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.06);
}
.product-img{
    width:40px;
    height:40px;
    object-fit:cover;
    border-radius:6px;
}

.table-img{
    width:40px;
    height:40px;
    object-fit:cover;
    border-radius:6px;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }

/* LAYOUT */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: var(--white); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; }
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-brand h1 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.sidebar-brand span { font-size: 11px; color: var(--text-muted); }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 500; cursor: pointer; transition: all .15s; margin-bottom: 2px; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.main-content { margin-left: 230px; flex: 1; padding: 32px; min-height: 100vh; }
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.page-header p { color: var(--text-muted); margin-top: 3px; font-size: 13px; }

/* CARDS */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 7px; border-radius: 7px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green-text); }
.badge-red { background: var(--red-bg); color: var(--red-text); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; color: var(--text); }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: var(--white); transition: border .15s; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17,24,39,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }

/* MASA GRID */
.masa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.masa-kart { background: var(--white); border: 2px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: all .18s; position: relative; }
.masa-kart:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.masa-kart.bos { border-color: var(--border); }
.masa-kart.bos:hover { border-color: #a7f3d0; }
.masa-kart.dolu { border-color: #fca5a5; background: #fff5f5; }
.masa-kart.dolu:hover { border-color: var(--red); }
.masa-kart h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.masa-kart .durum { font-size: 11px; font-weight: 600; }
.masa-kart.bos .durum { color: var(--green); }
.masa-kart.dolu .durum { color: var(--red); }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.5px; }
.stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* SIPARIS LAYOUT */
.siparis-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; height: calc(100vh - 64px); }
.urun-panel { overflow-y: auto; }
.adisyon-panel { display: flex; flex-direction: column; }
.kategori-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.kategori-tab { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; transition: all .15s; background: var(--white); border-color: var(--border); color: var(--text-muted); }
.kategori-tab:hover, .kategori-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.urun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.urun-btn { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; text-align: center; cursor: pointer; transition: all .15s; }
.urun-btn:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.urun-btn .urun-ad { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.urun-btn .urun-fiyat { font-size: 12px; color: var(--text-muted); }

.adisyon-items { flex: 1; overflow-y: auto; padding: 0 4px; }
.adisyon-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.adisyon-item .item-ad { flex: 1; font-size: 13px; font-weight: 500; }
.adisyon-item .item-fiyat { font-size: 12px; color: var(--text-muted); }
.adet-ctrl { display: flex; align-items: center; gap: 4px; }
.adet-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; transition: all .12s; }
.adet-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.adet-val { width: 28px; text-align: center; font-size: 13px; font-weight: 600; }

.adisyon-footer { padding: 16px 0 0; border-top: 2px solid var(--border); }
.toplam-satir { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.toplam-satir.toplam-buyuk { font-size: 18px; font-weight: 700; margin-top: 4px; }
.odeme-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: 14px; padding: 28px; width: 460px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.15); animation: modalIn .18s ease; }
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ODEME TABS */
.odeme-tabs { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.odeme-tab { flex: 1; padding: 9px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 500; background: var(--white); transition: all .12s; }
.odeme-tab.active { background: var(--primary); color: #fff; }
.odeme-tab:not(:last-child) { border-right: 1px solid var(--border); }

/* FIS */
@media print {
  body * { visibility: hidden; }
  #fis, #fis * { visibility: visible; }
  #fis { position: fixed; left: 0; top: 0; width: 80mm; }
  .no-print { display: none !important; }
}
#fis { font-family: 'Courier New', monospace; font-size: 12px; width: 80mm; padding: 10px; display: none; }
#fis.show { display: block; }
.fis-header { text-align: center; margin-bottom: 12px; border-bottom: 1px dashed #333; padding-bottom: 10px; }
.fis-header h2 { font-size: 14px; font-weight: bold; }
.fis-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 11px; }
.fis-divider { border: none; border-top: 1px dashed #333; margin: 6px 0; }
.fis-total { font-weight: bold; font-size: 13px; }
.fis-footer { text-align: center; margin-top: 12px; font-size: 10px; }

/* ALERT */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-success { background: var(--green-bg); color: var(--green-text); border: 1px solid #a7f3d0; }
.alert-danger { background: var(--red-bg); color: var(--red-text); border: 1px solid #fca5a5; }

/* CHART */
.chart-bar { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid var(--border); padding: 0 4px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; }
.bar-fill { background: var(--primary); border-radius: 3px 3px 0 0; width: 100%; transition: height .3s; min-height: 2px; }
.bar-label { font-size: 9px; color: var(--text-muted); }

/* MISC */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); } .text-sm { font-size: 12px; } .font-bold { font-weight: 700; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; display: block; opacity: .3; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

.urun-thumb{width:64px;height:64px;object-fit:cover;border-radius:12px;background:#f3f4f6;display:block;margin:0 auto 10px;}
.urun-thumb-table{width:72px;height:72px;object-fit:cover;border-radius:12px;background:#f3f4f6;border:1px solid var(--border);}
.urun-grid{margin-top:18px;}
.urun-btn{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:160px;padding:12px;}
.product-img,.urun-thumb{max-width:100%;}
#fis{font-family:monospace;font-size:14px;color:#111;background:#fff;padding:16px;}
#fis .fis-header{text-align:center;margin-bottom:10px;}
#fis .fis-header h2{margin:0 0 6px;font-size:18px;}
#fis .fis-row{display:flex;justify-content:space-between;gap:12px;margin:6px 0;}
#fis .fis-total{font-weight:700;font-size:16px;}
#fis .fis-divider{border:0;border-top:1px dashed #999;margin:10px 0;}
#fis .fis-footer{text-align:center;margin-top:12px;font-size:13px;}
@media print {
  body * { visibility:hidden !important; }
  #fis, #fis * { visibility:visible !important; }
  #fis { position:absolute; left:0; top:0; width:80mm; max-width:80mm; padding:8px; margin:0; background:#fff; }
  .modal-overlay, .sidebar, .page-header, .no-print { display:none !important; }
  @page { size:80mm auto; margin:4mm; }
}
