/* ==========================================================================
   StackLineup — customer portal + staff console
   Light operational UI with the StackLineup stack mark, ember orange and a
   dark navigation rail. Prototype only: no framework, no build step.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #f4f0e7;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --surface-3: #f4efe4;
  --ink: #17130f;
  --ink-2: #2b261f;
  --muted: #6e6559;
  --muted-2: #8a8073;
  --line: #e6ded1;
  --line-2: #d4c9b9;
  --accent: #b45309;
  --accent-fill: #f58220;
  --accent-hover: #ff9a3c;
  --accent-soft: #fdeee0;
  --on-accent: #17130f;
  --sidebar: #0b0b0c;
  --sidebar-2: #141416;
  --sidebar-3: #1b1b1d;
  --sidebar-ink: #f5f1e8;
  --sidebar-muted: #9a9187;
  --sidebar-line: rgba(255, 255, 255, 0.09);
  --success: #1e7b45;
  --success-soft: #e9f5ee;
  --warn: #8a5a10;
  --warn-soft: #fbf1dd;
  --danger: #b3261e;
  --danger-soft: #fbeae8;
  --info: #1d4ed8;
  --info-soft: #e9eefb;
  --display: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 19, 15, 0.04), 0 10px 24px rgba(23, 19, 15, 0.03);
  --shadow-pop: 0 24px 64px rgba(23, 19, 15, 0.18);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
::selection {
  background: var(--accent-fill);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: none;
}
.mono {
  font-family: var(--mono);
}
.muted {
  color: var(--muted);
}
.muted-2 {
  color: var(--muted-2);
}
.nowrap {
  white-space: nowrap;
}
.num {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.02em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.app {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-ink);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px 14px;
}
.brand-lock {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.brand-lock__mark {
  width: 30px;
  height: 28px;
  object-fit: contain;
  flex: none;
}
.brand-lock__word {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--sidebar-ink);
  white-space: nowrap;
}
.brand-lock__word b {
  color: var(--accent-fill);
  font-weight: 600;
}
.brand-lock__tag {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  white-space: nowrap;
}
.staff-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(245, 130, 32, 0.5);
  border-radius: 999px;
  color: #ffb25e;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar__close {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--sidebar-line);
  border-radius: 7px;
  background: transparent;
  color: var(--sidebar-ink);
  place-items: center;
}
.org-switch,
.console-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 12px 14px;
  padding: 9px 10px;
  border: 1px solid var(--sidebar-line);
  border-radius: 9px;
  background: var(--sidebar-2);
  color: var(--sidebar-ink);
  text-align: left;
  width: calc(100% - 24px);
}
.org-switch:hover,
.console-switch:hover {
  border-color: rgba(245, 130, 32, 0.35);
}
.org-switch__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  background: linear-gradient(135deg, #ffb25e, #f58220 60%, #d2620f);
  color: #170d06;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
}
.org-switch__text,
.console-switch__text {
  min-width: 0;
  flex: 1;
}
.org-switch b,
.console-switch b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-switch small,
.console-switch small {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-switch svg,
.console-switch svg {
  flex: none;
  color: var(--sidebar-muted);
}
.console-switch__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  border: 1px solid rgba(245, 130, 32, 0.35);
  background: rgba(245, 130, 32, 0.12);
  color: #ffb25e;
}
.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 16px;
  scrollbar-width: thin;
  scrollbar-color: #2b2b2d transparent;
}
.side-group {
  margin-top: 16px;
}
.side-group p {
  padding: 0 10px;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f675e;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: 7px;
  color: #b6aea4;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}
.side-link:hover {
  background: var(--sidebar-2);
  color: #fff;
}
.side-link svg {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.8;
}
.side-link.is-active {
  background: rgba(245, 130, 32, 0.13);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--accent-fill);
}
.side-link.is-active svg {
  color: #ffb25e;
  opacity: 1;
}
.side-link .count {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: #9a9187;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
}
.sidebar__foot {
  padding: 12px 12px 14px;
  border-top: 1px solid var(--sidebar-line);
}
.plan-mini {
  position: relative;
  overflow: hidden;
  padding: 11px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(245, 130, 32, 0.26);
  border-radius: 9px;
  background:
    radial-gradient(180px 100px at 100% 0%, rgba(245, 130, 32, 0.22), transparent 70%),
    var(--sidebar-2);
}
.plan-mini__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.plan-mini b {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.plan-mini strong {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: #ffb25e;
}
.plan-mini small {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--sidebar-muted);
}
.plan-mini a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: #ffb25e;
  font-size: 10px;
  font-weight: 600;
}
.plan-mini a:hover {
  color: #fff;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  color: var(--sidebar-ink);
}
.user-chip__avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb25e, #e0702a);
  color: #170d06;
  font-size: 9px;
  font-weight: 700;
}
.user-chip b {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
}
.user-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
  color: var(--sidebar-muted);
}

.app__main {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h);
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(140%) blur(12px);
}
.topbar__menu {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  place-items: center;
  color: var(--ink);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs .sep {
  color: var(--line-2);
}
.crumbs b {
  color: var(--ink);
  font-weight: 500;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.topbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 33px;
  min-width: 210px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: left;
}
.topbar__search:hover {
  border-color: var(--line-2);
  color: var(--muted);
}
.topbar__search kbd {
  margin-left: auto;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
}
.icon-btn:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--accent-fill);
}
.topbar__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 3px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb25e, #e0702a);
  color: #170d06;
  font-size: 9.5px;
  font-weight: 700;
}
.page {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 30px 34px 64px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head__eyebrow {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-head h1 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.page-head p {
  max-width: 68ch;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.page-head__actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.back-link:hover {
  color: var(--ink);
}

/* ---------- buttons, forms, badges --------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn svg {
  flex: none;
}
.btn--primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn--secondary {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}
.btn--secondary:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover {
  background: var(--surface-3);
}
.btn--danger {
  background: var(--surface);
  border-color: #e7b4af;
  color: var(--danger);
}
.btn--danger:hover {
  background: var(--danger-soft);
}
.btn--dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn--dark:hover {
  background: #000;
}
.btn--sm {
  height: 28px;
  padding: 0 8px;
  font-size: 10.5px;
  border-radius: 6px;
}
.btn--icon {
  width: 28px;
  padding: 0;
}
.btn--block {
  width: 100%;
}
.link {
  color: var(--accent);
  font-weight: 600;
}
.link:hover {
  color: #8f3d04;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
}
.link-arrow:hover {
  color: #8f3d04;
}
.field {
  display: grid;
  gap: 5px;
}
.field label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  outline: 0;
}
.field textarea {
  height: auto;
  min-height: 76px;
  padding: 9px 10px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.14);
}
.field small {
  font-size: 10px;
  color: var(--muted-2);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.check input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--accent-fill);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status--active,
.status--paid {
  background: var(--success-soft);
  border-color: #cfe9db;
  color: var(--success);
}
.status--trial,
.status--pending {
  background: var(--warn-soft);
  border-color: #efd9b2;
  color: var(--warn);
}
.status--past-due,
.status--failed {
  background: var(--danger-soft);
  border-color: #efc9c5;
  color: var(--danger);
}
.status--paused,
.status--churned,
.status--draft {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--muted);
}
.status--refunded {
  background: var(--info-soft);
  border-color: #cdd9f6;
  color: var(--info);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
}
.badge--accent {
  border-color: #f3d2b6;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge--dark {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e6dfd4;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb25e, #e0702a);
  color: #170d06;
  font-size: 9.5px;
  font-weight: 700;
}
.avatar--square {
  border-radius: 8px;
  background: linear-gradient(135deg, #ffb25e, #f58220 60%, #d2620f);
}
.avatar--muted {
  background: var(--surface-3);
  color: var(--muted);
}
.avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

/* ---------- layout, cards, stats ----------------------------------------- */

.grid {
  display: grid;
  gap: 14px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid--2-1 {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
}
.grid--1-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card--flush {
  padding: 0;
  overflow: hidden;
}
.card--dark {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(245, 130, 32, 0.2), transparent 70%),
    var(--sidebar);
  color: var(--sidebar-ink);
}
.card--accent {
  border-color: #f0d6bf;
  background: linear-gradient(135deg, #fffaf4, var(--accent-soft));
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card__head h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card__head .sub {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 400;
}
.card__head a,
.card__head .link-arrow {
  font-size: 10.5px;
}
.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card__body {
  min-width: 0;
}
.stat {
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stat__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.stat__value {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}
.stat__foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9.5px;
  font-weight: 600;
}
.delta--up {
  color: var(--success);
}
.delta--down {
  color: var(--danger);
}
.stat__spark {
  margin-top: 10px;
}

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

.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: var(--surface-2);
}
.table .num,
.table .money {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink);
  white-space: nowrap;
}
.table .right {
  text-align: right;
}
.table .muted {
  color: var(--muted);
}
.table .actions {
  text-align: right;
  white-space: nowrap;
}
.table-link {
  font-weight: 600;
  color: var(--ink);
}
.table-link:hover {
  color: var(--accent);
}
.cell-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.cell-main b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.cell-main small {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-products {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.cell-products .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
}
.row-menu {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.row-menu:hover {
  border-color: var(--line);
  background: var(--surface-2);
}
.table__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 10.5px;
  color: var(--muted);
}
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.pagination .is-current {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
}

/* ---------- icons, product chips, meters --------------------------------- */

.product-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--accent);
}
.product-icon svg {
  width: 20px;
  height: 20px;
}
.product-icon--space {
  border-color: #f0d6bf;
  background: var(--accent-soft);
  color: #b45309;
}
.product-icon--iis {
  border-color: #eed9b7;
  background: #fbf1dd;
  color: #8a5a10;
}
.product-icon--report {
  border-color: #f0c9b6;
  background: #fbe9e1;
  color: #a8401a;
}
.product-icon--muted {
  border-style: dashed;
  background: var(--surface-3);
  color: var(--muted-2);
}
.product-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.product-line b {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.product-line small {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
}
.meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-fill);
}
.meter--ok span {
  background: var(--success);
}
.meter--warn span {
  background: #e0a040;
}
.meter--danger span {
  background: var(--danger);
}
.meter-row {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}
.meter-row__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.meter-row__label b {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.kpi-inline {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.kpi-inline strong {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.kpi-inline span {
  font-size: 10.5px;
  color: var(--muted);
}
.divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-fill);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.notice svg {
  flex: none;
  margin-top: 1px;
  color: var(--accent);
}
.notice--warn {
  border-left-color: #c58a27;
  background: #fffaf0;
}
.notice--danger {
  border-left-color: var(--danger);
  background: #fff7f6;
}
.notice--dark {
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: var(--accent-fill);
  background: rgba(255, 255, 255, 0.04);
  color: #e8e0d5;
}

/* ---------- plan, subscription, billing ---------------------------------- */

.current-plan {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(245, 130, 32, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(245, 130, 32, 0.22), transparent 70%),
    var(--sidebar);
  color: var(--sidebar-ink);
}
.current-plan::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -60px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.02), 0 0 0 56px rgba(255, 255, 255, 0.015);
}
.current-plan__eyebrow {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb25e;
}
.current-plan__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.current-plan__price {
  margin-top: 6px;
  font-size: 12px;
  color: #b7afa5;
}
.current-plan__price b {
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}
.current-plan__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  color: #a49b91;
}
.current-plan__meta b {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.current-plan .btn--secondary {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
}
.current-plan .btn--secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.segmented button {
  height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 19, 15, 0.08);
}
.segmented .save {
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--mono);
  font-size: 8px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.plan-card.is-current {
  border-color: var(--accent-fill);
  box-shadow: 0 0 0 1px var(--accent-fill);
}
.plan-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan-card h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 9px;
}
.plan-price strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.plan-price span {
  font-size: 10px;
  color: var(--muted);
}
.plan-card > p {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.5;
}
.plan-list {
  display: grid;
  gap: 6px;
  margin: 13px 0 16px;
  font-size: 10.5px;
  color: var(--muted);
}
.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
}
.plan-list svg {
  flex: none;
  margin-top: 1px;
  color: var(--success);
}
.plan-card .btn {
  margin-top: auto;
}
.enterprise-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.enterprise-strip b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}
.enterprise-strip p {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}
.addon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.addon:first-of-type {
  border-top: 0;
}
.addon__body {
  flex: 1;
  min-width: 0;
}
.addon__body b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}
.addon__body small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
}
.addon__price {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 20px;
  flex: none;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-3);
  transition: background 0.15s, border-color 0.15s;
}
.switch::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s;
}
.switch[aria-pressed="true"] {
  border-color: var(--accent-fill);
  background: var(--accent-fill);
}
.switch[aria-pressed="true"]::after {
  transform: translateX(14px);
}
.stepper {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
}
.stepper button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
}
.stepper button:hover {
  background: var(--surface-3);
}
.stepper span {
  min-width: 34px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
}
.summary {
  position: sticky;
  top: calc(var(--topbar-h) + 22px);
}
.summary__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 11px;
  color: var(--muted);
}
.summary__line b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink);
}
.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.summary__total span {
  font-size: 10px;
  color: var(--muted);
}
.summary__total strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.summary__note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.pay-method.is-default {
  border-color: #f0d2b7;
  background: #fffaf5;
}
.pay-method__brand {
  display: grid;
  place-items: center;
  width: 38px;
  height: 26px;
  border-radius: 5px;
  background: #f4efe4;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  color: var(--ink-2);
}
.pay-method__body {
  flex: 1;
  min-width: 0;
}
.pay-method b {
  display: block;
  font-size: 11px;
  font-weight: 600;
}
.pay-method small {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
}
.pay-method__menu {
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 16px;
  align-items: start;
}
.detail-list {
  display: grid;
  gap: 0;
}
.detail-list__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.detail-list__row:last-child {
  border-bottom: 0;
}
.detail-list__row dt {
  color: var(--muted);
}
.detail-list__row dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: var(--ink-2);
}
.detail-list__row dd.mono {
  font-family: var(--mono);
  font-size: 10px;
}
.tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  flex: none;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-active {
  border-bottom-color: var(--accent-fill);
  color: var(--ink);
  font-weight: 600;
}
.tab-panel[hidden] {
  display: none;
}

/* ---------- charts, activity, notes ------------------------------------- */

.chart {
  width: 100%;
  height: 190px;
}
.chart text {
  font-family: var(--mono);
  font-size: 8px;
  fill: var(--muted-2);
}
.chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .area {
  fill: url(#mrr-fill);
}
.chart .line {
  fill: none;
  stroke: var(--accent-fill);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .dot {
  fill: var(--surface);
  stroke: var(--accent-fill);
  stroke-width: 2;
}
.bar-list {
  display: grid;
  gap: 11px;
}
.bar-list__item {
  display: grid;
  gap: 4px;
}
.bar-list__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted);
}
.bar-list__label b {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-fill);
}
.bar--muted span {
  background: #d8b48f;
}
.activity {
  display: grid;
  gap: 0;
}
.activity__item {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.activity__item:first-child {
  border-top: 0;
  padding-top: 0;
}
.activity__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.activity__body {
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.activity__body b {
  color: var(--ink);
  font-weight: 600;
}
.activity__time {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}
.note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}
.note b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-2);
  font-size: 10.5px;
}
.note + .note {
  margin-top: 8px;
}
.timeline {
  display: grid;
  gap: 0;
}
.timeline__item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.timeline__item:first-child {
  border-top: 0;
}
.timeline__dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent-fill);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline__body {
  font-size: 11px;
  color: var(--muted);
}
.timeline__body b {
  color: var(--ink);
  font-weight: 600;
}
.timeline__time {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted-2);
}

/* ---------- filters, toolbar, tabs -------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar__left,
.toolbar__right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 270px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  color: var(--muted-2);
}
.search-inline input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  outline: 0;
}
.chip-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.chip {
  height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}
.chip:hover {
  border-color: var(--line-2);
  color: var(--ink);
}
.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.chip__count {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  opacity: 0.7;
}
.select {
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
}
.filter-note {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}

/* ---------- modal, toast ------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] {
  display: none;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(3px);
}
.modal__dialog {
  position: relative;
  width: min(500px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line-2);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-pop);
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.modal__head h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.modal__head p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.modal__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: var(--sidebar);
  color: #f5f1e8;
  font-size: 11.5px;
  box-shadow: var(--shadow-pop);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible {
  opacity: 1;
  transform: none;
}
.toast svg {
  color: #ffb25e;
}

/* ---------- login -------------------------------------------------------- */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  background: var(--canvas);
}
.auth__brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 38px 44px 32px;
  color: var(--sidebar-ink);
  background:
    radial-gradient(560px 420px at 18% 8%, rgba(245, 130, 32, 0.2), transparent 65%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    #070707;
}
.auth__brand::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -200px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.02), 0 0 0 140px rgba(255, 255, 255, 0.015);
}
.auth__logo {
  position: relative;
  z-index: 1;
  width: 250px;
  max-width: 70%;
}
.auth__body {
  position: relative;
  z-index: 1;
  margin: auto 0 36px;
  max-width: 480px;
}
.auth__eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffb25e;
}
.auth__headline {
  margin-top: 15px;
  font-family: var(--display);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.auth__headline em {
  font-style: normal;
  color: #ffb25e;
}
.auth__copy {
  margin-top: 15px;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.65;
  color: #a49b91;
}
.auth__stack {
  display: grid;
  gap: 7px;
  margin-top: 26px;
  max-width: 360px;
}
.auth__layer {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 12px;
  border-radius: 2px;
  background: linear-gradient(100deg, #ffb25e, #f58220 58%, #d2620f);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
  color: #170d06;
  font-size: 9.5px;
  font-weight: 600;
}
.auth__layer:nth-child(2) {
  width: 91%;
  margin-left: 9%;
  background: linear-gradient(100deg, #ffc46b, #ff9a3c 58%, #e0702a);
}
.auth__layer:nth-child(3) {
  width: 82%;
  background: linear-gradient(100deg, #ffb25e, #f58220 60%, #c25a0a);
}
.auth__layer small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  opacity: 0.7;
}
.auth__fine {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: #7f776d;
}
.auth__panel {
  display: grid;
  place-items: center;
  padding: 40px 30px;
}
.auth__card {
  width: min(400px, 100%);
}
.auth__card h1 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.auth__card > p {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.auth__form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.auth__form .btn {
  height: 39px;
  font-size: 12px;
}
.auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth__row a {
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}
.auth__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.auth__divider::before,
.auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth__sso {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth__sso .btn {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
  font-weight: 500;
}
.auth__sso .btn:hover {
  background: var(--surface-2);
}
.auth__foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}
.auth__foot a {
  color: var(--accent);
  font-weight: 600;
}
.auth__staff {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}
.auth__staff a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-stack .avatar {
  width: 24px;
  height: 24px;
  margin-left: -6px;
  border: 2px solid #fff;
  font-size: 7.5px;
}
.avatar-stack .avatar:first-child {
  margin-left: 0;
}
.avatar-stack .more {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 10.5px;
  color: var(--muted);
}
.inline-list b {
  color: var(--ink-2);
  font-weight: 500;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}
.section-title h2 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.section-title p {
  font-size: 10.5px;
  color: var(--muted);
}
.section-title a {
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 600;
}
.mini-list {
  display: grid;
  gap: 7px;
}
.mini-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
}
.mini-list__item b {
  color: var(--ink-2);
  font-weight: 500;
}
.mini-list__item .spacer {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}
.side-scrim {
  display: none;
}

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

@media (max-width: 1180px) {
  :root {
    --sidebar-w: 224px;
  }
  .page {
    padding: 26px 26px 56px;
  }
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    padding: 0 24px;
  }
}
@media (max-width: 1020px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .grid--2-1,
  .grid--1-2 {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
}
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform 0.28s var(--ease);
    width: 270px;
    box-shadow: var(--shadow-pop);
  }
  .sidebar.is-open {
    transform: none;
  }
  .sidebar__close {
    display: grid;
  }
  .app__main {
    margin-left: 0;
  }
  .topbar__menu {
    display: grid;
  }
  .side-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(11, 11, 12, 0.45);
    backdrop-filter: blur(2px);
  }
  .side-scrim.is-open {
    display: block;
  }
  .page {
    padding: 24px 22px 50px;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth__brand {
    min-height: 330px;
    padding: 28px 26px;
  }
  .auth__body {
    margin: 40px 0 0;
  }
  .auth__headline {
    font-size: 40px;
  }
  .auth__stack {
    display: none;
  }
  .auth__panel {
    padding: 34px 22px 50px;
  }
}
@media (max-width: 760px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: flex-start;
    gap: 14px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .page-head__actions {
    width: 100%;
  }
  .page-head__actions .btn {
    flex: 1 1 auto;
  }
  .topbar {
    padding: 0 14px;
    gap: 8px;
  }
  .topbar__search {
    min-width: 0;
    width: 34px;
    padding: 0;
    justify-content: center;
    background: var(--surface);
  }
  .topbar__search span,
  .topbar__search kbd {
    display: none;
  }
  .crumbs {
    font-size: 10.5px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
  .table th,
  .table td {
    padding: 9px 10px;
  }
  .search-inline {
    width: 100%;
  }
  .toolbar__left,
  .toolbar__right {
    width: 100%;
  }
  .auth__brand {
    min-height: 260px;
  }
  .auth__headline {
    font-size: 34px;
  }
  .auth__copy {
    font-size: 12px;
  }
  .auth__fine {
    font-size: 8px;
  }
  .auth__sso {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 460px) {
  .page {
    padding: 20px 14px 44px;
  }
  .card {
    padding: 15px;
  }
  .stat__value {
    font-size: 25px;
  }
  .auth__brand {
    min-height: 230px;
    padding: 22px 18px;
  }
  .auth__logo {
    width: 190px;
  }
  .auth__panel {
    padding: 28px 18px 40px;
  }
  .auth__card h1 {
    font-size: 26px;
  }
  .auth__fine {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

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

/* ---------- portal-specific additions ----------------------------------- */
.product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.product-row:first-of-type {
  border-top: 0;
}
.product-row .product-line {
  flex: 1;
  min-width: 0;
}
.product-row .status {
  margin-left: auto;
}
.card--dashed {
  border-style: dashed;
  border-color: var(--line-2);
  background: var(--surface-2);
  box-shadow: none;
}
.card--dashed .card__head {
  margin-bottom: 8px;
}

/* ---------- admin dashboard additions ---------------------------------- */
.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--muted);
}
.chart-foot b {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.attention {
  display: grid;
  gap: 0;
}
.attention__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.attention__item:first-child {
  border-top: 0;
  padding-top: 0;
}
.attention__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}
.attention__body {
  flex: 1;
  min-width: 0;
}
.attention__body b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.attention__body small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  color: var(--muted);
}
.attention__item .btn {
  flex: none;
}
@media (max-width: 460px) {
  .attention__body small {
    white-space: normal;
  }
}

/* ---------- admin customer detail -------------------------------------- */
.back-link svg {
  transform: rotate(180deg);
}
.customer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.customer-head__id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.customer-head__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.customer-head__title h1 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.customer-head p {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
}
.avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 13px;
}
.customer-head .page-head__actions {
  padding-top: 2px;
}

/* ---------- entitlement matrix ----------------------------------------- */
.matrix td {
  text-align: center;
  font-size: 11px;
}
.matrix td:first-child {
  text-align: left;
  font-weight: 500;
}
.matrix th:not(:first-child) {
  text-align: center;
}
.matrix .yes {
  color: var(--success);
}
.matrix .yes svg {
  margin: 0 auto;
}
.matrix .dash {
  color: var(--muted-2);
}

/* Keep wide tables and tab strips inside their grid item. */
.grid > *,
.detail-grid > *,
.stack,
[data-tabs] {
  min-width: 0;
}
.tabs {
  max-width: 100%;
}

/* ---------- small-screen polish ---------------------------------------- */
@media (max-width: 760px) {
  .chart text {
    display: none;
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 460px) {
  .auth__brand {
    padding-bottom: 24px;
  }
  .auth__fine {
    margin-top: 18px;
  }
}

/* ---------- mobile data and tab ergonomics ------------------------------ */
@media (max-width: 760px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .table {
    min-width: 640px;
  }
  .tabs {
    gap: 0 12px;
  }
  .tab {
    font-size: 10.5px;
  }
  .chart text {
    display: none !important;
  }
}
@media (max-width: 360px) {
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .tab {
    font-size: 10px;
  }
  .tabs {
    gap: 0 9px;
  }
}

@media (max-width: 760px) {
  .table-wrap::before {
    content: "Swipe to see all columns →";
    display: block;
    padding: 0 0 6px;
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-2);
  }
  .card > .table-wrap::before {
    padding: 0 0 6px;
  }
}
