body { margin: 0; font-family: "Segoe UI", Roboto, system-ui, sans-serif; background: #eef1f6; color: #1c2434; font-size: 14px; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1.25rem; background: #003366; color: #fff; gap: 1rem; flex-wrap: wrap; border-bottom: 3px solid #c8102e; }

.top a { color: #fff; }

.top-user { font-size: 0.85rem; }

.role-badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; margin-left: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }

.wrap { display: flex; min-height: calc(100vh - 52px); }

.side { width: 210px; background: #fff; border-right: 1px solid #d8dee8; padding: 0.75rem 0; }

.side a { display: block; padding: 0.55rem 1rem; color: #3a4558; text-decoration: none; font-size: 0.86rem; font-weight: 500; border-left: 3px solid transparent; }

.side a.active, .side a:hover { background: #f0f4fa; color: #003366; border-left-color: #c8102e; }

.main { flex: 1; padding: 1.15rem 1.25rem; }

.card { background: #fff; border: 1px solid #d8dee8; border-radius: 6px; padding: 1rem 1.1rem; margin-bottom: 0.9rem; box-shadow: 0 1px 2px rgba(28,36,52,0.04); }

.card-inline { padding: 0.7rem 1rem; }

.card h2 { margin-top: 0; font-size: 1.05rem; color: #003366; font-weight: 700; }

.card h3 { font-size: 0.95rem; color: #003366; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 140px; gap: 0.85rem; align-items: end; }

img.preview { max-width: 100%; max-height: 160px; border: 1px solid #d8dee8; background: #fafbfc; border-radius: 4px; }

button, .btn { background: #003366; color: #fff; border: 0; padding: 0.5rem 0.95rem; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 600; font-size: 0.88rem; }

.btn-secondary { background: #5a6478; }
.morning-hops { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.morning-rt { display: inline; margin: 0; }

label { display: block; margin: 0.45rem 0; font-weight: 500; font-size: 0.88rem; }

input[type=text], input[type=password], input[type=email], input[type=file], input[type=search], input[type=number], input[type=date], select {

  width: 100%; max-width: 420px; padding: 0.42rem 0.5rem; border: 1px solid #c5ced9; border-radius: 4px; font-size: 0.9rem;

}

.flash { padding: 0.65rem 0.9rem; border-radius: 4px; margin-bottom: 0.85rem; font-size: 0.9rem; }

.flash-ok { background: #e8f2ea; color: #1b5e20; border: 1px solid #c8e6c9; }

.flash-error { background: #fdecea; color: #b71c1c; border: 1px solid #f5c6c6; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #eef1f6; }

.login-box { background: #fff; padding: 1.75rem; border-radius: 6px; border: 1px solid #d8dee8; width: min(400px, 92vw); box-shadow: 0 4px 20px rgba(28,36,52,0.08); }

.login-mascot { width: 72px; height: 72px; margin: 0 auto 1rem; display: block; object-fit: contain; }

.cms-mascot-welcome { width: 64px; height: 64px; float: right; margin: 0 0 0.5rem 1rem; object-fit: contain; }

.hint { font-size: 0.82rem; color: #5a6478; }

table { width: 100%; border-collapse: collapse; }

th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid #edf0f5; font-size: 0.86rem; vertical-align: top; }

th { background: #f6f8fb; color: #3a4558; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.role-table th { background: #f6f8fb; }



.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin: 0.75rem 0; }

.color-field span { display: block; font-weight: 600; margin-bottom: 0.25rem; }

.color-field input[type=color] { width: 100%; height: 2.5rem; padding: 0.15rem; border: 1px solid #c5ced9; border-radius: 4px; cursor: pointer; }

.color-field small { display: block; margin-top: 0.2rem; color: #5a6478; font-size: 0.75rem; }

.brand-colors-form input[type=text] { max-width: 100%; }

.brand-preview { margin: 1rem 0; border: 1px solid #d8dee8; border-radius: 6px; overflow: hidden; }

.brand-preview-bar { background: var(--header-bg); color: var(--header-text); padding: 0.65rem 0.85rem; font-weight: 700; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 3px solid var(--accent); }

.brand-preview-body { background: var(--bg); padding: 0.75rem 0.85rem; font-size: 0.88rem; }

.brand-preview-price { color: var(--sale); font-weight: 800; font-size: 1.1rem; margin-right: 0.35rem; }

.brand-preview-flyer-name {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  background: var(--primary);
  color: var(--flyer-store-name, #fff);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
}



.flyer-add-row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: flex-end; margin: 0; }

.flyer-add-row label { margin: 0; font-size: 0.78rem; }

.flyer-add-row input { max-width: none; }



.map-editor-card { margin-top: 1.25rem; }

.map-editor-modes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }

.map-mode {
  border: 1px solid #c5ced9;
  background: #fff;
  color: #1c2434;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.map-mode.is-active {
  background: #003366;
  border-color: #003366;
  color: #fff;
}

.map-editor-toolbar { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; align-items: flex-end; margin-bottom: 0.65rem; }

.map-editor-toolbar label { margin: 0; flex: 1 1 140px; max-width: 200px; }

.map-editor-toolbar button { flex: 0 0 auto; }

.map-editor-coords { font-size: 0.82rem; color: #5a6478; align-self: center; min-width: 180px; }

.map-editor-status { font-size: 0.82rem; min-height: 1.2rem; margin-bottom: 0.45rem; }

.map-editor-status.is-ok { color: #1b5e20; }

.map-editor-status.is-error { color: #b71c1c; }

.map-fre-defs {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #f5f8fc;
  border: 1px solid #d0d8e4;
  border-radius: 6px;
  max-width: 920px;
}

.map-fre-defs__title {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: #003366;
  font-weight: 700;
}

.map-fre-defs__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
}

@media (max-width: 720px) {
  .map-fre-defs__list { grid-template-columns: 1fr; }
}

.map-fre-defs__item { margin: 0; }

.map-fre-defs__item dt {
  margin: 0 0 0.15rem;
  font-size: 0.86rem;
  color: #1c2434;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.map-fre-defs__item dd {
  margin: 0;
  font-size: 0.8rem;
  color: #3a4558;
  line-height: 1.35;
}

.map-fre-defs__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}

.map-fre-defs__glyph--endcap { background: #c8102e; }
.map-fre-defs__glyph--mid { background: #00838f; }
.map-fre-defs__glyph--strike { background: #ef6c00; }
.map-fre-defs__glyph--secondary { background: #ad1457; }
.map-fre-defs__glyph--casket { background: #0277bd; border-radius: 999px; font-size: 0.65rem; }
.map-fre-defs__glyph--vcasket {
  background: #01579b;
  border-radius: 999px;
  font-size: 0.65rem;
  width: 0.85rem;
  height: 1.35rem;
}

.map-fre-defs__foot {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #5a6478;
}

.map-editor-canvas { position: relative; display: inline-block; max-width: 100%; border: 2px solid #c5ced9; background: #fafbfc; cursor: default; line-height: 0; }

.map-editor-canvas.is-place-mode { cursor: crosshair; outline: 2px solid #c8102e; outline-offset: 2px; }

.map-editor-canvas.is-link-mode { cursor: pointer; outline: 2px solid #1565c0; outline-offset: 2px; }

.map-editor-canvas.is-block-mode { cursor: crosshair; outline: 2px solid #b71c1c; outline-offset: 2px; }

.map-editor-canvas.has-pending { cursor: crosshair; }

.map-editor-canvas img { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; vertical-align: top; }

.map-editor-canvas svg { position: absolute; left: 0; top: 0; z-index: 2; touch-action: none; }

.map-editor-hit { cursor: inherit; }

.map-editor-node { cursor: grab; }

.map-editor-node.is-selected circle { stroke: #c8102e; stroke-width: 3; }

/* Node labels: hidden until hover or selection */
.map-editor-node-label {
  opacity: 0;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  transition: opacity 0.12s ease;
}

.map-editor-node:hover .map-editor-node-label,
.map-editor-node.is-selected .map-editor-node-label,
.map-editor-node-label.is-visible {
  opacity: 1;
}

.map-editor-obstacle { cursor: pointer; }

.map-editor-obstacle.is-selected { stroke-width: 3; }

.map-editor-edge-hit { cursor: pointer; }

#map-editor-save { background: #1b5e20; }

#map-editor-save:disabled { opacity: 0.45; cursor: not-allowed; background: #1b5e20; }

#map-editor-delete { background: #b71c1c; }

#map-editor-delete:disabled { opacity: 0.45; cursor: not-allowed; }

.product-pin-editor { margin-top: 1rem; }

.product-pin-steps { margin-bottom: 1rem; }

.product-pin-search-row { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: flex-end; margin-bottom: 0.45rem; }

.product-pin-search-wrap { flex: 1 1 220px; margin: 0; max-width: 420px; }

.btn-find { background: #003366; flex: 0 0 auto; }

.product-pin-results-header { margin: 0.3rem 0 0.2rem; }

.product-pin-results { display: flex; flex-direction: column; gap: 0.3rem; max-height: 220px; overflow-y: auto; margin-top: 0.2rem; padding: 0.45rem; border: 1px solid #d8dee8; border-radius: 4px; background: #fafbfc; min-height: 3rem; }

.product-pin-result { text-align: left; background: #fff; color: #1c2434; border: 1px solid #d8dee8; padding: 0.5rem 0.7rem; border-radius: 4px; cursor: pointer; font-size: 0.86rem; width: 100%; }

.product-pin-result:hover, .product-pin-result.is-highlight { background: #f0f4fa; border-color: #003366; }

.product-pin-selected { background: #f8fafc; border: 2px solid #d8dee8; border-radius: 4px; padding: 0.6rem 0.8rem; margin-bottom: 0.65rem; min-height: 2.5rem; }

.product-pin-selected.is-empty { color: #5a6478; border-style: dashed; }

.product-pin-selected.is-active { border-color: #003366; background: #f0f4fa; }

.product-pin-actions { display: flex; flex-wrap: wrap; gap: 0.55rem 0.85rem; align-items: center; margin-bottom: 0.45rem; }

.product-pin-coords { font-size: 0.82rem; color: #5a6478; }

.product-pin-status { font-size: 0.82rem; min-height: 1.2rem; margin-bottom: 0.45rem; }

.product-pin-status.is-ok { color: #1b5e20; }

.product-pin-status.is-error { color: #b71c1c; }

.product-pin-canvas { position: relative; display: inline-block; max-width: 100%; border: 2px solid #c5ced9; background: #fafbfc; line-height: 0; }

.product-pin-canvas.is-place-mode { cursor: crosshair; outline: 2px solid #c8102e; outline-offset: 2px; }

.product-pin-canvas img { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

.product-pin-canvas svg { position: absolute; left: 0; top: 0; z-index: 2; }

.btn-danger { background: #b71c1c; }

.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 800px) { .grid2, .grid3 { grid-template-columns: 1fr; } .side { width: 100%; } .wrap { flex-direction: column; } }

/* Site CMS WYSIWYG */
.wysiwyg-field { display: block; margin-bottom: 1rem; }
.wysiwyg-field > span { display: block; font-weight: 600; margin-bottom: 0.35rem; color: #3a4558; }
.wysiwyg-field textarea { width: 100%; max-width: none; min-height: 120px; font-family: Consolas, monospace; font-size: 0.82rem; }
.wysiwyg-field .hint { margin-top: 0.35rem; }
.tox-tinymce { border-radius: 4px !important; border-color: #d8dee8 !important; margin-top: 0.25rem; }
.tox .tox-edit-area__iframe { background: #fff !important; }

/* StoreTempo analytics */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.kpi {
  background: #f6f8fb;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
}
.kpi strong {
  display: block;
  font-size: 1.35rem;
  color: #003366;
  line-height: 1.2;
}
.kpi span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #5a6478;
}
.chart-box {
  position: relative;
  height: 280px;
  max-width: 100%;
}

/* Multi-row editors — save-all reminder */
.multi-save-note {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  border: 1px solid #e2b203;
  background: #fff8e1;
  color: #5c4a00;
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Products — aisle-only editor */
.aisle-edit-actions {
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.aisle-edit-list {
  display: grid;
  gap: 0.65rem;
}
.aisle-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.aisle-edit-row__name {
  flex: 1 1 12rem;
  min-width: 10rem;
  align-self: center;
}
.aisle-edit-row label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5a6478;
  margin: 0;
}
.aisle-edit-row label input {
  width: 4.5rem;
  font-weight: 400;
}
.aisle-edit-row label input[name^="aisle_name"] { width: 7.5rem; }
.aisle-edit-row button { margin: 0; }

/* Buyer walkthrough Concierge desk */
.wt-coach {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 2px solid #1b5e20;
  border-radius: 10px;
  background: #f3faf4;
}
.wt-coach__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2e7d32;
}
.wt-coach__title { margin: 0 0 0.45rem; font-size: 1.1rem; }
.wt-coach__body { color: #334; line-height: 1.45; }
.wt-coach__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
.wt-coach__step {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.72rem;
  font-weight: 600;
}
.wt-coach__step.is-done { color: #1b5e20; background: #c8e6c9; }
.wt-coach__step.is-active {
  background: #1b5e20;
  color: #fff;
}
.wt-coach__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.68rem;
}
.wt-coach__step.is-active .wt-coach__num { background: rgba(255, 255, 255, 0.25); }
.wt-coach__actions { margin-top: 0.75rem; }
.wt-highlight {
  outline: 3px solid #2e7d32;
  outline-offset: 3px;
  border-radius: 8px;
  display: inline-block;
  padding: 0.35rem;
}
.wt-fill-btn,
button.wt-fill-btn {
  background: #1b5e20 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 0.55rem 0.9rem !important;
  border-radius: 6px !important;
  cursor: pointer;
}

/* Each pick action returns to #item-N. Keep the row off the very top edge so
   the one above stays visible for context. */
#order-items tr {
  scroll-margin-top: 1.25rem;
}

/* Pick table: Actions is the sixth column, so in a popup window it lands off
   the right edge and the desk looks read-only. Stack each line into a card
   below the width where all six columns still fit. */
@media (max-width: 900px) {
  #order-items table,
  #order-items tbody,
  #order-items tr,
  #order-items td {
    display: block;
    width: 100%;
  }
  #order-items tr:first-child {
    display: none;
  }
  #order-items tr {
    margin: 0 0 0.9rem;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    background: #fff;
  }
  #order-items td {
    border: 0;
    padding: 0.3rem 0;
  }
  #order-items td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #667;
  }
  #order-items td[data-label="Item"] {
    font-size: 1.05rem;
    font-weight: 600;
  }
  #order-items td.pick-actions {
    margin-top: 0.4rem;
    border-top: 1px solid #eef1f5;
    padding-top: 0.55rem;
  }
  #order-items td.pick-actions form {
    display: inline-block;
    margin: 0 0.35rem 0.35rem 0;
  }
}

