:root {
  --brand: #e93435;
  --brand-dark: #c42028;
  --brand-soft: #fff0ee;
  --ink: #211c1c;
  --muted: #746b6a;
  --line: #e9e3e1;
  --surface: #ffffff;
  --canvas: #f7f5f3;
  --cream: #fff9f5;
  --success: #1d8a59;
  --warning: #c17b14;
  --shadow: 0 18px 45px rgb(67 39 35 / 8%);
  --radius-lg: 24px;
  --radius-md: 16px;
  --sidebar: 250px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
body, button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
input, select, textarea { color: var(--ink); }
svg { display: block; }
.icon { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -2px;
  box-shadow: 0 8px 20px rgb(233 52 53 / 24%);
}

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.boot-screen p { margin: 0; color: var(--muted); font-size: 14px; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.button .icon { width: 17px; height: 17px; }
.button--primary { color: #fff; background: var(--brand); box-shadow: 0 10px 24px rgb(233 52 53 / 18%); }
.button--primary:hover { background: var(--brand-dark); }
.button--outline { border-color: var(--line); background: #fff; }
.button--outline:hover { color: var(--brand); border-color: rgb(233 52 53 / 35%); }
.button--soft { color: var(--brand); background: var(--brand-soft); white-space: nowrap; }
.button--white { color: var(--brand-dark); background: #fff; box-shadow: 0 10px 30px rgb(70 10 14 / 12%); }
.button--block { width: 100%; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--brand); font-size: 13px; font-weight: 700; cursor: pointer; }
.text-button--muted { color: var(--muted); }
.table-actions { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.ticket-thread { display: grid; gap: 12px; max-height: 360px; overflow: auto; padding: 4px; }
.ticket-thread__empty { color: var(--muted); text-align: center; }
.ticket-message { display: flex; gap: 10px; align-items: flex-start; }
.ticket-message > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: var(--soft-red); color: var(--brand); font-size: 12px; font-weight: 800; }
.ticket-message > div { max-width: 80%; padding: 12px 14px; border-radius: 4px 14px 14px; background: var(--surface-soft); }
.ticket-message p { margin: 0; white-space: pre-wrap; }
.ticket-message small { display: block; margin-top: 6px; color: var(--muted); }
.ticket-message--mine { flex-direction: row-reverse; }
.ticket-message--mine > div { background: var(--soft-red); border-radius: 14px 4px 14px 14px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }

.eyebrow { display: inline-block; color: var(--brand); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow--light { color: rgb(255 255 255 / 70%); }
.badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge--success { color: var(--success); background: #eaf7f0; }
.badge--warning { color: var(--warning); background: #fff5df; }
.badge--info { color: #316eaf; background: #eaf3ff; }
.badge--muted { color: #746f6d; background: #efedeb; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; font-weight: 750; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #91f6c0; box-shadow: 0 0 0 5px rgb(145 246 192 / 15%); }

/* Auth */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, 43%) 1fr; background: #fff; }
.auth-brand { position: relative; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 5vw, 70px); color: #fff; background: linear-gradient(145deg, #a41320 0%, #dd2630 52%, #f0493e 100%); }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before { right: -180px; top: -100px; width: 520px; height: 520px; border: 90px solid rgb(255 255 255 / 5%); }
.auth-brand::after { left: -150px; bottom: -240px; width: 480px; height: 480px; background: rgb(72 0 6 / 10%); }
.auth-brand__logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: fit-content; font-size: 20px; }
.auth-brand__logo .brand-mark, .auth-mobile-brand .brand-mark { color: var(--brand); background: #fff; box-shadow: none; }
.auth-brand__content { position: relative; z-index: 1; max-width: 490px; padding: 80px 0; }
.auth-brand__content h1 { margin: 18px 0 22px; font-size: clamp(38px, 4vw, 62px); line-height: 1.08; letter-spacing: -.055em; }
.auth-brand__content > p { max-width: 440px; margin: 0; color: rgb(255 255 255 / 72%); font-size: 16px; line-height: 1.8; }
.auth-brand__content ul { display: grid; gap: 15px; margin: 34px 0 0; padding: 0; list-style: none; }
.auth-brand__content li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; }
.auth-brand__content li .icon { padding: 5px; width: 30px; height: 30px; border-radius: 9px; background: rgb(255 255 255 / 12%); }
.auth-brand > small { position: relative; z-index: 1; color: rgb(255 255 255 / 55%); }
.auth-panel { display: grid; place-items: center; padding: 40px; background: linear-gradient(180deg, #fff 0%, #fffaf8 100%); }
.auth-card { width: min(100%, 420px); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 48px; font-size: 18px; }
.auth-card h2 { margin: 13px 0 8px; font-size: 34px; letter-spacing: -.04em; }
.auth-card > p { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #fff; font-size: 14px; transition: .2s; }
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgb(233 52 53 / 8%); }
.field input:disabled { color: #9d9694; background: #f6f4f3; }
.inline-field { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.form-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.form-meta label { display: flex; align-items: center; gap: 7px; }
.form-meta a, .auth-switch a { color: var(--brand); font-weight: 700; }
.auth-switch { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 24px 16px; border-right: 1px solid var(--line); background: #fff; }
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 26px; }
.sidebar__brand > span:last-child { display: grid; line-height: 1.1; }
.sidebar__brand b { font-size: 18px; }
.sidebar__brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.sidebar__nav { overflow-y: auto; display: grid; gap: 19px; padding-right: 3px; }
.nav-group { display: grid; gap: 4px; }
.nav-group__label { padding: 0 12px 7px; color: #aaa3a0; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 12px; border-radius: 11px; color: #6e6664; font-size: 14px; font-weight: 650; transition: .18s; }
.nav-link:hover { color: var(--ink); background: var(--canvas); }
.nav-link.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-link.is-active::before { content: ""; position: absolute; left: -16px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-link .icon { width: 19px; height: 19px; }
.sidebar__support { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: auto; padding: 13px; border: 1px solid #f0ddda; border-radius: 14px; background: var(--cream); }
.sidebar__support > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--brand); background: #fff; }
.sidebar__support div { display: grid; gap: 3px; min-width: 0; }
.sidebar__support b { font-size: 12px; }
.sidebar__support small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__support > a .icon { width: 15px; }
.sidebar-mask { display: none; }
.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 4vw, 52px); border-bottom: 1px solid rgb(233 227 225 / 82%); background: rgb(247 245 243 / 90%); backdrop-filter: blur(15px); }
.topbar__left, .topbar__right, .user-chip { display: flex; align-items: center; }
.topbar__left { gap: 12px; }
.topbar__left > div { display: grid; gap: 2px; }
.topbar__left span { color: var(--muted); font-size: 10px; }
.topbar__left b { font-size: 14px; }
.topbar__right { gap: 10px; }
.mobile-menu { display: none; }
.user-chip { gap: 10px; padding: 5px 6px 5px 5px; border-radius: 13px; }
.user-chip:hover { background: #fff; }
.user-chip > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--brand-dark); background: var(--brand-soft); font-weight: 800; }
.user-chip > div { display: grid; gap: 2px; max-width: 165px; }
.user-chip b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { color: var(--muted); font-size: 10px; }
.user-chip > .icon { width: 14px; color: #aaa3a0; }
.content { width: min(100%, 1460px); margin: auto; padding: 38px clamp(22px, 4vw, 52px) 70px; outline: none; }

.page-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-header h1 { margin: 9px 0 8px; font-size: clamp(27px, 3vw, 38px); line-height: 1.12; letter-spacing: -.045em; }
.page-header p { max-width: 650px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.page-header__action { flex: none; }

/* Cards & dashboard */
.panel-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 8px 30px rgb(67 39 35 / 3%); }
.panel-card__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-card__header h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.025em; }
.panel-card__header > a { display: flex; align-items: center; gap: 4px; color: var(--brand); font-size: 12px; font-weight: 700; }
.panel-card__header > a .icon { width: 14px; }
.hero-overview { display: grid; grid-template-columns: 1.65fr 1fr; min-height: 330px; margin-bottom: 20px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.hero-overview__main { position: relative; display: flex; flex-direction: column; padding: clamp(25px, 4vw, 42px); color: #fff; background: radial-gradient(circle at 85% 0%, rgb(255 255 255 / 14%), transparent 38%), linear-gradient(135deg, #971421, #d9252f 60%, #ec463d); }
.hero-overview__main::after { content: "C"; position: absolute; right: 22px; bottom: -73px; color: rgb(255 255 255 / 5%); font-size: 260px; font-style: italic; font-weight: 900; line-height: 1; pointer-events: none; }
.hero-overview__heading, .usage-summary { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-overview__heading span { color: rgb(255 255 255 / 62%); font-size: 12px; }
.hero-overview__heading h2 { margin: 8px 0 0; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.04em; }
.usage-summary { margin: auto 0 13px; }
.usage-summary strong { display: block; font-size: 26px; letter-spacing: -.04em; }
.usage-summary span { color: rgb(255 255 255 / 60%); font-size: 11px; }
.usage-summary > b { font-size: 17px; }
.usage-summary--light { margin-top: 65px; }
.progress { overflow: hidden; height: 7px; border-radius: 99px; background: #ede8e6; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .5s ease; }
.hero-overview__main .progress, .subscription-card--primary .progress { position: relative; z-index: 1; background: rgb(255 255 255 / 18%); }
.hero-overview__main .progress span, .subscription-card--primary .progress span { background: #fff; }
.hero-overview__empty { position: relative; z-index: 1; max-width: 430px; margin: auto 0; color: rgb(255 255 255 / 70%); line-height: 1.7; }
.hero-overview__footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 13%); font-size: 11px; }
.hero-overview__footer span, .hero-overview__footer a { display: flex; align-items: center; gap: 7px; }
.hero-overview__footer span { color: rgb(255 255 255 / 66%); }
.hero-overview__footer .icon { width: 15px; }
.hero-overview__aside { padding: clamp(25px, 3vw, 36px); color: #fff; background: #2a2021; }
.hero-overview__aside h3 { max-width: 300px; margin: 12px 0 26px; font-size: 22px; line-height: 1.4; }
.quick-grid { display: grid; gap: 8px; }
.quick-grid > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; background: rgb(255 255 255 / 6%); transition: .2s; }
.quick-grid > a:hover { background: rgb(255 255 255 / 11%); transform: translateX(2px); }
.quick-grid > a > .icon:first-child { padding: 7px; width: 34px; height: 34px; border-radius: 10px; color: #ff9187; background: rgb(255 255 255 / 8%); }
.quick-grid > a > .icon:last-child { width: 14px; color: rgb(255 255 255 / 35%); }
.quick-grid span { display: grid; gap: 3px; }
.quick-grid b { font-size: 12px; }
.quick-grid small { color: rgb(255 255 255 / 45%); font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric-grid--three { grid-template-columns: repeat(3, 1fr); }
.metric-card { display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.metric-card > span { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.metric-card > div { display: grid; gap: 3px; }
.metric-card small { color: var(--muted); font-size: 10px; }
.metric-card strong { font-size: 18px; letter-spacing: -.02em; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compact-list, .notice-list { display: grid; }
.compact-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.compact-list > div:first-child, .notice-list article:first-child { border-top: 0; }
.compact-list__icon, .ticket-list__icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.compact-list > div > div { display: grid; gap: 4px; }
.compact-list b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-list small { color: var(--muted); font-size: 9px; }
.compact-list > div > span:not(.compact-list__icon, .badge) { font-size: 12px; font-weight: 750; }
.notice-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.notice-list i { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--brand); }
.notice-list b { font-size: 12px; }
.notice-list p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.notice-list time { color: #aaa3a0; font-size: 9px; }

/* Plans */
.billing-tabs { width: fit-content; display: flex; gap: 4px; margin: -10px auto 27px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.billing-tabs button { min-width: 68px; padding: 9px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.billing-tabs button.is-active { color: #fff; background: var(--ink); }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: #fff; transition: .2s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-card--featured { border-color: var(--brand); box-shadow: 0 18px 50px rgb(233 52 53 / 10%); }
.plan-card__flag { position: absolute; right: 22px; top: 0; transform: translateY(-50%); padding: 6px 11px; border-radius: 999px; color: #fff; background: var(--brand); font-size: 10px; font-weight: 800; }
.plan-card__head > span { color: var(--brand); font-size: 10px; font-weight: 800; }
.plan-card__head h2 { margin: 9px 0 7px; font-size: 23px; letter-spacing: -.035em; }
.plan-card__head p { margin: 0; color: var(--muted); font-size: 11px; }
.plan-card__price { display: flex; align-items: baseline; gap: 7px; margin: 27px 0 21px; }
.plan-card__price strong { font-size: 34px; letter-spacing: -.05em; }
.plan-card__price span { color: var(--muted); font-size: 11px; }
.plan-card ul { display: grid; gap: 12px; margin: 24px 0; padding: 23px 0; border-block: 1px solid var(--line); list-style: none; }
.plan-card li { display: flex; gap: 9px; color: #5e5755; font-size: 12px; line-height: 1.45; }
.plan-card li .icon { width: 16px; height: 16px; color: var(--success); }
.plan-card__meta { display: flex; justify-content: space-between; margin-top: auto; color: #938c89; font-size: 10px; }
.plan-card.is-unavailable { opacity: .45; }
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 24px; padding: 23px 28px; border-radius: 18px; background: #2a2021; color: #fff; }
.trust-strip > div { display: flex; align-items: center; gap: 12px; }
.trust-strip > div > .icon { color: #ff8076; }
.trust-strip span { display: grid; gap: 4px; }
.trust-strip b { font-size: 12px; }
.trust-strip small { color: rgb(255 255 255 / 48%); font-size: 10px; }

/* Subscription */
.subscription-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.subscription-card { min-height: 330px; padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: #fff; }
.subscription-card--primary { color: #fff; border: 0; background: radial-gradient(circle at 100% 0, rgb(255 255 255 / 14%), transparent 40%), linear-gradient(135deg, #9f1622, #df2b33); }
.subscription-card__top { display: flex; justify-content: space-between; gap: 20px; }
.subscription-card h2 { margin: 9px 0; font-size: 25px; letter-spacing: -.035em; }
.subscription-card > p { margin: 0 0 30px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.subscription-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 16%); }
.subscription-card__stats span { display: grid; gap: 5px; }
.subscription-card__stats small { color: rgb(255 255 255 / 55%); font-size: 9px; }
.subscription-card__stats b { font-size: 11px; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.copy-field input { min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; outline: none; }
.security-note { display: flex; gap: 7px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.security-note .icon { width: 14px; height: 14px; color: var(--success); }
.device-section { margin-top: 38px; }
.section-heading h2 { margin: 7px 0; font-size: 25px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 20px; }
.device-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: .2s; }
.device-card:hover { transform: translateY(-2px); border-color: rgb(233 52 53 / 30%); }
.device-card > span { color: var(--brand); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.device-card h3 { margin: 9px 0 5px; font-size: 16px; }
.device-card p { margin: 0 0 21px; color: var(--muted); font-size: 11px; }
.device-card b { display: flex; align-items: center; gap: 4px; color: var(--brand); font-size: 11px; }
.device-card b .icon { width: 13px; }

/* Tables */
.table-card { padding: 8px 24px; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { padding: 16px 13px; color: #958e8c; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 17px 13px; border-top: 1px solid var(--line); white-space: nowrap; }
td:first-child { white-space: normal; }
td b, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.mono { font-family: ui-monospace, monospace; color: var(--muted); font-size: 10px; }

/* Referral */
.referral-hero { overflow: hidden; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; padding: clamp(28px, 4vw, 45px); border-radius: 28px; color: #fff; background: radial-gradient(circle at 100% 0, rgb(255 255 255 / 15%), transparent 35%), linear-gradient(125deg, #8f111e, #df2c34 70%); }
.referral-hero::after { content: "%"; position: absolute; right: 17%; bottom: -100px; color: rgb(255 255 255 / 5%); font-size: 260px; font-weight: 900; }
.referral-hero > div { position: relative; z-index: 1; }
.referral-hero h2 { margin: 12px 0 10px; font-size: 30px; letter-spacing: -.04em; }
.referral-hero p { max-width: 600px; margin: 0 0 24px; color: rgb(255 255 255 / 65%); font-size: 12px; }
.copy-field--light { width: min(100%, 620px); }
.copy-field--light input { border-color: rgb(255 255 255 / 18%); background: rgb(255 255 255 / 10%); color: #fff; }
.reward-card { align-self: center; min-width: 190px; display: grid; padding: 22px; border: 1px solid rgb(255 255 255 / 15%); border-radius: 18px; background: rgb(255 255 255 / 10%); backdrop-filter: blur(10px); }
.reward-card small { color: rgb(255 255 255 / 60%); font-size: 10px; }
.reward-card strong { margin: 8px 0 18px; font-size: 31px; }
.reward-card span { font-size: 10px; }
.referral-hero + .metric-grid { margin-top: 18px; }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 25px; }
.docs-aside { position: sticky; top: 98px; align-self: start; display: grid; gap: 18px; }
.docs-search { display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.docs-search .icon { width: 16px; color: #aaa3a0; }
.docs-search input { min-width: 0; height: 42px; border: 0; outline: none; background: transparent; font-size: 12px; }
.docs-aside nav { display: grid; gap: 3px; }
.docs-aside nav a { padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: 12px; }
.docs-aside nav a:hover, .docs-aside nav a.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.docs-support { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.docs-support > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.docs-support h3 { margin: 14px 0 6px; font-size: 14px; }
.docs-support p { margin: 0 0 15px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.docs-content { display: grid; gap: 18px; }
.docs-group { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: #fff; scroll-margin-top: 98px; }
.docs-group > h2 { margin: 7px 0 22px; font-size: 22px; }
.doc-item { border-top: 1px solid var(--line); }
.doc-item:last-child { border-bottom: 1px solid var(--line); }
.doc-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 3px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.doc-item summary::-webkit-details-marker { display: none; }
.doc-item summary .icon { width: 16px; transition: .2s; }
.doc-item[open] summary .icon { transform: rotate(90deg); }
.doc-body { padding: 0 3px 22px; color: #5f5856; font-size: 12px; line-height: 1.9; }
.doc-body img { max-width: 100%; border-radius: 12px; }
.doc-body a { color: var(--brand); text-decoration: underline; }

/* Support */
.support-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; margin-bottom: 18px; padding: 18px 22px; border: 1px solid #f0dedb; border-radius: 16px; background: var(--cream); }
.support-banner > div { display: flex; align-items: center; gap: 11px; }
.support-banner > div > .icon { color: var(--brand); }
.support-banner span { display: grid; gap: 3px; }
.support-banner b { font-size: 12px; }
.support-banner small { color: var(--muted); font-size: 9px; }
.support-banner p { margin: 0; color: var(--muted); font-size: 11px; }
.support-banner > a { display: flex; align-items: center; gap: 4px; color: var(--brand); font-size: 11px; font-weight: 700; }
.support-banner > a .icon { width: 13px; }
.ticket-list { display: grid; }
.ticket-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 16px 2px; border-top: 1px solid var(--line); }
.ticket-list article:first-child { border-top: 0; }
.ticket-list h3 { margin: 0 0 5px; font-size: 13px; }
.ticket-list p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list small { display: block; margin-top: 5px; color: #aaa3a0; font-size: 9px; }

/* Traffic */
.traffic-overview { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; margin-bottom: 20px; padding: 34px 42px; border-radius: 26px; color: #fff; background: linear-gradient(125deg, #281e20, #4a2729); }
.traffic-overview h2 { margin: 12px 0 5px; font-size: 35px; }
.traffic-overview h2 small { color: rgb(255 255 255 / 48%); font-size: 16px; }
.traffic-overview p { margin: 0 0 19px; color: rgb(255 255 255 / 55%); font-size: 11px; }
.traffic-overview .progress { width: min(100%, 520px); background: rgb(255 255 255 / 13%); }
.traffic-overview .progress span { background: var(--brand); }
.traffic-overview__donut { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) var(--usage), rgb(255 255 255 / 10%) 0); }
.traffic-overview__donut::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: #392325; }
.traffic-overview__donut span { position: relative; z-index: 1; display: grid; justify-items: center; }
.traffic-overview__donut b { font-size: 22px; }
.traffic-overview__donut small { color: rgb(255 255 255 / 48%); font-size: 9px; }
.traffic-chart { height: 290px; display: flex; align-items: end; gap: 10px; padding-top: 20px; }
.traffic-chart > div { flex: 1; height: 100%; min-width: 20px; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }
.traffic-chart > div > span { width: min(100%, 34px); min-height: 5px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--brand), #ff938a); transition: .2s; }
.traffic-chart > div:hover > span { filter: brightness(.9); }
.traffic-chart small { color: #aaa3a0; font-size: 8px; writing-mode: vertical-rl; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: 270px 1fr; gap: 20px; align-items: start; }
.profile-summary { position: sticky; top: 98px; display: grid; justify-items: center; padding: 30px 22px; border: 1px solid var(--line); border-radius: 22px; background: #fff; text-align: center; }
.profile-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, var(--brand-dark), #f15549); font-size: 27px; font-weight: 800; box-shadow: 0 14px 30px rgb(233 52 53 / 18%); }
.profile-summary h2 { max-width: 100%; overflow: hidden; margin: 18px 0 6px; font-size: 16px; text-overflow: ellipsis; }
.profile-summary p { margin: 0 0 15px; color: var(--muted); font-size: 10px; }
.profile-summary .button { margin-top: 24px; }
.profile-forms { display: grid; gap: 18px; }
.form-card { display: grid; gap: 17px; }
.form-card .panel-card__header { margin-bottom: 0; }
.form-card .button { width: fit-content; }

/* Empty, skeleton, modal, toast */
.empty-state { min-height: 210px; display: grid; place-items: center; place-content: center; padding: 35px; text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: var(--brand); background: var(--brand-soft); }
.empty-state h3 { margin: 16px 0 7px; font-size: 16px; }
.empty-state p { max-width: 390px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-state a:not(.button) { color: var(--brand); font-size: 12px; font-weight: 700; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skeleton-card { min-height: 220px; display: grid; align-content: start; gap: 15px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.skeleton-card i, .skeleton-card b, .skeleton-card span { display: block; border-radius: 8px; background: linear-gradient(90deg, #eeeae8 25%, #f8f6f5 50%, #eeeae8 75%); background-size: 200% 100%; animation: skeleton 1.3s infinite; }
.skeleton-card i { width: 44px; height: 44px; }
.skeleton-card b { width: 65%; height: 22px; }
.skeleton-card span { width: 100%; height: 11px; }
.skeleton-card span:last-child { width: 76%; }
@keyframes skeleton { to { background-position: -200% 0; } }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(22 16 16 / 58%); backdrop-filter: blur(5px); animation: fade .18s; }
.modal { width: min(100%, 480px); max-height: min(760px, calc(100vh - 40px)); overflow: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 90px rgb(0 0 0 / 20%); }
.modal--wide { width: min(100%, 620px); }
.modal > header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 21px 24px; border-bottom: 1px solid var(--line); background: #fff; }
.modal > header h2 { margin: 0; font-size: 18px; }
.modal__body { padding: 24px; }
.modal > footer { display: flex; justify-content: end; padding: 17px 24px; border-top: 1px solid var(--line); background: var(--cream); }
.modal-form { display: grid; gap: 18px; }
.checkout-summary { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 18px; border-radius: 14px; background: var(--canvas); font-size: 12px; }
.checkout-summary span { color: var(--muted); }
.checkout-summary strong { color: var(--brand); font-size: 18px; }
.payment-list { display: grid; gap: 9px; margin-top: 20px; }
.payment-list label { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.payment-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.payment-list span { display: grid; gap: 3px; }
.payment-list b { font-size: 12px; }
.payment-list small { color: var(--muted); font-size: 9px; }
.toast-region { position: fixed; z-index: 200; right: 20px; top: 20px; display: grid; gap: 9px; pointer-events: none; }
.toast { transform: translateY(-8px); opacity: 0; display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: min(380px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); font-size: 12px; font-weight: 650; transition: .2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast--success .icon { color: var(--success); }
.toast--error .icon { color: var(--brand); }
@keyframes fade { from { opacity: 0; } }

@media (max-width: 1100px) {
  :root { --sidebar: 225px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .subscription-grid { grid-template-columns: 1fr; }
  .subscription-card { min-height: auto; }
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 22px; }
  .auth-mobile-brand { display: flex; }
  .sidebar { transform: translateX(-105%); width: min(290px, calc(100vw - 55px)); box-shadow: 20px 0 60px rgb(31 20 20 / 16%); transition: transform .22s ease; }
  .sidebar-mask { position: fixed; z-index: 25; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgb(31 20 20 / 45%); transition: .22s; }
  .menu-open .sidebar { transform: none; }
  .menu-open .sidebar-mask { visibility: visible; opacity: 1; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .hero-overview { grid-template-columns: 1fr; }
  .hero-overview__aside { display: none; }
  .split-grid { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-aside { position: static; }
  .docs-aside nav, .docs-support { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-summary { position: static; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 15px; }
  .topbar__right > .icon-button, .user-chip > div, .user-chip > .icon { display: none; }
  .user-chip { padding: 0; }
  .content { padding: 27px 15px 48px; }
  .page-header { align-items: start; flex-direction: column; margin-bottom: 23px; }
  .page-header h1 { font-size: 29px; }
  .page-header__action, .page-header__action .button { width: 100%; }
  .hero-overview { min-height: 310px; border-radius: 22px; }
  .hero-overview__main { padding: 25px 21px; }
  .hero-overview__heading { align-items: start; }
  .hero-overview__footer { align-items: start; flex-direction: column; }
  .metric-grid, .metric-grid--three { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { align-items: start; flex-direction: column; padding: 15px; }
  .metric-card > span { width: 36px; height: 36px; }
  .metric-card strong { font-size: 16px; }
  .panel-card { padding: 19px 16px; border-radius: 19px; }
  .compact-list > div { grid-template-columns: auto minmax(0, 1fr) auto; }
  .compact-list .badge { display: none; }
  .notice-list time { display: none; }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card:last-child:nth-child(odd) { grid-column: auto; }
  .plan-card { padding: 23px; }
  .billing-tabs { width: 100%; overflow-x: auto; justify-content: start; margin-top: 0; }
  .billing-tabs button { flex: 1; min-width: 66px; }
  .trust-strip { grid-template-columns: 1fr; gap: 16px; }
  .subscription-card { padding: 23px 20px; border-radius: 21px; }
  .subscription-card__stats { grid-template-columns: 1fr 1fr; }
  .copy-field { grid-template-columns: 1fr; }
  .device-grid { grid-template-columns: 1fr; }
  .referral-hero { grid-template-columns: 1fr; padding: 28px 20px; }
  .reward-card { min-width: 0; }
  .table-card { padding: 5px 10px; }
  th, td { padding-inline: 11px; }
  .docs-group { padding: 21px 17px; }
  .support-banner { grid-template-columns: 1fr auto; }
  .support-banner > p { display: none; }
  .ticket-list article { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ticket-list .badge { display: none; }
  .traffic-overview { padding: 27px 20px; }
  .traffic-overview__donut { width: 100px; height: 100px; }
  .traffic-overview__donut::before { width: 76px; height: 76px; }
  .traffic-chart { overflow-x: auto; }
  .traffic-chart > div { min-width: 28px; }
  .skeleton-grid { grid-template-columns: 1fr; }
  .toast-region { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
