@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1c2a4a;
  --accent: #e94560;
  --accent-hover: #ff6b81;
  --accent-glow: rgba(233, 69, 96, 0.3);
  --success: #00d2a0;
  --success-glow: rgba(0, 210, 160, 0.3);
  --warning: #ffc107;
  --info: #4fa3f7;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(233, 69, 96, 0.3);
  --glass: rgba(22, 33, 62, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 4px 20px rgba(233, 69, 96, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(79, 163, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 210, 160, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ====== NAVBAR ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 2rem;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.3rem;
}

.navbar-brand .logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.navbar-brand span {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: 8px;
}

.navbar-links a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.navbar-links a:hover, .navbar-links a.active {
  color: var(--text-primary);
  background: rgba(233, 69, 96, 0.1);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

/* ====== LAYOUT ====== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* ====== CARDS ====== */
.card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow), var(--shadow-accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-header .icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(233, 69, 96, 0.12);
  border-radius: var(--radius-sm);
}

.card-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.card-header h2 small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c0392b);
  color: white;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(233, 69, 96, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #00b894);
  color: white;
  box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--success-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(233, 69, 96, 0.1);
  border-color: var(--accent);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

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

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ====== FORM ELEMENTS ====== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.06);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a0b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ====== UPLOAD ZONE ====== */
.upload-zone {
  border: 2px dashed rgba(233, 69, 96, 0.3);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: rgba(233, 69, 96, 0.03);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(233, 69, 96, 0.08);
  transform: scale(1.01);
}

.upload-zone .upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-zone h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  object-fit: contain;
}

/* ====== MENU ITEMS LIST ====== */
.menu-items-list {
  list-style: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  margin-bottom: 8px;
  transition: var(--transition);
  animation: slideIn 0.3s ease forwards;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

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

.menu-item .item-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(233, 69, 96, 0.12);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.menu-item .item-name {
  flex: 1;
  font-weight: 500;
}

.menu-item .item-price {
  color: var(--success);
  font-weight: 600;
  font-size: 0.95rem;
}

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

.menu-item .item-actions button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.menu-item .item-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.menu-item .item-actions button.delete:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* ====== ORDER CARD (for ordering page) ====== */
.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: var(--transition);
  cursor: pointer;
}

.order-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(233, 69, 96, 0.2);
}

.order-item.selected {
  background: rgba(233, 69, 96, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.order-item .checkbox-custom {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 14px;
}

.order-item.selected .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

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

.order-item .item-info .name {
  font-weight: 600;
  font-size: 1rem;
}

.order-item .item-info .category {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.order-item .qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: var(--transition);
}

.order-item.selected .qty-controls {
  opacity: 1;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-controls button:hover {
  background: rgba(233, 69, 96, 0.15);
  border-color: var(--accent);
}

.qty-controls .qty-value {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

/* ====== STATUS BADGES ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft {
  background: rgba(255, 193, 7, 0.12);
  color: var(--warning);
}

.badge-active {
  background: rgba(0, 210, 160, 0.12);
  color: var(--success);
}

.badge-closed {
  background: rgba(160, 160, 184, 0.12);
  color: var(--text-muted);
}

/* ====== MENU CARD (list view) ====== */
.menu-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
}

.menu-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.menu-card .menu-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.menu-card .menu-info {
  flex: 1;
}

.menu-card .menu-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.menu-card .menu-info .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.menu-card .menu-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.menu-card .stat {
  text-align: center;
}

.menu-card .stat .stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}

.menu-card .stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ====== LOADING ====== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

/* ====== TOAST NOTIFICATIONS ====== */
.toast-container {
  position: fixed;
  top: 85px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 320px;
  max-width: 420px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.4s ease forwards;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

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

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

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
}

.toast-body .toast-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.toast-body .toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid #e74c3c; }
.toast-info { border-left: 4px solid var(--info); }
.toast-warning { border-left: 4px solid var(--warning); }

/* ====== CATEGORY SECTION ====== */
.category-section {
  margin-bottom: 1.5rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.category-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.category-header .count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 12px;
}

/* ====== ORDERS TABLE ====== */
.orders-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.orders-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.orders-table td {
  padding: 12px 14px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.orders-table tbody tr {
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.orders-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

.orders-table tbody tr td:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.orders-table tbody tr td:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ====== GRID ====== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ====== STATS ROW ====== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.stat-card .stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-card .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ====== SUCCESS SCREEN ====== */
.success-screen {
  text-align: center;
  padding: 4rem 2rem;
}

.success-screen .check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #00b894);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px var(--success-glow);
  animation: successPulse 2s ease infinite;
}

@keyframes successPulse {
  0%, 100% { box-shadow: 0 0 20px var(--success-glow); }
  50% { box-shadow: 0 0 50px var(--success-glow); }
}

.success-screen h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.success-screen p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ====== RAW TEXT AREA ====== */
.raw-text-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  margin-top: 0.5rem;
}

/* ====== CONFIDENCE BAR ====== */
.confidence-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.5rem;
}

.confidence-bar .bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.confidence-bar .bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.confidence-bar .bar-fill.high { background: var(--success); }
.confidence-bar .bar-fill.medium { background: var(--warning); }
.confidence-bar .bar-fill.low { background: #e74c3c; }

.confidence-bar .percent {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .page-header h1 {
    font-size: 1.8rem;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .navbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .navbar-links {
    width: 100%;
    justify-content: center;
  }

  .menu-card {
    flex-direction: column;
    text-align: center;
  }

  .menu-card .menu-stats {
    justify-content: center;
  }

  .card {
    padding: 1.5rem;
  }

  .upload-zone {
    padding: 2rem 1rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ====== ADD ITEM INLINE ====== */
.add-item-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.add-item-row input,
.add-item-row select {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.add-item-row input:focus,
.add-item-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.add-item-row button {
  flex-shrink: 0;
}

/* ====== SECTION DIVIDER ====== */
.section-divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* ====== INLINE EDIT ====== */
.inline-edit {
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--text-muted);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: inherit;
  font-weight: inherit;
  padding: 2px 4px;
  width: 100%;
}

.inline-edit:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* Image in card */
.menu-image-container {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.menu-image-container img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,0.2);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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