/* EventEntrance staff UI — calm, fast, mobile-first. */
:root {
  --ink: #18212f; --muted: #5f6b7a; --line: #dfe3ea; --bg: #f4f6f9; --card: #fff;
  --primary: #0e6e66; --primary-ink: #fff; --primary-soft: #e3f3f1;
  --warn: #a35a00; --warn-soft: #fff3e0; --danger: #b42318; --danger-soft: #fdecea;
  --ok: #1b7a3d; --ok-soft: #e6f4ea; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--primary); }
h1 { font-size: 1.45rem; margin: 0 0 .2rem; line-height: 1.2; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
h3 { font-size: .95rem; margin: 1.2rem 0 .4rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
p { margin: .3rem 0 .6rem; }

/* top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--ink); font-weight: 650; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.context { flex: 1; min-width: 0; display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ctx-org { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.ctx-event { overflow: hidden; text-overflow: ellipsis; }
.event-switch select { padding: .2rem .4rem; font-size: .85rem; }
.account-link { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; text-decoration: none; font-weight: 700; flex: none; }
.nav { display: flex; gap: .25rem; padding: 0 .75rem .45rem; max-width: 1100px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.nav a, .nav-logout button { padding: .45rem .75rem; border-radius: 999px; text-decoration: none; color: var(--muted); white-space: nowrap; font-size: .92rem; }
.nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-logout { margin-left: auto; }
.nav-logout button { background: none; border: 0; cursor: pointer; font: inherit; font-size: .92rem; }
@media (max-width: 560px) { .brand-text { display: none; } }

.page { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 2rem 1rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin: .3rem 0 1rem; flex-wrap: wrap; }
.crumb { margin: 0 0 .2rem; font-size: .88rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }

/* flash */
.flash { padding: .7rem .9rem; border-radius: 8px; margin-bottom: 1rem; background: var(--ok-soft); color: var(--ok); border: 1px solid #b8dfc4; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #f3c1bb; }

/* forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .8rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; font: inherit; padding: .62rem .7rem; border: 1px solid #c9cfd8; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; display: inline; margin: 0 .4rem 0 0; }
input[type=color] { height: 2.6rem; padding: .2rem; }
textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.check { display: flex; align-items: center; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; }
.checks .check { margin: 0; }
.two { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.form-inline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.form-inline input, .form-inline select { width: auto; flex: 1 1 130px; margin: 0; }
.field-error { color: var(--danger); font-size: .88rem; margin: -.4rem 0 .6rem; font-weight: 600; }
.req { font-weight: 500; font-size: .75rem; color: var(--danger); }
.label { margin-bottom: .3rem; }
.hint { background: var(--warn-soft); color: var(--warn); padding: .5rem .7rem; border-radius: 8px; font-size: .9rem; margin-top: .6rem; }
.narrow { max-width: 420px; margin: 0 auto; padding: 2rem 1rem; }
.plain-brand { display: flex; align-items: center; gap: .5rem; font-weight: 650; margin-bottom: 1rem; }
.plain-foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 2rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1rem; border-radius: 8px; border: 1px solid #c9cfd8; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-whatsapp { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 1.08rem; }
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* segmented controls */
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg-opt { margin: 0; font-weight: 500; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span, .seg-btn { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .85rem; border: 1px solid #c9cfd8; border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-weight: 500; user-select: none; }
.seg-opt input:checked + span, .seg-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* new order */
.avail { margin: .2rem 0 0; padding: .35rem .7rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .92rem; }
.avail-out { background: var(--danger-soft); color: var(--danger); }
.order-form { max-width: 720px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .7rem; }
.step h2 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.step .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 700; }
.big-select { font-size: 1.05rem; padding: .7rem; margin-top: 0; }
.qty-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.qty-chips .seg-btn { min-width: 48px; justify-content: center; font-size: 1.05rem; }
.stepper { display: flex; align-items: center; }
.stepper input { width: 4.2rem; text-align: center; margin: 0; font-size: 1.1rem; font-weight: 700; border-radius: 0; }
.step-btn { min-width: 44px; min-height: 44px; border: 1px solid #c9cfd8; background: #fff; font-size: 1.3rem; cursor: pointer; }
.step-btn:first-child { border-radius: 8px 0 0 8px; }
.step-btn:last-child { border-radius: 0 8px 8px 0; }
.total-line { font-size: 1.05rem; margin: .7rem 0 0; }
.money-input { display: flex; align-items: center; gap: .3rem; max-width: 12rem; }
.money-input input { margin: 0; }
.inline-label { margin-top: .8rem; }
.typed { border-color: #c9d8d6; }
.submit-bar { position: sticky; bottom: 0; padding: .6rem 0 .8rem; background: linear-gradient(transparent, var(--bg) 30%); }
.reveal[hidden] { display: none; }

/* order page */
.badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef0f4; color: #3a4554; white-space: nowrap; }
.badge-pay-paid, .badge-ful-collected, .badge-ful-delivered { background: var(--ok-soft); color: var(--ok); }
.badge-pay-partial, .badge-ful-partial { background: var(--warn-soft); color: var(--warn); }
.badge-pay-unpaid { background: var(--danger-soft); color: var(--danger); }
.badge-cancelled { background: #3a4554; color: #fff; }
.share textarea { font-size: .92rem; line-height: 1.4; margin: 0 0 .7rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.share-new { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid #f0f2f5; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; }
@media (min-width: 800px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.codes { font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.owed { color: var(--danger); }
.tbd { color: var(--warn); font-weight: 600; }
.ticket-list, .order-list, .people-list, .history, .follow { list-style: none; margin: 0; padding: 0; }
.ticket-row { padding: .6rem 0; border-bottom: 1px solid #f0f2f5; }
.ticket-row-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ticket-row .code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 1.05rem; }
.ticket-row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.is-cancelled { opacity: .6; }
details.edit > summary { cursor: pointer; list-style: none; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary h2 { display: inline; }
details.edit > summary::after { content: "▾"; float: right; color: var(--muted); }
details.edit[open] > summary { margin-bottom: .8rem; }
details.mini summary { cursor: pointer; color: var(--primary); font-size: .88rem; }
details.mini form { margin-top: .4rem; }
.danger { border-color: #f3c1bb; }
.history li { padding: .45rem 0; border-bottom: 1px solid #f0f2f5; font-size: .9rem; }

/* orders list */
.filters .search-row, .search-row { display: flex; gap: .5rem; }
.search-row input { margin: 0; }
.filters details { margin-top: .6rem; }
.filters summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .92rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 .8rem; margin-top: .6rem; }
.order-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; margin-bottom: .5rem; text-decoration: none; color: var(--ink); }
.order-item:hover { border-color: var(--primary); }
.oi-main { display: flex; justify-content: space-between; gap: .5rem; }
.oi-name { font-weight: 650; }
.oi-qty { white-space: nowrap; font-weight: 600; }
.oi-codes { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--muted); margin: .15rem 0 .35rem; }
.oi-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.empty { text-align: center; color: var(--muted); padding: 2rem; }

/* dashboard */
.stats { display: grid; gap: .6rem; margin-bottom: .7rem; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .8rem; }
.stat-label { display: block; color: var(--muted); font-size: .8rem; }
.stat-value { display: block; font-size: 1.45rem; font-weight: 700; margin-top: .1rem; }
@media (max-width: 480px) { .stat-value { font-size: 1.15rem; } }
.stat-accent { border-color: var(--primary); background: var(--primary-soft); }
.stat-warn .stat-value { color: var(--warn); }
.meter { height: 8px; border-radius: 999px; background: #e3e7ee; overflow: hidden; margin: 0 0 1.2rem; }
.meter-fill { display: block; height: 100%; background: var(--primary); }
.grid-2 { display: grid; gap: 0 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.mini-table, .table { width: 100%; border-collapse: collapse; }
.mini-table th, .mini-table td, .table th, .table td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid #f0f2f5; }
.mini-table th, .table th { color: var(--muted); font-weight: 500; font-size: .82rem; }
.mini-table td:not(:first-child), .mini-table th:not(:first-child), .num { text-align: right; }
.table-wrap { overflow-x: auto; }
.follow li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid #f0f2f5; }
.count { font-weight: 700; }

/* settings */
.logo-row { display: flex; gap: 1rem; align-items: center; }
.logo-preview { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.logo-row label { flex: 1; }
.person-form .two label { margin-bottom: .5rem; }
.copied { background: var(--ok-soft) !important; border-color: var(--ok) !important; color: var(--ok) !important; }

/* post-launch update: warnings, users, reports */
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: #f2d3a6; }
.user-head { margin: 0 0 .3rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.user-fields { display: grid; gap: 0 .8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.user-fields label { margin-bottom: .5rem; }
.report-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.report-links .card { margin: 0; }
.report-links a { font-size: 1.05rem; }
.report-filters .filter-grid { margin: 0 0 .5rem; }
.report-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.report-totals div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; }
.report-totals span { display: block; font-size: .75rem; color: var(--muted); }
.report-totals strong { font-size: 1.05rem; }
.report-table { font-size: .88rem; background: #fff; }
.report-table td, .report-table th { white-space: nowrap; }
.report-table td:nth-child(4), .fulfillment-table td { white-space: normal; }
.report-table tfoot th { border-top: 2px solid var(--ink); color: var(--ink); font-weight: 700; }
.report-table tr.is-cancelled td { text-decoration: line-through; }
.tick { width: 1.5rem; text-align: center; }
.cancelled-banner strong { letter-spacing: .04em; }
.ticket-row.is-cancelled { opacity: 1; background: repeating-linear-gradient(-45deg, #fff, #fff 8px, #fbeceb 8px, #fbeceb 16px); padding-left: .5rem; border-left: 4px solid var(--danger); }
.ticket-row.is-cancelled .code { text-decoration: line-through; color: var(--danger); }
.cancelled-note { margin: .25rem 0 0; color: var(--danger); }
details.mini-danger summary { color: var(--danger); }

/* 1.1.1: first-time tutorial prompt */
.tour-prompt { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; background: rgba(15, 25, 40, .45); }
.tour-card { background: #fff; border-radius: 14px; padding: 1.4rem 1.3rem 1rem; max-width: 420px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tour-card h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
.tour-kicker { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.tour-card .btn-row { margin: 1rem 0 .4rem; }
.foot a, .plain-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 1.1.3: order status tabs and cancelled ticket numbers */
.order-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0 0 .7rem; }
.order-tab { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); text-decoration: none; font-size: .92rem; }
.order-tab span { display: inline-block; min-width: 1.4rem; text-align: center; margin-left: .2rem; padding: 0 .35rem; border-radius: 999px; background: #eef0f4; font-size: .8rem; }
.order-tab.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.oi-cancelled-codes { color: var(--danger); text-decoration: line-through; margin-left: .3rem; }
.oi-cancelled-codes em { text-decoration: none; display: inline-block; font-style: normal; font-weight: 700; font-size: .75rem; text-transform: uppercase; margin-left: .2rem; }
.is-cancelled-row td { color: #7a2a22; background: #fdf4f3; }
.is-cancelled-row td.codes { text-decoration: line-through; }
.register-proof { margin-top: -.3rem; }

/* 1.1.3.1: options that don't apply right now (e.g. Pickup while Cash on Delivery is chosen) */
.seg-opt input:disabled + span { opacity: .45; cursor: not-allowed; text-decoration: line-through; background: #f3f4f6; }

/* 1.2.0 campaigns, pledges and supporters */
.campaign-list { display: grid; gap: .8rem; margin-bottom: 1rem; }
.campaign-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.campaign-card h2 { margin: .1rem 0 .4rem; }
.kind-label { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge-public { background: var(--primary-soft); color: var(--primary); }
.badge-status-active { background: var(--ok-soft); color: var(--ok); }
.badge-status-draft { background: var(--warn-soft); color: var(--warn); }
.badge-status-closed { background: #3a4554; color: #fff; }
.meter-split { display: flex; }
.meter-split .meter-fill { flex: none; }
.meter-pledged { display: block; height: 100%; background: repeating-linear-gradient(45deg, #9fb3d9, #9fb3d9 4px, #c3d0ea 4px, #c3d0ea 8px); }
.key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: -1px; margin-left: .4rem; }
.key-received { background: var(--primary); }
.key-pledged { background: #9fb3d9; }
.stat-note { display: block; color: var(--muted); font-size: .75rem; margin-top: .1rem; }
.campaign-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.amount-chips { flex-wrap: wrap; }
.match-review { border-color: var(--warn); background: var(--warn-soft); }
.dup-row { border-top: 1px solid var(--line); padding: .5rem 0; }
.pledge-table td.num, .pledge-table th.num { white-space: nowrap; }
.campaign-form h2 { margin-top: 1.2rem; }

/* 1.2.0 navigation: Admin group (desktop) and a bottom bar on phones */
.nav-admin { position: relative; }
.nav-admin summary { list-style: none; cursor: pointer; padding: .45rem .75rem; border-radius: 999px; color: var(--muted); white-space: nowrap; font-size: .92rem; }
.nav-admin summary::-webkit-details-marker { display: none; }
.nav-admin summary::after { content: " \25BE"; }
.nav-admin summary.on, .nav-admin[open] summary { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-admin-menu { position: absolute; z-index: 30; top: 2.3rem; left: 0; min-width: 11rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 30, 50, .12); padding: .35rem; display: grid; }
.nav-admin-menu a { border-radius: 8px; }
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .4rem .1rem .45rem; min-height: 54px; justify-content: center;
    text-decoration: none; color: var(--muted); font-size: .72rem; line-height: 1.1; text-align: center; }
  .bottom-nav a span { font-size: 1.2rem; line-height: 1.1; }
  .bottom-nav a.on { color: var(--primary); font-weight: 700; }
  body.admin { padding-bottom: 72px; }
}
.menu-list { display: grid; gap: .5rem; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.menu-list a.on { border-color: var(--primary); color: var(--primary); }
.menu-group { margin: 1rem 0 .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* 1.2.0 initiative dashboard: financial story first, participation below, cards on phones */
.fin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 .6rem; }
.fin .stat-value { font-size: 1.3rem; overflow-wrap: anywhere; }
@media (max-width: 760px) { .fin { grid-template-columns: 1fr 1fr; } .fin .stat-value { font-size: 1.1rem; } }
.participation { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin: .2rem 0 1rem; padding: .6rem .8rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: .92rem; }
.participation b { font-variant-numeric: tabular-nums; }
.plist { display: grid; gap: .5rem; }
.pitem { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .6rem; }
.pitem.is-cancelled-row { opacity: .6; }
.pitem .ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.pitem .meta { font-size: .82rem; color: var(--muted); }
.pitem .amt { text-align: right; font-weight: 700; white-space: nowrap; }
.pitem .amt small { display: block; font-weight: 600; }
.plist-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding: .6rem .75rem; font-size: .9rem; border-top: 2px solid var(--ink); margin-top: .4rem; }
.entry-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 760px) { .entry-actions { display: grid; grid-template-columns: 1fr 1fr; } .entry-actions .btn { text-align: center; } }
.initiative-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.order-ctl { display: inline-flex; gap: .25rem; }
@media (min-width: 761px) { .nav { overflow: visible; flex-wrap: wrap; } }
.cover-preview { width: 220px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* 1.2.1: new online orders (per user) */
.nav-count { display: inline-block; min-width: 1.25rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.25rem; text-align: center; vertical-align: 1px; }
.bottom-nav a { position: relative; }
.bottom-nav .nav-count { position: absolute; font-size: .7rem; line-height: 1.1rem; min-width: 1.1rem; top: 2px; margin-left: 0; transform: translateX(14px); }
.new-online { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .7rem .9rem; margin: 0 0 1rem; border: 1px solid var(--primary); border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.badge-new { background: var(--danger); color: #fff; }
.order-tab-online { margin-left: auto; }

/* 1.3.0: ticket types, receipts, check-in */
dd.mono, .mono { font-family: ui-monospace, Consolas, monospace; }
.receipt-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-top: 1px solid var(--line); }
.receipt-row:first-of-type { border-top: 0; }
.card.attention { border: 2px solid var(--warn); }
.card.attention h2 .count { background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 0 .5rem; font-size: .9rem; }
.type-grid { display: grid; gap: .5rem; }
.type-pick { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; background: #fff; }
.type-pick input { width: 5.5rem; }
.checkin .cam { position: relative; aspect-ratio: 1; max-width: 420px; margin: 0 auto .8rem; border-radius: 16px; background: #0e1a24; color: #b8c7d3; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.checkin .cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.checkin .cam p { padding: 1rem; }
.checkin-result { border-radius: 14px; padding: 1rem; text-align: center; margin-top: .8rem; }
.checkin-ok { background: var(--ok-soft); color: var(--ok); }
.checkin-warn { background: var(--warn-soft); color: var(--warn); }
.checkin-bad { background: var(--danger-soft); color: var(--danger); }
.cr-name { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 0; }
.cr-state { font-weight: 700; margin: .2rem 0; }
.checkin-list { list-style: none; padding: 0; margin: .6rem 0 0; }
.checkin-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.acting-bar { background: #1f2a44; color: #fff; padding: .5rem 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .92rem; }
.acting-bar form { display: inline; margin: 0; }
.acting-bar button { background: #fff; color: #1f2a44; border: 0; border-radius: 999px; padding: .25rem .8rem; font: inherit; font-weight: 600; cursor: pointer; }
.acting-bar a { color: #cfe0ff; }
.org-list .org-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }   /* an element marked hidden stays hidden whatever its other styles */
/* 1.4.0: image upload guidance */
.img-frame { flex: none; width: 160px; display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 10px;
  color: var(--muted); font-size: .78rem; line-height: 1.3; background: #fafbfc; padding: 4px; }
.img-frame-logo { width: 72px; font-size: .68rem; }
.img-spec { display: block; margin-top: 6px; font-size: .8rem; font-weight: 400; color: var(--muted); line-height: 1.4; }
@media (max-width: 600px) { .logo-row { flex-direction: column; align-items: stretch; } .img-frame { width: 100%; max-width: 260px; } }
/* 1.4.0: Integrations */
.int-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.int-head h2 { margin: 0; }
.int-status { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: #eef0f4; color: var(--muted); white-space: nowrap; }
.int-status.is-on { background: #e5f6ec; color: #1b7a43; }
.int-status.is-off { background: #fff3dc; color: #8a5a00; }
.int-help { margin: 10px 0; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.int-help summary { cursor: pointer; font-weight: 600; }
.int-help ol { margin: 8px 0 4px; padding-left: 20px; line-height: 1.5; }
.int-actions { margin-top: 12px; flex-wrap: wrap; }
.int-actions form { margin: 0; }
.int-disconnect { margin-top: 12px; }
.int-disconnect summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.int-list { list-style: none; margin: 0; padding: 0; }
.int-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.int-list li:first-child { border-top: 0; }
.int-list span:not(.int-status) { display: block; color: var(--muted); font-size: .88rem; }
@media (max-width: 600px) { .int-list li { flex-direction: column; align-items: flex-start; } }
/* 1.5.0: show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 4.5rem; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand, #0e6e66); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 8px; }
.center { text-align: center; }
/* 1.6.0: sign-up, billing, invoices */
.signup { max-width: 640px; }
.signup h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.signup-price { margin: 8px 0; padding: 10px 12px; background: #f3f8f7; border-radius: 10px; }
.signup-price strong { font-size: 1.25rem; }
.signup-price .small { display: block; margin-top: 4px; }
.sub-note { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-weight: 600; }
.sub-note-info { background: #eef4ff; border: 1px solid #cfdcf5; }
.sub-note-warn { background: #fff3dc; border: 1px solid #f0d9a8; color: #5b3d00; }
.agency-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.agency-inv { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.invoice { max-width: 760px; }
.inv-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.inv-meta { text-align: right; }
.inv-meta h1 { margin: 0 0 4px; }
.inv-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: #fff3dc; color: #8a5a00; }
.inv-paid { background: #e5f6ec; color: #1b7a43; }
.inv-void { background: #eef0f4; color: var(--muted); }
.inv-total td { font-weight: 800; border-top: 2px solid var(--ink, #222); }
.inv-pay { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
@media print { .no-print, .inv-pay form, .plain-brand, .plain-foot { display: none !important; } .card { border: 0; box-shadow: none; } }
@media (max-width: 560px) { .inv-meta { text-align: left; } }
/* 1.6.0 demo maker */
.demo-amount { width: 6em; }
.demo-made { border-left: 4px solid var(--brand, #1d3f8f); }
.demo-made .mono { word-break: break-all; }
.demo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo-row input, .demo-row select { width: auto; margin: 0; }
.demo-row input.demo-amount { width: 6em; }
.demo-row label { display: flex; gap: 8px; align-items: center; margin: 0; }
/* 1.6.0 two-step sign-in */
.two-step-steps { padding-left: 1.2em; line-height: 1.55; }
.two-step-steps li { margin-bottom: 10px; }
.two-step-qr { margin: 10px 0; width: 148px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.recovery-codes { font-size: 1.05rem; letter-spacing: .04em; }
.agency-two-step { border-left: 4px solid var(--warn, #b26b00); }
/* 1.6.3: the bot trap on plain pages (sign-up): never seen by people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 1.6.3 sign-up: what you pay today and after */
.signup-total { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; margin: .6rem 0 .4rem; background: var(--primary-soft, #eef7f5); }
.st-row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.st-today strong { font-size: 1.5rem; }
.st-detail { margin: .15rem 0 .5rem; color: var(--muted); font-size: .85rem; }
/* 1.6.5 colours: a big swatch and a hex box side by side */
.color-pair { display: flex; gap: 8px; align-items: center; }
.color-pair input[type="color"] { width: 56px; height: 44px; padding: 2px; flex: 0 0 auto; cursor: pointer; }
.color-pair .hex-box { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.hex-box.is-bad { border-color: var(--danger, #b42318); }
/* 1.6.5 page design choices with a small picture */
.design-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.design-pick label { display: block; border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; }
.design-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.design-pick svg { display: block; width: 100%; height: auto; margin: 6px 0; border-radius: 6px; background: #f1f4f7; }
.design-pick small { display: block; color: var(--muted); }
@media (max-width: 560px) { .design-pick { grid-template-columns: 1fr; } }
/* 1.7.0 Pay now with DigiWallet */
.dw-box { border: 2px solid #c8102e22; border-radius: 12px; padding: 14px 16px; margin: 14px 0; background: #fff; }
.dw-title { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.dw-title span { font-weight: 700; }
.dw-form { display: grid; gap: 8px; margin-bottom: 8px; }
.dw-form input { font-size: 1.1rem; padding: 10px 12px; border: 1px solid #cfd6e4; border-radius: 8px; width: 100%; box-sizing: border-box; }
.dw-btn { background: #c8102e; color: #fff; border: 0; border-radius: 8px; padding: 12px 16px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.dw-btn-ghost { background: transparent; color: #c8102e; border: 1.5px solid #c8102e; }
.dw-again { border-top: 1px dashed #dde3ea; padding-top: 10px; }
.dw-note { font-size: .85rem; color: #5b6876; margin: 4px 0 0; }
/* 1.9.0 Release Center */
.rc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.rc-stats a.stat { color: inherit; text-decoration: none; }
.rc-stats a.stat:hover { border-color: var(--primary); }
.rc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 .8rem; }
.rc-head { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; }
.rc-grid { display: grid; gap: 0 .8rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.rc-table td { vertical-align: top; }
.rc-pre { white-space: pre-wrap; word-break: break-word; background: #f6f7f9; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; font: inherit; font-size: .92rem; }
.rc-comment { border-top: 1px solid var(--line); padding: .4rem 0; }
.rc-comment p { margin: .15rem 0; }
.badge.rc-sev-critical { background: var(--danger); color: #fff; }
.badge.rc-sev-high { background: var(--danger-soft); color: var(--danger); }
.badge.rc-sev-medium { background: var(--warn-soft); color: var(--warn); }
.badge.rc-rel-released { background: var(--ok-soft); color: var(--ok); }
.badge.rc-rel-rolled_back { background: var(--danger-soft); color: var(--danger); }
.badge.rc-rel-not_recorded, .badge.rc-rel-superseded { white-space: normal; }
.whats-new ul { margin: .3rem 0 .8rem 1.1rem; padding: 0; }
.whats-new h3 { margin: .6rem 0 .2rem; font-size: 1rem; }
.check.demo-terms { align-items: flex-start; gap: .5rem; font-weight: 400; font-size: .92rem; margin: .4rem 0 .9rem; }
.country-box { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; }
/* 1.11.0 (STD-002): left sidebar menu. Colours come from Agency → Look & navigation (CSS variables set in the page). */
:root { --side-w: 252px; --side-bg: #366050; --side-ink: #fff; --side-hover: #0e7e72; --side-active: #00fcfc; --side-active-ink: #08302b; --side-soft-active: #dff2ef; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 100; background: #fff; padding: .5rem .8rem; border-radius: 8px; }
.skip-link:focus { left: .5rem; }
.side { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); background: var(--side-bg); color: var(--side-ink); overflow-y: auto; overscroll-behavior: contain;
  z-index: 60; padding: .6rem .55rem 1.5rem; display: flex; flex-direction: column; gap: .15rem; }
.side-brand { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-weight: 700; padding: .45rem .6rem .8rem; }
.side-brand .brand-mark { background: var(--side-active); color: var(--side-active-ink); }
.side-panel { display: flex; flex-direction: column; gap: .12rem; }
.side-panel[hidden] { display: none; }
.side-link { display: flex; align-items: center; gap: .65rem; padding: .58rem .7rem; border-radius: 8px; color: inherit; text-decoration: none; font-size: .94rem; line-height: 1.25; position: relative; }
.side-link .nav-icon { flex: none; opacity: .92; }
.side-label { flex: 1; min-width: 0; }
.side-link:hover { background: var(--side-hover); }
.side-link.on { background: var(--side-active); color: var(--side-active-ink); font-weight: 700; }
.side-link.on .nav-icon { opacity: 1; }
.side-link:focus-visible, .side-group-head:focus-visible, .side-toggle:focus-visible, .profile-menu summary:focus-visible { outline: 3px solid var(--side-active); outline-offset: 2px; }
.side-link .nav-count { margin-left: auto; }
.side-group { margin-top: .35rem; }
.side-group-head { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: .45rem .7rem; border-radius: 8px;
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; opacity: .85; }
.side-group-head::-webkit-details-marker { display: none; }
.side-group-head::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 .2rem .2rem 0; transition: transform .15s; }
.side-group:not([open]) .side-group-head::after { transform: rotate(-45deg); margin: 0 .3rem 0 0; }
.side-group-head:hover { background: var(--side-hover); opacity: 1; }
.side-group.has-on > .side-group-head { opacity: 1; box-shadow: inset 3px 0 0 var(--side-active); }
.side-group-items { display: flex; flex-direction: column; gap: .12rem; padding-top: .1rem; }
.side-back { margin-bottom: .3rem; font-weight: 600; }
.side-sub-title { margin: .3rem .7rem .4rem; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; opacity: .85; }
.side-sub-link { padding-left: 1rem; }
/* the soft (lighter, section-oriented) menu */
.side-soft .side { background: #fff; color: var(--ink); border-right: 1px solid var(--line); }
.side-soft .side-brand .brand-mark { background: var(--primary); color: #fff; }
.side-soft .side-link:hover, .side-soft .side-group-head:hover { background: #eef2f5; }
.side-soft .side-link.on { background: var(--side-soft-active); color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.side-soft .side-group-head { color: var(--muted); }
.side-soft .side-group.has-on > .side-group-head { box-shadow: inset 3px 0 0 var(--primary); color: var(--ink); }
.side-soft .side-link:focus-visible, .side-soft .side-group-head:focus-visible { outline-color: var(--primary); }
/* the top bar beside it: context and the account menu only */
.side-toggle { display: none; background: none; border: 0; padding: .35rem; margin: 0 -.2rem 0 -.35rem; border-radius: 8px; color: var(--ink); cursor: pointer; }
.side-toggle .nav-icon { width: 24px; height: 24px; }
.profile-menu { position: relative; flex: none; }
.profile-menu summary { list-style: none; cursor: pointer; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu-list { position: absolute; right: 0; top: 2.5rem; z-index: 70; min-width: 13rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: .4rem; display: grid; }
.profile-menu-list a, .profile-menu-list button { display: block; width: 100%; text-align: left; padding: .55rem .65rem; border-radius: 8px; color: var(--ink); text-decoration: none;
  background: none; border: 0; font: inherit; font-size: .92rem; cursor: pointer; }
.profile-menu-list a:hover, .profile-menu-list button:hover { background: var(--primary-soft); }
.profile-who { margin: .2rem .65rem .4rem; font-size: .9rem; overflow-wrap: anywhere; }
.side-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 20, .42); z-index: 55; }
.side-backdrop[hidden] { display: none; }
@media (min-width: 1000px) {
  body.has-side { padding-left: var(--side-w); }
  body.has-side .topbar .brand { display: none; }
  body.has-side .topbar-row, body.has-side .page { max-width: 1180px; }
}
@media (max-width: 999px) {
  .side { transform: translateX(-105%); transition: transform .2s ease; box-shadow: none; }
  body.side-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .side-toggle { display: inline-grid; place-items: center; }
}
@media (prefers-reduced-motion: reduce) { .side, .side-group-head::after { transition: none; } }
@media print { .side, .side-toggle, .side-backdrop, .profile-menu { display: none !important; } body.has-side { padding-left: 0; } }
/* the dashboard as widgets */
.dash-grid { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dash-wide { grid-column: 1 / -1; } }
.dash-customize .dash-row { display: grid; grid-template-columns: 4.2rem 1fr; gap: .6rem; align-items: center; padding: .35rem 0; border-top: 1px solid var(--line); }
.dash-customize .dash-row input[type=number] { margin: 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid #f0f2f5; flex-wrap: wrap; }
/* Agency → Look & navigation */
.look-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.look-preview { display: grid; grid-template-columns: 170px 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 190px; margin: .4rem 0 1rem; }
.look-preview .lp-side { padding: .5rem; display: grid; align-content: start; gap: .2rem; font-size: .85rem; }
.look-preview .lp-side span { padding: .4rem .55rem; border-radius: 7px; }
.look-preview .lp-main { background: var(--bg); padding: .8rem; font-size: .85rem; }
.look-preview .lp-btn { display: inline-block; padding: .4rem .7rem; border-radius: 8px; color: #fff; font-weight: 600; margin-top: .4rem; }
.label-table td { vertical-align: middle; }
.label-table input { margin: 0; }
@media (max-width: 560px) { .look-preview { grid-template-columns: 1fr; } }
.menu-list + .menu-list, .menu-list + .menu-group { margin-top: .6rem; }
