/* =============================================================
   SMM Panel — "Candy pop" design system
   Bold colour with a job: platforms, money and state.
   ============================================================= */

:root {
  --ink: #1b1035;            /* text & sidebar */
  --ink-2: #4a3f66;          /* secondary text */
  --muted: #7d739a;          /* hints, axis labels */
  --line: #e7e1f4;           /* hairlines */
  --line-2: #d8cfee;
  --surface: #ffffff;
  --plane: #f5f2fd;          /* page background (cool lilac) */
  --tint: #efe9fd;           /* soft fills */

  --brand-1: #7b2ff7;        /* grape   (overridden by Appearance settings) */
  --brand-2: #ff2e93;        /* hot pink */
  --brand-3: #ff9f1c;        /* mango */
  --grad: linear-gradient(118deg, var(--brand-1) 0%, var(--brand-2) 58%, var(--brand-3) 100%);

  --ok: #0e9f6e;    --ok-bg: #dcf7ec;
  --info: #2563eb;  --info-bg: #e3ecff;
  --warn: #b45309;  --warn-bg: #fff1d6;
  --bad: #d92d4b;   --bad-bg: #ffe2e7;
  --violet-bg: #efe6ff;

  --r-xl: 26px; --r-lg: 18px; --r-md: 12px; --r-sm: 9px; --r-pill: 999px;
  --shadow-pop: 0 18px 40px -18px rgba(123, 47, 247, .45);
  --shadow-card: 0 1px 0 rgba(27, 16, 53, .04);

  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --side-w: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.55 var(--font-ui); color: var(--ink); background: var(--plane);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { vertical-align: middle; }
a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-1) 55%, white); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand-2) 25%, white); }

h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); }
h1 { font: 800 30px/1.1 var(--font-display); letter-spacing: -.02em; }
h2 { font: 700 19px/1.25 var(--font-display); letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; }

/* ---------- app shell ---------- */

.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; background: linear-gradient(to right, var(--ink) var(--side-w), transparent var(--side-w)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: #d9d2ef;
  display: flex; flex-direction: column; padding: 18px 14px 20px; scrollbar-width: thin; scrollbar-color: #3a2d5e transparent;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: #fff; font: 800 19px/1.1 var(--font-display); letter-spacing: -.01em; text-decoration: none; }
.sidebar .brand img { max-height: 36px; max-width: 190px; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); flex: none; position: relative; box-shadow: 0 6px 16px -6px var(--brand-2); }
.brand-mark::after { content: ""; position: absolute; inset: 8px 8px 8px 8px; border: 2.5px solid #fff; border-radius: 50%; border-right-color: transparent; transform: rotate(-30deg); }
.side-area { margin: 0 6px 14px; padding: 4px 10px; border-radius: var(--r-pill); background: #2a1d4d; color: #ffb35c; font-size: 12px; font-weight: 700; width: max-content; }
.side-group { margin: 12px 10px 4px; font-size: 12px; font-weight: 600; color: #8f84b3; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 11px; color: #d9d2ef;
  font-weight: 600; font-size: 14.5px; text-decoration: none; position: relative;
}
.side-nav a:hover { background: #271a48; color: #fff; }
.side-nav a .ico { color: #a597d4; }
.side-nav a.active { background: #2d1f55; color: #fff; }
.side-nav a.active .ico { color: #fff; }
.side-nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 5px; border-radius: 0 6px 6px 0; background: var(--grad);
}
.side-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--brand-2); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 16px 10px 0; font-size: 12.5px; color: #8f84b3; }
.side-foot a { color: #c9bff0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px;
  background: color-mix(in srgb, var(--plane) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.topbar-title { font: 700 17px/1 var(--font-display); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: var(--r-pill); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.balance-pill:hover { text-decoration: none; border-color: var(--line-2); }
.balance-pill .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; position: relative; text-decoration: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); text-decoration: none; }
.icon-btn .pip { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand-2); border: 2px solid var(--surface); }
.user-chip { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; text-decoration: none; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); }
.user-chip:hover { background: var(--tint); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; background: var(--grad); flex: none; }

.page { padding: 26px 28px 60px; width: 100%; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.imp-bar { background: #2a1d4d; color: #fff; padding: 9px 28px; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.imp-bar form { margin-left: auto; }

/* ---------- layout helpers ---------- */

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.split-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; min-width: 0; }
.row > .shrink { flex: 0 0 auto; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- cards ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); min-width: 0; }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 17px; }
.card-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; font-weight: 500; font-family: var(--font-ui); }
.card-body { padding: 20px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: #fcfbff; border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* The balance "ticket" — the one loud element of the dashboard */
.ticket {
  position: relative; border-radius: var(--r-xl); padding: 22px 24px; color: #fff; background: var(--grad); overflow: hidden;
  box-shadow: var(--shadow-pop); isolation: isolate;
}
.ticket::before { /* perforation */
  content: ""; position: absolute; right: 116px; top: 14px; bottom: 14px; border-left: 2px dashed rgba(255, 255, 255, .45);
}
.ticket::after { /* notches */
  content: ""; position: absolute; right: 104px; top: -12px; width: 24px; height: calc(100% + 24px);
  background: radial-gradient(circle at 12px 0, var(--plane) 11px, transparent 12px), radial-gradient(circle at 12px 100%, var(--plane) 11px, transparent 12px);
}
.ticket .t-label { font-weight: 600; opacity: .9; }
.ticket .t-value { font: 800 40px/1.05 var(--font-ui); letter-spacing: -.02em; margin: 6px 0 4px; }
.ticket .t-sub { font-size: 13.5px; opacity: .9; }
.ticket .t-action { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 76px; text-align: center; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.ticket .t-action span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 6px; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 1.5px solid rgba(255, 255, 255, .5); }
.ticket .t-action:hover span { background: rgba(255, 255, 255, .32); }
.ticket .t-locked { opacity: .78; cursor: default; }
.ticket .t-act-btn { background: none; border: 0; padding: 0; color: #fff; font: 700 13px/1.3 var(--font-ui); cursor: pointer; width: 76px; }
.ticket .t-act-btn span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 6px; border-radius: 50%; background: rgba(255, 255, 255, .22); border: 1.5px solid rgba(255, 255, 255, .5); }
.ticket .t-act-btn:hover span { background: rgba(255, 255, 255, .32); }

.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.stat .s-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--c, var(--brand-1)); background: color-mix(in srgb, var(--c, var(--brand-1)) 13%, white); }
.stat .s-label { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.stat .s-value { font: 700 22px/1.15 var(--font-ui); letter-spacing: -.01em; margin-top: 2px; }
.stat .s-delta { font-size: 12.5px; color: var(--muted); }

/* ---------- forms ---------- */

label, .label { display: block; font-weight: 600; font-size: 13.5px; margin: 0 0 7px; color: var(--ink); }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); font: inherit; color: var(--ink);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a79fc0; text-transform: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 16%, transparent); }
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237d739a' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
input[type=color] { width: 52px; height: 42px; padding: 3px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: #fff; cursor: pointer; }
.input-icon { position: relative; }
.input-icon > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 40px; }
.input-affix { display: flex; align-items: stretch; }
.input-affix > span { display: grid; place-items: center; padding: 0 13px; border: 1.5px solid var(--line-2); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--tint); color: var(--ink-2); font-weight: 700; }
.input-affix > input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 6px; cursor: pointer; border-radius: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-1); flex: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch .sw-text { font-weight: 600; }
.switch .sw-text small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.switch input { appearance: none; width: 46px; height: 27px; border-radius: 14px; background: #d8cfee; position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked { background: var(--brand-1); }
.switch input:checked::after { transform: translateX(19px); }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--r-md);
  border: 0; font: 700 14.5px/1.2 var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--grad); background-size: 140% 100%; background-position: 0 0; transition: background-position .3s, transform .1s, box-shadow .2s;
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--brand-2) 80%, transparent);
}
.btn:hover { text-decoration: none; background-position: 100% 0; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; }
.btn-soft { background: var(--tint); color: var(--brand-1); box-shadow: none; }
.btn-soft:hover { background: color-mix(in srgb, var(--brand-1) 14%, white); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); box-shadow: none; }
.btn-ghost:hover { border-color: var(--ink-2); background: var(--surface); }
.btn-dark { background: var(--ink); box-shadow: none; }
.btn-dark:hover { background: #2a1d4d; }
.btn-danger { background: var(--bad); box-shadow: none; }
.btn-danger:hover { background: #b9213d; }
.btn-ok { background: var(--ok); box-shadow: none; }
.btn-ok:hover { background: #0a8a5f; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand-1); font: inherit; font-weight: 600; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.btn[data-armed="1"] { background: var(--bad); color: #fff; }
form.inline { display: inline; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfbff; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbf9ff; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .link-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .cat-row td { background: var(--plane); font-weight: 700; padding-top: 10px; padding-bottom: 10px; }
.table .cat-row:hover td { background: var(--plane); }
.table .t-main { font-weight: 600; }
.table .t-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * + * { margin-left: 6px; }
.id-cell { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }

/* ---------- badges & chips ---------- */

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 9px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; white-space: nowrap; background: #eeeaf7; color: #4a3f66; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-completed, .b-approved, .b-active, .b-answered, .b-paid { background: var(--ok-bg); color: #08734f; }
.b-pending, .b-open, .b-customer-reply, .b-created { background: var(--warn-bg); color: var(--warn); }
.b-processing, .b-in-progress { background: var(--info-bg); color: var(--info); }
.b-partial { background: var(--violet-bg); color: #6324c9; }
.b-canceled, .b-failed, .b-rejected, .b-banned, .b-disabled, .b-hidden { background: var(--bad-bg); color: #b4203c; }
.b-closed, .b-completed-drip { background: #eeeaf7; color: #4a3f66; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700;
  color: color-mix(in srgb, var(--c) 82%, black); background: color-mix(in srgb, var(--c) 12%, white); white-space: nowrap;
}
.chip .ico { color: var(--c); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--tint); color: var(--ink-2); }
.tag-ok { background: var(--ok-bg); color: #08734f; }
.tag-violet { background: var(--violet-bg); color: #6324c9; }

/* ---------- tabs & filters ---------- */

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover { border-color: var(--line-2); color: var(--ink); text-decoration: none; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a .n { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.toolbar .grow { flex: 1 1 220px; }
.toolbar input, .toolbar select { padding-top: 9px; padding-bottom: 9px; }
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-md); background: var(--tint); gap: 4px; }
.seg a, .seg button { padding: 7px 14px; border-radius: 9px; border: 0; background: none; font: 600 13.5px var(--font-ui); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg .active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 16, 53, .1); }

/* ---------- alerts & empty states ---------- */

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-md); margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.alert .ico { margin-top: 2px; }
.alert-success { background: var(--ok-bg); color: #075e41; border-color: #b6ecd6; }
.alert-error { background: var(--bad-bg); color: #8f1a31; border-color: #ffc4cf; }
.alert-info { background: var(--info-bg); color: #1d48b8; border-color: #c6d6ff; }
.alert-warning { background: var(--warn-bg); color: #8a4108; border-color: #ffdf9e; }
.empty { text-align: center; padding: 44px 24px; }
.empty-ico { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--brand-1); background: var(--tint); }
.empty h3 { font: 700 18px var(--font-display); margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 16px; }

/* ---------- social sign-in ---------- */

.social { display: grid; gap: 10px; justify-items: center; margin-bottom: 18px; }
.social-btn { width: 100%; max-width: 340px; min-height: 42px; display: flex; justify-content: center; }
.social-btn > div { width: 100%; display: flex; justify-content: center; }
#appleid-signin { height: 42px; cursor: pointer; }
.or-line { display: flex; align-items: center; gap: 12px; width: 100%; color: var(--muted); font-size: 13px; margin-top: 6px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.identity { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.identity:last-child { border-bottom: 0; }
.identity .id-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--ink); font-weight: 800; flex: none; }
.identity .id-text { flex: 1; min-width: 0; }
.identity .id-text b { display: block; }

/* ---------- order form ---------- */

.order-form .svc-picker { position: relative; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; margin-bottom: 14px; }
.cat-pills button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: var(--surface); font: 600 13.5px var(--font-ui); color: var(--ink-2); cursor: pointer;
}
.cat-pills button .ico { color: var(--c, var(--brand-1)); }
.cat-pills button.active { border-color: var(--c, var(--brand-1)); background: color-mix(in srgb, var(--c, var(--brand-1)) 10%, white); color: var(--ink); }
.svc-detail { margin-top: 14px; border-radius: var(--r-md); background: var(--plane); padding: 16px; }
.svc-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.svc-facts div { background: var(--surface); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.svc-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.svc-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.svc-desc { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; max-height: 180px; overflow: auto; }
.svc-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.fav-btn { border: 0; background: none; color: #c9bfe3; cursor: pointer; padding: 4px; border-radius: 8px; line-height: 0; }
.fav-btn:hover { color: var(--brand-3); }
.fav-btn.on { color: var(--brand-3); }
.fav-btn.on .ico { fill: var(--brand-3); }
.charge-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); border: 1.5px dashed var(--line-2); margin: 18px 0 16px; }
.charge-box .c-label { color: var(--ink-2); font-weight: 600; }
.charge-box .c-value { font: 800 26px/1 var(--font-ui); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.drip-box { margin-top: 14px; padding: 16px; border-radius: var(--r-md); background: var(--tint); }

/* ---------- misc components ---------- */

.list-plain { list-style: none; margin: 0; padding: 0; }
.ann { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: 0; }
.ann-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ann-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--info); }
.ann-success .ann-dot { background: var(--ok); }
.ann-warning .ann-dot { background: #f59e0b; }
.ann h3 { font-size: 15px; }
.ann .when { color: var(--muted); font-size: 12.5px; margin-left: auto; white-space: nowrap; }
.ann .ann-body { color: var(--ink-2); font-size: 14px; }
.ann .ann-body p:last-child { margin-bottom: 0; }
.ann.unread h3::after { content: "New"; margin-left: 8px; font: 700 11px var(--font-ui); padding: 2px 7px; border-radius: 6px; background: var(--brand-2); color: #fff; vertical-align: 2px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.code-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--plane); border: 1px solid var(--line); font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.code-box code { flex: 1; background: none; padding: 0; }
pre { background: #1b1035; color: #eae4ff; padding: 16px; border-radius: var(--r-md); overflow-x: auto; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0; }
code { font: 600 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--tint); padding: 2px 6px; border-radius: 6px; }

.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 15px; border-radius: 16px 16px 16px 6px; background: var(--plane); white-space: pre-wrap; word-break: break-word; }
.msg.mine { align-self: flex-end; border-radius: 16px 16px 6px 16px; background: color-mix(in srgb, var(--brand-1) 10%, white); }
.msg .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: normal; font-weight: 600; }

.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pager a:hover { border-color: var(--line-2); text-decoration: none; }
.pager .cur { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .gap { border: 0; background: none; }

.progress { height: 8px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--grad); }

.steps-mini { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps-mini li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.steps-mini li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tint); color: var(--brand-1); font-weight: 800; font-size: 13px; }

.qr-box { width: 196px; height: 196px; padding: 10px; background: #fff; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; }
.qr-box svg, .qr-box img { width: 100%; height: 100%; }

dialog.modal { border: 0; padding: 0; border-radius: var(--r-xl); max-width: 520px; width: calc(100% - 32px); box-shadow: 0 30px 80px -20px rgba(27, 16, 53, .5); }
dialog.modal::backdrop { background: rgba(27, 16, 53, .55); backdrop-filter: blur(3px); }
.modal-top { height: 8px; background: var(--grad); }
.modal-body { padding: 26px; }

.toast-copy { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; z-index: 100; }

/* ---------- charts ---------- */

.viz { position: relative; }
.viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz .grid-line { stroke: #ebe6f5; stroke-width: 1; }
.viz .axis-line { stroke: #cfc6e4; stroke-width: 1; }
.viz .tick { fill: var(--muted); font: 500 11.5px var(--font-ui); font-variant-numeric: tabular-nums; }
.viz .series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .crosshair { stroke: #b9aed6; stroke-width: 1; }
.viz .end-label { font: 700 12px var(--font-ui); fill: var(--ink); }
.viz-tip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 12px 30px -12px rgba(27, 16, 53, .35); font-size: 13px; min-width: 150px; z-index: 5; transform: translate(-50%, calc(-100% - 12px));
}
.viz-tip .tt-date { color: var(--muted); font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.viz-tip .tt-row { display: flex; align-items: center; gap: 8px; }
.viz-tip .tt-row b { font-variant-numeric: tabular-nums; }
.viz-tip .tt-key { width: 14px; height: 2px; border-radius: 1px; flex: none; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 16px; height: 2.5px; border-radius: 2px; }
.legend i.box { width: 11px; height: 11px; border-radius: 3px; }
.hbar { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; font-size: 13.5px; padding: 5px 0; }
.hbar .track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .fill { height: 14px; border-radius: 0 4px 4px 0; background: #6250d6; min-width: 2px; flex: none; }
.hbar .val { font-weight: 700; font-variant-numeric: tabular-nums; }
details.table-view { margin-top: 12px; }
details.table-view summary { cursor: pointer; color: var(--brand-1); font-weight: 600; font-size: 13.5px; }

/* ---------- public site ---------- */

.pub { background: var(--surface); }
.pub-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, #fff 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pub-nav-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 22px; height: 68px; padding: 0 22px; }
.pub-nav .brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font-display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.pub-nav .brand img { max-height: 38px; max-width: 200px; }
.pub-links { display: flex; gap: 4px; margin-left: 18px; }
.pub-links a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.pub-links a:hover { background: var(--plane); color: var(--ink); }
.pub-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.pub-menu-btn { display: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

.hero { position: relative; overflow: hidden; background: #160c2e; color: #fff; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; }
.hero::before { width: 620px; height: 620px; left: -160px; top: -220px; background: var(--brand-1); opacity: .75; }
.hero::after { width: 560px; height: 560px; right: -140px; bottom: -260px; background: var(--brand-2); opacity: .6; }
.hero-glow { position: absolute; width: 380px; height: 380px; right: 26%; top: -120px; border-radius: 50%; background: var(--brand-3); filter: blur(90px); opacity: .45; z-index: -1; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 56px; align-items: center; padding: 80px 22px 90px; }
.hero h1 { font: 800 clamp(42px, 6.3vw, 82px)/0.98 var(--font-display); letter-spacing: -.035em; color: #fff; margin: 0 0 22px; max-width: 12ch; }
.hero .lead { font-size: 18px; line-height: 1.6; color: #d8cff5; max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); }
.hero-facts { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 44px; }
.hero-facts div { font-size: 14px; color: #bfb3e6; }
.hero-facts b { display: block; font: 800 30px/1.1 var(--font-ui); color: #fff; letter-spacing: -.01em; }

.login-card { background: #fff; color: var(--ink); border-radius: var(--r-xl); padding: 30px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); position: relative; }
.login-card h2 { font-size: 24px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 20px; }
.login-card .foot { display: flex; justify-content: space-between; margin-top: 16px; font-size: 14px; }

.feed { margin-top: 18px; display: grid; gap: 8px; }
.feed-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: 13.5px; color: #e7e0ff; }
.feed-item .chip { background: #fff; }
.feed-item b { color: #fff; }
.feed-item .when { margin-left: auto; color: #a99ad8; font-size: 12.5px; white-space: nowrap; }
.feed-title { font-size: 13px; color: #bfb3e6; font-weight: 600; margin-top: 26px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }

.platforms { border-bottom: 1px solid var(--line); background: #fff; }
.platforms-in { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 26px 22px; }
.platforms .chip { font-size: 14px; padding: 8px 14px 8px 11px; }

.section { padding: 84px 0; }
.section-alt { background: var(--plane); }
.section h2.big { font: 800 clamp(30px, 3.6vw, 46px)/1.05 var(--font-display); letter-spacing: -.025em; max-width: 18ch; margin-bottom: 14px; }
.section .intro { color: var(--ink-2); font-size: 17px; max-width: 60ch; margin-bottom: 40px; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.feature .f-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; background: var(--c); }
.feature h3 { font: 700 18px/1.25 var(--font-display); margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.howto li { list-style: none; counter-increment: step; padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); position: relative; }
.howto li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font: 800 18px var(--font-display); margin-bottom: 16px; }
.howto h3 { font: 700 18px var(--font-display); margin-bottom: 6px; }
.howto p { color: var(--ink-2); margin: 0; }
.howto-wrap { padding: 0; margin: 0; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 4px; font: 700 18px/1.35 var(--font-display); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s; color: var(--brand-1); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq .faq-a { padding: 0 4px 22px; color: var(--ink-2); font-size: 16px; max-width: 70ch; }
.cta-band { border-radius: var(--r-xl); padding: 48px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font: 800 clamp(28px, 3.2vw, 40px)/1.05 var(--font-display); color: #fff; letter-spacing: -.02em; max-width: 20ch; }
.cta-band .btn { background: #fff; color: var(--ink); box-shadow: none; }
.pub-footer { background: #160c2e; color: #bfb3e6; padding: 46px 0 34px; font-size: 14px; }
.pub-footer .cols { display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap; }
.pub-footer a { color: #e7e0ff; }
.pub-footer .brand { color: #fff; font: 800 20px var(--font-display); display: flex; gap: 10px; align-items: center; text-decoration: none; }
.pub-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.pub-footer .copy { margin-top: 30px; padding-top: 20px; border-top: 1px solid #2c1f52; color: #8f84b3; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.auth-art { position: relative; overflow: hidden; background: #160c2e; color: #fff; padding: 44px; display: flex; flex-direction: column; isolation: isolate; }
.auth-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; left: -120px; bottom: -160px; background: var(--brand-1); filter: blur(80px); opacity: .7; z-index: -1; }
.auth-art::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -100px; background: var(--brand-2); filter: blur(80px); opacity: .55; z-index: -1; }
.auth-art .brand { color: #fff; font: 800 21px var(--font-display); display: flex; gap: 10px; align-items: center; text-decoration: none; }
.auth-art .brand img { max-height: 40px; }
.auth-art h2 { margin-top: auto; font: 800 clamp(32px, 3.6vw, 52px)/1.02 var(--font-display); letter-spacing: -.03em; color: #fff; max-width: 13ch; }
.auth-art p { color: #d0c5f2; font-size: 16px; max-width: 42ch; margin-top: 16px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 32px; margin-bottom: 6px; }
.auth-box .sub { color: var(--ink-2); margin-bottom: 26px; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: 14.5px; }
.code-input { font: 800 28px/1 var(--font-ui) !important; letter-spacing: .35em; text-align: center; }

.prose { max-width: 72ch; font-size: 16px; color: var(--ink-2); }
.prose p { margin-bottom: 16px; }
.doc-hero { background: var(--plane); border-bottom: 1px solid var(--line); padding: 54px 0 40px; }
.doc-hero h1 { font-size: clamp(32px, 4vw, 48px); }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .cat-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 286px; transform: translateX(-102%); transition: transform .25s ease; visibility: hidden; }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 20px 0 60px -20px rgba(0, 0, 0, .5); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(27, 16, 53, .5); z-index: 50; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-grid; }
  .page { padding: 20px 16px 50px; }
  .imp-bar { padding: 9px 16px; }
  .split, .split-r, .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; padding: 56px 22px 64px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .howto { grid-template-columns: 1fr; }
  .pub-links { display: none; }
  .pub-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .pub-menu-btn { display: inline-grid; }
}
@media (max-width: 640px) {
  h1 { font-size: 25px; }
  .cols-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .s-ico { width: 38px; height: 38px; border-radius: 12px; }
  .stat .s-value { font-size: 18px; }
  .features { grid-template-columns: 1fr; }
  .svc-facts { grid-template-columns: 1fr 1fr; }
  .topbar .user-chip span, .topbar-title { display: none; }
  .balance-pill { padding-right: 12px; }
  .ticket { padding: 20px; }
  .ticket .t-value { font-size: 32px; }
  .ticket::before { right: 96px; }
  .ticket::after { right: 84px; }
  .ticket .t-action { right: 8px; width: 72px; }
  .card-pad, .card-body { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .section { padding: 60px 0; }
  .cta-band { padding: 32px 24px; }
  .pub-cta .btn-ghost { display: none; }
  .table.stack-sm thead { display: none; }
  .table.stack-sm tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table.stack-sm td { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; align-items: start; border: 0; padding: 6px 16px; text-align: right; }
  .table.stack-sm td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 3; color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: left; padding-top: 1px; }
  .table.stack-sm td > * { grid-column: 2; justify-self: end; max-width: 100%; }
  .table.stack-sm td > .progress { justify-self: stretch; }
  .table.stack-sm td.link-cell { max-width: none; white-space: normal; word-break: break-all; }
  .table.stack-sm td.actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .table.stack-sm td.actions::before { display: none; }
  .table.stack-sm td.actions > * + * { margin-left: 0; }
  .table.stack-sm .progress { margin-top: 6px; }
  .msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .topbar { display: none; }
  .shell { display: block; }
}
