/* ==========================================================================
   eVoucher design system
   Signature element: the tear-off ticket (saffron stub + perforated seam).
   Everything around it stays calm: indigo ink, cool mist background.
   ========================================================================== */
:root {
  --ink: #1C1A3F;
  --ink-2: #2B2860;
  --violet: #5B2EFF;
  --violet-soft: #EEE9FF;
  --saffron: #FFB627;
  --saffron-deep: #E89B00;
  --mint: #0FA968;
  --mint-soft: #E3F7EE;
  --rose: #E5484D;
  --mist: #F3F3FA;
  --paper: #FFFFFF;
  --line: #E3E3EF;
  --muted: #6B6F8E;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgba(28, 26, 63, .06), 0 8px 24px -12px rgba(28, 26, 63, .18);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--mist);
  --bs-link-color: var(--violet);
  --bs-link-color-rgb: 91, 46, 255;
  --bs-border-color: var(--line);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--mist); font-size: 16px; line-height: 1.55; }
h1, h2, h3, h4, .ev-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
h5, h6 { font-family: var(--font-display); font-weight: 700; }
.ev-main { min-height: 60vh; padding-bottom: 32px; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.text-muted, .ev-muted { color: var(--muted) !important; }

/* ---------- Top bar ---------- */
.ev-top { position: sticky; top: 0; z-index: 1030; background: var(--ink); padding: 12px 0; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.ev-logo { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.ev-logo:hover { color: #fff; }
.ev-logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--saffron); color: var(--ink); display: inline-grid; place-items: center; font-size: 1.1rem; }
.ev-navlink { color: rgba(255,255,255,.78); padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.ev-navlink:hover { color: #fff; background: rgba(255,255,255,.08); }
.ev-icon-btn { color: #fff; font-size: 1.5rem; padding: 2px 8px; border: 0; }
.ev-menu { background: var(--ink); color: #fff; max-width: 300px; }
.ev-menu a { color: #fff; padding: 12px 8px; border-radius: 10px; font-weight: 500; display: flex; gap: 12px; align-items: center; }
.ev-menu a:hover { background: rgba(255,255,255,.08); }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 700; padding: 11px 20px; }
.btn-sm { padding: 6px 14px; border-radius: 10px; }
.btn-lg { padding: 15px 24px; font-size: 1.05rem; border-radius: 14px; }
.ev-btn-primary { background: var(--violet); color: #fff; border: 0; }
.ev-btn-primary:hover, .ev-btn-primary:focus { background: #4A1FEA; color: #fff; }
.ev-btn-redeem { background: var(--mint); color: #fff; border: 0; }
.ev-btn-redeem:hover { background: #0C9159; color: #fff; }
.ev-btn-saffron { background: var(--saffron); color: var(--ink); border: 0; }
.ev-btn-saffron:hover { background: var(--saffron-deep); color: var(--ink); }
.ev-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.ev-btn-ghost:hover { border-color: #fff; color: #fff; }
.ev-btn-outline { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.ev-btn-outline:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 12px; border: 1.5px solid var(--line); padding: 12px 14px; font-size: 16px; }
.form-control:focus, .form-select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.form-label { font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }
.form-check-input { width: 1.3em; height: 1.3em; margin-top: .1em; }
.ev-alert { border-radius: 12px; margin: 16px auto; max-width: 720px; }

/* ---------- Hero (marketplace) ---------- */
.ev-hero { background: var(--ink); color: #fff; padding: 36px 0 76px; position: relative; overflow: hidden; }
.ev-hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); max-width: 14ch; margin-bottom: 14px; }
.ev-hero p { color: rgba(255,255,255,.72); max-width: 46ch; font-size: 1.08rem; }
.ev-hero-strip { position: absolute; right: -40px; top: 26px; display: flex; flex-direction: column; gap: 12px; transform: rotate(-8deg); opacity: .95; pointer-events: none; }
.ev-hero-strip .ev-mini { width: 230px; }
@media (max-width: 991px) { .ev-hero-strip { display: none; } }
.ev-search { background: var(--paper); border-radius: var(--r-md); padding: 8px; display: flex; gap: 8px; box-shadow: var(--shadow); margin-top: -36px; position: relative; z-index: 2; flex-wrap: wrap; }
.ev-search .form-control, .ev-search .form-select { border: 0; background: var(--mist); }
.ev-search .form-control { flex: 1 1 200px; }
.ev-search .form-select { flex: 0 1 170px; }
@media (max-width: 575px) { .ev-search .form-select { flex: 1 1 45%; } .ev-search .btn { flex: 1 1 100%; } }

.ev-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.ev-chips::-webkit-scrollbar { display: none; }
.ev-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.ev-chip:hover { border-color: var(--ink); color: var(--ink); }
.ev-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.ev-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.ev-section-title h2 { font-size: 1.5rem; margin: 0; }

/* ---------- Ticket (signature) ---------- */
.ev-ticket {
  --notch: 11px;
  display: grid; grid-template-columns: 104px 1fr; background: var(--paper); border-radius: var(--r-md);
  box-shadow: var(--shadow); color: var(--ink); position: relative; min-height: 132px; overflow: hidden;
  /* Two semicircle notches cut where stub meets body */
  -webkit-mask: radial-gradient(circle var(--notch) at 104px 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 104px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 104px 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 104px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  transition: transform .15s ease;
}
a.ev-ticket:hover { color: var(--ink); transform: translateY(-2px); }
.ev-stub { background: var(--saffron); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; text-align: center; border-right: 2px dashed rgba(28,26,63,.28); }
.ev-stub-value { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: .95; letter-spacing: -.03em; word-break: break-word; }
.ev-stub-label { font-weight: 700; font-size: .82rem; margin-top: 4px; opacity: .8; }
.ev-ticket-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-ticket-shop { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.ev-ticket-shop img, .ev-avatar { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; background: var(--violet-soft); flex: 0 0 auto; }
.ev-avatar { display: inline-grid; place-items: center; color: var(--violet); font-weight: 800; font-size: .75rem; }
.ev-ticket-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.2; margin: 2px 0; }
.ev-ticket-meta { font-size: .84rem; color: var(--muted); margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.ev-ticket-meta i { margin-right: 3px; }
.ev-flag { position: absolute; top: 10px; right: 12px; font-size: .74rem; font-weight: 700; background: var(--ink); color: var(--saffron); padding: 3px 9px; border-radius: 999px; }
.ev-mini { --notch: 9px; grid-template-columns: 78px 1fr; min-height: 86px;
  -webkit-mask: radial-gradient(circle var(--notch) at 78px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 78px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 78px 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at 78px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.ev-mini .ev-stub-value { font-size: 1.35rem; }
.ev-mini .ev-ticket-title { font-size: .95rem; }

/* ---------- Shop page ---------- */
.ev-cover { height: 200px; background: var(--ink-2) center / cover no-repeat; position: relative; }
@media (min-width: 768px) { .ev-cover { height: 280px; } }
.ev-shop-head { background: var(--paper); border-radius: var(--r-lg); padding: 20px; margin-top: -56px; position: relative; box-shadow: var(--shadow); }
.ev-shop-logo { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; border: 4px solid var(--paper); margin-top: -62px; background: var(--violet-soft); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--violet); }
.ev-shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-panel { background: var(--paper); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow); }

/* ---------- Claim / verify flow ---------- */
.ev-narrow { max-width: 520px; margin: 0 auto; padding: 20px 16px; }
.ev-step-card { background: var(--paper); border-radius: var(--r-lg); padding: 24px 20px; box-shadow: var(--shadow); }
.ev-switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--mist); border-radius: 14px; padding: 5px; gap: 5px; }
.ev-switch input { position: absolute; opacity: 0; }
.ev-switch label { text-align: center; padding: 11px 8px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.ev-switch input:checked + label { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.ev-switch input:focus-visible + label { outline: 3px solid var(--saffron); }
.ev-note { background: var(--violet-soft); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.ev-success-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 14px; }
.ev-wait-mark { background: #FFF4DC; color: var(--saffron-deep); }
.ev-contact-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--mist); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 1.05rem; }

/* ---------- Voucher page (big ticket) ---------- */
.ev-voucher-page { background: var(--ink); min-height: 100vh; padding: 16px 0 120px; padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.ev-vtop { display: flex; align-items: center; justify-content: space-between; color: #fff; max-width: 460px; margin: 0 auto 14px; padding: 0 16px; }
.ev-vtop a { color: rgba(255,255,255,.8); font-weight: 600; font-size: .92rem; }
.ev-vticket {
  --notch: 16px; --seam: 62%;
  max-width: 430px; margin: 0 auto; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; position: relative;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 var(--seam), #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--seam), #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 var(--seam), #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--seam), #0000 98%, #000) right / 51% 100% no-repeat;
}
.ev-vhead { background: var(--saffron); padding: 22px 22px 18px; }
.ev-vshop { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ev-vshop img, .ev-vshop .ev-avatar { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.6); }
.ev-vvalue { font-family: var(--font-display); font-weight: 800; font-size: clamp(3.4rem, 18vw, 4.8rem); line-height: .9; letter-spacing: -.04em; margin: 16px 0 6px; }
.ev-vtitle { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.ev-vbody { padding: 18px 22px; }
.ev-vfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: .9rem; }
.ev-vfacts div span { display: block; color: var(--muted); font-size: .8rem; }
.ev-vfacts div strong { font-weight: 700; }
.ev-vseam { border-top: 2px dashed var(--line); margin: 0 22px; }
.ev-vcode { padding: 18px 22px 24px; text-align: center; }
.ev-vcode-num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: .08em; }
.ev-qr { width: 148px; height: 148px; margin: 10px auto 4px; padding: 8px; background: #fff; border-radius: 12px; border: 1.5px solid var(--line); }
.ev-qr img, .ev-qr canvas, .ev-qr svg, [data-qr] svg { width: 100% !important; height: 100% !important; display: block; }
.ev-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; padding: 5px 12px; border-radius: 999px; }
.ev-status-active { background: var(--mint-soft); color: var(--mint); }
.ev-status-redeemed { background: var(--violet-soft); color: var(--violet); }
.ev-status-expired { background: #FDECEC; color: var(--rose); }
.ev-vstamp { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 4px solid var(--violet); color: var(--violet); font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; padding: 4px 18px; border-radius: 14px; background: rgba(255,255,255,.88); pointer-events: none; }
.ev-redeemed .ev-vhead { background: #E6E3F5; }
.ev-share-row { max-width: 430px; margin: 16px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.ev-share-row .btn { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.18); font-weight: 600; font-size: .92rem; }
.ev-share-row .btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.ev-aff-cta { max-width: 430px; margin: 12px auto 0; padding: 0 16px; }
.ev-aff-cta a { display: flex; align-items: center; gap: 12px; background: var(--ink-2); color: #fff; border-radius: 14px; padding: 14px 16px; }
.ev-aff-cta i { font-size: 1.5rem; color: var(--saffron); }

/* Sticky action bar for thumbs */
.ev-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--ink) 70%, rgba(28,26,63,0)); }
.ev-actionbar .btn { max-width: 430px; margin: 0 auto; display: block; width: 100%; font-size: 1.12rem; padding: 16px; }

/* Bottom sheet (Bootstrap offcanvas-bottom) */
.ev-sheet.offcanvas-bottom { height: auto; max-height: 92vh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); max-width: 560px; margin: 0 auto; }
.ev-sheet .offcanvas-header { padding: 18px 20px 6px; }
.ev-sheet .offcanvas-body { padding: 8px 20px 24px; }
.ev-sheet-grip { width: 44px; height: 5px; background: var(--line); border-radius: 9px; margin: 10px auto 0; }
.ev-pin { display: flex; gap: 10px; justify-content: center; }
.ev-pin input { width: 54px; height: 62px; text-align: center; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; border-radius: 14px; border: 2px solid var(--line); }
.ev-pin input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 4px var(--violet-soft); }
.ev-calc { background: var(--mist); border-radius: 14px; padding: 14px 16px; }
.ev-calc-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: .95rem; }
.ev-calc-total { border-top: 1.5px dashed var(--line); margin-top: 6px; padding-top: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.ev-calc-discount { color: var(--mint); font-weight: 700; }
.ev-done { text-align: center; padding: 10px 0 4px; }
.ev-done .ev-success-mark { animation: evPop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes evPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- My vouchers ---------- */
.ev-tabs { display: flex; gap: 6px; background: var(--paper); padding: 5px; border-radius: 14px; box-shadow: var(--shadow); }
.ev-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 10px; font-weight: 700; color: var(--muted); font-size: .92rem; }
.ev-tabs a.active { background: var(--ink); color: #fff; }

/* ---------- Empty states ---------- */
.ev-empty { text-align: center; padding: 40px 20px; background: var(--paper); border-radius: var(--r-md); border: 2px dashed var(--line); }
.ev-empty i { font-size: 2.4rem; color: var(--muted); }

/* ---------- Footer ---------- */
.ev-foot { background: var(--ink); color: #fff; padding: 40px 0 32px; margin-top: 40px; }
.ev-foot h6 { color: var(--saffron); margin-bottom: 10px; }
.ev-foot a { display: block; color: rgba(255,255,255,.72); padding: 3px 0; }
.ev-foot a:hover { color: #fff; }

/* ---------- Dashboard shell (retailer / affiliate / admin) ---------- */
.ev-dash { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.ev-side { background: var(--ink); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ev-side a { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.75); padding: 10px 12px; border-radius: 10px; font-weight: 500; margin-bottom: 2px; }
.ev-side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ev-side a.active { background: var(--saffron); color: var(--ink); font-weight: 700; }
.ev-side .badge { margin-left: auto; }
.ev-dash-main { padding: 24px; min-width: 0; }
.ev-dash-top { display: none; }
@media (max-width: 991px) {
  .ev-dash { grid-template-columns: 1fr; }
  .ev-side { display: none; }
  .ev-dash-top { display: flex; align-items: center; background: var(--ink); padding: 12px 16px; position: sticky; top: 0; z-index: 1020; }
  .ev-dash-main { padding: 16px; padding-bottom: 90px; }
}
.ev-stat { background: var(--paper); border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--shadow); height: 100%; }
.ev-stat span { color: var(--muted); font-size: .86rem; font-weight: 600; }
.ev-stat strong { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.ev-table { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.ev-table .table { margin: 0; }
.ev-table th { font-size: .8rem; color: var(--muted); font-weight: 700; background: #FAFAFD; border-bottom: 1px solid var(--line); }
.ev-table td, .ev-table th { padding: 12px 14px; vertical-align: middle; }
.ev-tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--paper); border-top: 1px solid var(--line); display: none; z-index: 1030; padding-bottom: env(safe-area-inset-bottom, 0px); }
.ev-tabbar a { flex: 1; text-align: center; color: var(--muted); padding: 8px 4px 6px; font-size: .72rem; font-weight: 600; }
.ev-tabbar a i { display: block; font-size: 1.3rem; }
.ev-tabbar a.active { color: var(--violet); }
@media (max-width: 991px) { .ev-tabbar { display: flex; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Dashboards (retailer / affiliate / admin)
   ========================================================================== */
.min-w-0 { min-width: 0; }
.ev-dash-body { background: var(--mist); }
.ev-dash-main h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.ev-side-mobile a { color: #fff; }
.ev-badge { font-weight: 700; font-size: .74rem; padding: .38em .7em; border-radius: 999px; }
.text-bg-light.ev-badge { background: var(--mist) !important; color: var(--ink) !important; border: 1px solid var(--line); }
.ev-stat small { display: block; margin-top: 2px; font-size: .8rem; }
.ev-sticky { position: sticky; top: 16px; }
@media (max-width: 991px) { .ev-sticky { position: static; } }

/* Auth pages */
.ev-auth { max-width: 520px; margin: 0 auto; padding: 32px 16px 48px; padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
.ev-logo-dark, .ev-logo-dark:hover { color: var(--ink); }
.ev-auth-card { padding: 28px 24px; }
.ev-steps-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-steps-mini div { background: var(--mist); border-radius: 12px; padding: 12px 10px; font-size: .82rem; font-weight: 600; line-height: 1.3; }
.ev-steps-mini i { display: block; font-size: 1.3rem; color: var(--violet); margin-bottom: 4px; }

/* Banners */
.ev-banner { display: flex; align-items: center; gap: 14px; background: #FFF4DC; border: 1.5px solid #FFE1A1; color: var(--ink); border-radius: var(--r-md); padding: 14px 16px; flex-wrap: wrap; }
.ev-banner > i { font-size: 1.5rem; color: var(--saffron-deep); }
a.ev-banner:hover { color: var(--ink); border-color: var(--saffron); }
.ev-banner-wa { background: var(--mint-soft); border-color: #BDEBD5; }
.ev-banner-wa > i { color: var(--mint); }

/* 14-day bar chart */
.ev-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 180px; align-items: end; }
.ev-bar { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.ev-bar small { font-size: .7rem; color: var(--muted); }
.ev-bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.ev-bar-pair span { width: 45%; max-width: 14px; border-radius: 4px 4px 0 0; min-height: 2px; }
.ev-bar-pair .c { background: var(--violet-soft); border: 1.5px solid var(--violet); border-bottom: 0; }
.ev-bar-pair .r { background: var(--mint); }
.ev-legend { font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ev-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Offer rows (ticket-shaped list items) */
.ev-offer-row { display: flex; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; height: 100%; }
.ev-stub-sm { min-width: 92px; flex: 0 0 auto; }
.ev-stub-sm .ev-stub-value { font-size: 1.5rem; }
.ev-stub-sm .ev-stub-label { font-size: .75rem; }

/* Offer type picker */
.ev-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 767px) { .ev-type-grid { grid-template-columns: repeat(2, 1fr); } }
.ev-type { display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; background: var(--paper); height: 100%; }
.ev-type i { font-size: 1.4rem; color: var(--violet); }
.ev-type small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.btn-check:checked + .ev-type { border-color: var(--ink); background: #FFF8E8; box-shadow: inset 0 0 0 1px var(--ink); }
.btn-check:focus-visible + .ev-type, .btn-check:focus-visible + .ev-chip { outline: 3px solid var(--saffron); outline-offset: 2px; }
.btn-check:checked + .ev-chip { background: var(--ink); color: #fff; border-color: var(--ink); }
.ev-radio-card { border: 2px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 2.6rem; height: 100%; }
.ev-radio-card:has(input:checked) { border-color: var(--ink); background: #FFF8E8; }

/* WhatsApp request queue */
.ev-req { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-left: 6px solid var(--mint); transition: opacity .2s ease; }
.ev-req-warn { border-left-color: var(--saffron); }
.ev-req-late { border-left-color: var(--rose); }
.ev-req.is-next { box-shadow: 0 0 0 3px var(--violet), var(--shadow); }
.ev-req.is-done { opacity: .5; }
.ev-req-actions { display: flex; gap: 8px; }
.ev-req-reject { grid-column: 1 / -1; }
.ev-wait { font-size: .82rem; color: var(--muted); font-weight: 600; }
.ev-req-late .ev-wait { color: var(--rose); }
@media (max-width: 575px) { .ev-req { grid-template-columns: 1fr; } .ev-req-actions .btn { flex: 1; } }

/* Plans */
.ev-plan { position: relative; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; height: 100%; display: flex; flex-direction: column; border: 2px solid transparent; }
.ev-plan-hot { border-color: var(--ink); }
.ev-plan-current { border-color: var(--mint); }
.ev-plan-price { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -.03em; margin: 8px 0 4px; }
.ev-plan-price small { font-family: var(--font-body); font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ev-plan-list { list-style: none; padding: 0; margin: 8px 0 20px; font-size: .92rem; }
.ev-plan-list li { padding: 5px 0; display: flex; gap: 8px; }
.ev-plan-list i { color: var(--mint); font-weight: 700; }
.ev-plan-list .is-off { color: var(--muted); }
.ev-plan-list .is-off i { color: var(--muted); }

/* Affiliate */
.ev-codebox { background: var(--mist); border-radius: 12px; padding: 10px 12px; font-weight: 700; word-break: break-all; font-size: .92rem; }
.ev-earn { background: var(--mint-soft); color: #0B6B43; border-radius: 10px; padding: 8px 12px; font-size: .9rem; }

/* ==========================================================================
   QR stickers (screen preview + print)
   ========================================================================== */
.stk-preview { display: grid; gap: 24px; justify-content: center; }
.stk-page { width: 210mm; height: 297mm; background: #fff; box-shadow: var(--shadow); display: grid; gap: 6mm; padding: 8mm; box-sizing: border-box; overflow: hidden; }
.stk-page-a6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.stk-page-square { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); }
.stk-page-poster { grid-template-columns: 1fr; padding: 12mm; }
@media screen and (max-width: 991px) { .stk-preview { zoom: .42; } }
.stk { border-radius: 6mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6mm; color: var(--ink); background: var(--saffron); position: relative; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.stk-ink { background: var(--ink); color: #fff; }
.stk-white { background: #fff; border: 1.2mm dashed var(--ink); }
.stk-shop { font-weight: 700; font-size: 12pt; opacity: .85; }
.stk-big { font-family: var(--font-display); font-weight: 800; font-size: 40pt; line-height: .95; letter-spacing: -.03em; margin: 2mm 0; }
.stk-title { font-family: var(--font-display); font-weight: 700; font-size: 13pt; line-height: 1.15; max-width: 90%; }
.stk-qr { width: 38mm; height: 38mm; background: #fff; padding: 2.5mm; border-radius: 3mm; margin: 4mm 0 2mm; }
.stk-cta { font-weight: 700; font-size: 11pt; }
.stk-terms, .stk-tag { font-size: 8pt; opacity: .8; margin-top: 1mm; }
.stk-brand { position: absolute; bottom: 3mm; right: 5mm; font-size: 7pt; font-weight: 700; opacity: .6; }
.stk-square { display: grid; grid-template-columns: 1fr 30mm; grid-auto-rows: min-content; align-content: center; column-gap: 4mm; text-align: left; padding: 4mm 5mm; }
.stk-square > div { grid-column: 1; }
.stk-square .stk-qr { grid-column: 2; grid-row: 1 / span 6; align-self: center; width: 30mm; height: 30mm; margin: 0; padding: 2mm; }
.stk-square .stk-big { font-size: 24pt; margin: 1mm 0; }
.stk-square .stk-title { font-size: 10pt; max-width: none; }
.stk-square .stk-cta, .stk-square .stk-shop { font-size: 8.5pt; }
.stk-square .stk-cta { margin-top: 2mm; }
.stk-square .stk-brand { bottom: 2mm; right: 4mm; }
.stk-poster .stk-big { font-size: 96pt; }
.stk-poster .stk-title { font-size: 28pt; }
.stk-poster .stk-shop { font-size: 20pt; }
.stk-poster .stk-qr { width: 90mm; height: 90mm; margin: 10mm 0 6mm; padding: 5mm; }
.stk-poster .stk-cta { font-size: 22pt; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  .ev-side, .ev-dash-top, .ev-tabbar, .no-print, .ev-dash-main > :not(.stk-preview), .ev-alert, .offcanvas { display: none !important; }
  .ev-dash { display: block; }
  .ev-dash-main { padding: 0 !important; }
  .stk-preview { display: block; zoom: 1 !important; }
  .stk-page { box-shadow: none; page-break-after: always; break-after: page; margin: 0; }
  .stk-page:last-child { page-break-after: auto; break-after: auto; }
  .ev-main { min-height: 0 !important; padding: 0 !important; }
  .stk-page { height: 296mm; }
  html, body, .ev-dash, .ev-dash > div { height: auto !important; min-height: 0 !important; }
}

/* Mobile polish */
.ev-tabs a { white-space: nowrap; }
.ev-stat strong { font-size: clamp(1.35rem, 5.2vw, 1.9rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575px) {
  .ev-dash-main .ev-tabs { min-width: 0 !important; width: 100%; }
  .ev-tabs a { padding: 9px 4px; font-size: .85rem; }
  .ev-banner > i { display: none; }
  .ev-stat { padding: 14px; }
}

/* ==========================================================================
   Offer page card, status pills, offer photos
   ========================================================================== */
.ev-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.ev-pill i { font-size: .85em; }
.ev-pill-green  { background: #DDF7EA; color: #0B6B43; }
.ev-pill-red    { background: #FFE3E6; color: #B4232F; }
.ev-pill-grey   { background: #ECEEF4; color: #4A5068; }
.ev-pill-amber  { background: #FFF1D1; color: #8A5A00; }
.ev-pill-violet { background: var(--violet-soft); color: var(--violet); }
.ev-ticket-meta .ev-pill { padding: 4px 8px; font-size: .72rem; }
.ev-ticket.is-ended .ev-ticket-title, .ev-ticket.is-ended .ev-ticket-meta > span:not(.ev-pill), .ev-ticket.is-ended .ev-ticket-thumb { opacity: .55; }
.ev-ticket.is-ended .ev-ticket-thumb { filter: grayscale(1); }
.ev-ticket.is-ended .ev-stub { background: #D9DCE6; }

.ev-offer-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.ev-offer-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--mist); }
.ev-offer-band { background: var(--saffron); padding: 20px 22px 22px; color: var(--ink); }
.ev-offer-band .ev-vshop { color: var(--ink); text-decoration: none; min-width: 0; }
.ev-offer-band .ev-vshop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-offer-band .ev-vshop:hover span { text-decoration: underline; }
.ev-offer-band .ev-pill-green { background: #fff; }
.ev-offer-band .ev-vvalue { margin: 4px 0 2px; }
.ev-vvalue-lab { font-size: .38em; letter-spacing: 0; }
.ev-offer-band .ev-vtitle { font-size: clamp(1.15rem, 3.4vw, 1.45rem); margin: 0; }
.ev-offer-body { padding: 20px 22px 22px; border-top: 2px dashed rgba(27, 31, 59, .14); }
.ev-mine { border: 2px solid var(--mint); }
.ev-vticket .ev-offer-photo { aspect-ratio: 2 / 1; }

/* Offer photo thumbnail inside ticket cards */
.ev-ticket-body { position: relative; }
.ev-ticket-body.has-thumb { padding-right: 78px; }
.ev-ticket-thumb { position: absolute; top: 14px; right: 14px; width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.ev-mine.is-wait { border-color: #FFD27A; }
.ev-mine.is-done { border-color: var(--line); }

/* ==========================================================================
   Reviews
   ========================================================================== */
.ev-stars { display: inline-flex; gap: 1px; color: var(--saffron); font-size: .9rem; vertical-align: -1px; }
.ev-stars-lg { font-size: 1.3rem; gap: 3px; }
.ev-rating { display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; font-weight: 700; color: var(--ink); white-space: nowrap; margin-left: 6px; }
.ev-rating i { color: var(--saffron); }
.ev-rating small { color: var(--muted); font-weight: 500; }
.ev-offer-band .ev-rating i { color: var(--ink); }
.ev-review { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px 18px; }
.ev-reply { background: var(--mist); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: .92rem; }
.ev-dist { display: grid; grid-template-columns: 44px 1fr 32px; gap: 8px; align-items: center; font-size: .85rem; margin-bottom: 6px; }
.ev-dist i.bi { color: var(--saffron); }
.ev-dist-bar { height: 8px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.ev-dist-bar i { display: block; height: 100%; background: var(--saffron); border-radius: 99px; }
a.ev-chip { text-decoration: none; color: var(--ink); }
a.ev-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
a.ev-chip i { color: var(--saffron); }

/* Star picker (review page) — row-reverse so hovering a star highlights it and all lower ones */
.ev-star-input { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; border: 0; padding: 0; }
.ev-star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ev-star-input label { font-size: 2.6rem; color: #D9DCE6; cursor: pointer; line-height: 1; transition: transform .1s ease, color .1s ease; }
.ev-star-input label:hover, .ev-star-input label:hover ~ label, .ev-star-input input:checked ~ label { color: var(--saffron); }
.ev-star-input label:active { transform: scale(.9); }
.ev-star-input input:focus-visible + label { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* Rate prompt on a used voucher */
.ev-review-cta { background: var(--paper); border-radius: var(--r-md); padding: 16px 18px; margin: 16px; text-align: left; }
.ev-star-links { display: flex; gap: 8px; }
.ev-star-links a { font-size: 2rem; color: #D9DCE6; line-height: 1; }
.ev-star-links:hover a { color: var(--saffron); }
.ev-star-links a:hover ~ a { color: #D9DCE6; }

/* "Fill from my page" importer */
.ev-import { background: linear-gradient(135deg, #F3EEFF, #FFF6E2); border: 1.5px solid #E2D6FF; border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 18px; }
.ev-import > div:first-child i { color: var(--violet); font-size: 1.1rem; }
.ev-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.ev-pick-wide { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ev-pick { position: relative; display: block; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; aspect-ratio: 1; }
.ev-pick-wide .ev-pick { aspect-ratio: 16 / 10; }
.ev-pick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ev-pick-wide .ev-pick img { object-fit: cover; }
.ev-pick input { position: absolute; opacity: 0; }
.ev-pick:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.ev-pick:has(input:checked)::after { content: "\F26B"; font-family: bootstrap-icons; position: absolute; top: 4px; right: 4px; background: var(--violet); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: grid; place-items: center; }
.ev-pick:has(input:focus-visible) { outline: 3px solid var(--saffron); outline-offset: 2px; }
.ev-pick-none { display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ev-filled { background-color: #F3EEFF !important; transition: background-color 1.5s ease; }
.ev-import-row { display: flex; gap: 8px; }
@media (max-width: 575px) { .ev-import-row { flex-direction: column; } .ev-import-row .btn { width: 100%; } }
