/* The service page, on top of nelco.css: big choices for a customer on a phone, the board, one ticket and the desks. */
main.wide { max-width: 1500px; }
#notice.banner { padding: .7rem .9rem; border-radius: var(--radius); margin-bottom: .8rem; font-weight: 600; }
#notice.ok { background: var(--accent-soft); color: var(--ok); }
#notice.warn { background: var(--warn-soft); color: var(--warn); }
#notice.error { background: var(--danger-soft); color: var(--danger); }

.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; padding: .4rem 1rem; background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
.demo-bar[hidden] { display: none; }
.demo-label { font-weight: 600; }
.demo-bar a { color: inherit; }
.demo-bar a[aria-current] { font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }

/* Forms */
#view form label { display: block; margin-top: .55rem; font-weight: 600; }
#view form input:not([type=radio]):not([type=checkbox]), #view form select, #view form textarea { width: 100%; min-height: 2.9rem; font-size: 1.05rem; }
#view form textarea { min-height: 4.5rem; }
#view form button[type=submit] { margin-top: .8rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.town { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
button.big, .button.big { width: 100%; min-height: 3.4rem; font-size: 1.25rem; }
.choice { border: 0; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
#view .choice label, #view label.check { display: flex; align-items: center; gap: .4rem; font-weight: 400; margin-top: 0; min-height: 2.4rem; }
.choice input, label.check input { width: 1.25rem; height: 1.25rem; }

/* The customer's two taps */
.big-choices { display: grid; gap: .8rem; }
.big-choice { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; width: 100%; min-height: 5.2rem; padding: 1rem 1.2rem;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line); text-align: left; }
.big-choice strong { font: 700 1.9rem/1 var(--head); }
.big-choice span { font: 400 1rem var(--body); color: var(--muted); text-transform: none; letter-spacing: 0; }
.big-choice:hover, .big-choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.where { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem .9rem; margin: .9rem 0; }
.where legend { font-weight: 700; padding: 0 .3rem; }
.or { text-align: center; color: var(--muted); margin: .6rem 0 0; }
#find-shops { width: 100%; margin-top: .7rem; min-height: 3rem; }
#location-status:empty { display: none; }
#location-status { font-weight: 600; color: var(--ok); margin: .4rem 0 0; }

.tiles { border: 0; padding: 0; margin: .7rem 0; display: grid; gap: .5rem; }
.tiles legend { font-weight: 700; margin-bottom: .35rem; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#view .tile-choice { display: block; margin: 0; position: relative; cursor: pointer; font-weight: 400; }
#view .tile-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile-choice span { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; min-height: 3.3rem; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: .45rem .8rem; }
.tiles.three .tile-choice span { justify-content: center; font-weight: 700; text-align: center; }
.tile-choice small { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
.tile-choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.tile-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.shop-choice.partner span { border-left-width: 6px; }

/* Shared */
.order-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.order-head h2, .order-head h3 { margin: 0; overflow-wrap: anywhere; }
.big-line { font-weight: 600; font-size: 1.1rem; }
.pill { display: inline-block; padding: .12rem .6rem; border-radius: 999px; background: var(--surface-2); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.pill.warn, .pill.stage-on_hold, .pill.stage-credit_review { background: var(--warn-soft); color: var(--warn); }
.pill.stage-booked, .pill.stage-done, .pill.partner { background: var(--accent-soft); color: var(--ok); }
.pill.stage-declined, .pill.stage-cancelled, .pill.down { background: var(--danger-soft); color: var(--danger); }
.note { background: var(--surface-2); border-radius: var(--radius); padding: .55rem .75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.actions:empty { display: none; }
.time-down { color: var(--warn); font-weight: 700; }
.next-step { font-weight: 600; background: var(--accent-soft); color: var(--ok); border-radius: var(--radius); padding: .55rem .75rem; }
.prices { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; margin: .5rem 0; }
.prices dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.prices .sum { font-weight: 700; border-top: 1px solid var(--line); padding-top: .15rem; }
.facts { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .2rem; }

.progress { list-style: none; display: flex; padding: 0; margin: .9rem 0 .6rem; }
.step { flex: 1; position: relative; text-align: center; font-size: .82rem; color: var(--muted); }
.step::before { content: ''; position: absolute; top: .5rem; left: -50%; width: 100%; height: 3px; background: var(--line); }
.step:first-child::before { display: none; }
.dot { position: relative; z-index: 1; display: block; width: 1.1rem; height: 1.1rem; margin: 0 auto .2rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.step.done::before, .step.now::before { background: var(--accent); }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.now { color: var(--ink); font-weight: 700; }
.step.now .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* My requests */
.new-request { margin-bottom: 1rem; }
.request-card h2 { font-size: 1.35rem; }
.request-card h2 a { color: inherit; text-decoration: none; }
.request-card.breakdown { border-left: 6px solid var(--danger); }
.request-card > button { width: 100%; min-height: 3rem; }
.earlier { list-style: none; padding: 0; margin: 0; }
.earlier li { padding: .45rem 0; border-bottom: 1px solid var(--line); }

/* The board */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.stat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; }
.stat strong { font: 700 1.9rem/1.1 var(--head); }
.stat span { color: var(--muted); font-size: .88rem; }
.stat.alert { background: var(--danger-soft); border-color: var(--danger); }
.stat.alert strong, .stat.alert span { color: var(--danger); }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
.lane { background: var(--surface-2); border-radius: var(--radius); padding: .6rem; }
.lane.breakdowns { background: var(--danger-soft); }
.lane h2 { font-size: 1.3rem; margin: 0 0 .5rem; display: flex; justify-content: space-between; align-items: center; }
.lane.breakdowns h2 { color: var(--danger); }
.lane, .lane-cards { display: grid; gap: .5rem; }
.lane-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: .5rem; }
.count { color: var(--muted); font: 600 .95rem var(--body); }
.empty { color: var(--muted); font-size: .9rem; margin: .2rem; }
.ticket-card { display: flex; flex-direction: column; gap: .1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .7rem; color: inherit; text-decoration: none; }
.ticket-card:hover { border-color: var(--accent); }
.ticket-card.breakdown { border-left: 5px solid var(--warn); }
.ticket-card.late { border-left: 5px solid var(--danger); }
.ticket-title { font-weight: 700; overflow-wrap: anywhere; }
.ticket-line { color: var(--muted); font-size: .92rem; }
.ticket-line.taken { color: var(--accent); font-weight: 600; }
.ticket-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: .25rem; font-weight: 600; }
.ticket-waiting { font-size: .85rem; font-weight: 600; color: var(--muted); }
.ticket-card.late .ticket-waiting { color: var(--danger); }
details.closed { margin-top: 1rem; }
details.closed summary, details summary { cursor: pointer; font-weight: 600; min-height: 2.4rem; display: flex; align-items: center; }

/* One ticket */
.ticket-head.breakdown { border-left: 6px solid var(--danger); }
.advice { border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; border: 2px solid; }
.advice h2 { margin: 0 0 .3rem; font-size: 1.45rem; }
.advice p { margin: 0; font-size: 1.08rem; }
.advice.partner { background: var(--accent-soft); border-color: var(--accent); color: var(--ok); }
.advice.closer_shop { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.money-facts p { margin: .25rem 0; }
.warn-line { color: var(--danger); font-weight: 600; }
.per-tire { font: 700 1.2rem var(--head); margin: .7rem 0 0; color: var(--ok); }
.per-tire:empty { display: none; }
.per-tire.above { color: var(--danger); }
details.cancel { margin: 0 0 1rem; }
details.cancel form { margin-top: .3rem; }
.add-shop summary { margin: -.2rem 0; }
.notes { list-style: none; padding: 0; margin: 0; }
.note-row { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.note-by { display: block; font-size: .85rem; }
.history { padding-left: 1.2rem; margin: 0; }
.history li { margin: .25rem 0; }

/* Tire program */
.quota-sold { font-size: 1.15rem; margin: .5rem 0; }
.quota-sold strong { font: 700 1.8rem var(--head); }
.bar { height: 1rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.pace { font-weight: 600; margin: .5rem 0 .2rem; }
.quota.behind .pace { color: var(--warn); }
.forgone { color: var(--muted); margin: .2rem 0; }
.prices-list { list-style: none; padding: 0; margin: .5rem 0; }
.prices-list li { border-bottom: 1px solid var(--line); padding: .3rem 0; }
.price-form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem .8rem; }
.price-form .size { font: 700 1.2rem var(--head); min-width: 8rem; }
#view .price-form label.inline { flex: 1 1 9rem; margin-top: 0; }
#view .price-form button[type=submit] { margin-top: 0; }

/* Credit */
.account { border-top: 1px solid var(--line); padding: .7rem 0; }
.account.past-due h3 { color: var(--danger); }
.account form { margin-top: .4rem; }
.waiting, .people { list-style: none; padding: 0; margin: 0; }
.waiting li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.waiting .actions { margin: 0; }
.people li { padding: .3rem 0; }
.pick-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }

@media (max-width: 760px) {
  .lanes { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three, .grid.two { grid-template-columns: minmax(0, 1fr); }
}
