:root {
  --color-bg: #0f172a;
  --color-bg-elevated: #1e293b;
  --color-bg-card: #334155;
  --color-surface: #475569;
  --color-primary: #004225;
  --color-primary-hover: #005a32;
  --color-primary-light: #19a86b;
  --color-text: #f1f5f9;
  --color-text-muted: #cbd5e1;
  --color-text-dim: #94a3b8;
  --color-border: #475569;
  --color-accent: #10b981;
  --color-plan: #3b82f6;
  --color-plan-hover: #2563eb;
  --color-plan-light: #60a5fa;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Splash Screen */
.splash {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease-out;
}

.splash-hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 280px;
  max-width: 80vw;
  height: auto;
  animation: pulse 2s ease-in-out infinite;
}

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

/* Header */
.app-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.app-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary-light);
  letter-spacing: -0.025em;
}

.app-header .search-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0;
}

.app-header #search {
  flex: 1;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
}

.app-header #search:focus {
  background: var(--color-bg-card);
  border-color: var(--color-primary-light);
}

.filter-toggle {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.filter-toggle:hover {
  border-color: var(--color-primary-light);
  background: var(--color-surface);
}

.filter-toggle.active {
  border-color: var(--color-primary-light);
  background: var(--color-primary);
  color: var(--color-text);
}

.filter-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.filter-toggle.active .filter-icon {
  transform: rotate(180deg);
}

.filter-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 1rem;
}

.filter-panel:not([hidden]) {
  max-height: 200px;
}

/* Compact icon-only buttons */
.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button .icon {
  width: 20px;
  height: 20px;
}

.icon-emoji {
  font-size: 18px;
  line-height: 1;
}

/* Clickable gear in title */
.title-row .icon-emoji[role="button"] {
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.title-row .icon-emoji[role="button"]:hover {
  background: var(--color-bg-card);
}

/* Admin badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #111;
  background: #fbbf24; /* amber-400 */
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid #f59e0b; /* amber-500 */
}

.admin-badge.hidden {
  display: none !important;
}

/* Main Content */
main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

#search {
  width: 100%;
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 1rem;
  padding: 0.875rem 1.25rem;
  transition: all 0.2s ease;
  outline: none;
}

#search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

#search::placeholder {
  color: var(--color-text-dim);
}

/* Filters */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.filter-btn {
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

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

/* Cocktail List */
.cocktail-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.cocktail-item {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cocktail-item:hover {
  background: var(--color-bg-card);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cocktail-item .row {
  margin-bottom: 0.5rem;
}

.cocktail-item .row:last-child {
  margin-bottom: 0;
}

.cocktail-item strong {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
}

.cocktail-item small {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Detail Modal */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.detail-overlay[hidden] {
  display: none;
}

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

.detail-panel {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

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

.detail-header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.detail-close {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.detail-close:hover {
  color: var(--color-primary);
  background: var(--color-bg-elevated);
}

/* Detail edit button */
.detail-edit {
  float: right;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-edit:hover {
  background: var(--color-bg-card);
  border-color: var(--color-text-muted);
}

/* Greyed out edit button when admin mode is off */
.detail-edit.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.detail-body {
  padding: 1.25rem;
  overflow-y: auto;
}

/* Ingredient edit list */
.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ingredient-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.ingredient-row .summary {
  font-size: 0.9rem;
  color: var(--color-text);
}

.ingredient-actions {
  display: inline-flex;
  gap: 0.25rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:hover { background: var(--color-bg-elevated); }

.drag-handle {
  cursor: grab;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  user-select: none;
}

.ingredient-row.dragging {
  opacity: 0.6;
}

.ingredient-editor {
  grid-column: 1 / -1;
  padding: 0.5rem;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.editor-grid label { display: flex; flex-direction: column; gap: 0.25rem; }
.editor-grid label span { font-size: 0.75rem; color: var(--color-text-dim); }
.editor-grid label.notes { grid-column: 1 / -1; }

.editor-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* Mobile sheet editor */
.ingredient-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ingredient-sheet .sheet-panel {
  background: var(--color-bg-elevated);
  width: 100vw;
  height: 100vh;
  max-width: 640px;
  display: flex;
  flex-direction: column;
}

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

.ingredient-sheet .sheet-body { padding: 1rem; overflow-y: auto; }

/* Inputs inside edit mode */
.detail-meta input[type="text"],
.detail-meta input[type="number"],
.detail-meta select {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.5rem;
}

table input[type="text"],
table input[type="number"],
table select {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.375rem;
}

table th, table td { padding: 4px; }

.detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary-light);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.detail-subtitle {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid var(--color-border);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.detail-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
}

.meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.detail-ingredients {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.5rem;
}

.detail-ingredients li {
  background: var(--color-bg-card);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.detail-ingredients li:hover {
  background: var(--color-surface);
  transform: translateX(4px);
}

.detail-ingredients li::before {
  content: none;
  margin-right: 0;
}

.detail-notes {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  font-style: italic;
}

.detail-notes:empty {
  display: none;
}

/* Footer */
.app-footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.875rem;
  margin-top: auto;
}

/* Settings */
.settings-textarea {
  width: 100%;
  min-height: 220px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  resize: vertical;
}

.settings-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Floating add recipe button */
.add-recipe-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fbbf24; /* amber-400 */
  background: #fbbf24; /* amber-400 */
  color: #111;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(251, 191, 36, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-recipe-btn:hover {
  background: #f59e0b; /* amber-500 */
  border-color: #f59e0b; /* amber-500 */
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(251, 191, 36, 0.5), 0 6px 12px rgba(0, 0, 0, 0.3);
}

.add-recipe-btn.hidden {
  display: none !important;
}

/* Plan mode buttons */
#plan-enable {
  background: var(--color-plan);
  border-color: var(--color-plan);
  color: white;
}

#plan-enable:hover {
  background: var(--color-plan-hover);
  border-color: var(--color-plan-hover);
}

#plan-disable {
  background: #6b7280; /* gray-500 */
  border-color: #6b7280;
  color: white;
}

#plan-disable:hover {
  background: #4b5563; /* gray-600 */
  border-color: #4b5563;
}

/* Admin buttons */
#admin-enable {
  background: #dc2626; /* red-600 */
  border-color: #dc2626;
  color: white;
}

#admin-enable:hover {
  background: #b91c1c; /* red-700 */
  border-color: #b91c1c;
}

#admin-disable {
  background: #6b7280; /* gray-500 */
  border-color: #6b7280;
  color: white;
}

#admin-disable:hover {
  background: #4b5563; /* gray-600 */
  border-color: #4b5563;
}

/* Plan Bar */
.plan-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  z-index: 200;
  padding: 0.75rem 1.5rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.3);
  transition: transform 0.3s ease;
}

.plan-bar.hidden {
  transform: translateY(100%);
}

.plan-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.plan-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.plan-actions {
  display: flex;
  gap: 0.5rem;
}

.plan-btn {
  background: var(--color-plan);
  border: 1px solid var(--color-plan);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-btn:hover {
  background: var(--color-plan-hover);
  border-color: var(--color-plan-hover);
}

.plan-btn-secondary {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.plan-btn-secondary:hover {
  background: var(--color-bg-card);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* Plan Overlay */
.plan-section {
  margin-bottom: 1.5rem;
}

.plan-cocktails-list,
.plan-ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-cocktail-item,
.plan-ingredient-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.plan-cocktail-info,
.plan-ingredient-info {
  flex: 1;
}

.plan-cocktail-name,
.plan-ingredient-name {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.plan-cocktail-details,
.plan-ingredient-details {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.plan-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-qty-btn {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.plan-qty-btn:hover {
  background: var(--color-bg-card);
  border-color: var(--color-plan);
}

.plan-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.plan-qty-display {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
  color: var(--color-text);
}

.plan-remove-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-remove-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

/* Quantity controls for cocktail list items */
.cocktail-item {
  position: relative;
}

.cocktail-qty-controls {
  display: none; /* Hidden by default when plan mode is off */
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Always show controls when plan mode is active */
body.plan-active .cocktail-qty-controls {
  display: flex;
  opacity: 1;
  position: relative;
  top: auto;
  right: auto;
  margin-top: 0.5rem;
  justify-content: flex-end;
}

/* Show on hover only when plan mode is active */
body.plan-active .cocktail-item:hover .cocktail-qty-controls {
  opacity: 1;
}

.cocktail-qty-btn {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cocktail-qty-btn:hover {
  background: var(--color-plan);
  border-color: var(--color-plan);
  color: white;
}

.cocktail-qty-display {
  background: var(--color-plan);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  text-align: center;
}

.cocktail-qty-display.hidden {
  display: none;
}

/* Larger, always-visible controls in plan mode */
body.plan-active .cocktail-qty-btn {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

body.plan-active .cocktail-qty-display {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  min-width: 2rem;
}

/* Plan mode admin hiding */
body.plan-active .add-recipe-btn {
  display: none !important;
}

body.plan-active .detail-edit {
  display: none !important;
}

body.plan-active #admin-badge {
  display: none !important;
}

body.plan-active .admin-badge {
  display: none !important;
}

/* Adjust main content when plan bar is visible */
body:not(.plan-bar-hidden) main {
  padding-bottom: 5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .detail-overlay {
    padding: 0; /* remove side gaps on small screens */
  }

  .app-header h1 {
    font-size: 1.5rem;
  }

  .tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  main {
    padding: 1rem;
  }

  .detail-panel {
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    height: 100dvh; /* use dynamic viewport height on supported browsers */
    width: 100vw; /* ensure full width on iOS */
  }

  .detail-title {
    font-size: 1.5rem;
  }

  .detail-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }

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

  /* Ensure the back button row clears iOS system bars */
  .detail-header {
    padding-top: max(1.5rem, calc(1rem + env(safe-area-inset-top)));
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }

  .detail-body {
    padding-bottom: max(1.25rem, calc(1.25rem + env(safe-area-inset-bottom)));
  }

  /* Mobile-friendly plan bar */
  .plan-bar {
    padding: 0.5rem 1rem;
  }

  .plan-bar-content {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .plan-count {
    text-align: center;
  }

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

  .plan-btn {
    flex: 1;
  }

  /* Mobile-friendly plan overlay items */
  .plan-cocktail-item,
  .plan-ingredient-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .plan-qty-controls {
    width: 100%;
    justify-content: space-between;
  }

  /* Larger touch targets on mobile */
  body.plan-active .cocktail-qty-btn {
    width: 36px;
    height: 36px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border);
}

.plan-section .detail-ingredients li {
  border-left: 0;
}

.plan-section .detail-ingredients li::before {
  content: none;
}

/* Collection Tabs */
.tabs {
  display: flex;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 0 1rem;
}

.tab-button {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.tab-button:hover:not(.disabled) {
  color: var(--color-text);
  background: var(--color-bg-card);
}

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

.tab-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Admin Toggle */
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.admin-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent);
}

