/* ═══════════════════════════════════════════════════════════════
   Zorro's Staff Manager — styles.css
   Dark premium theme
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --card: #1a1a1a;
  --card-hover: #1f1f1f;
  --panel: #222222;
  --border: #2a2a2a;
  --border-light: #333333;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --red-glow: rgba(231,76,60,0.18);
  --gold: #f1c40f;
  --gold-dim: rgba(241,196,15,0.15);
  --blue: #3498db;
  --green: #27ae60;
  --purple: #8e44ad;
  --orange: #e67e22;
  --text: #f0f0f0;
  --text-dim: #aaaaaa;
  --text-muted: #666666;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ── Top Bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-left { flex: 0 0 auto; }
.topbar-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.topbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-z {
  width: 34px;
  height: 34px;
  background: var(--red-bright);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}
.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13px;
}

/* ── Week Nav ─────────────────────────────────────────────── */
.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.week-nav.hidden { display: none; }
.week-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-light);
  background: var(--panel);
  color: var(--text-dim);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.week-btn:hover { border-color: var(--red-bright); color: var(--red-bright); background: var(--red-glow); }
.week-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 160px;
  text-align: center;
  letter-spacing: -0.2px;
}

/* ── Tab Nav ──────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 4px;
  background: var(--panel);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--border); }
.tab-btn.active {
  background: var(--red-bright);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(231,76,60,0.35);
}
.tab-btn i { font-size: 12px; }

/* ── Clock ────────────────────────────────────────────────── */
.live-clock {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  font-family: 'SF Mono', 'Courier New', monospace;
}

.btn-icon-link {
  color: var(--text-muted);
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}
.btn-icon-link:hover { color: var(--gold); background: var(--gold-dim); }

/* ── Tab Content ──────────────────────────────────────────── */
.tab-content { display: none; padding: 20px 24px; min-height: calc(100vh - 60px); }
.tab-content.active { display: block; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--red-bright);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--red); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(231,76,60,0.4); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--panel);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--border); color: var(--text); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(192,57,43,0.15);
  color: var(--red-bright);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-danger:hover { background: rgba(192,57,43,0.3); }

.btn-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--red-bright); color: var(--red-bright); background: var(--red-glow); }
.btn-icon.done:hover { border-color: var(--green); color: var(--green); background: rgba(39,174,96,0.12); }

/* ── Section label ────────────────────────────────────────── */
.section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label i { color: var(--red-bright); }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   SCHEDULE TAB
═══════════════════════════════════════════════════════════ */
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.schedule-toolbar-left, .schedule-toolbar-right { display: flex; align-items: center; gap: 12px; }

.schedule-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.schedule-grid {
  display: grid;
  min-width: 900px;
}

/* Header row + 7 day columns */
.schedule-grid-header {
  display: contents;
}

.sched-header-cell {
  padding: 10px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.sched-header-cell.today-col {
  color: var(--red-bright);
  background: rgba(231,76,60,0.06);
}
.sched-header-cell.name-col {
  text-align: left;
  min-width: 160px;
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid var(--border);
}

.sched-employee-row {
  display: contents;
}

.sched-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  left: 0;
  z-index: 1;
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
}
.sched-name-cell:hover { background: var(--card); }

.emp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.emp-info { flex: 1; min-width: 0; }
.emp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emp-role-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--panel);
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sched-day-cell {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 6px;
  min-height: 72px;
  vertical-align: top;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.sched-day-cell:last-child { border-right: none; }
.sched-day-cell:hover { background: var(--card-hover); }
.sched-day-cell.today-col { background: rgba(231,76,60,0.04); }

.add-shift-hint {
  width: 100%;
  height: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-light);
  font-size: 18px;
  opacity: 0;
  transition: var(--transition);
  border-radius: 6px;
  border: 1px dashed transparent;
}
.sched-day-cell:hover .add-shift-hint { opacity: 1; border-color: var(--border-light); }

/* Shift Card inside cell */
.shift-card {
  border-radius: 7px;
  padding: 6px 9px;
  margin-bottom: 4px;
  border-top: 3px solid transparent;
  background: var(--card);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: 1px solid var(--border);
}
.shift-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-light); }
.shift-card-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.shift-card-station {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* Hours total row */
.sched-hours-cell {
  padding: 8px 14px;
  border-right: 1px solid var(--border);
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.sched-hours-cell.name-col {
  position: sticky;
  left: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.sched-hours-total {
  color: var(--gold);
  font-weight: 700;
}

.grid-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1/-1;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCTION TAB
═══════════════════════════════════════════════════════════ */
.production-toolbar, .instructions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.production-toolbar-left, .instructions-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.production-toolbar-right, .instructions-toolbar-right { flex-shrink: 0; }

.date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-dim);
  font-size: 13px;
}
.date-picker {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Task Card */
.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.task-card:hover { background: var(--card-hover); border-color: var(--border-light); }
.task-card.done-task { opacity: 0.5; }
.task-card.done-task .task-text { text-decoration: line-through; color: var(--text-muted); }

.task-cat-strip {
  width: 4px;
  align-self: stretch;
  border-radius: 0 2px 2px 0;
  flex-shrink: 0;
  margin-right: 0;
}

.task-time-chip {
  padding: 4px 10px;
  background: var(--panel);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
  min-width: 60px;
  text-align: center;
  letter-spacing: 0.5px;
}

.task-main { flex: 1; min-width: 0; }
.task-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-recurring-badge {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.task-assigned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--panel);
  color: var(--text-dim);
}
.task-cat-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

/* Category colors */
.cat-prep   { background: rgba(52,152,219,0.18); color: #5dade2; }
.cat-baking { background: rgba(192,57,43,0.18); color: #e74c3c; }
.cat-cleaning { background: rgba(39,174,96,0.18); color: #58d68d; }
.cat-opening { background: rgba(241,196,15,0.18); color: #f4d03f; }
.cat-closing { background: rgba(142,68,173,0.18); color: #bb8fce; }
.cat-general { background: rgba(102,102,102,0.18); color: #999; }

.strip-prep   { background: #3498db; }
.strip-baking { background: #e74c3c; }
.strip-cleaning { background: #27ae60; }
.strip-opening { background: #f1c40f; }
.strip-closing { background: #8e44ad; }
.strip-general { background: #555; }

.task-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.task-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: var(--border-light); }

/* ═══════════════════════════════════════════════════════════
   INSTRUCTIONS TAB
═══════════════════════════════════════════════════════════ */
.category-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-filter-btn {
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.cat-filter-btn:hover { border-color: var(--border-light); color: var(--text); }
.cat-filter-btn.active {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #fff;
}

.pinned-instructions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.instructions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

/* Instruction Card */
.instruction-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.instruction-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.instruction-card.pinned {
  border-color: rgba(241,196,15,0.4);
  background: linear-gradient(135deg, rgba(241,196,15,0.04) 0%, var(--card) 100%);
  backdrop-filter: blur(4px);
}
.instruction-card.pinned::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(241,196,15,0.2);
  pointer-events: none;
}

.instr-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
}
.instr-card-title-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.instr-pin-icon { color: var(--gold); font-size: 13px; flex-shrink: 0; }
.instr-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.instr-card-actions { display: flex; gap: 5px; flex-shrink: 0; }

.instr-cat-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
/* Category badge colors */
.instr-Opening   { background: rgba(241,196,15,0.18); color: #f4d03f; }
.instr-Closing   { background: rgba(142,68,173,0.18); color: #bb8fce; }
.instr-Production { background: rgba(231,76,60,0.18); color: #e74c3c; }
.instr-General   { background: rgba(102,102,102,0.18); color: #999; }
.instr-Announcement { background: rgba(52,152,219,0.18); color: #5dade2; }
.instr-Recipe    { background: rgba(230,126,34,0.18); color: #e67e22; }
.instr-Policy    { background: rgba(39,174,96,0.18); color: #58d68d; }

.instr-card-body {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}
.instr-card-body p { margin-bottom: 6px; }
.instr-card-body strong { color: var(--text); font-weight: 600; }
.instr-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.instr-checkbox-item input[type="checkbox"] { accent-color: var(--red-bright); width: 14px; height: 14px; }

.instr-card-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.instructions-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1/-1;
}
.instructions-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: var(--border-light); }

/* ═══════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
  animation: overlayIn 0.18s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 20px 20px 16px 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
  animation: slideUp 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--red-bright); border-color: var(--red-bright); }

.modal-body { padding: 18px 20px; }
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ── Form elements ────────────────────────────────────────── */
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.form-group label .hint {
  font-size: 11px;
  font-weight: 400;
  color: #555;
  text-transform: none;
  letter-spacing: 0;
}
.form-row {
  display: flex;
  gap: 14px;
}
.form-control {
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: var(--transition);
  color-scheme: dark;
}
.form-control:focus { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }
.form-control option { background: var(--panel); color: var(--text); }
textarea.form-control { resize: vertical; line-height: 1.5; }

/* Toggle switch */
.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: block;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-light);
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--red-bright); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Color swatches */
.color-swatch-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  pointer-events: all;
  animation: toastIn 0.25s ease;
  max-width: 340px;
}
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast.fadeout { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut {
  to { transform: translateX(20px); opacity: 0; }
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red-bright); }
.toast.info    { border-left: 3px solid var(--blue); }
.toast i { font-size: 15px; }
.toast.success i { color: var(--green); }
.toast.error   i { color: var(--red-bright); }
.toast.info    i { color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   LOADING OVERLAY
═══════════════════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--red-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-ring.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topbar { padding: 0 14px; height: 54px; }
  .topbar-center { flex-direction: column; gap: 2px; }
  .week-nav { display: none; }
  .tab-btn span { display: none; }
  .tab-content { padding: 14px; }
  .schedule-toolbar, .production-toolbar, .instructions-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-row { flex-direction: column; }
  .instructions-list { grid-template-columns: 1fr; }
  .modal-sheet { border-radius: 20px 20px 0 0; max-height: 95vh; }
  .toast-container { bottom: 12px; right: 12px; left: 12px; }
  .tab-btn { padding: 5px 10px; font-size: 12px; }
}

/* ── Cookie Inventory Checks UI ── */
.production-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.production-right.glass-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.inventory-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.inventory-title i {
  color: var(--gold);
}

.inventory-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.inventory-subtitle {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.active-check-requests {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.check-request-card {
  transition: var(--transition);
}
.check-request-card:hover {
  background: rgba(255,255,255,0.04) !important;
  border-color: var(--border-light) !important;
}

@media (max-width: 900px) {
  .production-layout {
    grid-template-columns: 1fr;
  }
}
