/* ═══════════════════════════════════════════════════════════════
   ATEŞ KEBAP & IZGARA — Restoran Yönetim Sistemi
   Ana Stil Dosyası
═══════════════════════════════════════════════════════════════ */

/* ─── CSS Değişkenleri ─── */
:root {
  --bg: #faf9f7;
  --bg2: #ffffff;
  --bg3: #f5f4f2;
  --bg4: #edecea;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.15);
  --text: #1a1a1a;
  --text2: #6b6b6b;
  --text3: #9a9a9a;

  --amber: #d97706;
  --red: #dc2626;
  --green: #16a34a;
  --blue: #2563eb;
  --purple: #7c3aed;

  --r: 10px;
  --r2: 14px;
  --r3: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --t: .18s cubic-bezier(.4,0,.2,1);
}

/* ─── Koyu Tema ─── */
[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #252525;
  --bg4: #333333;
  --border: rgba(255,255,255,0.1);
  --border2: rgba(255,255,255,0.2);
  --text: #f5f5f5;
  --text2: #a3a3a3;
  --text3: #737373;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text3);
}

/* ─── Utility Classes ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 22px; }
.text-2xl { font-size: 28px; }
.text-muted { color: var(--text2); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--t);
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: #fff;
}
.btn-primary:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg3);
  border: 1px solid var(--border2);
}
.btn-secondary:hover {
  background: var(--bg4);
  border-color: var(--text3);
}

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-purple {
  background: var(--purple);
  color: #fff;
}
.btn-purple:hover {
  background: #7c3aed;
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover {
  background: #2563eb;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 16px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Cards ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
}

.card-hover:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.badge-gray { background: var(--bg4); color: var(--text2); }

/* ─── Toast Notifications ─── */
#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: slideIn 0.2s ease-out;
  pointer-events: auto;
}

.toast-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
}

.toast-success .toast-icon { background: var(--green); color: #fff; }
.toast-error .toast-icon { background: var(--red); color: #fff; }
.toast-info .toast-icon { background: var(--blue); color: #fff; }
.toast-warn .toast-icon { background: var(--amber); color: #fff; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── Modal ─── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: -1;
}

.modal-content,
.modal > .modal-content {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.15s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text2);
  transition: all var(--t);
}

.modal-close:hover {
  background: var(--bg4);
  color: var(--text);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Login Page ─── */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  color: var(--text2);
  font-size: 14px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.role-card {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}

.role-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.role-card.active {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
}

.role-card[data-role="garson"] { --accent-color: var(--purple); }
.role-card[data-role="mutfak"] { --accent-color: var(--red); }
.role-card[data-role="kasa"] { --accent-color: var(--green); }
.role-card[data-role="admin"] { --accent-color: var(--blue); }

.role-card.active[data-role="garson"] { border-color: var(--purple); }
.role-card.active[data-role="mutfak"] { border-color: var(--red); }
.role-card.active[data-role="kasa"] { border-color: var(--green); }
.role-card.active[data-role="admin"] { border-color: var(--blue); }

.role-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.role-name {
  font-weight: 600;
  font-size: 15px;
}

.login-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.login-form.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 14px;
  display: none;
}

.login-error.show {
  display: block;
}

.login-footer {
  margin-top: 32px;
  text-align: center;
}

.login-footer a {
  color: var(--amber);
  font-weight: 500;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* ─── Sidebar Layout ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.sidebar-logo-icon {
  font-size: 24px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  color: var(--text2);
  transition: all var(--t);
  margin-bottom: 4px;
}

.nav-item:hover {
  background: var(--bg3);
  color: var(--text);
}

.nav-item.active {
  background: var(--bg4);
  color: var(--text);
}

.nav-icon {
  font-size: 18px;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--bg4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: var(--text2);
}

.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 24px;
}

/* ─── Mobile Sidebar ─── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 99;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding-top: 76px;
  }
}

/* ─── Customer Menu Page ─── */
.menu-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

.menu-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 16px 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}

.menu-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-brand-icon {
  font-size: 28px;
}

.menu-brand-name {
  font-weight: 700;
  font-size: 18px;
}

.cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-chip {
  background: var(--bg3);
  border: 1px solid var(--border2);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

.call-waiter-btn {
  background: var(--amber);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t);
}

.category-pill:hover {
  border-color: var(--border2);
}

.category-pill.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.menu-section {
  margin-top: 24px;
}

.menu-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--t);
}

.menu-item:hover {
  border-color: var(--border2);
}

.menu-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.menu-item-name {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-item-badges {
  display: flex;
  gap: 6px;
}

.popular-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
}

.soldout-badge {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
}

.menu-item-desc {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 12px;
}

.menu-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-item-price {
  font-weight: 700;
  font-size: 18px;
  color: var(--amber);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--t);
}

.qty-btn:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.qty-btn.minus:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.qty-value {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

/* ─── Cart Drawer ─── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-title {
  font-weight: 700;
  font-size: 18px;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text2);
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--text2);
  font-size: 13px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-remove {
  color: var(--red);
  font-size: 18px;
  padding: 4px;
}

.cart-note {
  margin-top: 16px;
}

.cart-note textarea {
  width: 100%;
  min-height: 80px;
  resize: none;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
}

.cart-total-price {
  color: var(--amber);
}

/* ─── Order Success Animation ─── */
.order-success {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 20px;
  animation: bounceIn 0.5s ease-out;
}

.success-text {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.success-subtext {
  color: var(--text2);
  font-size: 14px;
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ─── Table Grid (Garson/Kasa) ─── */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.table-card {
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--r2);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}

.table-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.table-card.status-bos {
  border-color: var(--border);
}

.table-card.status-dolu {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.05);
}

.table-card.status-hesap_bekliyor {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.05);
}

.table-no {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.table-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
}

.table-status.bos { background: var(--bg4); color: var(--text2); }
.table-status.dolu { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.table-status.hesap_bekliyor { background: rgba(34, 197, 94, 0.15); color: var(--green); }

.table-info {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text2);
}

.table-total {
  font-weight: 600;
  color: var(--amber);
}

/* ─── Kitchen Kanban ─── */
.kitchen-layout {
  min-height: 100vh;
}

.kitchen-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.kitchen-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.kitchen-stats {
  display: flex;
  gap: 20px;
}

.kitchen-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text2);
}

.kitchen-stat-value {
  font-weight: 700;
  color: var(--text);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.connection-dot.offline {
  background: var(--red);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px;
  min-height: calc(100vh - 70px);
}

.kanban-column {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
}

.kanban-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-count {
  background: var(--bg4);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

.kanban-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.order-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
  animation: slideIn 0.2s ease-out;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.order-table {
  font-size: 22px;
  font-weight: 700;
}

.order-meta {
  text-align: right;
}

.order-waiter {
  font-size: 13px;
  color: var(--text2);
}

.order-time {
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
}

.order-items {
  margin-bottom: 12px;
}

.order-item-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}

.order-item-qty {
  color: var(--amber);
  font-weight: 600;
  min-width: 24px;
}

.order-note {
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--amber);
  padding: 10px 12px;
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 13px;
  margin-bottom: 12px;
}

.order-actions {
  display: flex;
  gap: 8px;
}

/* ─── Cashier Layout ─── */
.cashier-layout {
  display: flex;
  min-height: 100vh;
}

.cashier-sidebar {
  width: 320px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.cashier-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cashier-title {
  font-weight: 700;
  font-size: 18px;
}

.cashier-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.cashier-table-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--t);
}

.cashier-table-item:hover {
  border-color: var(--border2);
}

.cashier-table-item.active {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.05);
}

.cashier-table-item.waiting {
  border-left: 3px solid var(--green);
}

.cashier-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cashier-table-no {
  font-weight: 700;
}

.cashier-table-total {
  font-weight: 700;
  color: var(--green);
}

.cashier-table-info {
  font-size: 13px;
  color: var(--text2);
}

.cashier-main {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.cashier-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}

.cashier-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

/* ─── Payment Section ─── */
.payment-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  margin-bottom: 20px;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.payment-title {
  font-size: 18px;
  font-weight: 700;
}

.order-list {
  margin-bottom: 16px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row-name {
  flex: 1;
}

.order-row-qty {
  width: 50px;
  text-align: center;
  color: var(--text2);
}

.order-row-price {
  width: 80px;
  text-align: right;
  font-weight: 500;
}

.payment-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 20px;
  font-weight: 700;
}

.payment-total-value {
  color: var(--green);
}

.payment-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.payment-tab {
  flex: 1;
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  font-weight: 500;
  transition: all var(--t);
}

.payment-tab:hover {
  border-color: var(--border2);
}

.payment-tab.active {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.payment-content {
  display: none;
}

.payment-content.active {
  display: block;
}

.method-options {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.method-option {
  flex: 1;
  padding: 14px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}

.method-option:hover {
  border-color: var(--border2);
}

.method-option.active {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.method-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.method-name {
  font-weight: 500;
  font-size: 14px;
}

/* ─── Admin Dashboard ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
}

.stat-label {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-change {
  font-size: 13px;
  margin-top: 6px;
}

.stat-change.positive { color: var(--green); }
.stat-change.negative { color: var(--red); }

/* ─── Tables ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  font-size: 13px;
  color: var(--text2);
  background: var(--bg3);
}

.data-table tr:hover td {
  background: var(--bg3);
}

.data-table tbody tr {
  cursor: pointer;
  transition: background var(--t);
}

/* ─── Charts ─── */
.chart-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
}

.chart-title {
  font-weight: 600;
  margin-bottom: 20px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 200px;
  padding-top: 20px;
}

.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bar-fill {
  width: 100%;
  max-width: 40px;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  position: relative;
}

.bar-fill:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg4);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.bar-label {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
}

/* ─── Form Groups ─── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > * {
  flex: 1;
}

/* ─── Checkbox & Toggle ─── */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-wrapper input {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg4);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--t);
}

.toggle.active {
  background: var(--green);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--t);
}

.toggle.active::after {
  transform: translateX(20px);
}

/* ─── Pulse Animation ─── */
.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
}

/* ─── Accent Bar ─── */
.accent-bar {
  height: 3px;
  background: var(--amber);
}

.accent-bar.purple { background: var(--purple); }
.accent-bar.red { background: var(--red); }
.accent-bar.green { background: var(--green); }
.accent-bar.blue { background: var(--blue); }

/* ─── Call Modal Types ─── */
.call-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.call-type-btn {
  padding: 20px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
}

.call-type-btn:hover {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.05);
}

.call-type-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.call-type-label {
  font-weight: 500;
  font-size: 14px;
}

/* ─── Split Payment ─── */
.split-input {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.split-input label {
  font-size: 14px;
}

.split-input input {
  width: 80px;
  text-align: center;
}

.split-result {
  background: var(--bg3);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.split-per-person {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.split-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--text2);
  font-size: 14px;
  margin-top: 8px;
}

/* ─── Low Stock Warning ─── */
.low-stock-badge {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .kanban {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .kanban-column {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cashier-layout {
    flex-direction: column;
  }

  .cashier-sidebar {
    width: 100%;
    height: auto;
    max-height: 300px;
  }

  .payment-tabs {
    flex-wrap: wrap;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .role-grid {
    grid-template-columns: 1fr;
  }

  .table-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .call-type-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Print Styles ─── */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .sidebar,
  .mobile-header,
  .btn,
  .no-print {
    display: none !important;
  }

  .main-content {
    margin-left: 0;
    padding: 0;
  }
}
