/* Cherry Hosting billing - preview stylesheet
   Dark Cherry theme: frosted plum glass over the pixel cherry-blossom scene. Layout follows the familiar WHMCS-style
   structure (top bar, main nav, sidebar panels, tables), restyled for Cherry. */

:root {
  color-scheme: dark;
  --bg: #12060d;
  /* glass surfaces: hero-ish cards are lighter, data surfaces (tables, forms) denser */
  --surface: rgba(30, 10, 22, .50);
  --surface-solid: rgba(24, 8, 18, .74);
  --surface-bar: rgba(18, 5, 13, .62);
  --surface-2: rgba(255, 255, 255, .045);
  --surface-3: rgba(255, 255, 255, .08);
  --field: rgba(10, 2, 7, .50);
  --line: rgba(255, 196, 219, .14);
  --line-2: rgba(255, 196, 219, .26);
  --ink: #fff5f9;
  --ink-2: #ead0dc;
  --ink-3: #c9a6b7;
  --blur: blur(14px) saturate(140%);

  --cherry: #ff3366;
  --cherry-700: #ff6f9c;      /* accent text / links on dark */
  --cherry-800: #ffc2d6;      /* text on pink tint */
  --cherry-50: rgba(255, 51, 102, .14);
  --cherry-100: rgba(255, 51, 102, .30);
  --btn: linear-gradient(135deg, #e0225c 0%, #c2144a 100%);
  --btn-hover: linear-gradient(135deg, #ea2d66 0%, #cf1a52 100%);

  --green: #7ee2a8; --green-bg: rgba(52, 211, 120, .14);
  --amber: #fcd581; --amber-bg: rgba(245, 158, 11, .16);
  --red: #ffaaa5;   --red-bg: rgba(248, 81, 73, .16);
  --blue: #a7c8ff;  --blue-bg: rgba(96, 150, 255, .16);
  --grey: #dcc7d1;  --grey-bg: rgba(255, 255, 255, .09);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 44px -26px rgba(10, 0, 6, .85);
  --shadow-pop: 0 22px 50px -18px rgba(5, 0, 3, .85), 0 2px 8px rgba(5, 0, 3, .4);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 6, 13, .42) 0%, rgba(18, 6, 13, .56) 45%, rgba(14, 3, 10, .78) 100%),
    url("/cherry/cherry-bg-soft.jpg") center / cover no-repeat;
}
img, svg { display: block; }
a { color: var(--cherry-700); text-decoration: none; }
a:hover { color: var(--cherry-800); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cherry); outline-offset: 2px; border-radius: 6px; }
.mono, .num { font-family: var(--mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; }

/* ---------- sample strip ---------- */
.sample-strip {
  background: rgba(10, 2, 7, .82);
  color: #f3e3ea;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  text-align: center;
  padding: 6px 16px;
}
.sample-strip b { color: #ff9ab4; font-weight: 600; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface-bar); border-bottom: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); position: relative; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.brand-name { font-weight: 650; font-size: 16.5px; letter-spacing: -0.02em; }
.brand-tag {
  font-size: 11.5px; font-weight: 600; color: var(--cherry-700);
  background: var(--cherry-50); border: 1px solid var(--cherry-100);
  border-radius: 999px; padding: 1px 8px; letter-spacing: .02em;
}
.top-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.top-search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.top-search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px;
  background: var(--field); border: 1px solid var(--line); border-radius: 9px;
}
.top-search input:focus { outline: none; border-color: var(--cherry); background: var(--field); box-shadow: 0 0 0 3px var(--cherry-50); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e0225c; color: #fff;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.acct-btn {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.acct-btn:hover { background: var(--surface-3); }
.avatar {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  background: var(--cherry-100); color: #ffe3ec; font-size: 12px; font-weight: 650;
}
.acct-name { font-size: 14px; font-weight: 550; }
.menu-btn { display: none; }

/* dropdowns */
.dd { position: relative; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 210px; padding: 6px; background: rgba(29, 10, 22, .94);
  border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-pop);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.dd-right .dd-menu { left: auto; right: 0; }
.dd.open > .dd-menu { display: block; }
.dd-menu a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
  color: var(--ink); font-size: 14px;
}
.dd-menu a:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.dd-menu a .ico { color: var(--ink-3); }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-head b { display: block; font-size: 14px; }
.dd-head span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- main nav ---------- */
.mainnav { background: rgba(18, 5, 13, .48); border-bottom: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); position: relative; z-index: 19; }
.mainnav-in { display: flex; align-items: center; justify-content: space-between; }
.mainnav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.mainnav li > a, .mainnav li > button {
  display: flex; align-items: center; gap: 5px; height: 46px; padding: 0 12px;
  border: 0; background: none; cursor: pointer; color: var(--ink-2);
  font-size: 14px; font-weight: 500; position: relative;
}
.mainnav li > a:hover, .mainnav li > button:hover { color: var(--ink); text-decoration: none; }
.mainnav li > .active { color: var(--ink); }
.mainnav li > .active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--cherry); border-radius: 2px 2px 0 0;
}
.mainnav .dd-menu { top: calc(100% - 2px); }
.mainnav .open-ticket { color: var(--cherry-700); }
.mainnav .open-ticket:hover { color: var(--cherry-800); }
.nav-panel {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 550;
  color: var(--ink-2);
}
.nav-panel:hover { color: var(--ink); }

/* ---------- page head ---------- */
.pagehead { padding-top: 28px; padding-bottom: 22px; text-shadow: 0 1px 12px rgba(10, 0, 6, .7), 0 1px 2px rgba(10, 0, 6, .6); }
.pagehead .btn { text-shadow: none; }
.store-head, .auth-logo, .auth-alt, .store-foot { text-shadow: 0 1px 10px rgba(10, 0, 6, .75), 0 1px 2px rgba(10, 0, 6, .6); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--line-2); }
.pagehead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead h1 { font-size: 28px; font-weight: 650; letter-spacing: -0.025em; }
.pagehead .lede { color: var(--ink-2); margin-top: 6px; max-width: 640px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; padding-bottom: 56px; align-items: start; }
.layout-r { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sticky { position: sticky; top: 20px; }

/* ---------- cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05); min-width: 0; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.card.solid, form.card, .card[data-filter-table], .summary, .invoice, .msg { background: var(--surface-solid); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head h2 .ico, .card-head h3 .ico { color: var(--ink-3); }
.card-head a { font-size: 13.5px; font-weight: 500; }
.card-body { padding: 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-title { font-size: 17px; font-weight: 600; }

/* sidebar panels */
.side { display: grid; gap: 16px; }
.side .card-head { padding: 12px 16px; }
.side .card-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.sidenav { list-style: none; margin: 0; padding: 6px; }
.sidenav a, .sidenav button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 7px; color: var(--ink); font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left;
}
.sidenav a:hover, .sidenav button:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.sidenav .ico { color: var(--ink-3); }
.sidenav .count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-3); background: var(--grey-bg); border-radius: 6px; padding: 0 7px; line-height: 20px; }
.sidenav .is-active { background: var(--cherry-50); color: var(--cherry-800); font-weight: 550; }
.sidenav .is-active .ico { color: var(--cherry-700); }
.sidenav .is-active .count { background: var(--cherry-100); color: var(--cherry-800); }
.sidenav .is-disabled { color: var(--ink-3); }
.info-list { padding: 14px 16px; display: grid; gap: 2px; font-size: 14px; }
.info-list b { font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--btn); color: #fff; box-shadow: 0 8px 22px -12px rgba(255, 51, 102, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { background: var(--btn-hover); color: #fff; }
.btn-secondary { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-3); color: var(--ink); border-color: rgba(255, 196, 219, .4); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #352d31; color: #fff; }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger-ghost { background: none; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- badges (square dot nods to the pixel logo) ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap;
  background: var(--grey-bg); color: var(--grey);
}
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; flex: none; }
.b-active, .b-paid { background: var(--green-bg); color: var(--green); }
.b-pending, .b-unpaid, .b-customer { background: var(--amber-bg); color: var(--amber); }
.b-suspended, .b-overdue { background: var(--red-bg); color: var(--red); }
.b-open, .b-answered { background: var(--blue-bg); color: var(--blue); }
.b-cancelled, .b-closed, .b-soldout { background: var(--grey-bg); color: var(--grey); }
.b-pink { background: var(--cherry-50); color: var(--cherry-800); }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px 14px; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.stat:hover { text-decoration: none; color: var(--ink); border-color: var(--line-2); }
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone, var(--line)); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--tone-bg, var(--grey-bg)); color: var(--tone, var(--ink-2)); }
.stat-num { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; margin-top: 6px; font-feature-settings: "tnum" 1; }
.stat-sub { font-size: 12.5px; color: var(--ink-3); }
.t-cherry { --tone: #ff5c93; --tone-bg: var(--cherry-50); }
.t-blue { --tone: #8fb8ff; --tone-bg: var(--blue-bg); }
.t-amber { --tone: #fbbf24; --tone-bg: var(--amber-bg); }
.t-green { --tone: #4ade80; --tone-bg: var(--green-bg); }

/* ---------- KB banner ---------- */
.kb-banner {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 51, 102, .30), rgba(30, 10, 22, .62) 60%); color: #fff; padding: 22px 24px;
  border: 1px solid rgba(255, 92, 147, .32); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  display: flex; align-items: center; gap: 20px;
}
.kb-banner h2 { font-size: 17px; font-weight: 600; }
.kb-banner p { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.kb-banner form { display: flex; gap: 8px; flex: 1; max-width: 460px; margin-left: auto; position: relative; z-index: 1; }
.kb-banner input {
  flex: 1; min-width: 0; height: 42px; border-radius: 9px; border: 1px solid var(--line-2);
  background: rgba(10, 2, 7, .6); color: #fff; padding: 0 14px;
}
.kb-banner input::placeholder { color: var(--ink-3); }
.kb-banner input:focus { outline: none; border-color: var(--cherry); }
.kb-banner .pix { position: absolute; right: -18px; bottom: -26px; width: 120px; height: 120px; opacity: .14; image-rendering: pixelated; }
.kb-banner > div:first-child { position: relative; z-index: 1; }

/* ---------- list rows inside panels ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 550; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row-title:hover { color: var(--cherry-700); }
.row-sub { font-size: 13px; color: var(--ink-3); }
.row-ico { width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.row-ico img { width: 22px; height: 22px; image-rendering: pixelated; }
.row-meta { text-align: right; font-size: 13px; color: var(--ink-3); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: 11px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.table .t-right { text-align: right; }
.table .cell-title { font-weight: 550; color: var(--ink); }
.table .cell-sub { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.table-toolbar .search { position: relative; flex: 1; max-width: 300px; }
.table-toolbar .search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.table-toolbar .search input { width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px 0 32px; background: var(--field); }
.table-toolbar .search input:focus { outline: none; border-color: var(--cherry); }
.table-count { margin-left: auto; font-size: 13px; color: var(--ink-3); }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 44px 24px; }
.empty-art { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--ink-3); }
.empty-art .ico { width: 24px; height: 24px; }
.empty h3 { font-size: 16px; font-weight: 600; }
.empty p { color: var(--ink-2); font-size: 14px; margin: 6px auto 16px; max-width: 380px; }
.empty-sm { padding: 28px 18px; }
.empty-sm p { margin-bottom: 12px; }

/* ---------- store ---------- */
.group-tabs { display: none; }
.store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.store-head h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.store-head p { color: var(--ink-2); margin-top: 4px; font-size: 14.5px; }
.loc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.loc-chip .code { font-family: var(--mono); color: var(--cherry-700); font-size: 11.5px; }
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-solid); font-size: 14px; color: var(--ink-2); margin-bottom: 18px;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.notice .ico { margin-top: 2px; color: var(--ink-3); }
.notice b { color: var(--ink); font-weight: 600; }
.notice-warn { background: rgba(60, 34, 6, .62); border-color: rgba(245, 158, 11, .38); color: #fbe6bd; }
.notice-warn .ico, .notice-warn b { color: var(--amber); }
.notice-info { background: rgba(14, 26, 58, .6); border-color: rgba(96, 150, 255, .38); color: #d5e3ff; }
.notice-info .ico, .notice-info b { color: var(--blue); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05); position: relative;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.plan:hover { border-color: var(--line-2); }
.plan.is-featured { border-color: rgba(255, 92, 147, .6); box-shadow: 0 0 0 3px rgba(255, 51, 102, .16), var(--shadow); background: linear-gradient(180deg, rgba(255, 51, 102, .14), var(--surface) 45%); }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.plan-ram { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.meter { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin: 16px 0 6px; }
.meter i { aspect-ratio: 1; background: rgba(255, 255, 255, .10); border-radius: 1.5px; }
.meter i.on { background: var(--cherry); }
.meter-cap { font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; }
.plan-price { margin-top: 16px; display: flex; align-items: baseline; gap: 6px; }
.plan-price .amt { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; font-feature-settings: "tnum" 1; }
.plan-price .per { color: var(--ink-3); font-size: 14px; }
.plan-gb { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); }
.plan-feats { list-style: none; padding: 0; margin: 16px 0 18px; display: grid; gap: 7px; font-size: 14px; color: var(--ink-2); }
.plan-feats li { display: flex; gap: 8px; align-items: flex-start; }
.plan-feats .ico { width: 16px; height: 16px; color: #ff7aa6; margin-top: 3px; }
.plan .btn { margin-top: auto; }
.plan.is-soldout { background: rgba(20, 6, 14, .55); box-shadow: none; }
.plan.is-soldout h3, .plan.is-soldout .amt { color: var(--ink-2); }
.plan.is-soldout .meter i.on { background: rgba(255, 51, 102, .38); }
.plan.is-soldout .plan-feats .ico { color: var(--ink-3); }
.store-foot { margin-top: 22px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row + .field, .field + .field-row, .field-row + .field-row { margin-top: 14px; }
.field-row .field + .field { margin-top: 0; }
label, .label { font-size: 13.5px; font-weight: 550; color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 13px; }
.req { color: var(--cherry-700); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--field); color: var(--ink);
}
.input::placeholder, textarea.input::placeholder { color: #a9869a; }
select.input option { background: #1d0a16; color: var(--ink); }
textarea.input { height: auto; min-height: 150px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23e2bfce' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input:focus { outline: none; border-color: var(--cherry); box-shadow: 0 0 0 3px var(--cherry-50); }
.input[readonly] { background: rgba(255, 255, 255, .04); color: var(--ink-2); }
.input-group { display: flex; gap: 8px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 150px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); font-weight: 400; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #ff3366; flex: none; }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section { padding: 20px; }
.form-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.form-section > p { color: var(--ink-3); font-size: 13.5px; margin-bottom: 16px; }

/* option cards (radio) */
.opts { display: grid; gap: 10px; }
.opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt { position: relative; display: block; cursor: pointer; font-weight: 400; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-box {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2);
  border-radius: 10px; background: rgba(10, 2, 7, .35); height: 100%;
}
.opt-box::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255, 196, 219, .45); flex: none; background: transparent;
}
.opt input:checked + .opt-box { border-color: #ff5c93; background: var(--cherry-50); box-shadow: 0 0 0 1px #ff5c93 inset; }
.opt input:checked + .opt-box::before { border: 5px solid #ff5c93; }
.opt input:focus-visible + .opt-box { outline: 2px solid var(--cherry); outline-offset: 2px; }
.opt input:disabled + .opt-box { background: rgba(255, 255, 255, .02); color: var(--ink-3); cursor: not-allowed; border-style: dashed; }
.opt-main { flex: 1; min-width: 0; }
.opt-title { display: block; font-weight: 550; color: var(--ink); font-size: 14px; }
.opt input:disabled + .opt-box .opt-title { color: var(--ink-3); }
.opt-sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.opt-price { font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* ---------- summary (order) ---------- */
.summary .card-body { display: grid; gap: 10px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.sum-line .num { color: var(--ink); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px dashed var(--line-2); margin-top: 4px; }
.sum-total span:first-child { font-weight: 600; }
.sum-total .num { font-size: 24px; font-weight: 650; font-family: var(--font); letter-spacing: -0.03em; font-feature-settings: "tnum" 1; }
.sum-item { display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sum-item img { width: 36px; height: 36px; padding: 6px; border-radius: 9px; background: var(--cherry-50); image-rendering: pixelated; }
.sum-item b { display: block; font-weight: 600; }
.sum-note { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.secure { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* cart items */
.cart-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; }
.cart-item + .cart-item { border-top: 1px solid var(--line); }
.cart-item .thumb { width: 48px; height: 48px; border-radius: 10px; background: var(--cherry-50); display: grid; place-items: center; }
.cart-item .thumb img { width: 28px; height: 28px; image-rendering: pixelated; }
.cart-item dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 8px 0 0; font-size: 13.5px; }
.cart-item dt { color: var(--ink-3); }
.cart-item dd { margin: 0; color: var(--ink); }
.cart-item .price { text-align: right; }
.cart-item .price b { font-size: 17px; font-weight: 650; font-feature-settings: "tnum" 1; }
.cart-item .actions { display: flex; gap: 4px; margin-top: 10px; justify-content: flex-end; }
.promo-msg { font-size: 13px; margin-top: 8px; }
.promo-msg.err { color: var(--red); }

/* ---------- service detail ---------- */
.svc-hero { display: flex; align-items: center; gap: 18px; padding: 20px; }
.svc-hero .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--cherry-50); display: grid; place-items: center; border: 1px solid var(--cherry-100); flex: none; }
.svc-hero .thumb img { width: 34px; height: 34px; image-rendering: pixelated; }
.svc-hero h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.svc-hero p { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.svc-hero .btn-row { margin-left: auto; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.spec { padding: 14px 20px; border-left: 1px solid var(--line); min-width: 0; }
.spec:first-child { border-left: 0; }
.spec-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.spec-val { font-weight: 600; margin-top: 4px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-line { display: flex; align-items: center; gap: 8px; }
.copy-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); flex: none; }
.copy-btn:hover { color: var(--ink); background: var(--surface-3); }
.kv { display: grid; grid-template-columns: 170px 1fr; font-size: 14px; }
.kv dt, .kv dd { padding: 11px 18px; border-top: 1px solid var(--line); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { color: var(--ink); font-weight: 500; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.usage { display: grid; gap: 14px; }
.usage-row .label-row { font-size: 13.5px; }
.usage-row .label-row span:last-child { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.bar { height: 8px; border-radius: 4px; background: var(--grey-bg); margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--cherry); border-radius: 4px; }
.upgrade-list .rows > li { padding: 12px 18px; }

/* ---------- invoice ---------- */
.invoice { padding: 32px; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.inv-brand { display: flex; align-items: center; gap: 10px; }
.inv-brand img { width: 36px; height: 36px; image-rendering: pixelated; }
.inv-brand b { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.inv-no { text-align: right; }
.inv-no h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.inv-parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.inv-parties h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.inv-parties p { color: var(--ink-2); }
.inv-parties b { color: var(--ink); font-weight: 600; }
.inv-items { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.inv-totals { margin-left: auto; max-width: 320px; margin-top: 16px; display: grid; gap: 8px; }
.inv-pay { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- tickets ---------- */
.dept-opts .opt-box { align-items: flex-start; padding: 14px; }
.dept-opts .opt-box::before { margin-top: 2px; }
.thread { display: grid; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.msg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.msg-head .avatar { width: 28px; height: 28px; font-size: 11px; }
.msg-head time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.msg-body { padding: 16px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 10px; }
.msg-body code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.msg.staff { border-color: rgba(255, 92, 147, .42); }
.msg.staff .msg-head { background: var(--cherry-50); border-radius: var(--radius) var(--radius) 0 0; border-bottom-color: rgba(255, 92, 147, .3); }
.msg.staff .avatar { background: #e0225c; color: #fff; }
.staff-tag { font-size: 11.5px; font-weight: 600; color: var(--cherry-800); background: rgba(255, 51, 102, .18); border: 1px solid rgba(255, 92, 147, .4); border-radius: 5px; padding: 0 6px; }
.dropzone { border: 1px dashed var(--line-2); border-radius: 10px; padding: 16px; text-align: center; font-size: 13.5px; color: var(--ink-3); background: var(--surface-2); }

/* ---------- announcements / kb ---------- */
.news > li { align-items: flex-start; }
.news time { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; padding-top: 2px; min-width: 64px; }
.news p { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.kb-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kb-cat { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-2); }
.kb-cat:hover { text-decoration: none; border-color: var(--line-2); color: var(--ink); background: var(--surface-3); }
.kb-cat .row-ico { background: var(--cherry-50); border-color: var(--cherry-100); color: var(--cherry-700); }
.kb-cat b { display: block; font-weight: 600; }
.kb-cat span { font-size: 13px; color: var(--ink-3); }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; padding: 48px 16px 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 640px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.auth-logo img { width: 44px; height: 44px; image-rendering: pixelated; }
.auth-logo h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.025em; }
.auth-logo p { color: var(--ink-2); font-size: 14.5px; }
.auth-card .card-body { padding: 24px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-alt { text-align: center; font-size: 14px; color: var(--ink-2); margin-top: 18px; }
.auth-top { background: var(--surface-bar); border-bottom: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.auth-top .topbar-in { justify-content: space-between; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface-bar); font-size: 13px; color: var(--ink-3); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.foot-in { display: flex; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.foot-in nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: #2a1223; color: #fff; border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-pop); transition: opacity .18s ease, transform .18s ease; pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-r { grid-template-columns: minmax(0, 1fr) 300px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(3) { border-left: 0; }
  .spec:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .top-search { display: none; }
  .top-actions { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .acct-name, .acct-btn .ico { display: none; }
  .acct-btn { padding: 0 3px; }
  .mainnav { display: none; }
  body.menu-open .mainnav { display: block; background: rgba(18, 5, 13, .86); }
  .mainnav-in { flex-direction: column; align-items: stretch; padding-top: 8px; padding-bottom: 12px; }
  .mainnav ul { flex-direction: column; }
  .mainnav li > a, .mainnav li > button { height: 42px; padding: 0 8px; width: 100%; }
  .mainnav li > button .ico { display: none; }
  .mainnav li > .active::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .mainnav .dd-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 8px; min-width: 0; }
  .mainnav .dd-menu a { color: var(--ink-2); }
  .nav-panel { padding: 10px 8px 0; border-top: 1px solid var(--line); margin-top: 6px; }
  .layout, .layout-r { grid-template-columns: minmax(0, 1fr); }
  .layout > .side { order: 2; }
  .layout.side-first > .side { order: 0; }
  .layout.list-page > .side { order: 2; }
  .sticky { position: static; }
  .group-side { display: none; }
  .group-tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface-solid); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 18px; }
  .group-tabs a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 550; }
  .group-tabs a:hover { text-decoration: none; color: var(--ink); }
  .group-tabs a.is-active { background: var(--cherry-50); color: var(--cherry-800); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .brand-tag { display: none; }
  .pagehead { padding-top: 20px; padding-bottom: 16px; }
  .pagehead h1 { font-size: 24px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 10px; }
  .stat { padding: 12px 14px 12px; }
  .stat-num { font-size: 24px; }
  .stat-ico { width: 28px; height: 28px; }
  .kb-banner { flex-direction: column; align-items: stretch; padding: 18px; }
  .kb-banner form { max-width: none; margin: 0; }
  .field-row, .opts-2, .opts-3, .kb-cats { grid-template-columns: minmax(0, 1fr); }
  .field-row .field + .field { margin-top: 0; }
  .svc-hero { flex-wrap: wrap; }
  .svc-hero .btn-row { margin-left: 0; width: 100%; }
  .svc-hero .btn-row .btn { flex: 1; }
  .specs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kv { grid-template-columns: 130px 1fr; }
  .invoice { padding: 20px; }
  .inv-parties { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .inv-no { text-align: left; }
  .cart-item { grid-template-columns: auto minmax(0, 1fr); }
  .cart-item .price { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; text-align: left; border-top: 1px dashed var(--line); padding-top: 12px; }
  .cart-item .actions { margin-top: 0; }
  .store-head { flex-direction: column; gap: 8px; }
  .row-meta.hide-sm { display: none; }
  .foot-in nav { margin-left: 0; }

  /* panel rows wrap: text on its own line, badge + action underneath */
  .rows > li { flex-wrap: wrap; row-gap: 10px; padding: 14px 16px; }
  .rows > li > .row-main { flex-basis: calc(100% - 56px); }
  .rows > li > .row-main:first-child { flex-basis: 100%; }
  .rows > li > .row-ico ~ .badge { margin-left: 52px; }
  .rows > li > .badge + .btn, .rows > li > .num + .btn { margin-left: auto; }
  .row-title { white-space: normal; }
  .news > li { flex-wrap: nowrap; }
  .news > li > .row-main { flex-basis: auto; }
  /* tables become stacked cards */
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .rtable tbody tr:last-child { border-bottom: 0; }
  .rtable td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .rtable td::before { content: attr(data-label); font-size: 12.5px; color: var(--ink-3); text-align: left; font-family: var(--font); }
  .specs .spec:last-child { grid-column: 1 / -1; border-left: 0; }
  .rtable td.cell-first { display: block; text-align: left; padding-bottom: 6px; }
  .rtable td.cell-first::before { content: none; }
  .rtable td.cell-act { padding-top: 8px; }
  .rtable td.cell-act::before { content: none; }
  .rtable td.cell-act .btn { width: 100%; }
  .rtable tbody tr:hover td { background: none; }
  .table-toolbar { flex-wrap: wrap; }
  .table-toolbar .search { max-width: none; }
}
