/**
 * WP Media Plus — site design system
 * Aligned with the marketing landing (Inter, orange accent, dark footer).
 *
 * Tokens
 * ------
 * --ink           #0f0f0f   primary text / dark surfaces
 * --muted         #6b6b6b   secondary text
 * --line          #e8e8e8   borders
 * --paper         #f2f3f4   page wash
 * --surface       #ffffff   cards
 * --accent        #FF5C00   brand orange
 * --accent-deep   #E04E00   hover / pressed
 * --accent-soft   #FFE8D9   soft fills
 * --max           1280px    content width (same as marketing / footer)
 * --radius        16px      cards
 * --pill          999px     buttons / chips
 */

:root {
  --ink: #0f0f0f;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --paper: #f2f3f4;
  --surface: #ffffff;
  --accent: #ff5c00;
  --accent-deep: #e04e00;
  --accent-soft: #ffe8d9;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok: #067647;
  --ok-bg: #e8f8ef;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1280px;
  --radius: 16px;
  --pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, var(--accent-soft), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #fff4eb, transparent 50%),
    var(--paper);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }
strong, b { font-weight: 500; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

/* —— Nav (light app pages) — height/logo match marketing; width stays with .wrap —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, #fff 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0; /* py-3.5 — same as marketing header */
  font-size: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand img {
  display: block;
  height: 1.75rem; /* h-7 */
  width: auto;
}

@media (min-width: 768px) {
  .brand img {
    height: 2rem; /* h-8 — same as marketing md:h-8 */
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a:hover:not(.btn) { color: var(--ink); }

.nav-links .btn {
  color: #fff;
}

.nav-links .btn:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0;
  flex-shrink: 0;
}

.nav-logout:hover {
  color: var(--ink);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--pill);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover {
  background: #000;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--danger {
  background: #fff;
  border-color: #f1c4c0;
  color: #b42318;
}
.btn--danger:hover {
  background: #fef3f2;
  border-color: #b42318;
  color: #912018;
}

.btn--sm {
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.8125rem;
  border-radius: 999px;
}

.btn--block { width: 100%; }

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

a.btn--google,
.btn--google {
  background: #fff;
  color: #1f1f1f;
  border-color: #dadce0;
  font-weight: 500;
  min-height: 2.75rem;
  box-shadow: none;
}
a.btn--google:hover,
.btn--google:hover {
  border-color: #b0b3b8;
  color: #1f1f1f;
  background: #f8f9fa;
}
a.btn--google:focus-visible,
.btn--google:focus-visible {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
}
.btn--google__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.1rem;
  color: var(--muted, #6b7280);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-divider span {
  flex-shrink: 0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

/* —— Type —— */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 0.65rem;
}

.muted { color: var(--muted); font-size: 0.94rem; }

/* —— Sections —— */
.section {
  padding: 3.5rem 0;
}

.section--tight { padding: 2.5rem 0 3.5rem; }

.section h1,
.page-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0.35rem 0 0.75rem;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.section__intro {
  color: var(--muted);
  max-width: 48ch;
  margin: 0 0 1.75rem;
  font-size: 1.02rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: calc(100% + 2px);
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem;
    gap: 0.2rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a,
  .nav-links .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0.85rem;
  }
  .site-nav { position: relative; }
}

/* —— Pricing cards —— */
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.price-card.is-featured {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 0;
}

.price-card h2,
.price-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.price {
  font-family: var(--display);
  font-size: 2.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.sites {
  font-weight: 500;
  color: var(--accent-deep);
  font-size: 0.92rem;
}

.price-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.price-card ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
}

.price-card li { margin: 0.3rem 0; }
.price-card .btn { margin-top: auto; }

/* —— Footer (dark, matches landing) —— */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.55);
  padding: 3.5rem 0 2.25rem;
  margin-top: 0;
  font-size: 0.875rem;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
}

.site-footer__top {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.site-footer__brand p {
  margin: 0.85rem 0 0;
  max-width: 28ch;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__brand img {
  height: 1.75rem;
  width: auto;
}

.site-footer__col h3 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8125rem;
}

@media (max-width: 720px) {
  .site-footer__top { grid-template-columns: 1fr; }
}

/* —— Account shell —— */
.account-shell {
  flex: 1 0 auto;
  padding: 4rem 0;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .account-shell {
    padding: 1.75rem 0 2.5rem;
  }

  .account-card {
    padding: 1.15rem 1rem 1.25rem;
  }
}

.account-card h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 500;
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
}

.account-card h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.account-card p {
  margin: 0.45rem 0;
}

.flash {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.flash--err {
  background: var(--danger-bg);
  color: var(--danger);
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}

.field input,
.field select {
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease;
  width: 100%;
}

.field input::placeholder {
  color: #a3a3a3;
}

.field input:focus,
.field select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.promo-form {
  display: grid;
  gap: 0.15rem 1rem;
}

@media (min-width: 720px) {
  .promo-form {
    grid-template-columns: 1fr 1fr;
  }

  .promo-form .field--full,
  .promo-form .promo-form__actions {
    grid-column: 1 / -1;
  }
}

.promo-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.promo-dl {
  max-width: 22rem;
}

.promo-dl__url {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.promo-dl__state {
  font-size: 0.78rem;
}

.promo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.promo-sites {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.2rem;
}

.promo-sites a {
  word-break: break-all;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.password-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.password-toggle[aria-pressed="true"] .password-toggle__show { display: none; }
.password-toggle[aria-pressed="false"] .password-toggle__hide { display: none; }

.login-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.35rem 0 1rem;
  font-size: 0.8125rem;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

.login-remember input {
  margin: 0;
}

.register-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted, #5a6b64);
  cursor: pointer;
}

.register-agree input {
  margin: 0.2rem 0 0;
  flex-shrink: 0;
}

.register-agree a {
  color: var(--accent-deep, #E04E00);
  text-decoration: none;
  font-weight: 600;
}

.register-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.register-agree a:hover {
  text-decoration: underline;
}

.login-extra a {
  color: var(--accent-deep, #E04E00);
  text-decoration: none;
  font-weight: 500;
}

.login-extra a:hover {
  text-decoration: underline;
}

.field-hint {
  margin: -0.45rem 0 1rem;
  font-size: 0.8125rem;
  text-align: right;
}

.field-hint--left {
  text-align: left;
  color: var(--muted, #5a6b64);
  font-weight: 500;
}

.field-hint a {
  color: var(--accent-deep, #E04E00);
  text-decoration: none;
  font-weight: 500;
}

.field-hint a:hover {
  text-decoration: underline;
}

.otp-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  letter-spacing: 0.28em;
  font-size: 1.25rem !important;
  text-align: center;
}

.account-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 1.35rem;
  padding: 0.28rem;
  list-style: none;
  background: color-mix(in srgb, #fff 70%, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--pill);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.account-nav li {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.account-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--pill);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1.2;
}

.account-nav a.is-active {
  background: var(--ink);
  color: #fff;
}

.account-nav a:hover:not(.is-active) {
  color: var(--ink);
  background: rgba(15, 15, 15, 0.04);
}

.email-send-all {
  margin: 0.25rem 0 0.5rem;
}

.email-samples {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.email-samples li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.email-samples strong {
  display: block;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.email-samples p {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
}

.account-nav__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.38rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.account-nav a.is-active .account-nav__count {
  background: #fff;
  color: var(--ink);
}

.admin-groups {
  display: grid;
  gap: 1.35rem;
}

.account-card .admin-group h2,
.admin-group h2 {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.75rem;
}

.admin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-height: 7.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.admin-card:hover {
  border-color: var(--ink);
}

.admin-card strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-card span {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.account-card .sales-filters__presets {
  margin: 0.9rem 0;
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
}

.admin-search input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

table.data td.data__key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.admin-note {
  margin: 0 0 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-note p {
  margin: 0 0 0.45rem;
}

.admin-note ul {
  margin: 0;
  padding-left: 1.1rem;
}

.admin-note li {
  margin: 0.25rem 0;
}

.admin-card em {
  margin-top: auto;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.admin-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.admin-side {
  position: sticky;
  top: 5rem;
}

.admin-side__group {
  margin: 0 0 1rem;
}

.admin-side__label {
  margin: 0 0 0.3rem;
  padding: 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-side a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.1rem 0;
  padding: 0.48rem 0.7rem;
  border-radius: 0.7rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.admin-side a:hover {
  background: rgba(15, 15, 15, 0.04);
  color: var(--ink);
}

.admin-side a.is-active {
  background: var(--ink);
  color: #fff;
}

.admin-side a.is-active .account-nav__count {
  background: #fff;
  color: var(--ink);
}

.admin-side__account {
  margin-top: 0.35rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }
}

@media (min-width: 720px) {
  .account-nav {
    width: fit-content;
    flex-wrap: wrap;
    gap: 0.45rem;
    overflow-x: visible;
  }

  .account-nav a {
    font-size: 0.84rem;
    padding: 0.45rem 0.95rem;
  }
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.7rem 0.45rem;
  border-bottom: 1px solid var(--line);
}

table.data th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

table.data td.data__actions {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

table.data td.data__actions form {
  display: inline;
  margin: 0;
}

table.data th.data__check,
table.data td.data__check {
  width: 2.25rem;
  padding-right: 0.15rem;
  vertical-align: middle;
}

table.data th.data__check input,
table.data td.data__check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--ink);
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

.bulk-bar [data-bulk-count] {
  margin-right: auto;
}

.sandbox-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  table.data.data--stack,
  table.data.data--stack tbody,
  table.data.data--stack tr,
  table.data.data--stack td {
    display: block;
    width: 100%;
  }

  table.data.data--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  table.data.data--stack tr {
    padding: 0.85rem 0 0.95rem;
    border-bottom: 1px solid var(--line);
  }

  table.data.data--stack tr:last-child {
    border-bottom: 0;
  }

  table.data.data--stack td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    border: 0;
    padding: 0.28rem 0;
    text-align: right;
    overflow-wrap: anywhere;
  }

  table.data.data--stack td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 42%;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.4;
    padding-top: 0.12rem;
  }

  table.data.data--stack td.data__actions {
    justify-content: flex-end;
    padding-top: 0.55rem;
  }

  table.data.data--stack td.data__actions::before {
    content: none;
  }

  table.data.data--stack td.data__check {
    justify-content: flex-start;
  }

  tr.sandbox-row--new,
  tr.sandbox-row--new td {
    background: #f0fdf4;
  }
}

@media (max-width: 640px) {
  .sandbox-head__actions {
    width: 100%;
    justify-content: space-between;
  }
}

code.key {
  font-size: 0.84rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper);
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  word-break: break-all;
  border: 1px solid var(--line);
}

.auth-narrow {
  width: min(440px, 100%);
  margin: 0 auto;
}

.account-card.auth-narrow {
  margin-bottom: 0;
}

.auth-narrow .muted a {
  font-weight: 500;
}

.account-card p.auth-lead {
  margin-bottom: 1.35rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--pill);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.license-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.license-card__head h2 {
  margin: 0;
}

.license-card__sub {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.license-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-badge--active {
  background: #dcfce7;
  color: #166534;
}

.license-badge--muted {
  background: #f3f4f6;
  color: #6b7280;
}

.plan-buy-row {
  flex-wrap: wrap;
}

.billing-license-list {
  list-style: none;
  margin: 1rem 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.billing-license-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.billing-license-list .key {
  font-size: 0.75rem;
}

.sandbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.sandbox-head__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sandbox-status {
  font-size: 0.8rem;
  color: var(--muted);
}

tr.sandbox-row--new td {
  background: #f0fdf4;
}

.sales-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
}

.sales-filters__presets {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: #fff;
}

.sales-filters__presets a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.42rem 0.85rem;
  border-radius: var(--pill);
}

.sales-filters__presets a.is-active {
  background: var(--ink);
  color: #fff;
}

.sales-filters__presets a:hover:not(.is-active) {
  color: var(--ink);
}

.sales-filters__custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.sales-filters__custom label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.sales-filters__custom input[type="date"] {
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.42rem 0.6rem;
  min-height: 2.15rem;
}

.sales-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.sales-kpi {
  min-width: 7.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  background: var(--paper);
}

.sales-kpi strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sales-kpi span {
  color: var(--muted);
  font-size: 0.75rem;
}

.sales-charts {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.15rem;
}

.sales-chart h2 {
  margin-bottom: 0.15rem;
}

.sales-chart__plot {
  overflow-x: auto;
  margin-top: 0.35rem;
}

.sales-chart svg {
  display: block;
  height: auto;
  max-width: none;
}

.sales-chart svg rect.bar {
  transition: opacity 0.15s ease;
}

.sales-chart svg g.sales-bar:hover rect.bar {
  opacity: 0.82;
}

.sales-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.sales-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  border-radius: 2px;
  vertical-align: -0.05rem;
}
