:root {
  --bg: #0b0c0d;
  --panel: #202226;
  --panel-border: #2d2f33;
  --cyan: #00b4bb;
  --teal: #26d2d2;
  --lime: #a6e22e;
  --neon-yellow: #d9ff3b;
  --graphite: #2d2d2d;
  --silver: #b6b6b6;
  --text: #f2f2f2;
  --text-dim: #9a9ea3;
  --status-progress: #e2b23c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
}

.bg-art {
  position: fixed;
  inset: 0;
  background: url('assets/background.png') center/cover no-repeat;
  opacity: 0.7;
  z-index: -1;
}

/* Diagonal glow accent lines — echoes the brand background art, reused
   behind cards/sections for texture beyond just the fixed page backdrop. */
.glow-line {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}
.glow-line.cyan {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px 2px var(--cyan);
}
.glow-line.lime {
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 12px 2px var(--lime);
}

/* Header + tabs */
.site-header {
  padding: 28px 24px 0;
  text-align: center;
}
.logo-home-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-block;
}
.logo {
  max-width: 460px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(0, 180, 187, 0.35)) drop-shadow(0 0 30px rgba(166, 226, 46, 0.15));
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--panel-border);
}
.tab-btn {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.tab-btn.active {
  color: var(--bg);
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  border-color: transparent;
  font-weight: 600;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Home / hero */
.hero { text-align: center; position: relative; }
.hero-glow-wrap { position: relative; padding: 10px 0 4px; }
.hero h1 {
  font-size: 32px;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}
.hero-tagline {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 8px;
  position: relative;
  z-index: 1;
}
.hero-tagline .tag-cyan { color: var(--cyan); }
.hero-tagline .tag-white { color: var(--text); }
.hero-tagline .tag-lime { color: var(--lime); }
.hero-subtitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--silver);
  margin: 0 0 20px;
  position: relative;
  z-index: 1;
}
.intro {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 24px;
}
.hero-image {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  margin-bottom: 24px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Build-A-Fidget showcase — product spin videos + a personal touch */
.showcase-heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--silver);
  text-align: center;
  margin: 32px 0 12px;
}
.photo-placeholder-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}
@media (max-width: 560px) {
  .photo-placeholder-row { grid-template-columns: 1fr; }
}
.showcase-tile {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(0, 180, 187, 0.15);
}
.showcase-tile video,
.showcase-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-tile-feature { display: flex; align-items: flex-end; }
.showcase-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

/* App download — placeholder card until the app itself is ready to
   publish. Swap for real store badges/QR once it's live. */
.app-coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 420px;
  margin: 24px auto 0;
  padding: 16px 20px;
  border: 1px solid var(--lime);
  border-radius: 14px;
  background: rgba(166, 226, 46, 0.06);
}
.app-coming-soon-icon { font-size: 28px; }
.app-coming-soon-text { display: flex; flex-direction: column; text-align: left; }
.app-coming-soon-text strong { color: var(--text); font-size: 15px; }
.app-coming-soon-text span { color: var(--lime); font-size: 13px; font-weight: 600; }
/* Feature row — matches the brand flyer's bottom icon strip */
.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 620px;
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--panel-border);
}
@media (max-width: 560px) {
  .feature-row { grid-template-columns: repeat(2, 1fr); }
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-dim);
}
.feature-item:nth-child(odd) .feature-icon { color: var(--cyan); }
.feature-item:nth-child(even) .feature-icon { color: var(--lime); }
.feature-icon { width: 36px; height: 36px; }

/* Buttons */
.btn-accent, .btn-outline {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
}
.btn-accent {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: #0b0c0d;
}
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text);
}
.btn-accent.full, .btn-outline.full { width: 100%; margin-top: 8px; }

.back-link {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  padding: 0 0 16px;
}

/* Cards (catalog + events) */
.card-grid {
  display: grid;
  gap: 14px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
}
.card:hover { border-color: var(--cyan); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card .muted { color: var(--text-dim); font-size: 14px; margin: 0 0 6px; }
.card .price { color: var(--lime); font-weight: 700; margin: 0; }
.card .event-location { color: var(--cyan); font-size: 14px; margin: 0 0 4px; }
.card .event-date { color: var(--text-dim); font-size: 13px; margin: 0; }

/* Standard Prints — image-first "ad" style cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.baf-section {
  margin-bottom: 32px;
}
.baf-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.baf-section-header img {
  height: 32px;
  width: auto;
}
.baf-section-header h3 {
  margin: 0;
  font-size: 20px;
}
.category-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.category-tile {
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1.6 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.category-tile:hover { border-color: var(--cyan); }
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.explore-catalog-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #000;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.product-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.product-card:hover { border-color: var(--cyan); }
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--panel-border);
}
.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 12px;
}
.product-price-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: var(--bg);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 8px;
}
.product-name {
  padding: 10px 12px 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.loading { color: var(--text-dim); text-align: center; padding: 30px 0; }

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
}
.form input, .form select, .form textarea {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.form-message { font-size: 14px; min-height: 18px; }
.form-message.success { color: var(--lime); }
.form-message.error { color: #ff6b6b; }

h2 { font-size: 22px; margin-bottom: 4px; }
.section-subhead { font-size: 17px; color: var(--text-dim); margin: 28px 0 12px; }
.muted { color: var(--text-dim); }
.back-home-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
  display: inline-block;
}
.back-home-link:hover { color: var(--cyan); }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 20px;
}
.footer-admin-link {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
}
.footer-admin-link:hover { opacity: 0.85; }
.footer-contact-link {
  color: inherit;
  font-size: 13px;
  opacity: 0.5;
  text-decoration: none;
}
.footer-contact-link:hover { opacity: 0.85; }

/* ============================================================
   Admin panel (Orders / Catalog / Events management)
   ============================================================ */
.hidden { display: none !important; }

#tab-admin.tab-panel.active { display: block; }
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.admin-login-box {
  max-width: 340px;
  margin: 60px auto;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  text-align: center;
}
.admin-login-box h2 { margin-top: 0; }
.admin-login-box input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.admin-layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-brand {
  padding: 0 20px 18px;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 16px;
  text-align: center;
}
.admin-sidebar-logo {
  max-width: 130px;
  width: 100%;
  height: auto;
}
.admin-sidebar-group { padding: 0 12px; margin-bottom: 18px; }
.admin-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 10px 6px;
}
.admin-sidebar .section-tab-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
  margin-bottom: 2px;
}
.admin-sidebar .section-tab-btn:hover { background: var(--bg); color: var(--text); }
.admin-sidebar .section-tab-btn.active {
  background: linear-gradient(90deg, rgba(0,180,187,0.14), rgba(166,226,46,0.06));
  color: var(--cyan);
  border-left-color: var(--cyan);
}
.admin-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 0;
  border-top: 1px solid var(--panel-border);
}
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 60px;
  max-width: 1100px;
}
@media (max-width: 880px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    align-items: center;
  }
  .admin-sidebar-brand, .admin-sidebar-footer { display: none; }
  .admin-sidebar-group { display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; }
  .admin-sidebar-label { display: none; }
  .admin-sidebar .section-tab-btn { border-radius: 8px; border-left: none; white-space: nowrap; }
  .admin-content { padding: 16px; max-width: none; }
}

.section-panel { display: none; }
.section-panel.active { display: block; }

.order-card, .item-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.order-photo, .item-photo {
  width: 72px; height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-border);
  flex-shrink: 0;
}
.order-main, .item-main { flex: 1; min-width: 0; }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-title, .item-title { font-weight: 700; font-size: 16px; }
.order-secondary-line { font-size: 13px; color: var(--text-dim); margin-top: 1px; }
.order-type-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-left: 8px;
}
.order-meta, .item-meta { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.order-desc { margin-top: 8px; font-size: 14px; line-height: 1.4; }
.order-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
select.status-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.add-item-btn {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: var(--bg);
  border: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  margin: 20px 0;
  font-family: inherit;
}
.item-form {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item-form label { font-size: 13px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.item-form input, .item-form textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.item-form .form-row { display: flex; gap: 12px; }
.item-form .form-row > label { flex: 1; }
.item-form-actions { display: flex; gap: 10px; margin-top: 4px; }
.item-form-actions button {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
}
.item-form-actions .save-btn { background: var(--cyan); color: var(--bg); border-color: var(--cyan); font-weight: 700; }
.item-actions { display: flex; gap: 8px; margin-top: 10px; }
.item-actions button {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
}
.item-actions button:hover { border-color: var(--cyan); color: var(--cyan); }
.inactive-badge {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Production schedule */
.printer-picker { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.printer-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.printer-chip-photo {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-border);
  border: 1px solid var(--panel-border);
}
.printer-chip.selected .printer-chip-photo { border: 2px solid var(--cyan); }
.printer-chip-name { font-size: 12px; color: var(--text-dim); }
.printer-chip.selected .printer-chip-name { color: var(--text); font-weight: 600; }
.prod-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.job-actions { display: flex; gap: 12px; margin-top: 8px; }
.job-actions button {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.job-actions .start-btn { color: var(--cyan); }
.job-actions .complete-btn { color: var(--lime); }
.job-actions .delete-btn { color: #ff6b6b; }

/* Maintenance */
.maint-task-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.maint-task-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.maint-task-name { font-weight: 700; font-size: 14px; }
.maint-task-due { font-size: 12px; color: var(--text-dim); }
.maint-task-due.overdue { color: #ff6b6b; font-weight: 700; }
.maint-task-instructions { font-size: 13px; color: var(--text-dim); margin: 6px 0; }
.maint-done-btn {
  background: none; border: none; color: var(--lime);
  font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; font-family: inherit;
}
.notif-banner {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}
.calendar-grid {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 14px;
}
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.calendar-header button { background: none; border: none; color: var(--cyan); font-size: 16px; cursor: pointer; }
.calendar-header span { font-weight: 700; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  gap: 2px;
}
.calendar-day.selected { background: rgba(0, 180, 187, 0.3); }
.calendar-day .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); visibility: hidden; }
.calendar-day.due .dot { visibility: visible; }
.calendar-day.blank { cursor: default; }

/* Home entry buttons */
.entry-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  margin: 0 auto;
}
.entry-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: var(--bg);
  border: none;
  border-radius: 14px;
  padding: 18px 22px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px -4px rgba(0, 180, 187, 0.45), 0 4px 20px -4px rgba(166, 226, 46, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.entry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgba(0, 180, 187, 0.6), 0 8px 28px -4px rgba(166, 226, 46, 0.4);
}
.entry-btn:active { transform: translateY(0); }
.entry-btn-arrow { opacity: 0.6; font-weight: 400; }
.instagram-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.instagram-link:hover { opacity: 0.85; }

/* Order detail modal */
#order-detail-modal.hidden { display: none; }
#order-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.order-detail-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}
.order-detail-box h3 { margin-top: 0; }
.order-detail-row { margin-bottom: 10px; font-size: 14px; }
.order-detail-row .label { color: var(--text-dim); display: block; font-size: 12px; margin-bottom: 2px; }
.order-detail-actions { display: flex; gap: 10px; margin-top: 16px; }

/* Order/Production row dropdowns */
.order-dropdowns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.order-dropdowns select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.printer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 12px;
}
.printer-banner img, .printer-banner .printer-chip-photo {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
}
.printer-banner-name { font-size: 20px; font-weight: 700; }
.printer-banner-model { font-size: 13px; color: var(--text-dim); }

/* Color Manager */
.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  flex-shrink: 0;
  object-fit: cover;
}
.color-card { display: flex; align-items: center; gap: 12px; }
.color-card .item-main { flex: 1; }
.low-stock-badge { color: #ff6b6b; font-size: 11px; font-weight: 700; }

/* Printable label (shown inside the modal, also targeted by print CSS) */
.print-label-box {
  background: #fff;
  color: #000;
  width: 260px;
  margin: 0 auto;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.print-label-swatch { width: 100%; height: 50px; border-radius: 6px; margin-bottom: 8px; }
.print-label-box h3 { margin: 4px 0; font-size: 15px; }
.print-label-box .meta { font-size: 11px; color: #555; margin: 2px 0; }
.print-label-box .temps { font-size: 10px; color: #333; margin: 2px 0; }
.print-label-box img.qr { width: 100px; height: 100px; margin-top: 10px; }

@media print {
  body * { visibility: hidden; }
  .print-label-box, .print-label-box * { visibility: visible; }
  .print-label-box { position: fixed; top: 0; left: 0; }
}

/* Customer-facing swatch color picker (Standard Prints + Custom Prints) */
.swatch-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.swatch-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}
.swatch-choice .dot {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: block;
  border: 1px solid rgba(255,255,255,0.3);
}
.swatch-choice.selected {
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  border-color: var(--cyan);
  border-width: 2px;
  box-shadow: 0 0 0 1px var(--cyan);
}
.swatch-choice:disabled { opacity: 0.4; cursor: not-allowed; }
.swatch-count { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* Small reference chip for admin "selected colors" summaries (Catalog
   form's color summary, per-part color summary) — distinct from
   .swatch-choice above, which is the big customer-facing picker card.
   These just need to show what's already chosen, compactly. */
.color-chip-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text);
}

/* Color Manager: filter bar + compact grid */
.color-filter-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 14px 0;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
}
.color-filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
}
.color-filter-bar select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  min-width: 130px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.color-tile {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.color-tile-swatch {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.color-tile-body { padding: 8px 10px 10px; }
.color-tile-name {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.color-tile-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 0 6px;
  line-height: 1.3;
}
.color-tile-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.color-tile-actions button {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
}
.color-tile-actions button:hover { border-color: var(--cyan); color: var(--cyan); }
.low-stock-badge-sm {
  font-size: 9px;
  color: #ff6b6b;
  font-weight: 700;
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  padding: 1px 5px;
}

/* Parts Inventory */
.part-inventory-card { display: flex; align-items: center; gap: 12px; }
.part-inventory-photo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--panel-border);
  background: var(--panel-border);
  flex-shrink: 0;
}
.part-low-badge {
  color: #ff6b6b;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #ff6b6b;
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ============================================================
   Catalog Product Editor — tabbed redesign
   ============================================================ */
.product-editor {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
}
.product-editor-header {
  padding: 20px 20px 0;
}
.product-editor-header .pe-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.product-editor-header .pe-name-row input[type="text"],
.product-editor-header .pe-name-row input:not([type]) {
  font-size: 22px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text);
  padding: 2px 0;
  flex: 1;
  min-width: 0;
}
.product-editor-header .pe-name-row input:focus {
  outline: none;
  border-bottom: 1px solid var(--cyan);
}
.pe-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pe-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--bg);
  color: var(--text-dim);
}
.pe-badge.pe-badge-price {
  color: var(--lime);
  border-color: var(--lime);
}
.pe-badge.pe-badge-public { color: var(--cyan); border-color: var(--cyan); }

.product-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--panel-border);
  padding: 0 20px;
  overflow-x: auto;
}
.product-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.product-tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.product-tab-panel {
  display: none;
  padding: 16px 18px;
}
.product-tab-panel.active { display: block; }
.product-tab-panel label,
.product-tab-panel .form-row > label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.product-tab-panel input:not([type="checkbox"]):not([type="radio"]),
.product-tab-panel select,
.product-tab-panel textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.product-tab-panel input[type="checkbox"],
.product-tab-panel input[type="radio"] {
  width: auto;
  accent-color: var(--cyan);
}
.pe-prefixed-input {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0 9px;
}
.pe-prefixed-input span {
  color: var(--text-dim);
  font-size: 13px;
  padding-right: 2px;
}
.pe-prefixed-input input {
  border: none !important;
  background: none !important;
  padding: 6px 0 6px 2px !important;
  width: 100%;
}
.product-tab-panel .form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.product-tab-panel .form-row > label { flex: 1; min-width: 180px; margin-bottom: 0; }
.pe-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}
.pe-section-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
}

/* Part cards (Printed Parts / Purchased Parts) */
.part-card-v2 {
  display: flex;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.part-card-v2-photo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-border);
  border: 1px solid var(--panel-border);
  flex-shrink: 0;
}
.part-card-v2-body { flex: 1; min-width: 0; }
.part-card-v2-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.part-card-v2-title-row input[type="text"],
.part-card-v2-title-row input:not([type]) {
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--panel-border);
  color: var(--text);
  padding: 2px 0;
  flex: 1;
  min-width: 0;
}
.part-card-v2-title-row input:focus { outline: none; border-bottom-color: var(--cyan); }
.part-card-v2-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 96px));
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.part-card-v2-stats label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.part-card-v2-stats input,
.part-card-v2-stats select {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text);
  padding: 4px 6px;
  font-size: 12px;
  font-family: inherit;
  width: 100%;
}
.part-card-v2-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}
.part-card-v2-actions button {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
}
.part-card-v2-actions button:hover { border-color: var(--cyan); color: var(--cyan); }
.part-card-v2-actions button.pe-delete:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* Costing tab */
/* Options tab */
.options-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .options-columns { grid-template-columns: 1fr; }
}
.pe-radio-group { display: flex; flex-direction: column; gap: 8px; }
.product-tab-panel .pe-radio {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 0;
}
.pe-radio input { width: auto; }
.pe-radio-disabled { color: var(--text-dim); cursor: not-allowed; }
.pe-radio .muted { font-size: 11px; }
.pe-color-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  max-height: 320px;
  overflow-y: auto;
}
@media (max-width: 500px) {
  .pe-color-checklist { grid-template-columns: 1fr; }
}
.product-tab-panel .pe-color-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 4px;
  cursor: pointer;
  margin-bottom: 0;
}
.pe-color-check input { width: auto; }
.pe-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.costing-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 12px;
}
@media (max-width: 800px) {
  .costing-grid { grid-template-columns: 1fr; }
}
.costing-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
}
.costing-card h4 { margin: 0 0 10px; font-size: 13px; }
.cost-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--panel-border);
}
.cost-breakdown-row.total {
  border-bottom: none;
  border-top: 1px solid var(--panel-border);
  margin-top: 4px;
  padding-top: 10px;
  font-weight: 700;
}
.cost-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cost-donut {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cost-donut::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: var(--bg);
}
.cost-donut-label {
  position: relative;
  z-index: 1;
  text-align: center;
}
.cost-donut-label .pct { font-size: 22px; font-weight: 800; display: block; }
.cost-donut-label .sub { font-size: 10px; color: var(--text-dim); }
.cost-donut-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.cost-donut-legend span { display: flex; align-items: center; gap: 5px; }
.cost-donut-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
