/* Styles for the live demo page. Lifted out of demo.html so that no page
   carries an inline <style> block, which lets the site forbid inline
   styles in its Content-Security-Policy. */
/* ===================== DEMO STAGE ===================== */
.demo-hero { padding: 70px 0 24px; text-align: center; }
.demo-hero h1 { font-size: clamp(40px, 6vw, 70px); margin-bottom: 18px; }
.demo-hero .lead { font-size: 19px; color: var(--text-soft); max-width: 660px; margin: 0 auto; }

.demo-wrap { max-width: 1280px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

.demo-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
}
.demo-toolbar .tb-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-right: 4px; }
.tb-btn {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 9px 18px; transition: all .2s ease;
}
.tb-btn:hover { border-color: var(--gold); color: var(--gold-lite); }
.tb-btn.gold { background: var(--gold-grad); color: #14110a; border-color: transparent; }
.role-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.role-switch button { background: transparent; border: 0; color: var(--text-soft); padding: 9px 16px; cursor: pointer; font-size: 13px; font-weight: 600; }
.role-switch button.on { background: var(--gold-grad); color: #14110a; }

.demo-hint { text-align: center; color: var(--text-dim); font-size: 13.5px; margin-bottom: 22px; }

.demo-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 26px; align-items: start; }
.device-label {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  text-align: center; margin-bottom: 12px; font-weight: 600;
}

/* ---- Monitor (bezel) ---- */
.monitor {
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #18181d, #0b0b0e);
  padding: 14px; box-shadow: var(--shadow); position: relative;
}
.monitor::after {
  content: ""; display: block; width: 120px; height: 16px; margin: 12px auto -2px;
  background: linear-gradient(180deg, #1a1a1f, #0c0c0f); border: 1px solid var(--line-soft);
  border-radius: 0 0 8px 8px;
}
.screen { background: #101216; border: 1px solid var(--line-soft); border-radius: 11px; overflow: hidden; }

/* ---- Till (main monitor) ---- */
.till-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: #0d0f12;
}
.till-top .brand { display: flex; align-items: center; gap: 10px; }
.till-top img { height: 22px; }
.till-top .open-pill { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #6ee7a0; border: 1px solid rgba(110,231,160,.4); border-radius: 999px; padding: 3px 9px; }
.till-top .staff { font-size: 12.5px; color: var(--text-soft); }

.till-body { display: grid; grid-template-columns: 1fr 320px; min-height: 430px; }
.menu-side { padding: 12px; border-right: 1px solid var(--line-soft); }
.cats { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; }
.cats button {
  white-space: nowrap; background: var(--bg-elev); border: 1px solid var(--line-soft);
  color: var(--text-soft); border-radius: 9px; padding: 8px 13px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.cats button.on { background: var(--gold-grad); color: #14110a; border-color: transparent; }
.items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 10px; }
.items button {
  text-align: left; background: #15171c; border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 12px; cursor: pointer; color: var(--text); transition: all .15s ease;
}
.items button:hover { border-color: var(--gold); transform: translateY(-2px); }
.items button .nm { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.items button .pr { font-size: 13px; color: var(--gold-lite); font-family: var(--serif); }

.order-side { display: flex; flex-direction: column; background: #0c0e11; }
.order-lines { flex: 1; padding: 12px; overflow-y: auto; max-height: 230px; }
.order-lines .empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 30px 0; }
.oline { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.oline .l { display: flex; align-items: center; gap: 9px; }
.oline .qty { background: var(--bg-elev); border: 1px solid var(--line); color: var(--gold-lite); border-radius: 6px; min-width: 24px; text-align: center; font-size: 12.5px; padding: 2px 4px; }
.oline .nm2 { font-size: 13px; }
.oline .lp { font-size: 13px; color: var(--text-soft); font-family: var(--serif); }
.oline .rm { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 15px; margin-left: 6px; }
.oline .rm:hover { color: #e88; }

.order-totals { padding: 12px 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--text-soft); }
.order-totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.order-totals .grand { font-family: var(--serif); font-size: 22px; color: var(--text); padding-top: 8px; }
.order-totals .grand span { color: var(--gold-lite); }

.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 10px; }
.types button { font-size: 11.5px; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--bg-elev); color: var(--text-soft); cursor: pointer; font-weight: 600; }
.types button.on { background: rgba(212,175,55,.14); border-color: var(--gold); color: var(--gold-lite); }

.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 10px; }
.pay { padding: 14px; border-radius: 10px; border: 0; cursor: pointer; font-weight: 700; font-size: 15px; font-family: var(--sans); }
.pay.cash { background: #1f2a20; color: #8ee6a8; border: 1px solid rgba(110,231,160,.35); }
.pay.card { background: var(--gold-grad); color: #14110a; }
.pay:disabled { opacity: .45; cursor: not-allowed; }

.admin-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 0 12px 14px; }
.admin-row button { font-size: 11.5px; padding: 8px 4px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text-soft); cursor: pointer; font-weight: 600; }
.admin-row button:hover { border-color: var(--gold); color: var(--gold-lite); }
.admin-row.hidden { display: none; }

/* ---- Kitchen monitor ---- */
.kitchen-monitor .screen { background: #0a0f0c; }
.kds-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(110,231,160,.18); background: #0b120d; }
.kds-top .t { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #8ee6a8; font-weight: 700; }
.kds-top .c { font-size: 12px; color: var(--text-soft); }
.kds-body { padding: 12px; min-height: 430px; max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.kds-empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 50px 0; }
.ticket { border: 1px solid rgba(110,231,160,.25); border-radius: 10px; background: #0e1611; overflow: hidden; animation: ticketIn .35s ease; }
@keyframes ticketIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ticket .th { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: #102016; border-bottom: 1px dashed rgba(110,231,160,.25); }
.ticket .th .no { font-weight: 700; color: #8ee6a8; font-size: 13.5px; }
.ticket .th .badge { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--text-soft); }
.ticket .th .tm { font-size: 11px; color: var(--text-dim); }
.ticket .tl { padding: 10px 12px; }
.ticket .tl div { font-size: 13px; color: var(--text); padding: 3px 0; }
.ticket .tl .q { color: var(--gold-lite); font-weight: 700; margin-right: 6px; }
.ticket .bump { width: 100%; border: 0; background: #16241a; color: #8ee6a8; padding: 9px; cursor: pointer; font-weight: 700; font-size: 12.5px; border-top: 1px solid rgba(110,231,160,.2); }
.ticket .bump:hover { background: #1c3023; }
.ticket.ready { opacity: .6; border-color: var(--line-soft); }
.ticket.ready .bump { background: #14110a; color: var(--gold-lite); }

/* ---- Peripherals ---- */
.peripherals { display: flex; gap: 16px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

.device { display: flex; flex-direction: column; align-items: center; }
.device .dlabel { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); margin-top: 8px; }

/* printer */
.printer { width: 180px; }
.printer-body {
  height: 70px; border-radius: 12px 12px 6px 6px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #1c1c21, #101013); position: relative; box-shadow: var(--shadow);
  display: flex; align-items: flex-start; justify-content: center;
}
.printer-body .pname { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin-top: 9px; }
.printer-slot { position: absolute; bottom: 6px; left: 14px; right: 14px; height: 5px; border-radius: 4px; background: #000; border: 1px solid var(--line-soft); }
.printer-led { position: absolute; top: 9px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 8px #6ee7a0; }
.paper-tray { width: 158px; margin: 0 auto; overflow: hidden; }
.paper {
  background: #f6f3ea; color: #1a1a1a; font-family: ui-monospace, "Courier New", monospace; font-size: 10px; line-height: 1.5;
  padding: 0 12px; border-radius: 0 0 4px 4px;
  max-height: 0; opacity: 0; transform: translateY(-12px);
  transition: max-height .8s ease, opacity .4s ease, transform .5s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.paper.out { max-height: 420px; opacity: 1; transform: translateY(0); padding: 12px; }
.paper .ct { text-align: center; }
.paper .b { font-weight: 700; }
.paper hr { border: 0; border-top: 1px dashed #999; margin: 6px 0; }
.paper .rowp { display: flex; justify-content: space-between; }

/* card machine */
.cardmachine { width: 132px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, #1c1c21, #0d0d10); padding: 12px; box-shadow: var(--shadow); }
.cm-screen { background: #0a1f12; color: #8ee6a8; border: 1px solid rgba(110,231,160,.3); border-radius: 7px; height: 54px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; font-weight: 700; padding: 4px; }
.cm-screen.amount { color: var(--gold-lite); }
.cm-screen.ok { background: #0c2a17; color: #7dffb0; }
.cm-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 10px 0; }
.cm-keys span { height: 16px; border-radius: 4px; background: #16161b; border: 1px solid var(--line-soft); }
.cm-slot { height: 6px; background: #000; border: 1px solid var(--line-soft); border-radius: 4px; }
.cm-card { height: 5px; margin: 6px auto 0; width: 70%; border-radius: 3px; background: var(--gold-grad); opacity: 0; transition: opacity .3s, transform .5s; transform: translateY(8px); }
.cm-card.in { opacity: 1; transform: translateY(0); }

/* ---- Telegram feed ---- */
.tg-feed { position: fixed; right: 18px; bottom: 18px; width: 320px; max-width: calc(100vw - 36px); z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.tg-msg { background: #17212b; border: 1px solid #24323f; border-left: 3px solid var(--gold); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #e6edf3; box-shadow: var(--shadow); animation: tgIn .3s ease; }
.tg-msg .tg-h { display: flex; justify-content: space-between; font-size: 10.5px; color: #8aa0b3; margin-bottom: 3px; }
.tg-msg .tg-h b { color: #54a9ff; font-weight: 600; }
@keyframes tgIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.tg-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 61; background: var(--gold-grad); color: #14110a; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; font-size: 12.5px; display: none; }

/* ---- Overlays ---- */
.overlay { position: fixed; inset: 0; background: rgba(5,5,7,.75); backdrop-filter: blur(4px); z-index: 70; display: none; align-items: center; justify-content: center; padding: 20px; }
.overlay.show { display: flex; }
.sheet { width: 100%; max-width: 440px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; max-height: 88vh; display: flex; flex-direction: column; }
.sheet-head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; }
.sheet-head h3 { font-size: 24px; }
.sheet-head .x { background: none; border: 0; color: var(--text-soft); font-size: 22px; cursor: pointer; }
.sheet-body { padding: 22px; overflow-y: auto; }
.sheet-body .due { text-align: center; margin-bottom: 18px; }
.sheet-body .due .lbl { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }
.sheet-body .due .amt { font-family: var(--serif); font-size: 48px; color: var(--gold-lite); }
.tender { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tender button { padding: 14px 4px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--bg-elev); color: var(--text); cursor: pointer; font-weight: 700; }
.tender button:hover { border-color: var(--gold); }
.change-box { text-align: center; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 16px; color: var(--text-soft); }
.change-box b { color: #8ee6a8; font-size: 22px; font-family: var(--serif); display: block; }

.report-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; color: var(--text-soft); }
.report-row b { color: var(--text); }
.report-h { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin: 18px 0 8px; }
.report-big { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 26px; padding: 10px 0; }
.report-big span:last-child { color: var(--gold-lite); }

@media (max-width: 1024px) {
  .demo-grid { grid-template-columns: 1fr; }
  .till-body { grid-template-columns: 1fr; }
  .order-side { border-top: 1px solid var(--line-soft); }
  .menu-side { border-right: 0; }
}
@media (max-width: 640px) {
  .items { grid-template-columns: 1fr 1fr; }
  .tg-feed { display: none; }
  .tg-feed.open { display: flex; }
  .tg-toggle { display: block; }
}
