
.snitz-staff{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

/*
  IMPORTANT
  Without a border-box reset, inputs/selects with width:100% overflow their grid
  cells once padding + border are added, causing the "overlapping/out of the box"
  look on mobile.
*/
.snitz-staff *,
.snitz-staff *::before,
.snitz-staff *::after{
  box-sizing: border-box;
}

.snitz-staff input,
.snitz-staff select,
.snitz-staff textarea{
  max-width: 100%;
}


/* Top app bar + menu dropdown */
.snitz-appbar{
  position: sticky;
  top: 0;
  z-index: 30;
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border:2px solid #111;
  border-radius: 18px;
  background:#fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.snitz-appbar__left{ display:flex; align-items:center; gap:10px; min-width: 0; }
.snitz-appbar__logo{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border:2px solid #111;
  object-fit: cover;
  flex: 0 0 auto;
}
.snitz-appbar__brand{
  font-weight: 1000;
  letter-spacing: .6px;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snitz-nav{
  border:2px solid #111;
  border-radius: 14px;
  padding: 8px 10px;
  font-weight: 900;
  background:#fff;
  max-width: 55vw;
}

/* Stock overview */
.snitz-stock-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px){
  .snitz-stock-grid{ grid-template-columns: 1fr; }
}

/* Waste rows (production runs) */
.snitz-waste-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.snitz-waste-list{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.snitz-waste-row{
  display:flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border:1px solid #e8e8e8;
  border-radius: 14px;
  background:#fafafa;
}
.snitz-waste-row .snitz-input,
.snitz-waste-row select{
  flex: 1 1 140px;
}
.snitz-waste-row .snitz-waste-qty{ flex: 0 0 120px; }
.snitz-waste-row .snitz-waste-remove{ flex: 0 0 auto; }

.snitz-staff__top{ display:flex; align-items:baseline; gap:10px; margin-bottom: 12px; }
.snitz-staff__brand{ font-weight: 1000; letter-spacing:.6px; font-size: 22px; }
.snitz-staff__subtitle{ font-weight: 900; opacity:.7; }

.snitz-cards{ display:flex; flex-direction:column; gap: 12px; }

/* Tile navigation (menu) */
.snitz-tiles{ display:flex; gap:10px; overflow-x:auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.snitz-tiles::-webkit-scrollbar{ height: 8px; }
.snitz-tiles::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.18); border-radius: 999px; }
.snitz-tile{ flex: 0 0 auto; display:flex; align-items:center; gap:8px; border:2px solid #111; background:#fff; color:#111; border-radius: 16px; padding: 10px 12px; font-weight: 900; cursor:pointer; user-select:none; box-shadow: 0 2px 0 rgba(0,0,0,.05); }
.snitz-tile__icon{ font-size: 16px; line-height: 1; }
.snitz-tile__label{ font-size: 13px; line-height: 1; white-space: nowrap; }
.snitz-tile.is-active{ background:#111; color:#fff; }
.snitz-tile:focus{ outline: 3px solid rgba(0,0,0,.25); outline-offset: 2px; }

/* Panels */
.snitz-card.is-hidden{ display:none; }

.snitz-card{ border:2px solid #111; border-radius: 18px; overflow:hidden; background:#fff; box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.snitz-card__header{ padding: 12px 14px; border-bottom: 1px solid #eee; display:flex; justify-content:space-between; align-items:flex-start; gap:10px; cursor:pointer; user-select:none; }
.snitz-card__header-right{ display:flex; align-items:center; gap:10px; }
.snitz-card__chev{ display:inline-flex; align-items:center; justify-content:center; width: 26px; height: 26px; border:2px solid #111; border-radius: 999px; font-weight: 1000; font-size: 14px; line-height: 1; }
.snitz-card.is-collapsed .snitz-card__chev{ transform: rotate(-90deg); }
.snitz-card.is-collapsed .snitz-card__body{ display:none; }
.snitz-card__header button{ cursor:pointer; }
.snitz-card__title{ font-weight: 1000; }
.snitz-card__meta{ font-size: 12px; opacity:.75; margin-top: 2px; }
.snitz-card__body{ padding: 14px; }

.snitz-pill{ border:2px solid #111; padding: 6px 10px; border-radius: 999px; font-weight: 900; font-size: 12px; }
.snitz-pill--on{ background:#0b6; border-color:#0b6; color:#fff; }
.snitz-pill--off{ background:#111; color:#fff; }

.snitz-label{ font-size: 12px; font-weight: 900; opacity:.75; display:block; margin-bottom: 6px; }
.snitz-input{ width:100%; border:2px solid #111; border-radius: 12px; padding: 10px; font-weight: 600; }
textarea.snitz-input{ resize: vertical; }

.snitz-row{ display:flex; gap:10px; }
.snitz-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px){ .snitz-grid{ grid-template-columns: 1fr; } }

.snitz-btn{ border:2px solid #111; background:#111; color:#fff; border-radius: 14px; padding: 10px 14px; font-weight: 900; cursor:pointer; }
.snitz-btn--good{ background:#0b6; border-color:#0b6; }
.snitz-btn--accent{ background:#0a66ff; border-color:#0a66ff; }
.snitz-btn--dark{ background:#111; }
.snitz-btn--danger{ background:#c00; border-color:#c00; }
.snitz-btn--tiny{ padding: 7px 10px; border-radius: 12px; font-size: 12px; }

.snitz-btn:disabled{ opacity:.35; cursor:not-allowed; }

.snitz-small{ margin-top: 10px; font-size: 12px; opacity:.75; }
.snitz-list{ display:flex; flex-direction:column; gap:10px; }
.snitz-item{ border:1px solid #e8e8e8; border-radius: 14px; padding: 10px 12px; background:#fafafa; }
.snitz-item__top{ display:flex; justify-content:space-between; gap:8px; align-items:center; }
.snitz-item__title{ font-weight: 900; }
.snitz-item__meta{ font-size: 12px; opacity:.75; margin-top: 4px; }
.snitz-item__actions{ display:flex; gap:8px; margin-top: 10px; flex-wrap:wrap; }
.snitz-link{ font-weight: 900; }
.snitz-footer{ margin-top: 14px; }

/* Recipes viewer */
.snitz-recipe-view{ margin-top: 12px; }
.snitz-recipe__head{ border:1px solid #e8e8e8; border-radius: 14px; padding: 10px 12px; background:#fafafa; }
.snitz-recipe__title{ font-weight: 1000; }
.snitz-recipe__meta{ font-size: 12px; opacity:.75; margin-top: 4px; }
.snitz-recipe__list{ margin-top: 10px; display:flex; flex-direction:column; gap:10px; }

.snitz-colspan-2{ grid-column: 1 / -1; }

/*
  PWA fullscreen (hide theme chrome)
  - hides WP theme header/footer/title so the PWA fits nicely on phone screens
  - scoped to pages that contain the shortcodes (body.snitz-pwa)
*/
body.snitz-pwa{ margin:0 !important; padding:0 !important; }

/* Hide common theme headers/footers (classic + block themes) */
body.snitz-pwa .wp-site-blocks > header,
body.snitz-pwa .wp-site-blocks > footer,
body.snitz-pwa header.wp-block-template-part,
body.snitz-pwa footer.wp-block-template-part,
body.snitz-pwa #masthead,
body.snitz-pwa #colophon,
body.snitz-pwa .site-header,
body.snitz-pwa .site-footer,
body.snitz-pwa .header,
body.snitz-pwa .footer{
  display:none !important;
}

/* Hide page/post title blocks */
body.snitz-pwa .entry-header,
body.snitz-pwa header.entry-header,
body.snitz-pwa h1.entry-title,
body.snitz-pwa .page-header,
body.snitz-pwa .page-title,
body.snitz-pwa .wp-block-post-title,
body.snitz-pwa .wp-block-query-title,
body.snitz-pwa .elementor-page-title{
  display:none !important;
}

/* Remove theme container padding/margins so the app can be edge-to-edge */
body.snitz-pwa #page,
body.snitz-pwa .site,
body.snitz-pwa .wp-site-blocks,
body.snitz-pwa .site-content,
body.snitz-pwa main,
body.snitz-pwa .site-main,
body.snitz-pwa .content-area,
body.snitz-pwa .entry-content,
body.snitz-pwa .page-content{
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
}

/* Optional: remove the plugin top/foot notes for a cleaner phone UI */
body.snitz-pwa .snitz-staff__top,
body.snitz-pwa .snitz-footer{
  display:none !important;
}

/* Let the app span full width on PWA pages */
body.snitz-pwa .snitz-staff{
  max-width:none;
  margin:0;
  padding: 12px;
}


/* Recipe method / SOP */
.snitz-recipe__method{
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
}
.snitz-pre{
  margin: 6px 0 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
}
.snitz-muted{
  opacity: 0.75;
}


/* Recipe attachments */
.snitz-recipe__attachments{ margin-top: 10px; }
.snitz-attachments{ margin-top: 8px; display:flex; flex-wrap:wrap; gap:10px; }
.snitz-attachment__img img{ display:block; max-width: 180px; height:auto; border-radius: 12px; border:1px solid #e8e8e8; background:#fff; }
.snitz-attachment-file{ border:1px solid #e8e8e8; border-radius: 12px; padding: 8px 10px; background:#fafafa; font-size: 13px; }


/* Users manager */
.snitz-user-create{
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
}
.snitz-user-create.is-hidden{ display:none; }

.snitz-user-edit{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.18);
}
.snitz-user-edit.is-hidden{ display:none; }
