/* More tab (#/more): menu, settings, incidents, quality checks, merchandise,
   progress notes. Builds on studio.css (cards, list rows, sheets, chips);
   only what those do not cover is here. */

.more .card + .card, .more .more-card + .more-card { margin-top: 14px; }
.more-card { padding: 16px 20px; }
.more-card h2.d { margin: 6px 0 0; font-size: 20px; }
.more-card .list-row:first-child { border-top: 0; }
.more-h2 { margin: 22px 0 10px; font-size: 20px; }
.more-empty-title { font-size: 20px; color: var(--ink); }

/* Back link above a section's title. */
.more-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -6px 0 2px -6px; font-weight: 800; text-decoration: none; }

/* The menu: big tappable rows. */
.more-menu { padding: 4px 20px; }
.more-menu .more-row { color: inherit; text-decoration: none; min-height: 64px; }
.more-menu .more-row:first-child { border-top: 0; }
.more-menu .more-row:hover .who { color: var(--teal-d); }
.more-menu .more-row svg { color: var(--ink3); }
.more-badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }

/* Rows with buttons (incidents, checks, items, children). */
.more-item { align-items: flex-start; }
.more-item .what + .what { margin-top: 3px; }
.more-item .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.more-tags { margin-top: 6px; font-size: 13px; }
.more-link { color: var(--ink); text-decoration: none; }
.more-link:hover { color: var(--teal-d); text-decoration: underline; }
.more-due { color: var(--warn); font-weight: 800; }

/* Settings (#/more/settings): one card per subject, folded to one line
   (name, summary of the saved value, a dot for unsaved edits, chevron);
   tapping the line opens the card, which has its own Save. One setting per
   row (name and hint left, control right; on a phone the control drops
   under the name). */
.more.set-page .more-card + .more-card { margin-top: 0; }
.set-card { margin-bottom: 10px; padding-top: 6px; padding-bottom: 6px; }
.set-card.set-open { padding-bottom: 16px; }
.set-card h2.set-h { margin: 0; font-size: 18px; }
.set-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.set-toggle:hover .set-title { color: var(--teal-d); }
.set-title { flex-shrink: 0; white-space: nowrap; }
.set-sum { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--body); font-size: 14px; font-weight: 700; color: var(--ink3); }
.set-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mingle); flex-shrink: 0; }
.set-chev { display: inline-flex; margin-left: auto; color: var(--ink3); transition: transform 150ms; }
.set-toggle[aria-expanded="true"] .set-chev { transform: rotate(180deg); }
.set-body { padding-top: 2px; border-top: 2px dotted var(--line); }
.set-intro { margin-top: 10px; }
.set-sub { margin: 18px 0 2px; font-size: 15px; font-weight: 800; color: var(--ink); }
.set-sub + .hint { margin-bottom: 4px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 14px 0; }
.set-row + .set-row { border-top: 2px dotted var(--line); }
.set-name { display: block; font-weight: 800; font-size: 15px; color: var(--ink); }
.set-text .hint { margin-top: 2px; }
.set-ctl { display: flex; justify-content: flex-end; min-width: 0; }
.set-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; }
.set-wide .set-ctl, .set-list .set-ctl { display: block; }
.set-list { grid-template-columns: minmax(0, 1fr); }
.set-card textarea.field { min-height: 96px; }
.more-footer { min-height: 140px; }
/* Numbers: − box + and the unit. */
.set-step { display: flex; align-items: center; gap: 6px; }
.set-step .field { width: 64px; padding: 0 6px; text-align: center; font-weight: 800; }
.set-step .btn-icon { width: 42px; flex: 0 0 42px; }
.set-unit { min-width: 58px; font-weight: 700; color: var(--ink2); }
/* The card's foot: its error, then Undo (only with edits) and Save. */
.set-card .err { margin-top: 6px; }
.set-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 2px dotted var(--line); }
.set-foot .btn { min-width: 120px; }
/* Lists: stage names, lead sources, checklist lines. */
.more-stage { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.more-stage .grow { flex-grow: 1; }
.more-stage-n { width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--teal-dd); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.more-banner { margin: 6px 0; padding: 10px 14px; border-radius: 16px; background: var(--note-bg); color: var(--note); font-size: 13px; font-weight: 800; }
.more-gstin { text-transform: uppercase; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.more-add { display: flex; gap: 10px; align-items: center; }
.more-add .grow { flex-grow: 1; }
.set-card .more-add { margin: 4px 0 8px; }
.more-src { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--mint); color: var(--teal-dd); margin: 0 4px 6px 0; }
.more-src button { border: 0; background: transparent; color: inherit; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.more-src button:hover { background: var(--mint2); }
.more .chip { margin: 0 4px 6px 0; }
/* Quality checklist lines: number, text, then up / down / remove. */
.more-ql-acts { display: flex; gap: 4px; flex-shrink: 0; }
.more-up svg { transform: rotate(180deg); }

/* Progress notes. */
.more-check .h2row h2 { font-size: 20px; }
.more-pillar { padding: 10px 0; border-top: 2px dotted var(--line); }
.more-check .more-pillar:first-of-type { margin-top: 8px; }
.more-stagechip { background: var(--mint); color: var(--teal-dd); }

@media (max-width: 760px) {
  .more-card { padding: 12px 14px; }
  .more-menu { padding: 2px 14px; }
  .more-item { flex-wrap: wrap; }
  .more-item .grow { flex-basis: 100%; }
  .more-item .acts { justify-content: flex-start; }
  .more .h1row .right { margin-left: 0; }
  .more-ql { flex-wrap: wrap; }
  .more-ql .grow { flex-basis: calc(100% - 38px); }
  .more-ql-acts { margin-left: 38px; }
  /* Settings: controls drop under the name (a switch stays on the right). */
  .set-card { padding-top: 4px; padding-bottom: 4px; }
  .set-card.set-open { padding-bottom: 12px; }
  .set-toggle { gap: 8px; }
  .set-sum { font-size: 13px; }
  .set-row, .set-wide { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .set-switch { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .set-ctl { justify-content: flex-start; }
  .set-foot .btn { flex: 1; min-width: 0; }
}

/* On/off settings: a real switch (the row's name is its label). */
.page.more .more-switch { display: inline-flex; align-items: center; cursor: pointer; }
.page.more .more-switch input { appearance: none; -webkit-appearance: none; flex: 0 0 46px; width: 46px; height: 26px; margin: 0; border-radius: 999px; background: #CBD9D4; position: relative; cursor: pointer; transition: background 150ms; }
.page.more .more-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: left 150ms; }
.page.more .more-switch input:checked { background: var(--teal); }
.page.more .more-switch input:checked::after { left: 23px; }
.page.more .more-switch input:focus-visible { outline: 3px solid var(--band-soft); outline-offset: 2px; }

/* ===== More > Ideas (more_ideas.js). Added 2026-09-27 by the Ideas task; self-contained block. ===== */
.ideas .idea-new label, .ideas .idea-answer label { display: block; }
.ideas .idea-new .lbl { display: block; margin-bottom: 6px; }
.ideas .idea-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ideas .idea-foot .hint { flex: 1 1 200px; }
.ideas .idea-meta { font-size: 13px; font-weight: 700; color: var(--ink3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ideas .idea-meta .chip { margin: 0; }
.ideas .idea-sent { color: var(--teal-d); font-weight: 800; }
.ideas .idea-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.ideas .idea-main { font-size: 16px; margin-top: 8px; }
.ideas .idea-replies { margin-top: 12px; border-left: 3px solid var(--line2); padding-left: 12px; }
.ideas .idea-reply + .idea-reply { margin-top: 10px; }
.ideas .idea-answer { margin-top: 12px; padding-top: 12px; border-top: 2px dotted var(--line); }
.ideas .idea-status { display: flex; align-items: center; gap: 8px; }
.ideas .idea-status .field { width: auto; min-width: 170px; }
.idea-st-new { background: #EAEFED; color: #45524F; }
.idea-st-questions { background: var(--note-bg); color: var(--note); }
.idea-st-planned { background: var(--meddle-bg); color: var(--meddle-ink); }
.idea-st-done { background: var(--mint); color: var(--teal-dd); }
.idea-st-not_now { background: #F1F1EF; color: #5C5C57; }
@media (max-width: 760px) {
  .ideas .idea-foot { align-items: stretch; }
  .ideas .idea-foot .btn { flex: 1 1 auto; }
  .ideas .idea-status { flex: 1 1 100%; }
  .ideas .idea-status .field { flex: 1; min-width: 0; }
}
/* ===== end More > Ideas ===== */

/* Settings tabs (back by request, 27 Sep): All or one section; phones scroll sideways. */
.set-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.set-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--line2); font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.set-chip:hover { background: #F4FAF8; }
.set-chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
@media (max-width: 760px) {
  .set-nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-chip { flex-shrink: 0; }
}
