:root {
  --bg-body: #f6f8fc;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --primary: #3b82f6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e6edf6;
  --radius: 14px;
  --sidebar-width: clamp(200px, 20vw, 320px);
  --content-max-width: 1520px;
  --content-gutter-x: clamp(18px, 2.2vw, 40px);
  --page-pad-x: clamp(18px, 3vw, 40px);
  --page-pad-y: clamp(18px, 2.6vw, 32px);
  --shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  --font-stack: "Manrope", "Segoe UI", sans-serif;
  --course-starter-bg: #dbeafe;
  --course-starter-text: #2563eb;
  --course-main-bg: #dcfce7;
  --course-main-text: #16a34a;
  --course-dessert-bg: #f3e8ff;
  --course-dessert-text: #9333ea;
  --course-starter-border: #bfdbfe;
  --course-main-border: #bbf7d0;
  --course-dessert-border: #e9d5ff;
  --course-starter-bar: #3b82f6;
  --course-main-bar: #22c55e;
  --course-dessert-bar: #a855f7;
  --course-starter-pill-bg: rgba(59, 130, 246, 0.24);
  --course-main-pill-bg: rgba(34, 197, 94, 0.24);
  --course-dessert-pill-bg: rgba(168, 85, 247, 0.24);
  --course-starter-pill-border: rgba(59, 130, 246, 0.3);
  --course-main-pill-border: rgba(34, 197, 94, 0.3);
  --course-dessert-pill-border: rgba(168, 85, 247, 0.3);
  --course-qty-right-inset: 6px;
  --metrics-gap: 18px;
  --bp-mobile-max: 767px;
  --bp-tablet-min: 768px;
  --bp-tablet-max: 1180px;
  --bp-desktop-min: 1181px;
}


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

body {
  font-family: var(--font-stack);
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100dvh;
}

body:not(.auth-ready) {
  overflow: hidden;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 16%, rgba(59, 130, 246, 0.14), transparent 42%),
    radial-gradient(circle at 84% 84%, rgba(34, 197, 94, 0.1), transparent 40%),
    linear-gradient(180deg, #eef3fb 0%, #f7f9fd 52%, #edf2fb 100%);
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce6f7;
  border-radius: 20px;
  padding: 30px 30px 26px;
  width: min(440px, 92vw);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2f6fed 0%, #3b82f6 45%, #22c55e 100%);
}

.login-card .brand {
  margin-bottom: 4px;
  padding-left: 0;
  gap: 10px;
}

.login-card .brand i {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #eaf1ff;
  color: #2f6fed;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.login-sub {
  font-size: 0.82rem;
  color: #475569;
  background: #f1f6ff;
  border: 1px solid #dbe8ff;
  border-radius: 999px;
  padding: 6px 10px;
  width: fit-content;
}

#login-form {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

#login-form .form-label {
  margin-bottom: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: #334155;
}

#login-form .form-input {
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cfdbf0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#login-form .form-input:hover {
  border-color: #b9cae8;
}

#login-form .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.login-forgot-link {
  justify-self: end;
  margin-top: 2px;
  font-size: 0.84rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.login-forgot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.notice {
  padding: 10px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-size: 0.85rem;
}

#login-btn {
  margin-top: 10px;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

#forgot-form,
#reset-form {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

#forgot-form .form-label,
#reset-form .form-label {
  margin-bottom: 2px;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: #334155;
}

#forgot-form .form-input,
#reset-form .form-input {
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cfdbf0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#forgot-form .form-input:hover,
#reset-form .form-input:hover {
  border-color: #b9cae8;
}

#forgot-form .form-input:focus,
#reset-form .form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.login-helper {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

.login-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-back-link {
  font-size: 0.84rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.login-back-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

@media (max-width: 520px) {
  .login-card {
    padding: 24px 20px 20px;
    border-radius: 16px;
  }

  .login-card .brand {
    font-size: 0.98rem;
  }
}

.undo-notice {
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.notice-close {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.notice-close:hover {
  background: rgba(0, 0, 0, 0.06);
}

#planner-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fef3c7;
  margin-bottom: 16px;
}

.dashboard {
  display: flex;
  min-height: 100dvh;
  min-width: 0;
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  height: 100dvh;
  position: fixed;
  z-index: 50;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
}

.sidebar .brand {
  align-items: flex-start;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  display: block;
  line-height: 1.15;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  color: #8e99ab;
}

.brand i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f0ff;
  color: #2f6fed;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d9e4f8;
  padding: 6px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.login-card .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  padding: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  position: relative;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  transition: height 0.2s ease;
}

.nav-item.active::before {
  height: 60%;
}

.nav-item:hover {
  background: #f3f6fd;
  color: var(--text-main);
}

.nav-item.active {
  background: #e8f0ff;
  color: #2f6fed;
  font-weight: 700;
}

.nav-item i {
  color: inherit;
}

.nav-item span {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.sidebar-group-label {
  margin: 12px 8px 6px;
  padding-top: 10px;
  border-top: 1px solid #e5ebf6;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logout {
  margin-top: auto;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid #dbe4f2;
  background: #f8fafd;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d5deea;
  background: #e8edf5;
  color: #5a6578;
  flex: 0 0 40px;
}

.sidebar-user-meta {
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8a94a8;
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-footer .logout {
  margin-top: 0;
  flex: 1;
}

.settings-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-btn i {
  display: block;
  line-height: 1;
}

.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  height: 100dvh;
  overflow-y: auto;
  padding: var(--page-pad-y) var(--content-gutter-x) 40px;
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  min-width: 0;
}

.main-wrapper > header,
.main-wrapper > .view-section {
  width: min(100%, var(--content-max-width));
  margin-inline: auto;
  min-width: 0;
}

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

h1 {
  font-size: clamp(1.5rem, 1.2vw + 1rem, 1.95rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

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

.avatar {
  width: 38px;
  height: 38px;
  background: #eef2f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
}

.view-section {
  display: none;
  animation: fadeUp 0.3s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

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

.card-header.collapsible-header {
  cursor: pointer;
}

.card-header.collapsible-header button,
.card-header.collapsible-header input,
.card-header.collapsible-header select {
  cursor: auto;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#cycle-create-modal .modal-content {
  max-width: 480px;
}

.collapse-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.collapse-toggle i {
  transition: transform 0.2s ease;
}

.card.is-collapsed > :not(.card-header) {
  display: none;
}

.card.is-collapsed .collapse-toggle i {
  transform: rotate(180deg);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.card-subtitle {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}



.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--metrics-gap);
  margin-bottom: 20px;
}

.dashboard-split {
  display: grid;
  grid-template-columns: calc((100% * 2 / 3) - (var(--metrics-gap) / 3))
    calc((100% / 3) - (var(--metrics-gap) * 2 / 3));
  gap: var(--metrics-gap);
}

.dashboard-combined-card {
  position: relative;
  padding-top: 16px;
}

.dashboard-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 16px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.64) 45%, rgba(255, 255, 255, 0.58) 100%),
    var(--forecast-gradient, linear-gradient(90deg, #3b82f6 0%, #22c55e 50%, #a855f7 100%));
  backdrop-filter: blur(1px);
  pointer-events: none;
}

.dashboard-loading-overlay.is-hidden {
  display: none;
}

.dashboard-loading-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background-image: linear-gradient(
    135deg,
    rgba(239, 246, 255, 0.95) 0%,
    rgba(236, 253, 245, 0.9) 52%,
    rgba(250, 245, 255, 0.95) 100%
  );
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.dashboard-loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--forecast-gradient, linear-gradient(90deg, #3b82f6 0%, #22c55e 50%, #a855f7 100%));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: dashboardLoadingSpin 0.9s linear infinite;
}

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

.dashboard-combined-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.dashboard-combined-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.dashboard-cycle-day-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef0f4;
  color: #5f6877;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-combined-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  justify-self: center;
}

.dashboard-date-nav {
  display: inline-grid;
  grid-template-columns: 42px minmax(160px, auto) 42px;
  align-items: center;
  gap: 12px;
}

.dashboard-date-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-date-stack {
  min-width: 160px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform: translateY(4px);
}

.dashboard-date-label {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.2;
}

.dashboard-date-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  min-height: 0.9rem;
}

#dashboard-ai-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

#dashboard-ai-btn {
  width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#dashboard-ai-btn.is-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.dashboard-combined-empty {
  margin-top: 14px;
  margin-bottom: 2px;
  background: transparent;
  color: #5a6f8c;
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
}

.dashboard-combined-empty.is-forecast-gradient .dashboard-estimate-hint {
  background: var(--estimate-gradient, var(--forecast-gradient, linear-gradient(90deg, #3b82f6 0%, #22c55e 50%, #a855f7 100%)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.dashboard-estimate-info-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  line-height: 1;
  opacity: 0.85;
}

.dashboard-ai-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  line-height: 1;
  display: block;
}

.dashboard-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.dashboard-course-card {
  border-radius: 18px;
  border: 1px solid;
  padding: 16px 18px 18px;
  overflow: hidden;
  border-color: var(--course-border, var(--course-starter-border));
  background: var(--course-bg, var(--course-starter-bg));
}

.dashboard-course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 12px;
}

.dashboard-course-name {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-course-card .dashboard-course-name,
.dashboard-course-card .dashboard-course-total,
.dashboard-course-card .dashboard-course-qty {
  color: #000;
}

.dashboard-course-card .dashboard-course-name {
  color: #000;
}

.dashboard-course-card .dashboard-course-dish {
  color: var(--text-main);
}

.dashboard-course-card .dashboard-course-total-pill {
  background: var(--course-pill-bg, var(--course-starter-pill-bg));
  border-color: var(--course-pill-border, var(--course-starter-pill-border));
}

.dashboard-course-total {
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-course-total-pill {
  min-width: 0;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 var(--course-qty-right-inset);
  text-align: center;
  color: #000;
  line-height: 1;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-sizing: border-box;
}

.dashboard-course-list {
  display: grid;
  gap: 8px;
}

.dashboard-course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid transparent;
  padding: 9px 12px;
  min-width: 0;
}

.dashboard-course-dish {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
}

.dashboard-course-qty {
  flex: 0 0 auto;
  min-width: 30px;
  padding-right: var(--course-qty-right-inset);
  text-align: right;
  font-weight: 700;
  font-size: 0.95rem;
}

.dashboard-course-qty.is-estimate {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-course-qty.is-estimate::before {
  content: "~";
  margin-right: 4px;
  font-weight: 600;
}

.dashboard-course-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
}

@media (max-width: 1250px) {
  .dashboard-course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-combined-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-combined-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-date-nav {
    grid-template-columns: 42px minmax(150px, 1fr) 42px;
  }

  .dashboard-course-grid {
    grid-template-columns: 1fr;
  }

}

.forecast-card .card-header {
  align-items: center;
}



.forecast-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.forecast-date {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 140px;
  text-align: center;
}

.toggle-group {
  display: inline-flex;
  gap: 10px;
}

.forecast-nav .btn {
  padding: 6px 12px;
}

.forecast-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
  align-content: start;
}

.forecast-chart-wrap {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 360px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  overflow: visible;
  isolation: isolate;
}


.live-chart-wrap {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 360px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  overflow: visible;
  isolation: isolate;
}


.live-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
  position: relative;
  z-index: 5;
  background: transparent;
  opacity: 1;
  mix-blend-mode: normal;
}

.forecast-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 8px 4px 4px;
  margin-top: auto;
}

.forecast-bar {
  display: grid;
  grid-template-columns: 1fr 4fr auto;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.forecast-bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forecast-bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e5edf7;
  overflow: hidden;
}

.forecast-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: #3b82f6;
}

.forecast-bar-value {
  font-weight: 700;
  color: var(--text-main);
}

.forecast-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  text-align: center;
  padding: 12px;
  z-index: 2;
  line-height: 1.4;
}

#forecast-empty::before {
  content: "\f080";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eef2f7;
  color: #64748b;
  margin: 0 auto 10px;
  font-size: 1rem;
}

.forecast-empty-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 260px;
}

.forecast-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.forecast-table th,
.forecast-table td {
  padding: 12px 12px;
  border-bottom: 1px dashed #e6edf6;
  text-align: left;
}

.forecast-table th:last-child {
  text-align: right;
}

.forecast-table th[data-forecast-sort] {
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.forecast-table th[data-forecast-sort].is-active {
  color: var(--text-main);
  border-bottom-color: #3b82f6;
}

.forecast-table td strong {
  font-weight: 700;
}

.forecast-table tr:last-child td {
  border-bottom: none;
}

.forecast-table th {
  background: #f8fafc;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.forecast-table td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.9rem;
}

.forecast-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.forecast-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.forecast-table td:last-child {
  text-align: right;
}

.forecast-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-badge[data-course] {
  background: var(--course-bg, var(--course-starter-bg));
  color: var(--course-text, var(--course-starter-text));
  border: 1px solid var(--course-border, var(--course-starter-border));
}

.forecast-qty-pill {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #000;
  background: #eef2f7;
  border-radius: 999px;
  padding: 4px 10px;
}



.metric-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.metrics-grid .metric-card {
  animation: fadeUp 0.3s ease-out both;
}

.metrics-grid .metric-card:nth-child(1) {
  background: linear-gradient(135deg, #eef4ff, #f7faff);
  border-color: #dbe7ff;
}

.metrics-grid .metric-card:nth-child(2) {
  background: linear-gradient(135deg, #e8f5ff, #f5fbff);
  border-color: #cfe9ff;
  animation-delay: 50ms;
}

.metrics-grid .metric-card:nth-child(3) {
  background: linear-gradient(135deg, #eaf9f0, #f6fffb);
  border-color: #d8f3e1;
  animation-delay: 100ms;
}


.metric-icon {
  width: clamp(46px, 3.2vw, 56px);
  height: clamp(46px, 3.2vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.4rem;
}

.metric-icon.success {
  background: #ddf7e8;
  color: var(--success);
}

.metric-icon.info {
  background: #dff1ff;
  color: #0ea5e9;
}

.metric-icon.warning {
  background: #ffedd5;
  color: var(--warning);
}

.circle-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.circle-svg {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}

.circle-bg {
  fill: none;
  stroke: #d8e1f0;
  stroke-width: 8;
}

.circle-bar {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
  transition: stroke-dashoffset 1s ease;
}

.circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1.1rem;
}

.metric-info h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-align: right;
}

#occupied-label,
#guests-in-house-label,
#accuracy-label {
  color: #000;
}

.metric-info {
  flex: 1;
  text-align: right;
}

.metric-info .value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: right;
}

.metric-info .sub {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.metric-inline {
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  justify-content: flex-end;
}

.metric-inline > strong:first-child {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.metric-inline-suffix {
  display: inline-flex;
  align-items: flex-start;
  padding-top: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  line-height: 1;
}

.metric-inline-suffix strong {
  line-height: 1;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.dish-table th:nth-child(2),
.dish-table td:nth-child(2) {
  text-align: center;
}

.icon-thin,

.input-inline {
  background: #f3f6fb;
  border: 1px solid #dbe4f2;
  border-radius: 10px;
  padding: 6px 10px;
  width: clamp(90px, 8vw, 130px);
  font-weight: 700;
  text-align: center;
  font-size: 1rem;
}

.daily-menu-item {
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.daily-menu-item:last-child {
  border-bottom: none;
}

.daily-menu-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
  max-width: 100%;
}

.daily-menu-name[title]:hover::after,
.forecast-name-text[title]:hover::after,
.order-detail-name[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: #111827;
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 6px;
  border-radius: 6px;
  white-space: nowrap;
  transform: translateY(-120%);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.daily-menu-name,
.forecast-name-text,
.order-detail-name {
  position: relative;
}

.ordered-pill {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-main);
  background: #eef2f7;
  border-radius: 999px;
  padding: 4px 8px;
}

.menu-cat-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  text-transform: uppercase;
  margin-right: 10px;
  font-weight: 700;
}

.menu-cat-badge[data-course] {
  background: var(--course-bg, var(--course-starter-bg));
  color: var(--course-text, var(--course-starter-text));
  border: 1px solid var(--course-border, var(--course-starter-border));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.note-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #bfdbfe;
  background: #e8f0ff;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

th[data-sort] {
  cursor: pointer;
}

th[data-sort].sorted {
  color: var(--text-main);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f6;
  font-size: 0.95rem;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}

tr:hover td {
  background-color: #f4f7ff;
}

tr.order-has-notes td {
  background: rgba(254, 243, 199, 0.55);
}

tr.order-has-notes:hover td {
  background: rgba(254, 243, 199, 0.75);
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-blue {
  background: #e6f9ef;
  color: #16a34a;
}

.badge-gray {
  background: #eef2f7;
  color: var(--text-muted);
}

.badge[data-course] {
  background: var(--course-bg, var(--course-starter-bg));
  color: var(--course-text, var(--course-starter-text));
  border: 1px solid var(--course-border, var(--course-starter-border));
}

.planner-header {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  align-items: center;
  background: #f9fafb;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.planner-field {
  display: flex;
  align-items: center;
}

.planner-day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.planner-day-pill {
  border: 1px solid #dbe4f2;
  background: #eef2f7;
  color: #64748b;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.planner-day-pill:hover {
  background: #e4e9f2;
  color: #334155;
}

.planner-day-pill:not(.is-active):hover {
  transform: translateY(-1px);
}

.planner-day-pill.is-active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.planner-edit-toggle {
  gap: 8px;
  padding: 8px 14px;
  background: var(--primary);
  border-color: transparent;
  color: #ffffff;
}

.planner-edit-cancel-inline {
  display: none;
}

.planner-edit-cancel-inline.is-visible {
  display: inline-flex;
}

.planner-edit-toggle.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.planner-edit-controls {
  display: none;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.menu-sync-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe5f1;
  background: #f8fbff;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.menu-sync-status.is-saving {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.menu-sync-status.is-saved {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.menu-sync-status.is-dirty {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.menu-sync-status.is-error {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.course-manager {
  margin-bottom: 20px;
  background: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 16px;
}

.course-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-manager-title {
  display: block;
  font-weight: 700;
  color: var(--text-main);
}

.course-manager-hint {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.course-manager-day-hint {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

.course-manager-day-hint.is-warning {
  color: #b45309;
}

.course-manager-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.course-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.course-row:hover {
  background: #ffffff;
  border-color: #c7d2fe;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.14);
  transform: translateY(-1px);
}

.course-row.is-inactive {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
}

.course-row.is-inactive:hover {
  background: #f8fafc;
  border-color: #dbe4f2;
  box-shadow: none;
  transform: none;
}

.course-row.is-drop-target {
  border-color: var(--course-border, var(--primary));
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.course-drag {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.course-drag:active {
  cursor: grabbing;
}

.course-row:hover .course-drag {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.course-row.is-touch-dragging {
  opacity: 0.42;
  box-shadow: none;
}

body.touch-drag-active {
  user-select: none;
  -webkit-user-select: none;
}

.touch-drag-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  pointer-events: none;
  margin: 0 !important;
  opacity: 0.97;
  border: 1px solid #93c5fd;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.26);
  transform: translate3d(-9999px, -9999px, 0);
  will-change: transform;
}

.touch-drag-preview.touch-drag-preview-course {
  border-radius: 14px;
  background: #ffffff;
}

.touch-drag-preview.touch-drag-preview-cycle {
  border-radius: 999px;
  background: #eff6ff;
}

@media (pointer: coarse) {
  .cycle-pill,
  .course-drag {
    touch-action: none;
  }
}

.course-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-color-trigger {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe4f2;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.course-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--course-dot, #3b82f6);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.course-name-input {
  width: 100%;
}

.course-name-grid {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.course-name-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.course-name-lang {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.course-name-grid .course-name-input {
  height: 34px;
  padding: 7px 10px;
}

.course-name-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--text-main);
}

.course-row.is-inactive .course-name-text,
.course-row.is-inactive .course-name-lang {
  color: #94a3b8;
}

.course-color-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.course-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 8px;
}

.course-color-input::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.course-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}

.course-action-cell {
  min-width: 78px;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
}

.course-actions,
.course-edit-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.course-actions {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.course-row:hover .course-actions,
.course-row:focus-within .course-actions {
  opacity: 1;
  pointer-events: auto;
}

.course-row.is-editing .course-actions {
  display: none;
}

.course-row:not(.is-editing) .course-edit-actions {
  display: none;
}

.course-row-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #dbe4f2;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.course-row-icon:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.course-row-icon.danger:hover {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.course-day-switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #d7deea;
  padding: 2px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.course-day-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.course-day-switch.is-active {
  background: #3b82f6;
  border-color: #3b82f6;
}

.course-day-switch.is-active .course-day-switch-thumb {
  transform: translateX(22px);
}

.course-row.is-inactive .course-color-trigger,
.course-row.is-inactive .course-drag,
.course-row.is-inactive .course-row-icon {
  opacity: 0.55;
}

.course-row.is-inactive .course-color-dot {
  filter: saturate(0.3);
}

.course-manager-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (hover: none) {
  .course-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

.planner-color {
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-edit-cancel {
  display: none;
}

.menu-planner-editing .planner-edit-cancel {
  display: inline-flex;
}

.planner-color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.planner-color-panel {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.2s ease, max-height 0.2s ease, opacity 0.2s ease;
}

.menu-planner-color-open .planner-color-panel {
  max-width: 240px;
  max-height: 60px;
  opacity: 1;
}

.menu-planner-color-open .planner-color-toggle i {
  transform: rotate(90deg);
}

.planner-color-toggle i {
  transition: transform 0.2s ease;
}

.planner-color-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cycle-name-input {
  display: none;
  min-width: 220px;
  padding: 10px 12px;
  padding-right: 40px;
  border-radius: 10px;
  border: 1px solid #dbe4f2;
  background: #f6f8fc;
  font-size: 0.95rem;
}

.menu-planner-editing .planner-edit-controls {
  display: flex;
}

.menu-planner-editing #cycle-select {
  display: none;
}

.menu-planner-editing .cycle-name-input {
  display: inline-flex;
}

.menu-planner-editing #cycle-select {
  display: inline-flex;
}

.menu-planner-editing .cycle-name-input {
  display: none;
}

.planner-color-toggle,
.planner-color-panel {
  display: none;
}

.menu-planner-locked .menu-col {
  opacity: 0.8;
}

.menu-planner-locked .dish-select,
.menu-planner-locked .slot-remove,
.menu-planner-locked .slot-edit,
.menu-planner-locked .button.secondary {
  pointer-events: none;
  opacity: 0.6;
}

.btn:disabled,
.icon-btn:disabled,
.dish-edit-btn:disabled,
.dish-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.slot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.slot-row.is-with-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
}

.slot-row.is-with-actions .dish-select {
  height: 36px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  background: #ffffff;
}

.slot-inline-actions {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.slot-inline-actions .slot-edit,
.slot-inline-actions .slot-remove {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.slot-inline-actions .slot-remove {
  border-left: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
}

.slot-remove {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.slot-remove:hover {
  background: #eef2f7;
  color: #334155;
}

.button.secondary.menu-planner-add {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary.menu-planner-add:hover {
  background: rgba(59, 130, 246, 0.16);
}

.slot-edit {
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.slot-edit:hover {
  background: rgba(37, 99, 235, 0.12);
}

.select-styled {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dbe4f2;
  font-size: 0.95rem;
  min-width: 200px;
  background: #f6f8fc;
  cursor: pointer;
}

#cycle-select {
  padding-left: 12px;
  padding-right: 48px;
}

.cycle-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cycle-color-dot {
  position: absolute;
  right: 34px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5f5;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
  pointer-events: none;
}

#dish-category-input {
  background: var(--course-bg, #f8fafc);
  color: var(--course-text, var(--text-main));
  border-color: var(--course-border, var(--border));
}

.form-input.unit-kg,
.form-input.unit-g,
.select-styled.unit-kg,
.select-styled.unit-g {
  background: rgba(249, 115, 22, 0.18);
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.35);
}

.form-input.unit-l,
.form-input.unit-ml,
.select-styled.unit-l,
.select-styled.unit-ml {
  background: rgba(14, 165, 233, 0.18);
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.35);
}

.form-input.unit-pieces,
.select-styled.unit-pieces {
  background: rgba(219, 39, 119, 0.18);
  color: #db2777;
  border-color: rgba(219, 39, 119, 0.35);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.menu-col {
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid #e9eff7;
}

.menu-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 15px;
  font-weight: 700;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 8px;
}

.menu-col h4[data-course] {
  color: var(--course-text, var(--text-muted));
}

.menu-slot {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.menu-slot-add .slot-row {
  grid-template-columns: 1fr;
}

.menu-slot-add .menu-select-wrap {
  grid-column: 1 / -1;
}

.menu-slot-add .dish-select {
  border-style: dashed;
  border-color: #dbe4f2;
  background: #ffffff;
  padding-right: 34px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px 14px;
}

.dish-select {
  width: 100%;
  min-width: 0;
  padding: 6px;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 0.9rem;
}

.dish-select.menu-select-empty {
  color: var(--text-muted);
}

.menu-select-wrap {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
}

.menu-select-wrap.is-empty::before {
  content: "\f067";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.menu-select-wrap.is-empty .dish-select {
  padding-left: 32px;
}


.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #dbe4f2;
  background: #f6f8fc;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.table-control {
  display: grid;
  gap: 12px;
}

.table-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-manager {
  display: grid;
  gap: 16px;
}

.table-manager-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.table-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.table-card.active {
  border-color: #2563eb;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.table-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.table-status.open {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

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

.table-detail {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  display: grid;
  gap: 12px;
}

.table-phone-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.overview-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 16px;
}

.overview-header.overview-header-left {
  justify-content: flex-start;
}

.overview-header.overview-header-left .overview-actions {
  flex: 0;
}

.overview-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.overview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: flex-end;
}

.overview-search {
  min-width: 0;
  flex: 1;
}

.overview-date {
  max-width: 160px;
}

.overview-date,
.overview-date-input {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
}

.overview-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.overview-stats .overview-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.overview-pill .stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.overview-pill.ordered {
  border-color: rgba(34, 197, 94, 0.4);
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}

.overview-pill.outstanding {
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
}

.overview-pill.assigned {
  border-color: rgba(59, 130, 246, 0.35);
  color: #2563eb;
  background: rgba(59, 130, 246, 0.12);
}

.overview-pill.ordered .stat-dot {
  background: #22c55e;
}

.overview-pill.outstanding .stat-dot {
  background: #f59e0b;
}

.overview-pill.assigned .stat-dot {
  background: #3b82f6;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.overview-table th,
.overview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  font-size: 0.9rem;
}

.overview-table th:nth-child(1),
.overview-table td:nth-child(1) {
  width: 11%;
}

.overview-table th:nth-child(2),
.overview-table td:nth-child(2) {
  width: 16%;
}

.overview-table th:nth-child(3),
.overview-table td:nth-child(3) {
  width: 11%;
  text-align: center;
}

.overview-table th:nth-child(4),
.overview-table td:nth-child(4) {
  width: 16%;
  text-align: center;
}

.overview-table th:nth-child(5),
.overview-table td:nth-child(5) {
  width: 30%;
}

.overview-table th:nth-child(5) {
  font-weight: 400;
}

.overview-table th:nth-child(6),
.overview-table td:nth-child(6) {
  width: 16%;
}

.overview-table th[data-sort] {
  cursor: pointer;
}

.overview-table th[data-sort].is-active {
  color: var(--text-main);
}

.overview-row {
  cursor: pointer;
  transition: background 160ms ease;
}

.overview-row:hover {
  background: #f8fafc;
}

.overview-row.pending {
  opacity: 0.6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.status-pill.is-assigned {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.status-pill.is-ordered {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.status-pill.is-outstanding {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.status-pill.is-scheduled {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.status-pill.is-unassigned {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.12);
  color: #dc2626;
}

.overview-ordered-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.4);
  margin-left: 8px;
}

.overview-guest {
  display: grid;
  gap: 2px;
}

.overview-guest-name {
  font-weight: 600;
}

.overview-guest-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.overview-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.overview-note-text {
  white-space: pre-line;
}

.overview-note-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
}

#overview-filters .filter-btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#overview-filters .filter-btn::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.18s ease;
}

#overview-filters .filter-btn:not(.active):hover[data-filter="assigned"] {
  background: rgba(34, 197, 94, 0.09);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.26);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="assigned"]::before {
  background: rgba(34, 197, 94, 0.75);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="scheduled"] {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.24);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="scheduled"]::before {
  background: rgba(37, 99, 235, 0.72);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="unassigned"] {
  background: rgba(248, 113, 113, 0.09);
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.24);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="unassigned"]::before {
  background: rgba(239, 68, 68, 0.75);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="outstanding"] {
  background: rgba(245, 158, 11, 0.09);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.25);
}

#overview-filters .filter-btn:not(.active):hover[data-filter="outstanding"]::before {
  background: rgba(245, 158, 11, 0.75);
}

#overview-filters .filter-btn.active[data-filter="assigned"] {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.4);
}

#overview-filters .filter-btn.active:hover[data-filter="assigned"] {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.52);
}

#overview-filters .filter-btn.active[data-filter="assigned"]::before {
  background: #22c55e;
}

#overview-filters .filter-btn.active[data-filter="scheduled"] {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.38);
}

#overview-filters .filter-btn.active:hover[data-filter="scheduled"] {
  background: rgba(37, 99, 235, 0.19);
  border-color: rgba(37, 99, 235, 0.5);
}

#overview-filters .filter-btn.active[data-filter="scheduled"]::before {
  background: #2563eb;
}

#overview-filters .filter-btn.active[data-filter="unassigned"] {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.4);
}

#overview-filters .filter-btn.active:hover[data-filter="unassigned"] {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.52);
}

#overview-filters .filter-btn.active[data-filter="unassigned"]::before {
  background: #ef4444;
}

#overview-filters .filter-btn.active[data-filter="outstanding"] {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.4);
}

#overview-filters .filter-btn.active:hover[data-filter="outstanding"] {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.52);
}

#overview-filters .filter-btn.active[data-filter="outstanding"]::before {
  background: #f59e0b;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 50;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 200ms ease;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.cycle-editor-drawer {
  width: min(420px, 100%);
}

.cycle-editor-list {
  display: grid;
  gap: 12px;
}

.cycle-editor-row {
  border: 1px solid #d8e0ee;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f8fafd;
  display: grid;
  gap: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cycle-editor-row.is-drop-target {
  border-color: #8cb6fb;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  background: #f4f8ff;
}

.cycle-editor-top {
  display: grid;
  grid-template-columns: 22px 22px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.cycle-editor-drag {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: #b3bccb;
  cursor: grab;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cycle-editor-drag:active {
  cursor: grabbing;
}

.cycle-editor-drag:hover {
  color: #7c8ca3;
  background: #eef2f9;
}

.cycle-editor-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #f2f5fb;
  box-shadow: 0 0 0 1px #b8c2d3;
}

.cycle-editor-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 30px;
}

.cycle-editor-color {
  width: 21px;
  height: 21px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #ffffff;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cycle-editor-color i {
  font-size: 0.58rem;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cycle-editor-color:not(.is-selected) {
  opacity: 0.5;
}

.cycle-editor-color:hover:not(.is-selected) {
  opacity: 0.72;
}

.cycle-editor-color.is-selected {
  opacity: 1;
  border-color: #ffffff;
  box-shadow: 0 0 0 2px #7ea9ed;
}

.cycle-editor-color.is-selected i {
  opacity: 1;
  transform: scale(1);
}

.cycle-editor-color:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.cycle-editor-name.is-invalid {
  border-color: #ef4444;
}

.cycle-editor-error {
  color: #ef4444;
  font-size: 0.85rem;
  min-height: 1rem;
}

.cycle-editor-error:empty {
  display: none;
}

.cycle-editor-delete {
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.cycle-editor-delete:hover {
  background: #fee2e2;
  color: #dc2626;
  transform: translateY(-1px);
}

.cycle-editor-delete:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 1px;
}

.cycle-editor-add {
  background: transparent;
  color: #64748b;
  font-weight: 600;
}

.cycle-editor-add:hover {
  border-color: #bfd2f3;
  background: #eef4ff;
  color: #3b5f97;
}

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

.drawer-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.drawer-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.drawer-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
}

.drawer-status {
  margin-left: auto;
}

.drawer-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.drawer-status + .drawer-close {
  margin-left: 8px;
}

.drawer-close:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

.drawer-close:active {
  background: #cbd5e1;
  border-color: #94a3b8;
  transform: translateY(1px);
}

.drawer-close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: #f3f6fb;
  border: 1px solid #dbe4f2;
  padding: 6px;
  border-radius: 14px;
}

.drawer-tabs .tab-btn {
  border-radius: 12px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-tabs .tab-btn:hover:not(.is-active) {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px #dbe4f2;
}

.drawer-tabs .tab-btn.is-active {
  background: #e8f0ff;
  color: #2f6fed;
  font-weight: 700;
  box-shadow: none;
}

.drawer-tabs .tab-btn.is-active:hover {
  background: #e8f0ff;
  color: #2f6fed;
  box-shadow: none;
}

.drawer-body {
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  gap: 14px;
  align-content: start;
  flex: 1;
  min-height: 0;
}

.drawer .form-group {
  margin-bottom: 0;
}

.drawer .modal-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  align-items: center;
}

.overview-detail {
  display: grid;
  gap: 10px;
}

.overview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 600;
}

.overview-table-language-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #dbe4f2;
  background: #f8fafc;
}

.overview-table-language-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #64748b;
  border: 1px solid transparent;
}

.overview-table-language-segment.is-active {
  color: #ffffff;
  background: #4282de;
  border-color: #4282de;
}

.overview-note-card {
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.overview-note-title {
  font-weight: 600;
  color: #4282de;
}

#overview-tab-order .overview-note-card.overview-allergen-card {
  border-color: #f87171;
  background: #fff;
}

#overview-tab-order .overview-note-card.overview-order-note-card {
  border: 1px solid #4282de;
  background: #fff;
}

#overview-tab-order .overview-allergen-section.overview-allergen-card {
  border: 1px solid #f87171;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

#overview-tab-order .overview-note-card.overview-allergen-card .overview-note-title {
  color: #dc2626;
}

#overview-tab-order .overview-allergen-section.overview-allergen-card .overview-note-title {
  color: #dc2626;
}

#overview-tab-order .overview-note-text {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-main);
}

.overview-invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-invite-copy-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.overview-invite-copy {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.overview-invite-copy:hover {
  background: #e9effa;
  border-color: #cbd5f5;
  color: #2563eb;
}

.overview-invite-copied {
  font-size: 0.72rem;
  color: #2563eb;
  opacity: 0;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translate(-50%, -2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.overview-invite-copied.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.overview-course {
  display: grid;
  gap: 6px;
  --overview-qty-offset-x: -10px;
}

.overview-course .badge[data-course] {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 6px 10px 6px 12px;
}

.overview-course-badge {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-course-label {
  min-width: 0;
}

.overview-course-total {
  min-width: 46px;
  display: inline-block;
  text-align: right;
  padding-right: 8px;
  box-sizing: border-box;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--course-text, #334155);
  opacity: 0.95;
  transform: translateX(var(--overview-qty-offset-x));
}

.overview-course-progress {
  min-width: 54px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--course-text, #334155);
}

.overview-course-progress.is-complete {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.8);
}

.overview-course-items {
  display: grid;
  gap: 6px;
}

.overview-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #eef2f6;
  background: #fff;
  font-size: 0.9rem;
}

.overview-order-item .overview-qty {
  font-weight: 600;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  transform: translateX(var(--overview-qty-offset-x));
}

.overview-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.overview-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.overview-clear-btn {
  margin-left: auto;
}

.overview-relocate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.overview-relocate-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.overview-relocate-hint {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.overview-relocate-modal .overview-relocate-copy {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.overview-relocate-modal .overview-relocate-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-relocate-modal .overview-relocate-row {
  display: grid;
  gap: 6px;
}

.overview-relocate-modal .overview-relocate-static {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 10px 12px;
  font-weight: 600;
}

.form-input.is-invalid {
  border-color: var(--danger);
}

#overview-tab-guest .overview-detail {
  gap: 14px;
}

.overview-form-error {
  font-size: 0.85rem;
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  display: none;
}

.overview-form-error.is-visible {
  display: block;
}

.overview-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-order-actions .btn.btn-primary {
  flex: 1;
  justify-content: center;
}

.overview-remind-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-width: 0;
  white-space: nowrap;
}

.overview-order-editor {
  display: grid;
  gap: 16px;
}

.overview-order-note .form-input {
  background: #fff;
  resize: vertical;
  font-family: var(--font-stack);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.overview-allergen-list {
  display: grid;
  gap: 8px;
}

.overview-allergen-section .overview-note-title {
  margin-bottom: 8px;
}

.overview-allergen-item {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.overview-allergen-item.is-active {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

#overview-tab-order .overview-allergen-section.overview-allergen-card .overview-allergen-item.is-active {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.overview-allergen-toggle-row {
  display: inline-flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
  min-height: 27px;
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
}

.overview-allergen-toggle-row input {
  display: none;
}

.overview-allergen-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.overview-allergen-stepper.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.overview-order-item.is-editor {
  align-items: center;
}

.overview-order-stepper {
  gap: 5px;
}

.overview-order-stepper button {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 0.86rem;
}

.overview-order-stepper button:hover {
  background: #f8fafc;
  border-color: #cbd5f5;
}

.overview-order-stepper button:active {
  background: #e2e8f0;
  border-color: #a5b4fc;
}

.overview-order-stepper input {
  width: 50px;
  height: 27px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  font-weight: 600;
  font-size: 0.75rem;
  text-align: center;
  padding: 0;
  line-height: 25px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.overview-order-stepper input::-webkit-outer-spin-button,
.overview-order-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sms-lang {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 6px;
}

.overview-whatsapp-message {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-top: 8px;
  font-family: var(--font-stack);
  resize: vertical;
}

#overview-whatsapp-lang .lang-pill,
#settings-lang-toggle .lang-pill {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  min-width: 46px;
  text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

#overview-whatsapp-lang .lang-pill:hover,
#settings-lang-toggle .lang-pill:hover {
  background: #f1f5ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

#overview-whatsapp-lang .lang-pill.active,
#settings-lang-toggle .lang-pill.active {
  background: #2563eb;
  color: #fff;
  border-color: transparent;
}

#overview-whatsapp-lang .lang-pill.active:hover,
#settings-lang-toggle .lang-pill.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* Tischkonfigurator: Gastinfo Sprachbuttons (DE/IT/EN) */
#overview-whatsapp-lang .lang-pill:hover {
  background: rgba(66, 130, 222, 0.1);
  border-color: rgba(66, 130, 222, 0.35);
  color: #4282de;
}

#overview-whatsapp-lang .lang-pill.active {
  background: #4282de;
  border-color: transparent;
  color: #fff;
}

#overview-whatsapp-lang .lang-pill.active:hover {
  background: #3979d5;
  border-color: #3979d5;
  color: #fff;
}

.overview-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-stepper button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.overview-stepper button:hover {
  background: #f8fafc;
  border-color: #cbd5f5;
}

.overview-stepper button:active {
  background: #e2e8f0;
  border-color: #a5b4fc;
}

.overview-stepper input {
  width: 70px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
  padding: 0;
  line-height: 38px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.overview-stepper input::-webkit-outer-spin-button,
.overview-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.helper-text {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 6px;
}

.helper-text:empty {
  display: none;
}

#ingredient-price-hint:empty {
  display: none;
}

.hint-text {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.dish-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  flex: 1;
}

.dish-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  background: #f9fafb;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.dish-config-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

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

.cycle-color-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 8px 14px;
  min-width: 120px;
  justify-content: center;
}

.color-toggle i {
  font-size: 0.9rem;
}


#cycle-add-btn {
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  background: #3b82f6;
  color: #ffffff;
  border: 1px solid #2563eb;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
}

#cycle-add-btn:hover {
  background: #2563eb;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
}

.cycle-palette {
  display: grid;
  gap: 10px;
  align-content: start;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid #e9eff7;
}

.cycle-action-row {
  display: flex;
  margin-top: 4px;
  align-items: stretch;
}

.cycle-edit-inline {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cycle-edit-inline i {
  font-size: 0.9rem;
}

.button.secondary.cycle-edit-inline:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.cycle-add-inline {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary.cycle-add-inline:hover {
  background: rgba(59, 130, 246, 0.16);
}

.color-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.color-picker-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  z-index: 5;
}

.color-picker-panel.compact {
  padding: 8px;
}

.color-picker-panel.is-open {
  display: inline-flex;
}

.color-picker.compact {
  gap: 4px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.2);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.25), 0 6px 12px rgba(15, 23, 42, 0.12);
}

.color-swatch.is-selected {
  border-color: #111827;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.35), 0 0 0 3px rgba(17, 24, 39, 0.15);
}

.color-swatch:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

.cycle-pill {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #111827;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.cycle-pill:hover {
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.cycle-pill.is-touch-dragging {
  opacity: 0.38;
  filter: saturate(0.72);
  box-shadow: none;
}

.cycle-pill .cycle-pill-name {
  font-size: 0.85rem;
  min-width: 0;
  color: inherit;
}

.cycle-drag-handle {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.cycle-pill:hover .cycle-drag-handle {
  opacity: 0.95;
  transform: translateY(-1px);
}

.cycle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-header {
  margin-bottom: 10px;
  display: inline-grid;
  grid-template-columns: 42px minmax(160px, auto) 42px;
  align-items: center;
  gap: 12px;
}

#calendar-prev,
#calendar-next {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#calendar-header {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  padding: 8px;
  min-height: 84px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.calendar-day .day-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.calendar-day.today {
  border-color: #111827;
  box-shadow: inset 0 0 0 2px #111827;
}

.calendar-day.is-touch-drop-target {
  border-color: #1d4ed8;
  box-shadow: inset 0 0 0 2px rgba(29, 78, 216, 0.35);
  background: #eff6ff;
}

.calendar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
  background: rgba(37, 99, 235, 0.1);
}

.cycle-delete {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #dbe3ef;
  background: #f3f6fb;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cycle-pill:hover .cycle-delete {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.cycle-delete:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.cycle-delete:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 1px;
}

.calendar-weekday {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.filter-controls {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f3f6fb;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.filter-btn {
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
}

.filter-btn[data-course] {
  border-color: var(--course-border, var(--border));
  color: var(--course-text, var(--text-main));
}

.filter-btn.active[data-course] {
  background: var(--course-bg, var(--primary));
  color: var(--course-text, white);
  border-color: transparent;
}

#dish-filters .filter-btn:not(.active):hover {
  background: #eaf1ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

#dish-filters .filter-btn:not(.active):hover[data-course] {
  background: var(--course-bg, #eef4ff);
  color: var(--course-text, #1d4ed8);
  border-color: var(--course-border, #bfdbfe);
}

#dish-filters .filter-btn.active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
}

#dish-filters .filter-btn.active:hover[data-course] {
  background: var(--course-pill-bg, var(--course-bg, #eaf1ff));
  color: var(--course-text, #1d4ed8);
  border-color: var(--course-border, #bfdbfe);
  box-shadow: 0 6px 12px var(--course-pill-border, rgba(37, 99, 235, 0.2));
}

.dish-table td:last-child {
  text-align: right;
}

.dish-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.dish-table th:nth-child(1),
.dish-table td:nth-child(1) {
  width: 28%;
}

.dish-table th:nth-child(2),
.dish-table td:nth-child(2) {
  width: 16%;
}

.dish-table th:nth-child(3),
.dish-table td:nth-child(3) {
  width: 36%;
}

.dish-table th:nth-child(4),
.dish-table td:nth-child(4) {
  width: 12%;
}

.dish-table th:nth-child(5),
.dish-table td:nth-child(5) {
  width: 8%;
}

.dish-table td,
.dish-table th {
  word-break: break-word;
}

.dish-delete-btn {
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  margin-left: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.dish-delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.dish-delete-btn:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 1px;
}

.dish-row {
  cursor: pointer;
}

.dish-row:hover {
  background: #f8fafc;
}

.dish-name-text,
.dish-ingredients-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.ingredients-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f9fafb;
  max-height: none;
  overflow-y: visible;
}

#dish-add-ingredient {
  margin-bottom: 10px;
}

.ingredient-row.has-error .form-input,
.ingredient-row.has-error select {
  border-color: #ef4444;
}

.ingredients-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 36px;
  gap: 10px;
  align-items: start;
  margin-bottom: 8px;
}

.ingredient-remove {
  width: 36px;
  height: 36px;
  border: 1px solid #dbe4f2;
  background: #f8fafc;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ingredient-remove:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.button {
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  background: #1f2937;
  color: white;
}

.button.secondary {
  background: #e5e7eb;
  color: var(--text-main);
}

.button.secondary.cycle-edit-inline {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.button.secondary.cycle-add-inline {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.button.secondary.cycle-edit-inline:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.button.ghost {
  background: transparent;
  border: 1px dashed #d1d5db;
  color: var(--text-muted);
}

.button.cycle-edit-inline,
.button.cycle-add-inline {
  border-radius: 999px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 80px 36px;
  gap: 8px;
  margin-bottom: 8px;
}

.ingredient-row select,
.ingredient-row input {
  min-width: 0;
}

.ingredient-row input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.ingredient-row input[type="number"]::-webkit-outer-spin-button,
.ingredient-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.surface-muted {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search {
  max-width: 240px;
}

.tolerance-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 10px 16px;
  border-radius: 8px;
  color: #0c4a6e;
  font-weight: 500;
}

.shopping-card {
  display: grid;
  gap: 18px;
}

.shopping-overview-wrap {
  width: 100%;
  margin-bottom: 24px;
}

/* ── Shopping Days ── */
.shopping-days-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border, rgba(20, 17, 16, 0.12));
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.shopping-days-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.shopping-days-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.shopping-days-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #e9f0ff;
  font-size: 1.08rem;
}

.shopping-days-title {
  font-weight: 750;
  font-size: 1.2rem;
  color: var(--text-main, #111827);
  line-height: 1.15;
}

.shopping-days-subtitle {
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
}

.shopping-daybar-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.shopping-daybar {
  width: 100%;
}

.shopping-daybar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.shopping-day-cell {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
  border-radius: 14px;
  min-height: 70px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 140ms ease, border-color 140ms ease;
}

.shopping-day-head {
  position: relative;
  width: 100%;
  padding: 0 18px;
}

.shopping-day-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.38);
  background: #eff6ff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.shopping-day-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  text-align: center;
}

.shopping-day-done-icon {
  position: absolute;
  top: -2px;
  left: 4px;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #dcfce7;
  font-size: 0.56rem;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
  pointer-events: none;
}

.shopping-day-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  text-align: center;
}

.shopping-day-ai-icon {
  position: absolute;
  top: -1px;
  right: 4px;
  width: 14px;
  height: 14px;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.shopping-day-ai-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.shopping-day-cell.is-today:not(.is-selected) {
  border-color: rgba(59, 130, 246, 0.35);
  background: #eff6ff;
}

.shopping-day-cell.is-selected {
  border-color: rgba(66, 130, 222, 0.86);
  background: linear-gradient(180deg, #e0ecff 0%, #dbeafe 100%);
  box-shadow: 0 14px 24px rgba(66, 130, 222, 0.24);
  transform: translateY(-1px);
}

.shopping-day-cell.is-selected .shopping-day-name,
.shopping-day-cell.is-selected .shopping-day-num {
  color: #1e40af;
}

.shopping-day-cell.is-selected .shopping-day-ai-icon {
  color: #1e40af;
}

.shopping-day-cell.is-done.is-selected {
  border-color: rgba(22, 163, 74, 0.82);
  background: linear-gradient(180deg, #ecfdf3 0%, #dcfce7 100%);
  box-shadow: 0 14px 24px rgba(22, 163, 74, 0.17);
}

.shopping-day-cell.is-done.is-selected .shopping-day-name,
.shopping-day-cell.is-done.is-selected .shopping-day-num {
  color: #166534;
}

.shopping-day-cell.is-done.is-selected .shopping-day-ai-icon {
  color: #4ade80;
}

.shopping-day-cell.is-done:not(.is-selected) {
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(180deg, #f6fff9 0%, #ecfdf3 100%);
}

.shopping-day-cell.is-done:not(.is-selected) .shopping-day-name,
.shopping-day-cell.is-done:not(.is-selected) .shopping-day-num {
  color: #166534;
}

.shopping-day-cell.is-reopened-change.is-selected {
  border-color: rgba(245, 158, 11, 0.86);
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  box-shadow: 0 14px 24px rgba(245, 158, 11, 0.2);
}

.shopping-day-cell.is-reopened-change.is-selected .shopping-day-name,
.shopping-day-cell.is-reopened-change.is-selected .shopping-day-num {
  color: #9a3412;
}

.shopping-day-cell.is-reopened-change.is-selected .shopping-day-ai-icon {
  color: #f59e0b;
}

.shopping-day-cell.is-reopened-change:not(.is-selected) {
  border-color: rgba(251, 191, 36, 0.44);
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
}

.shopping-day-cell.is-reopened-change:not(.is-selected) .shopping-day-name,
.shopping-day-cell.is-reopened-change:not(.is-selected) .shopping-day-num {
  color: #b45309;
}

.shopping-day-cell.is-reopened-change:not(.is-selected) .shopping-day-ai-icon {
  color: #fbbf24;
}

.shopping-day-cell.is-multiday-lock {
  cursor: not-allowed;
  opacity: 0.8;
}

.shopping-day-cell.is-multiday-lock:hover {
  transform: none;
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(180deg, #f6fff9 0%, #ecfdf3 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.shopping-daybar-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.shopping-days-actions {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.shopping-forecast-change-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 650;
}

.shopping-forecast-change-hint.is-hidden {
  display: none;
}

.shopping-forecast-change-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  animation: shoppingHintPulse 1.6s ease-out infinite;
}

@keyframes shoppingHintPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.shopping-status-toggle-btn {
  --shopping-status-accent: #4281df;
  --shopping-status-accent-rgb: 66, 129, 223;
  --shopping-status-accent-strong: #285fb5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(var(--shopping-status-accent-rgb), 0.3);
  background: rgba(var(--shopping-status-accent-rgb), 0.1);
  color: var(--shopping-status-accent);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.shopping-status-toggle-btn i {
  color: inherit;
}

.shopping-status-toggle-btn:hover {
  transform: none;
  border-color: rgba(var(--shopping-status-accent-rgb), 0.4);
  background: rgba(var(--shopping-status-accent-rgb), 0.14);
  box-shadow: none;
}

.shopping-status-toggle-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.shopping-status-toggle-btn.is-done {
  border-color: rgba(var(--shopping-status-accent-rgb), 0.5);
  background: rgba(var(--shopping-status-accent-rgb), 0.2);
  color: var(--shopping-status-accent-strong);
}

.shopping-status-toggle-btn.is-done:hover {
  transform: none;
  border-color: rgba(var(--shopping-status-accent-rgb), 0.62);
  background: rgba(var(--shopping-status-accent-rgb), 0.28);
  box-shadow: none;
}

.shopping-mehrtaegig-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.shopping-mehrtaegig-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  transition: color 0.15s;
}

.shopping-mehrtaegig-toggle.is-active .shopping-mehrtaegig-text {
  color: var(--primary, #3b82f6);
}

.shopping-toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.shopping-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.shopping-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border, rgba(20,17,16,0.18));
  border-radius: 11px;
  transition: background 0.2s;
  cursor: pointer;
}

.shopping-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.shopping-toggle-switch input:checked + .shopping-toggle-slider {
  background: var(--primary, #3b82f6);
}

.shopping-toggle-switch input:checked + .shopping-toggle-slider::before {
  transform: translateX(16px);
}

@media (max-width: 900px) {
  .shopping-days-card {
    padding: 14px 14px 12px;
  }

  .shopping-days-actions {
    width: 100%;
    justify-content: space-between;
  }

  .shopping-daybar-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 8px;
    padding-bottom: 4px;
    align-items: stretch;
  }

  .shopping-day-cell {
    flex: 0 0 102px;
    min-height: 66px;
  }

  .shopping-day-cell,
  .shopping-day-cell:hover,
  .shopping-day-cell.is-selected,
  .shopping-day-cell.is-done.is-selected,
  .shopping-day-cell.is-reopened-change.is-selected {
    transform: none;
  }

  .shopping-day-cell.is-selected {
    box-shadow: 0 8px 14px rgba(66, 130, 222, 0.2);
  }

  .shopping-day-cell.is-done.is-selected {
    box-shadow: 0 8px 14px rgba(22, 163, 74, 0.16);
  }

  .shopping-day-cell.is-reopened-change.is-selected {
    box-shadow: 0 8px 14px rgba(245, 158, 11, 0.18);
  }
}

.shopping-card-header {
  align-items: flex-start;
}

.shopping-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shopping-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-muted);
}

.shopping-filter-pill i {
  color: #64748b;
}

.shopping-filter-pill .select-styled {
  min-width: 160px;
  border: none;
  background: transparent;
  padding: 0;
}

.shopping-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr)) minmax(170px, 210px);
  gap: 12px;
  align-items: stretch;
}

.shopping-overview-actions {
  display: grid;
  gap: 10px;
  align-content: center;
}

.shopping-overview-actions .shopping-export {
  width: 100%;
}

.shopping-overview-actions #shopping-export-btn {
  width: 100%;
  justify-content: center;
}

.shopping-overview-actions .btn {
  justify-content: center;
  gap: 8px;
}

.shopping-overview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.shopping-overview-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.shopping-overview-icon.primary {
  background: #e0f2fe;
  color: #0284c7;
}

.shopping-overview-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.shopping-overview-icon.warning {
  background: #ffedd5;
  color: #f97316;
}

.shopping-overview-meta {
  display: grid;
  gap: 4px;
}

.shopping-overview-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.shopping-overview-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.shopping-tolerance-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  background: #ffffff;
  display: grid;
  gap: 12px;
}

.shopping-tolerance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shopping-tolerance-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shopping-tolerance-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef2ff;
  color: #4f46e5;
  display: grid;
  place-items: center;
}

.shopping-tolerance-name {
  font-weight: 700;
  color: var(--text-main);
}

.shopping-tolerance-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shopping-tolerance-value {
  background: #f1f5f9;
  color: #0f172a;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}

#shopping-tolerance-slider {
  --shopping-tolerance-accent: #4380dd;
  --shopping-tolerance-accent-rgb: 67, 128, 221;
  --shopping-tolerance-accent-hover: #2f6fcd;
  width: 100%;
  accent-color: var(--shopping-tolerance-accent);
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  background: linear-gradient(to right, var(--shopping-tolerance-accent) 0%, var(--shopping-tolerance-accent) var(--slider-fill, 0%), #eef2f7 var(--slider-fill, 0%), #eef2f7 100%);
  border: none;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: box-shadow 0.18s ease, filter 0.18s ease;
}

#shopping-tolerance-slider:hover {
  filter: saturate(1.06);
}

#shopping-tolerance-slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--shopping-tolerance-accent-rgb), 0.2);
}

#shopping-tolerance-slider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(to right, var(--shopping-tolerance-accent) 0%, var(--shopping-tolerance-accent) var(--slider-fill, 0%), #eef2f7 var(--slider-fill, 0%), #eef2f7 100%);
  border: none;
  border-radius: 999px;
}

#shopping-tolerance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--shopping-tolerance-accent);
  border: none;
  margin-top: -5px;
  box-shadow: 0 2px 6px rgba(var(--shopping-tolerance-accent-rgb), 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

#shopping-tolerance-slider:hover::-webkit-slider-thumb {
  transform: scale(1.08);
  background: var(--shopping-tolerance-accent-hover);
  box-shadow: 0 4px 10px rgba(var(--shopping-tolerance-accent-rgb), 0.36);
}

#shopping-tolerance-slider:active::-webkit-slider-thumb {
  transform: scale(1.02);
}

#shopping-tolerance-slider::-moz-range-track {
  height: 8px;
  background: linear-gradient(to right, var(--shopping-tolerance-accent) 0%, var(--shopping-tolerance-accent) var(--slider-fill, 0%), #eef2f7 var(--slider-fill, 0%), #eef2f7 100%);
  border: none;
  border-radius: 999px;
}

#shopping-tolerance-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--shopping-tolerance-accent);
  border: none;
  box-shadow: 0 2px 6px rgba(var(--shopping-tolerance-accent-rgb), 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

#shopping-tolerance-slider:hover::-moz-range-thumb {
  transform: scale(1.08);
  background: var(--shopping-tolerance-accent-hover);
  box-shadow: 0 4px 10px rgba(var(--shopping-tolerance-accent-rgb), 0.36);
}

#shopping-tolerance-slider:active::-moz-range-thumb {
  transform: scale(1.02);
}

.shopping-tolerance-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shopping-section {
  display: grid;
  gap: 10px;
  position: relative;
}

.shopping-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.58) 36%, rgba(255, 255, 255, 0.22) 100%);
  backdrop-filter: blur(1px);
  pointer-events: none;
}

.shopping-loading-overlay.is-hidden {
  display: none;
}

.shopping-loading-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background-image:
    linear-gradient(#ffffff, #ffffff),
    var(--forecast-gradient, linear-gradient(90deg, #3b82f6 0%, #22c55e 50%, #a855f7 100%));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
}

.shopping-loading-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--forecast-gradient, linear-gradient(90deg, #3b82f6 0%, #22c55e 50%, #a855f7 100%));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: shoppingLoadingSpin 0.9s linear infinite;
}

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

.shopping-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shopping-section-actions {
  margin-left: auto;
}

.shopping-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.shopping-controls-left,
.shopping-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shopping-controls-left {
  flex: 1;
  column-gap: 10px;
  row-gap: 10px;
}

.shopping-controls-right {
  justify-content: flex-end;
}

.shopping-search-field {
  flex: 0 1 260px;
  max-width: 260px;
  margin: 0;
}

.shopping-search-field .ingredient-price-search {
  width: 100%;
}

.shopping-controls .shopping-search-field i {
  color: #64748b;
}

.shopping-controls-left .shopping-filter-pill {
  margin: 0;
}

.shopping-controls-left .shopping-search-field + .shopping-filter-pill {
  margin-left: -6px;
}

.shopping-inline-add {
  margin-top: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.shopping-inline-add.is-hidden {
  display: none;
}

.shopping-inline-grid {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
}

.shopping-inline-grid .form-input,
.shopping-inline-grid .select-styled {
  width: 100%;
}

.shopping-inline-grid .form-group {
  margin-bottom: 0;
}

.shopping-inline-grid .form-label {
  margin-bottom: 11px;
  padding-left: 16px;
}

.shopping-inline-grid .form-group:first-child {
  min-width: 200px;
}

.shopping-inline-grid .form-group:nth-child(2) {
  min-width: 180px;
}

.shopping-inline-grid .form-group:nth-child(3),
.shopping-inline-grid .form-group:nth-child(4) {
  min-width: 110px;
}

.shopping-inline-grid .form-group:nth-child(5) {
  min-width: 200px;
}

.shopping-pill-input {
  border-radius: 999px;
  height: 40px;
  padding: 10px 16px;
  border: 1px solid #dbe4f2;
  background: #f8fafc;
}

.shopping-pill-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

select.shopping-pill-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px), 100% 0;
  background-size: 6px 6px, 6px 6px, 2.5em 100%;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.shopping-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.shopping-inline-actions .ingredient-inline-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

@media (max-width: 1100px) {
  .shopping-inline-grid {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .shopping-inline-grid {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1100px) {
  .shopping-overview {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .shopping-overview-actions {
    grid-column: span 2;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .shopping-overview {
    grid-template-columns: 1fr;
  }

  .shopping-overview-actions {
    grid-column: span 1;
  }
}

.shopping-manage-suppliers {
  gap: 8px;
  background: #ffffff;
  border-color: #e5e7eb;
  color: var(--text-main);
}

.shopping-overview-actions #shopping-manage-suppliers-btn {
  background: #ffffff;
  border-color: #e5e7eb;
  color: var(--text-main);
  box-shadow: none;
}

.shopping-overview-actions #shopping-manage-suppliers-btn:hover {
  background: #e9effa;
  border-color: #dbe4f2;
}

.shopping-export {
  position: relative;
  display: inline-flex;
}

.shopping-export .export-caret {
  margin-left: 6px;
  font-size: 0.8rem;
}

.shopping-export-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

.shopping-export.is-open .shopping-export-menu {
  display: grid;
  gap: 6px;
}

.shopping-export-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.shopping-export-item i {
  color: #64748b;
  width: 18px;
  text-align: center;
}

.shopping-export-item .fa-whatsapp {
  font-size: 1.2em;
}

.shopping-export-item:hover {
  background: #f1f5ff;
}

.shopping-export-item.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.shopping-export-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.shopping-export-submenu-wrap {
  position: relative;
}

.shopping-export-item.has-submenu {
  justify-content: space-between;
}

.shopping-export-item .submenu-caret {
  margin-left: auto;
  font-size: 0.75rem;
  color: #94a3b8;
}

.shopping-export-submenu {
  position: absolute;
  top: 0;
  right: 100%;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: none;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  z-index: 21;
  max-height: 240px;
  overflow-y: auto;
}

.shopping-export-submenu-wrap:hover .shopping-export-submenu {
  display: grid;
  gap: 4px;
}

.shopping-export-submenu-wrap.is-open .shopping-export-submenu {
  display: grid;
  gap: 4px;
}

.shopping-export-supplier {
  border: none;
  background: #f8fafc;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.shopping-export-supplier:hover {
  background: #e0f2fe;
}

.shopping-export-supplier.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.shopping-export-count {
  font-size: 0.75rem;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
}

.supplier-drawer-header .drawer-title i {
  color: #2563eb;
}

.supplier-drawer-header {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.supplier-drawer-header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.supplier-drawer-header .drawer-close {
  margin-left: 8px;
}

.supplier-new-btn {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(34, 197, 94, 0.25);
  margin-left: auto;
}

.supplier-new-btn:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.supplier-list {
  display: grid;
  gap: 12px;
}

.supplier-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.supplier-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.supplier-card-actions {
  display: inline-flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.supplier-card:hover .supplier-card-actions {
  opacity: 1;
  pointer-events: auto;
}

.icon-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: #64748b;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: #94a3b8;
  color: #1d4ed8;
}

.icon-btn.danger {
  color: #ef4444;
  border-color: #fecaca;
  background: #fff1f2;
}

.icon-btn.danger:hover {
  color: #dc2626;
  border-color: #fca5a5;
}

.supplier-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
}

.supplier-card-body {
  display: grid;
  gap: 4px;
}

.supplier-card-name {
  font-weight: 700;
  color: var(--text-main);
}

.supplier-card-meta {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.supplier-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.supplier-card-meta i {
  color: #94a3b8;
}

.supplier-form {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: grid;
  gap: 12px;
}

.supplier-form.hidden {
  display: none;
}

.supplier-form-header {
  display: grid;
  gap: 4px;
}

.supplier-form-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.supplier-form-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.input-with-icon .form-input {
  padding-left: 38px;
}

.supplier-form-actions {
  margin-top: 6px;
}

.supplier-form-actions .supplier-inline-delete {
  margin-left: auto;
}

.supplier-inline-form {
  margin: 4px 0 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  display: grid;
  gap: 12px;
}

.shopping-section-title {
  font-weight: 700;
  color: var(--text-main);
}

.shopping-section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shopping-list-grid {
  display: grid;
  gap: 12px;
}

.shopping-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
  display: grid;
  gap: 3px;
}

.shopping-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
}

.shopping-group-meta {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.shopping-group-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.shopping-group-supplier-wrap {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.shopping-group-supplier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 700;
}

.shopping-group-supplier-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
}

.shopping-group-total {
  margin-left: auto;
  font-weight: 500;
  font-size: 0.85rem;
  color: #64748b;
}

.shopping-group-toggle {
  margin-left: 10px;
}

.shopping-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 0;
  margin-top: 0;
  margin-bottom: 8px;
  color: #475569;
  font-weight: 600;
}

.shopping-category-count {
  font-size: 0.8rem;
  color: #64748b;
}

.shopping-category-header + .shopping-item {
  margin-top: 6px;
}

.shopping-item + .shopping-category-header {
  margin-top: 12px;
}

.shopping-group.is-collapsed .shopping-group-items {
  display: none;
}

.shopping-group.is-collapsed .shopping-group-toggle i {
  transform: rotate(180deg);
}

.shopping-item {
  display: grid;
  grid-template-columns: auto 1.4fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.shopping-item-grouped {
  border-radius: 0;
}

.shopping-item-grouped.is-first {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.shopping-item-grouped.is-last {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.shopping-item-grouped.is-middle,
.shopping-item-grouped.is-last {
  border-top: 0;
}

.shopping-item:hover {
  border-color: #cbd5f5;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.shopping-item.is-forecast-change {
  border-color: #fcd34d;
  background: #fff7ed;
}

.shopping-item.is-forecast-change:hover {
  border-color: #fbbf24;
  background: #ffedd5;
}

.shopping-item-check {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  display: grid;
  place-items: center;
  color: #16a34a;
  background: #ffffff;
}

.shopping-item.is-done .shopping-item-check {
  border-color: #16a34a;
  background: #dcfce7;
}

.shopping-item-check i {
  font-size: 0.7rem;
  opacity: 0;
}

.shopping-item.is-done .shopping-item-check i {
  opacity: 1;
}

.shopping-item-info {
  display: grid;
  gap: 4px;
}

.shopping-item-name {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  font-weight: 700;
  color: var(--text-main);
  position: relative;
}

.shopping-item.is-strike-anim {
  animation: shoppingStrikeRow 240ms ease-out forwards;
}

.shopping-item.is-strike-anim .shopping-item-check {
  border-color: #16a34a;
  background: #dcfce7;
}

.shopping-item.is-strike-anim .shopping-item-check i {
  opacity: 1;
}

.shopping-item.is-strike-anim .shopping-item-name::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  top: 52%;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
  transform: scaleX(0);
  transform-origin: left center;
  animation: shoppingStrikeLine 240ms ease-out forwards;
}

.shopping-item.is-strike-anim .shopping-item-final::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  top: 52%;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
  transform: scaleX(0);
  transform-origin: left center;
  animation: shoppingStrikeLine 240ms ease-out forwards;
}

.shopping-item-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shopping-item-qty {
  text-align: right;
  display: grid;
  gap: 4px;
}

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

.shopping-item-actions .ingredient-inline-icon {
  width: 32px;
  height: 32px;
}

.shopping-item-actions .ingredient-inline-icon:not(.cancel):not(.save):hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.shopping-item-actions .ingredient-inline-icon:not(.cancel):not(.save):active {
  color: #1d4ed8;
  border-color: #93c5fd;
  background: #dbeafe;
  transform: translateY(1px);
}

.shopping-item-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.shopping-qty-input {
  width: 90px;
  text-align: right;
}

.shopping-qty-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.shopping-qty-input[type="number"]::-webkit-outer-spin-button,
.shopping-qty-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shopping-item-unit {
  font-weight: 600;
  color: var(--text-muted);
}

.shopping-item-final {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  position: relative;
  justify-self: end;
  white-space: nowrap;
  font-weight: 700;
  color: var(--text-main);
}

.shopping-item-delta {
  font-weight: 650;
  font-size: 0.84em;
}

.shopping-item-delta.is-positive {
  color: #2563eb;
}

.shopping-item-delta.is-negative {
  color: #dc2626;
}

.shopping-item-price {
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
}

.shopping-item.is-done {
  background: #f8fafc;
  color: #94a3b8;
}

.shopping-item.is-done .shopping-item-name {
  text-decoration: line-through;
  color: #94a3b8;
}

.shopping-item.is-done .shopping-item-price {
  color: #94a3b8;
  text-decoration: line-through;
}

.shopping-item.is-done .shopping-item-final {
  color: #94a3b8;
  text-decoration: line-through;
}

.shopping-section.is-done .shopping-group {
  background: #f8fafc;
}

@keyframes shoppingStrikeLine {
  from {
    transform: scaleX(0);
    opacity: 0.5;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes shoppingStrikeRow {
  from {
    background: #ffffff;
  }
  to {
    background: #f8fafc;
  }
}

.shopping-add {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr auto;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  margin-bottom: 16px;
}

.shopping-add-title {
  font-weight: 700;
  color: var(--text-main);
}

.shopping-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 14px;
}

.shopping-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
}

.rules-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.rules-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rules-grid input {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.shopping-dish-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.shopping-list {
  display: grid;
  gap: 10px;
}

.email-draft {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.email-controls,
.email-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.email-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.supplier-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.supplier-controls .select-styled {
  flex: 1;
}

.email-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.email-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.email-preview textarea {
  min-height: 180px;
  resize: vertical;
}

.email-preview-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 20px;
}

.shopping-list[data-mode="flat"] .smart-only {
  display: none;
}

.shopping-list[data-mode="flat"] .shopping-row {
  grid-template-columns: 1.4fr 0.85fr 0.75fr 0.8fr 0.85fr 40px 40px;
}

.shopping-list[data-mode="smart"] .shopping-row {
  grid-template-columns: 1.4fr 0.7fr 0.65fr 0.65fr 0.7fr 0.75fr 40px 40px;
}

.shopping-list[data-mode="flat"] .shopping-header span.smart-only {
  display: none;
}

.shopping-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.65fr 0.65fr 0.7fr 0.75fr 40px 40px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  transition: all 0.2s;
  cursor: pointer;
}

.shopping-header {
  font-weight: 700;
  color: var(--text-muted);
  cursor: default;
  background: #f8fafc;
  border-style: dashed;
}

.shopping-header span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

.shopping-header:hover {
  background: #f8fafc;
}

.shopping-supplier-header {
  background: #f1f5f9;
  border-style: solid;
  color: #475569;
  font-weight: 700;
}

.shopping-supplier-header i {
  margin-right: 8px;
  color: #94a3b8;
}

.shopping-supplier-header:hover {
  background: #f1f5f9;
}

.ingredient-price-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ingredient-price-add {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f9fafb;
  padding: 15px;
  display: grid;
  gap: 14px;
  margin: 12px 0 16px;
  box-shadow: var(--shadow);
}

.ingredient-price-add-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ingredient-price-add-toolbar.is-hidden {
  display: none;
}

.ingredient-price-add-toolbar .ingredient-toolbar-field {
  flex: 1 1 220px;
}

.ingredient-price-add-toolbar .ingredient-toolbar-field.ingredient-toolbar-search {
  flex: 0 1 220px;
  max-width: 220px;
}

.ingredient-price-add-toolbar .ingredient-price-search {
  width: 100%;
}

.overview-search-field .form-input {
  width: 248px;
}

.ingredient-price-add-toolbar .ingredient-filter-select {
  width: 100%;
  min-width: 0;
}

.ingredient-price-add-toolbar .ingredient-toolbar-field i {
  color: #64748b;
  font-size: 1rem;
}

.ingredient-price-add-toolbar .ingredient-toolbar-supplier {
  margin-left: 0;
}

.ingredient-price-toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ingredient-price-add-toolbar .ingredient-toolbar-field:not(.ingredient-toolbar-search) {
  flex: 0 1 200px;
  max-width: 200px;
}

.ingredient-price-add-head {
  display: grid;
  gap: 4px;
}

.ingredient-price-add-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.ingredient-field {
  display: grid;
  gap: 6px;
}

.ingredient-field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}

.ingredient-input,
.ingredient-select {
  background: #ffffff;
  border-radius: 12px;
  border-color: #dbe4f2;
  font-weight: 600;
  color: var(--text-main);
}

@media (max-width: 960px) {
  .ingredient-price-add-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.ingredient-price-header-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ingredient-toolbar-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ingredient-toolbar-field i {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.ingredient-toolbar-field .form-input,
.ingredient-toolbar-field .select-styled {
  padding-left: 36px;
  min-width: 200px;
  height: 38px;
}

.ingredient-price-search {
  width: 220px;
}

.dish-search-field .form-input {
  width: 240px;
}

.ingredient-filter-select {
  min-width: 160px;
}

.ingredient-price-table th:nth-child(1),
.ingredient-price-table td:nth-child(1) {
  width: 15%;
}

.ingredient-price-table th:nth-child(2),
.ingredient-price-table td:nth-child(2) {
  width: 14%;
}

.ingredient-price-table th:nth-child(3),
.ingredient-price-table td:nth-child(3) {
  width: 10%;
}

.ingredient-price-table th:nth-child(4),
.ingredient-price-table td:nth-child(4) {
  width: 9%;
}

.ingredient-price-table th:nth-child(5),
.ingredient-price-table td:nth-child(5) {
  width: 12%;
}

.ingredient-price-table th:nth-child(6),
.ingredient-price-table td:nth-child(6) {
  width: 13%;
  text-align: right;
}

.ingredient-price-table th:nth-child(7),
.ingredient-price-table td:nth-child(7) {
  width: 19%;
}

.ingredient-price-table th:nth-child(8),
.ingredient-price-table td:nth-child(8) {
  width: 120px;
  min-width: 120px;
}

.ingredient-price-table th,
.ingredient-price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}

.ingredient-price-table tbody tr:hover {
  background: #f8fafc;
}

.ingredient-price-table tbody tr {
  transition: background 0.2s ease;
}

.ingredient-price-table thead th {
  background: #f8fafc;
}

.ingredient-price-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: normal;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  cursor: default;
}

.ingredient-price-table th.ingredient-price-actions {
  cursor: default;
}

.ingredient-price-table th.ingredient-price-actions,
.ingredient-price-table td.ingredient-price-actions {
  text-align: right;
  padding-left: 8px;
  padding-right: 12px;
}

.ingredient-price-table th[data-ingredient-sort] {
  cursor: pointer;
}

.ingredient-price-table td:nth-child(4),
.ingredient-price-table td:nth-child(5),
.ingredient-price-table td:nth-child(6),
.ingredient-price-table th:nth-child(2),
.ingredient-price-table th:nth-child(3),
.ingredient-price-table th:nth-child(4),
.ingredient-price-table th:nth-child(5),
.ingredient-price-table th:nth-child(6),
.ingredient-price-table th:nth-child(7),
.ingredient-price-table td:nth-child(2),
.ingredient-price-table td:nth-child(3),
.ingredient-price-table td:nth-child(4),
.ingredient-price-table td:nth-child(5),
.ingredient-price-table td:nth-child(6),
.ingredient-price-table td:nth-child(7) {
  text-align: center;
}

.ingredient-price-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ingredient-price-row input:disabled {
  background: transparent;
  border-color: transparent;
  color: var(--text-main);
  box-shadow: none;
  padding-left: 0;
}

.ingredient-price-row td:first-child {
  font-weight: 700;
}

.ingredient-price-currency {
  font-weight: 600;
  color: var(--text-main);
}

.ingredient-price-row select:disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
}

.ingredient-price-unit select {
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #475569;
}

.ingredient-unit-select[data-unit="kg"],
.ingredient-unit-select[data-unit="g"],
.ingredient-unit-select[data-unit="l"],
.ingredient-unit-select[data-unit="ml"],
.ingredient-unit-select[data-unit="pieces"] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.ingredient-price-value {
  font-weight: 600;
}

.ingredient-category-badge,
.ingredient-unit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid transparent;
  text-transform: capitalize;
}

.ingredient-category-badge[data-category="fleisch"] {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.ingredient-category-badge[data-category="fisch"] {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0284c7;
}

.ingredient-category-badge[data-category="gemuese"] {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #16a34a;
}

.ingredient-category-badge[data-category="obst"] {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #ea580c;
}

.ingredient-category-badge[data-category="getreide"] {
  background: #fef3c7;
  border-color: #fde68a;
  color: #a16207;
}

.ingredient-category-badge[data-category="milchprodukt"] {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.ingredient-category-badge[data-category="gewuerz"] {
  background: #ede9fe;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.ingredient-category-badge[data-category="sonstiges"] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.ingredient-unit-badge[data-unit="kg"],
.ingredient-unit-badge[data-unit="g"],
.ingredient-unit-badge[data-unit="l"],
.ingredient-unit-badge[data-unit="ml"],
.ingredient-unit-badge[data-unit="pieces"] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.ingredient-supplier {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 600;
}

.ingredient-supplier i {
  color: #94a3b8;
}

.ingredient-price-actions {
  text-align: right;
  white-space: nowrap;
  padding-right: 16px;
}

.ingredient-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 8px;
}

.ingredient-price-row.is-editing td {
  vertical-align: middle;
}

.ingredient-price-row.is-editing .ingredient-price-actions {
  text-align: right;
}

.ingredient-price-row.is-editing .ingredient-inline-btn {
  height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.ingredient-inline-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ingredient-inline-icon.cancel {
  color: #94a3b8;
}

.ingredient-inline-icon.cancel:hover {
  color: #ef4444;
  border-color: #fecaca;
  background: #fee2e2;
}

.ingredient-inline-icon.save {
  color: #2563eb;
}

.ingredient-inline-icon.save:hover {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #dcfce7;
}

.ingredient-name-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.ingredient-inline-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.ingredient-price-row.is-editing .ingredient-inline-input.has-duplicate {
  border-color: #fecaca;
  background: #fff1f2;
}

.ingredient-price-row.is-editing .ingredient-inline-input,
.ingredient-price-row.is-editing .ingredient-inline-select {
  height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
  max-width: 110px;
  min-width: 0;
  text-align: left;
}

.ingredient-price-row.is-editing .ingredient-inline-input {
  border-radius: 10px;
  max-width: 140px;
}

.ingredient-price-row.is-editing .ingredient-inline-select {
  min-width: 0;
  width: 100%;
}

.ingredient-price-row.is-editing .ingredient-category-select {
  max-width: 150px;
}

.ingredient-price-row.is-editing .ingredient-unit-select {
  max-width: 100px;
}

.ingredient-price-row.is-editing td:nth-child(2) .ingredient-inline-select,
.ingredient-price-row.is-editing td:nth-child(3) .ingredient-inline-select,
.ingredient-price-row.is-editing td:nth-child(4) .ingredient-inline-input,
.ingredient-price-row.is-editing td:nth-child(5) .ingredient-inline-input {
  text-align: center;
}

.ingredient-price-row.is-editing td:nth-child(7) .ingredient-inline-select {
  max-width: 220px;
  text-align: center;
}


 

.ingredient-price-row.is-editing .ingredient-category-select {
  border-radius: 999px;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="fleisch"] {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="fisch"] {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0284c7;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="gemuese"] {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #16a34a;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="obst"] {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #ea580c;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="getreide"] {
  background: #fef3c7;
  border-color: #fde68a;
  color: #a16207;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="milchprodukt"] {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="gewuerz"] {
  background: #ede9fe;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.ingredient-price-row.is-editing .ingredient-category-select[data-category="sonstiges"] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.shopping-inline-grid .ingredient-category-select {
  border-radius: 999px;
}

.shopping-inline-grid .ingredient-category-select[data-category="fleisch"] {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.shopping-inline-grid .ingredient-category-select[data-category="fisch"] {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0284c7;
}

.shopping-inline-grid .ingredient-category-select[data-category="gemuese"] {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #16a34a;
}

.shopping-inline-grid .ingredient-category-select[data-category="obst"] {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #ea580c;
}

.shopping-inline-grid .ingredient-category-select[data-category="getreide"] {
  background: #fef3c7;
  border-color: #fde68a;
  color: #a16207;
}

.shopping-inline-grid .ingredient-category-select[data-category="milchprodukt"] {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.shopping-inline-grid .ingredient-category-select[data-category="gewuerz"] {
  background: #ede9fe;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.shopping-inline-grid .ingredient-category-select[data-category="sonstiges"] {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.ingredient-price-row.is-editing .ingredient-inline-input:focus,
.ingredient-price-row.is-editing .ingredient-inline-select:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  border-color: #93c5fd;
}

.ingredient-inline-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
}

.ingredient-action {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}

.ingredient-action.edit:hover {
  color: #2563eb;
  background: #e0edff;
}

.ingredient-action.delete:hover {
  color: #ef4444;
  background: #fee2e2;
}

.ingredient-price-row:hover .ingredient-action,
.ingredient-price-row.is-editing .ingredient-action {
  opacity: 1;
  pointer-events: auto;
}

.shopping-row:hover {
  border-color: #c7d6ef;
  box-shadow: 0 6px 14px rgba(30, 64, 175, 0.08);
}

.shopping-price {
  font-weight: 600;
  color: var(--text-main);
}

.shopping-remove {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.shopping-exclude {
  border: none;
  background: #eef2f7;
  color: #64748b;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-weight: 700;
}

.shopping-exclude.active {
  background: #fee2e2;
  color: #b91c1c;
}

.shopping-tolerance {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tolerance-auto {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.ingredient-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ingredient-meta select {
  min-width: 140px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.critical-toggle {
  border: none;
  background: #fef3c7;
  color: #92400e;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.critical-toggle.active {
  background: #fde68a;
  color: #92400e;
}

.shopping-remove:hover {
  background: #eef2f7;
  color: #ef4444;
}

.shopping-row.checked {
  opacity: 0.4;
  text-decoration: line-through;
  background: #f3f6fb;
}

.amount-pill {
  background: #ecfdf5;
  color: #059669;
  font-family: monospace;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 1rem;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.designer-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.designer-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #e7efff;
  color: #2b60d0;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.designer-header-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.designer-header-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.designer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.designer-panel {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.designer-panel-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: #f4f7fb;
}

.designer-panel-body {
  padding: 16px;
  display: grid;
  gap: 16px;
  flex: 1;
  min-height: 0;
  max-height: calc(100dvh - 210px);
  overflow-y: auto;
}

.designer-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #f3f6fb;
  border: 1px solid #dbe4f2;
  padding: 6px;
  border-radius: 14px;
}

.recipes-tabs {
  margin-bottom: 18px;
}

.recipes-segmented {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f3f6fb;
  border-color: #dbe4f2;
}

.recipes-tab-panel {
  animation: fadeUp 0.25s ease-out;
  width: 100%;
  margin: 0;
  justify-self: stretch;
  grid-column: 1 / -1;
}

.recipes-tab-panels {
  width: 100%;
  position: relative;
  clear: both;
}

.recipes-segmented .designer-segment {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  text-align: center;
  justify-content: center;
  padding: 10px 14px;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.recipes-segmented .designer-segment::before {
  display: none;
}

.recipes-segmented .designer-segment:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px #dbe4f2;
}

.recipes-segmented .designer-segment.is-active:hover {
  background: #e8f0ff;
  color: #2f6fed;
  box-shadow: none;
}

.recipes-segmented .designer-segment.is-active {
  background: #e8f0ff;
  color: #2f6fed;
  font-weight: 700;
  box-shadow: none;
}

.recipes-segmented .designer-segment.is-active::before {
  display: none;
}

.designer-segmented:not(.recipes-segmented) .designer-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 46px;
  color: var(--text-main);
  box-shadow: none;
}

.designer-segmented:not(.recipes-segmented) .designer-segment:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px #dbe4f2;
}

.designer-segmented:not(.recipes-segmented) .designer-segment.is-active {
  background: #e8f0ff;
  color: #2f6fed;
  font-weight: 700;
  box-shadow: none;
}

.designer-segmented:not(.recipes-segmented) .designer-segment.is-active:hover {
  background: #e8f0ff;
  color: #2f6fed;
  box-shadow: none;
}

.designer-segment {
  border: none;
  background: transparent;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 1.02rem;
}

.designer-segment:hover {
  background: #f9fafb;
  color: #2563eb;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.15);
}

.designer-segment.is-active:hover {
  background: #e0ecff;
  color: #1e40af;
}

.designer-segment.is-active {
  background: #e0ecff;
  color: #1e40af;
}

.designer-view-panel {
  display: grid;
  gap: 16px;
}

.designer-view-panel.hidden {
  display: none;
}

.designer-preset-list {
  display: grid;
  gap: 12px;
}

.designer-preset-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.designer-preset-item.is-active {
  border-color: #2b60d0;
  box-shadow: 0 16px 32px rgba(43, 96, 208, 0.16);
}

.designer-preset-select {
  appearance: none;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  cursor: pointer;
}

.designer-preset-swatches {
  display: flex;
  gap: 4px;
}

.designer-preset-swatch {
  width: 18px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.designer-preset-text {
  display: grid;
  gap: 4px;
}

.designer-preset-title {
  font-weight: 600;
  color: var(--text-main);
}

.designer-preset-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.designer-preset-delete {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex-shrink: 0;
}

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

.designer-preset-item-actions .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.designer-preset-actions {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.designer-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #ffffff 32%);
}

.designer-actions-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.designer-actions #designer-cancel-btn,
.designer-actions #designer-save-btn {
  min-height: 36px;
  padding-block: 6px;
}

.designer-sync-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #dbe5f1;
  background: #f8fbff;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.designer-sync-status.is-saving {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.designer-sync-status.is-saved {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.designer-sync-status.is-dirty {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.designer-sync-status.is-error {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.designer-preset-save-btn {
  min-height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.03rem;
  font-weight: 700;
}

.designer-section {
  border-radius: 18px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  overflow: hidden;
}

.designer-section-toggle {
  width: 100%;
  border: none;
  background: #f8fafc;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  transition: background 0.2s ease;
}

.designer-section-toggle:hover {
  background: #f1f5f9;
}

.designer-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(0.92rem, 0.28vw + 0.88rem, 1.03rem);
  line-height: 1.25;
}

.designer-section-title i {
  color: #111827;
  width: 16px;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.9;
}

.designer-chevron {
  color: #111827;
  font-size: 0.82rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.designer-section:not(.is-collapsed) .designer-chevron {
  transform: rotate(180deg);
}

.designer-section-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
  border-top: 1px solid #d5dde9;
}

.designer-section.is-collapsed .designer-section-body {
  display: none;
}

.designer-section .form-group {
  margin-bottom: 0;
}

.designer-section .form-label {
  font-size: 1.03rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 10px;
}

.designer-brand-input {
  height: 52px;
  border-radius: 14px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.designer-upload {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.designer-logo-preview {
  width: var(--designer-logo-preview-width, 64px);
  height: var(--designer-logo-preview-height, 64px);
  border-radius: var(--designer-logo-preview-radius, 16px);
  border: 2px dashed #d5dde9;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: width 0.18s ease, height 0.18s ease, border-radius 0.18s ease;
}

.designer-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.designer-logo-preview.has-custom-logo img {
  width: auto;
  height: auto;
  max-width: 64px;
  max-height: 64px;
}

.designer-logo-placeholder {
  font-size: 24px;
  color: #64748b;
}

.designer-upload-actions {
  display: grid;
  gap: 8px;
}

.designer-logo-controls {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.designer-logo-shape-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.designer-logo-size-group {
  gap: 8px;
}

.designer-logo-size-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.designer-logo-size-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}

.designer-logo-size-slider {
  width: 100%;
  accent-color: #3f7fe0;
}

.designer-upload-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.03rem;
  font-weight: 700;
}

.designer-upload-btn:hover {
  background: #f1f5f9;
}

.designer-remove-btn {
  justify-self: end;
  min-height: 36px;
  border-radius: 10px;
  font-size: 0.9rem;
  border: 1px solid #d5dde9;
  background: #ffffff;
}

#designer-logo-remove {
  margin-top: 10px;
}

#designer-logo-remove:hover,
#designer-logo-remove:focus-visible {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.hidden-input {
  display: none;
}

.designer-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.designer-color-grid-single {
  grid-template-columns: 1fr;
  gap: 18px;
}

.designer-color-item {
  display: grid;
  gap: 8px;
}

.designer-color-input {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.designer-color-input input[type="color"] {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid #d5dde9;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.designer-color-input input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.designer-color-input input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 14px;
}

.designer-color-input input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 14px;
}

.designer-color-input .form-input {
  height: 52px;
  border-radius: 14px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  font-size: 1.02rem;
  color: #1f2937;
  letter-spacing: 0.01em;
}

.designer-color-hint {
  margin-left: 64px;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.35;
}

.designer-section-typography .designer-section-title i {
  width: 16px;
  font-size: 0.9rem;
}

.designer-section-typography .designer-chevron {
  font-size: 0.82rem;
}

.designer-section-typography .designer-section-body {
  padding-top: 18px;
  gap: 18px;
}

.designer-section-typography .form-group {
  margin-bottom: 0;
}

.designer-select-wrap {
  position: relative;
}

.designer-select-wrap .form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 54px;
  border-radius: 14px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  font-size: 1.04rem;
  color: #111827;
  padding-right: 42px;
}

.designer-select-wrap .form-input::-ms-expand {
  display: none;
}

.designer-select-wrap i {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 0.92rem;
  pointer-events: none;
}

.designer-section-background .designer-section-body {
  gap: 14px;
}

.designer-bg-shapes-toggle {
  margin-top: -2px;
}

.designer-bg-shapes-toggle .settings-toggle-label {
  font-size: 0.9rem;
}

.designer-bg-shapes-toggle .settings-toggle-hint {
  margin-top: 4px;
  margin-left: 28px;
}

.designer-bg-decor-style-group {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.designer-bg-decor-style-group.is-disabled {
  opacity: 0.55;
}

.designer-bg-decor-color-group.is-disabled {
  opacity: 0.55;
}

.designer-background-field {
  display: grid;
  gap: 12px;
}

.designer-background-field.hidden {
  display: none;
}

.designer-option-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.designer-option {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.designer-option.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e40af;
}

.designer-section-ui .designer-section-title i {
  width: 16px;
  font-size: 0.9rem;
}

.designer-section-ui .designer-section-body {
  padding-top: 16px;
  gap: 16px;
}

.designer-section-ui .form-group {
  margin-bottom: 0;
}

.designer-section-ui .form-label {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.designer-section-ui .designer-option-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.designer-section-ui .designer-option {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 700;
}

.designer-section-ui .designer-option.is-active {
  border-color: #3f7fe0;
  background: #3f7fe0;
  color: #ffffff;
}

.designer-preview {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 18px;
  max-width: none;
  width: 100%;
  justify-self: end;
}

.designer-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.designer-preview-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.designer-preview-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.designer-preview-tabs {
  display: flex;
  gap: 6px;
  background: #f3f6fb;
  border: 1px solid #dbe4f2;
  padding: 4px;
  border-radius: 12px;
}

.designer-preview-tab {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: 10px;
  cursor: pointer;
}

.designer-preview-tab:hover {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: inset 0 0 0 1px #dbe4f2;
}

.designer-preview-tab.is-active {
  background: #e8f0ff;
  color: #2f6fed;
  box-shadow: none;
}

.designer-preview-tab.is-active:hover {
  background: #e8f0ff;
  color: #2f6fed;
  box-shadow: none;
}

.designer-preview-frame {
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 14px;
  background: #f6f8fc;
  display: flex;
  justify-content: center;
}

.designer-preview-viewport {
  width: min(430px, 100%);
  aspect-ratio: 430 / 932;
  border-radius: 30px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.designer-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.designer-preview-shell {
  width: min(326px, 100%);
  aspect-ratio: 430 / 932;
  border-radius: 30px;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--app-font-body, "Avenir", "Trebuchet MS", "Gill Sans", sans-serif);
  color: var(--app-text, #2c3b4f);
  background-image: linear-gradient(180deg, var(--app-bg-top, #c4d6eb), var(--app-bg-bottom, #dde2f5));
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.designer-preview-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  opacity: 0.7;
}

.designer-preview-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.designer-preview-signal {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(44, 59, 79, 0.4) 0 25%, rgba(44, 59, 79, 0.15) 25% 50%, rgba(44, 59, 79, 0.4) 50% 75%, rgba(44, 59, 79, 0.15) 75% 100%);
}

.designer-preview-battery {
  width: 18px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(44, 59, 79, 0.4);
  position: relative;
}

.designer-preview-battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: rgba(44, 59, 79, 0.4);
  border-radius: 2px;
}

.designer-preview-hero {
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding-top: 2px;
}

.designer-preview-logo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.designer-preview-mark {
  position: relative;
  width: 36px;
  height: 36px;
}

.designer-preview-mountain {
  position: absolute;
  bottom: 6px;
  left: 4px;
  width: 26px;
  height: 16px;
  background: var(--app-accent, #c88a4a);
  border-radius: 6px 6px 4px 4px;
  transform: skewX(-12deg);
}

.designer-preview-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--app-accent, #c88a4a);
  border-radius: 50%;
}

.designer-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.designer-preview-title-text {
  font-family: var(--app-font-display, "Bodoni MT", "Didot", "Times New Roman", serif);
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text, #2c3b4f);
  line-height: 1.2;
}

.designer-preview-sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
}

.designer-preview-main {
  position: relative;
  flex: 1;
  min-height: 0;
}

.designer-preview-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.designer-preview-screen.hidden {
  display: none;
}

.designer-preview-screen[data-preview-screen="welcome"] {
  justify-content: center;
  align-items: center;
}

.designer-preview-screen[data-preview-screen="order"] {
  justify-content: flex-start;
  align-items: stretch;
  padding-top: 2px;
}

.designer-preview-screen[data-preview-screen="thankyou"] {
  justify-content: center;
  align-items: center;
}

.designer-preview-shell.is-confirm .designer-preview-hero {
  display: none;
}

.designer-preview-shell.is-confirm .designer-preview-main {
  padding-top: 4px;
}

.designer-preview-setup-panel {
  display: grid;
  gap: 14px;
  justify-items: center;
  align-self: center;
  text-align: center;
  width: min(232px, 92%);
  padding: 16px 8px 4px;
}

.designer-preview-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--app-card-radius, 16px);
  padding: 12px;
  border: var(--app-card-border, 1px solid rgba(44, 59, 79, 0.08));
  box-shadow: var(--app-card-shadow, 0 16px 32px rgba(44, 59, 79, 0.12));
  display: grid;
  gap: 10px;
  color: var(--app-text, #2c3b4f);
}

.designer-preview-center {
  text-align: center;
  justify-items: center;
}

.designer-preview-welcome {
  font-family: var(--app-font-display, "Bodoni MT", "Didot", "Times New Roman", serif);
  font-size: 21px;
  line-height: 1.2;
}

.designer-preview-button {
  background: var(--app-primary, #2c3b4f);
  color: #ffffff;
  border: none;
  border-radius: var(--app-button-radius, 999px);
  padding: 12px 18px;
  min-height: 40px;
  min-width: 176px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.designer-preview-secondary-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--app-primary, #2c3b4f);
  border: var(--app-card-border, 1px solid rgba(44, 59, 79, 0.12));
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 12px;
  min-width: 190px;
}

.designer-preview-submit {
  background: var(--app-primary, #2c3b4f);
  color: #ffffff;
  border: none;
  border-radius: var(--app-button-radius, 999px);
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  width: 100%;
  min-height: 42px;
}

.designer-preview-section {
  font-weight: 600;
  font-size: 12px;
  color: var(--app-text, #2c3b4f);
}

.designer-preview-pill,
.designer-preview-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(44, 59, 79, 0.08);
  font-size: 11px;
  color: var(--app-text, #2c3b4f);
  margin-right: 6px;
}

.designer-preview-pill {
  font-weight: 600;
}

.designer-preview-confirm-panel {
  text-align: center;
  padding: 28px 16px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--app-card-radius, 16px);
  border: var(--app-card-border, 1px solid rgba(44, 59, 79, 0.08));
  box-shadow: var(--app-card-shadow, 0 16px 32px rgba(44, 59, 79, 0.12));
  width: min(236px, 94%);
  display: grid;
  justify-items: center;
  gap: 10px;
}

.designer-preview-confirm-logo,
.designer-preview-confirm-logo-image {
  width: 58px;
  height: 58px;
}

.designer-preview-confirm-logo {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  position: relative;
}

.designer-preview-confirm-logo-image {
  object-fit: contain;
}

.designer-preview-confirm-brand {
  margin-top: 2px;
  font-family: var(--app-font-display, "Bodoni MT", "Didot", "Times New Roman", serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text, #2c3b4f);
}

.designer-preview-confirm-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--app-accent, #c88a4a);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.designer-preview-thankyou {
  font-size: 18px;
  margin: 0;
}

.designer-preview-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.8;
}

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

  .designer-panel-body {
    max-height: none;
    overflow-y: visible;
  }

  .designer-actions {
    position: static;
    flex-wrap: wrap;
  }

  .designer-actions-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  .designer-preview {
    position: static;
  }

  .designer-preset-actions {
    grid-template-columns: 1fr;
  }

  .designer-segmented:not(.recipes-segmented) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .designer-section-ui .designer-option-group {
    grid-template-columns: 1fr;
  }

  .designer-upload {
    grid-template-columns: 1fr;
  }

  .designer-remove-btn {
    justify-self: start;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 600px;
  max-width: 95%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
  animation: popIn 0.2s;
}

.settings-drawer {
  width: min(420px, 100%);
}

.settings-drawer-body {
  padding-right: 4px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-drawer .settings-actions {
  margin-top: 0;
}

.settings-support-card {
  margin-top: auto;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe4f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 10px;
}

.settings-support-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-support-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.settings-support-brand {
  min-width: 0;
}

.settings-support-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.settings-support-role {
  margin: 2px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.settings-support-copy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #475569;
}

.settings-support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.settings-support-link:hover {
  color: #1e40af;
  opacity: 0.92;
}

.settings-support-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .settings-support-card {
    margin-bottom: 10px;
  }

  .settings-support-logo {
    width: 46px;
    height: 46px;
  }
}

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

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #f2f5fb;
  color: #64748b;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.modal-close:hover {
  background: #e5ebf5;
  color: #1f2937;
}

.settings-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 18px 0;
}

.designer-guest-panel {
  border-radius: 16px;
  border: 1px solid #d5dde9;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.designer-guest-panel .settings-section-title {
  font-size: 1.02rem;
  margin-bottom: 2px;
}

.designer-guest-panel .settings-section-hint {
  margin-bottom: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.designer-guest-panel .form-group {
  margin-bottom: 0;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.settings-section-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.settings-textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-stack);
}

.settings-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.settings-color-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-weight: 600;
  color: var(--text-main);
}

.settings-color-name {
  font-size: 0.9rem;
}

.settings-color-input {
  width: 44px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.settings-color-input::-webkit-color-swatch,
.settings-color-input::-webkit-color-swatch-wrapper {
  border: none;
  border-radius: 999px;
  padding: 0;
}

.settings-color-input::-moz-color-swatch {
  border: none;
  border-radius: 999px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.settings-toggle-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-toggle-hint {
  margin-top: 5px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.settings-allergen-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.settings-allergen-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: 0.2s;
}

.settings-allergen-item:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  min-width: 0;
}

.settings-checkbox > input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.settings-allergen-text {
  word-break: break-word;
}

.settings-allergen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-allergen-action[data-action="save"] {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.settings-allergen-action[data-action="save"]:hover {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #dcfce7;
}

.settings-allergen-action[data-action="cancel"] {
  color: #ef4444;
  border-color: #fecaca;
  background: #fff1f2;
}

.settings-allergen-action[data-action="cancel"]:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fee2e2;
}

.settings-allergen-content {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.settings-allergen-edit {
  display: grid;
  gap: 6px;
}

.settings-allergen-edit-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: center;
}

.settings-allergen-lang {
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
}

.settings-allergen-edit-input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 10px 12px;
  font-weight: 600;
}

.settings-allergen-add {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.settings-allergen-field {
  display: grid;
  gap: 4px;
}

.settings-allergen-add-btn {
  height: 40px;
  align-self: end;
}

.settings-allergen-empty {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .settings-allergen-add {
    grid-template-columns: 1fr;
  }

  .settings-allergen-add-btn {
    width: 100%;
  }
}

.order-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.order-detail-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  min-width: 0;
}

.order-detail-name {
  color: var(--text-main);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.order-detail-qty {
  color: var(--text-muted);
  font-weight: 600;
}

.order-detail-note {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main);
}

.modal-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

#designer-preset-modal .modal-content {
  max-width: 460px;
  border: 1px solid #dbe4f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.designer-preset-name-input {
  height: 44px;
  border-radius: 12px;
  border-color: #cfdbf0;
  background: #ffffff;
}

.designer-preset-name-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  outline: none;
}

.designer-preset-error {
  margin-top: 6px;
  min-height: 18px;
  font-size: 0.84rem;
  color: var(--danger);
  display: none;
}

.designer-preset-error.is-visible {
  display: block;
}


#cycle-rename-modal .modal-content {
  max-width: 420px;
}

#cycle-rename-input {
  font-weight: 600;
}

.btn {
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.18);
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #f3f6fb;
  color: var(--text-main);
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  background: #e9effa;
}

.btn-secondary.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
}

.planner-edit-toggle {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
}

.planner-edit-toggle:hover {
  background: #2563eb;
}

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

  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .forecast-body {
    grid-template-columns: 1fr;
  }

  .shopping-add {
    grid-template-columns: 1fr;
  }

  .email-draft {
    grid-template-columns: 1fr;
  }

  .overview-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    flex-direction: column;
    padding: 16px 14px;
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .main-wrapper > header,
  .main-wrapper > .view-section {
    width: 100%;
  }
}
.forecast-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
  position: relative;
  z-index: 5;
  background: transparent;
  opacity: 1;
  mix-blend-mode: normal;
  display: block;
  margin-top: auto;
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.badge-new {
  animation: subtlePulse 2s ease-in-out 3;
}

/* Toast notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.toast-notification.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-success {
  background: #065f46;
}

/* Responsive + zoom hardening overrides */
.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: auto;
  min-width: 0;
}

.main-wrapper {
  margin-left: 0;
  width: auto;
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  padding-bottom: clamp(26px, 3vw, 40px);
}

.main-wrapper > header,
.main-wrapper > .view-section {
  width: min(100%, var(--content-max-width));
}

header {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
}

.header-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.header-copy {
  min-width: 0;
}

.header-actions {
  flex-wrap: wrap;
}

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.sidebar-overlay {
  display: none;
}

.dashboard-combined-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.dashboard-combined-actions {
  justify-self: center;
  max-width: 100%;
}

.dashboard-date-nav {
  width: clamp(210px, 24vw, 280px);
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
}

.dashboard-date-btn {
  width: clamp(2.2rem, 2.8vw, 2.625rem);
  height: clamp(2.2rem, 2.8vw, 2.625rem);
}

.dashboard-date-stack {
  min-width: 0;
  transform: none;
}

.calendar-layout {
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
}

.calendar-layout > div {
  min-width: 0;
}

.shopping-add {
  grid-template-columns: minmax(190px, 1.3fr) minmax(150px, 1fr) minmax(110px, 0.8fr) auto;
}

.shopping-list[data-mode="flat"] .shopping-row {
  grid-template-columns: minmax(200px, 1.4fr) minmax(96px, 0.85fr) minmax(88px, 0.75fr) minmax(88px, 0.8fr) minmax(96px, 0.85fr) 40px 40px;
}

.shopping-list[data-mode="smart"] .shopping-row {
  grid-template-columns: minmax(200px, 1.4fr) minmax(92px, 0.7fr) minmax(84px, 0.65fr) minmax(84px, 0.65fr) minmax(92px, 0.7fr) minmax(92px, 0.75fr) 40px 40px;
}

.shopping-row {
  grid-template-columns: minmax(200px, 1.4fr) minmax(92px, 0.7fr) minmax(84px, 0.65fr) minmax(84px, 0.65fr) minmax(92px, 0.7fr) minmax(92px, 0.75fr) 40px 40px;
}

.shopping-list {
  overflow-x: auto;
  padding-bottom: 4px;
}

.shopping-header,
.shopping-row {
  min-width: 860px;
}

.designer-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 40%);
}

.designer-panel-body {
  max-height: calc(100dvh - 210px);
}

.ingredient-price-header-tools {
  flex-wrap: wrap;
}

.ingredient-toolbar-field .form-input,
.ingredient-toolbar-field .select-styled {
  min-width: 0;
  width: clamp(180px, 22vw, 240px);
}

.ingredient-price-search,
.dish-search-field .form-input {
  width: clamp(190px, 24vw, 260px);
}

.modal-overlay {
  padding: clamp(14px, 2vw, 24px);
}

.modal-content {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
}

.drawer {
  width: min(440px, calc(100vw - 12px));
  height: 100dvh;
  max-height: 100dvh;
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 82vw);
    min-width: min(320px, 82vw);
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
    z-index: 130;
    visibility: hidden;
    pointer-events: none;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 180ms ease;
    z-index: 120;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  body.auth-ready.sidebar-open {
    overflow: hidden;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .main-wrapper {
    min-height: 100dvh;
    padding: clamp(14px, 2.2vw, 24px);
  }

  .main-wrapper > header,
  .main-wrapper > .view-section {
    width: 100%;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .cycle-palette {
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 220px);
    overflow-x: auto;
    align-items: stretch;
  }

  .shopping-add {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ingredient-price-header-tools {
    width: 100%;
  }

  .ingredient-toolbar-field {
    flex: 1 1 220px;
    min-width: 0;
  }

  .ingredient-price-search,
  .dish-search-field .form-input {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .sidebar {
    width: min(300px, 88vw);
    min-width: min(300px, 88vw);
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-combined-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-combined-actions {
    width: 100%;
    justify-self: auto;
    justify-content: center;
  }

  .dashboard-date-nav {
    width: min(100%, 280px);
    min-width: 220px;
    margin-inline: auto;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .dashboard-date-stack {
    min-width: 0;
  }

  .dashboard-course-grid {
    grid-template-columns: 1fr;
  }

  .shopping-add {
    grid-template-columns: 1fr;
  }

  /* shopping min-width entfernt — wird im Smartphone-Block korrekt behandelt */
}

@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .designer-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recipes-segmented {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .shopping-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shopping-overview-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════
   SMARTPHONE OPTIMIERUNG (≤767px)
   Variante A: Dashboard, Speiseplan, Einkaufsliste + Login/Settings
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* ─────────────────────────────────────────────
     1. BASE SHELL: Sidebar weg, Bottom-Nav rein
     ───────────────────────────────────────────── */
  .sidebar {
    display: none !important;
  }
  .sidebar-overlay {
    display: none !important;
  }
  .sidebar-toggle {
    display: none !important;
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 16px 18px calc(76px + env(safe-area-inset-bottom, 0)) 18px !important;
    padding-left: max(env(safe-area-inset-left, 0), 18px) !important;
    padding-right: max(env(safe-area-inset-right, 0), 18px) !important;
  }

  .main-wrapper > header,
  .main-wrapper > .view-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
  }

  /* ── Bottom Navigation ── */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--bg-card, #ffffff);
    border-top: 1px solid var(--border, #e6edf6);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 40; /* UNTER Drawers (60) und Modals (100) */
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease;
  }

  /* Bottom-Nav verstecken wenn Drawer oder Modal offen */
  body.mobile-overlay-open .mobile-bottom-nav {
    transform: translateY(100%);
    pointer-events: none;
  }

  .mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-muted, #6b7280);
    background: none;
    border: none;
    cursor: pointer;
    min-height: 48px;
    padding: 8px 2px 4px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
    font-family: var(--font-stack);
    position: relative;
  }

  .mobile-bottom-nav-item.active {
    color: var(--primary, #3b82f6);
  }

  .mobile-bottom-nav-item.active::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary, #3b82f6);
  }

  .mobile-bottom-nav-item i {
    font-size: 1.15rem;
  }

  .mobile-bottom-nav-item span {
    line-height: 1;
  }

  /* ── "Mehr"-Menü (Bottom Sheet) ── */
  .mobile-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
  }

  .mobile-more-sheet.open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
  }

  .mobile-more-panel {
    position: relative;
    background: var(--bg-card, #ffffff);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0));
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }

  .mobile-more-sheet.open .mobile-more-panel {
    transform: translateY(0);
  }

  .mobile-more-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px 14px;
    border-bottom: 1px solid var(--border, #e6edf6);
    margin-bottom: 6px;
  }

  .mobile-more-header span:first-child {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main, #1f2937);
  }

  .mobile-more-header span:last-child {
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
  }

  .mobile-more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border: none;
    background: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main, #1f2937);
    cursor: pointer;
    font-family: var(--font-stack);
    min-height: 48px;
    transition: background 0.12s;
  }

  .mobile-more-item:active {
    background: #f1f5f9;
  }

  .mobile-more-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted, #6b7280);
  }

  .mobile-more-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-top: 6px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    line-height: 1.45;
  }

  .mobile-more-hint i {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--primary, #3b82f6);
  }

  /* ─────────────────────────────────────────────
     2. HEADER — kompakt, mit Luft
     ───────────────────────────────────────────── */
  header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
    padding-bottom: 12px !important;
  }

  header .header-main {
    width: 100%;
    gap: 8px;
  }

  #page-title {
    font-size: 1.15rem !important;
    line-height: 1.3;
  }

  .header-copy .subtitle {
    font-size: 0.72rem;
    margin-top: 2px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start !important;
    gap: 8px;
    flex-wrap: wrap;
  }

  #auto-sync-badge {
    font-size: 0.62rem;
    padding: 4px 10px;
    border-radius: 999px;
  }

  /* ─────────────────────────────────────────────
     3. LOGIN — Touch-optimiert, mit Luft
     ───────────────────────────────────────────── */
  .login-screen {
    padding: 24px 20px !important;
    align-items: flex-start;
    padding-top: max(env(safe-area-inset-top, 0), 48px) !important;
  }

  .login-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 32px 22px 28px !important;
    border-radius: 18px !important;
  }

  .login-card h1 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .login-card .brand {
    gap: 10px;
    margin-bottom: 18px;
  }

  .login-card .form-label {
    margin-bottom: 6px;
  }

  .login-card .form-input {
    height: 50px;
    font-size: 16px;
    margin-bottom: 4px;
  }

  .login-card .form-group {
    margin-bottom: 16px;
  }

  .login-card .btn-primary,
  .login-card button[type="submit"] {
    min-height: 50px;
    font-size: 1rem;
    width: 100%;
    margin-top: 8px;
  }

  .login-forgot-link {
    font-size: 0.82rem;
    padding: 10px 0;
    display: inline-block;
  }

  .login-card .notice {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* ─────────────────────────────────────────────
     4. GLOBALE TOUCH-OPTIMIERUNGEN + BUTTONS
     ───────────────────────────────────────────── */

  /* Einheitliche Button-Basis */
  .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 999px;
    box-sizing: border-box;
  }

  /* Sidebar-Toggle nach .btn erneut ausblenden (Cascade-Override) */
  button.sidebar-toggle,
  .sidebar-toggle.btn {
    display: none !important;
  }

  .btn-primary {
    padding: 10px 20px;
  }

  .btn-secondary {
    padding: 10px 18px;
  }

  .btn i,
  .btn svg {
    flex-shrink: 0;
    font-size: 0.9em;
  }

  /* Kleine Buttons (z.B. in Tabellen-Zeilen) */
  .btn-sm,
  .icon-btn,
  .dish-edit-btn,
  .dish-delete-btn,
  .course-actions .btn,
  .shopping-row .btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .icon-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
  }

  /* Filter-Buttons — kompakter für Smartphone */
  .filter-btn,
  .overview-filter-btn,
  #dish-filters .filter-btn,
  .filter-controls .filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 999px;
    flex-shrink: 0;
  }

  /* Formular-Inputs — iOS-Zoom-Prevention */
  .form-input,
  .select-styled,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  select.form-input,
  textarea.form-input {
    min-height: 46px;
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 12px;
  }

  textarea.form-input {
    min-height: 80px;
    padding: 12px 14px;
  }

  .form-label {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  /* ─────────────────────────────────────────────
     4b. CARDS — mehr Luft und Abstände
     ───────────────────────────────────────────── */
  .card {
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .card-subtitle {
    font-size: 0.75rem;
    margin-top: 2px;
  }

  .card-header-right {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Mehr Luft zwischen View-Sections */
  .view-section > .card,
  .view-section > div {
    margin-bottom: 16px;
  }

  .view-section > *:last-child {
    margin-bottom: 0;
  }

  /* ─────────────────────────────────────────────
     5. DASHBOARD TAB
     ───────────────────────────────────────────── */

  /* Metriken → 1 Spalte */
  .metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin-bottom: 18px;
  }

  .metric-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .metric-info {
    gap: 4px;
  }

  .circle-wrap,
  .circle-svg {
    width: 60px;
    height: 60px;
  }

  /* Dashboard Split (Forecast + Live) → 1 Spalte */
  .dashboard-split {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Dashboard Combined Header → vertikal */
  .dashboard-combined-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .dashboard-combined-actions {
    width: 100% !important;
    justify-content: center !important;
  }

  .dashboard-date-nav {
    width: 100% !important;
    max-width: 280px;
    margin: 0 auto;
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    gap: 6px !important;
  }

  .dashboard-date-stack {
    min-width: 0 !important;
  }

  .dashboard-date-label {
    font-size: 0.88rem;
  }

  .dashboard-date-hint {
    font-size: 0.72rem;
  }

  .dashboard-date-btn {
    width: 40px;
    height: 40px;
  }

  #dashboard-ai-btn {
    width: auto;
    font-size: 0.78rem;
  }

  #dashboard-ai-btn.is-placeholder {
    display: none !important;
  }

  .dashboard-cycle-day-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  /* Course Grid → 1 Spalte */
  .dashboard-course-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .dashboard-course-card {
    padding: 12px 14px 14px;
    border-radius: 14px;
  }

  .dashboard-course-head {
    padding: 0 6px;
    margin-bottom: 10px;
    gap: 6px;
  }

  .dashboard-course-name {
    font-size: 0.78rem;
  }

  .course-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Forecast → 1 Spalte */
  .forecast-body {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .forecast-chart-wrap,
  .live-chart-wrap {
    height: 260px;
    min-height: 260px;
  }

  .forecast-table {
    font-size: 0.8rem;
  }

  .forecast-table th,
  .forecast-table td {
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  .forecast-table td:first-child {
    gap: 6px;
  }

  /* Overview Header/Filter → vertikal */
  .overview-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
  }

  .overview-actions {
    flex-wrap: wrap !important;
    gap: 8px;
    width: 100%;
  }

  .overview-search {
    width: 100%;
    min-width: 0;
  }

  .overview-search-field .form-input {
    width: 100% !important;
  }

  .overview-stats {
    justify-content: flex-start;
    margin-left: 0;
    gap: 6px;
  }

  .filter-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .filter-controls::-webkit-scrollbar {
    display: none;
  }

  /* Overview-Filter als kompakte Chips */
  #overview-filters .filter-btn {
    min-height: 32px !important;
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    gap: 5px;
    flex-shrink: 0;
  }
  #overview-filters .filter-btn::before {
    width: 7px;
    height: 7px;
  }

  .overview-search-field {
    display: none !important;
  }

  /* Overview Table → Card Layout */
  .overview-table {
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
  }

  .overview-table thead {
    display: none !important;
  }

  .overview-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 4px 12px;
    padding: 14px 16px;
    border: 1px solid var(--border, #e6edf6);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  }

  .overview-table td {
    display: block !important;
    width: auto !important;
    border-bottom: none !important;
    padding: 2px 0 !important;
    background: none !important;
    text-align: left !important;
  }

  .overview-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 700;
    font-size: 0.95rem;
  }

  .overview-table td:nth-child(6) {
    grid-column: 2;
    grid-row: 1;
    text-align: right !important;
  }

  /* Zeile 2: Gäste links, Gerichte rechts */
  .overview-table td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.85rem;
  }

  .overview-table td:nth-child(3) {
    display: none !important;
  }

  .overview-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    text-align: right !important;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
  }

  /* Zeile 3: Allergien/Notiz */
  .overview-table td:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 0.78rem;
    color: var(--text-muted, #6b7280);
    font-style: italic;
  }

  .overview-table td:nth-child(5):empty {
    display: none !important;
  }

  /* ─────────────────────────────────────────────
     6. SPEISEPLAN TAB
     ───────────────────────────────────────────── */

  /* Sub-Tabs */
  .recipes-tabs {
    margin-bottom: 16px;
  }

  .recipes-segmented {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 3px;
    padding: 4px;
  }

  .recipes-segmented .designer-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    font-size: 0.7rem;
    min-height: 38px;
    text-align: center;
  }

  /* Calendar Layout → 1 Spalte */
  .calendar-layout {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .cycle-palette {
    display: flex !important;
    overflow-x: auto !important;
    gap: 8px;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
  }

  .cycle-palette > * {
    flex: 0 0 auto;
    min-width: 140px;
  }

  .calendar-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-header {
    overflow-x: auto;
  }

  /* Planner */
  .planner-header {
    flex-direction: column !important;
    gap: 8px;
    align-items: stretch !important;
  }

  .planner-header > * {
    width: 100%;
  }

  .planner-day-row {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 4px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .planner-day-row [role="tab"] {
    flex-shrink: 0;
    min-width: 42px;
    padding: 8px 8px;
    font-size: 0.75rem;
  }

  .menu-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .menu-col {
    padding: 10px;
    border-radius: 12px;
  }

  .menu-slot {
    padding: 10px;
    font-size: 0.85rem;
  }

  .course-manager {
    padding: 10px;
  }

  .course-manager-header {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start !important;
  }

  .course-manager-header .btn {
    width: 100%;
  }

  /* Course Item / Dish Row */
  .course-item {
    padding: 8px 10px;
    gap: 6px;
  }

  .course-actions {
    opacity: 1 !important;
    pointer-events: auto !important;
    gap: 4px;
  }

  .course-actions .btn {
    min-height: 34px;
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* Dish Table → Cards */
  .dish-config {
    flex-direction: column !important;
    gap: 10px;
    margin-bottom: 14px;
  }

  .dish-config-left {
    flex-direction: column !important;
    width: 100%;
    gap: 10px;
  }

  .dish-search-field {
    width: 100% !important;
  }

  .dish-search-field .form-input {
    width: 100% !important;
  }

  #dish-filters {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  #dish-filters .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .dish-table {
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
  }

  .dish-table thead {
    display: none !important;
  }

  .dish-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 4px 10px;
    padding: 14px 16px;
    border: 1px solid var(--border, #e6edf6);
    border-radius: 14px;
    background: #ffffff;
  }

  .dish-table td {
    display: block !important;
    width: auto !important;
    border: none !important;
    padding: 2px 0 !important;
    background: none !important;
  }

  .dish-table td:nth-child(1) {
    font-weight: 700;
    grid-column: 1;
    grid-row: 1;
    font-size: 0.9rem;
  }

  .dish-table td:nth-child(2) {
    font-size: 0.78rem;
    color: var(--text-muted, #6b7280);
    grid-column: 1;
    grid-row: 2;
  }

  .dish-table td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 0.76rem;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 80px);
  }

  .dish-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    text-align: right !important;
    font-weight: 600;
    font-size: 0.88rem;
  }

  .dish-table td:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 4px !important;
  }

  /* Ingredient Table → Cards */
  .ingredient-price-add {
    padding: 12px;
  }

  .ingredient-price-add-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px;
  }

  .ingredient-toolbar-field {
    flex: none !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  .ingredient-toolbar-field .form-input,
  .ingredient-toolbar-field .select-styled,
  .ingredient-price-search,
  .ingredient-filter-select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .ingredient-price-toolbar-actions {
    margin-left: 0 !important;
    width: 100%;
    justify-content: flex-start;
  }

  .ingredient-price-header-tools {
    width: 100%;
  }

  .ingredient-price-table {
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
  }

  .ingredient-price-table thead {
    display: none !important;
  }

  .ingredient-price-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 4px 10px;
    padding: 14px 16px;
    border: 1px solid var(--border, #e6edf6);
    border-radius: 14px;
    background: #ffffff;
  }

  .ingredient-price-table td {
    display: block !important;
    width: auto !important;
    border: none !important;
    padding: 2px 0 !important;
    background: none !important;
  }

  .ingredient-price-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 700;
    font-size: 0.9rem;
  }

  .ingredient-price-table td:nth-child(2),
  .ingredient-price-table td:nth-child(3),
  .ingredient-price-table td:nth-child(4),
  .ingredient-price-table td:nth-child(5),
  .ingredient-price-table td:nth-child(7) {
    font-size: 0.78rem;
    color: var(--text-muted, #6b7280);
  }

  .ingredient-price-table td:nth-child(6) {
    grid-column: 2;
    grid-row: 1;
    font-weight: 600;
    text-align: right;
    font-size: 0.88rem;
  }

  .ingredient-price-table td:last-child {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 4px !important;
  }

  /* ─────────────────────────────────────────────
     7. EINKAUFSLISTE TAB
     ───────────────────────────────────────────── */

  /* Shopping Days Header */
  .shopping-days-card {
    padding: 14px 16px;
    margin-bottom: 14px;
    position: relative;
  }

  .shopping-days-header {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start !important;
  }

  .shopping-days-info {
    width: 100%;
  }

  .shopping-days-actions {
    grid-column: 1 / -1;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px;
    justify-content: flex-start !important;
  }
  /* Mehrtägig-Toggle in erste Zeile, rechts */
  .shopping-days-actions > .shopping-mehrtaegig-toggle {
    position: absolute;
    top: 14px;
    right: 16px;
  }

  .shopping-days-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.78rem;
  }

  .shopping-forecast-change-hint {
    width: 100%;
    font-size: 0.75rem;
  }

  /* Day Bar → Horizontal Scroll */
  .shopping-daybar-days {
    display: flex !important;
    gap: 6px;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    scrollbar-width: none;
  }
  .shopping-daybar-days::-webkit-scrollbar {
    display: none;
  }

  .shopping-day-cell {
    flex: 0 0 80px !important;
    min-height: 64px;
    font-size: 0.75rem;
    padding: 10px 6px;
  }

  /* Shopping Overview → 1 Spalte */
  .shopping-overview {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin-bottom: 14px;
  }

  .shopping-overview-card {
    padding: 14px 16px;
  }

  .shopping-overview-actions {
    grid-column: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .shopping-overview-actions .btn {
    font-size: 0.8rem;
    padding: 0 10px;
    min-height: 40px;
    max-height: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .shopping-overview-actions .shopping-export {
    display: block;
  }
  .shopping-overview-actions #shopping-manage-suppliers-btn,
  .shopping-overview-actions #shopping-export-btn {
    min-height: 36px !important;
    max-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    line-height: 1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
  }
  .shopping-overview-actions #shopping-export-btn > i,
  .shopping-overview-actions #shopping-export-btn > span,
  .shopping-overview-actions #shopping-export-btn .export-caret {
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
  }
  .shopping-overview-actions #shopping-export-btn > i,
  .shopping-overview-actions #shopping-manage-suppliers-btn > i {
    font-size: 0.78rem;
  }
  /* Exportieren-Button Caret nicht die Höhe pushen */
  .shopping-overview-actions .export-caret {
    font-size: 0.65rem;
    margin-left: 2px;
  }

  /* Shopping Export Dropdown */
  .shopping-export-submenu {
    right: auto !important;
    left: 0 !important;
    min-width: 200px;
  }

  /* Shopping Tolerance Card */
  .shopping-tolerance-card {
    padding: 12px;
  }
  #shopping-tolerance-slider {
    touch-action: none;
  }
  .shopping-tolerance-hint {
    display: none !important;
  }

  .shopping-tolerance-header {
    flex-direction: column !important;
    gap: 6px;
    align-items: flex-start !important;
  }

  .shopping-tolerance-scale {
    font-size: 0.72rem;
  }

  /* Shopping Controls → vertikal */
  .shopping-controls {
    flex-direction: column !important;
    gap: 8px;
    margin-bottom: 14px;
  }

  .shopping-controls-left {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100%;
    gap: 8px;
  }

  /* Suchfeld ausblenden */
  .shopping-controls-left .shopping-search-field {
    display: none !important;
  }

  .shopping-filter-pill {
    width: 100%;
    min-width: 0;
    height: 34px;
  }

  .shopping-filter-pill .select-styled {
    min-width: 0 !important;
    width: 100%;
    font-size: 0.75rem;
    padding: 0 8px;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
  }

  .shopping-filter-pill i {
    font-size: 0.7rem;
  }

  .shopping-controls-right {
    width: 100%;
  }

  .shopping-controls-right .btn {
    width: 100%;
    min-height: 36px !important;
    max-height: 36px;
    height: 36px;
    padding: 0 14px !important;
    font-size: 0.8rem;
  }

  /* Shopping Inline Add → vertikal */
  .shopping-inline-add {
    padding: 14px 16px;
    margin-bottom: 14px;
  }

  .shopping-inline-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .shopping-inline-grid .form-group {
    min-width: 0 !important;
    width: 100% !important;
  }

  .shopping-inline-grid .form-group:first-child,
  .shopping-inline-grid .form-group:nth-child(2),
  .shopping-inline-grid .form-group:nth-child(3),
  .shopping-inline-grid .form-group:nth-child(4),
  .shopping-inline-grid .form-group:nth-child(5) {
    min-width: 0 !important;
    flex: none !important;
    width: 100% !important;
  }

  .shopping-inline-grid .form-label {
    padding-left: 4px;
    margin-bottom: 6px;
  }

  /* Shopping List Grid */
  .shopping-list-grid {
    gap: 10px;
  }

  .shopping-group {
    padding: 8px;
    border-radius: 12px;
  }

  .shopping-group-header {
    padding: 6px;
    font-size: 0.82rem;
  }

  /* Shopping-Item: Basis-Text ausblenden */
  .shopping-item-sub {
    display: none !important;
  }

  /* Shopping-Item (EKL Zutaten) — mobiles Grid */
  .shopping-item {
    grid-template-columns: auto 1fr auto auto !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .shopping-item-edit {
    gap: 4px !important;
  }
  .shopping-qty-input {
    width: 65px !important;
    min-height: 38px;
    font-size: 15px;
  }
  .shopping-item-actions {
    gap: 6px !important;
    flex-shrink: 0;
  }
  .shopping-item-actions .ingredient-inline-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    flex-shrink: 0;
  }
  .shopping-item-actions .ingredient-inline-icon.cancel {
    display: inline-flex !important;
  }

  /* Shopping Header + Row → Cards */
  .shopping-header,
  .shopping-row {
    min-width: 0 !important;
  }

  .shopping-header {
    display: none !important;
  }

  .shopping-supplier-header {
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .shopping-row {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    gap: 4px 10px !important;
    padding: 12px 14px;
    min-width: 0 !important;
    margin-bottom: 2px;
  }

  .shopping-list[data-mode="flat"] .shopping-row,
  .shopping-list[data-mode="smart"] .shopping-row {
    grid-template-columns: 1fr auto auto !important;
    min-width: 0 !important;
  }

  /* Name */
  .shopping-row > span:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Kategorie */
  .shopping-row > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
  }

  /* Menge */
  .shopping-row > span:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    font-weight: 600;
    font-size: 0.82rem;
    text-align: right;
    white-space: nowrap;
  }

  /* Einheit */
  .shopping-row > span:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Lieferant / weitere Spalten */
  .shopping-row > span:nth-child(5),
  .shopping-row > span:nth-child(6) {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
  }

  /* Checkbox + Actions → letzte Zeile */
  .shopping-row > span:nth-child(7),
  .shopping-row > span:nth-child(8) {
    min-height: 34px;
    display: flex;
    align-items: center;
  }

  /* Shopping Add Form → 1 Spalte */
  .shopping-add {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  /* ─────────────────────────────────────────────
     8. DRAWERS → Vollbild auf Smartphone
     ───────────────────────────────────────────── */
  .drawer {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .drawer-header {
    padding: max(env(safe-area-inset-top, 0), 16px) 20px 14px;
    border-bottom: 1px solid var(--border, #e6edf6);
    position: relative;
  }

  /* Supplier-Drawer Header stabil halten */
  .supplier-drawer-header {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  .supplier-drawer-header .drawer-close {
    margin-left: 8px;
  }

  .drawer-title {
    font-size: 1.05rem;
  }

  .drawer-body {
    padding: 18px 20px;
    gap: 14px;
  }

  .drawer-tabs {
    gap: 4px;
    padding: 5px;
    margin: 0 20px 4px;
    border-radius: 12px;
  }

  .drawer-tabs .tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 10px;
    min-height: 38px;
    border-radius: 9px;
  }

  /* Drawer-Footer Buttons */
  .drawer > .modal-actions,
  .drawer-footer {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0));
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border, #e6edf6);
  }

  .modal-actions {
    padding: 14px 20px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .modal-actions .btn {
    flex: 1;
    min-width: 0;
    min-height: 40px;
  }

  /* Bestellung erfassen + WhatsApp — nebeneinander, gleich breit */
  .overview-order-actions.modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 14px 0 !important;
    box-sizing: border-box;
  }
  .overview-order-actions .btn {
    min-height: 38px !important;
    max-height: 38px;
    padding: 0 10px !important;
    font-size: 0.82rem;
    border-radius: 999px !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }
  .overview-remind-btn {
    font-size: 0.76rem !important;
  }

  /* Gastinfo Buttons — 1 Zeile: Abbrechen + Speichern breit, Umsetzen + Löschen icon-only */
  .overview-form-actions.modal-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 14px 0 !important;
    align-items: center;
  }
  .overview-form-actions .btn,
  .overview-form-actions .icon-btn,
  .overview-form-actions .overview-clear-btn {
    min-height: 38px !important;
    max-height: 38px;
    padding: 0 10px !important;
    font-size: 0.82rem;
    border-radius: 999px !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  /* Abbrechen + Speichern: breit */
  .overview-form-actions #overview-cancel-btn,
  .overview-form-actions #overview-save-btn {
    flex: 1 1 0 !important;
  }
  /* Umsetzen: nur Icon, kompakt */
  .overview-form-actions .overview-relocate-btn {
    flex: 0 0 auto !important;
    width: 38px !important;
    padding: 0 !important;
  }
  .overview-form-actions .overview-relocate-btn > span {
    display: none !important;
  }
  /* Löschen: icon-only, kompakt */
  .overview-form-actions .overview-clear-btn {
    flex: 0 0 auto !important;
    width: 38px !important;
    padding: 0 !important;
  }

  /* Overview Drawer */
  .overview-drawer-tabs {
    gap: 4px;
  }

  .overview-drawer-tabs button {
    font-size: 0.8rem;
    padding: 8px 8px;
  }

  /* Dish Drawer */
  .dish-drawer .form-group {
    margin-bottom: 8px;
  }

  /* Cycle Editor Drawer */
  .cycle-editor-row {
    gap: 8px;
    padding: 8px;
  }

  /* Supplier Drawer */
  .supplier-card {
    padding: 10px;
    gap: 8px;
  }

  .supplier-form .form-group {
    margin-bottom: 8px;
  }
  .supplier-form-actions.modal-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 14px 0 !important;
    align-items: center;
  }
  .supplier-form-actions .btn {
    min-height: 38px !important;
    max-height: 38px;
    border-radius: 999px !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  .supplier-form-actions .supplier-inline-delete {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-height: 38px !important;
    max-height: 38px;
    padding: 0 !important;
    margin-left: 0 !important;
    border-radius: 999px !important;
  }

  /* Settings Drawer */
  .settings-drawer-body {
    padding: 16px 20px;
  }

  .settings-drawer .form-input,
  .settings-drawer .select-styled {
    height: 48px;
    font-size: 16px;
  }

  .settings-actions.modal-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 14px 0 !important;
  }
  .settings-actions .btn {
    width: 100% !important;
    min-height: 38px !important;
    max-height: 38px;
    border-radius: 999px !important;
    justify-content: center !important;
  }

  .settings-support-card {
    margin-top: 16px;
  }

  .settings-support-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .lang-toggle {
    flex-wrap: wrap;
  }

  .lang-toggle button {
    min-height: 40px;
    min-width: 44px;
  }

  /* ─────────────────────────────────────────────
     9. MODALS → Bottom Sheet
     ───────────────────────────────────────────── */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    max-height: 85dvh;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0)) !important;
    transform: none !important;
  }

  .modal-overlay.open .modal-content {
    transform: none !important;
  }

  .modal-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
  }

  .modal-content .form-group {
    margin-bottom: 14px;
  }

  .modal-content .modal-actions {
    margin-top: 10px;
    padding: 0;
  }

  /* Confirm-Modal: mehr Abstand + Buttons tauschen (Sicherheit) */
  #confirm-modal .modal-actions {
    margin-top: 24px !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--border, #e6edf6);
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 8px;
  }
  #confirm-modal .modal-actions .btn {
    flex: 1;
    min-width: 0;
  }

  /* Umsetzen-Modal: gleicher Abstand über Buttons */
  .overview-relocate-modal .modal-actions {
    margin-top: 24px !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--border, #e6edf6);
  }

  /* ─────────────────────────────────────────────
     10. EMAIL / FORECAST / MISC GRIDS
     ───────────────────────────────────────────── */
  .email-draft-card {
    grid-template-columns: 1fr !important;
  }

  /* Toast */
  .toast-notification {
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
    max-width: none !important;
    bottom: calc(80px + env(safe-area-inset-bottom, 0)) !important;
    font-size: 0.85rem;
  }

  /* Color Picker Panels */
  .color-picker-panel {
    left: auto !important;
    right: 0;
    max-width: calc(100vw - 32px);
  }

  /* Select Styled overflows */
  .select-styled {
    min-width: 0 !important;
  }

  /* Badge/Pill */
  .status-pill {
    font-size: 0.7rem;
    padding: 4px 8px;
    white-space: nowrap;
  }

  /* Overview Note */
  .overview-note {
    font-size: 0.76rem;
  }

  /* Allergen Settings */
  .settings-allergen-add {
    grid-template-columns: 1fr !important;
  }

  .settings-allergen-btn {
    width: 100%;
  }

  /* Designer (hidden on mobile but just in case) */
  .designer-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .designer-panel-body {
    max-height: none;
  }

  .designer-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .designer-preset-actions {
    grid-template-columns: 1fr !important;
  }

  /* ─────────────────────────────────────────────
     11. GENERIC OVERFLOW PREVENTION & SPACING
     ───────────────────────────────────────────── */
  img, svg:not(.circle-svg), video, canvas, iframe {
    max-width: 100%;
  }

  table {
    max-width: 100%;
  }

  pre, code {
    overflow-x: auto;
    max-width: 100%;
  }

  /* Mehr Abstand zwischen Sektionen */
  .recipes-tab-panels .card {
    margin-bottom: 0;
  }

  /* Mehrtägig-Toggle — kompakt, rechtsbündig im Container */
  .shopping-days-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .shopping-mehrtaegig-toggle {
    order: -1;
    margin-left: auto;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
  }
  .shopping-mehrtaegig-text {
    font-size: 0.76rem;
  }

  /* Toggle-Switch — saubere Proportionen */
  .shopping-toggle-switch {
    width: 40px !important;
    height: 22px !important;
    min-width: 40px !important;
    min-height: 22px !important;
    flex-shrink: 0;
  }
  .shopping-toggle-slider {
    border-radius: 11px !important;
  }
  .shopping-toggle-slider::before {
    width: 16px !important;
    height: 16px !important;
    left: 3px !important;
    bottom: 3px !important;
  }
  .shopping-toggle-switch input:checked + .shopping-toggle-slider::before {
    transform: translateX(18px) !important;
  }

  /* Status-Pills konsistent */
  .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    padding: 4px 10px;
    white-space: nowrap;
    min-height: 24px;
    border-radius: 999px;
  }

  /* Pill-Inputs konsistent */
  .shopping-pill-input {
    height: 44px;
    padding: 10px 14px;
  }

  /* Ingredient Category Selects */
  .ingredient-category-select {
    min-height: 44px;
    font-size: 0.82rem;
  }

  /* Abstand zwischen Elementen in Drawers */
  .drawer-body .form-group + .form-group {
    margin-top: 2px;
  }

  /* Abstand zwischen Tabs und Content */
  .recipes-tab-panels {
    margin-top: 4px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SMARTPHONE LANDSCAPE (≤767px, landscape)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) and (orientation: landscape) {
  .shopping-daybar-days {
    padding-top: 6px;
    padding-bottom: 2px;
  }

  .shopping-day-cell,
  .shopping-day-cell:hover,
  .shopping-day-cell.is-selected,
  .shopping-day-cell.is-done.is-selected,
  .shopping-day-cell.is-reopened-change.is-selected {
    transform: none;
  }

  .shopping-day-done-icon,
  .shopping-day-ai-icon {
    top: 0;
  }

  .mobile-bottom-nav {
    height: calc(44px + env(safe-area-inset-bottom, 0));
  }

  .mobile-bottom-nav-item {
    flex-direction: row;
    gap: 6px;
    font-size: 0.68rem;
    padding: 4px 2px;
  }

  .mobile-bottom-nav-item.active::after {
    display: none;
  }

  .mobile-bottom-nav-item i {
    font-size: 0.9rem;
  }

  .main-wrapper {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0)) !important;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .shopping-overview {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .forecast-chart-wrap,
  .live-chart-wrap {
    height: 200px;
    min-height: 200px;
  }

  .dashboard-course-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

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

  .overview-table tbody tr {
    grid-template-columns: auto 1fr auto auto auto auto !important;
    gap: 0 10px;
  }

  .overview-table td {
    grid-row: auto !important;
    grid-column: auto !important;
  }
}

/* EKL Action Buttons: gleiche Hoehe auf Tablet + Smartphone */
@media (max-width: 1180px) {
  .shopping-overview-actions .shopping-export {
    display: block;
  }

  .shopping-overview-actions #shopping-manage-suppliers-btn,
  .shopping-overview-actions #shopping-export-btn {
    min-height: 36px !important;
    max-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
  }

  .shopping-overview-actions #shopping-export-btn > i,
  .shopping-overview-actions #shopping-export-btn > span,
  .shopping-overview-actions #shopping-export-btn .export-caret,
  .shopping-overview-actions #shopping-manage-suppliers-btn > i,
  .shopping-overview-actions #shopping-manage-suppliers-btn > span {
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
  }
}
