/* =====================================================================
   PanelNest - purple glass on off-white
   Breakpoints: mobile < 640px, tablet 640-960px, laptop/desktop > 960px
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #F8F6FB;
  --ink: #1D1533;
  --ink-2: #4B4266;
  --muted: #6A6084;
  --violet: #6C3CF0;
  --violet-2: #7548F5;
  --violet-d: #4A22B8;
  --violet-dd: #2C1470;
  --lilac: #B9A2FF;
  --lilac-l: #ECE4FF;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-b: rgba(255, 255, 255, .78);
  --glass-line: rgba(108, 60, 240, .16);
  --ok: #0F7A58;
  --warn: #9A5B00;
  --err: #B32D48;
  --shadow: 0 24px 60px -28px rgba(76, 34, 184, .45);
  --font-head: 'Sora', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
a { color: var(--violet-d); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(108, 60, 240, .22); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 820px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--violet-d); color: #fff; padding: .6rem 1rem; border-radius: 10px;
}
.skip-link:focus { top: 1rem; color: #fff; }
.muted { color: var(--muted); }
.icon {
  width: 1.2em; height: 1.2em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Background glow ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; }
.o1 {
  width: 62vmax; height: 62vmax; top: -26vmax; right: -16vmax;
  background: radial-gradient(circle at 40% 40%, rgba(139, 92, 255, .40), rgba(139, 92, 255, 0) 62%);
  animation: drift1 28s ease-in-out infinite alternate;
}
.o2 {
  width: 54vmax; height: 54vmax; bottom: -24vmax; left: -18vmax;
  background: radial-gradient(circle at 50% 50%, rgba(108, 60, 240, .28), rgba(108, 60, 240, 0) 62%);
  animation: drift2 34s ease-in-out infinite alternate;
}
.o3 {
  width: 34vmax; height: 34vmax; top: 40%; left: 34%;
  background: radial-gradient(circle at 50% 50%, rgba(196, 170, 255, .40), rgba(196, 170, 255, 0) 65%);
  animation: drift1 40s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 { to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(7vmax, -4vmax, 0) scale(1.06); } }

main, .site-footer { position: relative; z-index: 1; }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .9); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1.1; text-decoration: none; text-align: center;
  cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
  box-shadow: 0 12px 26px -10px rgba(90, 43, 224, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px -10px rgba(90, 43, 224, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-glass {
  color: var(--violet-d); background: rgba(255, 255, 255, .62); border-color: var(--glass-b);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .9); color: var(--violet-d); }
.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover { background: var(--lilac-l); color: var(--violet-d); transform: none; }
.btn-light { color: var(--violet-d); background: #fff; box-shadow: 0 12px 26px -12px rgba(20, 5, 70, .6); }
.btn-light:hover { color: var(--violet-dd); }
.btn-danger { color: #9B1F39; background: rgba(179, 45, 72, .09); border-color: rgba(179, 45, 72, .25); }
.btn-danger:hover { background: rgba(179, 45, 72, .16); color: #7d1730; }
.btn-sm { min-height: 40px; padding: .5rem 1.05rem; font-size: .88rem; }
.btn-lg { min-height: 52px; padding: .9rem 1.7rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.inline-form { display: inline; margin: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: max(.75rem, env(safe-area-inset-top)) 0 0;
}
.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .55rem .5rem 1.1rem;
  border-radius: 999px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 50%; padding: 2.5px; flex: 0 0 auto;
  background: conic-gradient(from 210deg, #C9B5FF, #7548F5, #3B1BA8, #B58CFF, #C9B5FF);
  display: grid; place-items: center;
}
.logo-mark > span {
  width: 100%; height: 100%; border-radius: 50%; background: #fff; color: var(--violet);
  display: grid; place-items: center;
}
.logo-mark .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.nav-menu { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 1.5rem; margin-left: 1.5rem; }
.nav-links { display: flex; gap: .15rem; list-style: none; }
.nav-links a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  color: var(--ink-2); font-weight: 500; font-size: .95rem; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.nav-links a:hover { background: var(--lilac-l); color: var(--violet-d); }
.nav-actions { display: flex; align-items: center; gap: .4rem; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--lilac-l); color: var(--violet-d); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Toast notifications (bottom-centre, dark glass) ----------
   Markup comes from flash() in the page headers; main.js handles the timing.
   Slides up from the bottom, waits a moment, slides back down. */
.flash-stack {
  position: fixed; left: 0; right: 0; z-index: 120;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 0 1rem; pointer-events: none;
}
.flash {
  pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: .6rem;
  max-width: 26rem; padding: .6rem 1rem .6rem .8rem;
  border-radius: 14px; font-size: .9rem; font-weight: 500; line-height: 1.4; color: #fff;
  background: rgba(29, 21, 51, .78); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 14px 34px -12px rgba(20, 10, 50, .55), 0 2px 6px rgba(20, 10, 50, .18);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  animation: toastIn .34s var(--ease) both;
}
.flash::before {
  content: ""; flex: none; width: 1.15rem; height: 1.15rem;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23B9A2FF'/%3E%3Cpath d='M12 11v6M12 7v.05' fill='none' stroke='%232C1470' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.flash-success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%2334D399'/%3E%3Cpath d='M7 12.4l3.3 3.3L17 9' fill='none' stroke='%23053B2B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.flash-error::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23FB7185'/%3E%3Cpath d='M12 6.8v6.2M12 17.1v.05' fill='none' stroke='%2352061B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.flash span { min-width: 0; overflow-wrap: anywhere; }
.flash.is-out { animation: toastOut .26s ease-in both; pointer-events: none; }
/* Safety net: if JavaScript is off, the toast still clears itself */
html:not(.js) .flash { animation: toastIn .34s var(--ease) both, toastOut .26s ease-in 4.5s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(18px) scale(.97); visibility: hidden; } }
/* Also used by the mobile menu (.nav-menu) - keep */
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.alert { padding: .85rem 1rem; border-radius: 14px; margin-bottom: 1.2rem; font-size: .95rem; border: 1px solid transparent; }
.alert ul { list-style: none; display: grid; gap: .25rem; }
.alert-error { background: rgba(179, 45, 72, .08); border-color: rgba(179, 45, 72, .25); color: #8B1B33; }
.alert-warn { background: rgba(154, 91, 0, .09); border-color: rgba(154, 91, 0, .28); color: #7A4700; }
.alert a { color: inherit; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 8.5rem 0 3.5rem; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero-anim { animation: rise .85s var(--ease) var(--d, 0ms) both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.hero-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .95rem .4rem .8rem; margin-bottom: 1.2rem;
  border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--violet-d);
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22B07D; box-shadow: 0 0 0 0 rgba(34, 176, 125, .55); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(34, 176, 125, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 176, 125, 0); } }

.hero-title { font-size: clamp(2rem, 1rem + 3.2vw, 3.2rem); line-height: 1.12; margin-bottom: 1.1rem; }
.hero-title-static { display: block; text-wrap: balance; }
.typed-line {
  display: block; min-height: 1.3em; margin-top: .1em;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 3rem); white-space: nowrap;
}
.typed {
  background: linear-gradient(90deg, #6C3CF0, #A46BFF, #5A2BE0, #A46BFF, #6C3CF0);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
}
.typed-line::after {
  content: ""; display: inline-block; width: 3px; height: .85em; margin-left: 5px;
  background: var(--violet); border-radius: 2px; vertical-align: -.05em;
  animation: blink 1s steps(1) infinite;
}
@keyframes shimmer { to { background-position: 250% center; } }
@keyframes blink { 50% { opacity: 0; } }

.hero-sub { font-size: 1.1rem; color: var(--ink-2); max-width: 34rem; margin-bottom: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-2); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: .45rem; }
.hero-points .icon { color: var(--violet); }

/* Hero panel preview */
.hero-visual { position: relative; isolation: isolate; width: 100%; max-width: 500px; margin: 0 auto; padding: 1.2rem 0 2rem; }
.hero-visual::before {
  content: ""; position: absolute; inset: -6% -4%; z-index: -1;
  background:
    radial-gradient(closest-side at 30% 35%, rgba(117, 72, 245, .55), transparent 72%),
    radial-gradient(closest-side at 75% 70%, rgba(190, 150, 255, .55), transparent 72%);
}
.feed { padding: 1rem; border-radius: 28px; }
.feed-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #CDBDFF; }
.feed-url {
  flex: 1; min-width: 0; padding: .28rem .9rem; border-radius: 999px; font-size: .8rem; color: var(--muted);
  background: rgba(255, 255, 255, .8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem; margin-bottom: .9rem; border-radius: 20px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(236, 228, 255, .8));
  border: 1px solid var(--glass-line);
}
.feed-label { margin: 0; font-size: .85rem; color: var(--muted); }
.feed-big { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 2rem; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.spark { width: 44%; max-width: 150px; height: auto; }
.feed-list { list-style: none; display: grid; gap: .6rem; }
.feed-item {
  display: flex; align-items: center; gap: .8rem; padding: .75rem .85rem;
  border-radius: 18px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; padding: 0;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--violet-d);
  background: #fff; box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px #A88BFF;
  margin: 0 .2rem 0 .2rem;
}
.av2 { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px #7548F5; }
.av3 { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px #C9B5FF; }
.feed-main { flex: 1; min-width: 0; }
.feed-title { margin: 0 0 .4rem; font-size: .9rem; font-weight: 500; line-height: 1.3; display: flex; justify-content: space-between; gap: .5rem; }
.feed-title span { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 99px; background: rgba(108, 60, 240, .12); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: var(--w, 50%); border-radius: inherit;
  background: linear-gradient(90deg, #9C78FF, #6C3CF0); transform-origin: left center;
  animation: fill 1.6s var(--ease) .7s both;
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pill { flex: 0 0 auto; padding: .22rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill-run { background: rgba(108, 60, 240, .12); color: var(--violet-d); }
.pill-done { background: rgba(15, 122, 88, .13); color: var(--ok); }
.feed-note { margin: .8rem 0 0; text-align: center; font-size: .78rem; color: var(--muted); }

.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .95rem; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--ink);
  background: var(--glass-strong); white-space: nowrap;
  animation: floaty 6s ease-in-out infinite alternate;
}
.float-chip .icon { color: var(--violet); }
.fc-like { top: -.2rem; right: -.6rem; }
.fc-like .icon { fill: var(--violet); }
.fc-pay { bottom: -1.3rem; right: 1.2rem; animation-delay: -3s; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* ---------- Platform marquee ---------- */
.platforms { padding: 1rem 0 1.5rem; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: .7rem; padding-right: .7rem; list-style: none; }
.marquee-group li {
  white-space: nowrap; padding: .5rem 1.15rem; border-radius: 999px; font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-tight { padding-top: 1.5rem; }
.section-head { max-width: 40rem; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 0; }

/* Bento features */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.bento-card { padding: 1.6rem; border-radius: 28px; min-width: 0; }
.bento-card h3 { margin: 1rem 0 .4rem; }
.bento-card p { color: var(--ink-2); margin: 0; }
.b-brand { grid-column: span 4; }
.b-services { grid-column: span 2; }
.b-orders { grid-column: span 2; }
.b-api { grid-column: span 4; }
.b-pay { grid-column: span 3; }
.b-support { grid-column: span 3; }

.icon-tile {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  color: var(--violet-d);
  background: linear-gradient(135deg, #fff, var(--lilac-l));
  border: 1px solid var(--glass-line); box-shadow: 0 8px 18px -10px rgba(108, 60, 240, .6);
}
.icon-tile .icon { width: 22px; height: 22px; }
.icon-tile.sm { width: 42px; height: 42px; }

.mini-browser { margin-top: 1.4rem; max-width: 440px; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .72); }
.mini-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem; background: rgba(108, 60, 240, .07); font-size: .78rem; color: var(--muted); }
.mini-bar i { width: 8px; height: 8px; border-radius: 50%; background: #CDBDFF; }
.mini-bar span { margin-left: .6rem; padding: .12rem .75rem; background: #fff; border-radius: 99px; }
.mini-body { padding: 1rem; display: grid; gap: .55rem; justify-items: start; }
.mini-logo { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(from 210deg, #C9B5FF, #7548F5, #3B1BA8, #C9B5FF); }
.mini-line { height: 8px; border-radius: 8px; background: rgba(108, 60, 240, .16); }
.w60 { width: 60%; } .w40 { width: 40%; }
.mini-btn { width: 92px; height: 26px; border-radius: 99px; background: linear-gradient(135deg, #8256FF, #5A2BE0); }

.mini-margin { margin-top: 1.2rem; display: grid; gap: .4rem; }
.mini-margin p { display: flex; justify-content: space-between; gap: .5rem; margin: 0; padding: .5rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .7); font-size: .9rem; color: var(--ink-2); }
.mini-margin b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-margin .gain { background: rgba(15, 122, 88, .12); color: var(--ok); font-weight: 600; }
.mini-margin .gain b { color: var(--ok); }

.mini-flow { list-style: none; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.mini-flow li { padding: .3rem .75rem; border-radius: 99px; font-size: .8rem; color: var(--ink-2); background: rgba(255, 255, 255, .72); border: 1px solid var(--glass-line); }
.mini-flow li.on { background: var(--violet); color: #fff; border-color: transparent; }

.code {
  margin: 1.2rem 0 0; padding: 1rem 1.1rem; border-radius: 16px; overflow-x: auto;
  background: #26155A; color: #EDE6FF; font-size: .85rem; line-height: 1.75;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  -webkit-overflow-scrolling: touch;
}
.code code { font: inherit; white-space: pre; }
.c-mute { color: #A796DB; }

/* Stats */
.stats-band { padding: 1rem 0 2rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 1.75rem 1rem; border-radius: 28px; }
.stats li { padding: 0 1.4rem; text-align: center; }
.stats li + li { border-left: 1px solid var(--glass-line); }
.stat-num { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); letter-spacing: -.03em; color: var(--violet-d); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { margin: .2rem 0 0; color: var(--ink-2); font-size: .95rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.step { position: relative; padding: 1.5rem; border-radius: 26px; }
.step h3 { margin: 1rem 0 .4rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.step-no {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--font-head); font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--violet-2), #5A2BE0); box-shadow: 0 10px 20px -10px rgba(90, 43, 224, .8);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 2.5rem; right: -1rem; width: 1rem; height: 2px;
  background: linear-gradient(90deg, var(--lilac), transparent);
}

/* Plans */
.cycle {
  display: flex; width: max-content; max-width: 100%; margin: 0 auto 2rem; padding: .3rem; gap: .2rem;
  border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
}
.cycle-btn {
  min-height: 42px; padding: .5rem 1.4rem; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-2); font-weight: 600; cursor: pointer; transition: background-color .25s, color .25s;
}
.cycle-btn.is-on { background: linear-gradient(135deg, var(--violet-2), #5A2BE0); color: #fff; box-shadow: 0 8px 18px -8px rgba(90, 43, 224, .8); }

.plans { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 1.9rem; border-radius: 30px; min-width: 0; }
.plan h3 { font-size: 1.3rem; margin-bottom: .2rem; }
.plan-tag { color: var(--ink-2); margin-bottom: 1.2rem; font-size: .97rem; }
.price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem; }
.price-amt { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.1rem, 1.6rem + 1.4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.1; }
.price-per { color: var(--muted); font-size: .95rem; }
.price-save { min-height: 1.5em; margin: .2rem 0 1rem; font-size: .9rem; font-weight: 600; color: var(--ok); }
.checks { list-style: none; display: grid; gap: .65rem; margin: 0 0 1.6rem; flex: 1; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; font-size: .97rem; }
.checks .icon { margin-top: .22em; color: var(--violet); width: 1.05em; height: 1.05em; stroke-width: 2.6; }
.plan-badge {
  position: absolute; top: 1.2rem; right: 1.2rem; padding: .28rem .8rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--violet-dd); background: #fff;
}
.plan-popular {
  color: #fff; border-color: rgba(255, 255, 255, .25);
  background: linear-gradient(160deg, #7B4DFF 0%, #4B25C2 58%, #33108F 100%);
  box-shadow: 0 34px 70px -28px rgba(60, 20, 170, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.plan-popular h3, .plan-popular .price-amt { color: #fff; }
.plan-popular .plan-tag, .plan-popular .price-per { color: rgba(255, 255, 255, .8); }
.plan-popular .price-save { color: #B9F5DC; }
.plan-popular .checks .icon { color: #CFC0FF; }
.empty { text-align: center; color: var(--ink-2); }

/* Compare */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.glass { border-radius: 26px; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 1rem 1.3rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--glass-line); }
.compare thead th { font-family: var(--font-head); font-size: 1rem; }
.compare tbody th { font-weight: 600; color: var(--ink); width: 26%; }
.compare tbody td { color: var(--ink-2); }
.compare th:nth-child(2), .compare td:nth-child(2) { background: rgba(108, 60, 240, .07); color: var(--violet-dd); font-weight: 500; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq-list { display: grid; gap: .8rem; }
.faq { border-radius: 20px; padding: 0 1.4rem; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0; cursor: pointer; list-style: none; font-weight: 600; font-family: var(--font-head); font-size: 1.02rem; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--lilac-l); }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px;
  background: var(--violet-d); border-radius: 2px; transition: transform .3s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq[open] .faq-icon::after { transform: rotate(0); }
.faq p { margin: 0 0 1.2rem; color: var(--ink-2); max-width: 62ch; }

/* Contact + forms */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-copy p { color: var(--ink-2); font-size: 1.05rem; max-width: 30rem; }
.channels { list-style: none; display: grid; gap: .8rem; margin-top: 1.6rem; max-width: 26rem; }
.channels a {
  display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .65); border: 1px solid var(--glass-line); transition: transform .2s var(--ease), background-color .2s;
}
.channels a:hover { transform: translateX(4px); background: rgba(255, 255, 255, .9); }
.channels strong { display: block; line-height: 1.3; }
.channels em { display: block; font-style: normal; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }

.form-card { padding: 1.7rem; border-radius: 28px; min-width: 0; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .93rem; }
.opt { font-weight: 400; color: var(--muted); }
.req { font-weight: 700; color: #B32D48; }
.input {
  width: 100%; padding: .8rem 1rem; font-size: 1rem; color: var(--ink);
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(108, 60, 240, .24); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input::placeholder { color: #9A91B2; }
.input:hover { border-color: rgba(108, 60, 240, .45); }
.input:focus { outline: 2px solid transparent; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(108, 60, 240, .18); }
textarea.input { resize: vertical; min-height: 7rem; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, #6C3CF0 50%), linear-gradient(135deg, #6C3CF0 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-sm { padding: .5rem .8rem; font-size: .92rem; border-radius: 12px; min-height: 40px; }
.hint { display: block; margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.coupon-row { display: flex; gap: .6rem; align-items: stretch; }
.coupon-row .input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.coupon-row .btn { flex: 0 0 auto; }
.coupon-msg.ok { color: var(--ok, #0F7A58); font-weight: 600; }
.coupon-msg.err { color: #B32D48; font-weight: 600; }
.summary [data-sum-discount-row] dd { color: var(--ok, #0F7A58); }
.coupon-edit { margin-bottom: .5rem; }
.coupon-edit summary { list-style: none; }
.coupon-edit summary::-webkit-details-marker { display: none; }
.coupon-edit[open] summary { margin-bottom: .2rem; }
td[data-label="Actions"] { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
td[data-label="Actions"] .coupon-edit { width: 100%; }
td[data-label="Actions"] .coupon-edit form { text-align: left; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; margin: .9rem 0 0; font-size: .95rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 4.6rem; }
.pw-toggle {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  min-height: 36px; padding: 0 .75rem; border: 0; border-radius: 10px; cursor: pointer;
  font-size: .85rem; font-weight: 600; color: var(--violet-d); background: var(--lilac-l);
}

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; padding: 7.5rem 0 3.5rem; }
.auth .container { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 460px; padding: 2.1rem; border-radius: 30px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: .3rem; }
.auth-sub { color: var(--ink-2); margin-bottom: 1.5rem; }
.auth-alt { margin: 1.3rem 0 0; text-align: center; color: var(--ink-2); font-size: .95rem; }

/* ---------- Inner pages ---------- */
.page-section { padding: 7.5rem 0 4rem; min-height: 70vh; }
.page-head { margin-bottom: 1.8rem; }
.page-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: .3rem; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 40rem; }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.card-block { padding: 1.6rem; border-radius: 26px; margin-bottom: 1.25rem; min-width: 0; }
.is-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.card-block h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.card-foot { margin: 1rem 0 0; font-size: .95rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.two-col .card-block { margin-bottom: 0; }
.empty-state { text-align: center; padding: 1.5rem .5rem; }
.empty-state p { color: var(--ink-2); max-width: 28rem; margin: 0 auto 1.2rem; }
.kv { margin: 0; display: grid; gap: .8rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--glass-line); }
.kv div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* Rent page */
.rent-head { max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .9rem;
  padding: .35rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 700;
  color: var(--violet-d); background: var(--lilac-l); border: 1px solid var(--glass-line);
}
.eyebrow .icon { width: 1em; height: 1em; }
.trust-row { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1.3rem 0 0; padding: 0; }
.trust-row li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink-2); font-weight: 500; }
.trust-row .icon { width: 1.1em; height: 1.1em; color: var(--violet-d); flex: none; }
.step-indicator { list-style: none; display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 1.75rem; padding: 0; position: relative; }
.step-indicator-item {
  flex: 1; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-weight: 600; font-size: .92rem;
  cursor: default;
}
.step-indicator-item:not(:last-child)::after {
  content: ''; flex: 1; height: 2px; margin: 0 .25rem; align-self: center;
  background: var(--glass-line); border-radius: 2px; transition: background-color .25s;
}
.step-indicator-item.is-done:not(:last-child)::after { background: var(--violet); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: rgba(108, 60, 240, .1); color: var(--violet-d); font-size: .88rem;
  border: 1.5px solid rgba(108, 60, 240, .25); transition: background-color .2s, color .2s, border-color .2s;
}
.step-num .icon { width: 15px; height: 15px; stroke-width: 3; }
.step-text { display: flex; flex-direction: column; line-height: 1.2; }
.step-text small { display: none; font-weight: 500; color: var(--muted); font-size: .78rem; }
.step-indicator-item.is-active { color: var(--ink); }
.step-indicator-item.is-active .step-num { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 0 0 5px rgba(108, 60, 240, .14); }
.step-indicator-item.is-done .step-num { background: var(--violet-d); border-color: var(--violet-d); color: #fff; }
.step-indicator-item .step-label { display: block; }
.step-indicator-item[data-step-link] { cursor: pointer; }
@media (min-width: 640px) {
  .step-text small { display: block; }
}
.group-hint { color: var(--ink-2); font-size: .93rem; margin: -.5rem 0 1.1rem; }
.rent-step { display: none; }
.rent-step.is-active { display: block; animation: stepIn .35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--glass-line); }
.step-actions .btn .icon { width: 1em; height: 1em; }
.rent-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.rent-main .form-card { margin-bottom: 1.25rem; }
.group-title { font-size: 1.1rem; margin-bottom: 1rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.choice-body {
  position: relative; display: block; height: 100%; padding: 1rem; border-radius: 18px;
  border: 1.5px solid rgba(108, 60, 240, .2); background: rgba(255, 255, 255, .65);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.choice:hover .choice-body { border-color: rgba(108, 60, 240, .5); }
.choice input:checked + .choice-body { border-color: var(--violet); background: rgba(108, 60, 240, .09); box-shadow: 0 0 0 3px rgba(108, 60, 240, .16); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--violet); outline-offset: 2px; }
.choice-body strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.choice-body em { display: block; font-style: normal; color: var(--ink-2); font-size: .9rem; margin: .15rem 0 .5rem; }
.choice-price { display: block; font-weight: 700; color: var(--violet-d); }
.choice-gst-note { font-weight: 500; color: var(--muted); font-size: .78rem; }
.choice-check {
  position: absolute; top: .8rem; right: .8rem; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff;
  opacity: 0; transform: scale(.5); transition: opacity .18s, transform .18s;
}
.choice-check .icon { width: 12px; height: 12px; stroke-width: 3.2; }
.choice input:checked + .choice-body .choice-check { opacity: 1; transform: scale(1); }
.plan-choice .choice-body { padding-top: 1.2rem; }
.plan-choice.is-popular .choice-body { border-color: rgba(108, 60, 240, .45); }
.choice-flag {
  display: inline-block; margin-bottom: .5rem; padding: .18rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em; color: #fff;
  background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
}
.choice-features { list-style: none; margin: .7rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--glass-line); display: grid; gap: .4rem; }
.choice-features li { display: flex; align-items: flex-start; gap: .4rem; font-size: .84rem; color: var(--ink-2); }
.choice-features .icon { width: .95em; height: .95em; margin-top: .2em; color: var(--violet); flex: none; stroke-width: 3; }
.choice-save { display: block; margin-top: .3rem; font-size: .82rem; font-weight: 700; color: var(--ok); min-height: 1.2em; }
.reassure { display: flex; align-items: center; gap: .5rem; margin: 1.1rem 0 0; padding: .7rem .9rem; border-radius: 14px; background: rgba(108, 60, 240, .07); color: var(--ink-2); font-size: .86rem; }
.reassure .icon { width: 1.05em; height: 1.05em; color: var(--violet-d); flex: none; }
.rent-side { position: sticky; top: 6.5rem; }
.summary { padding: 1.6rem; border-radius: 26px; }
.summary h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.summary h2 .icon { width: 1.05em; height: 1.05em; color: var(--violet-d); }
.summary dl { margin: 0 0 1rem; }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--glass-line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.summary .sum-total { border-bottom: 0; padding-top: .9rem; }
.summary .sum-total dd { font-family: var(--font-head); font-size: 1.5rem; color: var(--violet-d); }
.next-steps { list-style: none; display: grid; gap: .55rem; margin: 0 0 1.1rem; padding: 1rem 0 0; border-top: 1px dashed var(--glass-line); }
.next-steps li { display: flex; align-items: center; gap: .6rem; font-size: .87rem; color: var(--ink-2); }
.ns-no {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%; font-size: .72rem; font-weight: 700;
  background: var(--lilac-l); color: var(--violet-d);
}
.summary-secure { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--glass-line); font-size: .82rem; color: var(--ink-2); }
.summary-secure .icon { width: 1.05em; height: 1.05em; color: var(--ok); flex: none; }

/* Compact rent page: fit the wizard in one viewport, no page scroll */
.page-rent .page-section { padding: 5.75rem 0 1.5rem; min-height: 0; }
.page-rent .rent-head { margin-bottom: 1.1rem; }
.page-rent .rent-head .eyebrow { margin-bottom: .5rem; }
.page-rent .rent-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: .15rem; }
.page-rent .rent-head p { font-size: .92rem; }

/* Panel pages (admin + user account area) have their own persistent nav/menu and
 * a variable amount of content (a filtered table can be just a few rows), so they
 * should never be stretched to fill 70% of the viewport - that just leaves a big
 * empty gap above the footer. Let their height follow their content instead. */
.page-admin .page-section,
.page-dashboard .page-section,
.page-orders .page-section,
.page-renewals .page-section,
.page-payments .page-section,
.page-account .page-section {
  min-height: 0;
}

.page-rent .step-indicator { margin-bottom: 1.1rem; }
.page-rent .form-card { padding: 1.2rem 1.3rem; }
.page-rent .group-title { margin-bottom: .6rem; }
.page-rent .group-hint { margin: -.3rem 0 .8rem; font-size: .87rem; }
.page-rent .choices { gap: .6rem; }
.page-rent .choice-body { padding: .75rem .8rem; }
.page-rent .plan-choice .choice-body { padding-top: .95rem; }
.page-rent .choice-flag { margin-bottom: .3rem; padding: .12rem .55rem; font-size: .68rem; }
.page-rent .choice-body strong { font-size: .98rem; }
.page-rent .choice-body em { font-size: .82rem; margin: .1rem 0 .35rem; }
.page-rent .choice-price { font-size: .92rem; }
.page-rent .choice-features { margin: .5rem 0 0; padding-top: .5rem; gap: .28rem; }
.page-rent .choice-features li { font-size: .78rem; }
.page-rent .step-actions { margin-top: .9rem; padding-top: .8rem; }
.page-rent .summary { padding: 1.1rem 1.3rem; }
.page-rent .summary h2 { font-size: 1.05rem; margin-bottom: .2rem; }
.page-rent .summary dl { margin: 0 0 .6rem; }
.page-rent .summary dl div { padding: .4rem 0; }
.page-rent .summary .sum-total { padding-top: .6rem; }
.page-rent .summary .sum-total dd { font-size: 1.3rem; }
.page-rent .next-steps { margin: 0 0 .7rem; padding-top: .7rem; gap: .35rem; }
.page-rent .next-steps li { font-size: .82rem; }
.page-rent .summary-secure { margin-top: .7rem; padding-top: .7rem; }
.page-rent .reassure { margin-top: .8rem; padding: .55rem .75rem; font-size: .82rem; }
@media (min-height: 780px) {
  .page-rent .page-section { padding-top: 6.25rem; }
}

/* Tables */
.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data th { text-align: left; padding: .7rem .9rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--glass-line); white-space: nowrap; }
.data td { padding: .85rem .9rem; vertical-align: top; border-bottom: 1px solid rgba(108, 60, 240, .08); }
.data tr:last-child td { border-bottom: 0; }
.data small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
.data small.note { max-width: 24ch; font-style: italic; }
.status { display: inline-block; padding: .22rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status-pending { background: rgba(154, 91, 0, .12); color: #8A5200; }
.status-processing { background: rgba(108, 60, 240, .13); color: var(--violet-d); }
.status-active { background: rgba(15, 122, 88, .13); color: var(--ok); }
.status-cancelled { background: rgba(179, 45, 72, .11); color: #9B1F39; }
.status-expired { background: rgba(106, 96, 132, .16); color: #4B4266; }
.row-form { display: flex; align-items: center; gap: .5rem; }

/* Switch (e.g. auto-renew toggle) */
.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(106, 96, 132, .28); transition: background .15s var(--ease); flex: none; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(29, 21, 51, .25); transition: transform .15s var(--ease); }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:disabled + .switch-track { opacity: .45; cursor: not-allowed; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Admin */
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem; border-radius: 99px; font-size: .75rem; background: #fff; color: var(--violet-d); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { padding: 1.3rem; border-radius: 24px; }
.kpi-num { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; letter-spacing: -.03em; color: var(--violet-d); line-height: 1.2; }
.kpi-label { margin: .2rem 0 0; color: var(--ink-2); font-size: .92rem; }
/* ---------- List toolbar: filter chips + search bar ---------- */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; min-width: 0; }
.filter {
  display: inline-flex; align-items: center; min-height: 38px; padding: .35rem 1rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; color: var(--ink-2);
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter:hover { background: #fff; color: var(--violet-d); border-color: rgba(108, 60, 240, .4); }
.filter.is-on { background: var(--violet-d); color: #fff; border-color: transparent; }

/* Search bar (built by panel_search_bar() in includes/panel_layout.php) */
.search-form { flex: 1 1 340px; max-width: 480px; min-width: 0; margin: 0; }
.search-field {
  position: relative; display: flex; align-items: center; gap: .15rem; height: 48px; padding: 0 .35rem 0 2.75rem;
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(108, 60, 240, .24); border-radius: 999px;
  box-shadow: 0 1px 2px rgba(44, 20, 112, .05);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.search-field:hover { border-color: rgba(108, 60, 240, .45); }
.search-field:focus-within { background: #fff; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 60, 240, .16); }
.search-icon { position: absolute; left: 1.05rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--violet); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.search-input {
  flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0 .35rem 0 0;
  font: inherit; font-size: 1rem; /* 16px: stops iOS zooming the page when the field is focused */
  color: var(--ink); background: transparent; border: 0; border-radius: 0; box-shadow: none;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
}
.search-input:focus, .search-input:focus-visible { outline: none; }
.search-input::placeholder { color: #9A91B2; opacity: 1; }
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; }
.search-input::-ms-clear { display: none; }
.search-clear {
  display: none; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  color: var(--muted); background: transparent; cursor: pointer; transition: background-color .2s, color .2s;
}
.search-clear svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search-clear:hover { background: var(--lilac-l); color: var(--violet-d); }
.search-field.has-value .search-clear { display: grid; }
.search-btn {
  flex: 0 0 auto; height: 38px; margin-left: .1rem; padding: 0 1.2rem; border: 0; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
  box-shadow: 0 8px 18px -8px rgba(90, 43, 224, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: box-shadow .2s var(--ease), filter .2s;
}
.search-btn:hover { filter: brightness(1.07); }
.search-btn:active { filter: brightness(.95); }
.search-btn:focus-visible, .search-clear:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.search-results-note { margin: -.4rem 0 1rem; color: var(--ink-2); font-size: .92rem; }
.search-note-clear { margin-left: .35rem; font-weight: 600; white-space: nowrap; }

/* Phones: search bar goes first and spans the full width, filter chips become one swipeable row */
@media (max-width: 640px) {
  .list-toolbar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: .7rem; }
  .search-form { order: -1; flex: 0 0 auto; width: 100%; max-width: none; }
  .search-field { height: 50px; }
  .filters {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
}
@media (max-width: 380px) {
  .search-btn { padding: 0 .95rem; }
}

/* ---------- Admin > Users ---------- */
.row-clickable { cursor: pointer; }
.row-clickable:hover { background: rgba(108, 60, 240, .05); }
.row-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: .4rem; }
.row-actions form { margin: 0; }
.row-actions .btn-sm { min-height: 36px; padding: .4rem .9rem; }
.row-actions .btn-glass, .user-hero .btn-glass, .user-side .btn-glass { background: #fff; border-color: rgba(108, 60, 240, .3); }
.row-actions .btn-glass:hover, .user-hero .btn-glass:hover, .user-side .btn-glass:hover { border-color: var(--violet); }
.data.stack th, .data.stack td { padding-left: .6rem; padding-right: .6rem; }
.data.stack td[data-label="Actions"] { display: table-cell; }   /* the global Actions rule makes cells flex, which breaks row alignment */
.data.stack td[data-label="Joined"] { white-space: nowrap; }
.data.stack td[data-label="User"] { min-width: 210px; }
.data.stack td[data-label="Status"] small { margin-top: .25rem; }
.data .user-cell { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; }
.data .user-cell strong { display: block; font-weight: 600; line-height: 1.3; }
.user-avatar {
  position: relative; flex: 0 0 auto; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%;
  font-family: var(--font-head); font-weight: 700; line-height: 1; color: var(--violet-d); background: var(--lilac-l); border: 1px solid var(--glass-line);
}
.user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.you-tag { display: inline-block; margin-left: .35rem; padding: .05rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; vertical-align: middle; color: var(--violet-d); background: var(--lilac-l); }
.status-inactive { background: rgba(179, 45, 72, .11); color: #9B1F39; }
.crumb { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1rem; font-size: .92rem; font-weight: 600; text-decoration: none; }
.crumb:hover { text-decoration: underline; }
.user-hero { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.user-hero-main { flex: 1 1 220px; min-width: 0; }
.user-hero h2 { margin: 0 0 .15rem; overflow-wrap: anywhere; }
.user-hero p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.user-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.user-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--glass-line); }
.user-stats dt { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.user-stats dd { margin: .15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.wallet-amount-row { display: flex; align-items: center; gap: .5rem; }
.wallet-amount-prefix { font-weight: 700; color: var(--ink-2); }
.wallet-cell { font-weight: 600; color: var(--violet-d); font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.wallet-cell:hover { text-decoration: underline; }
.wallet-cell.is-zero { font-weight: 500; color: var(--muted); }
/* Users table with the extra Wallet column: a little tighter spacing on desktop so Edit / Deactivate /
   Delete stay in view without side-scrolling (the page content is capped at 1180px wide).
   Phones and tablets are untouched. */
@media (min-width: 761px) {
  .data.has-wallet th, .data.has-wallet td { padding-left: .45rem; padding-right: .45rem; }
  .data.has-wallet .row-actions { gap: .3rem; }
  .data.has-wallet .row-actions .btn-sm { padding-left: .7rem; padding-right: .7rem; }
  /* safety net: a very long email wraps inside its column instead of pushing the buttons out of view */
  .data.has-wallet td[data-label="Contact"] a { overflow-wrap: anywhere; }
}
.wallet-admin-balance { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--violet-d); margin: 0 0 1rem; display: flex; align-items: baseline; gap: .5rem; }
.wallet-admin-balance small { font-family: var(--font-body); font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.user-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.user-grid .card-block { margin-bottom: 0; }
.user-side { display: grid; gap: 1.25rem; }
.card-block.danger-zone { border: 1px solid rgba(179, 45, 72, .3); background: rgba(255, 245, 247, .7); }
.danger-zone h2 { color: #8B1B33; }
.card-block p.lead-sm { color: var(--ink-2); font-size: .95rem; margin: 0 0 1rem; }
/* Admin > Account: two cards side by side on laptops/desktops, stacked on tablets and phones */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.account-grid .card-block { margin-bottom: 0; }
.account-col { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.account-grid .card-block.span-all { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--glass-line); }
@media (max-width: 960px) {
  .user-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .user-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-actions .btn, .user-side .btn { width: 100%; }
}

/* Users table on phones: each user becomes a card, so the Edit / Deactivate / Delete buttons
   are always visible instead of hiding off to the right of a sideways-scrolling table. */
@media (max-width: 760px) {
  .table-wrap.is-stack:not(.glass) { overflow: visible; border: 0; border-radius: 0; background: none; }
  .card-block.glass:has(> .table-wrap.is-stack) { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .data.responsive.stack { display: block; min-width: 0; font-size: .92rem; }
  .data.responsive.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data.responsive.stack tbody { display: grid; gap: .8rem; }
  .data.responsive.stack tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem 1rem; padding: 1rem;
    background: #fff; border: 1px solid var(--glass-line); border-radius: 18px; box-shadow: 0 10px 24px -18px rgba(76, 34, 184, .5);
  }
  .data.responsive.stack td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .data.responsive.stack td::before { content: attr(data-label); display: block; margin-bottom: .1rem; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .data.responsive.stack td small { font-size: .8rem; }
  .data.responsive.stack td[data-label="User"],
  .data.responsive.stack td[data-label="Contact"],
  .data.responsive.stack td[data-label="Actions"],
  .data.responsive.stack td[data-label="Details"] { grid-column: 1 / -1; }
  .data.responsive.stack td[data-label="User"]::before,
  .data.responsive.stack td[data-label="Actions"]::before,
  .data.responsive.stack td[data-label="Details"]::before { display: none; }
  .data.responsive.stack td[data-label="Actions"] { min-width: 0; padding-top: .85rem; border-top: 1px solid var(--glass-line); }
  .data.responsive.stack td[data-label="Details"] { min-width: 0; padding-top: .85rem; border-top: 1px solid var(--glass-line); }
  .data.responsive.stack td[data-label="Details"] .btn { width: 100%; }
  .data.responsive.stack .row-actions { flex-wrap: wrap; }
  .data.responsive.stack .row-actions > * { flex: 1 1 88px; }
  .data.responsive.stack .row-actions .btn { width: 100%; }
}
.msg-list { display: grid; gap: 1rem; }
.msg { padding: 1.3rem 1.5rem; border-radius: 22px; }
.msg.is-new { border-left: 5px solid var(--violet); }
.msg header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; font-size: .93rem; }
.msg header strong { margin-right: .6rem; }
.msg time { color: var(--muted); }
.msg p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.msg footer { display: flex; flex-wrap: wrap; gap: .5rem; }
.plans-note { margin-bottom: 1rem; }
.plan-forms { display: block; }
.plan-forms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.plan-edit-card { margin-bottom: 0; }
.field-row.field-row-3 { grid-template-columns: repeat(3, 1fr); }
.plan-edit-card [data-recalc] { margin: -.4rem 0 1.1rem; }
.plans-save-bar { display: flex; justify-content: flex-end; margin-top: 1.5rem; position: sticky; bottom: 1rem; }
.plans-save-bar .btn-lg { padding: .85rem 2.2rem; font-size: 1.02rem; box-shadow: 0 12px 24px -10px rgba(90, 43, 224, .55); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.checks-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-bottom: 1.2rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .93rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; padding: 3rem 0 1.8rem; background: rgba(255, 255, 255, .5); border-top: 1px solid var(--glass-line); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 2rem; }
.footer-brand p { color: var(--ink-2); max-width: 28rem; margin: .9rem 0 0; font-size: .95rem; }
.footer-title { font-family: var(--font-head); font-size: .95rem; margin-bottom: .8rem; letter-spacing: -.01em; }
.footer-links { list-style: none; display: grid; gap: .5rem; font-size: .95rem; }
.footer-links a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--violet); text-decoration: underline; }
.footer-bottom { margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--glass-line); color: var(--muted); font-size: .9rem; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease) var(--rd, 0ms), transform .7s var(--ease) var(--rd, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Laptop / small desktop */
@media (max-width: 1100px) {
  .hero-grid { gap: 2rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 1.5rem; }
}

/* Tablet and below: collapsible menu, single-column layouts */
@media (max-width: 960px) {
  .nav { padding-left: 1rem; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + .6rem); margin: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem;
    border-radius: 26px; background: rgba(255, 255, 255, .97); border: 1px solid var(--glass-line);
    box-shadow: 0 30px 60px -24px rgba(44, 20, 112, .55);
    max-height: calc(100vh - 6.5rem); overflow-y: auto;
  }
  .nav-open .nav-menu { display: flex; animation: flashIn .3s var(--ease) both; }
  .nav-links { flex-direction: column; gap: .1rem; }
  .nav-links a { padding: .8rem 1rem; font-size: 1rem; border-radius: 14px; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--glass-line); }
  .nav-actions .btn { width: 100%; min-height: 46px; }
  .nav-actions .inline-form { display: block; }

  .hero { padding-top: 7.5rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-points { justify-content: center; }
  .hero-visual { max-width: 460px; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-brand, .b-api { grid-column: span 2; }
  .b-services, .b-orders, .b-pay, .b-support { grid-column: span 1; }

  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
  .stats li:nth-child(3) { border-left: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }

  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .rent-grid { grid-template-columns: 1fr; }
  .rent-side { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Tables on phones: keep a real table, compact it, and let it swipe sideways */
@media (max-width: 760px) {
  .table-wrap:not(.glass) {
    position: relative;   /* clips visually-hidden labels inside so they can't widen the page */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid var(--glass-line);
    border-radius: 16px;
    background-color: #fff;
    /* soft edge shadows that appear only when there is more to scroll */
    background-image:
      linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
      linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)),
      radial-gradient(farthest-side at 0 50%, rgba(60, 30, 120, .2), rgba(60, 30, 120, 0)),
      radial-gradient(farthest-side at 100% 50%, rgba(60, 30, 120, .2), rgba(60, 30, 120, 0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
    background-attachment: local, local, scroll, scroll;
  }
  /* give the table more room: trim the padding of the card that holds it */
  .card-block:has(> .table-wrap:not(.glass)) { padding: .7rem; }
  .card-block:has(> .table-wrap:not(.glass)) > h2 { padding: .2rem .3rem 0; }
  .data.responsive { font-size: .82rem; min-width: max-content; width: 100%; }
  .data.responsive th { padding: .6rem .7rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; background: rgba(108, 60, 240, .05); }
  .data.responsive td { padding: .65rem .7rem; white-space: nowrap; }
  .data.responsive td small { font-size: .74rem; }
  .data.responsive small.note { white-space: normal; min-width: 16ch; max-width: 22ch; }
  .data.responsive td[data-label="Actions"],
  .data.responsive td[data-label="Action"] { min-width: 150px; }
  .data.responsive .row-form { flex-wrap: nowrap; }
  .data.responsive .row-form .input { flex: 1 1 110px; min-width: 110px; }
  .data.responsive .btn-sm { white-space: nowrap; }
  .row-form { flex-wrap: wrap; }
  .row-form .input { flex: 1 1 150px; }
}

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .section { padding: 3.2rem 0; }
  .section-head { margin-bottom: 1.8rem; }
  .hero { padding: 6.8rem 0 2rem; }
  .hero-sub { font-size: 1.02rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-points { flex-direction: column; align-items: center; gap: .4rem; }
  .hero-visual { padding: 1.4rem 0; }
  .feed { padding: .8rem; border-radius: 24px; }
  .feed-big { font-size: 1.7rem; }
  .fc-like { right: -.2rem; top: -.4rem; }
  .fc-pay { right: .4rem; bottom: -1.3rem; }
  .feed-item { padding: .65rem; gap: .6rem; }
  .avatar { width: 34px; height: 34px; }
  .pill { font-size: .7rem; padding: .2rem .5rem; }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .b-brand, .b-api, .b-services, .b-orders, .b-pay, .b-support { grid-column: span 1; }
  .bento-card { padding: 1.3rem; border-radius: 24px; }

  .stats { padding: 1.3rem .4rem; }
  .stats li { padding: 0 .6rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }

  .plan { padding: 1.5rem; }
  .compare th, .compare td { padding: .8rem .75rem; font-size: .9rem; }
  .compare tbody th { width: 30%; }
  .faq { padding: 0 1.1rem; }
  .form-card, .summary, .card-block { padding: 1.3rem; }
  .auth { padding: 6.5rem 0 2.5rem; }
  .auth-card { padding: 1.5rem; border-radius: 26px; }
  .page-section { padding: 6.5rem 0 3rem; }
  .row-head .btn { width: 100%; }
  /* Several buttons next to a page title (.btn-row): the group spans the full width and the buttons
     share it equally - side by side when they fit, one per line when they do not. */
  .row-head > .btn-row { flex: 1 1 100%; width: 100%; }
  .row-head > .btn-row > .btn { flex: 1 1 calc(50% - .3rem); width: auto; }
  .choices.two { grid-template-columns: minmax(0, 1fr); }
  .choices.three { grid-template-columns: minmax(0, 1fr); }
  .trust-row { gap: .5rem 1rem; }
  .trust-row li { font-size: .82rem; }
  .step-indicator { gap: .3rem; }
  .step-indicator-item:not(:last-child)::after { margin: 0 .1rem; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .7rem; }
  .kpi { padding: 1rem; }
  .kpi-num { font-size: 1.5rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field-row.field-row-3 { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 1.02rem; }
  .btn-lg { padding: .85rem 1.2rem; }
  .cycle-btn { padding: .5rem 1.1rem; }
}

/* Body scroll lock while mobile menu is open (class is set on <html>) */
html.nav-open body { overflow: hidden; }

/* =====================================================================
   PANEL MENU - hamburger (3 lines) + slide-out drawer
   Used by the user panel and the admin panel. Same purple glass theme.
   ===================================================================== */
.panel-nav { padding: .5rem .6rem; }
.panel-left { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1 1 auto; }
.panel-right { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 0 0 auto; }
.brand small { opacity: .6; font-weight: 500; font-size: .78em; }

.hamburger {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lilac-l); color: var(--violet-d);
  transition: background-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.hamburger:hover { background: #DFD2FF; box-shadow: 0 8px 18px -10px rgba(90, 43, 224, .7); }
.hamburger:active { transform: scale(.94); }
.hb-lines { position: relative; display: block; width: 20px; height: 14px; }
.hb-lines i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: top .3s var(--ease), transform .3s var(--ease), opacity .2s;
}
.hb-lines i:nth-child(1) { top: 0; }
.hb-lines i:nth-child(2) { top: 6px; }
.hb-lines i:nth-child(3) { top: 12px; }
.drawer-open .hb-lines i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.drawer-open .hb-lines i:nth-child(2) { opacity: 0; }
.drawer-open .hb-lines i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.panel-user {
  display: inline-flex; align-items: center; gap: .55rem; max-width: 100%;
  padding: .3rem .9rem .3rem .3rem; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
}
.panel-user-dot {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-size: .85rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
}
.panel-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.panel-user-photo, .drawer-avatar-photo { object-fit: cover; background: #fff; }

/* Wallet balance pill in the top bar, just left of the hamburger. Same glass style as the
   user pill on the left; the whole pill is a link to the Wallet page (add funds). */
.wallet-chip {
  display: inline-flex; align-items: center; gap: .55rem; flex: 0 0 auto;
  height: 44px; padding: 0 1rem 0 .3rem; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--glass-line);
  color: var(--ink); text-decoration: none;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.wallet-chip:hover { background: #fff; border-color: rgba(108, 60, 240, .34); box-shadow: 0 8px 18px -12px rgba(90, 43, 224, .7); color: var(--ink); }
.wallet-chip:active { transform: scale(.97); }
.wallet-chip:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wallet-chip-ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--lilac-l); color: var(--violet-d);
}
.wallet-chip-ico .icon { width: 17px; height: 17px; }
.wallet-chip-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-width: 0; }
.wallet-chip-label { font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.wallet-chip-amt {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--violet-dd); white-space: nowrap; font-variant-numeric: tabular-nums;
}

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(29, 21, 51, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 80;
  width: min(320px, 86vw); display: flex; flex-direction: column; gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(236, 228, 255, .96), rgba(255, 255, 255, .98) 200px);
  border-left: 1px solid var(--glass-line); border-radius: 28px 0 0 28px;
  box-shadow: -30px 0 60px -30px rgba(44, 20, 112, .55);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(104%); visibility: hidden;
  transition: transform .38s var(--ease), visibility 0s linear .38s;
}
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer-open .drawer { transform: none; visibility: visible; transition-delay: 0s; }
html.drawer-open body { overflow: hidden; }

.drawer-head { display: flex; align-items: center; gap: .8rem; padding: .3rem .2rem .3rem .35rem; }
.drawer-avatar {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: var(--violet-d); background: #fff;
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px #A88BFF;
  margin-right: .2rem;
}
.drawer-who { flex: 1; min-width: 0; line-height: 1.3; }
.drawer-who strong { display: block; font-family: var(--font-head); font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-who small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-x {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .8); color: var(--violet-d);
}
.drawer-x:hover { background: #fff; }
.drawer-x .icon { width: 20px; height: 20px; }

.drawer-nav ul { list-style: none; display: grid; gap: .25rem; }
.drawer-link {
  display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 48px;
  padding: .65rem .95rem; border-radius: 16px; border: 0; background: transparent;
  color: var(--ink-2); font-weight: 600; font-size: .98rem; text-decoration: none; text-align: left; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.drawer-link .icon { width: 20px; height: 20px; }
.dl-label { flex: 1; min-width: 0; }
.drawer-link:hover { background: var(--lilac-l); color: var(--violet-d); }
.drawer-link.is-on {
  color: #fff; background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
  box-shadow: 0 12px 24px -12px rgba(90, 43, 224, .75), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.drawer-link.is-on .count { background: #fff; color: var(--violet-d); }
.drawer-link:not(.is-on) .count { background: var(--violet); color: #fff; }
.drawer-foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--glass-line); display: grid; gap: .25rem; }
.drawer-foot .inline-form { display: block; }
.drawer-logout { color: #9B1F39; }
.drawer-logout:hover { background: rgba(179, 45, 72, .09); color: #7D1730; }

/* Page bits used by the split panel pages */
.kpi-num.is-sm { font-size: 1.4rem; line-height: 1.7; }
.msg-subject { font-weight: 700; margin: 0 0 .4rem; }
.pay-contact { display: flex; flex-wrap: wrap; gap: .5rem; }
.panel-footer { margin-top: 0; padding: 1.4rem 0 1.2rem; }
.panel-footer .footer-bottom { margin: 0; padding: 0; border-top: 0; }

@media (max-width: 520px) {
  .panel-user-name { display: none; }
  .panel-user { padding: .3rem; }
  .wallet-chip { gap: .45rem; padding-right: .8rem; }
  .wallet-chip-label { display: none; }
  .wallet-chip-amt { font-size: .92rem; }
}

/* Top bar with the wallet pill (user panel only - the admin bar is not touched). Room is tight on
   phones, so the site name never wraps or slides under the pill (it shortens with an ellipsis),
   and the round user dot steps aside - the name and email are at the top of the menu anyway. */
.panel-nav.has-wallet { gap: .5rem; }
.panel-nav.has-wallet .brand { min-width: 0; }
.panel-nav.has-wallet .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 440px) {
  .panel-nav.has-wallet .panel-user { display: none; }
}
@media (max-width: 380px) {
  .panel-nav.has-wallet { padding-left: .8rem; }
  .panel-nav.has-wallet .panel-right { gap: .35rem; }
  .panel-nav.has-wallet .wallet-chip { gap: .35rem; padding: 0 .65rem 0 .25rem; }
  .panel-nav.has-wallet .wallet-chip-ico { width: 28px; height: 28px; }
  .panel-nav.has-wallet .wallet-chip-ico .icon { width: 15px; height: 15px; }
  .panel-nav.has-wallet .wallet-chip-amt { font-size: .86rem; letter-spacing: -.02em; }
  .panel-nav.has-wallet .hamburger { width: 40px; height: 40px; }
}

/* Without JavaScript the hamburger cannot open, so show the menu as a plain card instead */
.no-js .hamburger, .no-js .drawer-backdrop, .no-js .drawer-x { display: none; }
.no-js .drawer {
  position: static; transform: none; visibility: visible; width: auto; z-index: auto;
  margin: 5.5rem 1.25rem 0; border: 1px solid var(--glass-line); border-radius: 26px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .typed { animation: none; }
  .typed-line::after { animation: none; }
  .drawer, .drawer-backdrop, .hb-lines i { transition: none; }
}

/* ---------- UPI payment page (user/pay.php) ---------- */
.pay-wrap { max-width: 460px; margin: 0 auto; }
.pay-card { text-align: center; }
.pay-card .hidden { display: none !important; }
.pay-amount { display: grid; gap: .25rem; margin-bottom: 1.1rem; }
.pay-amount .pay-label { color: var(--muted); font-size: .92rem; }
.pay-amount strong { font-family: var(--font-head); font-size: 2.1rem; color: var(--violet-dd); }
.pay-qr { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--glass-line); border-radius: 18px; }
.pay-qr img { display: block; width: 240px; max-width: 100%; height: auto; }
.pay-timer { margin: 1rem 0 .4rem; color: var(--ink-2); }
.pay-timer .timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--violet-d); margin-left: .35rem; }
.pay-apps { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0 .6rem; }
.pay-state { font-weight: 600; color: var(--violet-d); margin: .8rem 0 .4rem; }
.pay-result { display: grid; gap: .6rem; justify-items: center; padding: 1.2rem 1rem; border-radius: 16px; }
.pay-ok { background: rgba(15, 122, 88, .1); border: 1px solid rgba(15, 122, 88, .28); color: #0F5F45; }
.pay-bad { background: rgba(179, 45, 72, .07); border: 1px solid rgba(179, 45, 72, .22); color: #8B1B33; }
.pay-back { text-align: center; margin-top: .6rem; }
.pay-open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 0; border-bottom: 1px solid rgba(108, 60, 240, .08); }
.pay-open:last-child { border-bottom: 0; }
.status-success { background: rgba(15, 122, 88, .13); color: var(--ok); }
.pre-box { white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--glass-line); border-radius: 12px; padding: .9rem 1rem; font-size: .82rem; overflow-x: auto; }

.widget-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.75rem; }
.widget-actions { grid-column: 1 / -1; }
.widget-sub { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin: 1.3rem 0 .7rem; padding-top: 1.1rem; border-top: 1px solid var(--glass-line); }
.widget-sub:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 640px) {
  .widget-form { grid-template-columns: minmax(0, 1fr); }
  .widget-col + .widget-col .widget-sub { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--glass-line); }
}

/* ---------- Floating chat buttons (WhatsApp / Telegram widget) ---------- */
.chat-widgets { position: fixed; inset: auto 0 0 0; z-index: 90; pointer-events: none; }
.chat-fab {
  position: fixed; bottom: 1.25rem; width: 3.4rem; height: 3.4rem; z-index: 90;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  color: #fff; box-shadow: 0 14px 30px -10px rgba(29, 21, 51, .45);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  pointer-events: auto;
}
.chat-fab svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.chat-fab:hover, .chat-fab:focus-visible { transform: translateY(-3px) scale(1.05); box-shadow: 0 18px 36px -8px rgba(29, 21, 51, .55); }
.chat-fab-right { right: 1.25rem; }
.chat-fab-left { left: 1.25rem; }
.chat-fab-second, .chat-fab-stack-1 { bottom: 5.25rem; }
.chat-fab-stack-2 { bottom: 9.25rem; }
.chat-fab-whatsapp { background: #25D366; }
.chat-fab-telegram { background: #29A9EA; }
/* The site's own Live chat button (bottom-right, with an unread badge) */
.chat-fab-live { background: linear-gradient(135deg, var(--violet-2), #5A2BE0); }
.chat-fab-live svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: 1.6rem; height: 1.6rem; }
.chat-fab-badge {
  position: absolute; top: -.2rem; right: -.2rem; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  display: grid; place-items: center; border-radius: 999px; border: 2px solid #fff;
  background: #E5484D; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1;
}
.chat-fab-live.is-bump { animation: fabBump .6s var(--ease); }
.chat-fab-live.is-bump .chat-fab-badge { animation: fabBadge .6s var(--ease); }
@keyframes fabBump { 0%, 100% { transform: none; } 25% { transform: translateY(-6px) rotate(-8deg); } 55% { transform: translateY(-2px) rotate(6deg); } }
@keyframes fabBadge { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@media (max-width: 640px) {
  .chat-fab { width: 3.1rem; height: 3.1rem; bottom: 1rem; }
  .chat-fab-right { right: 1rem; }
  .chat-fab-left { left: 1rem; }
  .chat-fab-second, .chat-fab-stack-1 { bottom: 4.7rem; }
  .chat-fab-stack-2 { bottom: 8.4rem; }
}

/* ===== Email-verification banner (signed-in pages) ===== */
.verify-banner { background: rgba(154, 91, 0, .1); border-bottom: 1px solid rgba(154, 91, 0, .22); color: #6B4200; font-size: .92rem; }
.verify-banner .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding-top: .55rem; padding-bottom: .55rem; }
.verify-banner form { margin: 0; }
.label-like { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }

/* ===== Legal / static content pages ===== */
.footer-legal { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-legal a { color: inherit; opacity: .8; text-decoration: none; }
.footer-legal a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; justify-content: space-between; }
.legal-page .container { max-width: 760px; }
.legal-page h1 { margin-bottom: .3rem; }
.legal-page .legal-updated { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin: 0 0 1rem; line-height: 1.65; color: var(--ink-soft, #4B4266); }
.legal-content ul { margin: 0 0 1rem 1.2rem; padding: 0; }
.legal-content li { margin-bottom: .4rem; line-height: 1.6; }

/* ===== Simple tab bar (admin: legal pages, ticket views, etc.) ===== */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line, rgba(108,60,240,.14)); padding-bottom: 0; }
.tab { padding: .55rem 1rem; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border: 1px solid transparent; border-bottom: none; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--violet-d, #6C3CF0); background: rgba(108,60,240,.08); border-color: var(--line, rgba(108,60,240,.14)); }

/* ===== Order detail / invoices / tickets (stage 2-3) ===== */
.container-narrow { max-width: 760px; }
.btn-link { background: none; border: none; padding: 0; color: var(--violet-d, #6C3CF0); text-decoration: underline; font: inherit; cursor: pointer; }
.kv-list { display: grid; gap: .6rem; margin: 0; }
.kv-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid rgba(108,60,240,.08); }
.kv-list dt { color: var(--muted); font-size: .88rem; }
.kv-list dd { margin: 0; text-align: right; font-weight: 600; }
.kv-list dd small { display: block; font-weight: 400; color: var(--muted); }
.kv-list dd a { word-break: break-all; }

.progress-steps { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 0; counter-reset: none; }
.progress-steps li { display: flex; align-items: center; gap: .5rem; flex: 1 1 auto; min-width: 130px; color: var(--muted); font-size: .88rem; }
.progress-steps li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: rgba(108,60,240,.14); margin: 0 .4rem; min-width: 16px; }
.progress-dot { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(108,60,240,.1); color: var(--muted); font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.progress-steps li.is-done .progress-dot { background: var(--ok, #0F7A58); color: #fff; }
.progress-steps li.is-done { color: var(--ink); }
.progress-steps li.is-current .progress-dot { background: var(--violet-d, #6C3CF0); color: #fff; }
.progress-steps li.is-current { color: var(--ink); font-weight: 600; }

.dns-box { background: rgba(108,60,240,.05); border: 1px solid rgba(108,60,240,.14); border-radius: 12px; padding: 1rem 1.2rem; margin-top: 1rem; }
.dns-box h3 { margin: 0 0 .5rem; font-size: 1rem; }
.dns-box code { background: rgba(0,0,0,.06); padding: .1rem .4rem; border-radius: 5px; font-size: .9em; }
.alert-inline-ok { color: var(--ok, #0F7A58); font-weight: 600; margin: 0; }

.plan-change-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.2rem; padding: 1rem 0; border-bottom: 1px solid rgba(108,60,240,.08); }
.plan-change-row:last-child { border-bottom: none; padding-bottom: 0; }
.plan-change-row form { flex-shrink: 0; }

.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.history-list li { display: flex; gap: 1rem; font-size: .9rem; padding-bottom: .7rem; border-bottom: 1px dashed rgba(108,60,240,.1); }
.history-list li:last-child { border-bottom: none; padding-bottom: 0; }
.history-list time { color: var(--muted); white-space: nowrap; font-size: .82rem; flex-shrink: 0; }

.thread { display: grid; gap: 1rem; }
.thread-msg { padding: .9rem 1.1rem; border-radius: 12px; background: rgba(108,60,240,.05); }
.thread-msg.thread-admin { background: rgba(15,122,88,.07); }
.thread-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }
.thread-msg p { margin: 0; white-space: pre-wrap; }

.checks-row { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-bottom: .6rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ===== Admin: 2FA recovery codes ===== */
.recovery-codes { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 0; }
.recovery-codes code { background: rgba(0,0,0,.06); padding: .3rem .6rem; border-radius: 6px; font-size: .95rem; letter-spacing: .02em; }

/* ===== Invoice document (invoice_render() in includes/invoices.php) - screen + print ===== */
.invoice-card { padding: clamp(.5rem, 2vw, 1.1rem); }
.invoice {
  position: relative; max-width: 820px; margin: 0 auto; padding: clamp(1.1rem, 3vw, 2.2rem); overflow: hidden;
  background: #fff; color: #1D1533; border: 1px solid #E6E0F2; border-radius: 16px; font-size: .92rem; line-height: 1.5;
}
.invoice p { margin: 0; }
.invoice-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.2rem 1.5rem; padding-bottom: 1.1rem; border-bottom: 3px solid var(--violet); }
.invoice-from { min-width: 0; flex: 1 1 260px; color: #4B4266; font-size: .85rem; }
.invoice .invoice-seller { margin-bottom: .2rem; font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; color: #1D1533; overflow-wrap: anywhere; }
.invoice-id { margin-left: auto; text-align: right; }
.invoice-title { margin: 0; font-family: var(--font-head); font-size: 1.45rem; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-d); }
.invoice .invoice-no { margin-top: .1rem; font-weight: 700; font-size: 1rem; }
.invoice-stamp {
  display: inline-block; margin-top: .6rem; padding: .22rem .8rem; border: 2px solid currentColor; border-radius: 8px;
  font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-4deg);
}
.invoice.is-paid .invoice-stamp { color: #0F7A58; }
.invoice.is-pending .invoice-stamp { color: #B26A00; }
.invoice.is-unpaid .invoice-stamp { color: #B32D48; }
.invoice.is-expired .invoice-stamp { color: #6A6084; }
.invoice-parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem 1.5rem; padding: 1.2rem 0; }
.invoice-billto { min-width: 0; color: #4B4266; font-size: .87rem; overflow-wrap: anywhere; }
.invoice-billto h3 { margin: 0 0 .35rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #6A6084; }
.invoice-billto strong { color: #1D1533; font-size: .98rem; }
.invoice-meta { display: grid; gap: .3rem; align-content: start; margin: 0; padding: .8rem 1rem; border-radius: 12px; background: #F7F4FD; }
.invoice-meta div { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.invoice-meta dt { color: #6A6084; white-space: nowrap; }
.invoice-meta dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.invoice-table-wrap { overflow-x: auto; }
.invoice-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.invoice-table th { padding: .55rem .7rem; text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--violet-d); }
.invoice-table th:first-child { border-radius: 8px 0 0 8px; }
.invoice-table th:last-child { border-radius: 0 8px 8px 0; }
.invoice-table td { padding: .8rem .7rem; border-bottom: 1px solid #ECE7F6; vertical-align: top; }
.invoice-table td small { display: block; margin-top: .2rem; color: #6A6084; font-size: .8rem; }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-table .col-no { width: 2.4rem; }
.invoice-table td.col-no { color: #6A6084; }
.invoice-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem 1.5rem; margin-top: 1rem; }
.invoice .invoice-words { flex: 1 1 220px; color: #6A6084; font-size: .82rem; }
.invoice-words strong { display: block; margin-top: .2rem; color: #1D1533; font-size: .9rem; }
.invoice-totals { flex: 0 1 300px; min-width: 230px; margin-left: auto; border-collapse: collapse; }
.invoice-totals th { padding: .3rem 0; text-align: left; font-weight: 500; color: #4B4266; }
.invoice-totals td { padding: .3rem 0 .3rem 1rem; text-align: right; white-space: nowrap; }
.invoice-totals .grand th, .invoice-totals .grand td { padding-top: .6rem; border-top: 2px solid #1D1533; color: #1D1533; font-size: 1.05rem; font-weight: 800; }
.invoice .invoice-note { margin-top: 1.2rem; padding: .7rem .9rem; border-radius: 10px; background: #FFF7E8; color: #6B4200; font-size: .84rem; }
.invoice.is-paid .invoice-note { background: #EEF8F3; color: #0B5D44; }
.invoice .invoice-foot { margin-top: .8rem; color: #6A6084; font-size: .78rem; text-align: center; }
@media (max-width: 600px) {
  .invoice-parties { grid-template-columns: minmax(0, 1fr); }
  .invoice-id { margin-left: 0; text-align: left; }
  .invoice-totals { min-width: 0; flex-basis: 100%; }
}

/* Status pills (invoice lists + the Status line inside a document) */
.bill-status, .invoice-badge { display: inline-block; padding: .16rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.bill-paid, .invoice.is-paid .invoice-badge { background: rgba(15, 122, 88, .13); color: #0F7A58; }
.bill-pending, .invoice.is-pending .invoice-badge { background: rgba(178, 106, 0, .14); color: #8A5200; }
.bill-unpaid, .invoice.is-unpaid .invoice-badge { background: rgba(179, 45, 72, .12); color: #9B1F39; }
.bill-expired, .invoice.is-expired .invoice-badge { background: rgba(106, 96, 132, .14); color: #4B4266; }
.billing-table td small { display: block; color: var(--muted); font-size: .78rem; }
.billing-table .row-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }

/* Admin > Users > one user: "Invoices & payments" */
.bill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.bill-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding-bottom: .55rem; border-bottom: 1px dashed var(--glass-line); }
.bill-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.bill-list a { display: grid; min-width: 0; color: var(--ink); text-decoration: none; }
.bill-list a:hover strong { color: var(--violet-d); text-decoration: underline; }
.bill-list a small { color: var(--muted); font-size: .78rem; }
.bill-amt { display: grid; justify-items: end; gap: .2rem; font-size: .9rem; font-weight: 700; white-space: nowrap; }

/* Printable page (?print=1): just the document on white, "Save as PDF" friendly */
body.invoice-print { background: #fff; padding: 2rem 1rem; }
.invoice-print .print-bar { max-width: 820px; margin: 0 auto 1rem; text-align: right; }
@media print {
  body.invoice-print { padding: 0; }
  .invoice-print .print-bar { display: none; }
  .invoice-print .invoice { max-width: none; padding: 0; border: 0; border-radius: 0; }
  .invoice, .invoice * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}

/* ===== Admin > Cron jobs (includes/cron.php) ===== */
.cron-health { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1.25rem; padding: 1rem 1.2rem; border-radius: 18px; border: 1px solid; font-size: .95rem; }
.cron-health strong { margin-right: .2rem; }
.cron-ok { background: #EEF8F3; border-color: rgba(15, 122, 88, .25); color: #0B5D44; }
.cron-late { background: #FFF1F1; border-color: rgba(179, 45, 72, .3); color: #8B1B33; }
.cron-never { background: #FFF6E5; border-color: rgba(178, 106, 0, .3); color: #6B4200; }
.cron-dot { flex: none; width: 12px; height: 12px; margin-top: .3rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(0, 0, 0, .05); }
.cron-ok .cron-dot { background: #22C55E; animation: cronPulse 2s ease-in-out infinite; }
@keyframes cronPulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, .18); } }
.cron-steps { margin: 0 0 .8rem; padding-left: 1.2rem; display: grid; gap: .3rem; color: var(--ink-2); }
.cron-copy { display: flex; align-items: center; gap: .6rem; padding: .55rem .55rem .55rem .9rem; border-radius: 12px; background: #1D1533; }
.cron-copy code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; color: #E8E2FF; font-size: .85rem; background: none; }
.cron-copy .btn { flex: none; }
.cron-sub { margin: 1.4rem 0 .3rem; font-size: 1.02rem; }
.cron-jobs { display: grid; gap: .7rem; }
.cron-job { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1.2rem; padding: .9rem 1rem; border: 1px solid var(--glass-line); border-radius: 16px; background: rgba(255, 255, 255, .6); }
.cron-job-main { flex: 1 1 340px; min-width: 0; }
.cron-job-main p { margin: .25rem 0 0; font-size: .87rem; color: var(--ink-2); }
.cron-job-side { display: grid; justify-items: end; gap: .4rem; flex: none; }
.cron-job-side small { color: var(--muted); font-size: .78rem; }
.cron-last { font-size: .82rem !important; }
.cron-summary { color: var(--muted); overflow-wrap: anywhere; }
.cron-status { display: inline-block; margin-right: .35rem; padding: .08rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.cron-st-ok { background: rgba(15, 122, 88, .13); color: #0F7A58; }
.cron-st-error, .cron-st-stuck { background: rgba(179, 45, 72, .12); color: #9B1F39; }
.cron-st-skipped { background: rgba(106, 96, 132, .14); color: #4B4266; }
.cron-st-running { background: rgba(108, 60, 240, .12); color: var(--violet-d); }
@media (max-width: 640px) { .cron-job-side { justify-items: start; } }

/* ===== Admin view of a customer account ("Open account", includes/impersonate.php) ===== */
.admin-view-bar {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 115; transform: translateX(-50%);
  display: flex; align-items: center; gap: .7rem; width: max-content; max-width: calc(100vw - 2rem);
  padding: .45rem .45rem .45rem .95rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; background: rgba(122, 64, 0, .94); box-shadow: 0 16px 36px -14px rgba(60, 30, 0, .7); font-size: .88rem;
}
.admin-view-bar svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-view-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-view-text small { opacity: .75; margin-left: .2rem; }
.admin-view-bar form { margin: 0; flex: none; }
.admin-view-bar button { padding: .45rem .9rem; border: 0; border-radius: 999px; background: #fff; color: #7A4000; font-weight: 700; font-size: .84rem; cursor: pointer; }
.admin-view-bar button:hover { background: #FFF3E0; }
.is-admin-view main { padding-bottom: 4.5rem; }
.is-admin-view .flash-stack { bottom: calc(5rem + env(safe-area-inset-bottom)); }
.is-admin-view .chat-widgets { display: none; }
@media (max-width: 520px) { .admin-view-text small { display: none; } }

/* ===== Live chat (user/chat.php, admin/chats.php - behaviour in assets/js/chat.js) ===== */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.page-chat .page-section { min-height: 0; }
.chat {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  height: clamp(440px, calc(100vh - 17rem), 760px);
  height: clamp(440px, calc(100dvh - 17rem), 760px);
  border-radius: 26px; overflow: hidden; margin-bottom: 1.25rem;
}
.chat-head { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--glass-line); background: rgba(255, 255, 255, .55); }
.chat-head-main { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); line-height: 1.35; }
.chat-head-main strong { font-family: var(--font-head); font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-main strong a { color: inherit; text-decoration: none; }
.chat-head-main strong a:hover { color: var(--violet-d); text-decoration: underline; }
.chat-head-main small { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.chat-back { display: none; place-items: center; flex: none; width: 36px; height: 36px; margin-left: -.35rem; border-radius: 50%; color: var(--violet-d); }
.chat-back:hover { background: var(--lilac-l); }
.chat-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.chat-avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-weight: 700; font-size: 1rem; color: var(--violet-d); background: var(--lilac-l);
}
.chat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-avatar .icon { width: 22px; height: 22px; }
.chat-avatar-team { color: #fff; background: linear-gradient(135deg, var(--violet-2), #5A2BE0); }
.chat-dot { position: absolute; right: -1px; bottom: -1px; z-index: 1; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }
.chat-dot:not(.is-on) { display: none; }

.chat-scroll { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.1rem .7rem; }
.chat-list { display: flex; flex-direction: column; gap: .4rem; margin-top: auto; }
.chat-older { align-self: center; flex: none; margin: 0 0 .6rem; padding: .35rem .9rem; border: 1px solid var(--glass-line); border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--violet-d); font-size: .82rem; font-weight: 700; cursor: pointer; }
.chat-older:hover { background: #fff; }
.chat-older:disabled { opacity: .6; cursor: progress; }
.chat-older[hidden] { display: none; }
.chat-day { display: flex; justify-content: center; margin: .7rem 0 .3rem; }
.chat-day span { padding: .2rem .75rem; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--violet-d); background: rgba(108, 60, 240, .09); }

.chat-msg { display: flex; }
.chat-msg.is-mine { justify-content: flex-end; }
.chat-bubble {
  min-width: 0; max-width: min(78%, 34rem); padding: .5rem .8rem .35rem; border-radius: 18px;
  background: #fff; border: 1px solid rgba(108, 60, 240, .12); box-shadow: 0 8px 18px -14px rgba(76, 34, 184, .5);
}
.is-theirs .chat-bubble { border-bottom-left-radius: 6px; }
.is-mine .chat-bubble { color: #fff; background: linear-gradient(135deg, var(--violet-2), #5A2BE0); border-color: transparent; border-bottom-right-radius: 6px; }
.chat-msg.is-new .chat-bubble { animation: chatIn .28s var(--ease) both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-who { display: block; margin-bottom: .1rem; font-size: .74rem; font-weight: 700; color: var(--violet-d); }
.is-mine .chat-who { color: rgba(255, 255, 255, .85); }
.chat-text { font-size: .96rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-meta { display: flex; justify-content: flex-end; align-items: center; gap: .25rem; margin-top: .1rem; font-size: .7rem; color: var(--muted); }
.is-mine .chat-meta { color: rgba(255, 255, 255, .8); }
.chat-tick { display: inline-flex; }
.chat-tick svg { display: block; width: 17px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-tick .chat-tick-2 { display: none; }
.chat-tick.is-seen { color: #A7F3D0; }
.chat-tick.is-seen .chat-tick-2 { display: inline; }

.chat-empty { margin: auto; padding: 1.5rem 1rem; max-width: 22rem; text-align: center; color: var(--ink-2); }
.chat-empty[hidden] { display: none; }
.chat-empty p { margin: 0; line-height: 1.5; }
.chat-empty-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: .8rem; border-radius: 50%; color: var(--violet-d); background: var(--lilac-l); }
.chat-empty-ico .icon { width: 26px; height: 26px; }
.chat-jump {
  position: sticky; bottom: .2rem; align-self: center; z-index: 2; flex: none; margin-top: .4rem;
  padding: .4rem .95rem; border: 0; border-radius: 999px; cursor: pointer;
  font-size: .82rem; font-weight: 700; color: #fff; background: rgba(29, 21, 51, .82);
  box-shadow: 0 10px 24px -10px rgba(20, 10, 50, .6);
}
.chat-jump[hidden] { display: none; }

.chat-compose { position: relative; padding: .75rem .9rem; border-top: 1px solid var(--glass-line); background: rgba(255, 255, 255, .62); }
.chat-compose-row { display: flex; align-items: flex-end; gap: .5rem; }
.chat-tool {
  position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 46px; padding: 0; border: 0; border-radius: 14px;
  color: var(--violet-d); background: transparent; cursor: pointer; transition: background-color .2s, color .2s;
}
.chat-tool:hover, .chat-tool:focus-within { background: var(--lilac-l); }
.chat-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.js .chat-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
html:not(.js) .chat-attach { width: auto; padding: 0 .4rem; }
html:not(.js) .chat-attach svg { display: none; }
html:not(.js) .chat-attach input { max-width: 190px; font-size: .8rem; }
.chat-preview { margin-bottom: .6rem; }
.chat-preview[hidden] { display: none; }
.chat-preview-item { display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; padding: .35rem .4rem .35rem .35rem; border: 1px solid var(--glass-line); border-radius: 14px; background: #fff; }
.chat-preview-thumb { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--lilac-l); }
.chat-preview-item.is-busy .chat-preview-thumb { animation: caPulse 1s ease-in-out infinite; }
.chat-preview-meta { font-size: .82rem; color: var(--ink-2); }
.chat-preview-x { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--ink-2); background: rgba(108, 60, 240, .08); cursor: pointer; }
.chat-preview-x:hover { color: var(--err); background: rgba(179, 45, 72, .1); }
.chat-preview-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.chat.is-drop::after {
  content: "Drop the image to attach it"; position: absolute; inset: 8px; z-index: 5; display: grid; place-items: center;
  border: 2px dashed var(--violet); border-radius: 22px; background: rgba(236, 228, 255, .88); color: var(--violet-d); font-weight: 700; pointer-events: none;
}
.chat-compose.is-sending .chat-preview-item { opacity: .6; }

/* Images inside messages */
.chat-msg.has-image .chat-bubble { padding: .3rem .3rem .3rem; }
.chat-msg.has-image .chat-text { padding: .3rem .5rem 0; }
.chat-msg.has-image .chat-meta { padding: 0 .45rem .1rem; }
.chat-msg.has-image .chat-who { padding: .15rem .5rem 0; }
.chat-img { display: block; width: fit-content; max-width: 100%; border-radius: 14px; overflow: hidden; background: rgba(108, 60, 240, .08); line-height: 0; }
.chat-img img { display: block; max-width: 100%; height: auto; }
.is-mine .chat-img { background: rgba(255, 255, 255, .18); }

/* Reply / delete buttons beside a message (hover on desktop, tap on phones) */
.chat-msg { align-items: center; gap: .3rem; transition: transform .15s ease-out; }
.chat-actions { display: flex; gap: .15rem; opacity: 0; pointer-events: none; transition: opacity .15s; }
.chat-msg.is-mine .chat-actions { order: -1; }
.chat-msg:hover .chat-actions, .chat-msg:focus-within .chat-actions, .chat-msg.is-active .chat-actions { opacity: 1; pointer-events: auto; }
.chat-act { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--ink-2); background: rgba(255, 255, 255, .9); box-shadow: 0 4px 12px -6px rgba(44, 20, 112, .45); cursor: pointer; }
.chat-act:hover { color: var(--violet-d); background: #fff; }
.chat-act-del:hover { color: var(--err); }
.chat-act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-msg.is-busy { opacity: .5; }
.chat-msg.is-flash .chat-bubble { animation: chatFlash 1.5s ease-out; }
@keyframes chatFlash { 0%, 30% { box-shadow: 0 0 0 4px rgba(108, 60, 240, .35); } 100% { box-shadow: 0 8px 18px -14px rgba(76, 34, 184, .5); } }
@media (pointer: coarse) { .chat-act { width: 36px; height: 36px; } }

/* Quoted message inside a reply */
.chat-quote {
  display: grid; gap: .05rem; margin: .1rem 0 .35rem; padding: .3rem .55rem; min-width: 0;
  border-left: 3px solid var(--violet); border-radius: 8px; background: rgba(108, 60, 240, .08); color: inherit; text-decoration: none; font-size: .8rem; line-height: 1.35;
}
.chat-quote:hover { background: rgba(108, 60, 240, .14); color: inherit; }
.chat-quote-who { font-weight: 700; color: var(--violet-d); }
.chat-quote-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; opacity: .85; }
.chat-quote.is-deleted .chat-quote-text { font-style: italic; }
.is-mine .chat-quote { border-left-color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .16); }
.is-mine .chat-quote:hover { background: rgba(255, 255, 255, .24); }
.is-mine .chat-quote-who { color: #fff; }
.chat-msg.has-image .chat-quote { margin: .2rem .2rem .35rem; }

/* Abuse filter: marker on a starred message, warning bar over a conversation, settings page */
.chat-filtered { display: inline-flex; align-items: center; gap: .15rem; margin-right: .15rem; font-weight: 700; color: #B26A00; }
.is-mine .chat-filtered { color: #FFE2A8; }
.chat-filtered svg { width: 11px; height: 11px; fill: currentColor; }
.chat-abuse-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding: .45rem 1.1rem; border-bottom: 1px solid rgba(178, 106, 0, .25); background: #FFF6E5; color: #6B4200; font-size: .84rem; }
.chat-abuse-bar .icon { width: 16px; height: 16px; vertical-align: -3px; }
.chat-page-tools { margin: -.8rem 0 1.1rem; }
.chat-page-tools .icon { width: 16px; height: 16px; }
.filter-levels { margin: 0 0 1rem; padding: 0; border: 0; display: grid; gap: .5rem; }
.radio-card { display: flex; align-items: flex-start; gap: .65rem; padding: .7rem .85rem; border: 1px solid var(--glass-line); border-radius: 14px; background: rgba(255, 255, 255, .7); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--violet); background: var(--lilac-l); }
.radio-card input { margin-top: .25rem; accent-color: var(--violet); }
.radio-card small { display: block; color: var(--muted); font-size: .82rem; }
.check-row { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 1.1rem; font-size: .92rem; cursor: pointer; }
.check-row input { margin-top: .2rem; accent-color: var(--violet); }
.filter-result { margin-top: 1rem; padding: .8rem 1rem; border-radius: 14px; background: rgba(15, 122, 88, .08); }
.filter-result.is-hit { background: #FFF6E5; }
.filter-result-text { margin: 0 0 .3rem; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }

/* "This message was deleted" */
.chat-deleted { display: inline-flex; align-items: center; gap: .35rem; font-style: italic; opacity: .75; }
.chat-deleted svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chat-msg.is-deleted .chat-bubble { background: rgba(255, 255, 255, .7); color: var(--muted); border: 1px dashed rgba(108, 60, 240, .25); box-shadow: none; }
.chat-msg.is-deleted .chat-meta { color: var(--muted); }

/* "Replying to ..." bar above the message box */
.chat-replying { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; padding: .4rem .45rem .4rem .7rem; border-left: 3px solid var(--violet); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px -10px rgba(44, 20, 112, .5); }
.chat-replying[hidden] { display: none; }
.chat-replying-body { flex: 1 1 auto; min-width: 0; display: grid; font-size: .82rem; line-height: 1.35; }
.chat-replying-who { font-weight: 700; color: var(--violet-d); }
.chat-replying-text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Full-size image viewer */
.chat-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; background: rgba(15, 9, 35, .88); }
.chat-lightbox[hidden] { display: none; }
.chat-lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); max-height: calc(100dvh - 7rem); border-radius: 12px; object-fit: contain; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.chat-lightbox-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.chat-lightbox-btn { padding: .55rem 1rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.chat-lightbox-btn:hover { color: #fff; background: rgba(255, 255, 255, .2); }
html.chat-viewing { overflow: hidden; }

/* Admin: smart replies */
.ca { border-top: 1px solid var(--glass-line); background: linear-gradient(180deg, rgba(236, 228, 255, .55), rgba(255, 255, 255, .5)); }
.ca[hidden] { display: none; }
.ca-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem .9rem .35rem; }
.ca-title { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 800; letter-spacing: .02em; color: var(--violet-d); text-transform: uppercase; }
.ca-title svg { width: 16px; height: 16px; fill: var(--violet); stroke: none; }
.ca.is-loading .ca-title svg { animation: caPulse 1s ease-in-out infinite; }
@keyframes caPulse { 50% { opacity: .35; transform: scale(.85); } }
.ca-tags { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1 1 auto; min-width: 0; }
.ca-tag { padding: .12rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--violet-d); background: rgba(108, 60, 240, .1); white-space: nowrap; }
.ca-mood-angry { color: #9B1F39; background: rgba(179, 45, 72, .12); }
.ca-mood-unhappy { color: #8A5200; background: rgba(154, 91, 0, .12); }
.ca-mood-happy { color: var(--ok); background: rgba(15, 122, 88, .12); }
.ca-urgent { color: #fff; background: #D9485F; }
.ca-wait { color: var(--ink-2); background: rgba(29, 21, 51, .07); }
.ca-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.ca-lang { display: inline-flex; padding: 2px; border-radius: 999px; background: rgba(108, 60, 240, .1); }
.ca-lang button { padding: .18rem .55rem; border: 0; border-radius: 999px; background: transparent; color: var(--violet-d); font-size: .72rem; font-weight: 700; cursor: pointer; }
.ca-lang button[aria-pressed="true"] { color: #fff; background: var(--violet); }
.ca-btn { padding: .2rem .6rem; border: 1px solid var(--glass-line); border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--violet-d); font-size: .74rem; font-weight: 700; cursor: pointer; }
.ca-btn:hover { background: #fff; }
.ca-x { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; }
.ca-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.ca.is-collapsed .ca-x svg { transform: rotate(180deg); }
.ca.is-collapsed .ca-list, .ca.is-collapsed .ca-details, .ca.is-collapsed .ca-tags, .ca.is-collapsed .ca-lang, .ca.is-collapsed [data-ca-details-btn] { display: none; }
.ca-list { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem .9rem .65rem; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.ca-sugg {
  flex: 0 0 auto; width: 250px; display: grid; gap: .25rem; padding: .5rem .65rem; text-align: left; scroll-snap-align: start;
  border: 1px solid rgba(108, 60, 240, .18); border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: 0 6px 16px -14px rgba(76, 34, 184, .6); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ca-sugg:hover, .ca-sugg:focus-visible { border-color: var(--violet); transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(76, 34, 184, .7); }
.ca-sugg.is-used { border-color: var(--ok); }
.ca-sugg-top { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.ca-src { flex: none; padding: .05rem .4rem; border-radius: 6px; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--violet-d); background: var(--lilac-l); }
.ca-learned .ca-src { color: #0B6B4D; background: rgba(15, 122, 88, .12); }
.ca-saved .ca-src { color: #8A5200; background: rgba(154, 91, 0, .12); }
.ca-label { flex: 1 1 auto; min-width: 0; font-size: .8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-key { flex: none; padding: 0 .3rem; border: 1px solid var(--glass-line); border-radius: 5px; font: 600 .62rem/1.5 var(--font-body); color: var(--muted); background: rgba(108, 60, 240, .04); }
.ca-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; line-height: 1.4; color: var(--ink-2); white-space: pre-line; }
.ca-empty { margin: 0; padding: .2rem 0 .2rem; font-size: .82rem; color: var(--muted); }
.ca-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .4rem 1.2rem; margin: 0 .9rem .5rem; padding: .6rem .75rem; border-radius: 12px; background: rgba(255, 255, 255, .75); font-size: .8rem; }
.ca-details[hidden] { display: none; }
.ca-sec strong { display: block; margin-bottom: .2rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ca-sec ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.ca-sec li { overflow-wrap: anywhere; }
.ca-ent-type { font-weight: 700; color: var(--violet-d); }

/* Admin: quick replies menu */
.qr-menu {
  position: absolute; left: .9rem; right: .9rem; bottom: calc(100% - .2rem); z-index: 6; max-height: 300px; display: flex; flex-direction: column;
  border: 1px solid rgba(108, 60, 240, .2); border-radius: 16px; background: #fff; box-shadow: 0 -10px 40px -16px rgba(44, 20, 112, .45); overflow: hidden;
}
.qr-menu[hidden] { display: none; }
.qr-head { padding: .5rem .8rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--glass-line); }
.qr-list { overflow-y: auto; padding: .3rem; }
.qr-item { position: relative; display: grid; gap: .1rem; padding: .45rem 2.2rem .45rem .6rem; border-radius: 10px; cursor: pointer; }
.qr-item strong { font-size: .86rem; }
.qr-item span { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-item[aria-selected="true"], .qr-item:hover { background: var(--lilac-l); }
.qr-del { position: absolute; top: 50%; right: .4rem; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; opacity: 0; }
.qr-item:hover .qr-del, .qr-item[aria-selected="true"] .qr-del, .qr-del:focus { opacity: 1; }
.qr-del:hover { color: var(--err); background: rgba(179, 45, 72, .1); }
.qr-del svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.qr-empty { margin: 0; padding: .7rem .6rem; font-size: .82rem; color: var(--muted); }
.qr-save { margin: 0; padding: .6rem .8rem; border: 0; border-top: 1px solid var(--glass-line); background: rgba(236, 228, 255, .5); color: var(--violet-d); font-size: .82rem; font-weight: 700; text-align: left; cursor: pointer; }
.qr-save:hover { background: var(--lilac-l); }
.qr-save:disabled { color: var(--muted); cursor: default; background: transparent; }
.chat-input {
  flex: 1 1 auto; min-width: 0; height: 46px; min-height: 46px; max-height: 160px; resize: none;
  padding: .7rem 1rem; font: inherit; font-size: 1rem; line-height: 1.4; color: var(--ink);
  background: #fff; border: 1px solid rgba(108, 60, 240, .24); border-radius: 22px;
  transition: border-color .2s, box-shadow .2s;
}
.chat-input::placeholder { color: #9A91B2; }
.chat-input:focus { outline: 2px solid transparent; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 60, 240, .16); }
.chat-send {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--violet-2), #5A2BE0);
  box-shadow: 0 10px 22px -10px rgba(90, 43, 224, .75); transition: transform .2s var(--ease), opacity .2s;
}
.chat-send:hover { transform: translateY(-1px); }
.chat-send:disabled { opacity: .55; cursor: progress; transform: none; }
.chat-send svg { width: 20px; height: 20px; margin-left: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-closed { margin: 0; padding: 1rem 1.2rem; border-top: 1px solid var(--glass-line); text-align: center; font-size: .9rem; color: var(--muted); }

/* Phones, while typing: the chat fills exactly the visible space above the keyboard
   (--chat-top / --chat-h come from window.visualViewport in assets/js/chat.js). */
html.chat-typing .chat[data-chat] {
  position: fixed; left: 0; right: 0; top: var(--chat-top, 0); z-index: 110;
  height: var(--chat-h, 100vh); min-height: 0; max-height: none; margin: 0;
  border-radius: 0; border-left: 0; border-right: 0; background: var(--bg);
}
html.chat-typing main { z-index: 111; }   /* main is its own layer: lift it so the footer / header cannot show through */
html.chat-typing .chat-head { padding-top: max(.6rem, env(safe-area-inset-top)); padding-bottom: .6rem; }
html.chat-typing .chat-compose { padding-top: .5rem; padding-bottom: .5rem; }
html.chat-typing .ca-tags, html.chat-typing .ca-details { display: none; }   /* admin: keep just the suggestion cards */

/* Admin: conversation list + open conversation side by side (taller: it also holds the smart replies) */
.chat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.chat-layout .chat { margin-bottom: 0; }
.chat-layout .chat, .chat-inbox {
  height: clamp(520px, calc(100vh - 14rem), 880px);
  height: clamp(520px, calc(100dvh - 14rem), 880px);
}
.chat-inbox { display: flex; flex-direction: column; min-width: 0; border-radius: 26px; overflow: hidden; }
.chat-inbox-search { padding: .85rem; border-bottom: 1px solid var(--glass-line); }
.chat-threads { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .45rem; }
.chat-thread { display: flex; align-items: center; gap: .7rem; padding: .6rem .65rem; border-radius: 16px; color: var(--ink); text-decoration: none; }
.chat-thread:hover { background: rgba(108, 60, 240, .06); color: var(--ink); }
.chat-thread.is-on { background: var(--lilac-l); }
.chat-thread-main { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.chat-thread-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; min-width: 0; }
.chat-thread-top strong { min-width: 0; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-top time { flex: none; font-size: .72rem; color: var(--muted); }
.chat-thread-last { font-size: .83rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread.has-unread .chat-thread-last { color: var(--ink); font-weight: 600; }
.chat-thread.has-unread time { color: var(--violet-d); font-weight: 700; }
.chat-thread .count { flex: none; background: var(--violet); color: #fff; }
.chat-threads-empty { margin: 0; padding: 1.5rem 1rem; text-align: center; font-size: .9rem; color: var(--muted); }
.chat-start { padding: .85rem; border-top: 1px solid var(--glass-line); background: rgba(255, 255, 255, .45); }
.chat-start label { display: block; margin-bottom: .35rem; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.chat-start-row { display: flex; gap: .5rem; }
.chat-start-row .input { flex: 1 1 auto; min-width: 0; }

/* ---------- SMM panel link (Admin > Rentals) ---------- */
.link-conn { margin: 0 0 .8rem; padding: .65rem .85rem; border-radius: 12px; font-size: .92rem; font-weight: 600; border: 1px solid transparent; }
.link-conn::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .5rem; vertical-align: .05rem; background: currentColor; }
.link-conn-ok { background: rgba(15, 122, 88, .09); border-color: rgba(15, 122, 88, .25); color: var(--ok, #0F7A58); }
.link-conn-warn { background: rgba(154, 91, 0, .09); border-color: rgba(154, 91, 0, .28); color: #7A4700; }
.link-conn-off { background: rgba(106, 96, 132, .1); border-color: rgba(106, 96, 132, .22); color: #4B4266; }
.link-key { font-size: .85rem; padding: .1rem .4rem; border-radius: 6px; background: rgba(108, 60, 240, .08); }
.link-help { margin-top: 1rem; font-size: .92rem; }
.link-help summary { cursor: pointer; font-weight: 600; color: var(--violet-d, #4B22C9); }
.link-help ol { margin: .6rem 0 .4rem 1.2rem; display: grid; gap: .35rem; }
.link-tag::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; margin-right: .35rem; background: currentColor; }
.link-tag.is-open { color: var(--ok, #0F7A58) !important; }
.link-tag.is-closed { color: #9B1F39 !important; }
.link-tag.is-stale { color: #8A5200 !important; }

@media (max-width: 900px) {
  .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-layout.has-open .chat-inbox { display: none; }
  .chat-layout:not(.has-open) .chat-pane { display: none; }
  .chat-back { display: grid; }
}
@media (max-width: 640px) {
  .chat, .chat-inbox { border-radius: 20px; height: clamp(420px, calc(100vh - 14rem), 760px); height: clamp(420px, calc(100dvh - 14rem), 760px); }
  .chat-head { padding: .7rem .8rem; gap: .65rem; }
  .chat-scroll { padding: .8rem .7rem .6rem; }
  .chat-bubble { max-width: 86%; }
  .chat-compose { padding: .6rem; }
  .chat-head-actions .btn { padding: .45rem .8rem; min-height: 36px; }
  .chat-head-actions .chat-profile-btn { display: none; }   /* the name links to the profile instead */
  .chat-layout .chat, .chat-layout .chat-inbox { height: clamp(500px, calc(100vh - 11rem), 880px); height: clamp(500px, calc(100dvh - 11rem), 880px); }
  .chat-tool { width: 36px; }
  /* Smart replies: title + buttons on one line, mood tags as one scrollable line, smaller cards */
  .ca-head { flex-wrap: wrap; padding: .45rem .7rem .3rem; }
  .ca-tags { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ca-tags::-webkit-scrollbar { display: none; }
  .ca-list { padding: .1rem .7rem .55rem; }
  .ca-sugg { width: 220px; }
  .ca-text { -webkit-line-clamp: 2; }
  .ca-details { margin: 0 .7rem .45rem; }
}

/* =====================================================================
   PHONE / TABLET / PC PASS
   - PC (1200px and wider): the panel menu is a fixed sidebar on the left, always open
   - Tables keep one line per cell and swipe sideways whenever their box gets narrow
   - Long emails, links and domains wrap instead of pushing the page sideways
   - Smoother scrolling: no live blur behind cards where it costs the most
   ===================================================================== */

/* Long words (emails, URLs, domains) wrap instead of widening the page */
body { overflow-wrap: break-word; }
.page-head p, .thread-msg, .alert, .user-hero p, .kv-list dd, .card-block p, .card-block li, .hint { overflow-wrap: anywhere; }
.row-head > div, .row-head > :not(.btn-row):not(.btn) { min-width: 0; }
.status, .pill, .bill-status { white-space: nowrap; }

/* Button cells (My orders, Renewals, Invoices, Finance): a flex <td> drops out of the table row, so its
   border and height no longer line up with the other cells. Keep it a real cell, buttons side by side. */
.data:not(.stack) td.row-actions { display: table-cell; white-space: nowrap; }
.data:not(.stack) td.row-actions > * { display: inline-flex; vertical-align: middle; }
.data:not(.stack) td.row-actions > * + * { margin-left: .4rem; }
/* My orders: Renew now / Add funds above View details, in one narrow column */
.cell-actions { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; }
.cell-actions form { margin: 0; }
.cell-actions .btn { width: 100%; }
.cell-actions .btn-glass { background: #fff; border-color: rgba(108, 60, 240, .3); }
.cell-actions .btn-glass:hover { border-color: var(--violet); }
.data.responsive.stack .cell-actions { flex-direction: row; flex-wrap: wrap; }
.data.responsive.stack .cell-actions > * { flex: 1 1 88px; }

/* Small labels a little easier to read */
.wallet-chip-label { font-size: .7rem; }
.page-rent .choice-flag { font-size: .72rem; }

/* iPhone zooms the whole page when a field under 16px gets focus */
@media (pointer: coarse) {
  .input-sm { font-size: 1rem; }
}

/* Touch screens: no hover lift that stays "stuck" after a tap - a quick press instead */
button, .btn, .choice, .drawer-link, .filter, .hamburger, .nav-toggle, .wallet-chip, .chat-fab, summary { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .btn:hover, .chat-fab:hover, .chat-fab:focus-visible { transform: none; }
  .btn:active { transform: scale(.97); transition-duration: .08s; }
  .drawer-link:active, .filter:active { transform: scale(.98); }
}

/* Tables: when the box they sit in is narrow (tablet, small laptop + sidebar), every cell stays on one
   line and the table swipes sideways - no more names split word by word or emails letter by letter.
   position: relative keeps hidden checkboxes (auto-renew switch) inside the scroll box, so they
   cannot widen the page. Phones keep the rules in the RESPONSIVE section. */
.table-wrap { position: relative; container-type: inline-size; }
.switch { position: relative; }
@container (max-width: 760px) {
  .data.responsive:not(.stack) { min-width: max-content; width: 100%; }
  .data.responsive:not(.stack) td { white-space: nowrap; }
  .data.responsive:not(.stack) td small { white-space: normal; max-width: 30ch; overflow-wrap: anywhere; }
  .data.responsive:not(.stack) small.note { white-space: normal; min-width: 16ch; max-width: 26ch; }
  .data.responsive:not(.stack) .row-form { flex-wrap: nowrap; }
  .data.responsive:not(.stack) .row-form .input { flex: 1 1 120px; min-width: 120px; }
}
/* Mid-size boxes (laptop + sidebar, tablet landscape): a little less air so more columns fit */
@container (min-width: 761px) and (max-width: 1040px) {
  .data th { padding: .65rem .6rem; }
  .data td { padding: .75rem .6rem; }
}
/* A table with more columns off to the side fades out at that edge (main.js sets the classes),
   so it is clear it can be swiped / scrolled. Phones have their own edge shadows (RESPONSIVE). */
@media (min-width: 761px) {
  .table-wrap.has-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
  .table-wrap.has-more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
  .table-wrap.has-more-left.has-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
}

/* Smoother scrolling. A live blur behind every card is redrawn on each frame while you scroll, and
   the slowly drifting background glow forces that redraw even when nothing moves. The glow is a
   soft gradient, so cards look the same without the blur: drop it on phones and tablets and in
   the signed-in panels, and keep the glow still there. (The top bar keeps its blur.) */
@media (max-width: 960px), (pointer: coarse) {
  .orb { animation: none; }
  .glass:not(.nav), .btn-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.panel-app .orb { animation: none; }
.panel-app .glass:not(.nav), .panel-app .btn-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* PC: the panel menu becomes a fixed sidebar (user panel + admin). Below 1200px it stays the
   slide-out menu behind the round menu button. */
@media (min-width: 1200px) {
  .panel-app { --side-w: 264px; }
  .panel-app .drawer {
    left: 0; right: auto; z-index: 60; width: var(--side-w);
    padding: max(1.1rem, env(safe-area-inset-top)) .85rem max(1rem, env(safe-area-inset-bottom));
    gap: .8rem; border-left: 0; border-right: 1px solid var(--glass-line); border-radius: 0;
    background: linear-gradient(180deg, rgba(236, 228, 255, .95), rgba(255, 255, 255, .97) 240px);
    box-shadow: 16px 0 40px -34px rgba(44, 20, 112, .5);
    transform: none; visibility: visible; transition: none;
    scrollbar-width: thin; scrollbar-color: rgba(108, 60, 240, .25) transparent;
  }
  .panel-app .drawer-x, .panel-app .drawer-backdrop, .panel-app .hamburger { display: none; }
  .panel-app .drawer-nav ul { gap: .15rem; }
  .panel-app .drawer-link { min-height: 42px; padding: .5rem .85rem; font-size: .94rem; border-radius: 14px; }
  .panel-app .drawer-link .icon { width: 19px; height: 19px; }
  .panel-app .drawer-foot { padding-top: .7rem; gap: .15rem; }
  .panel-app .panel-user { display: none; }   /* the name + email are at the top of the sidebar */
  .panel-app .site-header { left: var(--side-w); }
  .panel-app main, .panel-app .site-footer, .panel-app .verify-banner { margin-left: var(--side-w); }
  .panel-app .flash-stack { left: var(--side-w); }
  .panel-app .chat-fab-left { left: calc(var(--side-w) + 1.25rem); }
  .panel-app .admin-view-bar { left: calc(50% + var(--side-w) / 2); max-width: calc(100vw - var(--side-w) - 2rem); }
  html.drawer-open .panel-app { overflow: visible; }
}
@media (min-width: 1500px) {
  .panel-app .container { max-width: 1320px; }
}

/* =====================================================================
   POP-UP MESSAGES - errors, notices and warnings all show as pop-ups (main.js turns the
   message boxes pages print into pop-ups; boxes marked data-inline stay in the page)
   ===================================================================== */
.flash { max-width: min(30rem, 100%); align-items: flex-start; }
.flash::before { margin-top: .08rem; }
.flash-warn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23FBBF24'/%3E%3Cpath d='M12 6.8v6.2M12 17.1v.05' fill='none' stroke='%234A2A00' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.flash-error { border-color: rgba(251, 113, 133, .38); }
.flash-warn { border-color: rgba(251, 191, 36, .38); }
.flash-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.flash-body p { margin: .35rem 0 0; }
.flash-body p:first-child { margin-top: 0; }
.flash-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.flash-body li + li { padding-top: .3rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.flash-body a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.flash-body a:hover { color: #E6DCFF; }
.flash-body strong { color: #fff; }
.flash-body small { display: block; margin-top: .2rem; font-size: .82rem; opacity: .8; }
.flash-body code { padding: .05rem .35rem; border-radius: 5px; background: rgba(255, 255, 255, .14); color: #fff; font-size: .82em; }
.flash.is-sticky { padding-right: .5rem; }
.flash-x {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -.15rem 0 -.15rem .15rem;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
}
.flash-x:hover { background: rgba(255, 255, 255, .24); }
.flash-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.alert.is-toasted { display: none; }
/* Phones: full width, above the round chat button */
@media (max-width: 640px) {
  .flash-stack { bottom: calc(5.3rem + env(safe-area-inset-bottom)); padding: 0 .75rem; }
  .flash { width: 100%; }
}
