/* ITSysPro — demo page: three interactive mock apps in browser frames.
   Depends on site.css tokens and shared components. */

.demo-notice { display: flex; gap: .7rem; align-items: flex-start; max-width: 44rem; margin-top: 1.4rem; padding: .85rem 1rem; border-radius: 10px; background: var(--amber-soft); color: var(--ink-2); font-size: .92rem; line-height: 1.5; border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.demo-notice svg { width: 20px; height: 20px; flex: none; color: var(--amber); margin-top: .15rem; }
.demo-notice span { margin: 0; }

.demo-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }
.demo-grid .check { margin-top: 1.2rem; }
.demo-cta { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; }
.demo-cta p { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); }
@media (max-width: 62rem) { .demo-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* browser frame */
.frame { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 40px 80px -45px rgba(23,28,33,.5), 0 0 0 1px rgba(255,255,255,.04) inset; overflow: hidden; min-width: 0; }
.frame-bar { display: flex; align-items: center; gap: .9rem; padding: .6rem .9rem; background: var(--sunk); border-bottom: 1px solid var(--line); }
.frame-bar .dots { display: inline-flex; gap: .35rem; }
.frame-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.frame-bar .url { flex: 1; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: .3rem .7rem; text-align: start; }
.frame-body { padding: 1.1rem; min-height: 22rem; }
.frame-body button { font: inherit; color: inherit; cursor: pointer; }

/* generic bits inside frames */
.f-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.f-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.f-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); display: block; margin: .9rem 0 .45rem; }
.f-label:first-child { margin-top: 0; }
.seg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: .35rem .85rem; font-family: var(--display); font-weight: 600; font-size: .82rem; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pill { display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; padding: .18rem .5rem; border-radius: 999px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.frame-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.frame-body th, .frame-body td { text-align: start; padding: .5rem .3rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.frame-body th { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.frame-body td.num, .frame-body th.num { text-align: end; font-variant-numeric: tabular-nums; }
.mini-btn { border: 1.5px solid var(--line-2); background: var(--paper-2); border-radius: 6px; padding: .25rem .55rem; font-family: var(--display); font-weight: 600; font-size: .78rem; color: var(--ink-2); }
.mini-btn:hover { border-color: var(--green); color: var(--green); }

/* --- reservations --- */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.days button { border: 1.5px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: .5rem .2rem; display: grid; gap: .1rem; justify-items: center; font-family: var(--display); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.days button small { font-size: .7rem; color: var(--ink-3); text-transform: capitalize; }
.days button b { font-size: 1.05rem; font-weight: 700; }
.days button:hover { border-color: var(--green); transform: translateY(-1px); }
.days button[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.days button[aria-pressed="true"] small { color: var(--green); }
.party { display: flex; flex-wrap: wrap; gap: .35rem; }
.party button { width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper-2); font-family: var(--display); font-weight: 600; }
.party button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .4rem; }
.slots button { border: 1.5px solid var(--line); background: var(--paper-2); border-radius: 8px; padding: .55rem .3rem; font-family: var(--mono); font-size: .88rem; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.slots button:not(:disabled):hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.slots button:disabled { background: var(--sunk); color: var(--ink-3); text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.confirm { text-align: center; padding: 1.6rem 1rem 1rem; display: grid; gap: .5rem; justify-items: center; animation: pop .5s var(--ease); }
.confirm .tick { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; }
.confirm h3 { font-size: 1.3rem; }
.confirm .when { font-family: var(--display); font-weight: 600; color: var(--ink-2); }
.confirm .ref { font-family: var(--mono); font-size: .8rem; color: var(--ink-3); }
.confirm .note { font-size: .88rem; color: var(--ink-2); max-width: 26rem; margin: .4rem 0 .6rem; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.owner-sum { display: flex; gap: 1.6rem; margin: .2rem 0 .8rem; font-family: var(--display); font-weight: 600; }
.owner-sum b { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.owner-sum span { display: grid; }
.owner-sum small { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
tr.noshow td:not(:last-child) { color: var(--ink-3); text-decoration: line-through; }
tr.you td { background: var(--green-soft); }
.muted-line { color: var(--ink-3); font-size: .9rem; padding: 1rem 0; }

/* --- orders --- */
.orders-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 40rem) { .orders-grid { grid-template-columns: 1fr; } }
.menu { display: grid; gap: .4rem; }
.menu-item { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper-2); }
.menu-item b { font-family: var(--display); font-weight: 600; font-size: .92rem; display: block; }
.menu-item small { color: var(--ink-3); font-family: var(--mono); font-size: .78rem; }
.qty { display: inline-flex; align-items: center; gap: .25rem; }
.qty button { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper-2); font-family: var(--mono); line-height: 1; }
.qty button:hover { border-color: var(--green); color: var(--green); }
.qty span { min-width: 1.2rem; text-align: center; font-family: var(--mono); font-size: .9rem; }
.menu-item.in { border-color: var(--green); }
.cart { background: var(--sunk); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .3rem; align-content: start; }
.cart .line { display: flex; justify-content: space-between; gap: .6rem; font-size: .9rem; }
.cart .line.total { border-top: 1px solid var(--line-2); padding-top: .5rem; margin-top: .3rem; font-family: var(--display); font-weight: 700; font-size: 1rem; }
.cart .line.vat { color: var(--ink-3); font-size: .82rem; }
.cart .empty { color: var(--ink-3); font-size: .88rem; padding: .5rem 0 .2rem; }
.cart .btn { justify-content: center; margin-top: .5rem; }
.cart .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.kitchen { margin-top: 1rem; background: var(--dark); color: var(--dark-ink); border-radius: 12px; border: 1px solid var(--dark-line); overflow: hidden; }
.kitchen .b-top { display: flex; align-items: center; justify-content: space-between; padding: .65rem 1rem; border-bottom: 1px solid var(--dark-line); color: var(--dark-ink2); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--mono); }
.kitchen .b-top b { color: var(--dark-ink); letter-spacing: 0; text-transform: none; font-family: var(--display); font-size: .9rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--dark-line); }
.tiles > div { padding: .7rem 1rem; }
.tiles > div + div { border-inline-start: 1px solid var(--dark-line); }
.tiles b { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; display: block; font-variant-numeric: tabular-nums; }
.tiles small { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-ink2); }
.tickets { display: grid; gap: .5rem; padding: .8rem 1rem; min-height: 5.5rem; }
.tickets .waiting { color: var(--dark-ink2); font-family: var(--mono); font-size: .82rem; align-self: center; text-align: center; }
.ticket { background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 8px; padding: .6rem .8rem; display: grid; gap: .35rem; animation: slide-in .5s var(--ease); transition: opacity .6s, transform .6s var(--ease); }
.ticket.gone { opacity: 0; transform: translateX(12px); }
.ticket .th { display: flex; justify-content: space-between; gap: .6rem; font-size: .88rem; }
.ticket .th b { font-family: var(--mono); color: var(--dark-ink); }
.ticket .th .st { color: var(--amber); font-family: var(--mono); font-size: .74rem; }
.ticket.ready .th .st { color: var(--live); }
.ticket .items { color: var(--dark-ink2); font-size: .82rem; }
.ticket .bar { height: 4px; background: var(--dark-line); border-radius: 2px; overflow: hidden; }
.ticket .bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width 2s linear, background .3s; }
.ticket.ready .bar i { background: var(--live); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } }

/* --- dashboard --- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
@media (max-width: 40rem) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--sunk); border-radius: 10px; padding: .7rem .8rem; min-width: 0; }
.kpi small { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: block; line-height: 1.3; min-height: 2.6em; }
.kpi b { font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 1.6vw, 1.35rem); letter-spacing: -.02em; display: block; margin: .15rem 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .delta { font-family: var(--mono); font-size: .72rem; color: var(--green); white-space: nowrap; }
.kpi-note { font-family: var(--mono); font-size: .66rem; color: var(--ink-3); margin: -.4rem 0 .9rem; text-align: end; }
.kpi .delta.down { color: var(--amber); }
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100%; height: 200px; display: block; }
.legend { display: flex; gap: 1.2rem; font-size: .78rem; color: var(--ink-2); margin-top: .5rem; font-family: var(--display); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-inline-end: .35rem; background: var(--green); }
.legend i.prev { background: transparent; border-top: 2px dashed var(--line-2); height: 0; vertical-align: 3px; }
.dash-foot { display: flex; justify-content: flex-end; margin-top: .9rem; }
.toast { position: fixed; inset-inline: 0; bottom: 1.5rem; margin: 0 auto; width: max-content; max-width: min(92vw, 34rem); background: var(--dark); color: var(--dark-ink); padding: .8rem 1.1rem; border-radius: 10px; font-size: .9rem; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease); z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .confirm, .ticket { animation: none; }
  .ticket .bar i { transition: none; }
  .days button, .slots button, .toast, .ticket { transition: none; }
}

/* demo index (all demos at a glance) */
.demo-index { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: .7rem; margin-top: 1.6rem; }
.index-card { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; align-items: baseline; text-decoration: none; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; transition: transform .3s var(--ease), border-color .2s, box-shadow .3s var(--ease); }
.index-card:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 20px 34px -30px rgba(23,28,33,.5); }
.index-card .num { font-family: var(--mono); font-size: .72rem; color: var(--green); grid-row: span 2; align-self: start; padding-top: .2rem; }
.index-card b { font-family: var(--display); font-weight: 600; font-size: .98rem; }
.index-card > span:last-child { color: var(--ink-3); font-size: .84rem; line-height: 1.4; }
