/* Admin surface theme — TokenWave visual tokens v1.1.
 * Loaded after the legacy stylesheet so the existing view templates keep
 * their data and interaction semantics while using the new visual language.
 */
:root {
  --ink: var(--tw-ink);
  --muted: var(--tw-muted);
  --line: var(--tw-line);
  --teal: var(--tw-accent);
  --teal-soft: var(--tw-accent-soft);
  --sidebar: 232px;
  background: var(--tw-bg);
}

html { background: var(--tw-bg); }
body {
  background: var(--tw-bg);
  color: var(--tw-text);
  font: 16px/var(--tw-leading-body) var(--tw-font-body);
}

/* The PNG contains the complete, transparent company wordmark. */
.brand { gap: 12px; align-items: center; }
.brand-logo { display: block; width: 176px; height: auto; max-width: 100%; object-fit: contain; }
.brand-mark { display: none !important; }
.brand-name { display: none; }
.brand-sub {
  margin: 0;
  color: var(--tw-muted);
  font: 12px/1.5 var(--tw-font-mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.initial-loading {
  min-height: 160px;
  padding: 32px;
  align-items: flex-start;
  justify-content: flex-start;
  background: var(--tw-bg);
  color: var(--tw-muted);
}
.loading-logo { display: block; width: 176px; height: auto; }
.sidebar {
  width: var(--sidebar);
  padding: 24px 20px;
  background: var(--tw-bg);
  border-right: 1px solid var(--tw-line);
}
.sidebar .brand { padding: 0 4px; display: block; }
.sidebar .brand-logo { width: 168px; }
.sidebar-brand-link, .loading-brand { display: inline-flex; align-items: center; min-height: 44px; }
.sidebar .brand-sub { display: block; margin: 10px 0 0 4px; }
.workspace-pill {
  margin: 40px 4px 32px;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--tw-line);
  border-bottom: 1px solid var(--tw-line);
  border-radius: 0;
  background: transparent;
  color: var(--tw-ink);
}
.workspace-pill .workspace-icon { background: var(--tw-surface-muted); border-radius: var(--tw-radius); color: var(--tw-ink); }
.workspace-pill span { color: var(--tw-muted); font: 12px/1.5 var(--tw-font-body); letter-spacing: normal; }
.nav-label { padding-inline: 4px; color: var(--tw-muted); font: 12px/1.5 var(--tw-font-body); letter-spacing: normal; }
.nav { gap: 2px; }
.nav-link {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 0 4px 4px 0;
  border-left: 2px solid transparent;
  color: var(--tw-text);
  font-size: 14px;
}
.nav-link:hover { background: var(--tw-surface-muted); color: var(--tw-ink); }
.nav-link.active { background: var(--tw-accent-soft); color: var(--tw-ink); border-left-color: var(--tw-accent); }
.nav-link.active:after { display: none; }
.nav-divider { margin: 24px 4px; background: var(--tw-line); }
.sidebar-help {
  margin: 24px 4px;
  padding: 16px 0;
  border-top: 1px solid var(--tw-line);
  border-radius: 0;
  background: transparent;
  color: var(--tw-muted);
  font-size: 14px;
}
.sidebar-help strong { color: var(--tw-ink); font-size: 14px; font-weight: 550; }
.account { padding-top: 16px; border-color: var(--tw-line); }
.avatar { background: var(--tw-surface-muted); color: var(--tw-ink); border-radius: 4px; }
.account-name { font-size: 14px; }
.account-role { color: var(--tw-muted); font-size: 12px; }

.topbar {
  height: 72px;
  padding-inline: 32px;
  background: var(--tw-bg);
  border-color: var(--tw-line);
}
.breadcrumbs { color: var(--tw-muted); font-size: 14px; }
.breadcrumbs strong { color: var(--tw-ink); font-weight: 500; }
.breadcrumbs .workspace-home { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.workspace-home:hover, a.workspace-pill:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.topbar-right { color: var(--tw-muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; background: var(--tw-ink); }
.content { max-width: var(--tw-content); padding: 48px 32px 64px; }
.page-heading { margin-bottom: 32px; }
.eyebrow { color: var(--tw-muted); font: 12px/1.5 var(--tw-font-mono); letter-spacing: .08em; }
.page-heading h1 { color: var(--tw-ink); font: 500 clamp(28px, 2.5vw, 32px)/1.35 var(--tw-font-body); letter-spacing: normal; }
.page-heading p { color: var(--tw-text); font-size: 16px; line-height: 1.75; }
.actions { gap: 12px; }
.btn {
  min-height: var(--tw-control-height);
  padding: 10px 16px;
  border: 1px solid var(--tw-line-strong);
  border-radius: var(--tw-radius);
  background: var(--tw-surface);
  color: var(--tw-ink);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
  transition: background-color var(--tw-duration-fast) var(--tw-ease), border-color var(--tw-duration-fast) var(--tw-ease);
}
.btn:hover { background: var(--tw-surface-muted); box-shadow: none; }
.btn.primary { background: var(--tw-ink); border-color: var(--tw-ink); color: var(--tw-inverse); box-shadow: none; }
.btn.primary:hover { background: var(--tw-text); border-color: var(--tw-text); }
.btn.danger { color: var(--tw-danger); border-color: var(--tw-danger); background: var(--tw-danger-bg); }
.btn.compact { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.icon-btn { min-width: 44px; min-height: 44px; padding: 8px; color: var(--tw-muted); border-radius: var(--tw-radius); }
.icon-btn:hover { background: var(--tw-surface-muted); color: var(--tw-ink); }

.overview-banner {
  padding: 24px 0;
  border-top: 2px solid var(--tw-ink);
  border-bottom: 1px solid var(--tw-line);
  border-radius: 0;
  background: transparent;
  color: var(--tw-ink);
}
.overview-banner:after { display: none; }
.overview-banner .eyebrow { color: var(--tw-muted); }
.overview-banner h2 { font: 500 24px/1.4 var(--tw-font-body); letter-spacing: normal; }
.overview-banner p { max-width: 680px; color: var(--tw-text); font-size: 16px; line-height: 1.75; }
.banner-tag { border: 1px solid var(--tw-line-strong); border-radius: var(--tw-radius); background: var(--tw-surface); color: var(--tw-text); font-size: 14px; }
.banner-tag .status-dot { background: var(--tw-accent); }
.stats-grid { gap: 0; margin-bottom: 32px; border-top: 1px solid var(--tw-line); border-bottom: 1px solid var(--tw-line); }
.stat-card { min-height: 142px; padding: 20px 24px; border: 0; border-right: 1px solid var(--tw-line); border-radius: 0; background: transparent; }
.stat-card:last-child { border-right: 0; }
.stat-top { color: var(--tw-muted); font-size: 14px; }
.stat-icon { width: 32px; height: 32px; border-radius: 4px; background: var(--tw-surface-muted); color: var(--tw-ink); }
.stat-value { margin: 12px 0 8px; color: var(--tw-ink); font: 500 30px/1.25 var(--tw-font-mono); letter-spacing: 0; }
.stat-foot { color: var(--tw-muted); font-size: 12px; line-height: 1.6; }
.stat-foot .accent { color: var(--tw-accent); }
.grid-main { gap: 24px; }
.panel { border: 1px solid var(--tw-line); border-radius: var(--tw-radius); background: var(--tw-surface); box-shadow: none; }
.panel-head { padding: 20px 24px; border-bottom: 1px solid var(--tw-line); }
.panel-head h2 { color: var(--tw-ink); font-size: 18px; font-weight: 600; }
.panel-head p { color: var(--tw-muted); font-size: 14px; line-height: 1.6; }
.panel-body { padding: 0 24px 24px; }
.segmented { border-radius: var(--tw-radius); background: var(--tw-surface-muted); border-color: var(--tw-line); }
.segmented button { min-height: 36px; color: var(--tw-muted); font-size: 13px; }
.segmented button.active { color: var(--tw-ink); box-shadow: none; }
.chart-legend { color: var(--tw-muted); font-size: 12px; }
.legend-dot { background: var(--tw-accent); }
.legend-dot.light { background: var(--tw-line-strong); }
.distribution-summary strong { color: var(--tw-ink); }
.rank-line { font-size: 14px; }
.rank-line span, .distribution-summary span { color: var(--tw-muted); }
.progress-track { height: 4px; border-radius: 0; background: var(--tw-surface-muted); }
.progress-fill { border-radius: 0; background: var(--tw-accent); }
.table-wrap { border-top: 1px solid var(--tw-line); }
table { font-size: 14px; }
th { background: var(--tw-surface-muted); color: var(--tw-muted); font-size: 12px; border-color: var(--tw-line); }
td { color: var(--tw-text); font-size: 14px; border-color: var(--tw-line); }
tbody tr:hover { background: var(--tw-bg); }
.table-title { color: var(--tw-ink); font-size: 14px; }
.table-subtitle { color: var(--tw-muted); font-size: 12px; }
.product-symbol { border-color: var(--tw-line); border-radius: var(--tw-radius); background: var(--tw-surface-muted); color: var(--tw-ink); }
.product-symbol.blue, .product-symbol.sand, .product-symbol.purple { border-color: var(--tw-line); background: var(--tw-surface-muted); color: var(--tw-muted); }
.badge { border: 1px solid var(--tw-line); border-radius: var(--tw-radius); background: var(--tw-surface-muted); color: var(--tw-ink); font-size: 12px; }
.badge.gray { background: var(--tw-surface-muted); color: var(--tw-muted); }
.badge.amber { background: var(--tw-warning-bg); color: var(--tw-warning); border-color: var(--tw-warning); }
.badge.red { background: var(--tw-danger-bg); color: var(--tw-danger); border-color: var(--tw-danger); }
.event-list { padding-inline: 24px; }
.event-item { border-color: var(--tw-line); }
.event-icon { border-color: var(--tw-line); background: var(--tw-surface-muted); color: var(--tw-ink); }
.event-description { color: var(--tw-text); font-size: 14px; line-height: 1.7; }
.event-description strong { color: var(--tw-ink); }
.event-time { color: var(--tw-muted); font-size: 12px; }
.panel-foot { border-color: var(--tw-line); color: var(--tw-muted); font-size: 12px; }
.text-link { color: var(--tw-ink); font-size: 14px; }
.text-link:hover { color: var(--tw-accent); }
.metric-note { color: var(--tw-muted); font-size: 14px; }
.page-footer { color: var(--tw-muted); font-size: 12px; }
.filters .field label, .field-table th, .field-table td, .detail-label { font-size: 12px; }
.chart-empty { background: var(--tw-surface-muted); border: 1px dashed var(--tw-line); }

.search-input input, .toolbar input, .toolbar select, .filters input, .filters select {
  min-height: var(--tw-control-height);
  border: 1px solid var(--tw-line-strong);
  border-radius: var(--tw-radius);
  background: var(--tw-surface);
  color: var(--tw-ink);
  font-size: 16px;
}
.toolbar, .filters { border-color: var(--tw-line); }
.toolbar-summary { color: var(--tw-muted); font-size: 14px; }
/* Access passes: one compact tool surface, with explicit status and search. */
.access-pass-view .page-heading { align-items: center; margin-bottom: 24px; }
.access-pass-view .page-heading p { margin-top: 8px; color: var(--tw-muted); }
.pass-panel { container-type: inline-size; }
.pass-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; padding: 20px 24px; }
.pass-status-control { flex: 1 1 400px; min-width: 0; }
.pass-control-label { display: block; margin-bottom: 8px; color: var(--tw-muted); font-size: 14px; line-height: 1.5; }
.pass-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.pass-filter { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; background: transparent; color: var(--tw-muted); font-size: 14px; line-height: 1.5; }
.pass-filter:hover { background: var(--tw-bg); color: var(--tw-ink); }
.pass-filter[aria-pressed="true"] { border-bottom-color: var(--tw-ink); background: var(--tw-surface-muted); color: var(--tw-ink); font-weight: 500; }
.pass-filter-count { font-size: 12px; font-variant-numeric: tabular-nums; }
.pass-search-control { flex: 0 1 264px; min-width: 220px; }
.pass-search-control .search-input { width: 100%; max-width: none; }
.pass-search-control .search-input .icon { top: 50%; transform: translateY(-50%); color: var(--tw-muted); }
.pass-search-control input { height: 44px; padding-block: 8px; }
.pass-table-wrap { max-width: 100%; overflow-x: auto; }
.pass-table-wrap:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: -3px; }
.pass-table { width: 100%; min-width: 960px; table-layout: fixed; }
.pass-table th, .pass-table td { padding: 16px; line-height: 1.5; }
.pass-table th { padding-block: 12px; background: var(--tw-bg); font-size: 12px; font-weight: 500; }
.pass-table td { vertical-align: middle; white-space: normal; overflow-wrap: anywhere; }
.pass-table th:first-child, .pass-table td:first-child { padding-left: 24px; }
.pass-table th:last-child, .pass-table td:last-child { padding-right: 24px; }
.pass-table th:nth-child(1) { width: 16%; }
.pass-table th:nth-child(2) { width: 20%; }
.pass-table th:nth-child(3) { width: 17%; }
.pass-table th:nth-child(4) { width: 15%; }
.pass-table th:nth-child(5) { width: 10%; }
.pass-table th:nth-child(6) { width: 12%; }
.pass-table th:nth-child(7) { width: 10%; }
.pass-table .table-title { font-weight: 500; }
.pass-table .table-subtitle { margin-top: 4px; line-height: 1.6; }
.pass-table .badge { padding: 4px 8px; }
.pass-table .badge::before { display: none; }
.pass-table .pass-numeric, .pass-table .pass-action { text-align: right; }
.pass-number-pair { display: grid; grid-template-columns: minmax(2ch, 1fr) 1ch minmax(2ch, 1fr); gap: 4px; font-variant-numeric: tabular-nums; }
.pass-number-pair > :nth-child(2) { color: var(--tw-muted); text-align: center; }
.pass-detail { min-height: 44px; min-width: 44px; justify-content: flex-end; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--tw-line-strong); }
.pass-results-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 12px 24px; border-top: 1px solid var(--tw-line); color: var(--tw-muted); font-size: 14px; line-height: 1.6; }
.pass-help { margin-top: 16px; color: var(--tw-muted); font-size: 14px; }
.pass-help summary { display: flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; max-width: 100%; cursor: pointer; list-style: none; }
.pass-help summary::-webkit-details-marker { display: none; }
.pass-help summary:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 3px; }
.pass-help .icon { width: 16px; height: 16px; }
.pass-help[open] summary > .icon:last-child { transform: rotate(180deg); }
.pass-help-body { max-width: 48rem; padding: 8px 24px; border-left: 1px solid var(--tw-line); line-height: 1.75; }
.pass-help-body p + p { margin-top: 8px; }
.access-pass-view .page-footer { margin-top: 24px; }
@container (max-width: 760px) {
  .pass-toolbar { gap: 16px; }
  .pass-search-control { flex: 1 1 100%; min-width: 0; }
}
.empty-state { color: var(--tw-muted); }
.empty-state .empty-icon { border-radius: var(--tw-radius); background: var(--tw-surface-muted); color: var(--tw-ink); }
.empty-state h3 { color: var(--tw-ink); font-size: 18px; }
.empty-state p { color: var(--tw-muted); font-size: 14px; line-height: 1.8; }
.skeleton { background: var(--tw-surface-muted); border-radius: var(--tw-radius); animation: none; }
.skeleton-card { border-color: var(--tw-line); border-radius: var(--tw-radius); }
.error-panel { color: var(--tw-danger); font-size: 16px; }

.modal-backdrop { background: rgb(29 29 23 / 35%); backdrop-filter: none; }
.modal { border: 1px solid var(--tw-line-strong); border-radius: var(--tw-radius-dialog); box-shadow: var(--tw-shadow-overlay); }
.modal-head, .modal-foot { border-color: var(--tw-line); }
.modal-head h2 { color: var(--tw-ink); font-size: 22px; letter-spacing: normal; }
.modal-head p { color: var(--tw-muted); font-size: 14px; }
.modal-body { color: var(--tw-text); font-size: 14px; }
.field label { color: var(--tw-ink); font-size: 14px; }
.field label .optional { color: var(--tw-muted); font-size: 12px; }
.field input:not([type=checkbox]), .field select, .field textarea { min-height: var(--tw-control-height); border-color: var(--tw-line-strong); border-radius: var(--tw-radius); color: var(--tw-ink); font-size: 16px; }
.field .hint { color: var(--tw-muted); font-size: 14px; }
.form-error { border-color: var(--tw-danger); border-radius: var(--tw-radius); background: var(--tw-danger-bg); color: var(--tw-danger); font-size: 14px; }
.section-label { color: var(--tw-ink); font-size: 14px; }
.check-list, .field-table { border-color: var(--tw-line); border-radius: var(--tw-radius); }
.check-item { border-color: var(--tw-line); font-size: 14px; }
.check-item strong { color: var(--tw-ink); font-size: 14px; }
.check-item p { color: var(--tw-muted); font-size: 12px; }
.check-item input, .checkbox-line input, .field-table input { accent-color: var(--tw-accent); }
.checkbox-line { color: var(--tw-text); font-size: 14px; }

.info-box { border-color: var(--tw-line); border-radius: var(--tw-radius); background: var(--tw-surface-muted); color: var(--tw-text); font-size: 14px; }
.info-box.amber { border-color: var(--tw-warning); background: var(--tw-warning-bg); color: var(--tw-warning); }
.token-secret { border-color: var(--tw-line); border-radius: var(--tw-radius); background: var(--tw-surface-muted); }
.token-secret input { color: var(--tw-ink); font-size: 14px; }
.token-secret .secret-label { color: var(--tw-muted); font-size: 12px; }
.confirm-copy { color: var(--tw-muted); font-size: 14px; }
.toasts { right: 24px; bottom: 24px; border-color: var(--tw-ink); border-radius: var(--tw-radius); background: var(--tw-ink); box-shadow: var(--tw-shadow-overlay); font-size: 14px; animation: none; }
.toasts.error { border-color: var(--tw-danger); background: var(--tw-danger); }

/* Auth and customer portal use the same light editorial surface. */
.auth-page { background: var(--tw-bg); }
.auth-visual { padding: 48px 64px; background: var(--tw-bg); color: var(--tw-ink); border-right: 1px solid var(--tw-line); }
.auth-visual .brand { display: block; }
.auth-visual .brand-logo { width: 205px; }
.auth-visual .brand-sub { display: block; margin: 12px 0 0 4px; color: var(--tw-muted); }
.auth-intro { max-width: 520px; padding: 48px 0; }
.auth-intro .eyebrow { color: var(--tw-muted); font-size: 12px; letter-spacing: .08em; }
.auth-intro h1 { color: var(--tw-ink); font: 400 clamp(42px, 4vw, 64px)/1.25 var(--tw-font-display); letter-spacing: normal; }
.auth-intro > p { max-width: 420px; color: var(--tw-text); font-size: 18px; line-height: 1.8; }
.auth-orbit { display: none; }
.auth-visual-footer { color: var(--tw-muted); font: 12px/1.5 var(--tw-font-mono); letter-spacing: .06em; }
.auth-content { padding: 64px; background: var(--tw-surface); }
.auth-top-link { top: 32px; right: 40px; color: var(--tw-text); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.auth-card { width: 420px; }
.auth-card .eyebrow { color: var(--tw-muted); }
.auth-card h2 { color: var(--tw-ink); font: 400 32px/1.35 var(--tw-font-display); letter-spacing: normal; }
.auth-card > p { color: var(--tw-text); font-size: 16px; line-height: 1.75; }
.auth-footnote { color: var(--tw-muted); font-size: 14px; }
.auth-copyright { color: var(--tw-muted); font-size: 12px; }
.client-page { background: var(--tw-bg); }
.client-shell-main { min-width: 0; margin-left: var(--tw-navigation-width, 224px); }
.client-header { min-height: 72px; height: auto; max-width: none; padding: 12px 32px; border-bottom: 1px solid var(--tw-line); }
.client-header-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.client-page-title { color: var(--tw-ink); font-size: 16px; font-weight: 500; }
.client-header-right { color: var(--tw-muted); font-size: 14px; }
.client-main { max-width: var(--tw-content); padding: 32px 32px 64px; }
.client-hero { padding: 32px 0; min-height: 0; border-top: 2px solid var(--tw-ink); border-bottom: 1px solid var(--tw-line); border-radius: 0; background: transparent; color: var(--tw-ink); }
.client-hero:after { display: none; }
.client-hero .eyebrow { color: var(--tw-muted); }
.client-hero h1 { color: var(--tw-ink); font: 400 clamp(36px, 4vw, 56px)/1.25 var(--tw-font-display); }
.client-hero p { max-width: 640px; color: var(--tw-text); font-size: 18px; line-height: 1.75; }
.client-hero-foot { color: var(--tw-muted); font-size: 14px; }
.client-section-heading h2 { color: var(--tw-ink); font: 400 32px/1.35 var(--tw-font-display); }
.client-section-heading p { color: var(--tw-text); font-size: 16px; }
.client-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.client-product { min-height: 310px; padding: 24px; border-radius: var(--tw-radius); border-color: var(--tw-line); background: var(--tw-surface); }
.client-category { color: var(--tw-muted); background: var(--tw-surface-muted); font-size: 12px; }
.client-product h3 { color: var(--tw-ink); font-size: 20px; }
.client-product .description { color: var(--tw-text); font-size: 16px; line-height: 1.75; }
.client-product .product-open { background: var(--tw-ink); border-color: var(--tw-ink); color: var(--tw-inverse); }
.client-product .product-open:hover { background: var(--tw-text); }
.sample-list a { color: var(--tw-ink); font-size: 14px; }
.client-footer { color: var(--tw-muted); border-color: var(--tw-line); font-size: 12px; }
.client-empty { border-radius: var(--tw-radius); border-color: var(--tw-line); background: var(--tw-surface); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: var(--tw-focus-width) solid var(--tw-accent); outline-offset: var(--tw-focus-offset); }
.product-preview-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--tw-ink); text-decoration: underline; text-decoration-color: var(--tw-line-strong); text-underline-offset: 4px; }
.product-preview-link:hover { color: var(--tw-accent); text-decoration-color: currentColor; }
.product-preview-link .icon { flex: none; width: 14px; height: 14px; color: var(--tw-muted); }

/* Admin tool density: keep filters and audit rows readable at every width. */
.activity-log-view .page-heading { align-items: center; margin-bottom: 32px; }
.activity-log-view .page-heading p { margin-top: 8px; color: var(--tw-muted); }
.activity-panel { container-type: inline-size; }
.activity-filters { display: block; padding: 24px; }
.activity-filter-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, minmax(160px, .85fr)); gap: 16px; }
.activity-filters .field { min-width: 0; margin: 0; }
.activity-filters .field label { display: block; margin-bottom: 8px; color: var(--tw-text); font-size: 14px; line-height: 1.5; }
.activity-filters .field select, .activity-filters .field input { width: 100%; min-height: 44px; padding: 8px 12px; font-size: 16px; }
.activity-filters .field select, .activity-filters .field input { height: var(--tw-control-height); box-sizing: border-box; }
.activity-filter-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.activity-filter-actions .btn { min-width: 88px; }
.activity-table-wrap { max-width: 100%; overflow-x: auto; }
.activity-table-wrap:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: -3px; }
.activity-table { width: 100%; min-width: 1120px; table-layout: fixed; }
.activity-table th, .activity-table td { padding: 16px 20px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.activity-table th { padding-block: 12px; background: var(--tw-bg); font-size: 12px; font-weight: 500; }
.activity-table td { font-size: 14px; }
.activity-table th:nth-child(1) { width: 13%; }
.activity-table th:nth-child(2) { width: 10%; }
.activity-table th:nth-child(3) { width: 15%; }
.activity-table th:nth-child(4) { width: 13%; }
.activity-table th:nth-child(5) { width: 22%; }
.activity-table th:nth-child(6) { width: 16%; }
.activity-table th:nth-child(7) { width: 11%; }
.activity-table .activity-time { white-space: nowrap; }
.activity-primary { display: block; color: var(--tw-text); }
.activity-secondary { display: block; margin-top: 4px; color: var(--tw-muted); font-size: 12px; line-height: 1.5; }
.activity-table .badge { padding: 4px 8px; }
.activity-token { min-height: 44px; }
.activity-panel-foot { min-height: 56px; padding: 12px 24px; font-size: 14px; }
@container (max-width: 900px) {
  .activity-filter-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 620px) {
  .activity-filter-fields { grid-template-columns: 1fr; }
  .activity-filter-actions { justify-content: flex-start; }
  .activity-filter-actions .btn { flex: 1; }
}

@media (max-width: 1023px) {
  .client-shell-main { margin-left: 0; }
  .client-page-title { display: none; }
}
@media (max-width: 950px) {
  .auth-visual { padding: 36px 40px; }
  .auth-intro h1 { font-size: 44px; }
  .auth-content { padding: 56px 40px; }
}
@media (max-width: 700px) {
  .activity-log-view .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .activity-log-view .page-heading h1 { font-size: 28px; }
  .activity-log-view .page-heading p { max-width: none; }
  .activity-log-view .page-heading .actions { max-width: none; }
  .activity-log-view .page-heading .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .activity-filters { padding: 16px; }
  .activity-filter-fields { grid-template-columns: 1fr; }
  .activity-filter-actions { justify-content: stretch; }
  .activity-filter-actions .btn { flex: 1; }
  .activity-panel-foot { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
  .access-pass-view .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .access-pass-view .page-heading h1 { font-size: 28px; }
  .access-pass-view .page-heading p { max-width: none; }
  .access-pass-view .page-heading .actions { max-width: none; }
  .access-pass-view .page-heading .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .pass-toolbar { padding: 16px; }
  .pass-filter { padding-inline: 10px; }
  .pass-results-foot { padding: 12px 16px; }
  .sidebar { width: min(280px, calc(100vw - 24px)); padding: 24px 20px; background: var(--tw-bg); }
  .sidebar.open { box-shadow: 0 0 0 100vmax rgb(29 29 23 / 22%); }
  .topbar { height: 64px; padding-inline: 16px; }
  .content { padding: 32px 20px 48px; }
  .page-heading h1 { font-size: 34px; }
  .page-heading p { font-size: 16px; }
  .stat-top, .panel-head p, .segmented button, .chart-legend { font-size: 12px; }
  .stat-foot, .page-footer, .client-footer { font-size: 12px; }
  .auth-card > p, .client-hero p, .auth-intro > p { font-size: 16px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { border-bottom: 1px solid var(--tw-line); }
  .stat-card:nth-child(2n) { border-right: 0; }
  .overview-banner p { font-size: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .auth-page { display: block; }
  .auth-visual { min-height: 390px; padding: 32px 24px; border-right: 0; border-bottom: 1px solid var(--tw-line); }
  .auth-intro { padding: 44px 0 32px; }
  .auth-intro h1 { font-size: 42px; }
  .auth-intro > p { font-size: 16px; }
  .auth-content { min-height: 520px; padding: 64px 24px 48px; }
  .auth-top-link { top: 20px; right: 24px; }
  .client-header { padding: 12px 16px; gap: 8px; }
  .client-header-left { gap: 8px; }
  .client-header-right { gap: 8px; }
  .client-header-right > .btn { min-height: 44px; }
  .client-main { padding: 24px 20px 48px; }
  .client-section-heading { display: block; }
  .client-section-heading .search-input { width: 100%; margin-top: 16px; }
  .client-grid { grid-template-columns: 1fr; }
  .client-hero p { font-size: 16px; }
  .client-footer { display: block; }
  .client-footer > span { display: block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Sign-in is a focused task surface. Preferences belong to the page utility bar. */
.signin-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--tw-bg); color: var(--tw-text); }
.signin-header { width: min(1200px, 100%); margin-inline: auto; padding: 24px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.signin-brand { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.signin-brand .brand { padding: 0; }
.signin-brand .brand-logo { width: 160px; height: auto; }
.signin-main { width: 100%; flex: 1; display: grid; align-items: center; padding: 56px 24px 80px; }
.signin-form { width: min(420px, 100%); margin-inline: auto; }
.signin-context { font: 500 14px/1.5 var(--tw-font-body); color: var(--tw-muted); margin-bottom: 12px; }
.signin-form h1 { color: var(--tw-ink); font: 500 32px/1.3 var(--tw-font-body); letter-spacing: -.02em; margin: 0; }
.signin-description { margin: 16px 0 32px; color: var(--tw-muted); font-size: 16px; line-height: 1.65; }
.signin-form .field { margin-bottom: 24px; }
.signin-form .field label { font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.signin-form .field input:not([type=checkbox]) { height: 48px; padding: 12px 14px; border-color: var(--tw-line-strong); background: var(--tw-surface); color: var(--tw-ink); }
.signin-form .btn.block { min-height: 48px; font-size: 16px; }
.signin-help { font-size: 14px; line-height: 1.6; color: var(--tw-muted); margin-top: 20px; }
.signin-switch { margin-top: 28px; border-top: 1px solid var(--tw-line); padding-top: 16px; }
.signin-switch a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--tw-text); }
.signin-switch a:hover { text-decoration: underline; text-underline-offset: 4px; }
.signin-switch .icon { width: 16px; height: 16px; }
.signin-footer { padding: 24px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--tw-muted); }
@media (max-width: 600px) {
  .signin-header { padding: 20px 24px; flex-wrap: wrap; gap: 12px; }
  .signin-main { align-items: start; padding-top: 40px; padding-bottom: 40px; }
  .signin-form h1 { font-size: 28px; }
}
@media (max-width: 360px) {
  .signin-header { padding-inline: 20px; }
  .signin-main { padding-inline: 20px; }
}

/* Shared language / appearance controls sit outside task-specific filters. */
.workspace-preferences, .portal-preferences { display: flex; justify-content: flex-end; padding: 16px 32px 0; }
.auth-preferences { margin-bottom: 32px; }
.auth-preferences.tw-preferences { justify-content: flex-start; }
.main, .content, .client-main, .panel, .page-heading > div, .settings-grid > *, .grid-main > * { min-width: 0; }
.page-heading { flex-wrap: wrap; }
.page-heading .actions { flex-wrap: wrap; }
.page-heading p { max-width: 70ch; }
.workspace-pill strong, .nav-link, .sidebar-help, .stat-top, .stat-foot, .panel-head h2 { overflow-wrap: anywhere; }
.nav-link { text-align: left; }
.panel-head { gap: 16px; flex-wrap: wrap; }
.segmented { flex-shrink: 0; }
.table-wrap { max-width: 100%; overflow: auto; }
.field-table { overscroll-behavior: contain; }
.field input:not([type=checkbox]), .field select, .field textarea { background: var(--tw-surface); color: var(--tw-ink); caret-color: var(--tw-ink); }
.field input::placeholder, .field textarea::placeholder, .search-input input::placeholder { color: var(--tw-muted); opacity: 1; }
.field input:not([type=checkbox]):disabled, .field select:disabled, .field textarea:disabled { background: var(--tw-surface-muted); color: var(--tw-muted); }
.field-table input[type="checkbox"], .check-item input[type="checkbox"] { cursor: pointer; }
.check-item:hover { background: var(--tw-surface-muted); }
.modal, .skeleton-card, .noscript { background: var(--tw-surface); }
.modal-backdrop { background: var(--tw-backdrop, rgb(29 29 23 / 35%)); }
.modal-head h2, .detail-value, .detail-stat strong, .check-item strong { color: var(--tw-ink); }
.detail-label, .detail-stat span, .password-hint, .chart-empty, .chart-summary,
.chart-summary small, .search-input .icon, .sample-list summary, .sample-list a small,
.inline-notice, .scan-warnings p { color: var(--tw-muted); }
.detail-stat, .chart-summary, .sample-list, .scan-warnings > div { border-color: var(--tw-line); }
.chart-summary strong, .scan-warnings strong { color: var(--tw-ink); }
.chart-summary { flex-wrap: wrap; gap: 12px 24px; }
.segmented button.active { background: var(--tw-surface); }
.btn.primary, .client-product .product-open { background: var(--tw-primary); border-color: var(--tw-primary); color: var(--tw-on-primary); }
.btn.primary:hover, .client-product .product-open:hover { background: var(--tw-primary-hover); border-color: var(--tw-primary-hover); }
.toasts { color: var(--tw-inverse); }
.toasts.error { background: var(--tw-danger-bg); color: var(--tw-danger); }
.detail-label { line-height: 1.5; }
.detail-value, .field .hint, .modal-head p { overflow-wrap: anywhere; }
.sample-list summary { min-height: 44px; font-size: 14px; gap: 8px; }
.sample-list a { min-height: 44px; }
.activity-table .activity-time { white-space: normal; font-variant-numeric: tabular-nums; }
.activity-filter-actions .btn { min-width: 100px; }
.metric-note a { color: var(--tw-ink); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] input:-webkit-autofill { -webkit-text-fill-color: var(--tw-ink); -webkit-box-shadow: 0 0 0 1000px var(--tw-surface) inset; caret-color: var(--tw-ink); }
@media (max-width: 700px) {
  .workspace-preferences, .portal-preferences { padding: 12px 20px 0; }
  .topbar { min-height: 64px; height: auto; padding-block: 8px; gap: 12px; flex-wrap: wrap; }
  .topbar-right > .btn, .page-heading .btn { min-height: 44px; font-size: 14px; }
  .page-heading { flex-direction: column; gap: 16px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p, .page-heading .actions { max-width: none; }
  .page-heading .actions { justify-content: flex-start; }
  .client-header { flex-wrap: wrap; }
  .auth-card h2 { font-size: 30px; }
  .auth-content { padding-top: 80px; padding-bottom: 80px; }
  .auth-intro h1 { font-size: clamp(32px, 9vw, 42px); }
  .stat-top { align-items: flex-start; gap: 8px; }
  .stat-icon { flex-shrink: 0; }
  .chart-summary small { margin-left: 0; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 16px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .settings-form { padding-inline: 16px; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: 0; }
  .client-header-right { margin-left: auto; }
  .auth-content { padding-inline: 20px; }
}

/* Optional product updates: a quiet footer section, subordinate to the catalog. */
.client-subscription { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,1fr); gap: 32px; margin-top: 48px; padding: 32px 0; border-top: 1px solid var(--tw-line); border-bottom: 1px solid var(--tw-line); }
.subscription-intro h2 { margin: 0 0 12px; font: 500 20px/1.4 var(--tw-font-body); color: var(--tw-ink); }
.subscription-intro p { max-width: 38ch; margin: 0; font: 14px/1.7 var(--tw-font-body); color: var(--tw-muted); }
.subscription-form-area { min-width: 0; }
.subscription-form-area .field { margin-bottom: 12px; }
.subscription-form-area .field input:not([type=checkbox]),
.subscription-filters .field input:not([type=checkbox]),
.subscription-filters .field select { box-sizing: border-box; height: 44px; min-height: 44px; padding: 9px 12px; font-size: 16px; line-height: 1.5; }
.subscription-form-area input:-webkit-autofill { -webkit-text-fill-color: var(--tw-ink); -webkit-box-shadow: 0 0 0 1000px var(--tw-surface) inset; caret-color: var(--tw-ink); }
.subscription-form-area input:disabled:-webkit-autofill { -webkit-text-fill-color: var(--tw-muted); -webkit-box-shadow: 0 0 0 1000px var(--tw-surface-muted) inset; }
.subscription-consent { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 10px; color: var(--tw-text); font: 14px/1.6 var(--tw-font-body); cursor: pointer; }
.subscription-consent input { width: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--tw-ink); }
.subscription-current > span { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
.subscription-current:not(:empty) { margin-bottom: 16px; }
.subscription-current .hint { margin: 8px 0 0; }
.subscription-email { display: block; overflow-wrap: anywhere; color: var(--tw-ink); font-size: 14px; }
.subscription-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.subscription-form-area .btn,
.subscription-filter-actions .btn,
.subscription-panel-foot .pagination .btn,
[data-action="export-subscriptions"] { box-sizing: border-box; height: 44px; min-height: 44px; padding: 8px 16px; font-size: 14px; line-height: 1.5; }
.subscription-cancel { box-sizing: border-box; height: 44px; min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--tw-muted); font: 14px/1.5 var(--tw-font-body); text-decoration: underline; text-underline-offset: 4px; }
.subscription-cancel:hover { color: var(--tw-ink); }
.subscription-cancel:disabled { opacity: .6; cursor: wait; }
.subscription-notice { margin: 12px 0 0; font: 14px/1.6 var(--tw-font-body); color: var(--tw-text); }
.subscription-form-area .form-error { margin-top: 12px; overflow-wrap: anywhere; }
.subscription-filters { display: grid; grid-template-columns: minmax(220px,1fr) minmax(160px,220px) auto; align-items: end; gap: 16px; padding: 24px; border-bottom: 1px solid var(--tw-line); }
.subscription-filters .field { margin: 0; min-width: 0; }
.subscription-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subscription-list-panel { container: subscription-list / inline-size; }
.subscription-scroll-hint { display: none; margin: 0; padding: 12px 24px; color: var(--tw-muted); font: 14px/1.5 var(--tw-font-body); }
.subscription-table-wrap { color-scheme: inherit; overscroll-behavior-inline: contain; }
.subscription-table { table-layout: fixed; width: 100%; min-width: 920px; font-size: 14px; }
.subscription-table th:nth-child(1) { width: 320px; }
.subscription-table th:nth-child(2) { width: 220px; }
.subscription-table th:nth-child(3) { width: 140px; }
.subscription-table th:nth-child(4) { width: 240px; }
.subscription-table th { font-size: 12px; font-weight: 500; }
.subscription-table th, .subscription-table td { padding: 16px 20px; text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.subscription-table .table-subtitle { display: block; margin-top: 4px; }
.subscription-table .subscription-email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subscription-panel-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.subscription-admin-note { margin: 16px 0 0; max-width: 80ch; color: var(--tw-muted); font: 14px/1.7 var(--tw-font-body); }
@container subscription-list (max-width: 919px) {
  .subscription-scroll-hint { display: block; }
}
@media (max-width: 767px) {
  .client-subscription { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; padding-block: 24px; }
  .subscription-intro p { max-width: none; }
  .subscription-filters { grid-template-columns: 1fr; padding: 20px; }
  .subscription-scroll-hint { padding-inline: 20px; }
  .subscription-panel-foot .pagination { flex-wrap: wrap; }
}
