:root {
  --bg: #f4f5f9;
  --card: #ffffff;
  --primary: #3a6ff7;
  --primary-dark: #2f57c7;
  --text: #1d1d1f;
  --muted: #6b7280;
  --success: #16a34a;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  background: linear-gradient(120deg, #1f2937, #3b82f6);
  color: #fff;
  padding: 60px 20px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  border: none;
  background: #e5e7eb;
  color: #000;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  margin-top:10px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid #d1d5db;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.form-grid input,
.form-grid textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.switch input {
  display: none;
}

.switch .slider {
  position: relative;
  width: 46px;
  height: 24px;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.switch .slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2);
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::after {
  transform: translateX(22px);
}

.switch-label {
  color: var(--text);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert.success {
  background: #dcfce7;
  color: var(--success);
}

.alert.error {
  background: #fee2e2;
  color: var(--danger);
}

.sortable {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 8px;
}

.sortable li {
  background: #f9fafb;
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.drag-handle {
  cursor: grab;
  font-size: 18px;
  color: var(--muted);
}

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

.tab-button {
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.tab-button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.category-list,
.dish-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-item,
.dish-item {
  background: #f9fafb;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}

.dish-item {
  background: #fff;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.item-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: var(--success);
}

.badge-muted {
  background: #e5e7eb;
  color: var(--muted);
}

.icon-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.toggle-category .toggle-icon {
  display: inline-block;
  width: 12px;
  text-align: center;
}

.dish-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width:100%;
}

.section-title h4 {
  margin: 0;
}

.is-collapsed {
  display: none;
}

.modal {
  border: none;
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
  width: calc(100% - 40px);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dish-form {
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.actions {
  display: flex;
  gap: 10px;
}

.menu-section {
  margin-bottom: 40px;
}

.section-header h2 {
  margin-bottom: 6px;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-card {
  background: var(--card);
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.menu-card .price {
  text-align: right;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-card .price .note {
  color: var(--muted);
  font-size: 12px;
}

.menu-total {
  margin-top: 32px;
  text-align: right;
  font-weight: 700;
}

.menu-total span {
  display: inline-block;
  background: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  letter-spacing: 0.3px;
}

.footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.auth-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-card {
  background: var(--card);
  padding: 32px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.empty-state {
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}
