:root{
  --brand:#16a34a;
  --brand-dark:#15803d;
}

body{ background:#f4f5f7; }

/* ---- Sidebar ---- */
.sidebar{
  width:250px;
  min-height:100vh;
  background:#111827;
  color:#fff;
  flex-shrink:0;
}
.sidebar .brand{
  padding:20px;
  font-weight:700;
  font-size:17px;
  border-bottom:1px solid #1f2937;
  display:flex;
  align-items:center;
  gap:8px;
}
.sidebar nav{ padding:10px 0; }
.sidebar .nav-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 20px;
  color:#d1d5db;
  font-size:14px;
  border-radius:0;
}
.sidebar .nav-link i{ font-size:16px; width:18px; text-align:center; }
.sidebar .nav-link:hover{ background:#1f2937; color:#fff; }
.sidebar .nav-link.active{ background:#1f2937; color:#fff; border-right:3px solid var(--brand); }
.sidebar .logout{ padding:16px 20px; border-top:1px solid #1f2937; }
.sidebar .logout a{ color:#f87171; font-size:14px; text-decoration:none; }
.sidebar .logout a:hover{ color:#fca5a5; }
.subscription-box{ margin:8px 14px 0; padding:12px 14px; background:#1f2937; border-radius:10px; color:#e5e7eb; }

.main{ min-width:0; width:100%; }
.topbar{ background:#fff; padding:14px 24px; border-bottom:1px solid #e5e7eb; }
.content{ padding:24px; }

.mobile-toggle-btn{
  display:none;
  background:none; border:none; color:#111827; font-size:22px;
  padding:4px 8px; margin-right:4px; cursor:pointer; line-height:1;
}

.sidebar-backdrop{
  display:none;
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1040;
}
.sidebar-backdrop.show{ display:block; }

/* ---- Buttons / brand color ---- */
.btn-brand{ background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-brand:hover{ background:var(--brand-dark); border-color:var(--brand-dark); color:#fff; }
.text-brand{ color:var(--brand) !important; }
.bg-brand{ background:var(--brand) !important; }

/* ---- Stat cards ---- */
.stat-card{ border-radius:14px; }
.stat-card .num{ font-size:26px; font-weight:700; }
.stat-card .label{ color:#6b7280; font-size:13px; }
.stat-icon{
  width:46px; height:46px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; color:#fff;
}

/* ---- Login pages ---- */
.login-page{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#111827,#16a34a);
}
.login-box{ width:380px; }
.login-box .logo-icon{ font-size:36px; text-align:center; display:block; margin-bottom:8px; }

/* ---- Misc ---- */
.empty-state{ text-align:center; padding:50px 20px; color:#9ca3af; }
.empty-state i{ font-size:40px; display:block; margin-bottom:10px; }

.qr-box img, .qr-box-img{ border:1px solid #e5e7eb; border-radius:12px; padding:10px; background:#fff; }

.table-qr-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px; }
.table-qr-card{ background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:14px; text-align:center; }
.table-qr-card img{ width:100%; height:auto; border-radius:8px; }

@media print {
  .no-print, .sidebar, .topbar{ display:none !important; }
  .main, .content{ padding:0 !important; margin:0 !important; }
  .table-qr-grid{ grid-template-columns:repeat(3,1fr); }
  .table-qr-card{ break-inside:avoid; border:1px solid #ccc; }
}

@media (max-width:900px){
  .mobile-toggle-btn{ display:inline-flex; align-items:center; }

  .sidebar{
    position:fixed;
    top:0; left:0; bottom:0;
    width:270px;
    min-height:100vh;
    z-index:1050;
    transform:translateX(-100%);
    transition:transform .25s ease;
    overflow-y:auto;
  }
  .sidebar.show{ transform:translateX(0); box-shadow:4px 0 20px rgba(0,0,0,.25); }
  .sidebar nav{ display:block; padding:10px 0; }
  .sidebar .nav-link{ white-space:normal; }
  .sidebar .nav-link.active{ border-right:3px solid var(--brand); border-bottom:none; }
  .sidebar .brand, .sidebar .logout, .subscription-box{ display:flex; }
  .subscription-box{ display:block; }

  .content{ padding:16px; }
}

/* ---- Report bar chart (pure CSS) ---- */
.bar-chart{ display:flex; align-items:flex-end; gap:6px; height:200px; padding-top:10px; }
.bar-chart .bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; }
.bar-chart .bar{ width:100%; max-width:34px; background:var(--brand); border-radius:6px 6px 0 0; transition:height .3s ease; }
.bar-chart .bar-label{ font-size:10.5px; color:#6b7280; margin-top:6px; white-space:nowrap; transform:rotate(0deg); }
.bar-chart .bar-value{ font-size:10px; color:#374151; font-weight:700; margin-bottom:3px; }



.cwt-foter-link {color: #9ca3af!important;text-decoration: none!important;font-weight: bold!important;}


/* ---- modern.css ---- */
/* =========================================================
   modern.css — style.css'den SONRA yüklenir.
   Yalnızca görünümü (renk, yuvarlaklık, gölge, tipografi) iyileştirir;
   width / position / display gibi yerleşim özelliklerine dokunmaz.
   Kaldırmak için header.php'deki <link> satırını silmeniz yeterli.
   ========================================================= */

:root {
  --m-bg: #f4f6fa;
  --m-surface: #ffffff;
  --m-border: #e8edf4;
  --m-text: #0f172a;
  --m-muted: #64748b;
  --m-soft: #94a3b8;
  --m-radius: 16px;
  --m-radius-sm: 10px;
  --m-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
  --m-shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 14px 32px rgba(15, 23, 42, .09);
}

/* ---------- Genel ---------- */
body {
  background: var(--m-bg);
  color: var(--m-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.main { background: var(--m-bg); }

/* ---------- Kartlar ---------- */
.card {
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: var(--m-surface);
}
.card.shadow-sm { box-shadow: var(--m-shadow) !important; }
.card.border-0 { border: 1px solid var(--m-border) !important; }

/* ---------- Tablolar ---------- */
.table { --bs-table-bg: transparent; }
.table > thead > tr > th {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--m-soft);
  background: transparent;
  border-bottom: 1px solid var(--m-border);
  padding: .7rem 1rem;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: .85rem 1rem;
  border-color: #f1f5f9;
  vertical-align: middle;
}
.table > tbody > tr:hover > td { --bs-table-bg: #fafbfd; }

/* ---------- Rozetler (tüm sayfalarda tutarlı yumuşak renkler) ---------- */
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 999px; padding: .4em .75em; }
.badge.text-bg-warning   { background-color: #fef3c7 !important; color: #b45309 !important; }
.badge.text-bg-primary   { background-color: #dbeafe !important; color: #1d4ed8 !important; }
.badge.text-bg-success   { background-color: #dcfce7 !important; color: #15803d !important; }
.badge.text-bg-danger    { background-color: #fee2e2 !important; color: #b91c1c !important; }
.badge.text-bg-info      { background-color: #cffafe !important; color: #0e7490 !important; }
.badge.text-bg-secondary { background-color: #e2e8f0 !important; color: #475569 !important; }
.badge.text-bg-dark      { background-color: #1e293b !important; color: #ffffff !important; }

/* ---------- Butonlar ---------- */
.btn { border-radius: var(--m-radius-sm); font-weight: 600; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn-sm { border-radius: 8px; }
.btn:active { transform: translateY(1px); }
.btn-outline-secondary {
  --bs-btn-color: #475569;
  --bs-btn-border-color: #d8e0ea;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-hover-bg: #f1f5f9;
  --bs-btn-hover-border-color: #cbd5e1;
  --bs-btn-active-color: #0f172a;
  --bs-btn-active-bg: #e8edf4;
  --bs-btn-active-border-color: #cbd5e1;
}

/* ---------- Formlar ---------- */
.form-control, .form-select { border-radius: var(--m-radius-sm); border-color: #dbe3ee; }
.form-control:focus, .form-select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 .22rem rgba(100, 116, 139, .15);
}

/* ---------- Uyarılar, menüler, modallar ---------- */
.alert { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04); }
.dropdown-menu {
  border: 1px solid var(--m-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
  padding: .4rem;
}
.dropdown-item { border-radius: 8px; }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }

/* ---------- Üst çubuk ---------- */
.topbar { border-bottom: 1px solid var(--m-border); box-shadow: none; }
.topbar h1 { font-weight: 700; letter-spacing: -.01em; }

/* ---------- Yan menü ---------- */
.sidebar .brand { font-weight: 700; letter-spacing: -.01em; }
.sidebar nav.nav { padding-left: 10px; padding-right: 10px; }
.sidebar .nav-link { border-radius: 10px; transition: background-color .15s, color .15s; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .07); }
.sidebar .nav-link i { opacity: .9; }
.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
  padding: 16px 10px 6px;
}
.nav-section-label:first-of-type { padding-top: 10px; }
.subscription-box { border-radius: 14px; }

/* ---------- İstatistik kartları ---------- */
.card.stat-card { transition: transform .15s, box-shadow .15s; }
.card.stat-card:hover { transform: translateY(-2px); box-shadow: var(--m-shadow-hover) !important; }
.stat-card .num { font-weight: 800; letter-spacing: -.02em; }
.stat-card .label { color: var(--m-muted); font-size: .82rem; }
.stat-icon { border-radius: 14px; box-shadow: 0 8px 16px -6px rgba(15, 23, 42, .35); }

/* ---------- Panel (index) ---------- */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius);
  background: linear-gradient(135deg, rgba(34, 211, 238, .10), rgba(168, 85, 247, .10));
}
.dash-hero h2 { font-size: 1.25rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.dash-hero p { margin: .15rem 0 0; color: var(--m-muted); font-size: .9rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-actions .btn { --bs-btn-bg: #fff; }

.dash-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--m-border);
}
.dash-section-title { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .98rem; font-weight: 700; }

.dash-promo-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  color: #d97706;
  font-size: 1.5rem;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .25);
}
.dash-promo-icon.is-muted { color: var(--m-soft); }

/* ---------- Sipariş durum hapı ve tip ikonu (ortak) ---------- */
.st-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.st-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.st-pending   { background: #fef3c7; color: #b45309; }
.st-preparing { background: #dbeafe; color: #1d4ed8; }
.st-completed { background: #dcfce7; color: #15803d; }
.st-cancelled { background: #fee2e2; color: #b91c1c; }

.ord-no { font-weight: 700; color: var(--m-text); text-decoration: none; }
.ord-no:hover { text-decoration: underline; }
.ord-ico {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
}
.ord-ico.is-takeaway { background: #cffafe; color: #0e7490; }
