/* © 2026 Qder.ai (Itay Funes). All rights reserved. Proprietary and confidential; see LICENSE. */
/* ==========================================================================
   Our own product, as markup.

   qoder.com does not put screenshots on its page: every product surface there
   is live DOM, which is why it stays sharp at any size and animates. Same
   approach here, for a better reason — the founder asked that nothing on this
   page be borrowed or invented, and the honest way to show a Qder screen is
   to build it from Qder's own design tokens and Qder's own layouts:

     .phone      the diner's table conversation (public/table.css)
     .floor      the shift manager's floor plan (public/panel.css)
     .pass       the kitchen screen's ticket (public/js/kitchen.js)
     .sheet      the business app's table sheet (business/src/screens)

   Anything numeric shown inside them is demo data of the kind the QA chain
   carries, never a real venue's takings.
   ========================================================================== */

/* ------------------------------------------------------------------ frames */

/* A window, the way their product cards frame one: a light chrome bar, a
   hairline, a modest radius, and a shadow soft enough to sit on a wash. */
.win {
  width: 100%;
  /* The frame is its own container, so the floor plan inside it reflows when
     the FRAME narrows — which is the only width that matters to it. A window
     600px wide in a 1440px page should not lay out like a desktop. */
  container-type: inline-size;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-win);
  box-shadow: 0 30px 60px -40px rgba(8, 13, 28, .35), 0 2px 6px rgba(8, 13, 28, .04);
  overflow: hidden;
}
.win-bar {
  height: 34px; padding: 0 12px;
  display: flex; align-items: center; gap: 8px;
  background: #FBFCFF; border-bottom: 1px solid var(--line-2);
}
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 9px; height: 9px; border-radius: 50%; background: #E1E6F2; display: block; }
.win-title { font-size: 11px; font-weight: 500; color: var(--muted); margin-inline-start: 6px; }
.win-body { padding: 16px; }

/* The phone, for the two surfaces that are phones. */
.phone {
  /* Fluid between a small phone and a large one: at mid widths the hero has
     to fit a phone AND a desktop window side by side, and something has to
     give before either gets cropped. */
  width: clamp(252px, 23vw, 300px);
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: 0 40px 70px -46px rgba(8, 13, 28, .45), 0 2px 8px rgba(8, 13, 28, .05);
  padding: 10px;
}
.phone-screen {
  /* Tall enough to end on the basket, short enough not to be cropped by the
     band on a laptop. */
  height: clamp(376px, 44vh, 440px);
  border-radius: 26px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--cobalt-wash) 100%);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-top {
  padding: 12px 14px 8px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--muted);
}
.phone-top b { font-size: 12px; color: var(--ink); font-weight: 600; }

/* ------------------------------------------------- the table conversation */

.chat { flex: 1; overflow: hidden; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg {
  max-width: 86%; padding: 8px 12px; border-radius: 18px;
  font-size: 13px; line-height: 1.45;
}
.msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, .78);
  border: 1px solid #fff;
  color: var(--ink-2);
  box-shadow: 0 8px 20px -16px rgba(8, 13, 28, .3);
  border-end-start-radius: 6px;
}
.msg.me {
  align-self: flex-end; color: #fff;
  background: linear-gradient(160deg, var(--cobalt-lift) 0%, var(--cobalt) 60%, var(--cobalt-deep) 100%);
  border-end-end-radius: 6px;
}
.msg .tiny { display: block; margin-top: 4px; font-size: 11px; opacity: .72; }

/* A dish the waiter added to the basket, as the table page shows it. */
.basket {
  margin-top: 2px; align-self: flex-start; width: 86%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 10px 24px -20px rgba(8, 13, 28, .35);
}
.basket-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.basket-row + .basket-row { margin-top: 6px; }
.basket .qty { color: var(--cobalt); font-weight: 600; }
.basket .sum { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); font-weight: 600; font-size: 13px; }
.basket .cta {
  margin-top: 10px; height: 34px; border-radius: 999px; background: var(--cobalt); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
}
.chip-allergy {
  align-self: flex-start;
  background: var(--crit-bg); color: var(--crit);
  border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 600;
}
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 14px; background: rgba(255,255,255,.78); border-radius: 18px; border: 1px solid #fff; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); display: block; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.composer {
  margin: 0 12px 12px; height: 38px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 12px;
  font-size: 12.5px; color: var(--muted);
  box-shadow: 0 6px 16px -14px rgba(8, 13, 28, .4);
}
.composer .send { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--cobalt); }

/* ---------------------------------------------------------- the floor plan */

.floor { font-size: 12.5px; }
.floor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.floor-head b { font-size: 14px; font-weight: 600; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.stat .v { font-size: 18px; font-weight: 600; line-height: 1.2; }
.stat .k { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tables { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.table-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.table-card.busy { border-color: var(--cobalt-line); background: var(--cobalt-wash); }
.table-card.flag { border-color: #F3C7C7; background: var(--crit-bg); }
.table-card .t { font-weight: 600; font-size: 13px; }
.table-card .m { color: var(--muted); font-size: 11px; margin-top: 2px; }
.table-card .money { font-weight: 600; font-size: 13px; margin-top: 8px; }
.tag {
  display: inline-block; border-radius: 999px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 600; margin-top: 6px;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.crit { background: var(--crit-bg); color: var(--crit); }
.tag.cobalt { background: var(--cobalt-wash); color: var(--cobalt-deep); }

/* ------------------------------------------------------------- the kitchen */

.pass { display: grid; gap: 10px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ticket.late { border-color: #F3C7C7; }
.ticket-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ticket-head .when { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.ticket .line { display: flex; gap: 6px; font-size: 12.5px; padding: 4px 0; }
.ticket .line .q { color: var(--cobalt); font-weight: 600; }
.ticket .notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ticket .allergy {
  background: var(--crit-bg); color: var(--crit); border-radius: 10px;
  padding: 7px 10px; font-size: 12px; font-weight: 600; margin: 8px 0;
}
.ticket-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mini {
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; border: 1px solid transparent;
}
.mini.solid { background: var(--cobalt); color: #fff; }
.mini.quiet { background: #fff; border-color: var(--line); color: var(--body); }
.ticket-foot .total { margin-inline-start: auto; font-weight: 600; font-size: 13px; }

/* ------------------------------------------------- the business app's sheet */

.sheet { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.sheet-head { display: flex; align-items: baseline; gap: 8px; }
.sheet-head b { font-size: 17px; font-weight: 600; }
.sheet-head .sub { font-size: 11.5px; color: var(--muted); }
.sheet-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.sheet-card .k { font-size: 11px; color: var(--muted); }
.sheet-card .v { font-size: 20px; font-weight: 600; }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qr-wrap svg, .qr-wrap img { width: 116px; height: 116px; }
.qr-code { font-size: 15px; font-weight: 600; letter-spacing: 3px; }
.sheet .mini { width: 100%; justify-content: center; }

/* ----------------------------------------------------------- the chain view */

.chain { font-size: 12.5px; }
.chain-row {
  display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr; gap: 8px;
  padding: 9px 10px; border-bottom: 1px solid var(--line-2); align-items: center;
}
.chain-row.h { color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.chain-row b { font-weight: 600; }
/* The chain mock's quota meter.
 *
 * Named `.meter`, not `.bar`: the diner page's header is a `.bar`, and while
 * both existed the header's own <span> inherited this fill and painted the
 * table line cobalt. One generic class name, two components, one silent bug.
 */
.meter { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--cobalt); }

@media (max-width: 680px) {
  .phone { width: 260px; }
  .phone-screen { height: 420px; }
  .stat-row, .tables { grid-template-columns: repeat(2, 1fr); }
  .chain-row { grid-template-columns: 1.4fr .9fr; }
  .chain-row span:nth-child(3), .chain-row span:nth-child(4) { display: none; }
}

/* ------------------------------------------------- the concierge's answer */

/*
 * A place to eat, as the concierge offers it.
 *
 * The decision a diner is making is "will this do?", so the card leads with
 * the things that answer it — the kitchen, the walk, whether there is a table
 * at the hour they asked for — and the action is one tap, not a form.
 */
.venue {
  align-self: flex-start; width: 92%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px;
  box-shadow: 0 12px 26px -22px rgba(8, 13, 28, .4);
}
.venue .top { display: flex; align-items: baseline; gap: 6px; }
.venue .top b { font-size: 13.5px; font-weight: 600; }
.venue .top .dist { margin-inline-start: auto; font-size: 11px; color: var(--muted); }
.venue .kind { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.venue .slots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.venue .slot {
  border: 1px solid var(--cobalt-line); background: var(--cobalt-wash); color: var(--cobalt-deep);
  border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600;
}

/* ------------------------------------------------ inside a narrow frame */

/*
 * Container queries, not media queries.
 *
 * These surfaces appear at three different sizes on the same page — full
 * width in the hero band, 560px inside a product card, and 300px inside a
 * phone — so what they must respond to is the frame around them. A media
 * query cannot see that.
 */
@container (max-width: 540px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .tables { grid-template-columns: repeat(3, 1fr); }
}
@container (max-width: 420px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tables { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .chain-row { grid-template-columns: 1.3fr .9fr .7fr; }
  .chain-row span:nth-child(4), .chain-row b + span + span + span { display: none; }
  .ticket .notes { gap: 3px; }
}
@container (max-width: 320px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .tables { grid-template-columns: 1fr; }
  .chain-row { grid-template-columns: 1.4fr 1fr; }
  .chain-row span:nth-child(3) { display: none; }
}
