/* ==========================================================================
   xplaypulse — WHMCS theme stylesheet (child theme of Nexus)
   Author: Shahid Malla · https://shahidmalla.com
   --------------------------------------------------------------------------
   1  Tokens            7  Marketing sections
   2  Base              8  Screen mockups (TV / phone / EPG)
   3  Layout            9  Auth pages
   4  Components        10 Checkout
   5  Forms             11 Client area
   6  Header / Footer   12 Utilities · Motion · Responsive
                        13 WHMCS / Bootstrap bridge
   ========================================================================== */

/* 1 · Tokens ------------------------------------------------------------- */
:root {
  --accent: #d7f86a;
  --accent-ink: #0b0b0b;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --accent-text: var(--accent);
  --accent-pale: color-mix(in srgb, var(--accent) 78%, #fff);

  --bg: #060606;
  --bg-2: #0d0d0d;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --surface-3: #252525;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f4f1;
  --text-2: #b6b6b1;
  --muted: #7f7f7a;
  --logo-text: #f7fff0;
  --logo-accent: #c8ff3d;

  --danger: #ff6b6b;
  --warning: #f7c04a;
  --info: #7cc4ff;
  --star: #f5d142;

  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 60%);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --pill: 999px;

  --f-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --container: 1200px;
  --header-h: 72px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f5f1;
  --bg-2: #eeeee9;
  --surface: #ffffff;
  --surface-2: #f7f7f3;
  --surface-3: #ebebe5;
  --line: rgba(12, 12, 10, .08);
  --line-2: rgba(12, 12, 10, .15);
  --text: #111110;
  --text-2: #4b4b47;
  --muted: #7b7b75;
  --logo-text: #101313;
  --logo-accent: #5c8c00; /* the logo's lime is unreadable on white; same hue, darker */
  --accent-text: color-mix(in srgb, var(--accent) 30%, #1d2300);
  --card-grad: none;
  --shadow: 0 24px 50px -28px rgba(0, 0, 0, .25);
  color-scheme: light;
}

/* 2 · Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
p { margin: 0 0 1em; color: var(--text-2); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; height: 1px; background: var(--line); margin: 24px 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }
.ic-lg { width: 26px; height: 26px; }
.ic-xl { width: 34px; height: 34px; }

/* 3 · Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-sm { max-width: 820px; }
.section { position: relative; padding: 104px 0; }
.section-sm { padding: 64px 0; }
.section-head { max-width: 660px; margin: 0 auto 52px; text-align: center; }
.section-head p { max-width: 520px; margin-inline: auto; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head.left p { margin-left: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  margin-bottom: 14px;
}
.eyebrow .ic { width: 15px; height: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.clip { position: relative; overflow: hidden; isolation: isolate; }

.bg-glow {
  position: absolute; z-index: -1; pointer-events: none;
  width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 42%, transparent), transparent 72%);
  opacity: .5; filter: blur(10px);
}
.bg-glow.tr { top: -120px; right: -400px; }
.bg-glow.tl { top: -120px; left: -400px; }
.bg-glow.bl { bottom: -120px; left: -400px; }
.bg-glow.br { bottom: -120px; right: -400px; }
.bg-glow.bc { bottom: -300px; left: 50%; transform: translateX(-50%); width: 1100px; }
.bg-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
  opacity: .55;
}

/* 4 · Components --------------------------------------------------------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px;
  border-radius: var(--pill); border: 1px solid transparent; background: none;
  font: 500 14px/1 var(--f-body); white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-pale); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-pale { background: var(--accent-pale); color: var(--accent-ink); }
.btn-pale:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-dark { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-dark:hover { background: var(--surface-3); }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn.is-disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin .7s linear infinite;
}
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link-accent { color: var(--accent-text); font-weight: 500; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.link-arrow .ic { width: 15px; height: 15px; transition: transform .2s; }
.link-arrow:hover .ic { transform: translate(2px, -2px); }

.card {
  background: var(--surface); background-image: var(--card-grad);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; position: relative;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h3, .card-head h2 { margin: 0; font-size: 17px; }
.card-pad-0 { padding: 0; overflow: hidden; }

.icon-box {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.icon-box .ic { width: 20px; height: 20px; }
.icon-box.neutral { background: var(--surface-3); color: var(--text); border-color: var(--line); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--pill);
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success, .badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }
.badge-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.badge-solid { background: var(--accent); color: var(--accent-ink); }
[data-theme="light"] .badge-warning { color: #9a6a00; }
[data-theme="light"] .badge-info { color: #1f6fb0; }

.pill-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; margin-bottom: 26px;
  border: 1px solid var(--line-2); border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font-size: 13px; color: var(--text-2);
  backdrop-filter: blur(8px);
}
.pill-tag b { background: var(--accent); color: var(--accent-ink); border-radius: var(--pill); padding: 3px 10px; font-size: 12px; font-weight: 600; }

.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.check-list .ic { color: var(--accent-text); margin-top: 3px; width: 16px; height: 16px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #13a37a));
  color: var(--accent-ink);
}
.avatar.alt-1 { background: linear-gradient(135deg, #8ec5fc, #e0c3fc); }
.avatar.alt-2 { background: linear-gradient(135deg, #fbc2a4, #f68084); }
.avatar.alt-3 { background: linear-gradient(135deg, #a1ffce, #3fb6a8); }
.avatar.alt-4 { background: linear-gradient(135deg, #fddb92, #d1fdff); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 34px; height: 34px; border: 2px solid var(--surface); margin-left: -9px; font-size: 10px; letter-spacing: -.02em; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Accordion */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.acc { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: border-color .2s; }
.acc.is-open { border-color: var(--line-2); background: var(--surface-2); }
.acc-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; background: none; border: 0; text-align: left;
  font-size: 15px; font-weight: 500; color: var(--text);
}
.acc-btn .ic { transition: transform .25s; color: var(--text-2); }
.acc.is-open .acc-btn .ic { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.acc.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 20px 20px; margin: 0; font-size: 14.5px; }

/* Tabs */
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; max-width: 100%;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 38px; padding: 0 16px; border-radius: 10px; border: 0; background: none;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--surface-3); color: var(--text); }
.tab .ic { width: 16px; height: 16px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp .3s ease; }

/* Segmented pills (billing cycle etc.) */
.segment {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface);
}
.segment button {
  height: 38px; padding: 0 16px; border: 0; background: none; border-radius: var(--pill);
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.segment button:hover { color: var(--text); }
.segment button.is-active { background: var(--accent); color: var(--accent-ink); }
.segment .save { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-text); }
.segment button.is-active .save { background: rgba(0, 0, 0, .12); color: var(--accent-ink); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted);
  padding: 14px 20px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table td strong { color: var(--text); font-weight: 500; }
.table .t-right { text-align: right; }
.table-row-link { cursor: pointer; }

/* Toast */
.xp-toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.xp-toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-size: 14px; color: var(--text); animation: fadeUp .25s ease;
}
.xp-toast .ic { color: var(--accent-text); }

/* Alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.alert .ic { margin-top: 2px; }
.alert strong { color: var(--text); font-weight: 500; }
.alert-warning { border-color: color-mix(in srgb, var(--warning) 30%, transparent); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.alert-warning > .ic { color: var(--warning); }
.alert-accent { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.alert-accent > .ic { color: var(--accent-text); }
.alert-danger { border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.alert-danger > .ic { color: var(--danger); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon-box { margin: 0 auto 14px; }

/* 5 · Forms -------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.label { font-size: 13px; font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--text); font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--text) 22%, transparent); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.textarea { height: auto; min-height: 150px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.select option { background: var(--surface); color: var(--text); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap.has-lead .input { padding-left: 42px; }
.input-lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-action {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 9px; border: 0; background: none;
  display: grid; place-items: center; color: var(--muted);
}
.input-action:hover { color: var(--text); background: var(--surface-3); }
.input-tail { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; pointer-events: none; }
.field-msg { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.field-msg:empty { display: none; }
.field-msg .ic { width: 14px; height: 14px; }
.field.is-valid .input, .field.is-valid .select { border-color: var(--accent-line); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: color-mix(in srgb, var(--danger) 65%, transparent); }
.field.is-invalid .input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.field.is-invalid .field-msg { color: var(--danger); }
.field.is-valid .field-msg { color: var(--accent-text); }
.field-ok { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--accent-text); opacity: 0; transition: opacity .2s; pointer-events: none; }
.field.is-valid .field-ok { opacity: 1; }
.input-wrap .field-ok + .input-action, .input-wrap .input-action ~ .field-ok { right: 46px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 2px 0 0;
  width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2);
  display: grid; place-content: center; cursor: pointer; transition: .15s;
}
.check input::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--accent-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.switch { position: relative; display: inline-flex; flex: none; }
.switch input {
  appearance: none; -webkit-appearance: none; margin: 0;
  width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2);
  cursor: pointer; transition: background .2s, border-color .2s; position: relative;
}
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-2); transition: transform .2s, background .2s;
}
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(18px); background: var(--accent-ink); }

.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.pw-meter span { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: color-mix(in srgb, var(--accent) 70%, var(--warning)); }
.pw-meter[data-score="4"] span { background: var(--accent); }
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 5px; transition: color .2s; }
.pw-rules li .ic { width: 13px; height: 13px; }
.pw-rules li.ok { color: var(--accent-text); }

.option-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--bg-2); cursor: pointer; transition: border-color .2s, background .2s;
}
.option-card:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; transition: .2s; }
.option-card.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg-2)); }
.option-card.is-selected .radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg-2); }
.option-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r);
  font-size: 14px; color: var(--muted); cursor: pointer; transition: .2s; text-align: center;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-line); color: var(--text-2); background: var(--accent-soft); }
.file-list { display: grid; gap: 6px; margin-top: 10px; }
.file-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }

/* 6 · Header / Footer ---------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
/* Wordmark as in the brand lockup (img/logo.svg): bold, tight, "pulse" in lime */
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 21px/1 'DejaVu Sans', Arial, sans-serif; letter-spacing: -.05em; color: var(--logo-text); flex: none; }
.logo-mark { display: block; width: 36px; height: 36px; flex: none; }
.logo em { font-style: normal; font-weight: 700; color: var(--logo-accent); }
.site-header .nav {
  display: flex; gap: 2px; padding: 5px;
  border: 1px solid var(--line); border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  backdrop-filter: blur(10px);
}
.site-header .nav a { padding: 8px 16px; border-radius: var(--pill); font-size: 14px; font-weight: 500; color: var(--text-2); transition: color .2s, background .2s; }
.site-header .nav a:hover { color: var(--text); }
.site-header .nav a.is-active { background: var(--surface-3); color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column; padding: 16px 20px 28px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; height: 40px; margin-bottom: 28px; }
.mobile-menu nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  font: 400 26px var(--f-display); letter-spacing: -.02em;
}
.mobile-menu nav a .ic { color: var(--muted); width: 20px; height: 20px; }
.mobile-menu nav a.is-active { color: var(--accent-text); }
.mobile-menu-foot { margin-top: auto; display: grid; gap: 10px; }

.site-footer { position: relative; overflow: hidden; isolation: isolate; padding-top: 72px; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand p { max-width: 300px; font-size: 14px; margin: 16px 0 22px; }
.footer-col h4 { font: 500 13px/1 var(--f-body); color: var(--muted); margin-bottom: 18px; }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; color: var(--text-2); transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.social .ic { width: 16px; height: 16px; }
.social:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 56px; padding: 22px 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--text); }
.footer-word {
  font: 600 clamp(3.2rem, 13.5vw, 11rem)/.78 var(--f-display); letter-spacing: -.055em;
  text-align: center; white-space: nowrap; user-select: none; margin-bottom: -.06em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 13%, transparent), transparent 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.powered { display: inline-flex; align-items: center; gap: 8px; }
.powered .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.credit { color: inherit; transition: color .2s; }
.credit:hover { color: var(--text); }

/* Minimal header/footer (checkout + standalone pages) */
.mini-header { height: 68px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.mini-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.secure-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.secure-tag .ic { color: var(--accent-text); width: 16px; height: 16px; }
.mini-footer { border-top: 1px solid var(--line); padding: 20px 0; font-size: 13px; color: var(--muted); }
.mini-footer .container { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.mini-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.mini-footer a:hover { color: var(--text); }

/* 7 · Marketing sections ------------------------------------------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 64px 0 0; text-align: center; }
.hero h1 { max-width: 920px; margin: 0 auto 22px; }
.hero h1 em, .page-hero h1 em, h2 em { font-style: normal; color: var(--accent-text); }
.hero-sub { max-width: 620px; margin: 0 auto 34px; font-size: 17px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Homepage hero: a TV on a living-room wall. The wall tints and light bands
   mix --text into --bg, so they read as soft light in dark mode and as soft
   shadow in light mode. */
.hero-room {
  text-align: left; padding: 56px 0 0;
  background:
    linear-gradient(116deg, transparent 22%, color-mix(in srgb, var(--text) 6%, transparent) 30%, transparent 38%, transparent 47%, color-mix(in srgb, var(--text) 4.5%, transparent) 53%, transparent 59%),
    radial-gradient(ellipse 55% 65% at 72% 36%, color-mix(in srgb, var(--text) 7%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--text) 7%, var(--bg)), color-mix(in srgb, var(--text) 4%, var(--bg)));
}
.hero-room::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero-room h1 { font-size: clamp(2.2rem, 3.6vw, 3.1rem); max-width: none; margin: 20px 0 18px; }
.hero-room .hero-sub { max-width: 460px; margin: 0 0 30px; }
.hero-room .hero-ctas { justify-content: flex-start; }

.room { position: relative; padding-top: 12px; }
/* Light from the screen spilling onto the wall */
.room::before {
  content: ""; position: absolute; z-index: -1; left: -2%; right: -2%; top: -8%; height: 86%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 175, 185, .3), transparent); filter: blur(28px);
}
.room-tv {
  position: relative; padding: 5px; border-radius: 7px; background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 16px 34px 50px -18px rgba(0, 0, 0, .7), 0 60px 90px -40px rgba(0, 0, 0, .55);
}
.room-tv .tv-screen { border-radius: 3px; }
/* Low stone console under the TV */
.room-console {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 84px; margin: 52px -5% 0; padding-top: 9px; border-radius: 5px 5px 0 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--text) 30%, var(--bg)) 0 9px, transparent 9px),
    linear-gradient(162deg, transparent 30%, color-mix(in srgb, var(--text) 6%, transparent) 31%, transparent 33%, transparent 64%, color-mix(in srgb, var(--text) 5%, transparent) 65%, transparent 67%),
    linear-gradient(180deg, color-mix(in srgb, var(--text) 20%, var(--bg)), color-mix(in srgb, var(--text) 12%, var(--bg)));
  box-shadow: 0 -14px 34px -20px rgba(0, 0, 0, .6);
}
.room-console i { border-left: 1px solid color-mix(in srgb, var(--bg) 55%, transparent); box-shadow: inset 0 6px 8px -6px rgba(0, 0, 0, .45); }
.room-console i:first-child { border-left: 0; }

.platform-strip { padding: 44px 0 0; text-align: center; }
.platform-strip p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; font: 500 16px var(--f-display); color: var(--text-2); letter-spacing: -.01em; }
.platforms span { display: inline-flex; align-items: center; gap: 8px; opacity: .8; }
.platforms .ic { width: 18px; height: 18px; color: var(--muted); }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.stats-band > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.stats-band > div:first-child { border-left: 0; }
.stats-band strong { display: block; font: 400 34px/1.1 var(--f-display); letter-spacing: -.03em; color: var(--text); }
.stats-band span { font-size: 13.5px; color: var(--muted); }

.feature-card { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.feature-card h3 { margin: 6px 0 0; }
.feature-card p { margin: 0; font-size: 14.5px; }

.device-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.device-card { display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s; }
.device-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.device-card h3 { margin: 4px 0 0; }
.device-card p { font-size: 14px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg-2); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
button.chip { cursor: pointer; transition: .2s; }
button.chip:hover { color: var(--text); border-color: var(--line-2); }
button.chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step-num { font: 300 48px/1 var(--f-display); color: var(--accent-text); letter-spacing: -.04em; margin-bottom: 10px; }
.step h3 { margin: 0; }
.step p { margin: 0; font-size: 14.5px; }

/* Pricing. Any number of plan cards, centred; "is-N" = N cards (homepage and store page).
   1 to 3 cards: one row. 4: one row on wide screens, 2 × 2 below 1100px.
   5 or more: three per row, the last row centred. Phones: one per row. */
.pricing-grid { --pg-cols: 3; display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 16px; max-width: 1040px; margin: 0 auto; }
.pricing-grid > * { flex: 0 1 calc((100% - (var(--pg-cols) - 1) * 16px) / var(--pg-cols)); min-width: 0; }
.pricing-grid.is-1 { --pg-cols: 1; max-width: 380px; }
.pricing-grid.is-2 { --pg-cols: 2; max-width: 740px; }
.pricing-grid.is-4 { --pg-cols: 4; max-width: 1240px; }
@media (max-width: 1100px) {
  .pricing-grid.is-4 { --pg-cols: 2; max-width: 740px; }
}
/* Four narrow cards: names may take two lines, so keep the prices level */
@media (min-width: 1101px) {
  .pricing-grid.is-4 .price-name { min-height: 2.6em; align-items: flex-start; }
}
.price-card {
  display: flex; flex-direction: column; padding: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface);
  transition: transform .25s, border-color .25s;
}
.price-card:hover { transform: translateY(-4px); }
.price-card.is-popular { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), 0 40px 90px -50px color-mix(in srgb, var(--accent) 80%, transparent); }
.price-top { padding: 20px 18px 18px; }
.price-name { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 500 18px var(--f-display); }
.price-name small { font: 400 15px var(--f-display); color: var(--muted); }
.price-desc { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.price { font: 500 42px/1 var(--f-display); letter-spacing: -.035em; margin: 26px 0 8px; display: flex; align-items: baseline; gap: 2px; }
.price small { font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price .was { font-size: 16px; color: var(--muted); text-decoration: line-through; font-weight: 400; margin-left: 8px; letter-spacing: 0; }
.price-note { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; min-height: 19px; }
.price-sub { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.price-sub:hover { color: var(--text); }
.price-features { flex: 1; padding: 18px; border: 1px solid var(--line); border-radius: calc(var(--r-lg) - 6px); background: var(--bg-2); display: grid; gap: 10px; align-content: start; }
.price-features li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-2); }
.price-features .ic { color: var(--accent-text); width: 16px; height: 16px; }
.price-features li.off { color: var(--muted); }
.price-features li.off .ic { color: var(--muted); }
.price-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; font-size: 13.5px; color: var(--muted); }
.price-foot span { display: inline-flex; align-items: center; gap: 7px; }
.price-foot .ic { color: var(--accent-text); width: 15px; height: 15px; }

/* Star rating */
.stars { display: flex; gap: 2px; color: var(--star); }
.stars .ic { width: 15px; height: 15px; }

.cta-band {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 80px 28px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface);
}
.cta-band::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: -60%; transform: translateX(-50%);
  width: 120%; height: 120%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 45%, transparent), transparent);
  opacity: .7;
}
.cta-band h2 { max-width: 640px; margin-inline: auto; }
.cta-band p { max-width: 480px; margin: 0 auto 30px; }

.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 56px; text-align: center; }
.page-hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); max-width: 860px; margin: 0 auto 18px; }
.page-hero p { max-width: 580px; margin: 0 auto; font-size: 16.5px; }
.page-hero .hero-ctas { margin-top: 30px; }

.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding: 56px 0; }
.feature-row.reverse .feature-media { order: -1; }
.feature-row h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.feature-row .check-list { margin-top: 24px; }
.feature-media { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); padding: 32px; min-height: 360px; display: grid; place-items: center; }
.feature-media .bg-glow { width: 520px; height: 520px; opacity: .35; }

.compare-wrap { max-width: 900px; margin: 0 auto; }
.compare td, .compare th { white-space: normal; }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; width: 22%; }
.compare th.us { color: var(--accent-text); }
.compare .yes { color: var(--accent-text); }
.compare .no { color: var(--muted); }

.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 12px; }
.contact-card h3 { margin: 6px 0 0; }
.contact-card p { margin: 0; font-size: 14px; }
.contact-card .link-arrow { margin-top: auto; padding-top: 8px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }

.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 2px; }
.legal-nav a { padding: 9px 14px; border-radius: 10px; font-size: 14px; color: var(--text-2); }
.legal-nav a:hover { color: var(--text); background: var(--surface); }
.legal-nav a.is-active { background: var(--surface-2); color: var(--text); }
.prose h2 { font-size: 28px; margin-top: 0; }
.prose h3 { font-size: 18px; margin-top: 32px; }
.prose p, .prose li { font-size: 15px; color: var(--text-2); }
.prose ul { list-style: disc; padding-left: 20px; margin-bottom: 1em; display: grid; gap: 6px; }
.prose-block + .prose-block { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.updated { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

.faq-tools { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 36px; }
.search-box { position: relative; width: 100%; max-width: 520px; }
.search-box .input { height: 54px; padding-left: 48px; border-radius: var(--pill); background: var(--surface); }
.search-box .ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.faq-group + .faq-group { margin-top: 40px; }
.faq-group-title { max-width: 780px; margin: 0 auto 14px; font: 500 13px var(--f-body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.err-page { min-height: calc(100vh - 140px); display: grid; place-items: center; text-align: center; padding: 60px 20px; position: relative; overflow: hidden; isolation: isolate; }
.err-code { font: 300 clamp(7rem, 26vw, 16rem)/.9 var(--f-display); letter-spacing: -.06em; background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 10%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 8 · Screen mockups (always dark: they depict an app screen) ------------- */
.tv {
  position: relative; border-radius: 22px; padding: 9px;
  background: linear-gradient(180deg, #2b2b2b, #0f0f0f);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .6);
}
.tv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0a0e10; container-type: inline-size; }
.app {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 2.6cqi;
  padding: 2.6cqi 3.2cqi; color: #fff; font-family: var(--f-display); text-align: left;
  font-size: clamp(5px, 1.25cqi, 15px);
}
.app-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 80% at 78% 30%, rgba(80, 140, 150, .55), transparent 70%),
    radial-gradient(40% 60% at 95% 10%, rgba(215, 248, 106, .18), transparent 70%),
    linear-gradient(180deg, #13262b 0%, #0b1416 55%, #070909 100%);
}
.app-bg::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 6px);
}
.app > :not(.app-bg) { position: relative; z-index: 1; }
.app-top { display: flex; align-items: center; justify-content: space-between; }
.app-left { display: flex; align-items: center; gap: 1.2em; }
.app-logo { display: flex; align-items: center; gap: .6em; height: 3.2em; padding: 0 1.2em 0 .4em; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-weight: 600; font-size: 1.15em; }
.app-logo i { width: 2.3em; height: 2.3em; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.app-logo i::after { content: ""; border-left: .65em solid #0b0b0b; border-top: .42em solid transparent; border-bottom: .42em solid transparent; margin-left: .15em; }
.app-logo span { color: var(--accent); font-weight: 400; }
.app-nav { display: flex; gap: .3em; height: 3.2em; padding: .3em; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.app-nav span { display: grid; place-items: center; padding: 0 1.3em; border-radius: 99px; font-size: 1.05em; color: rgba(255, 255, 255, .75); }
.app-nav span.on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.app-right { display: flex; align-items: center; gap: .8em; font-size: 1.05em; color: rgba(255, 255, 255, .8); }
.app-dot { width: 3em; height: 3em; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12); display: grid; place-items: center; }
.app-dot svg { width: 1.3em; height: 1.3em; }
.app-dot.av { background: linear-gradient(135deg, #fbc2a4, #f68084); }
.app-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 52%; }
.app-hero .tag { display: inline-flex; align-items: center; gap: .5em; font-size: 1em; color: rgba(255, 255, 255, .8); margin-bottom: .8em; }
.app-hero .live { background: #ff4d4d; color: #fff; font-weight: 600; font-size: .85em; padding: .2em .6em; border-radius: .4em; letter-spacing: .05em; }
.app-hero h4 { font-size: 3.1em; font-weight: 500; line-height: 1.05; margin: 0 0 .35em; color: #fff; letter-spacing: -.02em; }
.app-hero p { font-size: 1.05em; color: rgba(255, 255, 255, .7); margin: 0 0 1.2em; line-height: 1.5; }
.app-btns { display: flex; gap: .7em; }
.app-btn { display: inline-flex; align-items: center; gap: .5em; height: 3em; padding: 0 1.4em; border-radius: 99px; font-size: 1em; font-weight: 500; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .15); }
.app-btn.main { background: var(--accent); color: #0b0b0b; border-color: transparent; }
.app-btn svg { width: 1.1em; height: 1.1em; }
.app-row-title { font-size: 1.35em; font-weight: 500; margin-bottom: -1.2cqi; }

/* App home screen (homepage hero): logo, three category cards, catch-up + clock */
.home { justify-content: space-between; }
.home .app-bg {
  background:
    radial-gradient(40% 60% at 30% 22%, rgba(150, 190, 195, .38), transparent 70%),
    radial-gradient(55% 75% at 82% 30%, rgba(80, 135, 145, .42), transparent 72%),
    radial-gradient(120% 95% at 50% 45%, transparent 50%, rgba(0, 0, 0, .6)),
    linear-gradient(180deg, #1e353a 0%, #132326 55%, #0a1012 100%);
}
/* A dim, out-of-focus doorway behind the menu, like a paused film still */
.home .app-bg::before {
  content: ""; position: absolute; left: 22%; top: 6%; width: 24%; height: 62%;
  border: .9em solid rgba(0, 0, 0, .35); border-bottom: 0;
  background: linear-gradient(180deg, rgba(150, 185, 190, .22), rgba(60, 90, 95, .12));
  filter: blur(3px);
}
.home-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.home-dots { display: flex; justify-content: flex-end; gap: .8em; }
.home-brand { display: flex; align-items: center; font: 700 2.3em/1 'DejaVu Sans', Arial, sans-serif; letter-spacing: -.05em; color: #f7fff0; }
.home-brand span { color: #c8ff3d; }
.home-brand img { width: 1.3em; height: 1.3em; margin-right: .38em; }
.home-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6cqi; margin-top: 3cqi; }
.home-card {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: .6em;
  aspect-ratio: 16 / 9; padding: 1.5em 1.4em 1.5em 1.7em; border-radius: 1.1em;
  background: linear-gradient(155deg, rgba(170, 215, 220, .3), rgba(90, 140, 148, .22) 55%, rgba(45, 80, 86, .32));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 1.2em 2.4em -1em rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.home-card > div { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.home-card b { font-size: 2.1em; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.home-card span { margin-top: auto; font-size: 1.1em; color: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-card small { display: flex; align-items: center; gap: .4em; margin-top: .35em; font-size: .85em; color: rgba(255, 255, 255, .55); }
.home-card small svg { width: 1.1em; height: 1.1em; }
.home-ic { flex: none; width: 4.4em; height: 4.4em; color: #fff; stroke-width: 1.4; }
.home-card.is-focus { transform: translateY(-.6em) scale(1.04); border-color: rgba(255, 255, 255, .34); background: linear-gradient(155deg, rgba(190, 230, 235, .4), rgba(100, 155, 162, .3) 55%, rgba(50, 90, 96, .38)); }
.home-card.is-focus::before {
  content: ""; position: absolute; top: -.25em; left: 1.7em; width: 4.5em; height: .5em; border-radius: .3em;
  background: var(--accent); box-shadow: 0 .4em 1.6em color-mix(in srgb, var(--accent) 70%, transparent);
}
.home-card.is-focus .home-ic { color: var(--accent); }
.home-bottom { display: flex; align-items: center; justify-content: space-between; }
.home-pill { display: inline-flex; align-items: center; gap: .9em; font-size: 1.25em; color: rgba(255, 255, 255, .9); }
.home-pill .app-dot { font-size: .8em; }
.home-time { font-size: 1.05em; color: rgba(255, 255, 255, .75); }
.home-time b { font-size: 2.2em; font-weight: 400; color: #fff; margin-right: .2em; letter-spacing: -.02em; }
@container (max-width: 460px) {
  .home-card small, .home-card span { display: none; }
}
.app-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4cqi; }
.tile { position: relative; aspect-ratio: 16 / 10; border-radius: .9em; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.tile.poster { aspect-ratio: 2 / 3; }
.tile.focus { box-shadow: 0 0 0 .25em #fff; }
.tile b { position: absolute; left: .7em; bottom: .9em; right: .7em; font-size: .95em; font-weight: 500; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile i { position: absolute; left: .7em; right: .7em; bottom: .45em; height: .22em; border-radius: 1em; background: rgba(255, 255, 255, .25); }
.tile i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 40%); background: var(--accent); border-radius: inherit; }
.tile .badge-live { position: absolute; top: .6em; left: .6em; background: #ff4d4d; color: #fff; font-size: .7em; font-weight: 700; padding: .15em .5em; border-radius: .3em; letter-spacing: .05em; }
.art { background: #222; }
.art::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; top: -18%; right: -14%; background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 62%); }
.art::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; border-radius: 50% 50% 0 0; background: rgba(0, 0, 0, .28); }
.art-1 { background: linear-gradient(135deg, #0f2027, #2c5364); }
.art-2 { background: linear-gradient(135deg, #42275a, #734b6d); }
.art-3 { background: linear-gradient(135deg, #3a1c71, #d76d77 60%, #ffaf7b); }
.art-4 { background: linear-gradient(135deg, #134e5e, #71b280); }
.art-5 { background: linear-gradient(135deg, #1d2b64, #6d83c9); }
.art-6 { background: linear-gradient(135deg, #5a3f37, #c49a6c); }
.art-7 { background: linear-gradient(135deg, #2b5876, #4e4376); }
.art-8 { background: linear-gradient(135deg, #8e2de2, #4a00e0); }
.art-9 { background: linear-gradient(135deg, #485563, #29323c); }
.art-10 { background: linear-gradient(135deg, #b24592, #f15f79); }

.phone {
  width: 240px; aspect-ratio: 9 / 19.2; border-radius: 40px; padding: 8px;
  background: linear-gradient(180deg, #2b2b2b, #111); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
}
.phone-screen { position: relative; height: 100%; border-radius: 32px; overflow: hidden; background: #0a0e10; container-type: inline-size; color: #fff; font-family: var(--f-display); }
.phone-screen .notch { position: absolute; top: 2.5cqi; left: 50%; transform: translateX(-50%); width: 30cqi; height: 7cqi; border-radius: 99px; background: #000; z-index: 3; }
.phone-ui { position: absolute; inset: 0; padding: 15cqi 6cqi 6cqi; display: flex; flex-direction: column; gap: 5cqi; font-size: 4.6cqi; }
.phone-ui h5 { font-size: 7cqi; font-weight: 500; margin: 0; color: #fff; }
.phone-ui .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqi; }
.phone-ui .player { position: relative; aspect-ratio: 16 / 9; border-radius: 4cqi; overflow: hidden; }
.phone-ui .player .play { position: absolute; inset: 0; margin: auto; width: 14cqi; height: 14cqi; border-radius: 50%; background: var(--accent); display: grid; place-items: center; z-index: 2; }
.phone-ui .player .play::after { content: ""; border-left: 4cqi solid #0b0b0b; border-top: 2.6cqi solid transparent; border-bottom: 2.6cqi solid transparent; margin-left: 1cqi; }
.phone-ui .meta { color: rgba(255, 255, 255, .6); font-size: 4cqi; }
.phone-ui .bar { height: 1.4cqi; border-radius: 9px; background: rgba(255, 255, 255, .2); position: relative; }
.phone-ui .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 62%; border-radius: inherit; background: var(--accent); }
.phone-ui .list { display: grid; gap: 3cqi; }
.phone-ui .list div { display: flex; align-items: center; gap: 3cqi; padding: 3cqi; border-radius: 3.5cqi; background: rgba(255, 255, 255, .06); }
.phone-ui .list i { width: 9cqi; height: 9cqi; border-radius: 2.5cqi; flex: none; }
.phone-ui .list b { font-weight: 500; font-size: 4.4cqi; display: block; color: #fff; }
.phone-ui .list span { color: rgba(255, 255, 255, .55); font-size: 3.6cqi; }

.epg { width: 100%; border-radius: 14px; overflow: hidden; background: #0d1112; border: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: #fff; position: relative; }
.epg-head { display: grid; grid-template-columns: 64px repeat(4, 1fr); border-bottom: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .5); font-size: 11px; }
.epg-head span { padding: 8px 10px; }
.epg-row { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.epg-row:last-child { border-bottom: 0; }
.epg-ch { display: grid; place-items: center; padding: 8px; border-right: 1px solid rgba(255, 255, 255, .06); }
.epg-ch i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 10px; color: #0b0b0b; }
.epg-progs { display: flex; gap: 4px; padding: 6px; }
.epg-progs div { flex: var(--w, 1); min-width: 0; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-progs div small { display: block; color: rgba(255, 255, 255, .45); font-size: 10px; }
.epg-progs div.now { background: color-mix(in srgb, var(--accent) 20%, #11160a); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.epg-line { position: absolute; top: 0; bottom: 0; left: 46%; width: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.epg-line::before { content: "LIVE"; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #0b0b0b; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; }

.screens-viz { display: flex; align-items: flex-end; justify-content: center; gap: 12px; width: 100%; }
.screens-viz > div { border-radius: 8px; border: 1px solid var(--line-2); background: linear-gradient(135deg, #1b2a2e, #0c1214); position: relative; }
.screens-viz > div::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); opacity: .9; }
.screens-viz .s-tv { width: 46%; aspect-ratio: 16 / 10; }
.screens-viz .s-tab { width: 24%; aspect-ratio: 3 / 4; }
.screens-viz .s-ph { width: 13%; aspect-ratio: 9 / 18; border-radius: 10px; }
.pin-viz { display: flex; gap: 8px; }
.pin-viz span { width: 42px; height: 50px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); display: grid; place-items: center; font: 500 20px var(--f-display); }
.pin-viz span.on { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 9 · Auth pages --------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { display: flex; flex-direction: column; padding: 24px 40px; min-height: 100vh; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-form { width: 100%; max-width: 410px; margin: auto; padding: 48px 0; }
.auth-form h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.auth-form > p { margin-bottom: 30px; }
.auth-foot { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 24px; }
.auth-visual {
  position: relative; overflow: hidden; isolation: isolate; margin: 12px; border-radius: var(--r-xl);
  background: #0c0c0c; border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; padding: 40px; gap: 32px; color: #fff;
}
.auth-visual .bg-glow { opacity: .55; }
.auth-visual .tv { transform: perspective(1400px) rotateY(-8deg) rotateX(3deg); margin: 0 -80px 0 0; }
.auth-visual h2 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.2rem); max-width: 440px; }
.auth-visual p { color: rgba(255, 255, 255, .65); }
.divider-text { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* 10 · Checkout ---------------------------------------------------------- */
.co { padding: 36px 0 88px; position: relative; overflow: hidden; isolation: isolate; min-height: calc(100vh - 130px); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.co-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 26px; }
.co-step {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--muted); transition: .25s; text-align: left;
}
.co-step .num { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; font-weight: 600; transition: .25s; }
.co-step .num .ic { width: 14px; height: 14px; display: none; }
.co-step small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.co-step.is-active { border-color: var(--accent-line); color: var(--text); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.co-step.is-active .num { background: var(--accent); color: var(--accent-ink); }
.co-step.is-done { color: var(--text-2); cursor: pointer; }
.co-step.is-done:hover { border-color: var(--line-2); }
.co-step.is-done .num { background: var(--accent-soft); color: var(--accent-text); }
.co-step.is-done .num b { display: none; }
.co-step.is-done .num .ic { display: block; }
.co-panel { display: none; }
.co-panel.is-active { display: block; animation: fadeUp .35s ease; }
.co-card { padding: 30px; }
.co-card h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 8px; }
.co-card > p { margin-bottom: 26px; }
.co-section-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 12px; }
.co-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 28px; }
.plan-opt .plan-info { flex: 1; min-width: 0; }
.plan-opt .plan-info b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15.5px; font-weight: 500; }
.plan-opt .plan-info span { font-size: 13px; color: var(--muted); }
.plan-opt .plan-price { text-align: right; font: 500 20px/1.1 var(--f-display); letter-spacing: -.02em; }
.plan-opt .plan-price small { display: block; font: 400 12px var(--f-body); color: var(--muted); letter-spacing: 0; }
.co-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.co-actions .btn-primary { min-width: 180px; }
.co-signin-note { font-size: 14px; color: var(--text-2); }
.pay-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.pay-opt { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
.pay-opt .radio { position: absolute; top: 14px; right: 14px; }
.pay-opt b { font-size: 14px; font-weight: 500; }
.pay-opt span { font-size: 12px; color: var(--muted); margin-top: -6px; }
.pay-opt .ic { width: 22px; height: 22px; color: var(--text-2); }
.pay-opt.is-selected .ic { color: var(--accent-text); }
.card-fields { padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 20px; }
.card-fields .input { background: var(--surface); }
.pay-alt { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 20px; font-size: 14px; color: var(--text-2); }
.pay-alt .icon-box { width: 40px; height: 40px; }

.co-summary { position: sticky; top: 92px; }
.sum-toggle { display: none; }
.sum-plan { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sum-plan .icon-box { width: 48px; height: 48px; border-radius: 14px; }
.sum-plan b { display: block; font-weight: 500; font-size: 15.5px; }
.sum-plan span { font-size: 13px; color: var(--muted); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.sum-row.discount { color: var(--accent-text); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.sum-total span { font-size: 14px; color: var(--text-2); }
.sum-total strong { font: 500 30px/1 var(--f-display); letter-spacing: -.03em; }
.sum-renew { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; text-align: right; }
.promo { display: flex; gap: 8px; margin-top: 18px; }
.promo .input { height: 42px; font-size: 14px; text-transform: uppercase; }
.promo .input::placeholder { text-transform: none; }
.promo .btn { --h: 42px; }
.promo-msg { font-size: 12.5px; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.promo-msg.ok { color: var(--accent-text); }
.promo-msg.err { color: var(--danger); }
.trust-list { display: grid; gap: 12px; margin-top: 16px; padding: 18px 20px; }
.trust-list li { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.trust-list .ic { color: var(--accent-text); width: 18px; height: 18px; }
.signed-in { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--accent-line); border-radius: var(--r); background: color-mix(in srgb, var(--accent) 6%, var(--bg-2)); margin-bottom: 20px; }
.signed-in b { display: block; font-size: 14px; font-weight: 500; }
.signed-in span { font-size: 13px; color: var(--muted); }
.signed-in .btn { margin-left: auto; }

.done-wrap { max-width: 720px; margin: 0 auto; text-align: center; }
.done-check { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 26px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px var(--accent-soft), 0 0 60px color-mix(in srgb, var(--accent) 50%, transparent); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.done-check .ic { width: 34px; height: 34px; stroke-width: 2.5; }
.done-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; text-align: left; margin-top: 36px; }
.order-meta { display: flex; justify-content: center; gap: 10px 28px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.order-meta b { color: var(--text); font-weight: 500; }

/* Credentials (checkout complete + client area) */
.cred-list { display: grid; gap: 10px; }
.cred { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); min-width: 0; }
.cred > div { min-width: 0; flex: 1; }
.cred-label { font-size: 12px; color: var(--muted); }
.cred-value { font: 500 15px var(--f-mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.cred-actions { display: flex; gap: 2px; flex: none; }
.cred-actions button { width: 36px; height: 36px; border-radius: 9px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.cred-actions button:hover { background: var(--surface-3); color: var(--text); }

/* 11 · Client area ------------------------------------------------------- */
.ca { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .3s; }
.ca-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; padding: 20px 16px;
  background: var(--bg-2); border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.ca-side-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 22px; }
.ca-collapse { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; }
.ca-collapse:hover { background: var(--surface-2); color: var(--text); }
.ca-new { margin-bottom: 26px; justify-content: flex-start; padding: 0 18px; gap: 12px; }
.ca-new .ic { width: 20px; height: 20px; }
.ca-label { font-size: 12.5px; color: var(--muted); padding: 0 12px; margin: 0 0 8px; white-space: nowrap; }
.ca-nav { display: grid; gap: 2px; }
.ca-nav a {
  display: flex; align-items: center; gap: 13px; height: 44px; padding: 0 12px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s;
}
.ca-nav a .ic { width: 19px; height: 19px; }
.ca-nav a:hover { background: var(--surface); color: var(--text); }
.ca-nav a.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.ca-nav a.is-active .ic { color: var(--accent-text); }
.ca-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.ca-nav .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.ca-divider { height: 1px; background: var(--line); margin: 18px 8px; }
.ca-links a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.ca-links a:hover { color: var(--text); background: var(--surface); }
.ca-links a .ic { width: 16px; height: 16px; color: var(--muted); }
.ca-user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ca-user > div { min-width: 0; flex: 1; }
.ca-user > div > b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-user > div > span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-user a.out { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); flex: none; }
.ca-user a.out:hover { background: var(--surface-3); color: var(--danger); }

.ca-main { min-width: 0; display: flex; flex-direction: column; }
.ca-top {
  position: sticky; top: 0; z-index: 30; height: 68px; flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.ca-top .ca-burger { display: none; }
.ca-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); min-width: 0; }
.ca-crumb b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-crumb .ic { width: 14px; height: 14px; }
.ca-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; transition: .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn .ic { width: 18px; height: 18px; }
.icon-btn .pip { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.ca-content { width: 100%; max-width: 1160px; margin: 0 auto; padding: 32px 32px 72px; }
.ca-foot { margin-top: auto; padding: 0 32px 24px; text-align: center; font-size: 12.5px; color: var(--muted); }
.ca-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.ca-head h1 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 0 0 4px; }
.ca-head p { margin: 0; font-size: 14.5px; }
.ca-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ca-overlay { position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: .25s; }
.ca-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ca-stack { display: grid; gap: 16px; }

/* Collapsed (icon-only) sidebar — desktop only; the mobile drawer is always full */
@media (min-width: 1001px) {
  .ca.is-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
  .ca.is-collapsed .ca-side { padding-inline: 14px; }
  .ca.is-collapsed .ca-side-top { flex-direction: column; gap: 14px; padding-inline: 0; }
  .ca.is-collapsed .logo .lt, .ca.is-collapsed .ca-label, .ca.is-collapsed .ca-links, .ca.is-collapsed .ca-divider,
  .ca.is-collapsed .nav-text, .ca.is-collapsed .ca-nav .count, .ca.is-collapsed .ca-user > div, .ca.is-collapsed .ca-user a.out { display: none; }
  .ca.is-collapsed .ca-new { padding: 0; justify-content: center; }
  .ca.is-collapsed .ca-nav a { justify-content: center; padding: 0; position: relative; }
  .ca.is-collapsed .ca-nav .dot { position: absolute; top: 9px; right: 12px; margin: 0; }
  .ca.is-collapsed .ca-user { padding: 8px; justify-content: center; border: 0; background: none; }
}

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { padding: 20px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s; }
a.stat:hover { border-color: var(--line-2); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.stat-label .ic { width: 17px; height: 17px; }
.stat-value { font: 400 30px/1.1 var(--f-display); letter-spacing: -.03em; margin-top: 10px; color: var(--text); }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stat.accent .stat-label, .stat.accent .stat-sub { color: rgba(0, 0, 0, .62); }
.stat.accent .stat-value { color: var(--accent-ink); }

.sub-card { position: relative; overflow: hidden; isolation: isolate; padding: 28px; }
.sub-card .bg-glow { width: 460px; height: 460px; top: -240px; right: -160px; opacity: .3; }
.sub-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sub-title { display: flex; align-items: center; gap: 14px; }
.sub-title .icon-box { width: 52px; height: 52px; border-radius: 15px; }
.sub-title h2 { font-size: 22px; margin: 0 0 4px; }
.sub-title span { font-size: 13.5px; color: var(--muted); }
.sub-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 26px 0 22px; }
.sub-metrics div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.sub-metrics span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sub-metrics b { font: 500 17px var(--f-display); }
.sub-progress { display: grid; gap: 8px; margin-bottom: 24px; }
.sub-progress .row-between { font-size: 13px; color: var(--muted); }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.list-rows { display: grid; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:first-child { padding-top: 0; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row > div { flex: 1; min-width: 0; }
.list-row b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row span { font-size: 12.5px; color: var(--muted); }
.list-row .amt { font: 500 15px var(--f-display); flex: none; }
.list-row .icon-box { width: 38px; height: 38px; border-radius: 11px; }

.app-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.app-chip { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); font-size: 12.5px; color: var(--text-2); text-align: center; transition: .2s; }
.app-chip:hover { border-color: var(--accent-line); color: var(--text); }
.app-chip .ic { width: 22px; height: 22px; color: var(--text); }

.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar .search-box { max-width: 280px; }
.filter-bar .search-box .input { height: 44px; border-radius: 12px; padding-left: 42px; font-size: 14px; }
.filter-bar .search-box .ic { left: 14px; width: 16px; height: 16px; }

.service-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.service-head .icon-box { width: 56px; height: 56px; border-radius: 16px; }
.service-head .icon-box .ic { width: 24px; height: 24px; }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt, .kv span:first-child { color: var(--muted); }
.kv dd, .kv span:last-child { margin: 0; color: var(--text); font-weight: 500; text-align: right; }

.setup-steps { display: grid; gap: 0; counter-reset: s; }
.setup-steps li { position: relative; display: flex; gap: 16px; padding-bottom: 24px; }
.setup-steps li:last-child { padding-bottom: 0; }
.setup-steps li::before { counter-increment: s; content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 13px; border: 1px solid var(--accent-line); }
.setup-steps li::after { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line-2); }
.setup-steps li:last-child::after { display: none; }
.setup-steps b { display: block; font-weight: 500; margin: 4px 0 4px; }
.setup-steps p { margin: 0; font-size: 14px; }

/* Invoice (viewinvoice) */
.inv { max-width: 880px; margin: 0 auto; }
.inv-paper { padding: 40px; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.inv-top h1 { font-size: 30px; margin: 0 0 6px; }
.inv-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.inv-parties h4 { font: 500 12px var(--f-body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.inv-parties p { margin: 0; line-height: 1.7; }
.inv-items { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.inv-items th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.inv-items td { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
.inv-items td b { color: var(--text); font-weight: 500; display: block; }
.inv-items .t-right { text-align: right; }
.inv-totals { margin-left: auto; max-width: 320px; display: grid; gap: 4px; }
.inv-totals .sum-total strong { font-size: 26px; }
.inv-pay { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 20px; border-radius: var(--r); border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); margin-bottom: 16px; }
.inv-pay .field { margin: 0; flex: 1; min-width: 200px; }
.inv-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Tickets */
.dept-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.dept-opt { flex-direction: column; align-items: flex-start; gap: 8px; }
.dept-opt .radio { position: absolute; top: 14px; right: 14px; }
.dept-opt b { font-size: 14.5px; font-weight: 500; }
.dept-opt span { font-size: 12.5px; color: var(--muted); }
.thread { display: grid; gap: 18px; }
.msg { display: flex; gap: 14px; }
.msg-body { flex: 1; min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.msg.is-staff .msg-body { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.msg-meta b { color: var(--text); font-weight: 500; font-size: 14px; }
.msg-body p { font-size: 14.5px; margin: 0 0 .7em; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-attach { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--text-2); background: var(--bg-2); }
.composer {
  display: flex; align-items: flex-end; gap: 6px; padding: 8px; margin-top: 24px;
  border: 1px solid var(--line-2); border-radius: 26px; background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea { flex: 1; min-height: 42px; max-height: 220px; padding: 10px 6px; border: 0; background: none; resize: none; outline: none; font-size: 15px; line-height: 1.45; }
.composer textarea::placeholder { color: var(--muted); }
.composer .tool { width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; flex: none; }
.composer .tool:hover { background: var(--surface-3); color: var(--text); }
.composer .send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; transition: .2s; }
.composer .send:hover { background: var(--accent-pale); }
.composer .send .ic { width: 18px; height: 18px; }

.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row b { display: block; font-weight: 500; font-size: 14.5px; }
.settings-row span { font-size: 13px; color: var(--muted); }

/* Utilities */
.muted { color: var(--muted) !important; }
.text-2 { color: var(--text-2); }
.text-accent { color: var(--accent-text) !important; }
.text-danger { color: var(--danger) !important; }
.mono { font-family: var(--f-mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.small { font-size: 13px; }
.show-m { display: none !important; }

/* Motion */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-grid { grid-template-columns: minmax(0, 1fr); }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-room .hero-sub { margin-inline: auto; }
  .hero-room .hero-ctas { justify-content: center; }
  .room { max-width: 680px; width: 100%; margin: 0 auto; }
  .ca { grid-template-columns: minmax(0, 1fr); }
  .ca-side { position: fixed; left: 0; top: 0; z-index: 80; width: 290px; transform: translateX(-100%); transition: transform .3s ease; }
  .ca-collapse { display: none; }
  .ca.is-nav-open .ca-side { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .5); }
  .ca.is-nav-open .ca-overlay { opacity: 1; visibility: visible; }
  .ca-top .ca-burger { display: grid; }
  .ca-top { padding: 0 20px; }
  .ca-content { padding: 24px 20px 64px; }
}
@media (max-width: 960px) {
  .site-header .nav, .header-actions .hide-m { display: none; }
  .menu-toggle { display: inline-flex; }
  .co-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .co-summary { position: static; order: -1; }
  .co-summary .sum-body { display: none; padding-top: 16px; }
  .co-summary.is-open .sum-body { display: block; }
  .co-summary .sum-card { padding: 16px 18px; }
  .co-summary .sum-card > h3 { display: none; }
  .sum-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; border: 0; background: none; padding: 0; font-size: 14px; color: var(--text); font-weight: 500; }
  .sum-toggle .ic { transition: transform .25s; }
  .co-summary.is-open .sum-toggle .ic { transform: rotate(180deg); }
  .sum-toggle strong { margin-left: auto; font: 500 18px var(--f-display); }
  .co-summary .trust-list { display: none; }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .feature-row { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 0; }
  .feature-row.reverse .feature-media { order: 0; }
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal-nav { position: static; display: flex; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
  .legal-nav a { white-space: nowrap; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitemap-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .section { padding: 72px 0; }
  .section-sm { padding: 48px 0; }
  .section-head { margin-bottom: 36px; }
  .hero { padding-top: 40px; }
  .hero-sub { font-size: 15.5px; }
  .room-tv { padding: 3px; border-radius: 5px; }
  .room-console { height: 52px; margin-top: 30px; }
  .tv { padding: 5px; border-radius: 14px; }
  .tv-screen { border-radius: 10px; }
  .app-nav span:nth-child(n+3), .app-right .time { display: none; }
  .grid-2, .grid-3, .grid-4, .steps, .contact-cards, .pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .pricing-grid, .pricing-grid.is-1, .pricing-grid.is-2, .pricing-grid.is-4 { --pg-cols: 1; max-width: 440px; }
  .stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-band > div:nth-child(3) { border-left: 0; }
  .stats-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-band strong { font-size: 28px; }
  .device-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-band { padding: 56px 20px; }
  .feature-media { padding: 22px; min-height: 280px; }
  .auth-side { padding: 20px; }
  .co { padding-top: 20px; }
  .co-card { padding: 22px 18px; }
  .co-steps { gap: 6px; }
  .co-step { padding: 10px; gap: 8px; font-size: 13px; }
  .co-step small { display: none; }
  .pay-methods { grid-template-columns: minmax(0, 1fr); }
  .pay-opt { flex-direction: row; align-items: center; }
  .pay-opt span { margin: 0 0 0 auto; padding-right: 30px; }
  .pay-opt .radio { top: 50%; transform: translateY(-50%); }
  .co-actions { flex-direction: column-reverse; align-items: stretch; }
  .co-actions .btn { width: 100%; }
  .done-grid { grid-template-columns: minmax(0, 1fr); }
  .sub-metrics { grid-template-columns: minmax(0, 1fr); }
  .sub-card { padding: 22px 18px; }
  .stat-value { font-size: 24px; }
  .stat { padding: 16px; }
  .app-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dept-grid { grid-template-columns: minmax(0, 1fr); }
  .inv-paper { padding: 24px 18px; }
  .inv-parties { grid-template-columns: minmax(0, 1fr); }
  .msg .avatar { display: none; }
  .ca-head h1 { font-size: 1.6rem; }
  .ca-crumb .crumb-root { display: none; }
  .social-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .social-row .input { grid-column: 1 / -1; }
  .sitemap-list { grid-template-columns: minmax(0, 1fr); }
  .show-m { display: revert !important; }
  .hide-sm { display: none !important; }

  /* Tables collapse into labelled cards */
  .table-stack { min-width: 0; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; white-space: normal; text-align: right; }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; }
  .table-stack td.t-right { justify-content: flex-end; padding-top: 10px; }
  .table-stack td.t-right::before { display: none; }
}
@media (max-width: 420px) {
  .header-actions .btn-primary { padding: 0 14px; }
  .co-step .label-text { display: none; }
  .co-step { justify-content: center; }
  .co-step.is-active .label-text { display: inline; }
}

@media print {
  .mini-header, .mini-footer, .inv-tools, .inv-pay, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .inv-paper { border: 0; padding: 0; background: none; }
}

/* Late additions */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[id] { scroll-margin-top: 96px; }
/* Let grid children shrink below their content's min width (long nowrap text) */
.ca-grid > *, .ca-stack > *, .contact-layout > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .done-grid > *, .co-grid > *, .feature-row > * { min-width: 0; }
/* Glow wrapper: clips to the section and fades out near its top/bottom so
   glows never end in a hard line */
.glow-layer {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
}
.feature-media .glow-layer, .sub-card .glow-layer, .auth-visual .glow-layer { -webkit-mask-image: none; mask-image: none; border-radius: inherit; }

/* 13 · WHMCS / Bootstrap bridge -------------------------------------------
   Pages this theme does not override are rendered by the parent theme,
   Nexus (Bootstrap 4). These rules restyle the Bootstrap and Nexus parts
   they use (cards, lists, forms, tables, tabs, modals) to match the theme.
   ------------------------------------------------------------------------ */
body { background: var(--bg); color: var(--text-2); }
hr { border-color: var(--line); }
.text-muted, .help-block, .form-text { color: var(--muted) !important; }
.text-dark, .text-body { color: var(--text) !important; }
.bg-white, .bg-light { background: var(--surface) !important; }
.border, .border-top, .border-bottom, .border-left, .border-right { border-color: var(--line) !important; }
.xp-content a:not([class]), .xp-content .alert-link, .xp-content p a:not(.btn) { color: var(--accent-text); }
.xp-content a:not([class]):hover { text-decoration: underline; text-underline-offset: 3px; }
.xp-content h1, .xp-content .h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.xp-content h2, .xp-content .h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.xp-content h3, .xp-content .h3 { font-size: 1.3rem; }
.xp-content h4, .xp-content h5, .xp-content h6, .xp-content .h4, .xp-content .h5, .xp-content .h6 { font-size: 1.05rem; }

/* Cards: Bootstrap cards carry their own padding in .card-body */
.card:has(> .card-body), .card:has(> .card-header), .card:has(> .list-group), .card:has(> .card-footer), .card:has(> .table-container), .card:has(> form > .card-body) { padding: 0; overflow: hidden; }
.card-header, .card-footer { background: transparent; border-color: var(--line); padding: 16px 20px; }
.card-footer:empty { display: none; }
.card-body { padding: 22px; }
.card-title { color: var(--text); font: 500 16px/1.3 var(--f-display); margin-bottom: 0; }
.card-title i, .card-header i { color: var(--accent-text); }
.xp-content > .card + .card, .xp-content > form + .card, .xp-content > .card + form { margin-top: 16px; }

/* List groups (the WHMCS sidebars and dashboard panels) */
.list-group-item { background: transparent; border-color: var(--line); color: var(--text-2); padding: 11px 20px; font-size: 14px; }
.list-group-flush > .list-group-item, .card > .list-group > .list-group-item { border-left: 0; border-right: 0; }
.card > .list-group:first-child .list-group-item:first-child { border-top: 0; }
.list-group-item-action:hover, .list-group-item-action:focus { background: var(--surface-2); color: var(--text); }
.list-group-item.active, .list-group-item.active:hover { background: var(--accent-soft); border-color: var(--line); color: var(--text); }
.list-group-item .badge, .list-group-item .label { float: right; }
.list-group-item i { color: var(--muted); width: 18px; }

/* Forms */
.form-control, .custom-select, select.form-control {
  height: auto; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 14.5px;
}
textarea.form-control { min-height: 120px; }
.form-control:focus, .custom-select:focus { background: var(--bg-2); color: var(--text); border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.form-control::placeholder { color: var(--muted); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-2); color: var(--text-2); }
.form-control option, .custom-select option { background: var(--surface); color: var(--text); }
.xp-content label, .col-form-label, .form-control-label { color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.input-group-text { background: var(--surface-2); border-color: var(--line-2); color: var(--muted); }
.input-group > .form-control { min-height: 46px; }
.custom-control-label::before { background: var(--bg-2); border-color: var(--line-2); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--accent); border-color: var(--accent); }
.form-check-input, input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.iti__country-list { background: var(--surface-2); border-color: var(--line-2); color: var(--text-2); }
.iti__country.iti__highlight { background: var(--surface-3); }

/* Buttons: WHMCS uses the Bootstrap names */
.btn:focus, .btn.focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.btn-success, .btn-primary:not(:disabled):not(.disabled):active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-success:hover { background: var(--accent-pale); color: var(--accent-ink); }
.btn-default, .btn-secondary, .btn-light, .btn-info, .btn-outline-primary, .btn-outline-secondary, .btn-outline-light {
  background: transparent; border-color: var(--line-2); color: var(--text);
}
.btn-default:hover, .btn-secondary:hover, .btn-light:hover, .btn-info:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-light:hover {
  background: var(--surface-2); border-color: var(--line-2); color: var(--text);
}
.btn-danger, .btn-outline-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.btn-danger:hover, .btn-outline-danger:hover { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
.btn-warning { background: color-mix(in srgb, var(--warning) 14%, transparent); border-color: color-mix(in srgb, var(--warning) 35%, transparent); color: var(--warning); }
.btn-link { --h: auto; padding: 0; background: none; border: 0; color: var(--accent-text); }
.btn-sm, .btn-group-sm > .btn { --h: 36px; padding: 0 14px; font-size: 13px; }
.btn-xs { --h: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-lg, .btn-group-lg > .btn { --h: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-radius: var(--pill) 0 0 var(--pill); }
.btn-group > .btn:last-child { border-radius: 0 var(--pill) var(--pill) 0; }
.btn-group > .btn:only-child { border-radius: var(--pill); }

/* Tables. The WHMCS lists (services, invoices, tickets, emails...) are
   DataTables, which Nexus paints white with dark text: restyle them like the
   theme's own tables. On phones each row becomes a labelled card (xplay.js
   copies the column names into data-label). */
.table { color: var(--text-2); margin-bottom: 0; }
.table th, .table td { border-color: var(--line); vertical-align: middle; }
.table thead th { border-bottom: 1px solid var(--line); border-top: 0; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.table-striped tbody tr:nth-of-type(odd) { background: color-mix(in srgb, var(--text) 2%, transparent); }
.table-hover tbody tr:hover, table.table-list tbody tr:hover { background: var(--surface-2); color: var(--text); }
table.table-list tbody tr { cursor: pointer; }
table.table-list td strong { color: var(--text); font-weight: 500; }
.table-container { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 0 8px; overflow: hidden; }
.table-container #tableLoading { padding: 20px; color: var(--muted); }
body .dataTables_wrapper table.table-list { margin: 4px 0 !important; border: 0; border-radius: 0; background: transparent; }
body .dataTables_wrapper table.table-list thead th,
body .dataTables_wrapper table.table-list thead th.sorting_asc,
body .dataTables_wrapper table.table-list thead th.sorting_desc {
  padding: 12px 20px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
body .dataTables_wrapper table.table-list thead th.sorting_asc, body .dataTables_wrapper table.table-list thead th.sorting_desc { color: var(--text-2); }
body .dataTables_wrapper table.table-list > tbody > tr > td {
  padding: 16px 20px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  color: var(--text-2); font-size: 14px; vertical-align: middle;
}
body .dataTables_wrapper table.table-list > tbody > tr:last-child > td:first-child,
body .dataTables_wrapper table.table-list > tbody > tr:last-child > td:last-child { border-radius: 0; }
body .dataTables_wrapper table.table-list > tbody > tr:first-child > td { border-top: 0; }
body .dataTables_wrapper table.table-list > tbody > tr:hover > td { background: var(--surface-2); }
body .dataTables_wrapper table.table-list > tbody > tr > td a:not(.btn) { color: var(--text); }
body .dataTables_wrapper table.table-list > tbody > tr > td small, body .dataTables_wrapper table.table-list > tbody > tr > td .text-muted { color: var(--muted); }
body .dataTables_wrapper table.table-list > tbody > tr > td.dataTables_empty { padding: 36px 20px; color: var(--muted); cursor: default; }
body .dataTables_wrapper table.table-list > tbody > tr:has(> td.dataTables_empty):hover > td { background: transparent; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  min-height: 38px; padding: 6px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
}
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { color: var(--muted); font-size: 13px; padding: 10px 20px; }
.dataTables_wrapper .dataTables_paginate { padding: 8px 20px; }
.dataTables_wrapper .dataTables_paginate .pagination { margin: 0; }
/* Short lists (up to 10 services): no search box, counter or pages */
.table-container.is-short .dataTables_info, .table-container.is-short .dataTables_filter,
.table-container.is-short .dataTables_length, .table-container.is-short .dataTables_paginate { display: none; }
.table-container.is-short { padding: 0; }
.table-container.is-short .dataTables_wrapper table.table-list { margin: 0 !important; }
.table-container.is-empty { display: none; }

/* My services: plan, app username, Manage button (clientareaproducts.tpl) */
body .dataTables_wrapper table.xp-services thead th, body .dataTables_wrapper table.xp-services > tbody > tr > td { text-align: left; }
body .dataTables_wrapper table.xp-services thead th.t-right, body .dataTables_wrapper table.xp-services > tbody > tr > td.t-right { text-align: right; }
.xp-svc-cell { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.xp-svc-cell .icon-box { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.xp-svc-cell .icon-box .ic { width: 18px; height: 18px; }
.xp-svc-cell strong { display: block; color: var(--text); font-weight: 500; font-size: 15px; }
.xp-svc-cell .small { margin-top: 2px; font-size: 12.5px; }
table.xp-services .btn-sm .ic { width: 15px; height: 15px; }
.xp-services-empty { margin: 0; }
.xp-services-empty h3 { margin: 0 0 6px; color: var(--text); }
.xp-services-empty p { max-width: 380px; margin: 0 auto 18px; }

/* Status dot in list tables, like the theme's badges */
table.table-list .label.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* Phones: each row is a card with the column names as labels */
@media (max-width: 767px) {
  body .dataTables_wrapper table.table-list thead { display: none; }
  body .dataTables_wrapper table.table-list, body .dataTables_wrapper table.table-list > tbody { display: block; width: 100% !important; }
  body .dataTables_wrapper table.table-list > tbody > tr { display: block; padding: 14px 18px; border-top: 1px solid var(--line); }
  body .dataTables_wrapper table.table-list > tbody > tr:first-child { border-top: 0; }
  body .dataTables_wrapper table.table-list > tbody > tr > td,
  body .dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control {
    display: flex !important; justify-content: space-between; align-items: center; gap: 12px;
    position: static; padding: 5px 0; border: 0; background: transparent; text-align: right !important; white-space: normal; cursor: inherit;
  }
  body .dataTables_wrapper table.table-list > tbody > tr:hover > td { background: transparent; }
  body .dataTables_wrapper table.table-list > tbody > tr > td::before,
  body .dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    content: attr(data-label); position: static; display: block; flex: none; width: auto; height: auto; margin: 0; padding: 0;
    border: 0; border-radius: 0; box-shadow: none; background: none; color: var(--muted);
    font: 400 12.5px/1.4 var(--f-body, inherit); text-align: left; text-indent: 0;
  }
  body .dataTables_wrapper table.table-list > tbody > tr > td:not([data-label])::before,
  body .dataTables_wrapper table.table-list > tbody > tr > td[data-label=""]::before,
  body .dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:not([data-label])::before { display: none; }
  body .dataTables_wrapper table.table-list > tbody > tr.child { display: none !important; }
  body .dataTables_wrapper table.table-list > tbody > tr > td.dataTables_empty { justify-content: center; text-align: center !important; }
  body .dataTables_wrapper table.table-list > tbody > tr > td.dataTables_empty::before { display: none; }
  body .dataTables_wrapper table.xp-services > tbody > tr > td:first-child { padding-bottom: 10px; text-align: left !important; }
  body .dataTables_wrapper table.xp-services > tbody > tr > td.t-right { padding-top: 12px; }
  body .dataTables_wrapper table.xp-services > tbody > tr > td.t-right .btn { width: 100%; justify-content: center; }
  .dataTables_wrapper .dataTables_filter { float: none; margin: 0; padding: 14px 18px 0; }
  .dataTables_wrapper .dataTables_filter label { margin: 0; }
  .dataTables_wrapper .dataTables_filter label, .dataTables_wrapper .dataTables_filter input { width: 100% !important; }
  body .dataTables_wrapper .dataTables_filter::after { left: 32px; transform: translateY(-30%); }
  .dataTables_wrapper .dataTables_info { padding: 10px 18px 4px; }
}

/* Sidebar cards (View, Actions, Overview...). Nexus styles them only inside
   its .sidebar column, which this theme's .xp-aside replaces. */
.card-sidebar .card-minimise { cursor: pointer; transition: transform .2s ease; }
.card-sidebar .card-minimise.minimised { transform: rotate(180deg); }
.xp-aside .sidebar-menu-item-wrapper { display: flex; align-items: center; gap: 10px; }
.xp-aside .sidebar-menu-item-icon-wrapper { flex: none; width: 18px; text-align: center; }
.xp-aside .sidebar-menu-item-icon-wrapper i { width: auto; }
.xp-aside .sidebar-menu-item-icon-wrapper .fas { font-weight: 400; }
.xp-aside .sidebar-menu-item-label { flex: 1; min-width: 0; }
.xp-aside .sidebar-menu-item-badge { margin-left: auto; }
.xp-aside .list-group-item .badge { float: none; min-width: 24px; justify-content: center; }
.xp-aside .list-group-item.active .sidebar-menu-item-icon-wrapper i { color: var(--accent-text); }

.page-link { background: var(--surface); border-color: var(--line); color: var(--text-2); }
.page-link:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.page-item.disabled .page-link { background: var(--surface); border-color: var(--line); color: var(--muted); }

/* Status pills (.label.status in Nexus lists) */
.label.status, span.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--pill);
  font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.status-active, .status-paid, .status-open, .status-completed, .status-accepted, .status-delivered {
  background: var(--accent-soft) !important; color: var(--accent-text) !important;
}
.status-pending, .status-unpaid, .status-customer-reply, .status-in-progress, .status-on-hold, .status-answered, .status-draft, .status-payment-pending {
  background: color-mix(in srgb, var(--warning) 14%, transparent) !important; color: var(--warning) !important;
}
.status-suspended, .status-overdue, .status-cancelled, .status-terminated, .status-fraud, .status-collections, .status-dead, .status-expired {
  background: color-mix(in srgb, var(--danger) 14%, transparent) !important; color: var(--danger) !important;
}
.status-refunded, .status-closed, .status-lost { background: var(--surface-3) !important; color: var(--muted) !important; }

/* Alerts */
.alert { line-height: 1.5; }
.alert-success { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--text-2); }
.alert-info { border-color: color-mix(in srgb, var(--info) 30%, transparent); background: color-mix(in srgb, var(--info) 7%, var(--surface)); color: var(--text-2); }
.alert-warning, .alert-danger { color: var(--text-2); }
.alert:not(:has(> .ic)) { display: block; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert .close { color: var(--text); text-shadow: none; opacity: .6; }
.alert-link { color: var(--text); font-weight: 500; }

/* Tabs and pills */
.nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { border: 0; border-radius: 10px 10px 0 0; color: var(--muted); padding: 10px 16px; }
.nav-tabs .nav-link:hover { color: var(--text); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
/* Service page tabs (Nexus "responsive-tabs-sm" paints them white) */
.responsive-tabs-sm .nav-item a:hover { background-color: transparent; color: var(--text); }
.nav-tabs.responsive-tabs-sm .nav-item a.active, .nav-tabs.responsive-tabs-sm .nav-item a.active:hover { background-color: var(--surface-2) !important; color: var(--text); }
div.product-details-tab-container.tab-content { padding: 20px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--surface) !important; }
@media (max-width: 767.98px) {
  .nav-tabs.responsive-tabs-sm { background: var(--surface); border-color: var(--line); }
  .responsive-tabs-sm .nav-item { border-bottom-color: var(--line) !important; }
  .responsive-tabs-sm-connector .channel { background: var(--surface); border-color: var(--line); }
  .responsive-tabs-sm-connector .bottom-border { border-color: var(--line); }
}
/* Only one tab (the subscription panel under "Manage"): show the panel as a plain card */
.nav-tabs.responsive-tabs-sm:has(> .nav-item:only-child),
.nav-tabs.responsive-tabs-sm:has(> .nav-item:only-child) ~ .responsive-tabs-sm-connector { display: none; }
.nav-tabs.responsive-tabs-sm:has(> .nav-item:only-child) ~ div.product-details-tab-container.tab-content { padding: 0; border: 0; background: transparent !important; }
.nav-tabs.responsive-tabs-sm:has(> .nav-item:only-child) ~ div.product-details-tab-container .module-client-area { padding: 0; text-align: left; }
.nav-pills .nav-link { color: var(--text-2); border-radius: var(--pill); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--accent); color: var(--accent-ink); }

/* Dropdowns, modals, popovers, tooltips */
.dropdown-menu { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; color: var(--text-2); }
.dropdown-item, .dropdown-menu a { color: var(--text-2); border-radius: 8px; }
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active { background: var(--surface-3); color: var(--text); }
.dropdown-divider { border-color: var(--line); }
.modal-content { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); color: var(--text-2); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-title { color: var(--text); }
.close { color: var(--text); text-shadow: none; }
.close:hover { color: var(--text); }
.modal-backdrop.show { opacity: .7; }
.popover { background: var(--surface-2); border-color: var(--line-2); border-radius: 14px; }
.popover-body { color: var(--text-2); }
.popover-header { background: var(--surface-3); border-color: var(--line); color: var(--text); }
.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { border-bottom-color: var(--surface-2); }
.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { border-top-color: var(--surface-2); }
.tooltip-inner { background: var(--surface-3); color: var(--text); }
.client-alerts a { color: var(--text-2); }

/* Breadcrumb */
.breadcrumb { background: transparent; padding: 0; margin: 0 0 18px; font-size: 13px; }
.breadcrumb-item, .breadcrumb-item a { color: var(--muted); }
.breadcrumb-item a:hover { color: var(--text); }
.breadcrumb-item.active { color: var(--text-2); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }

/* Page headings from Nexus and the order forms */
.header-lined { border: 0; margin: 0 0 24px; padding: 0; }
.header-lined h1, .font-size-36 { font: 500 clamp(1.8rem, 3vw, 2.4rem)/1.15 var(--f-display); color: var(--text); letter-spacing: -.02em; }
.header-lined p { color: var(--text-2); }
.primary-bg-color { background: var(--bg) !important; color: var(--text) !important; }
.sub-heading { border-color: var(--line) !important; }

/* Layout pieces this theme adds around inherited pages */
.xp-page { padding: 40px 0 88px; }
.xp-page-head { margin-bottom: 26px; }
.xp-page-head h1, .xp-page-head .h1 { margin: 0; font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; line-height: 1.12; color: var(--text); font-size: clamp(1.8rem, 3vw, 2.4rem); }
.xp-with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.xp-with-aside.is-left { grid-template-columns: 280px minmax(0, 1fr); }
.xp-aside { display: grid; gap: 16px; }
.xp-aside .card { margin: 0; }
.xp-content { min-width: 0; }
.xp-content > .card:first-child, .xp-content > form > .card:first-child { margin-top: 0; }
@media (max-width: 1000px) {
  .xp-with-aside, .xp-with-aside.is-left { grid-template-columns: minmax(0, 1fr); }
}

/* Checkout steps (added to the standard_cart checkout by xplay.js) */
.xp-co-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.xp-co-panel[hidden] { display: none !important; }
.xp-co-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.xp-co-actions .btn-primary { min-width: 200px; }

/* Theme pieces added for WHMCS */
.logo-img { display: block; max-height: 38px; width: auto; }
.xp-main { display: block; }
/* Cart button: the round button clips its content, so let the item count sit on its edge */
.btn.xp-cart { position: relative; overflow: visible; }
.xp-cart .count {
  position: absolute; top: -6px; right: -6px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  box-shadow: 0 0 0 2px var(--bg); line-height: 1; font-variant-numeric: tabular-nums;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
}
.xp-locale { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.xp-locale:hover { color: var(--text); }
.xp-auth { max-width: 460px; margin: 8px auto 0; }
.xp-auth-card { padding: 32px; }
.xp-auth-card h1 { font-size: 30px; margin-bottom: 8px; }
.xp-auth-card .auth-alt { margin: 22px 0 0; text-align: center; font-size: 14px; }
.xp-svc { margin-bottom: 8px; }
.ca-content > .alert, .ca-content > .xp-content > .alert { margin-bottom: 16px; }
.modal-localisation .item-selector .item { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); }
.modal-localisation .item-selector .item.active, .modal-localisation .item-selector .item:hover { background: var(--surface-3); color: var(--text); }
.client-alerts { list-style: none; margin: 0; padding: 0; }
.client-alerts li a { display: flex; gap: 10px; padding: 8px 4px; }
@media (max-width: 760px) {
  .xp-auth-card { padding: 24px 20px; }
  .xp-page { padding: 24px 0 64px; }
}

/* WHMCS loading overlay: Nexus's #fullpage-overlay rule outranks .w-hidden, so keep it
   hidden until WHMCS shows it (jQuery .show() sets an inline style, which still wins). */
#fullpage-overlay.w-hidden { display: none; }

/* Nexus also styles .label (as a small pill); undo that for our form labels */
.label:not(.status) { padding: 0; border-radius: 0; text-align: left; white-space: normal; line-height: 1.4; margin-bottom: 0; max-width: none; }
/* Icon-only buttons keep their square shape when combined with .btn-sm / .btn-lg */
.btn.btn-icon { padding: 0; }

/* Dashboard: username with an inline copy button */
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.copy-row .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.copy-btn:hover { color: var(--text); border-color: var(--line-2); }
.copy-btn .ic { width: 15px; height: 15px; }
.copy-row .mono { font-size: 15px; }

/* WHMCS hides elements with .w-hidden until its scripts show them (inline style). Our
   component classes (.alert, .btn, .card) set display too, so restate it with more weight. */
.w-hidden.w-hidden { display: none; }

/* 14 · Nexus variables and hover states -----------------------------------
   Nexus (the parent theme) colours its pages with its own CSS variables,
   tuned for a light theme. Map every one to this theme's tokens so inherited
   pages (announcements, tickets, product details...) follow the dark and
   light schemes. --bg and --text share names with ours and need no mapping. */
:root {
  --primary: var(--accent); --primary-lifted: var(--accent-pale); --primary-accented: var(--accent);
  --secondary: var(--surface-3); --secondary-lifted: var(--surface-2); --secondary-accented: var(--surface-3);
  --success: var(--accent); --success-lifted: var(--accent-pale); --success-accented: var(--accent);
  --info-lifted: var(--info); --info-accented: var(--info);
  --notice: #b9a2ff; --notice-lifted: #b9a2ff; --notice-accented: #b9a2ff;
  --warning-lifted: var(--warning); --warning-accented: var(--warning);
  --error: var(--danger); --error-lifted: var(--danger); --error-accented: var(--danger);
  --grayscale: var(--surface-3); --grayscale-lifted: var(--surface-2); --grayscale-accented: var(--surface);
  --neutral: var(--muted); --neutral-lifted: var(--text-2); --neutral-accented: var(--text);
  --text-inverted: var(--bg); --text-muted: var(--muted); --text-lifted: var(--text-2); --text-accented: var(--text);
  --border-muted: var(--line); --border: var(--line-2); --border-lifted: var(--line-2); --border-accented: color-mix(in srgb, var(--text) 30%, transparent);
  --bg-muted: var(--bg-2); --bg-lifted: var(--surface); --bg-accented: var(--surface-2); --bg-inverted: var(--text);
  --light: var(--surface-2); --dark: var(--surface-3); --gray: var(--muted); --gray-dark: var(--surface-3);
}

/* Bootstrap darkens .btn text on hover (#212529); keep each style readable */
.btn.btn-primary:hover, .btn.btn-pale:hover, .btn.btn-success:hover, .btn.btn-primary:focus, .btn.btn-success:focus { color: var(--accent-ink); }
.btn.btn-ghost:hover, .btn.btn-dark:hover, .btn.btn-default:hover, .btn.btn-secondary:hover, .btn.btn-light:hover, .btn.btn-info:hover,
.btn.btn-outline-primary:hover, .btn.btn-outline-secondary:hover, .btn.btn-outline-light:hover, .btn.btn-default:focus { color: var(--text); }
.btn.btn-danger:hover, .btn.btn-outline-danger:hover { color: var(--danger); }
.btn.btn-warning:hover { color: var(--warning); }
.btn.btn-link:hover, .btn.btn-link:focus { color: var(--accent-text); text-decoration: underline; }
/* Links that carry their own colour keep it on hover (Bootstrap/Nexus recolour a:hover) */
.logo:hover { color: var(--logo-text); }
.link-arrow:hover, .list-row:hover, .app-chip:hover, .ca-nav a:hover, .ca-links a:hover, .footer-col a:hover, .social:hover { text-decoration: none; }
.link-arrow:hover, .list-row:hover { color: var(--text); }
.link-accent:hover { color: var(--accent-text); }
.link:hover { color: var(--text); }
.social:hover { color: var(--accent-ink); }

/* Status labels Nexus uses outside tables (users, contacts...) */
.label[class*="label-"]:not(.status) { display: inline-flex; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 500; }
.label.label-info, .label.label-primary { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.label.label-success { background: var(--accent-soft); color: var(--accent-text); }
.label.label-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.label.label-danger { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.label.label-default { background: var(--surface-3); color: var(--text-2); }

/* Bootstrap-switch toggles (marketing opt-in, account settings) */
.bootstrap-switch { border-color: var(--line-2) !important; background: var(--bg-2); }
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bootstrap-switch .bootstrap-switch-handle-off, .bootstrap-switch .bootstrap-switch-label { background: var(--surface-2); color: var(--text-2); }

/* Inputs styled by page-specific WHMCS CSS that loads after this file */
#registration .field, #registration .form-control, body .dataTables_wrapper .dataTables_filter input.form-control,
body .dataTables_wrapper .dataTables_filter input, body .dataTables_wrapper .dataTables_length select {
  height: auto; min-height: 42px; padding: 8px 12px; border-radius: 12px; font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
}
#registration .field:focus, #registration .form-control:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
#registration .prepend-icon .field { padding-left: 40px; }
#registration .prepend-icon .field-icon { color: var(--muted); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-2); color: var(--text-2); }

/* Service page (Nexus clientareaproductdetails) */
div.product-details div.product-icon { background-color: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
div.product-details div.product-icon h3, div.product-details div.product-icon h4 { color: var(--text); }
div.product-details div.product-icon .fa-stack .fa-circle { color: var(--accent-soft); }
div.product-details div.product-icon .fa-stack .fa-stack-1x { color: var(--accent-text); }
/* IPTV plans: a TV instead of Nexus's box icon */
div.product-details div.product-icon .fa-archive::before { content: "\f26c"; }
.product-status { border-radius: var(--r); }
.product-status-text { color: var(--text); }

/* Announcements, knowledgebase and downloads lists */
.announcements .announcement article { background: var(--surface); border-left-color: var(--accent); border-radius: var(--r); color: var(--text-2); }
.announcements .announcement h1 a, .announcements .announcement h2 a { color: var(--text); }
.kb-article-item, .kb-category-item { color: var(--text-2); }


/* Nexus pairs --bg-inverted with white text (dark buttons), so keep it dark in both schemes */
:root { --bg-inverted: #1d1d1d; --text-inverted: #ffffff; }

/* Two-factor enable/disable buttons (security page), styled white by WHMCS */
body .btn.btn-success.open-modal.twofa-config-link.enable { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
body .btn.btn-success.open-modal.twofa-config-link.enable:hover { background: var(--accent-pale); color: var(--accent-ink); }
body .btn.open-modal.twofa-config-link.disable { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }

/* Service status box on the service page */
.product-status { background: var(--surface-3); }
.product-status-active { background: var(--accent); }
.product-status-pending { background: var(--warning); }
.product-status-suspended, .product-status-terminated, .product-status-cancelled, .product-status-fraud { background: var(--danger); }
.product-status .product-status-text { color: #0b0b0b; font-weight: 600; }

/* Bootstrap-switch "off" side */
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-secondary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-secondary,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }

/* Keep WHMCS-hidden elements hidden (restated after the rules above) */
.w-hidden.w-hidden { display: none; }

/* Reseller packs: "Contact us" instead of a price */
.price.price-ask { font-size: 32px; }

/* Contact & reseller forms: captcha box and the hidden spam-trap field */
.xp-captcha { margin: 4px 0 18px; min-height: 78px; }
.xp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Help center article list: excerpt and hover */
body .kb-article-item small { color: var(--muted); }
body .kb-article-item:hover, body .kb-article-item:focus { background: var(--surface-2); color: var(--text); }
body .kb-article-item:hover small { color: var(--text-2); }

/* Ticket view: requestor badges, reply header and the reply editor */
body .label.requestor-badge { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); }
/* Requestor labels in the ticket sidebar (Nexus paints the owner one in the accent colour with light text) */
body .label[class*="requestor-type-"]:not(.requestor-badge) { background: var(--surface-3); color: var(--text); }
body .label.requestor-type-owner:not(.requestor-badge) { background: var(--accent-soft); color: var(--accent-text); }
/* Recent tickets sidebar: WHMCS writes each status in its admin colour (Answered is black), unreadable on dark */
body .recent-ticket small span[style*="color"] { color: var(--text-2) !important; font-weight: 500; }
body .view-ticket .posted-by { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
body .md-editor { border-color: var(--line-2); background: var(--surface); }
body .md-editor > .btn-toolbar { background-color: var(--surface-2) !important; }
body .md-editor > .md-header, body .md-editor .md-footer { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
body .md-editor .md-footer .small-font { color: var(--text-2); }
body .md-editor > textarea, body .md-editor > .md-preview { background: var(--surface); color: var(--text); border-color: var(--line); }
body .md-editor .btn-default, body .md-editor .btn-group > .btn { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
body .md-editor .btn-default:hover, body .md-editor .btn-group > .btn:hover { background: var(--line-2); color: var(--text); }
body .md-editor > textarea.markdown-editor, body .md-editor > .md-preview { background-color: var(--surface) !important; color: var(--text); }

/* File pickers (ticket attachments) */
body .custom-file-label { background: var(--bg-2); border-color: var(--line-2); color: var(--text-2); }
body .custom-file-label::after { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }

/* Nexus paints html with --bg-inverted; keep the page background under long pages */
html { background: var(--bg); }
