/* INTPROTO-TV — Premium Futuristic Dark design system (tokens first, then components) */
:root {
  /* ---- Design tokens (INTPROTO-TV — Void Ember) ---- */
  /* colour — UltraIO theme: deep purple neon */
  --primary: #00A8B5; --primary2: color-mix(in srgb, var(--primary) 55%, #03161a); --accent: #22D3EE; --info: #38E0FF;
  --bg: #050C0E; --surface: #101A1F; --elevated: #18262D; --border: #26424B;
  --text: #F2FEFF; --muted: #93A9AF; --ok: #34D399; --warn: #FFC145; --bad: #FF6B7A;
  /* older names used across the app, mapped to the tokens above */
  --panel: var(--surface); --panel2: var(--elevated); --line: var(--border); --line2: color-mix(in srgb, var(--border) 72%, transparent);
  /* spacing: 8-point scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  /* shape, depth, motion */
  --r: 16px; --r-sm: 10px; --r-lg: 20px; --tap: 44px; --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 14px 36px -18px rgba(0,0,0,.85);
  --glow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 46px -18px color-mix(in srgb, var(--primary) 70%, transparent);
  --ease: cubic-bezier(.2,.8,.2,1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; }
body { font-size: 15px; line-height: 1.45; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70vmax 70vmax at 10% 10%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 60%), radial-gradient(70vmax 70vmax at 90% 90%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%);
  animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
a { color: var(--accent); }
.skip-link { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 200; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .45em; line-height: 1.2; font-family: inherit; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.02rem; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .hidden { display: none !important; }
.boot { display: grid; place-items: center; height: 100vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 120px; border-radius: var(--r); margin-bottom: 14px; background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton.short { height: 260px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

/* brand */
.brand-name { font-family: inherit; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
@keyframes sheen { to { background-position: -250% 0; } }
.brand-name.xl { font-size: 1.7rem; display: block; margin-top: 14px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 60%, transparent); }
.brand b { display: block; font-size: 1.05rem; } .brand span { color: var(--muted); font-size: .82rem; }
.logo-mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary2)); flex: 0 0 auto; }
.logo-mark.big { width: 110px; height: 110px; font-size: 40px; margin: auto; }
.hero { text-align: center; margin-bottom: 22px; }
.hero-logo { position: relative; width: 132px; height: 132px; margin: 0 auto; animation: float 5s ease-in-out infinite; }
.hero-logo img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; z-index: 1; }
.hero-logo i { position: absolute; inset: -8px; border-radius: 50%; background: conic-gradient(from 0deg, var(--primary), transparent 30%, var(--accent), transparent 70%, var(--primary)); animation: spin 4s linear infinite; filter: blur(2px); }
.hero-logo::after { content: ''; position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 45%, transparent), transparent 70%); animation: pulse 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { opacity: .45; transform: scale(1.08); } }
.hero-tag { letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; margin-top: 4px; }

/* buttons & inputs */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel2); padding: 9px 14px; border-radius: 11px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--text); white-space: nowrap; transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: rgba(255,255,255,.1); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #22D3EE, var(--primary) 55%, #087A85); border: 0; color: #03272C; font-weight: 800; letter-spacing: .01em; box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.primary::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn.primary:hover::after { left: 130%; }
.btn.danger { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: .84rem; border-radius: 9px; }
.btn.block { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.field small, .toggle small { color: var(--muted); font-size: .77rem; display: block; }
input, select, textarea { background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: 11px; padding: 10px 12px; width: 100%; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
input[type=color] { padding: 2px; height: 40px; }
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
select option { background: var(--elevated); color: var(--text); }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--line2); }
.toggle input { display: none; }
.toggle i { flex: 0 0 42px; height: 24px; border-radius: 20px; background: var(--panel2); position: relative; transition: .25s var(--ease); margin-top: 1px; }
.toggle i::after { content: ''; position: absolute; inset-inline-start: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .25s var(--ease); }
.toggle input:checked + i { background: var(--primary); box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 60%, transparent); }
.toggle input:checked + i::after { inset-inline-start: 21px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); transition: box-shadow .3s, border-color .3s, transform .3s var(--ease); }
.card:hover { box-shadow: var(--glow); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-active { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); } .st-active::before { animation: blink 2s infinite; }
.st-expiring { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.st-expired { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.st-disabled { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
@keyframes blink { 50% { opacity: .3; } }
.badge-demo { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; }
.tagp { display: inline-block; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; margin: 2px; }

/* toast & modal */
#toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: rgba(13,21,34,.97); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: pop .3s var(--ease); max-width: 90vw; }
#toast div.err { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
@media (max-width: 899px) { #toast { bottom: calc(72px + var(--safe-b)); } }
.modal-bg { position: fixed; inset: 0; background: rgba(2,6,12,.72); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: linear-gradient(180deg, #0f1826, #0a111c); border: 1px solid var(--line); border-radius: 20px; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6), var(--glow); animation: pop .3s var(--ease); }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; flex: 1; }
.x { background: var(--panel2); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; transition: transform .2s; }
.x:hover { transform: rotate(90deg); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background-size: cover; background-position: center; }
.login-card { width: min(420px, 100%); background: rgba(9,15,25,.78); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 26px; padding: 30px 24px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5), var(--glow); animation: pop .5s var(--ease); }
.login-card h2 { text-align: center; } .login-card > p.muted { text-align: center; }
.pw { position: relative; } .pw button { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; }
.login-foot { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--muted); }
.err-box { background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); padding: 9px 12px; border-radius: 11px; margin-bottom: 12px; font-size: .9rem; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* admin layout */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: rgba(4,8,15,.6); backdrop-filter: blur(14px); border-inline-end: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; }
.side .brand { padding: 0 8px; margin-bottom: 20px; }
.side .brand-name { font-size: .98rem; }
.nav { flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: var(--muted); text-decoration: none; font-weight: 600; cursor: pointer; margin-bottom: 2px; transition: background .2s, color .2s, transform .2s var(--ease); }
.nav a:hover { background: var(--panel); color: var(--text); transform: translateX(3px); }
.nav a.on { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 22%, transparent), transparent); color: #fff; }
.nav a.on::before { content: ''; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 4px; border-start-end-radius: 4px; border-end-end-radius: 4px; background: var(--primary); box-shadow: 0 0 12px var(--primary); }
.nav .ic { width: 20px; text-align: center; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 12px 8px 4px; border-top: 1px solid var(--line2); margin-top: 10px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); z-index: 5; }
.topbar h2 { margin: 0; font-size: 1.2rem; }
.tb-logo { display: none; width: 34px; height: 34px; border-radius: 50%; }
.chip-user { color: var(--muted); }
.content { padding: 22px; max-width: 1240px; }
.content > * { animation: fadeUp .45s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .05s; } .content > *:nth-child(3) { animation-delay: .1s; } .content > *:nth-child(4) { animation-delay: .15s; } .content > *:nth-child(5) { animation-delay: .2s; } .content > *:nth-child(n+6) { animation-delay: .25s; }
.mobile-nav { display: none; }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { display: none; }
  .tb-logo { display: block; } .chip-user { display: none; }
  .mobile-nav { display: flex; overflow-x: auto; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 63px; z-index: 4; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
  .mobile-nav a { flex: 0 0 auto; padding: 7px 12px; border-radius: 99px; background: var(--panel); color: var(--muted); font-weight: 600; font-size: .84rem; text-decoration: none; cursor: pointer; border: 1px solid var(--line2); }
  .mobile-nav a.on { background: var(--primary); color: #120404; border-color: transparent; box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 50%, transparent); }
  .content { padding: 14px; } .topbar { padding: 12px 14px; flex-wrap: wrap; row-gap: 8px; }
  .topbar h2 { flex: 1 1 auto; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; transition: transform .25s var(--ease), box-shadow .25s; animation: fadeUp .5s var(--ease) both; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.stat::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%); }
.stat:nth-child(2) { animation-delay: .04s; } .stat:nth-child(3) { animation-delay: .08s; } .stat:nth-child(4) { animation-delay: .12s; } .stat:nth-child(5) { animation-delay: .16s; } .stat:nth-child(n+6) { animation-delay: .2s; }
.stat b { display: block; font-size: 1.6rem; margin-top: 2px; font-family: inherit; font-weight: 800; }
.stat span { color: var(--muted); font-size: .8rem; font-weight: 600; display: block; }
.stat.c-ok b { color: var(--ok); } .stat.c-warn b { color: var(--warn); } .stat.c-bad b { color: var(--bad); } .stat.c-acc b { color: var(--accent); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; font-size: .74rem; color: var(--muted); }
.bars i { display: block; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--primary)); min-height: 3px; transform-origin: bottom; animation: grow .8s var(--ease) both; box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 40%, transparent); }
@keyframes grow { from { transform: scaleY(0); } }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: start; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.tbl-wrap { overflow-x: auto; }
.prog { height: 6px; background: var(--panel2); border-radius: 9px; overflow: hidden; min-width: 80px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), var(--ok)); border-radius: 9px; transform-origin: left; animation: growx .9s var(--ease) both; }
.prog.warn i { background: linear-gradient(90deg, var(--warn), var(--warn)); } .prog.bad i { background: var(--bad); }
@keyframes growx { from { transform: scaleX(0); } }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.list-item:last-child { border-bottom: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 45%, transparent), color-mix(in srgb, var(--accent) 30%, transparent)); flex: 0 0 auto; border: 1px solid var(--line); }
.cust-cards { display: none; }
@media (max-width: 760px) {
  .cust-table { display: none; } .cust-cards { display: block; }
  .cc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; animation: fadeUp .4s var(--ease) both; }
}
.action-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.action-row h4 { margin: 8px 0 0; text-transform: capitalize; }
@media (max-width: 640px) { .action-row { grid-template-columns: 1fr; } }
.code { font-family: ui-monospace, Menlo, monospace; background: rgba(0,0,0,.4); border: 1px solid var(--line2); border-radius: 11px; padding: 10px; font-size: .8rem; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
.tags code { background: var(--panel2); padding: 2px 6px; border-radius: 6px; margin: 2px; display: inline-block; font-size: .78rem; }
.preview-box { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.preview-box .login-wrap { min-height: 520px; }
.plan-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.plan-row input { padding: 8px 10px; }
@media (max-width: 640px) { .plan-row { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.chips a { flex: 0 0 auto; padding: 7px 13px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line2); cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: .2s; text-transform: capitalize; }
.chips a:hover { color: var(--text); border-color: var(--line); }
.chips a.on { background: var(--primary); color: #120404; border-color: transparent; box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 50%, transparent); }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tm { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s; animation: fadeUp .45s var(--ease) both; }
.tm:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.tm.off { opacity: .55; }
.perm-tags { min-height: 26px; }
.perm-list .toggle { padding: 8px 0; }
body.np-customers_edit [data-perm~=customers_edit], body.np-customers_delete [data-perm~=customers_delete], body.np-customers_view [data-perm~=customers_view],
body.np-finance_edit [data-perm~=finance_edit], body.np-finance_view [data-perm~=finance_view], body.np-stock [data-perm~=stock], body.np-settings [data-perm~=settings],
body.np-exports [data-perm~=exports], body.np-calls [data-perm~=calls], body.np-master_sheets [data-perm~=master_sheets], body.np-customers_phone [data-perm~=customers_phone], body.np-marketing [data-perm~=marketing], body.np-secrets [data-perm~=secrets] { display: none !important; }

/* user app */
.uapp { min-height: 100vh; padding-bottom: calc(80px + var(--safe-b)); }
.uhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; position: sticky; top: 0; z-index: 6; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.uhead .brand { margin: 0; } .uhead .brand img, .uhead .logo-mark { width: 38px; height: 38px; font-size: 16px; }
.uhead .brand-name { font-size: .95rem; }
.ubody { padding: 16px; max-width: 1300px; margin: 0 auto; }
.ubody > * { animation: fadeUp .45s var(--ease) both; }
.ubody > *:nth-child(2) { animation-delay: .05s; } .ubody > *:nth-child(3) { animation-delay: .1s; } .ubody > *:nth-child(n+4) { animation-delay: .15s; }
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; justify-content: space-around; padding: 6px 6px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; cursor: pointer; border-radius: 12px; transition: .25s var(--ease); }
.bnav a .ic { font-size: 20px; transition: transform .25s var(--ease); }
.bnav a.on { color: #fff; background: color-mix(in srgb, var(--primary) 18%, transparent); }
.bnav a.on .ic { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 0 8px var(--primary)); }
@media (min-width: 900px) { .bnav { left: 50%; transform: translateX(-50%); bottom: 14px; width: 540px; border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--glow); } }
.sub-card { position: relative; overflow: hidden; border-radius: 22px; padding: 20px; margin-bottom: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 40%, #08111d), #0b1424 60%, color-mix(in srgb, #2563eb 30%, #08111d)); border: 1px solid var(--line); box-shadow: var(--glow); }
.sub-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 4s linear infinite; pointer-events: none; }
.sub-card .big { font-size: 2.6rem; font-weight: 900; line-height: 1; font-family: inherit; }
.notice { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; border: 1px solid; }
.notice.info { background: color-mix(in srgb, var(--primary) 10%, transparent); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.notice.warning { background: color-mix(in srgb, var(--warn) 8%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.success { background: color-mix(in srgb, var(--ok) 8%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.notice.danger { background: color-mix(in srgb, var(--bad) 8%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { padding: 18px 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); border: 1px solid var(--line); cursor: pointer; text-align: start; transition: transform .25s var(--ease), box-shadow .25s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.tile .ic { font-size: 28px; display: inline-block; transition: transform .3s var(--ease); } .tile:hover .ic { transform: scale(1.15) rotate(-6deg); }
.tile b { display: block; margin-top: 8px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ch { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; min-width: 0; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.ch:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 60%, transparent); box-shadow: var(--glow); }
.ch img, .ch .noimg { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.04); display: grid; place-items: center; font-size: 24px; }
.ch span { font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.poster { cursor: pointer; position: relative; min-width: 0; }
.poster .img { aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: var(--panel2) center/cover; display: grid; place-items: center; font-size: 30px; transition: transform .3s var(--ease), box-shadow .3s; border: 1px solid var(--line2); }
.poster:hover .img { transform: scale(1.04); box-shadow: var(--glow); }
.poster span { display: block; font-size: .82rem; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav { position: absolute; top: 6px; inset-inline-end: 6px; background: rgba(0,0,0,.55); border: 0; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 15px; color: #fff; z-index: 2; transition: transform .2s; }
.fav:hover { transform: scale(1.15); } .fav.on { color: var(--warn); }
.player video { width: 100%; max-height: 62vh; background: #000; border-radius: 14px; display: block; box-shadow: var(--glow); }
.epg-item { padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: .88rem; }
.epg-item b { color: var(--accent); margin-inline-end: 6px; }
.ep { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line2); margin-bottom: 8px; background: var(--panel); transition: .2s; }
.ep:hover { border-color: var(--primary); transform: translateX(3px); }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty .ic { font-size: 40px; display: block; margin-bottom: 8px; }
.block-screen { text-align: center; padding: 40px 20px; }
.block-screen .ic { font-size: 54px; display: inline-block; animation: float 4s ease-in-out infinite; }

/* finance */
.hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .88rem; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 600; }
.hb-t { height: 12px; background: var(--panel2); border-radius: 8px; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 8px; min-width: 2px; transform-origin: left; animation: growx .9s var(--ease) both; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.acc { background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.acc:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.acc-bal { font-size: 1.45rem; font-weight: 800; margin: 6px 0 2px; font-family: inherit; }
.acc-bal.neg { color: var(--bad); }
.acc-row { display: grid; grid-template-columns: 2fr 1fr 1.3fr 60px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.acc-row input, .acc-row select { padding: 8px 10px; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.bars2 { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 12px; }
.bars2 > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; font-size: .7rem; color: var(--muted); min-width: 0; }
.bars2 .bb { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bars2 .bb i { display: block; width: 42%; max-width: 22px; border-radius: 5px 5px 2px 2px; min-height: 2px; transform-origin: bottom; animation: grow .8s var(--ease) both; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 10px; }
svg polyline { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) { .acc-row { grid-template-columns: 1fr 1fr; } .hbar { grid-template-columns: 80px 1fr auto; } }

/* customer plans */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.plan-c { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease), box-shadow .2s; }
.plan-c:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.plan-c .pp { font-family: inherit; font-weight: 900; font-size: 1.5rem; color: var(--accent); }

/* TV remote focus */
[data-act]:focus-visible, .btn:focus-visible, a:focus-visible, .ch:focus, .poster:focus, .tile:focus { outline: 3px solid var(--accent); outline-offset: 3px; box-shadow: 0 0 24px color-mix(in srgb, var(--primary) 70%, transparent); }
.poster:focus .img, .ch:focus { transform: scale(1.05); }

/* Arabic (right-to-left) */
[dir=rtl] body, [dir=rtl] h1, [dir=rtl] h2, [dir=rtl] h3 { font-family: Cairo, Tahoma, system-ui, sans-serif; }
[dir=rtl] .brand-name { font-family: inherit; }

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

/* Phones & tablets: keep it light (iPhone Safari memory) */
@media (max-width: 1024px), (hover: none) {
  .modal-bg { backdrop-filter: none; background: rgba(2,6,12,.88); }
  .login-card { backdrop-filter: none; background: rgba(9,15,25,.96); }
  .topbar, .mobile-nav, .uhead, .bnav, .side { backdrop-filter: none; background: #051f19; }
  .hero-logo i { filter: none; }
  .stat::after { display: none; }
  .brand-name { animation: none; }
}

/* ---- Fit every screen (iPhone, iPad, Android, desktop) ---- */
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { max-width: 100vw; }
/* iPhone zooms into text boxes smaller than 16px — keep them at 16px so the page never zooms */
input, select, textarea { font-size: 16px; }
.grid2, .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.grid2 > *, .grid3 > *, .card, .stat, .row > *, .list-item > * { min-width: 0; }
.list-item b, .card h3, .stat span { overflow-wrap: anywhere; }
.stats { grid-template-columns: repeat(auto-fill, minmax(min(150px, 44%), 1fr)); }
img, video, iframe, svg { max-width: 100%; }
/* notch / home-bar safe areas */
.topbar, .uhead { padding-top: max(12px, env(safe-area-inset-top)); padding-inline-start: max(14px, env(safe-area-inset-left)); padding-inline-end: max(14px, env(safe-area-inset-right)); }
.login-wrap { padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
@media (max-width: 860px) { .mobile-nav { top: calc(58px + env(safe-area-inset-top)); } }
@media (max-width: 380px) {
  .login-card { padding: 22px 16px 18px; border-radius: 20px; }
  .hero-logo { width: 104px; height: 104px; }
  .brand-name.xl { font-size: 1.35rem; }
  .content, .ubody { padding: 12px; }
  .stat b { font-size: 1.3rem; }
  .btn { padding: 8px 11px; }
  .topbar h2 { font-size: 1.05rem; }
}
.modal { max-height: calc(100dvh - 32px); }
@supports not (height: 100dvh) { .modal { max-height: 92vh; } }
.bars, .bars2 { gap: 6px; } .bars > div, .bars2 > div { min-width: 0; }

.rp-row { display: grid; grid-template-columns: 2fr 1fr 1fr 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.rp-row input { padding: 8px 10px; }

/* channel logos */
.ch img, .ch .noimg { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: rgba(255,255,255,.04); display: grid; place-items: center; font-family: inherit; font-weight: 900; font-size: 20px; color: #fff; letter-spacing: .02em; }
.poster .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster .img .noimg.big { width: 100%; height: 100%; display: grid; place-items: center; font-family: inherit; font-weight: 900; font-size: 30px; color: #fff; }
.ch.sk .noimg, .ch.sk span { background: linear-gradient(90deg, var(--panel) 0%, var(--panel2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 10px; }

/* ---- advanced player ---- */
.vp { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; max-height: 72vh; width: 100%; outline: none; }
.vp:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; }
.vp video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
.vp video::cue { background: rgba(0,0,0,.65); font-size: 1.05em; }
.vp-spin { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vp-msg { position: absolute; left: 0; right: 0; top: 40%; text-align: center; padding: 0 16px; color: #fff; text-shadow: 0 2px 8px #000; }
.vp-msg:empty { display: none; }
.vp-big { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; font-size: 30px; color: #fff; background: color-mix(in srgb, var(--primary) 80%, transparent); display: none; place-items: center; cursor: pointer; box-shadow: 0 0 30px var(--primary); }
.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85)); opacity: 0; transform: translateY(8px); transition: .25s var(--ease); pointer-events: none; }
.vp.show .vp-bar { opacity: 1; transform: none; pointer-events: auto; }
.vp-row { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.vp-b { background: transparent; border: 0; color: #fff; font-size: 17px; min-width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-weight: 800; font-family: inherit; flex: 0 0 auto; }
.vp-b:hover, .vp-b:focus-visible { background: rgba(255,255,255,.15); outline: none; }
.vp-live { color: var(--bad); font-weight: 800; font-size: .8rem; margin-inline-start: 4px; letter-spacing: .05em; }
.vp-time { color: var(--text); font-size: .8rem; margin-inline-start: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; padding: 0; border: 0; height: 22px; cursor: pointer; box-shadow: none; }
.vp input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); }
.vp input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: -5px; box-shadow: 0 0 10px var(--primary); }
.vp input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); }
.vp input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 0; }
.vp-seek { width: 100%; display: block; margin-bottom: 2px; }
.vp-vol { width: 90px; flex: 0 0 auto; }
.vp-menu { position: absolute; inset-inline-end: 10px; bottom: 62px; min-width: 190px; max-height: 60%; overflow: auto; background: rgba(10,16,26,.96); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: none; z-index: 3; }
.vp-menu.open { display: block; animation: pop .2s var(--ease); }
.vp-mi { display: block; width: 100%; text-align: start; background: transparent; border: 0; color: #fff; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.vp-mi:hover, .vp-mi:focus { background: rgba(255,255,255,.1); outline: none; }
.vp-mi.on { color: var(--accent); font-weight: 700; }
.vp-mi[disabled] { color: var(--muted); cursor: default; }
.vp-mh { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px 4px; }
@media (max-width: 560px) { .vp-vol { display: none; } .vp-b { min-width: 34px; font-size: 15px; } .vp-time { font-size: .72rem; } }

/* ================= DAY THEME (light) ================= */
html { transition: background-color .4s; }
[data-theme=light] {
  --bg: #F2FAFA; --surface: #FFFFFF; --elevated: #E7F0F1; --border: #D5E2E4;
  --text: #0A1E22; --muted: #3F5960; --primary: #0E7490; --primary2: #155E75; --accent: #0369A1; --info: #0369A1;
  --ok: #059669; --warn: #B45309; --bad: #DC2626;
  --shadow: 0 1px 2px rgba(24,24,32,.06), 0 16px 34px -18px rgba(24,24,32,.28);
  --glow: 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent), 0 14px 32px -16px color-mix(in srgb, var(--primary) 55%, transparent);
  color-scheme: light;
}
[data-theme=dark] { color-scheme: dark; }
[data-theme=light] body::before { background: radial-gradient(60vmax 60vmax at 0% 0%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%), radial-gradient(60vmax 60vmax at 100% 100%, transparent, transparent 70%); }
[data-theme=light] .card, [data-theme=light] .stat, [data-theme=light] .acc, [data-theme=light] .tile, [data-theme=light] .tm, [data-theme=light] .plan-c, [data-theme=light] .cc, [data-theme=light] .ch, [data-theme=light] .ep { background: #fff; border-color: var(--line2); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
[data-theme=light] .stat::after { opacity: .5; }
[data-theme=light] input, [data-theme=light] select, [data-theme=light] textarea { background: #fff; border-color: rgba(15,23,42,.15); color: var(--text); }
[data-theme=light] select option { background: #fff; color: #0f172a; }
[data-theme=light] .modal { background: #fff; border-color: var(--line2); box-shadow: 0 30px 80px rgba(15,23,42,.25); }
[data-theme=light] .modal-bg { background: rgba(15,23,42,.45); }
[data-theme=light] .login-card { background: rgba(255,255,255,.95); border-color: var(--line2); box-shadow: 0 30px 80px rgba(15,23,42,.12); }
[data-theme=light] .side { background: #fff; border-color: var(--line2); }
[data-theme=light] .topbar, [data-theme=light] .uhead, [data-theme=light] .bnav, [data-theme=light] .mobile-nav { background: rgba(255,255,255,.96); border-color: var(--line2); }
[data-theme=light] .nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(14,165,196,.16), transparent); }
[data-theme=light] .mobile-nav a.on, [data-theme=light] .chips a.on { color: #fff; }
[data-theme=light] .bnav a.on { color: var(--primary2); background: color-mix(in srgb, var(--primary) 9%, transparent); }
[data-theme=light] .brand-name { background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
[data-theme=light] #toast div { background: #fff; color: #0f172a; border-color: var(--line2); box-shadow: 0 10px 30px rgba(15,23,42,.15); }
[data-theme=light] #toast div.err { color: #b91c1c; }
[data-theme=light] .code { background: #f1f5f9; border-color: var(--line2); color: #0f172a; }
[data-theme=light] .err-box { color: #b91c1c; background: #fef2f2; }
[data-theme=light] .btn { background: #fff; border-color: rgba(15,23,42,.14); color: var(--text); }
[data-theme=light] .btn:hover { background: #f8fafc; }
[data-theme=light] .btn.primary { color: #FFFFFF; background: linear-gradient(135deg, #0891B2, var(--primary) 60%, var(--primary2)); }
[data-theme=light] .btn.danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
[data-theme=light] .btn.ghost { background: transparent; }
[data-theme=light] .st-active { color: #15803d; background: #dcfce7; } [data-theme=light] .st-expiring { color: #b45309; background: #fef3c7; }
[data-theme=light] .st-expired { color: #b91c1c; background: #fee2e2; } [data-theme=light] .st-disabled { color: #475569; background: #e2e8f0; }
[data-theme=light] .stat.c-ok b, [data-theme=light] .pos { color: #15803d; } [data-theme=light] .stat.c-warn b { color: #b45309; }
[data-theme=light] .stat.c-bad b, [data-theme=light] .neg, [data-theme=light] .acc-bal.neg { color: #b91c1c; } [data-theme=light] .stat.c-acc b { color: var(--primary2); }
[data-theme=light] .sub-card { background: linear-gradient(135deg, #e0f7fb, #fff 60%, #e0f2fe); border-color: var(--line); }
[data-theme=light] .notice { color: var(--text); }
[data-theme=light] .tbl tbody tr:hover td { background: rgba(14,165,196,.05); }
[data-theme=light] .avatar { color: #0F6E55; background: rgba(15,110,85,.12); border-color: var(--line); }
[data-theme=light] .tagp { color: #0F6E55; }
[data-theme=light] .toggle i { background: #d7dfd2; }
[data-theme=light] .vp-menu { background: rgba(10,16,26,.96); }
[data-theme=light] .ch .noimg, [data-theme=light] .ch img { background: #EFECE1; }
[data-theme=light] .preview-box .login-wrap { background-color: #e2e8f0; }
@media (max-width: 1024px), (hover: none) {
  [data-theme=light] .topbar, [data-theme=light] .mobile-nav, [data-theme=light] .uhead, [data-theme=light] .bnav, [data-theme=light] .side { background: #fff; }
  [data-theme=light] .login-card { background: #fff; }
}
.dup-g h3 { font-size: .98rem; }
/* WhatsApp */
.wa-fab { position: fixed; inset-inline-end: 16px; bottom: calc(82px + var(--safe-b)); z-index: 9; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(37,211,102,.45); animation: waPop .5s var(--ease) both; transition: transform .2s; }
.wa-fab:active { transform: scale(.92); }
.wa-fab:focus-visible, .bnav a:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@keyframes waPop { from { transform: scale(0); } to { transform: scale(1); } }
.btn.wa-btn { background: #25d366; border-color: #25d366; color: #fff; }


/* ================= DESIGN SYSTEM v2 — component layer ================= */
/* Calm surfaces: solid cards, one subtle violet wash, no stacked glows. */
body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { background: radial-gradient(70vmax 50vmax at 50% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%); }
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 1.375rem; } h3 { font-size: 1.0625rem; }
a { text-underline-offset: 3px; }

.brand-name { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); animation: none; font-weight: 800; letter-spacing: .02em; }
.hero-logo { animation: none; }
.hero-logo i { inset: -5px; filter: none; opacity: .7; animation-duration: 9s; background: conic-gradient(from 0deg, var(--primary), transparent 35%, var(--accent), transparent 75%, var(--primary)); }
.hero-logo::after { display: none; }
.brand-logo { box-shadow: 0 0 0 1px var(--border); }
.logo-mark { background: var(--primary); }

.btn { min-height: 40px; padding: 8px 16px; border-radius: 12px; border-color: var(--border); background: var(--elevated); }
.btn:hover { background: color-mix(in srgb, var(--elevated) 80%, var(--text) 8%); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.btn.primary { background: var(--primary); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--primary) 90%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 88%, #fff); }
.btn.primary::after { display: none; }
.btn.danger { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 6px 12px; border-radius: 10px; }
.btn.block { min-height: 48px; }
input, select, textarea { background: color-mix(in srgb, var(--bg) 70%, var(--surface)); border-color: var(--border); border-radius: 12px; min-height: 44px; }
textarea { min-height: 88px; }
input[type=checkbox], input[type=radio], input[type=range] { min-height: 0; }
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: var(--surface); color: var(--text); }
.field > span { font-size: .8125rem; }

.card, .stat, .tile, .tm, .cc, .plan-c, .ch, .ep { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.card:hover { box-shadow: var(--shadow); }
.stat::after { display: none; }
.stat:hover, .tile:hover, .tm:hover, .ch:hover { box-shadow: var(--glow); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.stat b { font-weight: 700; letter-spacing: -.02em; }
.stat.c-acc b { color: var(--accent); }
.bars i { background: var(--primary); }
.prog i { background: var(--ok); } .prog.warn i { background: var(--warn); }
.avatar { background: color-mix(in srgb, var(--primary) 26%, var(--elevated)); color: var(--text); }
.pill { font-weight: 600; }
.st-disabled { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.notice { border-radius: var(--r); }
.err-box, #toast div.err { color: var(--bad); }
.code { background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }

#toast div { background: var(--elevated); border-color: var(--border); box-shadow: var(--shadow); }
.modal-bg { background: rgba(4,7,14,.72); backdrop-filter: blur(4px); }
.modal { background: var(--surface); border-color: var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.x { width: 40px; height: 40px; background: var(--elevated); } .x:hover { transform: none; background: color-mix(in srgb, var(--elevated) 80%, var(--text) 10%); }
.login-card { background: var(--surface); backdrop-filter: none; border-color: var(--border); border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); }

.side { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); backdrop-filter: none; border-color: var(--border); }
.nav a { min-height: 40px; border-radius: 12px; }
.nav a:hover { transform: none; background: var(--elevated); }
.nav a.on { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--text); }
.nav a.on::before { box-shadow: none; }
.topbar, .uhead { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.mobile-nav a.on, .chips a.on { box-shadow: none; }
.bnav { background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border); }
.bnav a { min-height: 48px; justify-content: center; }
.bnav a.on { color: var(--text); background: color-mix(in srgb, var(--primary) 20%, transparent); }
.bnav a.on .ic { filter: none; transform: translateY(-1px); }
.sub-card { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 46%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); }
.sub-card::after { display: none; }
.sub-card .big { font-weight: 800; letter-spacing: -.02em; }
.ch .noimg { font-weight: 800; }
.tile:hover .ic { transform: none; }

/* Touch: every control at least 44px on phones, tablets and TV boxes. */
@media (pointer: coarse) {
  .btn, .btn.sm, .mobile-nav a, .chips a, .nav a, .x { min-height: var(--tap); }
  .mobile-nav a, .chips a { display: inline-flex; align-items: center; padding-inline: 16px; }
  .x { width: var(--tap); height: var(--tap); }
  .pw button { min-width: var(--tap); min-height: var(--tap); }
}
/* Keyboard and TV-remote focus is always visible. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
[data-act]:focus-visible, .btn:focus-visible, a:focus-visible, .ch:focus, .poster:focus, .tile:focus { box-shadow: none; }
/* Respect "reduce motion". */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Day theme adjustments */
[data-theme=light] .btn.primary, [data-theme=light] .mobile-nav a.on, [data-theme=light] .chips a.on, [data-theme=light] .s-pv-tabs span.on, [data-theme=light] .s-steps li::before, [data-theme=light] .cw-play, [data-theme=light] .s-plan .s-badge, [data-theme=light] .seg button.on { color: #FFFFFF; }
[data-theme=light] .s-plan .s-badge { background: var(--primary); }
[data-theme=light] .nav a.on, [data-theme=light] .bnav a.on { color: var(--primary); }
[data-theme=light] .sub-card { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, #fff), #fff 70%); color: var(--text); }
[data-theme=light] .modal-bg { background: rgba(18,23,38,.45); }

/* ================= PUBLIC WEBSITE ================= */
.site { max-width: 1120px; margin: 0 auto; padding: 0 var(--s-4); }
.site section { padding: var(--s-7) 0 0; scroll-margin-top: 80px; }
.site h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; margin: 0 0 var(--s-4); text-wrap: balance; }
.site h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: var(--s-4); }
.site p { margin: 0 0 var(--s-3); }
.s-sub { color: var(--muted); font-size: 1.0625rem; max-width: 60ch; }
.s-nav { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line2); }
.s-brand { display: flex; align-items: center; gap: var(--s-2); color: var(--text); text-decoration: none; font-size: 1.05rem; letter-spacing: .02em; }
.s-brand img { border-radius: 50%; }
.s-links { display: flex; gap: var(--s-1); flex: 1; justify-content: center; }
.s-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 12px; border-radius: 10px; }
.s-links a:hover { color: var(--text); background: var(--elevated); }
.s-menu { display: none; position: relative; }
.s-menu > summary { list-style: none; cursor: pointer; font-weight: 600; color: var(--muted); padding: 10px 12px; border-radius: 10px; white-space: nowrap; }
.s-menu > summary::-webkit-details-marker { display: none; }
.s-menu > summary:hover, .s-menu[open] > summary { color: var(--text); background: var(--elevated); }
.s-menu > nav { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; display: flex; flex-direction: column; min-width: 170px; padding: 6px; background: var(--elevated); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--glow); z-index: 10; }
.s-menu > nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 12px; border-radius: 8px; }
.s-menu > nav a:hover { color: var(--text); background: var(--primary); }
.s-nav .btn { margin-inline-start: auto; }
@media (max-width: 860px) { .s-links { display: none; } .s-menu { display: block; } }
.btn.lg { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
.s-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-6); align-items: center; padding-top: var(--s-7) !important; }
@media (max-width: 860px) { .s-hero { grid-template-columns: 1fr; } }
.s-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.s-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: var(--s-4); box-shadow: var(--glow), 0 40px 80px -40px rgba(0,0,0,.8); display: flex; flex-direction: column; gap: var(--s-3); }
.s-pv-top { display: flex; gap: 6px; } .s-pv-top span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.s-pv-now { border-radius: 16px; padding: var(--s-4); min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, var(--surface)), var(--elevated)); position: relative; }
.s-pv-now small { color: color-mix(in srgb, var(--text) 75%, transparent); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 700; }
.s-pv-now b { font-size: 1.2rem; }
.s-pv-now i { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 25%, transparent); position: relative; overflow: hidden; margin-top: 6px; }
.s-pv-now i::after { content: ''; position: absolute; inset: 0 55% 0 0; background: var(--accent); }
.s-pv-tabs { display: flex; gap: 6px; } .s-pv-tabs span { padding: 6px 12px; border-radius: 99px; background: var(--elevated); font-size: .78rem; font-weight: 600; color: var(--muted); } .s-pv-tabs span.on { background: var(--primary); color: #fff; }
.s-pv-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .s-pv-row i { aspect-ratio: 16/10; border-radius: 12px; background: var(--elevated); border: 1px solid var(--line2); }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.s-grid.four { grid-template-columns: repeat(4, 1fr); }
.s-grid.plans { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: var(--s-4); }
@media (max-width: 860px) { .s-grid, .s-grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .s-grid, .s-grid.four { grid-template-columns: 1fr; } }
.s-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s-4); }
.s-card h3 { margin-bottom: 6px; } .s-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.s-plan { display: flex; flex-direction: column; gap: 6px; }
.s-plan .btn { margin-top: auto; }
.s-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.s-badge { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.s-note { margin-top: var(--s-4) !important; color: var(--muted); }
.s-steps { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
@media (max-width: 760px) { .s-steps { grid-template-columns: 1fr; } }
.s-steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s-4); }
.s-steps li::before { content: counter(st); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: var(--s-3); }
.s-steps p { color: var(--muted); margin: 0; }
.s-faq { display: grid; gap: var(--s-2); max-width: 760px; }
.s-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 var(--s-4); }
.s-faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; min-height: var(--tap); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.s-faq summary::-webkit-details-marker { display: none; }
.s-faq summary::after { content: '+'; color: var(--muted); font-size: 1.3rem; line-height: 1; } .s-faq details[open] summary::after { content: '–'; }
.s-faq p { color: var(--muted); padding-bottom: var(--s-4); }
.s-foot { margin-top: var(--s-8); padding: var(--s-5) 0 var(--s-6); border-top: 1px solid var(--line2); text-align: center; }
.s-footrow { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-3); }
.s-footrow a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 4px; } .s-footrow a:hover, .s-footrow a.on { color: var(--text); }
.s-doc { max-width: 760px; padding: var(--s-6) 0; } .s-doc h3 { margin-top: var(--s-5); } .s-doc p { color: var(--muted); line-height: 1.7; }
.s-back { display: inline-block; margin-bottom: var(--s-4); text-decoration: none; font-weight: 600; }

/* ================= ACCOUNT PORTAL & LIBRARY ================= */
.cw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cw { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; cursor: pointer; min-height: 64px; }
.cw:hover, .cw:focus { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: var(--glow); }
.cw b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-play { flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; }
.st-open { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.st-answered { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.st-closed { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-height: 46vh; overflow: auto; }
.msg { max-width: 88%; align-self: flex-start; background: var(--elevated); border: 1px solid var(--line2); border-radius: 14px; padding: 10px 12px; }
.msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--primary) 20%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.msg-t { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.receipt { background: var(--elevated); border-radius: var(--r); padding: var(--s-4); }
@media print {
  body::before, #app, #toast, .modal-head, .modal [data-act=print], .wa-fab { display: none !important; }
  .modal-bg { position: static; background: none; backdrop-filter: none; padding: 0; } .modal { box-shadow: none; border: 0; background: #fff; color: #000; max-height: none; }
  .receipt { background: #fff; color: #000; } .receipt .muted { color: #444; }
}


/* ===== =legacy theme block retired — Emerald & Champagne ===== */

/* customer home: dashboard */
.welcome h2 { margin: 0; font-size: 1.5rem; } .welcome p { margin: 2px 0 16px; }
.dash { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 760px) { .dash { grid-template-columns: 1fr 1fr; } .dash-plan { grid-column: 1 / -1; } }
.dash-plan { cursor: pointer; border-radius: var(--r-lg); padding: 18px; border: 1px solid color-mix(in srgb, var(--primary) 55%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 62%, var(--surface)), color-mix(in srgb, var(--primary) 14%, var(--surface)) 75%); box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--primary) 80%, transparent); }
.dp-top { display: flex; justify-content: space-between; gap: 12px; } .dp-r { text-align: end; }
.dp-l { display: block; font-size: .75rem; color: color-mix(in srgb, var(--text) 70%, transparent); margin-bottom: 2px; }
.dash-plan b, .dash-mini b { font-size: 1.05rem; }
.dp-days { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px; } .dp-days .big { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; } .dp-days .pill { align-self: center; }
.dash-plan .muted { color: color-mix(in srgb, var(--text) 72%, transparent); }
.dash-mini { cursor: pointer; display: flex; align-items: center; gap: 12px; border-radius: var(--r-lg); padding: 16px; background: var(--surface); border: 1px solid var(--border); min-height: 72px; }
.dash-mini:hover, .dash-mini:focus, .dash-plan:focus { border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); box-shadow: var(--glow); }
.chip-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 22%, transparent); color: color-mix(in srgb, var(--primary) 60%, #fff); }
.chip-ic.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tiles.big { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.big .tile { border: 0; border-radius: var(--r-lg); padding: 22px 12px; min-height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: center; box-shadow: 0 18px 36px -22px rgba(0,0,0,.9); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tiles.big .tile b { margin: 0; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.tiles.big .tile:hover, .tiles.big .tile:focus { transform: translateY(-3px); box-shadow: 0 0 0 2px #fff, 0 22px 40px -20px rgba(0,0,0,.9); border: 0; }
.t-live { background: var(--tile-live); } .t-movies { background: var(--tile-movies); } .t-series { background: var(--tile-series); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick a { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; min-height: 84px; justify-content: center; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .85rem; }
.quick a svg { color: color-mix(in srgb, var(--primary) 60%, #fff); }
.quick a:hover, .quick a:focus { border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); box-shadow: var(--glow); }
.notice.info { background: color-mix(in srgb, var(--primary) 14%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }
.bnav a .ic { font-size: 0; line-height: 0; display: grid; place-items: center; height: 24px; }
.bnav a.on { color: #fff; background: color-mix(in srgb, var(--primary) 26%, transparent); } .bnav a.on .ic { color: color-mix(in srgb, var(--primary) 55%, #fff); }
/* large screens: the customer menu becomes a sidebar, like the dashboard mockup */
@media (min-width: 900px) {
  .uapp { padding-inline-start: 218px; padding-bottom: 0; }
  .bnav { inset: 0 auto 0 0; inset-inline: 0 auto; width: 218px; max-width: none; transform: none; border-radius: 0; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; padding: 84px 12px 16px; border: 0; border-inline-end: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }
  .bnav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; min-height: 46px; font-size: .92rem; border-radius: 12px; }
  .bnav a.on { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 82%, #fff), var(--primary)); } .bnav a.on .ic { color: #fff; }
  .uhead { position: sticky; z-index: 30; }
}
/* admin: WhatsApp button states in the customer list */
.btn.wa-todo { border-color: #25d366; color: #25d366; background: transparent; }
.btn.wa-sent { background: #25d366; border-color: #25d366; color: #fff; position: relative; box-shadow: 0 0 0 3px color-mix(in srgb, #25d366 30%, transparent); }
.btn.wa-sent::after { content: '✓'; position: absolute; top: -7px; inset-inline-end: -7px; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #128c4a; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* website v3 */
.s-nav { border: 1px solid var(--border); border-radius: 99px; padding: 8px 10px 8px 16px; margin-top: 12px; top: 12px; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.s-links a { border-radius: 99px; } .s-links a:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); }
.s-navbtns { display: flex; gap: 8px; margin-inline-start: auto; } .s-navbtns .btn { border-radius: 99px; margin: 0; }
@media (max-width: 520px) { .s-hide-sm { display: none; } }
.s-hero { grid-template-columns: 1.15fr .85fr; }
.s-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-tile { border-radius: var(--r-lg); padding: 20px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 16%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.s-tile svg { color: color-mix(in srgb, var(--primary) 55%, #fff); margin-bottom: 4px; } .s-tile span { color: var(--muted); font-size: .84rem; }
.s-show { padding-top: var(--s-6) !important; }
.s-preview { max-width: 760px; margin: 0 auto; border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent), 0 40px 120px -40px color-mix(in srgb, var(--primary) 80%, transparent); }
.s-pv-bar { display: flex; align-items: center; gap: 6px; } .s-pv-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); } .s-pv-bar b { margin-inline-start: 8px; font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.s-pv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-pv-tiles div { border-radius: 14px; aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; }
.s-pv-tiles b { font-size: clamp(.62rem, 1.6vw, .85rem); letter-spacing: .05em; text-transform: uppercase; }
.s-pv-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .s-pv-sub span { border-radius: 10px; padding: 10px 6px; text-align: center; background: var(--elevated); color: var(--muted); font-size: clamp(.6rem, 1.5vw, .78rem); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 12px; background: color-mix(in srgb, var(--primary) 20%, transparent); color: color-mix(in srgb, var(--primary) 55%, #fff); }
.s-plan { position: relative; padding-top: var(--s-5); } .s-plan h3 { display: flex; align-items: center; gap: 8px; } .s-plan h3 svg { color: var(--warn); }
.s-plan.feat { border-color: var(--primary); background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 30%, var(--surface)), var(--surface)); box-shadow: 0 0 0 1px var(--primary), 0 24px 60px -30px color-mix(in srgb, var(--primary) 90%, transparent); }
.s-plan .s-badge { position: absolute; top: -11px; inset-inline-start: 16px; background: var(--primary); color: #05171A; }
.s-list { list-style: none; padding: 0; margin: 4px 0 14px; display: grid; gap: 8px; } .s-list li { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: .92rem; } .s-list svg { color: var(--ok); }
.s-plan .btn { border-radius: 99px; }
@media (max-width: 860px) { .s-hero { grid-template-columns: 1fr; } }
[data-theme=light] .s-pv-tiles div, [data-theme=light] .tiles.big .tile { color: #fff; }
[data-theme=light] .chip-ic, [data-theme=light] .s-ic, [data-theme=light] .quick a svg, [data-theme=light] .s-tile svg { color: var(--primary); }
[data-theme=light] .dash-plan { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, #fff), #fff 80%); }
[data-theme=light] .bnav a.on .ic { color: var(--primary); }

/* admin: analytics cards with icon chips */
.stat { padding-inline-end: 60px; min-height: 92px; }
.stat .st-ic { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 22%, transparent); color: color-mix(in srgb, var(--primary) 55%, #fff); }
.stat.c-ok .st-ic { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.stat.c-warn .st-ic { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.stat.c-bad .st-ic { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.stat.c-acc .st-ic { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.side { border-inline-end: 1px solid var(--border); } .side .nav a { font-weight: 600; }
.bars i { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 70%, #fff), var(--primary)); border-radius: 6px 6px 0 0; }
[data-theme=light] .stat .st-ic { color: var(--primary); }

/* TV guide grid */
.seg { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }
.guide { --g-ch: 132px; position: relative; overflow: auto; max-height: 72vh; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.g-row { display: flex; min-width: max-content; border-bottom: 1px solid var(--line2); }
.g-ch { position: sticky; inset-inline-start: 0; z-index: 2; flex: 0 0 var(--g-ch); width: var(--g-ch); padding: 10px; background: var(--elevated); border-inline-end: 1px solid var(--border); display: flex; align-items: center; cursor: pointer; min-height: 60px; }
.g-ch b { font-size: .82rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.g-ch:focus, .g-prog:focus { outline: 3px solid var(--accent); outline-offset: -3px; }
.g-line { position: relative; flex: none; min-height: 60px; }
.g-head { position: sticky; top: 0; z-index: 3; background: var(--elevated); } .g-head .g-ch { min-height: 36px; z-index: 4; } .g-head .g-line { min-height: 36px; display: flex; }
.g-head span { flex: none; padding: 9px 8px; font-size: .78rem; font-weight: 700; color: var(--muted); border-inline-start: 1px solid var(--line2); }
.g-prog { position: absolute; top: 6px; bottom: 6px; padding: 6px 10px; border-radius: 10px; background: var(--elevated); border: 1px solid var(--line2); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; }
.g-prog b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .g-prog span { font-size: .7rem; color: var(--muted); }
.g-prog.on { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 60%, var(--border)); }
.g-wait { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 1; pointer-events: none; }
@media (max-width: 520px) { .guide { --g-ch: 104px; } }

/* ================= ADMIN MENU: groups, search, phone drawer ================= */
.nav-g { margin: 14px 12px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-g:first-child { margin-top: 4px; }
.nav a[hidden], .nav-g[hidden] { display: none; }
.nav-search { margin: 0 4px 8px; min-height: 40px; border-radius: 12px; font-size: .9rem; width: auto; }
.nav-none { padding: 12px; }
.menu-btn { display: none; } .side-bg { display: none; }
.topbar h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; flex: none; }
  .tb-logo { display: none; }
  .side { display: flex; position: fixed; inset: 0 auto 0 0; inset-inline: 0 auto; z-index: 60; width: min(86vw, 320px); height: 100dvh; transform: translateX(-105%); transition: transform .22s var(--ease); box-shadow: 0 0 60px rgba(0,0,0,.6); background: var(--surface); padding-top: calc(14px + env(safe-area-inset-top)); }
  [dir=rtl] .side { transform: translateX(105%); }
  .side.open { transform: none; }
  .side-bg.open { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(4,7,14,.6); }
  .side .nav a { min-height: 46px; }
  .mobile-nav a { white-space: nowrap; }
}
@media (max-width: 420px) { .topbar .btn[data-act=logout] { padding-inline: 10px; } .topbar { gap: 6px; } }

/* alerts & emails pages */
.al-row { flex-wrap: wrap; } .al-acts { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .al-acts { width: 100%; justify-content: flex-start; } .al-acts .btn.sm { min-height: 40px; } }
.admin .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; } .admin .chips a { white-space: nowrap; flex: none; }
.tbl-wrap { overflow-x: auto; }

/* templates & data pages */
.tpl-f { display: grid; gap: 6px; margin-bottom: 14px; } .tpl-f label { font-size: .86rem; } .tpl-f .btn.sm { justify-self: start; }
.tpl-f textarea, .tpl-f input { width: 100%; }
.data-row { flex-wrap: wrap; gap: 10px; } .data-row .row { gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .data-row .row { width: 100%; } .data-row .btn.sm { flex: 1 1 auto; min-height: 40px; } }
.card > .row .spacer { flex: 1; }

/* phone number with country code */
.phone-row { display: grid; grid-template-columns: minmax(118px, 42%) 1fr; gap: 8px; } .phone-row select, .phone-row input { min-width: 0; width: 100%; }
[dir=rtl] .phone-row { direction: ltr; }

/* live chat */
.chat-fab { position: fixed; inset-inline-start: 16px; bottom: calc(82px + var(--safe-b)); z-index: 9; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 80%, #fff), var(--primary)); box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--primary) 90%, transparent); }
.chat-fab b { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bad); color: #fff; font-size: .75rem; display: grid; place-items: center; }
@media (min-width: 1000px) { .chat-fab { bottom: 24px; inset-inline-start: 244px; } }
.thread.chat { height: min(52vh, 460px); max-height: none; padding: 4px; }
.chat-form { display: flex; gap: 8px; } .chat-form input { flex: 1; min-width: 0; } .chat-form .btn { flex: none; }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: auto; border-radius: 10px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; }
.nav-badge[hidden] { display: none; }
.chat-wrap { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 12px; align-items: start; }
.chat-wrap .card { margin: 0; } .chat-list { max-height: 78vh; overflow: auto; }
.chat-item { cursor: pointer; border-radius: 12px; padding-inline: 8px; } .chat-item.on { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.chat-back { display: none; }
@media (max-width: 760px) { .chat-wrap { grid-template-columns: 1fr; } .chat-wrap.has-open .chat-list { display: none; } .chat-wrap:not(.has-open) .chat-pane { display: none; } .chat-back { display: inline-flex; } .thread.chat { height: 56vh; } }

.sa-link { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.sa-link input { flex: 1; min-width: 110px; }
.sa-links { display: flex; flex-direction: column; gap: 4px; }

.tz-clock { display: inline-flex; align-items: baseline; gap: 8px; }
.tz-clock b { font-size: 1.05rem; }

/* ===== UI/UX upgrade — modern depth & motion layer ===== */
.btn.primary { animation: primaryGlow 2.6s ease-in-out infinite; }
@keyframes primaryGlow { 0%,100% { box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--primary) 70%, transparent); } 50% { box-shadow: 0 10px 34px -8px color-mix(in srgb, var(--primary) 92%, transparent), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); } }
.card, .stat, .tm, .qa .qa-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.card:hover, .stat:hover, .tm:hover, .qa-card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.brand-logo, .hero-logo { animation: logoBreath 4s ease-in-out infinite; }
@keyframes logoBreath { 0%,100% { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--primary) 60%, transparent)); } 50% { filter: drop-shadow(0 0 30px color-mix(in srgb, var(--primary) 80%, transparent)); } }
.nav a.on { position: relative; }
.nav a.on::after { content:''; position:absolute; inset-inline-start:12px; bottom:-1px; height:2px; width: calc(100% - 24px); background: linear-gradient(90deg, transparent, var(--accent), transparent); border-radius:2px; }
.skeleton { background: linear-gradient(100deg, var(--panel) 20%, var(--panel2) 40%, var(--panel) 60%); }
.loading-bar { position: relative; overflow: hidden; height: 3px; background: var(--line); }
.loading-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { left: -30%; } to { left: 100%; } }

/* ===== Emerald & Champagne — cinematic hero (customer home) ===== */
.cinema { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); background: radial-gradient(120vmax 60vmax at 10% -10%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 60%), linear-gradient(135deg, #0A2720 0%, #041814 55%, #0d3a2d 100%); box-shadow: var(--glow); transition: transform .3s var(--ease); }
.cinema:hover { transform: translateY(-2px); }
.cinema-logo, .cinema-mark { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 24px; display: grid; place-items: center; object-fit: cover; border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 0 28px color-mix(in srgb, var(--primary) 35%, transparent); }
.cinema-mark { font-weight: 900; font-size: 30px; color: #1d1404; background: linear-gradient(135deg, #F1D88B, #D4AF37 45%, #8A6A1F); letter-spacing: .02em; }
.cinema-text { position: relative; min-width: 0; }
.cinema-eyebrow { display: block; color: var(--accent); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.cinema-title { margin: 1px 0 1px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; letter-spacing: -.01em; color: var(--text); }
.cinema-h { color: var(--muted); margin: 0; font-size: .95rem; font-weight: 600; }
.cinema-watermark { position: absolute; inset-inline-end: 14px; bottom: -28px; font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: color-mix(in srgb, var(--text) 8%, transparent); letter-spacing: -.02em; line-height: 1; pointer-events: none; user-select: none; }
@media (max-width: 560px) { .cinema { flex-direction: column; text-align: center; padding: 16px; } .cinema-logo, .cinema-mark { width: 72px; height: 72px; } .cinema-watermark { display: none; } }

/* ===== Void Ember — brand gradients & wires ===== */
.brand-name { color: var(--text); }
[data-theme=light] .brand-name { color: #181820; }
.btn.primary { color: #03272C; background: linear-gradient(135deg, #67E8F9 0%, #22D3EE 45%, var(--primary) 100%); box-shadow: 0 12px 36px -12px color-mix(in srgb, var(--primary) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.55); text-shadow: none; }
.btn.primary:hover { background: linear-gradient(135deg, #A5F3FC 0%, #67E8F9 45%, #22D3EE 100%); }
.hero-logo i { background: conic-gradient(from 0deg, var(--accent), transparent 30%, var(--primary), transparent 70%, var(--accent)); }
.hero-logo::after { background: radial-gradient(circle, color-mix(in srgb, var(--primary) 55%, transparent), transparent 70%); }
.cinema { background: radial-gradient(120vmax 60vmax at 10% -10%, color-mix(in srgb, var(--primary) 32%, transparent), transparent 60%), linear-gradient(135deg, #062C30 0%, #050C0E 55%, #08333A 100%); }
.cinema-mark { background: linear-gradient(135deg, #67E8F9, var(--primary) 45%, #087A85); color: #03272C; }
.cinema-watermark { -webkit-text-stroke: 1px color-mix(in srgb, var(--primary) 28%, transparent); }
.st-active { color: #3DDC97; }
[data-theme=light] .st-active { color: #16785A; }
[data-theme=light] .brand-name { color: #181820; }

/* defensive readability for stale/out-of-sync cached shells */
.site h1, .s-hero h1, .site h2, .s-sub { color: var(--text) !important; }
.s-pv-now b { color: var(--text); }

/* force-readable hero on both themes (belt & braces) */
[data-theme=light] .site h1, [data-theme=light] .s-hero h1, .site h1 { color: #181820 !important; }
[data-theme=dark] .site h1, [data-theme=dark] .s-hero h1, .site h1 { color: #F0EEE8 !important; }
.s-sub { color: inherit !important; }
.s-hero h1 span.grad { color: var(--primary) !important; -webkit-background-clip: unset !important; background-clip: unset !important; }

/* ===== INTPROTO-TV Design System v2 — Aurora (2026-11) ===== */
:root {
  --r: 16px; --r-lg: 20px; --r-sm: 10px;
  --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
  --elev: 0 2px 4px rgba(0,0,0,.35), 0 22px 50px -24px rgba(0,0,0,.75);
  --ring: inset 0 1px 0 rgba(255,255,255,.05);
}
h1 { font-size: clamp(1.5rem, 4.2vw, 2.1rem); letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 1.28rem; letter-spacing: -.012em; font-weight: 800; }
h3 { font-size: 1rem; letter-spacing: 0; font-weight: 700; color: var(--text); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* consistent keyboard focus everywhere */
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* buttons — one scale, one language */
.btn { border-radius: 12px; padding: 10px 15px; font-weight: 700; letter-spacing: .01em; box-shadow: var(--ring); }
.btn.primary { text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 10px; }
.btn.block { padding: 13px; font-size: .95rem; }
.btn.ghost { border-color: transparent; }
.btn.danger { background: color-mix(in srgb, var(--bad) 16%, transparent); }

/* inputs — larger, calmer, theme-aware focus */
input, select, textarea { border-radius: 12px; background: var(--elevated); border-color: color-mix(in srgb, var(--border) 70%, transparent); padding: 12px 13px; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--focus); background: var(--surface); }
.field > span { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

/* cards — calm, consistent, readable elevation */
.card { box-shadow: var(--elev), var(--ring); padding: 18px 18px 16px; }
.card h3 { border-bottom: 1px solid var(--line2); padding-bottom: 10px; margin-bottom: 12px; }
.card > p.muted:first-of-type { margin-top: -4px; }

/* stats & metrics */
.stat { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); padding: 14px 12px; }
.stat b { font-size: 1.35rem; letter-spacing: -.01em; }
.stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

/* tables — readable, zebra, sticky-friendly */
.tbl th { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); border-bottom: 1px solid var(--line2); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line2); }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--primary) 5%, transparent); }

/* list items & pills */
.list-item { border-radius: 12px; }
.list-item:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.pill { border: 1px solid transparent; }

/* chips & tabs */
.chips a { padding: 8px 14px; border-radius: 12px; font-weight: 700; }

/* avatar */
.avatar { font-weight: 800; background: color-mix(in srgb, var(--primary) 26%, transparent); color: #CFFAFE; border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent); }

/* modal & toast — softer glass */
.modal { background: linear-gradient(180deg, var(--elevated), var(--surface)); }
.modal-bg { background: rgba(2,4,12,.66); backdrop-filter: blur(10px); }
#toast div { background: var(--elevated); border-color: var(--line); }

/* customer bottom nav / desktop rail — elevated, balanced */
.bnav { background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--line2); backdrop-filter: blur(16px); padding-bottom: max(6px, env(safe-area-inset-bottom)); position: fixed; left: 0; right: 0; z-index: 20; display: flex; }
.bnav a { display: flex; align-items: center; justify-content: center; gap: 8px; }
.bnav a.on { background: color-mix(in srgb, var(--primary) 14%, transparent); }
@media (min-width: 900px) {
  .bnav { top: 0; bottom: auto; left: 0; width: 218px; height: 100vh; flex-direction: column; gap: 4px; padding: 18px 12px; align-items: stretch; border-top: 0; border-inline-end: 1px solid var(--line2); }
  .uapp { padding-bottom: 0; padding-inline-start: 218px; }
  .uhead { padding-inline-start: 22px; }
  .bnav a { justify-content: flex-start; padding: 11px 12px; border-radius: 12px; font-weight: 700; color: var(--muted); text-decoration: none; }
  .bnav a.on { color: var(--text); }
  .bnav a .ic { font-size: 19px; line-height: 1; }
}

/* empty states & inline notices */
.notice { border-radius: 12px; }

/* ===== light theme v2 ===== */
[data-theme=light] {
  --shadow: 0 1px 2px rgba(24,24,38,.08), 0 18px 38px -22px rgba(24,24,38,.30);
  --elev: 0 1px 2px rgba(24,24,38,.08), 0 16px 34px -22px rgba(24,24,38,.28);
  --ring: inset 0 1px 0 rgba(255,255,255,.7);
}
[data-theme=light] body { background: var(--bg); }
[data-theme=light] .card { background: var(--surface); border-color: var(--border); }
[data-theme=light] .stat { background: var(--surface); border-color: var(--border); }
[data-theme=light] input, [data-theme=light] select, [data-theme=light] textarea { background: var(--surface); border-color: var(--border); }
[data-theme=light] input:hover, [data-theme=light] select:hover, [data-theme=light] textarea:hover { border-color: var(--primary); }
[data-theme=light] .modal { background: var(--surface); }
[data-theme=light] .avatar { color: #4C1D95; background: #EDE9FE; border-color: #DDD6FE; }
[data-theme=light] .list-item:hover { background: #F3F1FB; }
[data-theme=light] .chips a.on { box-shadow: none; }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .stat, .tm, .qa .qa-card { transition: none !important; animation: none !important; }
  body::before { animation: none; }
}

/* ===== INTPROTO-TV Design System v3 — Nebula Rebuild ===== */
/* aurora backdrop */
body::before { content:''; position: fixed; inset:-15%; z-index:-1; pointer-events:none;
  background:
    radial-gradient(52vmax 52vmax at 12% 8%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 62%),
    radial-gradient(48vmax 48vmax at 88% 18%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    radial-gradient(58vmax 58vmax at 82% 92%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 64%),
    radial-gradient(40vmax 40vmax at 18% 88%, color-mix(in srgb, #0B3B42 42%, transparent), transparent 66%);
  animation: nebDrift 26s ease-in-out infinite alternate; }
@keyframes nebDrift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(2.5%, -2%, 0) scale(1.06); } 100% { transform: translate3d(-2%, 2.5%, 0) scale(1.03); } }

/* text selection */
::selection { background: color-mix(in srgb, var(--primary) 70%, #000); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* cards — gradient border, glassy lift */
.card { border: 1px solid transparent;
  background: linear-gradient(170deg, color-mix(in srgb, var(--surface) 96%, #fff 4%), var(--surface)) padding-box,
              linear-gradient(158deg, color-mix(in srgb, var(--primary) 65%, transparent) 0%, color-mix(in srgb, var(--border) 70%, transparent) 28%, color-mix(in srgb, var(--border) 70%, transparent) 72%, color-mix(in srgb, var(--accent) 55%, transparent) 100%) border-box;
  box-shadow: var(--elev), 0 0 0 1px rgba(255,255,255,.03) inset; }
.card h3 { letter-spacing: .02em; }
.card:hover { transform: translateY(-3px); border-color: transparent; }

/* stat tiles — accent flare top */
.stat { position: relative; overflow: hidden; border: 1px solid transparent;
  background: linear-gradient(172deg, var(--elevated), var(--surface)) padding-box,
              linear-gradient(160deg, color-mix(in srgb, var(--primary) 55%, transparent), transparent 40%, color-mix(in srgb, var(--accent) 40%, transparent)) border-box; }
.stat::before { content:''; position: absolute; top: 0; inset-inline: 12px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

/* admin navigation — premium pills */
.side { background: color-mix(in srgb, var(--surface) 72%, transparent); border-inline-end: 1px solid transparent; border-image: linear-gradient(transparent, color-mix(in srgb, var(--primary) 65%, transparent) 45%, transparent) 1; }
.nav a { border: 1px solid transparent; letter-spacing: .01em; }
.nav a:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.nav a.on { background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 32%, transparent), color-mix(in srgb, var(--accent) 20%, transparent)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 8px 26px -14px color-mix(in srgb, var(--primary) 65%, transparent), inset 0 1px 0 rgba(255,255,255,.07); }
.nav a.on::before { box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 80%, transparent); width: 3px; background: linear-gradient(var(--primary), var(--accent)); border-start-end-radius: 3px; border-end-end-radius: 3px; inset-inline-start: -1px; top: 7px; bottom: 7px; }

/* topbar — hairline gradient edge */
.topbar { border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 60%, transparent) 30%, color-mix(in srgb, var(--accent) 70%, transparent) 70%, transparent) 1; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px); }
.topbar h2 { background: linear-gradient(120deg, var(--text) 30%, color-mix(in srgb, var(--primary) 65%, #fff) 75%, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* customer hero — slow energy sweep */
.cinema { position: relative; }
.cinema::before { content:''; position: absolute; inset: -40%; z-index: -0; border-radius: inherit;
  background: conic-gradient(from 180deg at 65% -10%, transparent 0deg, color-mix(in srgb, var(--primary) 30%, transparent) 40deg, transparent 90deg, color-mix(in srgb, var(--accent) 24%, transparent) 160deg, transparent 220deg);
  animation: cinemaSweep 9s linear infinite; pointer-events: none; }
@keyframes cinemaSweep { to { transform: rotate(360deg); } }
.cinema > * { position: relative; }
.cinema-title { background: linear-gradient(120deg, #ECFEFF 25%, #A5F3FC 50%, #22D3EE 78%, #F0FDFA); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* login card — double-glow frame */
.login-card { border: 1px solid transparent; border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--elevated) 88%, transparent), var(--surface)) padding-box,
              linear-gradient(150deg, color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--border) 80%, transparent) 42%, color-mix(in srgb, var(--accent) 70%, transparent)) border-box;
  box-shadow: var(--elev), 0 0 60px -20px color-mix(in srgb, var(--primary) 55%, transparent); }
.err-box { border-inline-start: 3px solid var(--bad); }

/* chips & tiles — pill glow */
.chips a { border: 1px solid var(--line2); background: var(--surface); }
.chips a.on { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 70%, transparent); color: #fff; }
.tile, .tm, .qa .qa-card { position: relative; border: 1px solid var(--line2); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.tile:hover, .tm:hover, .qa-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 14px 40px -18px color-mix(in srgb, var(--primary) 60%, transparent); }

/* posters & channels — zoom lift */
.poster .img, .ch { overflow: hidden; }
.poster:hover .img img, .poster:hover .img .noimg { transform: scale(1.06); }
.poster .img img, .poster .img .noimg, .ch { transition: transform .4s var(--ease); }

/* inputs — focus aura */
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 34%, transparent), 0 0 22px -6px color-mix(in srgb, var(--primary) 60%, transparent); }

/* ===== light theme v3 ===== */
[data-theme=light] .topbar { background: rgba(255,255,255,.85); }
[data-theme=light] .side { background: rgba(255,255,255,.75); }
[data-theme=light] .cinema { background: linear-gradient(150deg, #FFFFFF, #EDF7F8); border-color: var(--border); box-shadow: var(--elev); }
[data-theme=light] .cinema-title { background: linear-gradient(120deg, #0C3540, #0E7490 60%, #0891B2); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme=light] .cinema-h, [data-theme=light] .cinema-eyebrow { color: var(--muted); }
[data-theme=light] .cinema-watermark { color: rgba(124,58,237,.10); }
[data-theme=light] .cinema-logo, [data-theme=light] .cinema-mark { box-shadow: 0 10px 30px -12px rgba(124,58,237,.4); }
[data-theme=light] .card { background: linear-gradient(170deg, #fff, #fff) padding-box, linear-gradient(160deg, rgba(8,145,178,.38), rgba(213,226,228,.95) 30%, rgba(213,226,228,.95) 70%, rgba(14,116,144,.38)) border-box; }
[data-theme=light] .stat { background: linear-gradient(172deg, #fff, #fff) padding-box, linear-gradient(160deg, rgba(8,145,178,.45), transparent 45%, rgba(14,116,144,.35)) border-box; }
[data-theme=light] .topbar h2 { background: linear-gradient(120deg, #0A1E22 30%, #0E7490 90%); -webkit-background-clip: text; background-clip: text; }
[data-theme=light] .nav a.on { background: linear-gradient(120deg, #E0F4F6, #ECFEFF); color: #0C4A53; box-shadow: none; border-color: #B6E3E9; }
[data-theme=light] .chips a.on { background: linear-gradient(135deg, #0891B2, #0E7490); color: #fff; }
[data-theme=light] ::selection { background: #C4B5FD; color: #2E1065; }
[data-theme=light] ::-webkit-scrollbar-thumb { background: #C4B5FD; border-color: transparent; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) { body::before, .card, .cinema::before, .stat, .poster .img img { animation: none !important; transition: none !important; } }

/* ===== Cinema-poster grid backdrop ===== */
body::after { content:''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(120vmax 42vmax at 50% -12%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 62%),
    radial-gradient(30vmax 22vmax at 50% -8%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--primary) 14%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 14%, transparent) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 96px 96px, 96px 96px; }
body::after { mask-image: linear-gradient(180deg, black 55%, transparent 96%); -webkit-mask-image: linear-gradient(180deg, black 55%, transparent 96%); }
[data-theme=light] body::after { opacity: .5; background-image: radial-gradient(120vmax 42vmax at 50% -12%, rgba(8,145,178,.22), transparent 62%), linear-gradient(rgba(14,116,144,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(14,116,144,.16) 1px, transparent 1px); background-size: 100% 100%, 88px 88px, 88px 88px; }
@media (prefers-reduced-motion: reduce) { body::after { -webkit-mask-image: none; mask-image: none; } }

/* logo text: never behind a background */
.brand-name, .brand-name.xl, [data-theme=light] .brand-name, [data-theme=dark] .brand-name { background: none !important; -webkit-text-fill-color: currentColor !important; }

/* horizontal bar charts (gads/resellers) */
.hbars2 { display: flex; flex-direction: column; gap: 10px; }
.hbars2 > div { display: flex; align-items: center; gap: 10px; }
.hbars2 > div > span:first-child { min-width: 52px; font-weight: 800; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hbar2 { flex: 1; height: 14px; border-radius: 99px; background: var(--elevated); overflow: hidden; border: 1px solid var(--line2); }
.hbar2 i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 55%, transparent); }

/* ===== sidebar tail + account service rows + guide ===== */
.bnav-tail { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line2); }
.bnav-sup { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font: inherit; font-weight: 700; text-align: start; text-decoration: none; }
.bnav-sup:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--text); }
.bnav-sup .ic { font-size: 18px; }
.svc-box { margin-top: 10px; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--surface) 60%, transparent); display: flex; flex-direction: column; gap: 2px; }
.svc-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 10px; }
.svc-row:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.svc-l { flex: 0 0 88px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.svc-v { flex: 1; min-width: 0; word-break: break-all; font-size: .9rem; user-select: all; }
.svc-c { border-radius: 8px; flex: 0 0 auto; }
.cred-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cred-list li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-radius: 10px; }
.cred-list li:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.cred-k { flex: 0 0 82px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cred-v { flex: 1; min-width: 0; word-break: break-all; font-size: .9rem; user-select: all; }
.setup-steps { margin-top: 10px; border-top: 1px solid var(--line2); padding-top: 10px; }
.setup-steps summary { cursor: pointer; font-weight: 800; color: var(--text); }
.setup-steps h4 { margin: 12px 0 6px; font-size: .85rem; color: var(--accent); }
.setup-steps .guide-ol { gap: 5px; font-size: .86rem; }
@media (max-width: 560px) { .cred-k { flex-basis: 70px; } .cred-v { font-size: .82rem; } }
.guide-ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
@media (max-width: 899px) {
  .bnav-tail { display: flex; flex-direction: row; gap: 2px; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px; margin: 0; border: 1px solid var(--line2); border-radius: 99px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .bnav-tail .bnav-sup { padding: 9px 12px; font-size: .82rem; white-space: nowrap; }
}

/* ===== customer profile page ===== */
.prof-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .prof-grid { grid-template-columns: 1fr; } }
.prof-id { display: flex; gap: 16px; align-items: center; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; border-radius: 22px; }
.prof-sub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; padding: 12px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.prof-sub > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-sub b { font-size: .92rem; }
.prof-contacts { display: flex; flex-direction: column; gap: 2px; }
.ilist { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 10px; }
.ilist:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.ilist .svc-l { flex: 0 0 74px; }
.ilist b { flex: 1; min-width: 0; }
.name-link { background: none; border: 0; color: var(--text); font: inherit; font-weight: 800; padding: 0; cursor: pointer; text-align: start; }
.name-link:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 1100px) { .prof-sub { grid-template-columns: repeat(2, 1fr); } }

/* stripe links & compare */
.sa-link-chip { display:inline-flex; align-items:center; gap:6px; background: color-mix(in srgb, var(--primary) 16%, transparent); border:1px solid color-mix(in srgb, var(--primary) 35%, transparent); color: var(--text); text-decoration:none; padding:6px 12px; border-radius:99px; font-size:.82rem; font-weight:700; white-space:nowrap; }
.sa-link-chip:hover { background: color-mix(in srgb, var(--primary) 28%, transparent); border-color: var(--accent); }
.sa-link-host { font-size:.75rem; color: var(--muted); max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sa-link-url { font-size:.8rem; opacity:.9; }
.sa-link { align-items: center; }
.sa-bank { max-width: 200px; }

/* order-card section headings */
.op-sec { margin: 16px 0 8px; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--line2); padding-bottom: 6px; }
/* WhatsApp / Telegram logo buttons and the ✓ Sent marks */
.brand-btn { display: inline-grid; place-items: center; min-width: 36px; padding-inline: 8px; border: 0; }
.brand-btn.wa { background: #25D366; } .brand-btn.tg { background: #229ED9; }
.brand-btn .brand-ic { filter: brightness(0) invert(1); display: block; }
.brand-btn[disabled] { opacity: .35; filter: grayscale(1); cursor: not-allowed; }
.brand-send.tg { background: #229ED9; border-color: #229ED9; color: #fff; }
.sent-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-inline-end: 6px; }
.sent-chip { font: inherit; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line2, rgba(127,127,127,.3)); background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sent-chip.on { background: color-mix(in srgb, var(--ok) 18%, transparent); border-color: color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); }
.sent-chip.no { background: color-mix(in srgb, var(--bad) 14%, transparent); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); text-decoration: line-through; }
/* support page */
.sup-badge{display:inline-block;padding:4px 12px;border-radius:999px;background:rgba(34,197,94,.14);color:#22c55e;font-weight:600;font-size:13px;margin:4px 0 6px}
.sup-steps{display:flex;gap:8px;margin:10px 0 12px}
.sup-steps span{flex:1;padding:8px 10px;border-radius:10px;background:var(--card,rgba(255,255,255,.05));font-size:13px;opacity:.6;text-align:center}
.sup-steps span.on{opacity:1;outline:2px solid var(--accent,#6366f1)}
.sup-steps span.done{opacity:.9}
.sup-steps span.done::before{content:'✓ '}
/* customer device badges */
.pill.dev-samsung{background:rgba(37,99,235,.14);color:#2563eb}
.pill.dev-apple{background:rgba(100,116,139,.18)}
/* the section a notification opens */
.flash-go{outline:3px solid var(--accent,#0ea5e9);outline-offset:4px;border-radius:14px;transition:outline-color 2s}
/* small status badges (payments, links) */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: rgba(127,127,127,.15); white-space: nowrap; }
.badge.ok { background: color-mix(in srgb, var(--ok, #2a2) 18%, transparent); color: var(--ok, #2a2); }
.badge.warn { background: color-mix(in srgb, var(--warn, #c80) 18%, transparent); color: var(--warn, #c80); }
.badge.bad { background: color-mix(in srgb, var(--bad, #d33) 18%, transparent); color: var(--bad, #d33); }
/* ---- Language Center: one sheet for every language control ---- */
#lang-pill { position: fixed; inset-inline-start: 12px; bottom: calc(14px + var(--safe-b)); z-index: 28; }
@media (max-width: 899px) { body:has(.bnav) #lang-pill, body:has(.chat-fab) #lang-pill { bottom: calc(148px + var(--safe-b)); } }
.site, .s-doc { padding-bottom: 72px; }
.ls-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); background: color-mix(in srgb, var(--elevated) 86%, transparent); color: var(--text); font: 700 .82rem Inter, system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.3); backdrop-filter: blur(12px); cursor: pointer; transition: transform .15s var(--ease), border-color .2s; }
.ls-pill:hover { transform: translateY(-2px); border-color: var(--primary); }
.ls-pill:active { transform: scale(.96); }
.ls-pill-flag { font-size: 17px; }
.ls-pill-globe { opacity: .55; font-size: 12px; }
@media (max-width: 380px) { .ls-pill-name { display: none; } }
.ls-root { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.ls-root.open { pointer-events: auto; }
.ls-bg { position: absolute; inset: 0; background: rgba(2,6,12,.68); backdrop-filter: blur(8px); opacity: 0; transition: opacity .18s var(--ease); }
.ls-root.open .ls-bg { opacity: 1; }
.ls-sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: linear-gradient(180deg, color-mix(in srgb, var(--elevated) 92%, #000), var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border)); border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); box-shadow: 0 -20px 60px rgba(0,0,0,.5); transform: translateY(30px); opacity: 0; transition: transform .22s var(--ease), opacity .18s; }
.ls-root.open .ls-sheet { transform: none; opacity: 1; }
@media (min-width: 721px) { .ls-root { align-items: center; padding: 20px; } .ls-sheet { max-width: 480px; border-radius: 24px; transform: translateY(10px) scale(.98); padding-bottom: 18px; } }
.ls-grip { width: 44px; height: 4px; margin: 2px auto 10px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
@media (min-width: 721px) { .ls-grip { display: none; } }
.ls-head { display: flex; gap: 12px; align-items: flex-start; }
.ls-badge { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--primary) 18%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); font-size: 20px; }
.ls-titles { flex: 1; min-width: 0; }
.ls-titles h2 { font-size: 1.15rem; margin: 0; }
.ls-titles p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.ls-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.ls-x:hover { color: var(--text); background: rgba(255,255,255,.12); }
.ls-search { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 0 12px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line2); }
.ls-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ls-search input { flex: 1; border: 0; background: transparent; outline: none; color: var(--text); font: inherit; }
.ls-extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 2px; }
.ls-label { width: 100%; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.ls-recents { display: flex; gap: 6px; flex-wrap: wrap; }
.ls-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.ls-chip:hover, .ls-chip:focus-visible { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); outline: none; }
.ls-chip-lg { min-height: 38px; font-size: .84rem; }
.ls-caret { opacity: .6; margin-inline-start: 2px; }
.ls-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.ls-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: start; cursor: pointer; font-family: inherit; }
.ls-opt:hover { background: rgba(255,255,255,.045); }
.ls-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ls-opt.on { border-color: color-mix(in srgb, var(--primary) 45%, transparent); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ls-opt[hidden] { display: none; }
.ls-flag { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; font-size: 24px; border-radius: 12px; background: rgba(255,255,255,.05); }
.ls-names { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ls-names b { font-size: .98rem; }
.ls-names small { color: var(--muted); font-size: .74rem; }
.ls-check { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #04252a; background: var(--primary); font-weight: 900; font-size: .85rem; opacity: 0; transform: scale(.8); transition: .15s; }
.ls-opt.on .ls-check { opacity: 1; transform: none; }
.ls-empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: .86rem; }
.ls-preview { margin-top: 14px; border-radius: 16px; border: 1px solid var(--line2); background: linear-gradient(135deg, rgba(34,211,238,.07), rgba(0,168,181,.03)); padding: 12px 14px; }
.ls-pv-head { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.ls-pv-label { color: var(--muted); }
.ls-pv-lang { text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--text); }
.msg-t, .aia-msg, .ls-pv-text { unicode-bidi: plaintext; }
.ls-pv-text { margin-top: 6px; font-size: 1rem; font-weight: 700; }
.ls-pv-foot { margin-top: 2px; font-size: .8rem; color: var(--muted); }
.ls-note { margin: 10px 2px 0; font-size: .72rem; color: var(--muted); }
body.ls-open { overflow: hidden; }
.tr-langrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tr-langrow > div { flex: 1; min-width: 160px; }
@media (max-width: 480px) { .tr-langrow { flex-direction: column; align-items: stretch; } .tr-langrow .btn { width: 100%; } }
/* gentle motion on customer pages */
.site .card, .s-doc .card, .user-main .card { animation: fadeUp .45s cubic-bezier(.2,.8,.2,1) both; }
.site .card:nth-child(2), .s-doc .card:nth-child(2) { animation-delay: .05s; } .site .card:nth-child(3), .s-doc .card:nth-child(3) { animation-delay: .1s; } .site .card:nth-child(4), .s-doc .card:nth-child(4) { animation-delay: .15s; }
.btn { transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 35%, transparent); }
.chips a { transition: transform .12s, background .2s; } .chips a:active { transform: scale(.95); }
@media (max-width: 520px) { .btn, .chips a { min-height: 42px; } }
@media (prefers-reduced-motion: reduce) { .ls-sheet, .ls-bg, .ls-opt, .ls-check, .tr-status, .tr-tab, .tr-bar i, .site .card, .s-doc .card { animation: none !important; transition: none !important; } }
/* customer header: a clear logout button */
.logout-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, #ef4444 45%, transparent); color: #ef4444; background: color-mix(in srgb, #ef4444 10%, transparent); font-weight: 700; white-space: nowrap; }
.logout-btn:hover { background: color-mix(in srgb, #ef4444 18%, transparent); }
@media (max-width: 380px) { .logout-btn span { display: none; } }
/* package cards: button text wraps instead of being cut */
.plan-c .btn { white-space: normal; height: auto; min-height: 40px; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; text-overflow: clip; overflow: visible; }
.plan-c b { overflow-wrap: anywhere; }
/* agents: no text selection / copying of panel data (inputs still work) */
body.no-copy #app :not(input):not(textarea):not(select) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* reseller client tracker */
.cl-card { border-inline-start: 4px solid #22c55e; animation: fadeUp .35s both; }
.cl-card.cl-expiring { border-inline-start-color: #f59e0b; }
.cl-card.cl-expired { border-inline-start-color: #ef4444; }
.stat.c-warn b { color: #f59e0b; } .stat.c-bad b { color: #ef4444; }
/* in-panel translator: hide Google's bar, keep the page where it is */
.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; } .goog-text-highlight { background: none !important; box-shadow: none !important; }
html.translated-rtl #admin-body { direction: rtl; text-align: start; }
html.translated-rtl #admin-body [dir=ltr], html.translated-rtl #admin-body input, html.translated-rtl #admin-body .tbl { direction: ltr; }
.locked-text { background: rgba(127,127,127,.08) !important; cursor: default; }
/* agent work planning */
.wp-tbl td, .wp-tbl th { vertical-align: top; min-width: 120px; }
.wp-cell.wp-done { background: color-mix(in srgb, #22c55e 12%, transparent); }
.wp-cell.wp-now, .wp-today.wp-now { box-shadow: inset 0 0 0 2px #f59e0b; border-radius: 8px; }
.wp-today.wp-done { opacity: .75; }
.wp-th-today { color: var(--primary); }
.wp-check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-weight: 700; min-height: 36px; }
.wp-check input { width: 20px; height: 20px; accent-color: #22c55e; }
.wp-bar { height: 8px; border-radius: 99px; background: rgba(127,127,127,.18); margin-top: 12px; overflow: hidden; }
.wp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #06b6d4); transition: width .5s; }
.wp-tbl td:first-child, .wp-tbl th:first-child { min-width: 210px; max-width: 230px; white-space: normal !important; }

/* owner planning */
.op-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.op-tools { display: inline-flex; gap: 2px; }
.op-tools .btn { padding: 4px 8px; min-height: 32px; }
.op-late { box-shadow: inset 3px 0 0 #ef4444; }
.op-week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.op-col { border: 1px solid var(--line, rgba(127,127,127,.2)); border-radius: 12px; padding: 6px; min-width: 150px; }
.op-col.op-today { border-color: var(--primary); }
.op-colh { display: block; cursor: pointer; padding: 4px 4px 6px; border-bottom: 1px solid rgba(127,127,127,.15); margin-bottom: 4px; }
.op-mini { display: flex; gap: 4px; align-items: center; font-size: 12px; padding: 3px 2px; border-radius: 8px; }
.op-mini .wp-check { min-height: 28px; } .op-mini .wp-check input { width: 18px; height: 18px; }
.op-mini .btn { padding: 2px 6px; min-height: 26px; }
.op-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.op-wdh { text-align: center; font-weight: 700; font-size: 12px; opacity: .7; }
.op-day { display: block; min-height: 92px; border: 1px solid rgba(127,127,127,.2); border-radius: 10px; padding: 6px; cursor: pointer; overflow: hidden; }
.op-day:hover { border-color: var(--primary); }
.op-day.op-out { opacity: .45; } .op-day.op-off { opacity: .25; pointer-events: none; }
.op-day.op-today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.op-dbar { height: 4px; border-radius: 99px; background: rgba(127,127,127,.18); margin: 4px 0; overflow: hidden; } .op-dbar i { display: block; height: 100%; background: #22c55e; }
.op-hol { color: #f59e0b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .op-meet { color: #a855f7; font-weight: 700; }
.op-api-list { display: grid; gap: 6px; }
.op-api { display: grid; grid-template-columns: 28px 1.2fr 1.4fr 1.2fr auto; gap: 6px; align-items: center; padding: 4px; border-radius: 10px; }
.op-api .op-n { text-align: center; opacity: .7; }
.op-scope { display: grid; gap: 6px; margin: 10px 0; padding: 10px; border-radius: 10px; background: rgba(127,127,127,.08); }
.op-scope label, .op-repeat label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.op-scope input, .op-repeat input[type=radio], .op-repeat input[type=checkbox] { width: auto; }
.op-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; gap: 10px; align-items: center; width: min(560px, 94vw); padding: 12px 14px; border-radius: 14px; background: var(--card, #111827); border: 2px solid #f59e0b; box-shadow: 0 12px 40px rgba(0,0,0,.4); animation: opIn .3s ease; }
@keyframes opIn { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.op-pill { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 900; background: #ef4444; color: #fff; padding: 8px 14px; border-radius: 99px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
@media (max-width: 700px) { .op-item { flex-wrap: wrap; } .op-item > div { flex-basis: calc(100% - 40px) !important; } .op-item .op-tools { margin-inline-start: 34px; } .op-item .wp-check { margin-inline-start: auto; }
  .op-api { grid-template-columns: 24px 1fr; border: 1px solid rgba(127,127,127,.18); } .op-api > input, .op-api > select { grid-column: 2; } .op-api > button { grid-column: 2; } .op-day { min-height: 64px; padding: 4px; } .op-day .small { font-size: 10px; } }
@media (max-width: 700px) { .op-cnt { display: none; } }

/* ---- Translator hub (admin) ---- */
.tr-hub { display: flex; flex-direction: column; gap: 14px; }
.tr-top { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.tr-brand { display: flex; gap: 10px; flex: 1; min-width: 220px; align-items: center; }
.tr-logo { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--primary) 16%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent); font-size: 22px; }
.tr-brand h3 { margin: 0; }
.tr-brand p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.tr-target { display: flex; flex-direction: column; gap: 4px; min-width: 210px; }
.tr-target span { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.tr-target select { min-height: 42px; padding: 0 10px; border-radius: 11px; background: var(--elevated); border: 1px solid var(--line2); color: var(--text); font-family: inherit; }
.tr-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.04); border: 1px solid var(--line2); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.tr-tabs::-webkit-scrollbar { display: none; }
.tr-tab { flex: 1 0 auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tr-tab:hover { color: var(--text); }
.tr-tab.on { background: var(--elevated); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.tr-body { min-height: 300px; }
.tr-hero { display: flex; gap: 14px; padding: 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, transparent), transparent); }
.tr-hero.soft { margin-top: 14px; }
.tr-hero-ico { font-size: 30px; flex: 0 0 auto; }
.tr-hero h4 { margin: 0; font-size: 1rem; }
.tr-hero p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.tr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tr-cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .tr-cards, .tr-cards-3 { grid-template-columns: 1fr; } }
.tr-mini { border: 1px solid var(--line2); background: rgba(255,255,255,.025); border-radius: 14px; padding: 14px; }
.tr-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.tr-now { display: flex; align-items: center; gap: 10px; }
.tr-now-flag { font-size: 26px; flex: 0 0 auto; }
.tr-now b { display: block; }
.tr-now small { color: var(--muted); font-size: .74rem; }
.tr-badge { margin-inline-start: auto; font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(127,127,127,.14); color: var(--muted); }
.tr-badge.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.tr-mini-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tr-help { margin: 8px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.tr-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .86rem; font-weight: 600; }
.tr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tr-toggle i { position: relative; width: 40px; height: 23px; border-radius: 99px; background: rgba(127,127,127,.3); transition: .2s; flex: 0 0 auto; }
.tr-toggle i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s; }
.tr-toggle input:checked + i { background: var(--primary); }
.tr-toggle input:checked + i::after { transform: translateX(17px); }
.tr-toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
[dir=rtl] .tr-toggle input:checked + i::after { transform: translateX(-17px); }
.tr-progress { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line2); }
.tr-progress-top { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.tr-bar { height: 6px; border-radius: 99px; background: rgba(127,127,127,.2); overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .25s; }
.tr-never { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .79rem; color: var(--muted); }
.tr-text { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .tr-text { grid-template-columns: 1fr; } }
.tr-pane { display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: 14px; background: rgba(255,255,255,.025); overflow: hidden; }
.tr-out-pane { border-color: color-mix(in srgb, var(--primary) 24%, var(--line2)); background: color-mix(in srgb, var(--primary) 4%, rgba(255,255,255,.025)); }
.tr-pane-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line2); font-size: .72rem; color: var(--muted); }
.tr-pane-head .tr-label { margin: 0; }
.tr-pane textarea { min-height: 170px; max-height: 340px; resize: vertical; border: 0; background: transparent; padding: 12px; outline: none; width: 100%; font: inherit; color: var(--text); }
.tr-out { min-height: 170px; max-height: 340px; overflow: auto; padding: 12px; white-space: pre-wrap; line-height: 1.55; font-size: .94rem; }
.tr-placeholder { color: var(--muted); }
.tr-pane-foot { display: flex; gap: 6px; align-items: center; padding: 8px; border-top: 1px solid var(--line2); flex-wrap: wrap; }
.tr-tip { margin-top: 10px; font-size: .76rem; color: var(--muted); }
.tr-hist { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.tr-hist-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--text); cursor: pointer; text-align: start; font-size: .78rem; font-family: inherit; }
.tr-hist-item:hover { background: rgba(255,255,255,.04); }
.tr-hist-txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-hist-out { color: var(--muted); max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-gloss { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 300px; overflow: auto; }
.tr-gloss-row { display: grid; grid-template-columns: 1fr 24px 1fr 28px; gap: 6px; align-items: center; }
.tr-gloss-row input { min-height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line2); background: var(--elevated); color: var(--text); font-family: inherit; }
.tr-gloss-arrow { text-align: center; color: var(--muted); }
.tr-gloss-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: var(--muted); cursor: pointer; font-size: 16px; }
.tr-gloss-x:hover { color: var(--bad); background: rgba(255,107,122,.12); }
.tr-reader-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .8rem; font-weight: 700; color: var(--accent); }
.tr-status { position: fixed; inset-inline-end: 14px; bottom: calc(14px + var(--safe-b)); z-index: 29; display: flex; align-items: center; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: color-mix(in srgb, var(--elevated) 90%, transparent); box-shadow: 0 8px 24px rgba(0,0,0,.3); backdrop-filter: blur(12px); overflow: hidden; animation: pop .25s var(--ease); }
.tr-status-main { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px 0 12px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.tr-status-main b { font-weight: 700; }
.tr-status-x { width: 30px; height: 38px; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; border-inline-start: 1px solid var(--line2); }
.tr-status-x:hover { color: var(--bad); background: rgba(255,107,122,.1); }
.tr-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.tr-msg-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-start: 4px; border-radius: 50%; border: 0; background: rgba(127,127,127,.12); color: var(--muted); font-size: 11px; cursor: pointer; vertical-align: middle; }
.tr-msg-btn:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--text); }
.msg.tr-msg-alt .msg-t { border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.tr-teaser { display: flex; gap: 14px; align-items: center; }
.tr-teaser-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--primary) 16%, transparent); font-size: 22px; flex: 0 0 auto; }
.tr-live-body [dir=ltr], .tr-live-body .cred-v, .tr-live-body input[type=email], .tr-live-body input[type=url], .tr-live-body .mono { direction: ltr; text-align: left; }
.tr-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .7rem; color: var(--muted); border-top: 1px solid var(--line2); padding-top: 10px; }
.tr-engine { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.tr-engine i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.tr-field { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--muted); }
.tr-field select { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--elevated); color: var(--text); font-family: inherit; }
.tr-webrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tr-webrow input { flex: 1; min-width: 220px; min-height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--text); font-family: inherit; }
.tr-link { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.tr-reader { display: flex; flex-direction: column; gap: 12px; }
.tr-reader-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-reader-head .tr-label { margin: 0; flex: 1; }
.tr-reader-body { max-height: 52vh; overflow: auto; padding: 6px 4px; line-height: 1.65; font-size: .95rem; }
.tr-reader-body p { margin: 0 0 12px; }
.tr-reader-load { display: grid; place-items: center; gap: 10px; padding: 40px 10px; text-align: center; color: var(--muted); }
.tr-empty { padding: 24px 10px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.tr-count, .tr-detected { font-variant-numeric: tabular-nums; }

:root {
  --cat-sales: #2DD4BF;
  --cat-finance: #FBBF24;
  --cat-customers: #38BDF8;
  --cat-resellers: #C084FC;
  --cat-agents: #818CF8;
  --cat-promos: #F472B6;
  --cat-account: #A3E635;
  --cat-system: #FB923C;
}
[data-theme=light] {
  --cat-sales: #0F766E;
  --cat-finance: #92400E;
  --cat-customers: #075985;
  --cat-resellers: #6B21A8;
  --cat-agents: #3730A3;
  --cat-promos: #9D174D;
  --cat-account: #3F6212;
  --cat-system: #9A3412;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]) {
    --cat-sales: #0F766E;
    --cat-finance: #92400E;
    --cat-customers: #075985;
    --cat-resellers: #6B21A8;
    --cat-agents: #3730A3;
    --cat-promos: #9D174D;
    --cat-account: #3F6212;
    --cat-system: #9A3412;
  }
}

.cat-sales { --cat: var(--cat-sales); }
.cat-finance { --cat: var(--cat-finance); }
.cat-customers { --cat: var(--cat-customers); }
.cat-resellers { --cat: var(--cat-resellers); }
.cat-agents { --cat: var(--cat-agents); }
.cat-promos { --cat: var(--cat-promos); }
.cat-account { --cat: var(--cat-account); }
.cat-system { --cat: var(--cat-system); }
:is(.cat-sales, .cat-finance, .cat-customers, .cat-resellers, .cat-agents, .cat-promos, .cat-account, .cat-system) {
  --cat-bg: color-mix(in srgb, var(--cat) 16%, transparent);
  --cat-line: color-mix(in srgb, var(--cat) 45%, transparent);
}
.pill:is(.cat-sales, .cat-finance, .cat-customers, .cat-resellers, .cat-agents, .cat-promos, .cat-account, .cat-system) {
  background: var(--cat-bg); border-color: var(--cat-line); color: var(--cat);
}
.card:is(.cat-sales, .cat-finance, .cat-customers, .cat-resellers, .cat-agents, .cat-promos, .cat-account, .cat-system) {
  border-inline-start: 4px solid var(--cat);
}
.nav-g:is(.cat-sales, .cat-finance, .cat-customers, .cat-resellers, .cat-agents, .cat-promos, .cat-account, .cat-system) { color: var(--cat); }
.nav-g:is(.cat-sales, .cat-finance, .cat-customers, .cat-resellers, .cat-agents, .cat-promos, .cat-account, .cat-system)::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px;
  border-radius: 50%; background: var(--cat); vertical-align: middle;
}

.btn.refresh-btn { min-width: var(--tap); min-height: var(--tap); gap: 8px; position: relative; }
.refresh-btn .rf-ico { font-size: 1.1rem; line-height: 1; }
.refresh-btn .rf-spin { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: spin .75s linear infinite; }
.refresh-btn.busy .rf-ico { display: none; }
.refresh-btn.busy .rf-spin { display: inline-block; }
.refresh-btn[aria-busy="true"] { cursor: progress; }
.refresh-meta { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.refresh-meta::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }

.notice.warning.important-notice { display: flex; align-items: flex-start; gap: 10px; color: var(--text);
  border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); border-inline-start: 4px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.notice.warning.important-notice .notice-ic { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--warn); color: var(--bg); font-weight: 900; font-size: .8rem; }
.notice.warning.important-notice .notice-txt { min-width: 0; overflow-wrap: anywhere; }
[data-theme=light] .notice.warning.important-notice .notice-ic { color: var(--surface); }
.notice-edit { display: grid; gap: 12px; }
.notice-edit textarea { min-height: 120px; }
.notice-edit-preview { display: grid; gap: 6px; }
.notice-edit-preview .important-notice { margin-bottom: 0; }
.notice-edit-actions .btn { min-height: var(--tap); }

.ads-grid, .domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ad-card, .promo-card, .sample-app { min-width: 0; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r); padding: 14px; }
.ad-card h4, .promo-card h4, .sample-app h4 { margin: 0 0 6px; font-size: .95rem; }
.ad-card p, .promo-card p, .sample-app p { margin: 0 0 10px; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.ad-card a, .ad-card button, .promo-card a, .promo-card button, .sample-app a, .sample-app button { min-height: var(--tap); }
.promo-card { border-color: var(--cat-line, color-mix(in srgb, var(--cat-promos) 40%, var(--line2)));
  background: linear-gradient(160deg, color-mix(in srgb, var(--cat, var(--cat-promos)) 10%, var(--surface)), var(--surface)); }
.bank-tx-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 8px 14px; border-radius: 11px; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--cat-finance) 45%, var(--line2));
  background: color-mix(in srgb, var(--cat-finance) 12%, transparent); color: var(--cat-finance); font-weight: 700; }
.bank-tx-link:hover { background: color-mix(in srgb, var(--cat-finance) 22%, transparent); }
[data-theme=light] .bank-tx-link { background: color-mix(in srgb, var(--cat-finance) 10%, var(--surface)); }
.sample-app { border-style: dashed; }
.ads-panel-wrap { display: grid; gap: 12px; margin: 14px 0; }
.ads-panel-wrap h3 { margin: 0; }
.ads-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ads-tab { min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 700; cursor: pointer; }
.ads-tab[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); }
.ad-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--r) - 4px); margin-bottom: 10px; }
.ad-card .ad-cta { color: var(--accent); font-weight: 700; }
.ad-card > button, .promo-card > button, .sample-app > button { min-height: var(--tap); }
.domain-grid label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.domain-grid input, .domain-grid select { min-height: var(--tap); }
.domain-grid button { min-height: var(--tap); padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font-weight: 700; }
.domain-grid button[data-act="domain-save"] { border-color: var(--accent); }
.domain-note { grid-column: 1 / -1; margin: 0; color: var(--warn); font-size: .82rem; }
.sample-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; margin: 10px 0; }
.sample-metrics p { margin: 0; }
.notice-edit-preview .important-notice.empty { color: var(--muted); border-color: var(--line2); background: transparent; }

/* 20 Nov 2026: gifts, referrals and synced planning */
.gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.gift-item { min-width: 0; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface, var(--panel)); }
.gift-item.gift-free { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface, var(--panel))); }
.gift-item.gift-discount { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface, var(--panel))); }
[data-theme=light] .gift-item.gift-free { background: color-mix(in srgb, var(--accent) 8%, #fff); }
[data-theme=light] .gift-item.gift-discount { background: color-mix(in srgb, var(--primary) 8%, #fff); }
.plan-c.plan-lifetime { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.ref-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 10px; margin-bottom: 8px; border: 1px dashed var(--line2); border-radius: 10px; background: var(--surface, var(--panel)); }
.ref-code > span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.ref-tiers .list-item { padding-block: 6px; }
.op-months-scroll { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-months-scroll select { min-height: var(--tap); max-width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface, var(--panel)); color: var(--text); font-weight: 700; }
.op-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface, var(--panel)); font-size: .78rem; white-space: nowrap; }
.op-chip.on { border-color: var(--accent); color: var(--accent); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-sync-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.plan-sync-row:last-child { border-bottom: 0; }
.plan-sync-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface, var(--panel)); font-size: 1rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.op-week { scrollbar-width: thin; }
@media (max-width: 640px) {
  .gift-grid { grid-template-columns: 1fr; }
  .op-months-scroll { flex-direction: column; align-items: stretch; }
  .op-months-scroll select { width: 100%; }
  .op-week { grid-template-columns: repeat(7, minmax(118px, 1fr)); scroll-snap-type: x proximity; }
  .op-col { min-width: 118px; scroll-snap-align: start; }
  .plan-sync-row { align-items: flex-start; flex-wrap: wrap; }
  .plan-sync-row > .small { width: 100%; padding-inline-start: 44px; }
  .topbar { padding-bottom: calc(10px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  body::before, body::after, .cinema::before { animation: none !important; transform: none !important; }
}

/* AI Assistant tab */
.aia-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--elevated); border: 1px solid var(--line2); }
.aia-stat .aia-val { font-size: 15px; font-weight: 700; }
.aia-stat .aia-sub { font-size: 12px; color: var(--muted); }
.aia-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.aia-actions .btn { flex: 0 1 auto; min-height: 40px; }
.aia-chat { display: flex; flex-direction: column; gap: 8px; max-height: 470px; overflow-y: auto; padding: 4px 0; }
.aia-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.aia-msg.aia-me { align-self: flex-end; background: var(--primary); color: #fff; }
.aia-msg.aia-ai { align-self: flex-start; background: var(--elevated); border: 1px solid var(--line2); }
.aia-msg .aia-meta { display: block; font-size: 10px; opacity: .7; margin-top: 4px; text-align: end; }
.aia-msg.aia-ai .aia-meta { text-align: start; }
.aia-empty { color: var(--muted); text-align: center; padding: 26px 0; font-size: 13px; }
.aia-input-row { display: flex; gap: 8px; margin-top: 10px; }
.aia-input-row input[type=text] { flex: 1; min-width: 120px; }

/* IBO Players (IBO tab): APKs & playlists */
.ibo-page { display: flex; flex-direction: column; gap: 16px; }
.ibo-players { display: grid; gap: 10px; }
.ibo-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--elevated); border: 1px solid var(--line2); }
.ibo-card h4 { margin: 0; font-size: 15px; }
.ibo-card .ibo-link { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); }
.ibo-card .ibo-link a { color: var(--primary); }
.ibo-card .ibo-alt { font-size: 11px; }
.ibo-card .ibo-macs { font-family: 'Courier New', Courier, monospace; font-size: 12px; word-break: break-all; }
.ibo-app-icon { width: 24px; height: 24px; border-radius: 8px; vertical-align: middle; }
.ibo-app-big { width: 40px; height: 40px; border-radius: 12px; }
.ibo-devlist { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; }
.ibo-devrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ibo-devrow img.ibo-app-icon { flex: 0 0 auto; }
.ibo-devrow select.ibo-devsel { flex: 1; min-width: 150px; }
.ibo-devrow input.ibo-devmac { flex: 1; min-width: 150px; font-family: 'Courier New', Courier, monospace; font-size: 12px; }

/* Sports & events (Promotions tab) */
.sport-cards { display: grid; gap: 10px; }
.sport-card { padding: 12px 14px; border-radius: 14px; background: var(--elevated); border: 1px solid var(--line2); }
.sport-card .sport-tip { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 560px) {
  .ibo-players, .sport-cards { grid-template-columns: 1fr; }
  .ibo-card, .sport-card { padding: 12px; }
  .aia-actions { flex-direction: column; }
  .aia-actions .btn { width: 100%; }
  .aia-msg { max-width: 100%; }
  .ibo-macs { font-size: 11px; }
  .ibo-devrow { flex-direction: column; align-items: stretch; }
  .ibo-devrow select.ibo-devsel, .ibo-devrow input.ibo-devmac { width: 100%; min-width: 0; }
}

/* Promotions hub — ready, sports, reseller, credit and management */
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pc-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); padding-bottom: 8px; margin-bottom: 14px; }
.pc-tab { background: transparent; border: 1px solid transparent; color: var(--muted); padding: 8px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pc-tab:hover { background: var(--elevated); color: var(--text); }
.pc-tab.on { background: var(--primary); color: #fff; }
.pc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { background: var(--elevated); border: 1px solid var(--line2); color: var(--muted); padding: 6px 11px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pc-grid, .pc-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pc-card, .pc-event { background: var(--elevated); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pc-card:hover, .pc-event:hover { border-color: var(--primary); }
.pc-card-top { display: flex; gap: 10px; align-items: flex-start; }
.pc-ic { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.pc-card h4, .pc-event h4 { font-size: 15px; }
.pc-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pc-tpl { cursor: pointer; }
.pc-tpl-preview { font-size: 12px; background: rgba(127, 127, 127, .08); border-radius: 10px; padding: 10px; }
.pc-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.pc-detail-grid > div { display: flex; flex-direction: column; gap: 2px; }
.pc-pv-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); padding-bottom: 8px; }
.pc-pv-tab { background: var(--elevated); border: 1px solid var(--line2); color: var(--muted); padding: 7px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.pc-pv-tab.on { background: var(--primary); color: #fff; }
.pc-pv-panel { margin-top: 6px; }
@media (max-width: 560px) {
  .pc-grid, .pc-events { grid-template-columns: 1fr; }
  .pc-tab { flex: 1 1 auto; text-align: center; }
  .pc-head .btn { width: 100%; }
}

/* work planning: several schedules + time zones */
.wp-plans { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.wp-plan { flex: none; display: grid; gap: 2px; text-align: start; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(127,127,127,.25); background: var(--card, transparent); color: inherit; cursor: pointer; min-width: 200px; max-width: 280px; }
.wp-plan small { opacity: .75; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-plan.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.wp-plan.add { border-style: dashed; align-content: center; }
.wp-clocks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wp-clock { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; border-radius: 99px; background: rgba(127,127,127,.12); font-size: 13px; }
.wp-clock small { opacity: .7; font-size: 11px; } .wp-clock.me { background: rgba(34,197,94,.18); } .wp-clock.plan { outline: 1px solid var(--primary); }
.wp-mine { color: #16a34a; font-weight: 600; } .wp-mine sup { font-size: 10px; }
.wp-assign select { min-width: 120px; } .wp-assign .tz-select { min-width: 230px; }

/* owners / full control */
.owners-card { border: 1px solid rgba(234,179,8,.4); }
.owners-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.owners-list .tm { border: 1px solid rgba(127,127,127,.22); border-radius: 12px; padding: 10px; }
