/* Le Guide Locale — advertiser portal (extends /assets/css/site.css) */

body.app { background: var(--soft); }
.app-bar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 0 rgba(2, 20, 46, .08); }
.app-bar__row { display: flex; align-items: center; gap: 28px; height: 70px; }
.app-bar__brand { display: flex; align-items: center; gap: 12px; }
.app-bar__brand img { width: 82px; }
.app-bar__brand span { padding-left: 12px; border-left: 1px solid var(--line); font: 700 12px var(--heading); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.app-bar__nav { display: flex; gap: 6px; margin-left: 12px; }
.app-bar__nav a { padding: 9px 14px; border-radius: 999px; font: 600 14px var(--heading); color: var(--ink); white-space: nowrap; }
.app-bar__nav a:hover { background: rgba(2, 20, 46, .05); color: var(--ink); }
.app-bar__nav a[aria-current] { color: var(--white); background: var(--ink); }
.app-bar__right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.app-bar__out { font: 600 14px var(--heading); color: var(--muted); }
.app-main { padding: 40px 0 72px; min-height: calc(100vh - 140px); }
.app-foot { padding: 24px 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: var(--white); }
.app-flash { margin-bottom: 24px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.page-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.1; }
.lead { margin-top: 8px; color: var(--muted); }
.back { display: inline-block; margin-bottom: 14px; font: 600 14px var(--heading); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--ghost-dark { color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost-dark:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--full { width: 100%; justify-content: center; margin-top: 6px; }
.narrow { max-width: 560px; }
.narrow .card { margin-top: 24px; }
.narrow .field { margin-bottom: 14px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 11px var(--heading); letter-spacing: .04em; color: var(--g3); background: #e7f7e1; vertical-align: middle; }
.empty { padding: 26px 4px; color: var(--muted); }
.notice--info { margin-bottom: 24px; background: #eef4fd; box-shadow: inset 3px 0 0 var(--blue); }

/* login */
.login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; min-height: 62vh; }
.login h1 { margin: 6px 0 16px; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; font-weight: 800; }
.login__intro > p:not(.eyebrow) { font-size: 17px; color: var(--muted); max-width: 520px; }
.login__card h2 { margin-bottom: 18px; font-size: 22px; }
.login__card .field { margin-bottom: 14px; }
.login__help { margin-top: 18px; font-size: 13px; color: var(--muted); }
.ticks--dark li { color: var(--text); }

/* KPIs + panels */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis--3 { grid-template-columns: repeat(3, 1fr); }
.kpi { padding: 20px 22px; border-radius: 18px; background: var(--white); box-shadow: 0 1px 2px rgba(2, 20, 46, .05); }
.kpi__label { font: 700 11px var(--heading); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi__value { margin: 8px 0 4px; font: 800 28px/1.1 var(--heading); color: var(--ink); letter-spacing: -.02em; }
.kpi__note { font-size: 12px; color: var(--muted); }
.kpi--green { background: linear-gradient(135deg, #e9f8e1, #fff); }
.kpi--green .kpi__value { color: var(--g3); }
.kpi--navy { background: var(--ink); }
.kpi--navy .kpi__label, .kpi--navy .kpi__note { color: #9fb0c8; }
.kpi--navy .kpi__value { color: var(--g1); }
.kpi--red .kpi__value { color: var(--red); }
.panel { margin-bottom: 18px; padding: 24px; border-radius: 18px; background: var(--white); box-shadow: 0 1px 2px rgba(2, 20, 46, .05); }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.panel__head h2 { font-size: 18px; font-weight: 800; }
.panel__head > span { font-size: 13px; color: var(--muted); }
.grid2 { display: grid; gap: 18px; margin-bottom: 0; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid2 > .panel { margin-bottom: 18px; }

/* charts */
.chart { display: block; width: 100%; height: auto; }
.chart--phone { display: none; }
.chart__grid { stroke: #edf1f6; stroke-width: 1; }
.chart__axis { font: 500 10px var(--body); fill: #8a97a8; }
.chart rect { transition: opacity .2s; }
.chart rect:hover { opacity: .75; }
.hbars li { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.hbars__track { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.hbars__track span { display: block; height: 100%; border-radius: 999px; }
.hbars__val { text-align: right; font: 700 13px var(--heading); color: var(--ink); }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 12px; font: 700 11px var(--heading); letter-spacing: .08em; text-transform: uppercase; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.link-arrow { font: 700 13px var(--heading); white-space: nowrap; }
.link-danger { padding: 0; border: 0; font: 600 13px var(--heading); color: #c62828; background: none; cursor: pointer; }
.pill-status { display: inline-block; padding: 5px 11px; border-radius: 999px; font: 700 12px var(--heading); white-space: nowrap; }
.pill-status--planned { color: #475467; background: #eef1f5; }
.pill-status--production { color: #8a4b00; background: #fff1de; }
.pill-status--sent { color: #1f4e96; background: #e6eefb; }
.pill-status--delivered { color: #176b2c; background: #e3f6dc; }
.pill-status--postponed { color: #a3201f; background: #fde8e8; }

/* forms in the portal */
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.inline-form .field { min-width: 120px; }
.field--grow { flex: 1; min-width: 200px; }
.field select, .mailing__form select, .mailing__form input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 400 15px var(--body); color: var(--text); background: var(--soft); }
.logins li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.logins li > div { flex: 1; min-width: 180px; }
.logins small { display: block; color: var(--muted); }
.logins + .inline-form { margin-top: 18px; }

/* admin overview */
.mailings { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.mailing__fill { font-size: 14px; color: var(--muted); }
.mailing__fill b { font: 800 26px var(--heading); color: var(--ink); }
.meter { height: 8px; margin: 10px 0 16px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.mailing__facts li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.mailing__form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 16px 0 12px; }
.mailing__form select { grid-column: 1 / -1; }
.mailing__form select, .mailing__form input { padding: 9px 10px; font-size: 13px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 999px; font: 600 13px var(--heading); color: var(--ink); background: var(--white); }
.tabs a[aria-current] { color: var(--white); background: var(--ink); }

@media (max-width: 1080px) {
	.app-bar__row { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
	.app-bar__nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
	.app-bar__nav::-webkit-scrollbar { display: none; }
	.login, .grid2 { grid-template-columns: 1fr; }
	.kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.app-bar__brand span { display: none; }
	.hbars li { grid-template-columns: 110px 1fr 56px; }
	.kpis, .kpis--3 { grid-template-columns: 1fr 1fr; }
	.kpi__value { font-size: 24px; }
}

/* registration */
.login__switch { margin-top: 18px; font: 600 14px var(--heading); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 6px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--g2); }
.check.field--error span { color: #c62828; }
.pending li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pending li > div { flex: 1; min-width: 220px; }
.pending small { display: block; color: var(--muted); }
.pending select { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: 400 14px var(--body); background: var(--soft); }

/* promo page editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.editor .field { margin-bottom: 14px; }
.editor .field small { font-weight: 500; color: var(--muted); }
.editor__h { margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 800; }
.editor__h:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.field__label { font: 700 13px var(--heading); color: var(--ink); }
.field input[type=file] { padding: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--b) 50%, var(--a) 50%); box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--line); transition: box-shadow .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--g2); }
.swatch input:focus-visible + span { outline: 3px solid var(--g1); outline-offset: 4px; }
.swatch small { font: 600 12px var(--heading); color: var(--muted); }
.lang-pick { display: inline-flex; align-items: center; gap: 12px; font: 600 14px var(--heading); color: var(--ink); }
.lang-pick label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.phone { position: sticky; top: 90px; }
.phone__frame { margin-bottom: 14px; padding: 12px; border-radius: 44px; background: #0b0f17; box-shadow: 0 30px 60px -24px rgba(2, 20, 46, .6), inset 0 0 0 2px #2a3140; }
.phone__frame iframe { display: block; width: 100%; height: 680px; border: 0; border-radius: 34px; background: #fff; }
@media (max-width: 1080px) {
	.editor { grid-template-columns: 1fr; }
	.phone { position: static; max-width: 380px; margin: 0 auto; }
}

/* voucher previews */
.phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.phones figure { width: 360px; max-width: 100%; margin: 0; }
.phones figcaption { margin-top: 12px; text-align: center; font: 600 14px var(--heading); color: var(--ink); }
.kinds .pill span { padding: 10px 16px; }

/* rebate offers + current photo */
.offer { margin: 0 0 12px; padding: 16px 16px 4px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--white); }
.offer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.offer__n { font: 800 13px var(--heading); letter-spacing: .08em; text-transform: uppercase; color: var(--g2); }
.current-img { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.current-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.editor__h small { font: 500 13px var(--body); }

/* admin overview: month and status always on one line */
.mailings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mailing .panel__head { flex-wrap: nowrap; align-items: center; gap: 8px; }
.mailing .panel__head h2 { font-size: 17px; white-space: nowrap; }
.mailing .pill-status { flex: none; }
@media (max-width: 1180px) { .mailings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mailings { grid-template-columns: 1fr; } }

/* admin: vouchers overview */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.vcard { display: flex; flex-direction: column; margin: 0; }
.vcard__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vcard__top h2 { font-size: 16px; font-weight: 800; }
.vcard__top small { color: var(--muted); font-size: 13px; }
.vcard__thumb { width: 50px; height: 50px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 14px; font: 800 20px var(--heading); color: #fff; }
.vcard__thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.vstate { margin-left: auto; padding: 4px 10px; border-radius: 999px; font: 700 11px var(--heading); white-space: nowrap; }
.vstate--live { color: #176b2c; background: #e3f6dc; }
.vstate--soon { color: #1f4e96; background: #e6eefb; }
.vstate--draft { color: #8a4b00; background: #fff1de; }
.vstate--expired { color: #a3201f; background: #fde8e8; }
.vstate--none { color: #475467; background: #eef1f5; }
.vcard__offers { margin-bottom: 12px; }
.vcard__offers li { padding: 6px 0 6px 12px; border-left: 3px solid var(--acc); margin-bottom: 6px; font-size: 14px; }
.vcard__offers b { font-family: var(--heading); color: var(--ink); }
.vcard__offers small { color: var(--muted); }
.vcard__meta { margin-bottom: 14px; font-size: 13px; color: var(--text); }
.vcard .actions { margin-top: auto; }

/* phones: tables become stacked cards, one row per card */
@media (max-width: 640px) {
	.table--cards thead { display: none; }
	.table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
	.table--cards tr { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
	.table--cards td { padding: 6px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
	.table--cards td[data-label]::before { content: attr(data-label); float: left; margin-right: 12px; padding-top: 2px; font: 700 11px var(--heading); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
	.table--cards td::after { content: ""; display: table; clear: both; }
	.app-bar__nav a { padding: 8px 12px; }
	.table-wrap { overflow: visible; }
	.app-main { padding-top: 24px; }
	.page-head .btn { width: 100%; justify-content: center; }
	.page-head .actions { width: 100%; }
	.page-head .actions .btn { flex: 1; width: auto; }
	.inline-form .field, .inline-form .btn { width: 100%; }
}

/* coupons table: edit + delete side by side, edit row as a form */
.reds__actions { white-space: nowrap; }
.reds__actions form { display: inline; margin-left: 14px; }
.reds__edit td { background: var(--soft); border-radius: 12px; }
.reds__edit .inline-form { margin: 4px 0; }
@media (max-width: 640px) { .reds__edit td { padding: 12px !important; } }

/* demonstration account */
.demo-bar { margin-bottom: 22px; padding: 12px 16px; border-radius: 14px; font-size: 14px; color: #6b3a00; background: #fff1de; box-shadow: inset 3px 0 0 #e09200; }
.demo-bar b { margin-right: 6px; font-family: var(--heading); }
.demo-bar a { margin-left: 6px; font-weight: 700; color: #8a4b00; white-space: nowrap; }
.demo-link { display: block; margin-top: 18px; padding: 14px 16px; border-radius: 14px; font: 700 14px var(--heading); color: var(--ink); background: var(--soft); }
.demo-link span { display: block; font: 500 12px var(--body); color: var(--muted); }
.demo-note { padding: 14px 16px; border-radius: 12px; font-size: 14px; color: #6b3a00; background: #fff1de; }
.demo-note--inline { flex: 1; padding: 10px 14px; }

/* one-sided flyer */
.tag--single { color: #fff; background: #2e9e12; }
.pill--single { --pc: #2e9e12; }
.pill input:disabled + span { cursor: not-allowed; }

/* app subscription on the booking form */
.app-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: #f1f8ec; box-shadow: inset 3px 0 0 #2e9e12; }
.app-sub__price { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.app-sub__price label { white-space: nowrap; }
.app-sub__price input { width: 110px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: 600 15px var(--body); color: var(--text); background: #fff; }
.app-sub__note { margin: 0; flex-basis: 100%; }
.app-sub--off .app-sub__price, .app-sub--off .app-sub__note { opacity: .45; }
@media (max-width: 640px) { .app-sub__price { flex-wrap: wrap; } }

/* project check (admin › Verify) */
.notice--warn { margin-bottom: 24px; background: #fff7e6; box-shadow: inset 3px 0 0 #d97706; }
.pill-status--warn { color: #92400e; background: #fef3c7; }

/* Portal uses more of wide screens than the public site, so the admin menu fits on one line */
.app .container { width: min(1480px, 100% - 48px); }
.app-bar__out { white-space: nowrap; }
@media (max-width: 640px) { .app .container { width: calc(100% - 36px); } }
/* Menu moves to its own row before it can collide with the logo or "Log out" (admin has 7 tabs) */
@media (max-width: 1320px) {
	.app-bar__row { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
	.app-bar__nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
	.app-bar__nav::-webkit-scrollbar { display: none; }
}

/* table totals row (admin › Postal codes) */
.table tfoot td { padding-top: 14px; border-top: 2px solid var(--line); }
@media (max-width: 640px) {
	.table--cards tfoot td:empty { display: none; }
	.table--cards tfoot { display: block; width: 100%; }
	.table--cards tfoot tr { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
	.table--cards tfoot td { padding: 6px 0; border: 0; }
}

/* agreement page */
.totals td { padding: 11px 0; }
.totals td.num { text-align: right; }
.totals__grand td { padding-top: 14px; border-top: 2px solid var(--line); font-size: 17px; }
.print-logo { display: none; }
@page { size: letter; margin: 12mm 11mm; }
@media print {
	.app-bar, .app-foot, .no-print, .back { display: none !important; }
	html, body, body.app { background: #fff !important; font-size: 12px; }
	.app .container { width: 100%; margin: 0; }
	main, .page { padding: 0 !important; }
	.page-head { margin: 0 0 10px; align-items: flex-start; }
	.print-logo { display: block; width: 150px; height: auto; margin-left: auto; }
	.page-title { font-size: 24px; }
	.lead { font-size: 12px; }
	.notice { padding: 10px 12px; margin-bottom: 12px; font-size: 11px; }
	.grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
	.panel { margin-bottom: 10px; padding: 14px 16px; border-radius: 10px; box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
	.panel__head { margin-bottom: 6px; }
	.panel__head h2 { font-size: 15px; }
	.panel .facts li { padding: 4px 0; font-size: 10.5px; }
	.table-wrap { overflow: visible; }
	.table { width: 100%; table-layout: auto; }
	.table th { padding: 6px 4px; font-size: 7.5px; letter-spacing: .03em; white-space: normal; }
	.table td { padding: 6px 4px; font-size: 10px; }
	.table small { font-size: 8.5px; }
	.table--agreement th:first-child, .table--agreement td:first-child { white-space: nowrap; }
	.table--agreement .pill-status { padding: 2px 6px; font-size: 8.5px; }
	.table--agreement .tag { font-size: 8px; padding: 1px 5px; }
	.totals td { padding: 5px 0; font-size: 11px; }
	.totals__grand td { font-size: 13px; padding-top: 8px; }
	.small { font-size: 9.5px; }
	a { color: inherit; text-decoration: none; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts b { color: var(--ink); text-align: right; }

/* flyer printing box on the booking form */

/* emails to members */
.progress { height: 10px; margin: 6px 0 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: #2e9e12; transition: width .3s; }
.grid2--tight { gap: 16px; }
.form textarea { width: 100%; min-height: 220px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 14px/1.5 var(--body); color: var(--text); background: #fff; resize: vertical; }
.form__foot--wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; }
.inline-test { display: inline-flex; align-items: center; gap: 6px; }
.inline-test select { padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: 600 13px var(--body); }
details summary { cursor: pointer; margin: 10px 0 0; font: 700 13px var(--heading); color: var(--g3, #1f7a0e); }

.inline-test input { width: 230px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: 500 13px var(--body); }
@media (max-width: 640px) { .inline-test { flex-wrap: wrap; } .inline-test input { width: 100%; } }

/* Voucher tab: the app view over a frosted-glass page */
.appview { width: min(860px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 28px 28px 32px; border: 0; border-radius: 28px; background: rgba(255, 255, 255, .55); box-shadow: 0 40px 80px -30px rgba(2, 20, 46, .55), inset 0 0 0 1px rgba(255, 255, 255, .7); overflow: auto; overscroll-behavior: contain; }
.appview::backdrop { background: rgba(11, 30, 63, .28); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.appview[open] { animation: appview-in .22s ease-out; }
@keyframes appview-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.appview__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.appview__head h2 { margin: 0; font: 800 22px var(--heading); color: var(--ink); }
.appview__close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font: 400 26px/1 var(--body); cursor: pointer; }
.appview__close:hover { background: var(--navy, #0b1e3f); }
.appview .phones { gap: 32px; }
.appview .phones figure { width: 340px; }
.appview .phone__frame iframe { height: min(640px, calc(100vh - 230px)); min-height: 420px; }
html.appview-on { overflow: hidden; }
@media (max-width: 640px) {
	.appview { padding: 20px 16px 24px; border-radius: 22px; }
	.appview .phone__frame iframe { height: 600px; }
}
@media (prefers-reduced-motion: reduce) { .appview[open] { animation: none; } }
/* keep the phone preview and its button inside the screen */
.editor .phone .phone__frame iframe { height: min(680px, calc(100vh - 230px)); min-height: 460px; }
@media (max-width: 1080px) { .editor .phone .phone__frame iframe { height: 680px; } }
/* admin › advertiser: password chosen by the admin */
.setpass { flex-basis: 100%; }
.setpass summary { display: inline-block; font: 600 13px var(--heading); color: var(--ink); cursor: pointer; text-decoration: underline; }
.setpass[open] summary { margin-bottom: 10px; }
.setpass .form { padding: 14px; border-radius: 12px; background: #f6f8fb; }
.setpass .form__foot { gap: 12px; flex-wrap: wrap; }
.c-profit { color: #2e9e12; }
/* admin › inserting sheet */
.insert-sheet__box { width: 34px; }
.insert-sheet .box { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--ink, #0b1e3f); border-radius: 4px; vertical-align: middle; }
.insert-sheet__notes { width: 28%; border-bottom: 1px solid #d8dfe8; }
@media print {
	.insert-sheet { break-inside: auto; page-break-after: always; }
	.insert-sheet:last-of-type { page-break-after: auto; }
	.insert-sheet tr { break-inside: avoid; }
	.tabs.no-print { display: none !important; }
}
.table__total td { border-top: 2px solid var(--line); background: var(--soft); }
.kpis.kpis--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .kpis.kpis--3 { grid-template-columns: 1fr; } }
.kpis.kpis--6 { grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpis--6 .kpi { min-width: 0; padding: 18px 16px; }
.kpis--6 .kpi__value { font-size: 24px; }
@media (max-width: 1200px) { .kpis.kpis--6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis.kpis--6 { grid-template-columns: 1fr 1fr; } }
.kpi--info { position: relative; }
.kpi--info .kpi__label { padding-right: 20px; }
.kpi__info { position: absolute; top: 12px; right: 12px; display: inline-flex; padding: 2px; color: var(--muted); cursor: help; outline: none; }
.kpi__info svg { width: 15px; height: 15px; }
.kpi__info:hover, .kpi__info:focus { color: #2e9e12; }
.kpi--navy .kpi__info { color: #9fb0c8; }
.kpi__tip { position: absolute; z-index: 30; top: calc(100% + 6px); right: -4px; width: 230px; max-width: calc(100vw - 40px); padding: 10px 12px; border-radius: 12px; font: 500 12.5px/1.45 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #fff; background: var(--ink); box-shadow: 0 10px 30px -10px rgba(2, 20, 46, .5); opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.kpi__info:hover .kpi__tip, .kpi__info:focus .kpi__tip { opacity: 1; visibility: visible; }
@media (max-width: 640px) { .kpi__tip { width: calc((100vw - 64px) / 2); } }
.acct { position: relative; }
.acct summary { display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 8px 12px; border-radius: 999px; font: 600 14px var(--heading); color: var(--ink); list-style: none; cursor: pointer; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover, .acct[open] summary { background: rgba(2, 20, 46, .06); }
.acct[data-current] summary { color: var(--white); background: var(--ink); }
.acct summary:focus-visible { outline: 2px solid #2e9e12; outline-offset: 2px; }
.acct summary svg { width: 12px; height: 12px; flex: none; transition: transform .15s; }
.acct[open] summary svg { transform: rotate(180deg); }
.acct__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__menu { position: absolute; z-index: 50; top: calc(100% + 8px); right: 0; min-width: 190px; padding: 6px; border-radius: 14px; background: var(--white); box-shadow: 0 18px 40px -16px rgba(2, 20, 46, .35), 0 0 0 1px rgba(2, 20, 46, .06); }
.acct__menu a { display: block; padding: 10px 12px; border-radius: 10px; font: 600 14px var(--heading); color: var(--ink); }
.acct__menu a:hover { background: var(--soft); color: var(--ink); }
.acct__menu a[aria-current] { background: var(--soft); }
.acct__menu .acct__out { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--muted); }
.subtabs { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 0 22px; padding: 4px; overflow-x: auto; border-radius: 999px; background: rgba(2, 20, 46, .05); scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { padding: 7px 16px; border-radius: 999px; font: 600 13.5px var(--heading); color: var(--muted); white-space: nowrap; }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-current] { color: var(--ink); background: var(--white); box-shadow: 0 1px 3px rgba(2, 20, 46, .12); }
.nav-short { display: none; }
@media (max-width: 640px) { .nav-long { display: none; } .nav-short { display: inline; } .acct__name { max-width: 110px; } .app-bar__nav { gap: 0; justify-content: space-between; } .app-bar__nav a { padding: 8px 8px; font-size: 13px; } }
#b-rebate { margin-top: 22px; }   /* space between the envelope-back choice and the rebate box */
.rebates { display: flex; flex-wrap: wrap; gap: 12px; }
.rebates__one { display: flex; align-items: center; gap: 8px; margin: 0; }
.rebates__one label { margin: 0; font: 700 14px var(--heading); }
.rebates__one input { width: 110px; }
.agr__intro { max-width: 860px; margin: 0 0 18px; color: var(--muted); }
.agr__toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; }
.agr__toc a { padding: 6px 12px; border-radius: 999px; font: 600 13px var(--heading); color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.agr__toc a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.agr__h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 800 20px var(--heading); }
.agr__n { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; font: 800 14px var(--heading); color: #fff; background: #2e9e12; vertical-align: middle; }
.agr .panel__head h2 { display: flex; align-items: center; gap: 10px; }
.agr__body { line-height: 1.6; }   /* each section's content uses the whole width of its card */
.agr__body p { margin: 0 0 12px; }
.agr__list { margin: 0; padding-left: 26px; list-style: decimal outside; }
.agr__list li { display: list-item; margin: 0 0 10px; padding-left: 6px; }
.agr__list li::marker { font-weight: 800; color: #2e9e12; }
.agr__box { margin: 14px 0; padding: 14px 18px; border-left: 4px solid #2e9e12; border-radius: 0 12px 12px 0; background: #eef8e8; }
.agr__opts { margin: 10px 0; padding: 0; list-style: none; }
.agr__opts li { margin: 0 0 6px; }
.agr__dl { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; margin: 0 0 12px; }
.agr__dl dt, .agr__dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agr__dl dt { font-weight: 700; }
.agr .table-wrap { margin: 12px 0; }
.agr, .agr__h { scroll-margin-top: 90px; }
@media (max-width: 640px) { .agr__dl { grid-template-columns: 1fr; } .agr__dl dt { padding-bottom: 0; border: 0; } }
@media print { .agr { break-inside: auto; } .agr__toc { display: none; } }
.scans__sub { margin: 22px 0 4px; font: 700 15px var(--heading); color: var(--ink); }
.apply-all { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 6px; padding: 14px 16px; border-radius: 14px; background: var(--soft); }
.apply-all input { margin-top: 3px; }
.kpi-link { display: block; color: inherit; text-decoration: none; border-radius: 18px; transition: transform .15s, box-shadow .15s; }
.kpi-link .kpi { height: 100%; }
.kpi-link:hover .kpi { box-shadow: 0 6px 18px rgba(2, 20, 46, .10); }
.kpi-link:hover { transform: translateY(-1px); }
.kpi-link.is-on .kpi { box-shadow: inset 0 0 0 2px var(--g3, #2e9e12); }
[hidden] { display: none !important; }
.send-all { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.mail-frame { margin: 6px 0 0; padding: 24px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f3f6fa; font: 15px/1.6 Arial, Helvetica, sans-serif; color: #02142e; }

/* ================================================================ Phones: the portals as a mobile app
   A slim top bar (logo, language, account), the main tabs as a tab bar at the bottom of the screen, sub-tabs as a
   row of chips that scrolls sideways, full-width touch targets, and no page ever wider than the screen. */
.tabbar { display: none; }
@media (max-width: 720px) {
	.app-bar__row { height: 58px; gap: 10px; flex-wrap: nowrap; }
	.app-bar__brand img { width: 70px; }
	.app-bar__brand span { display: none; }
	.app-bar__nav { display: none !important; }
	.app-bar__right { margin-left: auto; gap: 8px; }
	.acct__name { max-width: 96px; }
	.app-main { padding: 18px 0 calc(96px + env(safe-area-inset-bottom, 0px)); min-height: 0; }
	.app .container { width: calc(100% - 28px); }
	.app-foot { padding: 18px 0 calc(92px + env(safe-area-inset-bottom, 0px)); font-size: 12px; text-align: center; }

	.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: space-around;
		padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .94);
		-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 -1px 0 rgba(2, 20, 46, .08), 0 -8px 24px rgba(2, 20, 46, .06); }
	.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 7px 2px 5px;
		border-radius: 14px; font: 700 11px/1.1 var(--heading); color: var(--muted); text-align: center; -webkit-tap-highlight-color: transparent; }
	.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
	.tabbar a[aria-current] { color: var(--g2); background: rgba(46, 158, 18, .09); }
	.tabbar a[aria-current] svg { stroke-width: 2.2; }

	.subtabs { position: sticky; top: 58px; z-index: 30; display: flex; flex-wrap: nowrap; gap: 6px; width: auto; max-width: none;
		margin: -18px -14px 16px; padding: 10px 14px; border-radius: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
		background: rgba(243, 246, 250, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: none; }
	.subtabs::-webkit-scrollbar { display: none; }
	.subtabs a { flex: none; scroll-snap-align: start; padding: 9px 15px; border-radius: 999px; font-size: 13px; background: var(--white);
		box-shadow: inset 0 0 0 1.5px var(--line); }
	.subtabs a[aria-current] { color: var(--white); background: var(--ink); box-shadow: none; }

	.page-head { gap: 12px; margin-bottom: 18px; }
	.page-head > div { min-width: 0; }
	.page-title { font-size: 26px; }
	.lead { font-size: 14px; line-height: 1.5; }
	.page-head .actions, .page-head > .btn { width: 100%; }
	.page-head .actions .btn, .page-head > .btn { flex: 1; justify-content: center; }
	.eyebrow { font-size: 11px; }

	.panel { margin-bottom: 14px; padding: 18px 16px; border-radius: 20px; }
	.panel__head { margin-bottom: 12px; }
	.panel__head h2 { font-size: 17px; }
	.kpis, .kpis.kpis--3, .kpis.kpis--6 { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
	.kpis.kpis--3 > :last-child:nth-child(3) { grid-column: 1 / -1; }
	.kpi, .kpis--6 .kpi { padding: 14px; border-radius: 16px; }
	.kpi__value { font-size: 23px; }

	/* forms: big, full-width fields (16 px text: phones don't zoom in) and buttons */
	.field input, .field select, .field textarea, .mailing__form select, .mailing__form input, .pending select { font-size: 16px; min-height: 48px; }
	.form__grid { grid-template-columns: 1fr !important; gap: 12px; }
	.form__foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
	.form__foot .btn, .form__foot > button { width: 100%; justify-content: center; }
	.btn { min-height: 46px; }
	.btn--sm { min-height: 40px; }
	.inline-form { flex-direction: column; align-items: stretch; }
	.inline-form .field, .inline-form .btn { width: 100%; }

	/* tables that stay tables (wide figures): they scroll sideways inside their card, never the page */
	.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
	.table:not(.table--cards) { font-size: 13px; }
	.table:not(.table--cards) th, .table:not(.table--cards) td { padding: 10px 8px; white-space: nowrap; }
	.table--cards tr { padding: 12px 14px; border-radius: 16px; }
	.demo-bar { font-size: 13px; margin-bottom: 14px; }
	.notice { font-size: 14px; }
	img, svg, canvas, iframe { max-width: 100%; }
	.login, .grid2, .editor, .qr-wrap { grid-template-columns: minmax(0, 1fr) !important; }   /* one column; a wide child never stretches it */
	.kpis > *, .grid2 > *, .editor > *, .qr-wrap > * { min-width: 0; }
	.chart--wide { display: none; }
	.chart--phone { display: block; }
	.table:not(.table--cards) th { white-space: normal; vertical-align: bottom; }
}
