@font-face {
  font-family: "PKPD Times New Roman";
  src: url("../pkpd-fonts/times.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PKPD Times New Roman";
  src: url("../pkpd-fonts/timesbd.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "PKPD Times New Roman";
  src: url("../pkpd-fonts/timesi.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PKPD Times New Roman";
  src: url("../pkpd-fonts/timesbi.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "PKPD SimSun";
  src: url("../pkpd-fonts/simsun.ttc") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* 全屏化调整 */
.container, .container-fluid {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.tab-content, .tab-pane {
  height: 100%;
}

/* 全路移除 Selectize 输入框产生的白色光标块 */
.selectize-input > input,
.selectize-control.single .selectize-input > input {
  display: none !important;
}

.navbar-nav {
  margin-left: 15px;
}

:root {
  --font-ui: "PKPD Times New Roman", "PKPD SimSun", "Times New Roman", SimSun, serif;
  --font-scientific: "PKPD Times New Roman", "Times New Roman", Times, "PKPD SimSun", SimSun, serif;
  --font-sans: var(--font-ui);
  --font-body-weight: 600;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  --color-text: #333;
  --color-muted: #6c757d;
  --color-hero-start: #1e3c72;
  --color-hero-end: #2a5298;
  --color-hero-accent: rgba(255, 255, 255, 0.1);
  --color-feature-border: rgba(0, 0, 0, 0.05);
  --color-feature-shadow: rgba(0, 0, 0, 0.02);
  --color-log-bg: #1e1e1e;
  --color-log-text: #d4d4d4;
  --color-log-border: #333;
  --color-log-shadow: rgba(0, 0, 0, 0.5);
  --color-log-info: #007bff;
  --color-log-warn: #ffc107;
  --color-log-error: #dc3545;
  --color-log-empty: #888;
  --radius-card: 15px;
  --radius-hero: 12px;
  --radius-log: 5px;
  --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hero: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-log-inset: inset 0 0 10px rgba(0, 0, 0, 0.5);
  --border-card: 1px solid rgba(0, 0, 0, 0.05);
  --gap-md: 1.5rem;
  --gap-lg: 2rem;
}

/* Layout helpers */
.section-title-center {
  text-align: center;
}

/* Global card/box styling */
.card {
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card);
  border: var(--border-card) !important;
  overflow: visible;
}

.card-header {
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.card-footer {
  border-bottom-left-radius: var(--sw-radius) !important;
  border-bottom-right-radius: var(--sw-radius) !important;
}

.box,
.box-body,
.card-body {
  overflow: visible;
}

.nav-tabs-custom>.nav-tabs>li:first-of-type.active>a {
  border-top-left-radius: var(--sw-radius);
}

.sys-resources {
  display: inline-flex;
  gap: 15px;
  align-items: center;
  color: #343a40;
  font-weight: 600;
  font-size: 0.9rem;
}

.sys-resource {
  display: inline-flex;
  align-items: center;
}

.app-license-badge-shell {
  margin-right: 0.25rem;
}

.app-license-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.app-license-badge.is-licensed {
  color: #0f5132;
  background: #d1e7dd;
  border-color: #badbcc;
}

.app-license-badge.is-grace {
  color: #664d03;
  background: #fff3cd;
  border-color: #ffecb5;
}

.app-license-badge.is-expired,
.app-license-badge.is-revoked,
.app-license-badge.is-unlicensed {
  color: #842029;
  background: #f8d7da;
  border-color: #f5c2c7;
}

.sys-version-panel,
.sys-license-panel,
.sys-license-state-banner,
.sys-license-activation {
  margin-top: 0.9rem;
}

.sys-license-panel,
.sys-license-state-banner {
  border-radius: 16px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.98));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sys-license-panel__header,
.sys-license-state-banner__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #1e293b;
}

.sys-license-panel__message,
.sys-license-state-banner__message {
  margin-top: 0.45rem;
  color: #475569;
  line-height: 1.5;
}

.sys-license-state-banner.is-licensed {
  border-color: rgba(16, 185, 129, 0.22);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(240, 253, 244, 0.96));
}

.sys-license-state-banner.is-grace {
  border-color: rgba(245, 158, 11, 0.22);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 214, 0.96));
}

.sys-license-state-banner.is-restricted,
.sys-license-state-banner.is-unlicensed {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(255, 237, 237, 0.96));
}

.sys-license-activation__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Welcome page - Version 2: Analytical Excellence (Light Professional) */
.welcome-workbench {
  height: calc(100vh - 58px) !important;
  background: #f8fafc url('clean_medical_abstract_bg_1773580170627.png') no-repeat center fixed;
  background-size: cover;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

/* 装饰性背景层 */
.welcome-v2-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.welcome-v2-content {
  max-width: 1300px;
  width: 100%;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 30px 20px;
}

.welcome-v2-hero {
  text-align: center;
  animation: v2FadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 800px;
}

@keyframes v2FadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-v2-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid rgba(59, 130, 246, 0.1);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
}

.welcome-v2-title {
  font-size: 4rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.welcome-v2-title span {
  color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-v2-subtitle {
  font-size: 1.2rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 0;
}

.welcome-v2-charts-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  animation: v2FadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes v2FadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-chart-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.05);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
}

.welcome-chart-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
  background: white;
}

.welcome-chart-header {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
}

.welcome-chart-header i {
  color: #3b82f6;
}

.welcome-static-chart {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.welcome-v2-grid-horizontal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  animation: v2FadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.welcome-v2-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid white;
  padding: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.welcome-v2-card:hover {
  background: white;
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.welcome-v2-icon-box {
  width: 54px;
  height: 54px;
  background: #f1f5f9;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #475569;
  flex-shrink: 0;
  transition: all 0.3s;
}

.welcome-v2-card:hover .welcome-v2-icon-box {
  background: #eff6ff;
  color: #3b82f6;
}

.welcome-v2-info {
  text-align: left;
}

.welcome-v2-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.welcome-v2-card-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.4;
}

.workbench-main-card .dataTables_wrapper {
  font-size: 0.9rem;
}

.workbench-main-card table.dataTable.compact thead th,
.workbench-main-card table.dataTable.compact thead td,
.workbench-main-card table.dataTable.compact tbody th,
.workbench-main-card table.dataTable.compact tbody td {
  padding: 4px 8px;
}

.workbench-main-card .dataTables_wrapper .dataTables_paginate {
  margin-top: 0.5rem;
}

.workbench-main-card .dataTables_wrapper .dataTables_info,
.workbench-main-card .dataTables_wrapper .dataTables_length {
  padding-top: 0.35rem;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.welcome-v2-arrow {
  margin-left: auto;
  color: #cbd5e1;
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.welcome-v2-card:hover .welcome-v2-arrow {
  transform: translateX(5px);
  color: #3b82f6;
}

.welcome-v2-footer {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

/* System log */
.log-console {
  background-color: var(--color-log-bg);
  color: var(--color-log-text);
  font-family: var(--font-mono);
  padding: 15px;
  border-radius: var(--radius-log);
  height: 65vh;
  overflow-y: auto;
  border: 1px solid var(--color-log-border);
  box-shadow: var(--shadow-log-inset);
}

.log-entry {
  margin-bottom: 4px;
  border-bottom: 1px solid var(--color-log-border);
  padding-bottom: 2px;
}

.log-entry-empty {
  color: var(--color-log-empty);
}

.log-timestamp {
  color: #569cd6;
  margin-right: 10px;
  font-size: 0.85em;
}

.log-type {
  font-weight: bold;
  margin-right: 8px;
  width: 60px;
  display: inline-block;
  text-align: center;
  border-radius: 3px;
  font-size: 0.8em;
  padding: 1px 0;
}

.log-type-info {
  background-color: var(--color-log-info);
  color: white;
}

.log-type-warn {
  background-color: var(--color-log-warn);
  color: black;
}

.log-type-error {
  background-color: var(--color-log-error);
  color: white;
}

.log-message {
  color: var(--color-log-text);
}

.log-action-column {
  margin-top: 25px;
}

.log-detail-table {
  width: auto;
  margin-top: 5px;
  font-size: 0.85em;
}

/* Smooth tab transitions */
.nav-tabs-custom .tab-content>.tab-pane,
.tab-content>.tab-pane {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

.nav-tabs-custom .tab-content>.active,
.tab-content>.active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

  .nav-tabs-custom .tab-content>.tab-pane,
  .tab-content>.tab-pane {
    transition: none;
    transform: none;
  }
}

/* PD convergence banner */
.pd-convergence-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.35;
  border: 1px solid transparent;
  background: #f8f9fa;
  color: #495057;
}

.pd-convergence-banner .fa {
  font-size: 0.95rem;
}

.pd-convergence-banner--warn {
  background: #fff7e6;
  border-color: #ffe2b3;
  color: #7a4b00;
}

.pd-convergence-banner--ok {
  background: #eefaf1;
  border-color: #c9efd5;
  color: #2f6b3d;
}

/* PD diagnostics + VPC controls */
.pd-diag-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.pd-vpc-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e7edf3;
  flex-wrap: wrap;
}

.pd-vpc-controls .form-group {
  margin-bottom: 0;
  min-width: 260px;
}

.pd-vpc-btn {
  height: 38px;
}

.pd-vpc-sep {
  height: 1px;
  background: #e6e6e6;
  margin: 16px 0 10px;
}

/* Tab fade in/out for auto jump */
.pd-tab-fade-out {
  opacity: 0 !important;
  transform: translateY(6px) !important;
}

.pd-tab-fade-in {
  animation: pd-tab-fade-in 260ms ease-out;
}

@keyframes pd-tab-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .pd-tab-fade-out,
  .pd-tab-fade-in {
    animation: none;
    transform: none !important;
  }
}

/* PD parameter table layout */
.pd-param-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.pd-param-table th,
.pd-param-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f5;
  text-align: center;
  overflow: visible;
}

.pd-param-table th:nth-child(1),
.pd-param-table td:nth-child(1) {
  width: 14%;
}

.pd-param-table th:nth-child(2),
.pd-param-table td:nth-child(2) {
  width: 22%;
  text-align: center;
}

.pd-param-table th:nth-child(3),
.pd-param-table td:nth-child(3) {
  width: 28%;
}

.pd-param-table th:nth-child(4),
.pd-param-table td:nth-child(4) {
  width: 22%;
  text-align: center;
}

.pd-param-table td:nth-child(2) .form-control,
.pd-param-table td:nth-child(4) .form-control {
  text-align: center;
}

.pd-param-table thead th {
  background: #f7f9fb;
  color: #495057;
  font-weight: 600;
}

.pd-param-table tr:last-child td {
  border-bottom: none;
}

.pd-param-table .form-group {
  margin-bottom: 0;
}

.pd-param-table .form-control {
  width: 100%;
}

.pd-param-table .text-muted {
  font-size: 0.9rem;
}

.pd-param-table .selectize-dropdown,
.pd-param-table .dropdown-menu {
  z-index: 2000;
}

.pd-explore-params-box,
.pd-explore-params-box.card,
.pd-explore-params-box.box,
.pd-explore-params-box .card,
.pd-explore-params-box .card-body,
.pd-explore-params-box .box-body,
.pd-explore-params-box .pd-explore-param-layout,
.pd-explore-params-box .pd-explore-param-table-wrap {
  overflow: visible !important;
  position: relative; /* 为 z-index 准备 */
}

/* 当卡片内部下拉框打开时，提升整个卡片层级，确保不被下方卡片遮挡 */
.pd-explore-params-box:has(.selectize-input.focus) {
  z-index: 10001 !important;
}

.pd-explore-params-box .selectize-dropdown,
.pd-explore-params-box .dropdown-menu {
  z-index: 20000 !important;
}

.pd-bootstrap-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}



/* PD auto exploration table */
.pd-explore-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  overflow: visible;
  table-layout: fixed;
}

.pd-explore-table th,
.pd-explore-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid #edf1f5;
}

.pd-explore-table thead th {
  background: #f7f9fb;
  color: #495057;
  font-weight: 600;
}

.pd-explore-table tr:last-child td {
  border-bottom: none;
}

.pd-explore-table .form-group {
  margin-bottom: 0;
}

.pd-explore-table .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 6px 18px;
  align-items: start;
}

.pd-explore-table .checkbox {
  margin: 0;
}

.pd-explore-options-center .shiny-options-group {
  display: inline-grid;
  justify-content: center;
  text-align: left;
}

.pd-explore-table td:first-child {
  font-weight: 600;
  color: #495057;
}

.pd-explore-results-card > .card-body,
.pd-grid-search-card > .card-body,
.pd-grid-search-results-card > .card-body {
  padding: 12px !important;
}

.pd-explore-config-shell,
.pd-grid-search-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-explore-config-shell {
  flex: 0 0 auto;
  gap: 4px;
}

.pd-explore-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-explore-panel-head__text {
  min-width: 0;
}

.pd-explore-eyebrow {
  margin-bottom: 4px;
  color: #687a8d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pd-explore-panel-head h4 {
  margin: 0;
  color: #25384a;
  font-size: 1.02rem;
  font-weight: 800;
}

.pd-explore-results-head__text p {
  margin: 4px 0 0;
  color: #607284;
  font-size: 0.78rem;
  line-height: 1.45;
}

.pd-explore-runbar {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.pd-explore-runbar__meta {
  color: #6a7b8c;
  font-size: 0.72rem;
  font-weight: 700;
}

.pd-explore-runbar .btn {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 4px !important;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pd-explore-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
  grid-auto-rows: min-content;
}

.pd-explore-selector-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 5px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-explore-selector-panel__label {
  color: #203244;
  font-size: 0.8rem;
  font-weight: 800;
}

.pd-explore-selector-options .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pd-explore-selector-options .checkbox {
  margin: 0;
  padding: 5px 8px;
  border: 1px solid #dce4eb;
  border-radius: 4px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fa 100%);
}

.pd-explore-selector-options .checkbox label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #314455;
  font-size: 0.74rem;
  font-weight: 700;
}

.pd-explore-selector-options input[type="checkbox"] {
  margin-top: 0;
}

.pd-explore-params-shell > .card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-explore-param-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-explore-param-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
}

.pd-explore-param-block {
  padding: 10px 12px;
  border: 1px solid #d8e1e8;
  border-radius: 5px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fb 100%);
}

.pd-explore-param-block__title {
  margin-bottom: 8px;
  color: #26384a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pd-explore-param-note {
  margin-bottom: 8px;
  color: #6a7c8e;
  font-size: 0.72rem;
  line-height: 1.4;
}

.pd-explore-param-block--matrix {
  padding-bottom: 8px;
}

.pd-explore-param-table-wrap {
  overflow: visible;
}

.pd-explore-compact-grid {
  display: grid;
  gap: 8px 12px;
}

.pd-explore-compact-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-explore-compact-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pd-explore-compact-grid .form-group,
.pd-explore-compact-grid .shiny-input-container {
  margin-bottom: 0 !important;
}

.pd-explore-params-shell .form-control,
.pd-explore-params-shell .selectize-control.single .selectize-input {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 3px !important;
  font-size: 0.76rem !important;
}

.pd-explore-params-shell .control-label {
  margin-bottom: 3px !important;
  color: #576a7d;
  font-size: 0.71rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
}

.pd-explore-param-table {
  border: 1px solid #d5dee6;
  border-radius: 5px;
  overflow: visible;
  table-layout: fixed;
}

.pd-explore-param-table thead th {
  font-size: 0.7rem !important;
  white-space: nowrap;
}

.pd-explore-param-table tbody td {
  padding: 8px 10px !important;
  vertical-align: middle;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.pd-explore-param-table .form-group,
.pd-explore-param-table .shiny-input-container {
  margin-bottom: 0 !important;
  overflow: visible !important;
}

.pd-explore-param-table .selectize-control,
.pd-explore-param-table .selectize-dropdown,
.pd-explore-param-table .selectize-dropdown.form-control {
  overflow: visible !important;
}

.pd-explore-param-table .selectize-dropdown,
.pd-explore-param-table .selectize-dropdown.form-control {
  z-index: 10000 !important;
}

.pd-explore-param-table th:first-child,
.pd-explore-param-table td:first-child {
  width: 16%;
  min-width: 110px;
  color: #243649;
  font-weight: 800;
}

.pd-explore-param-table th:nth-child(2),
.pd-explore-param-table td:nth-child(2) {
  width: 24%;
}

.pd-explore-param-table th:nth-child(3),
.pd-explore-param-table td:nth-child(3) {
  width: 24%;
}

.pd-explore-param-table th:nth-child(4),
.pd-explore-param-table td:nth-child(4) {
  width: 20%;
}

.pd-explore-param-table .text-muted {
  color: #6f8293 !important;
  font-size: 0.72rem;
  font-weight: 700;
}

.pd-explore-param-table .form-control,
.pd-explore-param-table .selectize-control.single .selectize-input {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 0.74rem !important;
  border-radius: 3px !important;
}

.pd-explore-param-table .control-label {
  display: block;
  margin-bottom: 2px !important;
  font-size: 0.64rem !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #718294;
}

.pd-grid-search-card .pd-explore-param-block--grid-values .pd-explore-compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pd-grid-search-card .pd-explore-param-block--iiv .pd-explore-compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pd-grid-search-shell {
  gap: 10px;
}

.pd-grid-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-grid-search-summary .pd-explore-eyebrow {
  margin-bottom: 0;
}

.pd-grid-search-summary__title {
  color: #223547;
  font-size: 0.96rem;
  font-weight: 800;
}

.pd-grid-search-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 8px;
}

.pd-grid-search-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-grid-search-card .pd-explore-param-block {
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-grid-search-card .pd-explore-param-block__title {
  margin-bottom: 7px;
  font-size: 0.74rem;
}

.pd-grid-search-card .pd-explore-param-note,
.pd-grid-search-grid-note {
  margin-bottom: 6px;
  color: #708293;
  font-size: 0.7rem;
  line-height: 1.4;
}

.pd-grid-search-card .pd-explore-compact-grid {
  gap: 7px 10px;
}

.pd-grid-search-values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pd-grid-search-card .form-control,
.pd-grid-search-card .selectize-control.single .selectize-input {
  min-height: 33px !important;
  height: 33px !important;
  font-size: 0.75rem !important;
}

.pd-grid-search-card .control-label {
  margin-bottom: 2px !important;
  color: #5c6f81;
  font-size: 0.69rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
}

.pd-grid-search-actionbar {
  display: flex;
  justify-content: flex-end;
  padding: 0;
  border: 0;
}

.pd-grid-search-actionbar .btn {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 4px !important;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pd-explore-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pd-explore-results-head__text {
  min-width: 0;
}

.pd-explore-runbar--grid {
  align-items: flex-start;
}

.pd-explore-results-card .pd-table-shell {
  border-color: #ccd7e0;
  background: linear-gradient(180deg, #fdfefe 0%, #f5f8fb 100%);
}

.pd-explore-results-card .pd-table-shell__body,
.pd-grid-search-results-card .pd-table-shell__body {
  padding: 0;
}

.pd-explore-results-card table.dataTable thead th,
.pd-grid-search-results-card table.dataTable thead th {
  background: linear-gradient(180deg, #e5edf3 0%, #d8e2ea 100%) !important;
  color: #314455 !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #cfd8e0 !important;
}

.pd-explore-results-card table.dataTable tbody td,
.pd-grid-search-results-card table.dataTable tbody td {
  padding: 9px 12px !important;
  vertical-align: middle;
  border-bottom: 1px solid #e8eef3 !important;
}

.pd-explore-results-card table.dataTable tbody tr:nth-child(even),
.pd-grid-search-results-card table.dataTable tbody tr:nth-child(even) {
  background: #fbfcfd !important;
}

.pd-explore-results-card table.dataTable tbody tr:hover,
.pd-grid-search-results-card table.dataTable tbody tr:hover {
  background: #f4f8fb !important;
}

.pd-monitor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pd-monitor-badge--ok {
  color: #1f7a45;
  background: #e8f7ee;
  border-color: #b7ddc4;
}

.pd-monitor-badge--bad {
  color: #9a3f3f;
  background: #fcecec;
  border-color: #efc2c2;
}

.pd-monitor-note {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.pd-monitor-note--ok {
  color: #315c43;
  background: #eef8f1;
}

.pd-monitor-note--warn {
  color: #7c5b14;
  background: #fff7df;
}

.pd-monitor-note--bad {
  color: #7b3340;
  background: #fbecef;
}

/* PD plot fixed aspect ratio */
.pd-plot-frame {
  position: relative;
  width: 100%;
}

.pd-plot-4-3 {
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 240px);
}

.pd-plot-gof {
  max-height: calc(100vh - 330px);
}

.pd-plot-vpc {
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 310px);
}

.pd-plot-auec-compare {
  aspect-ratio: 3 / 2;
  max-height: calc(100vh - 280px);
}

.pd-plot-individual-fit {
  height: 720px;
  max-height: none;
}

.pd-plot-frame>.shiny-spinner-output-container,
.pd-plot-frame>.shiny-plot-output {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .pd-explore-table .shiny-options-group {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 600px) {
  .pd-explore-table .shiny-options-group {
    grid-template-columns: 1fr;
  }
}

/* PD Three-line Table Style (Scientific) */
.pd-three-line-table {
  width: 100% !important;
  border-collapse: collapse !important;
  /* Ensure borders collapse */
  border-top: 2px solid #000 !important;
  /* Heavy top line */
  border-bottom: 2px solid #000 !important;
  /* Heavy bottom line */
  font-family: var(--font-sans);
}

.pd-three-line-table thead th {
  background-color: #fff !important;
  /* White background */
  color: #000 !important;
  /* Black text */
  border-bottom: 1px solid #000 !important;
  /* Thin header bottom line */
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  font-weight: 700 !important;
  padding: 12px 8px !important;
  text-align: left !important;
}

.pd-three-line-table tbody td {
  background-color: #fff !important;
  color: #333 !important;
  border: none !important;
  /* Remove default grid borders */
  border-bottom: 1px solid #f0f0f0 !important;
  /* Optional: very light guideline */
  padding: 10px 8px !important;
  vertical-align: middle !important;
}

/* Remove side borders/shading from wrapper */
div[id="tbl_fixed_dt"] .dataTables_wrapper,
div[id="tbl_bootstrap_dt"] .dataTables_wrapper {
  background: white !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Styling for specific columns to maintain highlighted visuals but lighter */
.pd-three-line-table tbody td:nth-child(4),
/* RSE */
.pd-three-line-table tbody td:nth-child(5),
/* Back-transformed */
.pd-three-line-table tbody td:nth-child(6),
/* 95% CI */
.pd-three-line-table tbody td:nth-child(7),
/* BSV */
.pd-three-line-table tbody td:nth-child(8)

/* Shrink */
  {
  font-weight: 500;
}

/* Ensure buttons look clean */
div[id="tbl_fixed_dt"] .dt-buttons .dt-button,
div[id="tbl_bootstrap_dt"] .dt-buttons .dt-button {
  background: #f8f9fa !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  box-shadow: none !important;
}

div[id="tbl_fixed_dt"] .dt-buttons .dt-button:hover,
div[id="tbl_bootstrap_dt"] .dt-buttons .dt-button:hover {
  background: #e2e6ea !important;
}

.pd-pivotal-intro {
  color: #4f5d6b;
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.pd-pivotal-section h5 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 14px;
}

.pd-pivotal-section .form-group {
  margin-bottom: 14px;
}

.pd-pivotal-section .form-control {
  min-height: 44px;
  border-radius: 10px;
}

.pd-pivotal-section .irs,
.pd-pivotal-section .js-range-slider {
  margin-top: 6px;
}

.workbench-control-actions {
  margin-top: 8px;
}

.workbench-control-actions .btn {
  min-height: 50px;
  border-radius: 12px;
  font-weight: 700;
}

.pd-pivotal-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.pd-pivotal-summary-card {
  border-radius: 18px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #eef5fb 100%);
  border: 1px solid #d9e6f2;
  box-shadow: 0 10px 24px rgba(23, 43, 77, 0.06);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pd-pivotal-summary-card.is-pass {
  background: linear-gradient(180deg, #f3fbf4 0%, #e4f7e7 100%);
  border-color: #bfe8c7;
}

.pd-pivotal-summary-card.is-fail {
  background: linear-gradient(180deg, #fff5f5 0%, #fde9e9 100%);
  border-color: #f1c2c2;
}

.pd-pivotal-summary-card.is-pending {
  background: linear-gradient(180deg, #f7f8fb 0%, #edf1f5 100%);
  border-color: #d6dde6;
}

.pd-pivotal-summary-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7785;
}

.pd-pivotal-summary-value {
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
  color: #1f2d3d;
  word-break: keep-all;
}

.pd-pivotal-summary-hint {
  font-size: 0.88rem;
  color: #607080;
  line-height: 1.4;
}

.pd-pivotal-main-card {
  border: 1px solid #dce7f1;
  border-radius: 18px;
  background: #fbfdff;
  padding: 20px 22px 12px;
  margin-bottom: 18px;
}

.pd-pivotal-block-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #213547;
  margin-bottom: 14px;
}

.pd-pivotal-tabs .nav-tabs {
  border-bottom: 1px solid #e2e8f0;
}

.pd-pivotal-tabs .nav-tabs .nav-link {
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  color: #667587;
}

.pd-pivotal-tabs .nav-tabs .nav-link.active {
  color: #1677e6;
}

.pd-pivotal-tabs .tab-content {
  padding-top: 14px;
}

@media (max-width: 991px) {
  .pd-pivotal-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Modern layout components for PD preprocess workspace */
:root {
  --pd-primary: #4f46e5;
  --pd-primary-dark: #4338ca;
  --pd-accent: #10b981;
  --pd-secondary: #0f766e;
  --pd-warm: #f59e0b;
  --pd-rose: #e11d48;
  --pd-bg-soft: #f8fafc;
  --pd-bg-shell: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
  --pd-border: #e2e8f0;
  --pd-text-main: #1e293b;
  --pd-text-muted: #64748b;
  --pd-card-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.28), 0 8px 18px -12px rgba(79, 70, 229, 0.16);
}

.pd-pivotal-section h5 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7b8794;
  margin-bottom: 12px;
}

.workbench-control-panel .form-control,
.workbench-control-panel .selectize-input,
.workbench-control-panel .form-control-file {
  border-radius: 14px !important;
  border: 1px solid rgba(203, 213, 225, 0.9) !important;
  min-height: 48px;
  box-shadow: none !important;
}

.workbench-control-panel .selectize-input {
  padding: 10px 14px !important;
}

.workbench-control-panel .selectize-input.focus,
.workbench-control-panel .form-control:focus,
.workbench-control-panel .selectize-input:focus {
  border-color: rgba(79, 70, 229, 0.85) !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10) !important;
}

.pd-basic-info-panel {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.06), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

/* PD Basic Info Cards - Premium Redesign */
.pd-basic-info-panel {
  padding: 30px;
  background: white;
}

/* Info Grid Layout Fix */
.pd-info-grid {
  margin-left: -9px;
  margin-right: -9px;
  row-gap: 18px;
}

.pd-info-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  background: #f8fafc;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid #e2e8f0;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.pd-info-grid > [class*="col-"] {
  padding-left: 9px;
  padding-right: 9px;
}

.pd-info-card:hover {
  background: white;
  border-color: #3b82f6;
  box-shadow: 0 20px 40px -15px rgba(59, 130, 246, 0.15);
  transform: translateY(-5px);
}

.pd-info-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.14), rgba(16, 185, 129, 0.14));
}

.pd-info-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: white !important;
  color: #3b82f6 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex: 0 0 60px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pd-info-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pd-info-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pd-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.pd-info-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pd-text-main);
  line-height: 1.55;
  word-break: break-word;
}

.pd-info-card--subject .pd-info-value {
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.pd-info-card--dose .pd-info-value,
.pd-info-card--time .pd-info-value {
  font-size: 1.04rem;
  font-weight: 700;
  color: #334155;
}


.pd-info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pd-info-chip {
  padding: 2px 10px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.2s;
}

.pd-info-card:hover .pd-info-chip {
  border-color: #cbd5e1;
}

.pd-info-chip--more {
  background: #f1f5f9;
  border-style: dashed;
  color: #64748b;
}

/* Tabs UI Refinement */
.pd-pivotal-tabs-container .nav-tabs {
  padding: 14px 20px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
}

.pd-pivotal-tabs-container .nav-tabs .nav-link {
  border: 1px solid transparent;
  color: var(--pd-text-muted);
  font-weight: 700;
  padding: 14px 18px;
  background: transparent;
  transition: all 0.2s;
  border-radius: 14px 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pd-pivotal-tabs-container .nav-tabs .nav-link.active {
  color: var(--pd-primary);
  background: #fff;
  border-color: rgba(226, 232, 240, 0.95);
  border-bottom-color: #fff;
  box-shadow: 0 -8px 16px -18px rgba(79, 70, 229, 0.45);
}

.pd-pivotal-tabs-container .tab-content {
  padding: 0;
}

.pd-pivotal-tabs-container .tab-pane {
  padding: 0;
}

@media (max-width: 991px) {
  .pd-basic-info-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767px) {
  .workbench-control-panel__header,
  .workbench-control-panel__body,
  .pd-basic-info-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .pd-pivotal-tabs-container .nav-tabs {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pd-info-card {
    min-height: 132px;
    padding: 18px;
  }

  .pd-info-card--subject .pd-info-value {
    font-size: 1.7rem;
  }

  .pd-info-card--dose .pd-info-value,
  .pd-info-card--time .pd-info-value {
    font-size: 0.96rem;
  }
}

/* Unified Instrument Panel overrides */
:root {
  --font-heading: var(--font-ui);
  --font-body: var(--font-ui);
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  --ui-shell: #0f172a;
  --ui-shell-strong: #111c34;
  --ui-shell-text: #e2e8f0;
  --ui-shell-muted: #94a3b8;
  --ui-bg: #edf3f8;
  --ui-bg-alt: #e7eef5;
  --ui-surface: rgba(255, 255, 255, 0.92);
  --ui-surface-strong: #ffffff;
  --ui-surface-muted: #f6f9fc;
  --ui-border: rgba(148, 163, 184, 0.28);
  --ui-border-strong: rgba(51, 65, 85, 0.18);
  --ui-text: #142235;
  --ui-text-muted: #5f7186;
  --ui-title: #091524;
  --ui-accent: #0ea5e9;
  --ui-accent-strong: #0284c7;
  --ui-accent-soft: rgba(14, 165, 233, 0.12);
  --ui-success: #10b981;
  --ui-warning: #f59e0b;
  --ui-danger: #ef4444;
  --ui-shadow-card: 0 18px 34px -26px rgba(15, 23, 42, 0.48), 0 10px 18px -16px rgba(2, 132, 199, 0.12);
  --ui-shadow-raised: 0 22px 44px -30px rgba(15, 23, 42, 0.5), 0 18px 28px -24px rgba(2, 132, 199, 0.16);
  --ui-radius-card: 16px;
  --ui-radius-pill: 999px;
  --ui-card-header-bg: linear-gradient(135deg, #13233c 0%, #19304f 100%);
  --ui-card-header-border: rgba(255, 255, 255, 0.08);
  --ui-card-header-text: #e8f1fb;
  --ui-grid-line: rgba(15, 23, 42, 0.04);
}

html,
body {
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  color: var(--ui-text);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.03) 0%, rgba(15, 23, 42, 0) 24%),
    linear-gradient(180deg, var(--ui-bg) 0%, var(--ui-bg-alt) 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title,
.modal-title,
.report-workbench-section__copy h3,
.report-workbench-meta-import-panel__copy h4,
.report-workbench-panel-head h4,
.report-ct-import-card__head h4 {
  font-family: var(--font-heading);
  font-weight: 1000 !important;
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
label,
p,
td,
th {
  font-weight: var(--font-body-weight);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--ui-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ui-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.45;
  z-index: 0;
}

.container-fluid,
.bslib-page-fill,
.bslib-page-navbar {
  position: relative;
  z-index: 1;
}

.bslib-page-navbar > .container-fluid,
.bslib-page-navbar > .tab-content,
.bslib-page-navbar > .navbar-page-content,
.bslib-page-navbar .tab-content > .tab-pane {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.navbar,
.navbar.navbar-default {
  background: linear-gradient(135deg, var(--ui-shell) 0%, var(--ui-shell-strong) 100%) !important;
  border: none !important;
  box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.85);
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-nav > li > a,
.navbar .navbar-text {
  color: var(--ui-shell-text) !important;
  font-family: var(--font-heading);
}

.navbar .navbar-brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navbar .nav-link,
.navbar .navbar-nav > li > a {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 12px;
  margin: 8px 4px;
  padding: 10px 14px !important;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.navbar .nav-link:hover,
.navbar .navbar-nav > li > a:hover,
.navbar .nav-link:focus,
.navbar .navbar-nav > li > a:focus {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #ffffff !important;
}

.navbar .active > a,
.navbar .active > .nav-link,
.navbar .nav-item.active > .nav-link {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(16, 185, 129, 0.2) 100%) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18);
}

.sys-resources,
.sys-resource,
.welcome-workbench-footer {
  font-family: var(--font-body);
}

.sys-resources {
  color: var(--ui-shell-text);
  gap: 12px;
}

.sys-resource {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.system-resource-panel .sys-resources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  color: var(--ui-text);
}

.system-resource-panel .sys-resource {
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 252, 0.98) 100%);
  border: 1px solid var(--ui-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: var(--ui-title);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  justify-content: flex-start;
  gap: 10px;
}

.system-resource-panel .sys-resource .fa {
  color: var(--ui-accent-strong);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════
   系统模块 — 统计软件风格 (SAS / R Console Inspired)
   ═══════════════════════════════════════════════════ */

/* ── 系统总览控制台 ── */
.sys-stats-console {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

.sys-stats-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e293b;
  color: #e2e8f0;
  border-bottom: 2px solid #334155;
}

.sys-stats-header__icon {
  color: #38bdf8;
  font-size: 0.85rem;
}

.sys-stats-header__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  flex: 1;
}

.sys-stats-header__badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.sys-stats-header__badge.sys-val--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.sys-stats-header__badge.sys-val--warn {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.sys-stats-header__badge.sys-val--danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.sys-stats-refresh-btn.btn {
  min-height: 26px;
  padding: 3px 9px !important;
  border: 1px solid rgba(148, 163, 184, 0.5) !important;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
}

.sys-stats-refresh-btn.btn:hover,
.sys-stats-refresh-btn.btn:focus-visible {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  color: #7dd3fc !important;
}

/* 核心指标表格 */
.sys-stats-table {
  width: 100%;
  border-collapse: collapse;
}

.sys-stats-table td {
  padding: 8px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.82rem;
  vertical-align: middle;
}

.sys-stats-table__label {
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  width: 80px;
  background: #f1f5f9;
}

.sys-stats-table__value {
  font-weight: 700;
  color: #0f172a;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.sys-stats-table tr:last-child td {
  border-bottom: none;
}

.sys-stats-footer {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  font-size: 0.68rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* ── 参数配置面板 ── */
.sys-config-console {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sys-config-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.sys-config-section__title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sys-config-section__title .fa,
.sys-config-section__title .fas {
  color: #38bdf8;
  font-size: 0.75rem;
}

.sys-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px 14px;
}

.sys-config-grid .form-group {
  margin-bottom: 0 !important;
}

.sys-config-grid .control-label {
  font-size: 0.72rem !important;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px !important;
}

.sys-config-grid .form-control {
  height: 32px !important;
  font-size: 0.8rem !important;
  font-family: 'SF Mono', 'Consolas', monospace;
  border-color: #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
}

.sys-config-grid .form-control:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12) !important;
}

.sys-config-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.sys-config-actions .btn {
  font-size: 0.78rem;
  padding: 6px 16px;
  border-radius: 4px;
}

.sys-config-note {
  padding: 0;
}

.sys-config-note p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.sys-runtime-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
}

.sys-runtime-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #dbe4ec;
  border-radius: 6px;
  background: #ffffff;
}

.sys-runtime-control__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sys-runtime-control__copy strong {
  color: #334155;
  font-size: 0.78rem;
}

.sys-runtime-control__copy span {
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.45;
}

.sys-runtime-control .form-group {
  flex: 0 0 auto;
  margin: 0 !important;
}

.sys-runtime-control .checkbox {
  margin: 0;
  white-space: nowrap;
}

.sys-runtime-control .checkbox label,
.sys-runtime-control .btn {
  font-size: 0.75rem;
  font-weight: 600;
}

.sys-runtime-control .btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
}

@media (max-width: 900px) {
  .sys-runtime-controls {
    grid-template-columns: 1fr;
  }
}

/* ── 活跃会话监控 ── */
.sys-session-console {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.sys-session-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #1e293b;
  border-bottom: 2px solid #334155;
}

.sys-session-toolbar__select {
  flex: 1;
  max-width: 360px;
}

.sys-session-toolbar__select .form-group {
  margin-bottom: 0 !important;
}

.sys-session-toolbar__select .form-control,
.sys-session-toolbar__select .selectize-input {
  height: 30px !important;
  min-height: 30px !important;
  font-size: 0.75rem !important;
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
  border-radius: 3px !important;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.sys-session-toolbar__select .selectize-input .item {
  color: #e2e8f0 !important;
}

.sys-session-toolbar .btn {
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 3px;
}

.sys-session-table {
  width: 100%;
  border-collapse: collapse;
}

.sys-session-table thead th {
  padding: 6px 14px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}

.sys-session-table__head--time {
  text-align: center !important;
  width: 22%;
}

.sys-session-table__head--count {
  text-align: center !important;
  width: 12%;
}

.sys-session-table tbody td {
  padding: 6px 14px;
  font-size: 0.78rem;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.sys-session-table__id {
  font-weight: 600;
  color: #0f172a !important;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sys-session-table__cell--time {
  text-align: center;
  white-space: nowrap;
}

.sys-session-table__cell--count {
  font-weight: 700;
  text-align: center !important;
  white-space: nowrap;
}

.sys-session-table tbody tr:hover {
  background: #f1f5f9;
}

.sys-session-table__row--current {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.03));
}

.sys-session-table__row--current td {
  box-shadow: inset 0 1px 0 rgba(59, 130, 246, 0.12), inset 0 -1px 0 rgba(59, 130, 246, 0.12);
}

.sys-session-table__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sys-session-table tbody tr:last-child td {
  border-bottom: none;
}

.sys-session-note {
  padding: 6px 14px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* ── R 终端视图 ── */
#system_terminal_ui {
  display: block;
  width: 100%;
}

.sys-terminal-console {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 190px);
  min-height: 400px;
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: none;
}

.sys-terminal-console__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f0f0f0;
  border-bottom: 1px solid #cccccc;
  z-index: 10;
}

.sys-terminal-console__meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 2px 8px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.sys-terminal-console__meta-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666666;
}

.sys-terminal-console__meta-value {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 400;
  color: #333333;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.sys-terminal-console__follow {
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  background: transparent;
  border: 1px solid #cccccc;
  color: #555555;
  border-radius: 4px;
}

.sys-terminal-console .btn-outline-light {
  color: #555555;
  border-color: #cccccc;
  background: #ffffff;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  transition: all 150ms ease;
}

.sys-terminal-console .btn-outline-light:hover,
.sys-terminal-console .btn-outline-light:focus,
.sys-terminal-console .btn-outline-light:active {
  color: #333333;
  border-color: #999999;
  background: #e6e6e6;
  box-shadow: none;
}

.sys-terminal-console__follow.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sys-terminal-console__viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  padding: 12px 16px;
  background: #ffffff;
  scroll-behavior: auto;
  position: relative;
}

/* 终端内部专属滚动条 */
.sys-terminal-console__viewport::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.sys-terminal-console__viewport::-webkit-scrollbar-track {
  background: #f9f9f9;
  border-left: 1px solid #eaeaea;
}

.sys-terminal-console__viewport::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 6px;
  border: 3px solid #f9f9f9;
}

.sys-terminal-console__viewport::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.sys-terminal-console__output {
  margin: 0;
  min-height: 100%;
  color: #000000;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  text-shadow: none;
}

.sys-terminal-console__footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 12px;
  border-top: 1px solid #cccccc;
  background: #f0f0f0;
  color: #666666;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0;
  font-family: 'Consolas', 'Monaco', monospace;
}


.welcome-workbench-footer {
  padding: 14px 6px 4px;
  color: var(--ui-text-muted);
  font-size: 0.88rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 254, 0.98) 100%);
  border-radius: var(--ui-radius-card) !important;
  border: 1px solid var(--ui-border) !important;
  box-shadow: var(--ui-shadow-card);
  backdrop-filter: blur(10px);
}

.card:hover {
  box-shadow: var(--ui-shadow-raised);
}

.card-header {
  background: var(--ui-card-header-bg) !important;
  color: var(--ui-card-header-text) !important;
  border-bottom: 1px solid var(--ui-card-header-border) !important;
  padding: 14px 18px !important;
}

.card-header,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-body {
  padding: 20px 22px;
}

.summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f3f8fc 100%);
  border: 1px solid var(--ui-border);
}

.summary-card .card-header {
  background: linear-gradient(135deg, #0f2744 0%, #14365a 100%) !important;
}

.summary-card-value {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ui-title);
  letter-spacing: -0.03em;
}

.summary-card-success {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 18px 34px -26px rgba(5, 150, 105, 0.42);
}

.summary-card-muted {
  border-color: rgba(148, 163, 184, 0.28);
}

.bslib-sidebar-layout,
.layout-sidebar,
.sidebar,
.sidebar-content {
  background: transparent;
}

.sidebar,
.bslib-sidebar-layout > .sidebar,
.bslib-sidebar-layout .sidebar-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 249, 253, 0.95) 100%) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--sw-radius) !important;
  box-shadow: var(--ui-shadow-card);
  overflow: hidden;
}

.sidebar .sidebar-title,
.sidebar h2,
.sidebar h3,
.sidebar h4 {
  font-family: var(--font-heading);
  color: var(--ui-title);
}

.nav-tabs {
  border-bottom: 1px solid var(--ui-border);
  gap: 8px;
}

.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 12px 12px 0 0;
  color: var(--ui-text-muted);
  background: rgba(255, 255, 255, 0.45);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
}

.nav-tabs .nav-link:hover {
  color: var(--ui-title);
  border-color: rgba(14, 165, 233, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #ffffff;
  background: linear-gradient(135deg, #0f2744 0%, #16456f 100%);
  border-color: rgba(12, 74, 110, 0.55);
  box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.1);
}

.tab-content {
  background: transparent;
}

.btn,
.dt-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 12px !important;
  font-family: var(--font-heading);
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover,
.dt-button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  ) !important;
  background-size: 1rem 1rem !important;
  animation: btn-busy-stripes 1s linear infinite !important;
  filter: saturate(0.6);
  pointer-events: none;
}

@keyframes btn-busy-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

.btn-primary,
.btn-success,
.btn-info {
  background: linear-gradient(135deg, var(--ui-accent) 0%, #118ab2 100%) !important;
  border-color: rgba(2, 132, 199, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 24px -18px rgba(2, 132, 199, 0.72);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: rgba(217, 119, 6, 0.72) !important;
  color: #fff !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: rgba(220, 38, 38, 0.72) !important;
  color: #fff !important;
}

.btn-secondary,
.btn-outline-secondary,
.dt-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 248, 252, 0.98) 100%) !important;
  border: 1px solid var(--ui-border) !important;
  color: var(--ui-title) !important;
  box-shadow: none !important;
}

.btn-outline-secondary:hover,
.btn-secondary:hover,
.dt-button:hover {
  border-color: rgba(14, 165, 233, 0.38) !important;
  color: var(--ui-accent-strong) !important;
  background: #ffffff !important;
}

.form-control,
.selectize-input,
.irs,
.js-range-slider,
.selectize-dropdown,
.form-control-file,
.shiny-input-container input[type="text"],
.shiny-input-container input[type="number"],
.shiny-input-container select {
  font-family: var(--font-body);
}

.form-control,
.selectize-input,
.shiny-input-container input[type="text"],
.shiny-input-container input[type="number"],
.shiny-input-container select {
  min-height: 44px;
  border-radius: 12px !important;
  border: 1px solid var(--ui-border) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

.form-control:focus,
.selectize-input.focus,
.selectize-input:focus,
.shiny-input-container input:focus,
.shiny-input-container select:focus {
  border-color: rgba(14, 165, 233, 0.6) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12) !important;
}

.dataTables_wrapper,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-family: var(--font-body);
  color: var(--ui-text-muted);
}

.dataTables_wrapper .dataTables_filter {
  display: none !important;
}

.dataTables_wrapper .dataTables_length {
  display: none !important;
}

div.dataTables_filter,
div.dataTables_length {
  display: none !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 38px;
  border-radius: 10px !important;
  border: 1px solid var(--ui-border) !important;
  background: rgba(255, 255, 255, 0.92);
}

table.dataTable thead th,
table.dataTable thead td {
  background: linear-gradient(180deg, #eff5fa 0%, #f8fbfd 100%) !important;
  color: var(--ui-title) !important;
  border-bottom: 1px solid var(--ui-border-strong) !important;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

table.dataTable tbody td {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ui-text);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
  background: rgba(248, 251, 254, 0.85) !important;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
  background: rgba(14, 165, 233, 0.05) !important;
}

.welcome-container {
  max-width: 1280px;
}

.hero-section {
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.22) 0%, transparent 24%),
    linear-gradient(135deg, #0b1628 0%, #13233c 52%, #163c5a 100%);
  border-radius: 20px;
  box-shadow: 0 28px 46px -34px rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(125, 211, 252, 0.08);
  text-align: left;
}

.hero-section::before {
  width: 360px;
  height: 360px;
  top: -80px;
  right: -70px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, transparent 70%);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.92);
}

.welcome-container .card,
.feature-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 253, 0.98) 100%);
  border-color: rgba(148, 163, 184, 0.22);
}

.feature-icon-wrapper {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(16, 185, 129, 0.12) 100%);
  color: var(--ui-accent-strong);
}

.feature-card:hover .feature-icon-wrapper {
  background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
}

.pd-pivotal-main-card,
.pd-info-card,
.pd-pivotal-summary-card {
  border-radius: 16px;
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow-card);
}

.workbench-control-panel__header,
.workbench-main-card > .card-header {
  background: var(--ui-card-header-bg);
  border-bottom: 1px solid var(--ui-card-header-border);
}

.workbench-control-panel__header h4,
.pd-pivotal-block-title,
.pd-basic-info-headline h5 {
  font-family: var(--font-heading);
  color: var(--ui-card-header-text);
}

.workbench-control-panel__header h4 i {
  background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
  box-shadow: 0 10px 18px -10px rgba(14, 165, 233, 0.75);
}

.pd-pivotal-block-title,
.pd-basic-info-headline h5 {
  color: var(--ui-title);
}

.pd-pivotal-section h5,
.pd-info-label,
.pd-pivotal-summary-label,
.pd-basic-info-kicker {
  color: var(--ui-text-muted);
}

.pd-pivotal-summary-card.is-pass {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.95) 0%, rgba(220, 252, 231, 0.95) 100%);
}

.pd-pivotal-summary-card.is-fail {
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96) 0%, rgba(254, 226, 226, 0.96) 100%);
}

.pd-pivotal-summary-card.is-pending {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.pd-pivotal-tabs .nav-tabs,
.pd-pivotal-tabs-container .nav-tabs {
  background: linear-gradient(180deg, rgba(244, 248, 251, 0.94) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-bottom: 1px solid var(--ui-border);
}

.pd-param-table,
.pd-explore-table {
  border-color: var(--ui-border);
  box-shadow: none;
}

.pd-explore-results-card,
.pd-grid-search-card,
.pd-grid-search-results-card,
.pd-explore-params-shell {
  border-radius: 6px !important;
  border-color: #d3dce4 !important;
  box-shadow: none !important;
}

.pd-param-table thead th,
.pd-explore-table thead th {
  background: linear-gradient(180deg, #eef4f9 0%, #f8fbfd 100%);
  color: var(--ui-title);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.76rem;
}

.log-console {
  background:
    linear-gradient(180deg, rgba(9, 21, 36, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #d6e3ef;
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 16px;
  box-shadow: inset 0 0 18px rgba(2, 6, 23, 0.55), 0 18px 34px -28px rgba(15, 23, 42, 0.65);
}

.log-entry {
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.log-timestamp {
  color: #7dd3fc;
}

@media (max-width: 991px) {
  .hero-section {
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Statistical software workbench overrides - Modern High-End UI (Platinum & Slate Silver) */
:root {
  --sw-shell: #171717;
  --sw-shell-deep: #0a0a0a;
  --sw-shell-text: #f5f5f5;
  --sw-bg: #fafafa;
  --sw-panel: #ffffff;
  --sw-panel-strong: #ffffff;
  --sw-panel-muted: #f5f5f5;
  --sw-border: rgba(229, 229, 229, 0.8);
  --sw-border-strong: #d4d4d4;
  --sw-text: #171717;
  --sw-text-muted: #737373;
  --sw-accent: #525252;
  --sw-accent-strong: #171717;
  --sw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --sw-shadow-raised: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --sw-radius: 8px;
  --sw-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: linear-gradient(135deg, #fdfdfd 0%, #f5f5f5 100%);
  color: var(--sw-text);
}

body::before {
  opacity: 0.14;
  background-size: 28px 28px;
}

.navbar,
.navbar.navbar-default {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(229, 229, 229, 1) !important;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-nav > li > a,
.navbar .navbar-text {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  color: var(--sw-text) !important;
}

.navbar .navbar-brand {
  font-size: 1rem;
  font-weight: 800;
  text-transform: none;
  color: var(--sw-accent-strong) !important;
}

.navbar .nav-link,
.navbar .navbar-nav > li > a {
  font-size: 0.86rem;
  font-weight: 600;
  text-transform: none;
  border-radius: 6px;
  margin: 6px 4px;
  padding: 8px 14px !important;
  transition: all var(--sw-transition) !important;
}

.navbar .nav-link:hover,
.navbar .navbar-nav > li > a:hover,
.navbar .nav-link:focus,
.navbar .navbar-nav > li > a:focus {
  background: rgba(23, 23, 23, 0.04) !important;
  color: var(--sw-accent) !important;
}

.navbar .active > a,
.navbar .active > .nav-link,
.navbar .nav-item.active > .nav-link {
  background: #ffffff !important;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05) !important;
  color: var(--sw-accent-strong) !important;
  font-weight: 700;
  border-bottom: 2px solid var(--sw-accent-strong) !important;
}

.welcome-workbench-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0 4px;
  color: var(--sw-text-muted);
  font-size: 0.84rem;
}

.card,
.welcome-container .card,
.feature-card,
.pd-pivotal-main-card,
.pd-info-card,
.pd-pivotal-summary-card {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--sw-border) !important;
  border-radius: var(--sw-radius) !important;
  box-shadow: var(--sw-shadow);
  transition: box-shadow var(--sw-transition), transform var(--sw-transition);
}

.card:hover,
.feature-card:hover,
.pd-info-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sw-shadow-raised);
}

.card-header,
.workbench-main-card > .card-header,
.workbench-control-panel__header,
.workbench-control-panel > .card-header {
  background: linear-gradient(180deg, #e5ebf0 0%, #d7e0e7 100%) !important;
  border-bottom: 1px solid var(--sw-border) !important;
  color: var(--sw-text) !important;
  padding: 10px 14px !important;
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.card-header,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.workbench-control-panel__header h4 {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--sw-text) !important;
}

.card-body,
.workbench-control-panel__body,
.workbench-main-card .card-body {
  padding: 16px 18px;
}

.summary-card .card-header {
  background: linear-gradient(180deg, #dce5ec 0%, #d0dbe3 100%) !important;
}

.summary-card-value,
.pd-pivotal-summary-value {
  color: var(--sw-text);
  font-weight: 700;
}

.nav-tabs,
.pd-pivotal-tabs .nav-tabs,
.pd-pivotal-tabs-container .nav-tabs {
  gap: 3px;
  border-bottom: 1px solid var(--sw-border);
  background: linear-gradient(180deg, #edf2f5 0%, #e3e9ee 100%);
  padding: 6px 8px 0;
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.nav-tabs .nav-link,
.pd-pivotal-tabs .nav-tabs .nav-link,
.pd-pivotal-tabs-container .nav-tabs .nav-link {
  border-radius: 4px 4px 0 0;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #e6ecf1 0%, #d9e1e7 100%);
  color: var(--sw-text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 8px 12px;
  border-bottom: none;
}

.tab-content,
.tab-pane,
.nav-panel {
  padding: 0 !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.pd-pivotal-tabs .nav-tabs .nav-link.active,
.pd-pivotal-tabs-container .nav-tabs .nav-link.active {
  background: #ffffff;
  color: #111827;
  border-color: var(--sw-border) var(--sw-border) #ffffff;
  box-shadow: inset 0 2px 0 var(--sw-accent-strong);
  font-weight: 1000 !important;
}

.btn,
.dt-button {
  border-radius: 6px !important;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition: all var(--sw-transition);
}

.btn:hover,
.dt-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary,
.btn-success,
.btn-info {
  background: var(--sw-accent-strong) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(23, 23, 23, 0.2) !important;
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover {
  background: var(--sw-accent) !important;
}

.btn-warning {
  background: #f59e0b !important;
  color: #fff !important;
  border: none !important;
}

.btn-danger {
  background: #ef4444 !important;
  color: #fff !important;
  border: none !important;
}

.btn-secondary,
.btn-outline-secondary,
.dt-button {
  background: #f8fafc !important;
  border: 1px solid var(--sw-border-strong) !important;
  color: var(--sw-text) !important;
}

.form-control,
.selectize-input,
.shiny-input-container input[type="text"],
.shiny-input-container input[type="number"],
.shiny-input-container select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 38px;
  border-radius: 6px !important;
  border: 1px solid var(--sw-border-strong) !important;
  background: #ffffff !important;
  color: var(--sw-text) !important;
  transition: all var(--sw-transition);
}

.form-control:focus,
.selectize-input.focus,
.selectize-input:focus,
.shiny-input-container input:focus,
.shiny-input-container select:focus {
  border-color: var(--sw-accent-strong) !important;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1) !important;
  outline: none;
}

table.dataTable thead th,
table.dataTable thead td,
.pd-param-table thead th,
.pd-explore-table thead th {
  background: linear-gradient(180deg, #e0e7ec 0%, #d4dde5 100%) !important;
  color: var(--sw-text) !important;
  border-bottom: 1px solid var(--sw-border-strong) !important;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

table.dataTable tbody td {
  background: #ffffff;
  color: var(--sw-text);
  border-bottom: 1px solid #dde5eb !important;
  font-size: 0.84rem;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
  background: #f7fafc !important;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
  background: #eef4f8 !important;
}

.welcome-container {
  max-width: 1180px;
}

.hero-section {
  background: linear-gradient(135deg, #041b2d 0%, #0d324d 100%);
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  color: #ffffff;
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  display: block;
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-title {
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--sw-text-muted);
  font-size: 1rem;
  font-weight: 400;
  max-width: 760px;
}

.feature-card {
  padding: 1.35rem;
  text-align: left;
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(180deg, #e5ecf2 0%, #dce4eb 100%);
  color: var(--sw-accent-strong);
  margin-bottom: 1rem;
}

.feature-card:hover .feature-icon-wrapper {
  background: linear-gradient(180deg, #d6e0e8 0%, #cad5de 100%);
  color: var(--sw-accent-strong);
}

.feature-title {
  color: var(--sw-text);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.feature-desc,
.pd-pivotal-intro,
.pd-basic-info-note,
.pd-pivotal-summary-hint,
.dataTables_wrapper,
.dataTables_wrapper .dataTables_info {
  color: var(--sw-text-muted);
}

.workbench-control-panel__header h4 i {
  background: linear-gradient(180deg, #7f95a8 0%, #6b8092 100%);
  box-shadow: none;
  border-radius: 4px;
}

.pd-pivotal-summary-card.is-pass,
.pd-pivotal-summary-card.is-fail,
.pd-pivotal-summary-card.is-pending {
  background: linear-gradient(180deg, #fbfcfd 0%, #f2f5f8 100%);
  border-color: var(--sw-border);
}

.pd-info-icon,
.pd-info-card--trial .pd-info-icon,
.pd-info-card--subject .pd-info-icon,
.pd-info-card--dose .pd-info-icon,
.pd-info-card--time .pd-info-icon {
  border-radius: 4px;
  background: linear-gradient(180deg, #e6edf2 0%, #dbe3ea 100%);
  color: var(--sw-accent-strong);
  box-shadow: none;
}

.log-console {
  background: linear-gradient(180deg, #f4f7fa 0%, #ecf1f5 100%);
  color: var(--sw-text);
  border: 1px solid var(--sw-border);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.log-entry {
  border-bottom-color: #d6e0e8;
}

.log-timestamp {
  color: var(--sw-accent-strong);
}

.pk-control-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%; /* 使用 min-height 以确保即使内容少也能撑满并推到底部 */
  height: auto;
  padding-bottom: 0; /* padding 改为由 action-bar 的 margin/padding 处理 */
  position: relative;
}

.pk-control-header {
  padding-bottom: 2px;
  border-bottom: 1px solid #d4dde5;
}

.pk-control-title {
  margin: 0 0 4px 0;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--sw-text);
}

.pk-control-subtitle {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--sw-text-muted);
}

.pk-control-section {
  padding: 0 0 10px 27px; /* 进一步压缩时间线占位，给右侧控件留空间 */
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  position: relative;
  z-index: 1;
}

.pk-control-section:last-child {
  padding-bottom: 0;
}

.pk-control-step {
  position: absolute;
  left: -1px;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 0 0 4px #fafafa;
}

.pk-control-section--active .pk-control-step {
  border-color: var(--sw-accent-strong);
  background: var(--sw-accent-strong);
  color: #fff;
}

.pk-control-section-title {
  margin: 0 0 4px 0;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--sw-text);
}

.pk-control-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.pk-control-title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pk-control-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c7d2db;
  border-radius: 8px;
  background: linear-gradient(180deg, #fdfefe 0%, #edf3f7 100%);
  color: var(--sw-accent-strong);
  text-decoration: none;
  flex: 0 0 auto;
}

.pk-control-title-icon:hover,
.pk-control-title-icon:focus {
  color: var(--sw-accent-strong);
  text-decoration: none;
  border-color: #9ec6df;
  background: #ffffff;
}

.pk-control-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pk-control-title-actions .pk-import-status-badge {
  margin-right: 2px;
}

.pk-control-title-icon--mapping.needs-mapping {
  border-color: #f59e0b !important;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  color: #92400e !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 1px 4px rgba(245, 158, 11, 0.15);
  animation: pk-mapping-pulse-v2 1.5s ease-in-out infinite;
  position: relative;
  overflow: visible !important;
}

.pk-control-title-icon--mapping.needs-mapping::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #f59e0b;
  border-radius: 50%;
  animation: pk-mapping-halo 1.5s ease-out infinite;
  pointer-events: none;
  z-index: -1;
}

.pk-control-title-icon--mapping.needs-mapping::after {
  content: "\f0a7"; /* 手指指向图标或闪电图标 */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7rem;
  background: #f59e0b;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -7px;
  right: -7px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: pk-mapping-badge-bounce 1s ease-in-out infinite;
}

.pk-control-title-icon--mapping.needs-mapping:hover,
.pk-control-title-icon--mapping.needs-mapping:focus {
  border-color: #d97706;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 2px 8px rgba(245, 158, 11, 0.18);
}

.pk-control-section-note {
  margin: 0 0 8px 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--sw-text-muted);
}

.pk-anomaly-feature-options .control-label,
.pk-anomaly-feature-options .checkbox label {
  font-family: var(--font-scientific);
}

.pk-anomaly-feature-options .checkbox label {
  display: inline-flex;
  align-items: center;
}

.pk-anomaly-feature-options sub {
  position: relative;
  bottom: -0.08em;
  font-size: 0.68em;
  line-height: 0;
  vertical-align: baseline;
}

.pk-import-action-bundle {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.pk-import-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pk-import-upload-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pk-import-upload-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pk-import-file-wrap .form-group {
  margin-bottom: 0 !important;
}

.pk-import-file-wrap > .form-group > label.control-label {
  display: none !important;
}

@keyframes pk-mapping-pulse-v2 {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 1px 4px rgba(245, 158, 11, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.1), 0 3px 12px rgba(245, 158, 11, 0.25);
    transform: scale(1.05);
  }
}

@keyframes pk-mapping-halo {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes pk-mapping-badge-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes pk-mapping-badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.pk-import-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 7px !important;
  background: #ecfdf3 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 999px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 优化上传进度条，使其更加紧凑且符合专业调性 */
.pk-import-action-bundle .progress {
  height: 4px !important;
  margin: 6px 0 2px 0 !important;
  background-color: #e2e8f0 !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.pk-import-action-bundle .progress-bar {
  background-color: #3b82f6 !important;
  line-height: 4px !important;
  font-size: 0 !important; /* 隐藏进度条内的文字，因为条太细了 */
}

.pk-control-section-title-row .pk-control-step {
  /* 已经在 pk-control-step 中定义，这里置空或覆盖 */
  position: absolute;
}

.pk-control-section-title-row .pk-control-section-title {
  margin-bottom: 0;
  font-size: 0.92rem;
  color: #0f172a;
}

.pk-example-preview-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 520px !important;
  padding: 10px 0;
}

.pk-example-preview-note {
  margin: 0 0 8px;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.5;
  background: #f1f5f9;
  padding: 10px 16px;
  border-radius: 8px;
  border-left: 4px solid #94a3b8;
}

.pk-example-preview-table-wrap {
  max-height: 500px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pk-example-preview-table {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.pk-example-preview-table--uniform {
  table-layout: fixed;
}

.pk-example-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #1e293b !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #0f172a;
}

.pk-example-preview-table tbody td {
  padding: 10px 16px !important;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pk-example-preview-table--uniform thead th,
.pk-example-preview-table--uniform tbody td {
  width: 1%;
}

.pk-example-preview-table tbody tr:last-child td {
  border-bottom: none;
}

.pk-example-preview-table tbody tr:hover {
  background: #f8fafc;
}

/* PK CT Mapping Modal - Ultra-Compact 3-Column Style (v7 Actions Fix) */
.pk-ct-mapping-modal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 85vh;
  padding: 2px;
}

/* Force Modal Centering & Fixed Display */
.modal {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.modal-dialog {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: 95vw !important;
}

.modal-content {
  border-radius: 4px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #cbd5e1 !important;
  width: 1000px !important;
}

/* Fixed Mapping Modal Footprint */
.modal-dialog.pk-ct-mapping-dialog,
.pk-ct-mapping-dialog.modal-dialog,
.modal-dialog:has(.pk-ct-mapping-dialog),
.modal-dialog:has(.pk-ct-mapping-modal) {
  width: 1300px !important;
  max-width: 1300px !important;
}

.modal-dialog.pk-ct-mapping-dialog .modal-content,
.modal-content.pk-ct-mapping-dialog,
.modal-dialog .modal-content.pk-ct-mapping-dialog,
.modal-dialog:has(.pk-ct-mapping-dialog) .modal-content,
.modal-dialog:has(.pk-ct-mapping-modal) .modal-content {
  width: 1300px !important;
  max-width: 1300px !important;
  min-height: 85vh !important;
  max-height: 85vh !important;
  overflow: hidden !important;
}

.modal-dialog.pk-ct-mapping-dialog .pk-ct-mapping-modal,
.modal-content.pk-ct-mapping-dialog .pk-ct-mapping-modal,
.modal-dialog:has(.pk-ct-mapping-modal) .pk-ct-mapping-modal {
  min-height: 100%;
  max-height: 100%;
}

.pk-ct-mapping-modal .shiny-input-container,
.pk-ct-mapping-modal .form-group {
  margin-bottom: 0 !important;
}

/* Compact Selection Bar with Actions */
.pk-ct-mapping-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 16px;
  background: #f1f5f9;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.pk-ct-mapping-modal__file,
.pk-ct-mapping-modal__sheet {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pk-ct-mapping-modal__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.pk-ct-mapping-modal__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pk-ct-mapping-modal__value {
  font-size: 0.72rem;
  font-weight: 500;
  color: #1e293b;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-ct-mapping-modal__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1;
}

/* 3-Column Grid Fix */
.pk-ct-mapping-required {
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 4px 4px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-bottom: none;
}

.pk-ct-mapping-required__label {
  font-weight: 800;
  color: #1e293b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.pk-ct-mapping-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 4px;
}

.pk-ct-mapping-field-grid--pk-required-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pd-preprocess-mapping-field-grid--required-6,
.pd-preprocess-mapping-field-grid--pilot-required-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pk-ct-mapping-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 8px; /* Ultra-compressed row padding */
  border: none !important;
}

.pk-ct-mapping-item--span-all {
  grid-column: 1 / -1;
}

.pk-ct-mapping-item--span-2 {
  grid-column: span 2;
}

.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .shiny-input-container,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .form-group,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-control,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-control.multi {
  width: 100% !important;
  max-width: 100% !important;
}

.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-input,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-input.items,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-input.items-not-full,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-input.has-items {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 52px !important;
  padding: 8px 10px !important;
  align-content: flex-start !important;
}

.pk-ct-mapping-item .control-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Narrow & Compact Inputs - Remove White Cursor */
.pk-ct-mapping-item .selectize-control {
  width: 100% !important;
  max-width: 280px !important;
}

.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-all .selectize-control {
  max-width: 100% !important;
}

.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-2,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-2 .shiny-input-container,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-2 .form-group,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-2 .selectize-control,
.pk-ct-mapping-field-grid .pk-ct-mapping-item.pk-ct-mapping-item--span-2 .selectize-control.multi {
  width: 100% !important;
  max-width: 100% !important;
}

.pk-ct-mapping-item .selectize-input {
  border-radius: 4px !important;
  min-height: 28px !important;
  height: auto !important;
  padding: 2px 8px !important;
  font-size: 0.78rem !important;
  background: #ffffff !important;
  box-shadow: none !important;
  border: 1px solid #cbd5e1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
}

.pk-ct-mapping-item .selectize-control.multi .selectize-input > div {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 3px !important;
  padding: 0 6px !important;
  font-size: 0.72rem !important;
  color: #334155 !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}

.pk-ct-mapping-item .selectize-control.multi .selectize-input {
  align-items: flex-start !important;
  position: relative !important;
  padding-bottom: 2px !important;
}

.pk-ct-mapping-item .selectize-control.multi .selectize-input > input,
.pk-ct-mapping-item .selectize-control.multi .selectize-input.items-not-full > input,
.pk-ct-mapping-item .selectize-control.multi .selectize-input.has-items > input {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  line-height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
}


.pk-ct-mapping-item .selectize-input .item {
  line-height: 20px !important;
}

.pk-ct-mapping-item .selectize-input:after {
  right: 6px !important;
}

/* Preview Table Refinement */
.pk-ct-preview-block {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pk-ct-mapping-modal .pk-example-preview-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.pk-ct-mapping-modal .pk-example-preview-table {
  margin-bottom: 0;
}

.pk-ct-mapping-modal .pk-example-preview-table thead th {
  padding: 4px 10px !important;
  font-size: 0.72rem;
  background: #475569 !important;
}

.pk-ct-mapping-modal .pk-example-preview-table tbody td {
  padding: 3px 10px !important;
  font-size: 0.72rem;
}

.pk-ct-mapping-required__label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
}

.pk-ct-mapping-required__note {
  font-size: 0.8rem;
  color: #64748b;
}

.pk-example-preview-empty {
  padding: 16px 18px;
  border: 1px dashed #c0ccd6;
  border-radius: 10px;
  color: var(--sw-text-muted);
  background: #f7fafc;
}

.pk-control-inline-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sw-text);
}

.pk-control-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 12px 10px 10px;
  border-top: 1px solid #d4dde5;
  background: #f8fafc; /* 使用实色背景遮盖轨道线 */
  backdrop-filter: blur(4px);
  box-shadow: 0 -6px 12px rgba(218, 225, 232, 0.72);
  display: flex;
  flex-direction: column;
  gap: 8px; /* 按钮之间增加间距 */
}

.pk-download-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #d4dde5;
  position: relative;
}

.pk-download-panel__title {
  margin: 0;
  color: #334155;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pk-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pk-download-btn {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: normal;
}

.pk-advanced-header {
  margin: 18px 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pk-advanced-header:not(:first-child) {
  border-top: 1px dashed #e2e8f0;
  padding-top: 18px;
  margin-top: 4px;
}

.pk-setting-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: flex-start !important;
  gap: 16px;
  margin-bottom: 12px;
  min-height: 38px;
}

.pk-setting-row--wide-label {
  grid-template-columns: 110px 1fr !important;
}

.pk-setting-row--wide-label .pk-setting-label {
  white-space: nowrap;
}

.pk-desc-params-control .shiny-options-group {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px 8px !important;
  padding-top: 4px;
}

.pk-desc-params-control .checkbox {
  margin: 0 !important;
  padding: 0 !important;
}

.pk-desc-params-control .checkbox label {
  display: flex !important;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem !important;
  color: #334155 !important;
  margin-bottom: 0 !important;
  cursor: pointer;
  line-height: 1.1;
}

.pk-desc-params-control .checkbox input[type="checkbox"] {
  margin-top: 0 !important;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.pk-setting-label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  padding-top: 9px;
}

.pk-setting-control .form-group {
  margin-bottom: 0 !important;
}

.pk-setting-control .shiny-input-container {
  width: 100% !important;
  margin-bottom: 0 !important;
}

/* 统一复选框在行内的高度和位置 */
.pk-setting-row .checkbox {
  margin: 0 !important;
  min-height: auto;
}

.pk-setting-row .checkbox label {
  padding-left: 24px;
  font-size: 0.78rem !important;
  color: #1e293b;
  font-weight: 600;
}

.pk-setting-row .checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.pk-setting-control input:not([type="checkbox"]):not([type="radio"]),
.pk-setting-control select {
  height: 34px !important;
  padding: 6px 10px !important;
  font-size: 0.8rem !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease;
}

/* 修复复选框变形：明确指定尺寸并重置继承的高度 */
.pk-setting-row .checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  cursor: pointer;
  appearance: auto; /* 恢复系统原生渲染或受控样式 */
  flex-shrink: 0;
}

.pk-setting-row .checkbox {
  display: flex;
  align-items: center;
  margin: 0 !important;
  min-height: 34px; /* 与普通输入框高度一致，保证对齐 */
}

.pk-setting-row .checkbox label {
  padding-left: 10px;
  margin-bottom: 0;
  display: flex !important;
  align-items: center;
  font-size: 0.78rem !important;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
}

.pk-setting-control input:focus,
.pk-setting-control select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

.pk-setting-control .selectize-input {
  min-height: 34px !important;
  height: auto !important;
  padding: 4px 8px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

.pk-setting-control .selectize-input.focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.pk-setting-control .selectize-control.multi .selectize-input > div {
  background: #f1f5f9 !important;
  border-radius: 4px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 1px 6px !important;
  font-size: 0.74rem !important;
  color: #475569 !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.pk-setting-control .selectize-control.multi .selectize-input > div.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.pk-advanced-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.pk-advanced-checkbox-group .checkbox {
  margin: 0 !important;
}

.pk-advanced-checkbox-group .checkbox label {
  font-size: 0.78rem !important;
  color: #334155;
  font-weight: 500;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.pk-advanced-checkbox-group .checkbox input[type="checkbox"] {
  margin-top: 3px !important;
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
}

/* PK advanced options use the same focused, centered workflow as Desktop. */
.pk-advanced-settings-launcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbfd 0%, #eef4f8 100%);
}

.pk-advanced-settings-launcher__copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pk-advanced-settings-launcher__copy > i {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #cbdce8;
  border-radius: 8px;
  background: #ffffff;
  color: #2677ad;
}

.pk-advanced-settings-launcher__title {
  color: #1f3445;
  font-size: 0.78rem;
  font-weight: 750;
}

.pk-advanced-settings-launcher__description {
  margin-top: 2px;
  overflow: hidden;
  color: #718092;
  font-size: 0.67rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.pk-advanced-settings-launcher__button.btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #b9cbd8;
  border-radius: 7px;
  background: #ffffff;
  color: #24465f;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(44, 74, 96, 0.06);
}

.pk-advanced-settings-launcher__button.btn:hover,
.pk-advanced-settings-launcher__button.btn:focus-visible {
  border-color: #5d9bc4;
  background: #f5fbff;
  color: #155f91;
}

.pk-advanced-settings-dialog {
  width: min(920px, calc(100vw - 48px));
  max-width: 920px;
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #c9d5de;
  border-radius: 14px;
  background: #ffffff;
  color: #233342;
  box-shadow: 0 28px 70px rgba(15, 35, 50, 0.28);
}

.pk-advanced-settings-dialog--wide {
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
}

.pk-advanced-settings-dialog[open] {
  display: flex;
  flex-direction: column;
}

.pk-advanced-settings-dialog::backdrop {
  background: rgba(24, 38, 50, 0.48);
  backdrop-filter: blur(3px);
}

.pk-advanced-settings-dialog__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 17px;
  border-bottom: 1px solid #dfe6eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pk-advanced-settings-dialog__header h3 {
  margin: 0;
  color: #1d3344;
  font-size: 1.05rem;
  font-weight: 800;
}

.pk-advanced-settings-dialog__header p {
  margin: 5px 0 0;
  color: #718092;
  font-size: 0.76rem;
}

.pk-advanced-settings-dialog__close {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6a7886;
  font-size: 1.4rem;
  line-height: 1;
}

.pk-advanced-settings-dialog__close:hover,
.pk-advanced-settings-dialog__close:focus-visible {
  background: #edf2f6;
  color: #253b4d;
}

.pk-advanced-settings-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px;
  overflow: auto;
  background: #f5f8fa;
}

.pk-advanced-settings-dialog__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.pk-advanced-settings-dialog__grid--single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.pk-advanced-settings-dialog__column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.pk-visual-settings-dialog__content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.pk-visual-settings-dialog__content > .pk-plot-options-note {
  grid-column: 1 / -1;
  margin: 0;
}

.pk-advanced-settings-dialog__section {
  padding: 16px;
  border: 1px solid #dce5eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(35, 60, 78, 0.04);
}

.pk-advanced-settings-dialog__section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e6edf2;
}

.pk-advanced-settings-dialog__section-heading > i {
  margin-top: 1px;
  color: #2c7cad;
  font-size: 0.82rem;
}

.pk-advanced-settings-dialog__section-heading h4 {
  margin: 0;
  color: #294154;
  font-size: 0.84rem;
  font-weight: 800;
}

.pk-advanced-settings-dialog__section-heading p {
  margin: 3px 0 0;
  color: #7b8997;
  font-size: 0.68rem;
  line-height: 1.4;
}

.pk-advanced-settings-dialog .pk-setting-row {
  grid-template-columns: 112px minmax(0, 1fr);
  margin-bottom: 10px;
}

.pk-advanced-settings-dialog .pk-setting-row:last-child {
  margin-bottom: 0;
}

.pk-advanced-settings-dialog .pk-desc-params-control .shiny-options-group {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.pk-advanced-settings-dialog__footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 24px;
  border-top: 1px solid #dfe6eb;
  background: #ffffff;
}

.pk-advanced-settings-dialog__footer .btn {
  min-width: 104px;
}

@media (max-width: 760px) {
  .pk-advanced-settings-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .pk-advanced-settings-dialog__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pk-visual-settings-dialog__content {
    grid-template-columns: minmax(0, 1fr);
  }

  .pk-advanced-settings-dialog__header,
  .pk-advanced-settings-dialog__body,
  .pk-advanced-settings-dialog__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.pk-control-shell .accordion {
  --bs-accordion-border-radius: 4px;
  --bs-accordion-border-color: #cfd8e0;
}

.pk-control-shell .accordion-button {
  padding: 8px 10px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sw-text);
  background: linear-gradient(180deg, #eef3f6 0%, #e4ebf1 100%);
}

.pk-control-shell .accordion-button:not(.collapsed) {
  color: var(--sw-text);
  background: linear-gradient(180deg, #e7edf2 0%, #dfe7ee 100%);
  box-shadow: inset 0 -1px 0 rgba(143, 156, 168, 0.18);
}

.pk-control-shell .accordion-body {
  padding: 10px;
  background: #f9fbfc;
}

.pk-plot-options-note {
  margin: 0 0 10px 0;
  padding: 8px 10px;
  border: 1px solid #d9e2ea;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  line-height: 1.35;
}

.pk-visual-settings-dialog__content .pk-advanced-settings-dialog__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pk-visual-settings-dialog__content .pk-advanced-settings-dialog__section-heading {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.pk-visual-settings-dialog__content .form-group {
  margin-bottom: 0;
}

.pk-visual-settings-dialog__content label {
  margin-bottom: 3px;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.pk-visual-settings-dialog__content .form-control,
.pk-visual-settings-dialog__content .selectize-input {
  min-height: 30px;
  padding: 4px 7px;
  border-color: #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.76rem;
}

.pk-visual-settings-dialog__content .form-control:focus,
.pk-visual-settings-dialog__content .selectize-input.focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.pk-advanced-settings-dialog .pk-setting-row.pk-setting-row--boundary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pk-advanced-settings-dialog .pk-setting-row.pk-setting-row--boundary .pk-setting-label {
  width: auto;
  max-width: none;
}

.pk-plot-options-grid {
  display: grid;
  gap: 8px;
}

.pk-plot-options-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pk-plot-options-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pk-plot-options-grid .form-group {
  margin-bottom: 0;
}

.pk-plot-options-grid label {
  margin-bottom: 3px;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.pk-plot-options-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.pk-plot-options-switches .checkbox {
  min-height: 28px;
  margin: 0 !important;
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.pk-plot-options-switches .checkbox label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

.pk-plot-options-switches .checkbox input[type="checkbox"] {
  margin: 0 !important;
}

@media (max-width: 1280px) {
  .pk-plot-options-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pk-plot-options-grid--two,
  .pk-plot-options-grid--three,
  .pk-plot-options-switches {
    grid-template-columns: 1fr;
  }
}

/* Workbench density tuning */
.bslib-sidebar-layout {
  column-gap: 0 !important;
  row-gap: 0 !important;
  align-items: stretch;
  padding: 0 !important;
}

.bslib-sidebar-layout > .sidebar,
.bslib-sidebar-layout > [class*="main"],
.bslib-sidebar-layout > .html-fill-container,
.bslib-sidebar-layout > .html-fill-item {
  margin-bottom: 0 !important;
  height: 100%;
}

.bslib-sidebar-layout .bslib-mb-spacing {
  margin-bottom: 8px !important;
}

.bslib-sidebar-layout > .sidebar,
.bslib-sidebar-layout .sidebar-panel,
.bslib-sidebar-layout .sidebar {
  padding: 0 !important;
}

.bslib-sidebar-layout .sidebar-content.bslib-gap-spacing,
.bslib-sidebar-layout .sidebar-content {
  height: 100%;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
  background: linear-gradient(180deg, var(--sw-panel-strong) 0%, var(--sw-panel) 100%) !important;
  border-radius: var(--sw-radius) !important;
  border: 1px solid var(--sw-border) !important;
  margin: 0 !important;
  overflow: hidden;
}

.bslib-sidebar-layout .sidebar-title {
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  font-size: 0.82rem;
  line-height: 1.2;
}

.bslib-sidebar-layout .collapse-toggle {
  top: 8px;
  right: 8px;
}

.bslib-sidebar-layout .sidebar h2,
.bslib-sidebar-layout .sidebar h3,
.bslib-sidebar-layout .sidebar h4,
.bslib-sidebar-layout .sidebar h5,
.bslib-sidebar-layout .sidebar p {
  margin-bottom: 8px;
}

.bslib-sidebar-layout .sidebar hr {
  margin: 10px 0 !important;
}

.bslib-sidebar-layout .sidebar .shiny-input-container,
.bslib-sidebar-layout .sidebar .form-group,
.bslib-sidebar-layout .sidebar .radio,
.bslib-sidebar-layout .sidebar .checkbox,
.bslib-sidebar-layout .sidebar .selectize-control,
.bslib-sidebar-layout .sidebar .input-group,
.bslib-sidebar-layout .sidebar .form-control {
  margin-bottom: 8px !important;
}

.bslib-sidebar-layout .sidebar .control-label,
.bslib-sidebar-layout .sidebar .shiny-input-radiogroup > label,
.bslib-sidebar-layout .sidebar .shiny-input-checkboxgroup > label {
  margin-bottom: 4px !important;
  font-size: 0.84rem;
}

.bslib-sidebar-layout .sidebar .radio label,
.bslib-sidebar-layout .sidebar .checkbox label {
  line-height: 1.25;
}

.bslib-sidebar-layout .sidebar .btn,
.bslib-sidebar-layout .sidebar .dt-button {
  min-height: 36px !important;
  padding: 7px 10px !important;
}

.bslib-sidebar-layout .sidebar .btn-lg {
  min-height: 40px !important;
  padding: 8px 12px !important;
}

.bslib-sidebar-layout .sidebar .form-control,
.bslib-sidebar-layout .sidebar .selectize-input,
.bslib-sidebar-layout .sidebar .shiny-input-container input[type="text"],
.bslib-sidebar-layout .sidebar .shiny-input-container input[type="number"],
.bslib-sidebar-layout .sidebar .shiny-input-container select {
  min-height: 34px !important;
}

.bslib-sidebar-layout .sidebar .input-group-btn > .btn,
.bslib-sidebar-layout .sidebar .input-group-btn > .btn-file {
  min-height: 34px !important;
}

.bslib-sidebar-layout .sidebar .btn-block + .btn-block {
  margin-top: 6px;
}

.bslib-sidebar-layout > .main,
.bslib-sidebar-layout > [class*="main"],
.bslib-sidebar-layout > .html-fill-item:not(.sidebar),
.bslib-sidebar-layout > .html-fill-container:not(.sidebar) {
  padding-left: 0 !important;
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

.bslib-sidebar-layout > .main .card,
.bslib-sidebar-layout > [class*="main"] .card,
.bslib-sidebar-layout > .html-fill-item:not(.sidebar) .card,
.bslib-sidebar-layout > .html-fill-container:not(.sidebar) .card {
  margin-bottom: 0 !important;
}

.bslib-sidebar-layout > .main > .card:first-child,
.bslib-sidebar-layout > [class*="main"] > .card:first-child,
.bslib-sidebar-layout > .html-fill-item:not(.sidebar) > .card:first-child,
.bslib-sidebar-layout > .html-fill-container:not(.sidebar) > .card:first-child {
  margin-top: 0 !important;
}

.pk-results-card {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pk-results-card .card-body {
  padding: 0;
  flex: 1 1 auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pk-results-card .nav-tabs {
  padding: 8px 12px 0;
  border-bottom: 1px solid #d6e0e8;
  background: linear-gradient(180deg, #f5f8fb 0%, #edf2f6 100%);
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.pk-results-card .tab-content {
  padding: 12px;
  flex: 1 1 auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pk-results-card .tab-pane.active {
  flex: 1 1 auto;
  min-height: 0;
}

.pk-results-card .dataTables_wrapper {
  height: 100%;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.pk-results-card .dataTables_wrapper > table.dataTable {
  flex: 1 1 auto;
}



.pk-visual-results-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pk-visual-results-pane-shell--mean {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding-top: 4px;
}

.pk-visual-plot-box {
  display: flex;
  justify-content: center;
  margin-inline: auto;
}

.pk-visual-plot-box--mean {
  flex: 0 0 auto;
  height: auto;
  padding-top: 12px;
}

.pk-visual-plot-box--report {
  width: min(100%, 760px);
}

.pk-visual-plot-box--report-wide {
  width: min(100%, 770px);
}

.pk-visual-plot-box .shiny-plot-output,
.pk-visual-plot-box .shiny-plot-output-container {
  max-width: 100%;
}

.pk-visual-plot-box--mean > .shiny-spinner-output-container,
.pk-visual-plot-box--mean > .shiny-plot-output {
  flex: 0 0 auto;
  height: 420px;
  margin-inline: auto;
}

.nonclinical-pk-individual-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 280px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.nonclinical-pk-individual-toolbar__label {
  flex: 0 0 auto;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.nonclinical-pk-individual-toolbar__control {
  flex: 0 1 210px;
  min-width: 0;
}

.nonclinical-pk-individual-toolbar__control .shiny-input-container,
.nonclinical-pk-individual-toolbar__control .form-group {
  width: 100% !important;
  margin: 0 !important;
}

.nonclinical-pk-individual-toolbar__control .selectize-control {
  margin-bottom: 0;
}

.nonclinical-pk-plot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 14px 4px;
}

.nonclinical-pk-plot-toolbar--end {
  justify-content: flex-end;
}

.nonclinical-pk-plot-toolbar .pk-download-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 180px;
  margin: 0;
}

.nonclinical-pk-summary-shell {
  width: 100%;
}

.nonclinical-pk-summary-shell--table-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.nonclinical-pk-summary-shell--table-footer > .shiny-spinner-output-container,
.nonclinical-pk-summary-shell--table-footer > .nonclinical-pk-summary-download--table-footer {
  grid-area: 1 / 1;
}

.nonclinical-pk-summary-download {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 4px;
  padding: 0 8px 6px;
}

.nonclinical-pk-summary-download--table-footer {
  align-self: end;
  justify-self: start;
  justify-content: flex-start;
  width: auto;
  margin: 0;
  padding: 15px 8px 0;
  position: relative;
  z-index: 2;
}

.nonclinical-pk-summary-download .pk-download-btn {
  width: auto;
  min-width: 180px;
  margin: 0;
}

@media (max-width: 640px) {
  .nonclinical-pk-plot-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nonclinical-pk-plot-toolbar--end {
    align-items: flex-end;
  }

  .nonclinical-pk-individual-toolbar {
    width: 100%;
  }
}



.pk-be-boundary-input-shell {
  padding: 8px 0 4px;
}

.pd-pivotal-judge-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-pivotal-judge-group {
  padding: 2px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-pivotal-judge-group + .pd-pivotal-judge-group {
  padding-top: 10px;
  border-top: 1px solid #e2e9ef;
}

.pd-pivotal-judge-card__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.pd-pivotal-judge-card__title {
  color: #1f3144;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
}

.pd-pivotal-judge-inline-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.pd-pivotal-judge-inline-field__prefix {
  min-width: 78px;
  padding: 0 2px;
  color: #42566b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pd-pivotal-judge-inline-field .control-label {
  display: none !important;
}

.pd-pivotal-judge-inline-field .form-control {
  min-height: 40px;
  height: 40px;
  border-radius: 10px !important;
  border: 1px solid #d7e0e8 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  color: #1f2937 !important;
  transition: all 0.2s ease;
}

.pd-pivotal-judge-inline-field .form-control:hover {
  border-color: #c2d0dd !important;
  background: #fbfdff !important;
}

.pd-pivotal-judge-inline-field .form-control:focus {
  border-color: var(--sw-accent-strong) !important;
  box-shadow: 0 0 0 4px rgba(var(--sw-accent-rgb, 59, 130, 246), 0.12) !important;
}

.pd-pivotal-judge-group .pk-be-boundary-input-shell {
  padding: 2px 0 0;
}

.pd-pivotal-judge-group .pk-be-boundary-input-grid {
  gap: 10px;
}

.pd-pivotal-judge-group .pk-be-boundary-input-field__label {
  color: #64748b;
  font-size: 0.72rem;
}

.pd-pivotal-judge-group .pk-be-boundary-input-field__control .form-control {
  min-height: 40px;
  height: 40px;
  border-radius: 10px !important;
  border-color: #d7e0e8 !important;
  box-shadow: none !important;
}

.pd-pivotal-judge-group .pk-be-boundary-input-field__unit {
  right: 12px;
}

















.pk-be-boundary-input-grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pk-be-boundary-input-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pk-be-boundary-input-field__label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 2px;
}

.pk-be-boundary-input-field__control {
  position: relative;
  transition: transform 0.2s ease;
}

.pk-be-boundary-input-field__control:focus-within {
  transform: translateY(-1px);
}

.pk-be-boundary-input-field__control .shiny-input-container,
.pk-be-boundary-input-field__control .form-group {
  margin-bottom: 0 !important;
}

.pk-be-boundary-input-field__control .control-label {
  display: none !important;
}

.pk-be-boundary-input-field__control .form-control {
  min-height: 42px;
  height: 42px;
  padding: 0 35px 0 14px;
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  color: #1e293b !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pk-be-boundary-input-field__control .form-control:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.pk-be-boundary-input-field__control .form-control:focus {
  border-color: var(--sw-accent-strong) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(var(--sw-accent-rgb, 59, 130, 246), 0.12) !important;
}

.pk-be-boundary-input-field__unit {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
  transition: color 0.2s ease;
}

.pk-be-boundary-input-field__control:focus-within .pk-be-boundary-input-field__unit {
  color: var(--sw-accent-strong);
}

/* 新增：连接器样式 */
.pk-be-boundary-range-separator {
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
}

.pk-be-boundary-range-separator::before,
.pk-be-boundary-range-separator::after {
  content: "";
  height: 1.5px;
  width: 8px;
  background: #e2e8f0;
  margin: 0 4px;
}

@media (max-width: 991px) {
  .pk-be-boundary-input-grid {
    grid-template-columns: 1fr;
  }
}

.welcome-workbench {
  min-height: calc(100vh - 170px);
  padding: 0 !important;
}

.workbench-control-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - 210px);
  border-radius: var(--sw-radius);
  background: transparent;
}

.workbench-control-panel__header {
  padding-bottom: 6px;
  border-bottom: 1px solid #d4dde5;
}

.workbench-control-panel__header h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--sw-text);
}

.workbench-control-panel__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workbench-control-section {
  padding: 10px 10px 8px;
  border: 1px solid #d7dfe6;
  border-radius: 4px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
}

.workbench-control-section h5 {
  margin: 0 0 6px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--sw-text);
}

.workbench-control-section p,
.workbench-control-section li {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--sw-text-muted);
}

.workbench-main-card {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-bottom-left-radius: var(--sw-radius) !important;
  border-bottom-right-radius: var(--sw-radius) !important;
}

.workbench-main-card .card-body {
  padding: 0;
}

.workbench-main-card .nav-tabs {
  padding: 8px 12px 0;
  border-bottom: 1px solid #d6e0e8;
  background: linear-gradient(180deg, #f5f8fb 0%, #edf2f6 100%);
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.workbench-main-card .tab-content {
  padding: 12px;
}

.workbench-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workbench-main-card .tab-content,
.workbench-main-card .tab-pane.active,
.workbench-main-card .tab-pane.show.active {
  height: 100%;
}

.workbench-tab-pane--about {
  height: 100%;
  min-height: 0;
}

.pk-analysis-main {
  gap: 8px;
  padding: 4px 2px;
}

.pk-analysis-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pk-analysis-section + .pk-analysis-section {
  padding-top: 8px;
}

.pk-analysis-section > .workbench-tab-pane {
  gap: 4px;
}

.pk-analysis-section--be .dataTables_wrapper,
.pk-analysis-section--compare .dataTables_wrapper {
  width: 100%;
}

.pk-analysis-section--be table.dataTable,
.pk-analysis-section--compare table.dataTable {
  width: 100% !important;
  table-layout: fixed !important;
}

.pk-analysis-section--be table.dataTable th,
.pk-analysis-section--be table.dataTable td,
.pk-analysis-section--compare table.dataTable th,
.pk-analysis-section--compare table.dataTable td {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.pk-analysis-section__title {
  color: #44576a;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pk-report-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.pk-report-preview-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 0;
  text-align: center;
}

.pk-report-preview-meta__title {
  color: #1f2c3a;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.pk-report-preview-meta__note {
  color: #5d7288;
  font-size: 0.92rem;
  line-height: 1.45;
}

#pk_report_expand_factors .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 8px;
}

#pk_report_expand_factors .checkbox {
  margin: 0;
}

#pk_report_expand_factors .checkbox label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
  font-weight: 700;
  color: #31465b;
  transition: all 0.2s ease;
}

#pk_report_expand_factors .checkbox label:hover {
  border-color: #9db7d5;
  background: #f7fbff;
}

#pk_report_expand_factors input[type="checkbox"] {
  margin-top: 0;
}

[id$="pivotal_expand_factors"] .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 8px;
}

[id$="pivotal_expand_factors"] .checkbox {
  margin: 0;
}

[id$="pivotal_expand_factors"] .checkbox label {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
  font-weight: 700;
  color: #31465b;
  transition: all 0.2s ease;
}

[id$="pivotal_expand_factors"] .checkbox label:hover {
  border-color: #9db7d5;
  background: #f7fbff;
}

[id$="pivotal_expand_factors"] input[type="checkbox"] {
  margin-top: 0;
}

.pk-report-expand-preview-shell .nav-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-bottom: none;
  background: #edf4fb;
  border: 1px solid #d9e5f2;
  border-radius: 14px;
  margin-bottom: 10px;
}

.pk-report-expand-preview-shell .nav-tabs > li {
  float: none;
  margin-bottom: 0;
}

.pk-report-expand-preview-shell .nav-tabs > li > a {
  margin-right: 0;
  border: none !important;
  border-radius: 10px;
  color: #5f7387;
  font-weight: 700;
  padding: 10px 18px;
  background: transparent;
}

.pk-report-expand-preview-shell .nav-tabs > li.active > a,
.pk-report-expand-preview-shell .nav-tabs > li.active > a:focus,
.pk-report-expand-preview-shell .nav-tabs > li.active > a:hover {
  color: #17324d;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(27, 73, 124, 0.12);
}

.pk-report-col-head {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.2;
}

.pk-report-col-head__label {
  font-weight: 700;
}

.pk-report-col-head__unit {
  color: #6c7f92;
  font-size: 0.86em;
  font-weight: 500;
}

.pk-report-preview-panel .dataTables_wrapper,
.pk-report-preview-panel .dataTables_scroll,
.pk-report-preview-panel .dataTables_scrollHead,
.pk-report-preview-panel .dataTables_scrollHeadInner,
.pk-report-preview-panel .dataTables_scrollBody {
  width: 100% !important;
}

.pk-report-preview-panel table.dataTable {
  min-width: 100% !important;
  width: 100% !important;
  table-layout: auto !important;
}

.pk-report-preview-panel--pkps table.dataTable {
  table-layout: fixed !important;
}

.pk-report-preview-panel--compact table.dataTable {
  table-layout: fixed !important;
}

.pk-report-preview-panel--pkps .dataTables_scrollBody {
  overflow-x: hidden !important;
}

.pk-report-preview-panel table.dataTable th,
.pk-report-preview-panel table.dataTable td {
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.pk-report-preview-panel--pkps table.dataTable th:first-child,
.pk-report-preview-panel--pkps table.dataTable td:first-child {
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  text-align: center !important;
}

.pk-report-preview-panel--pkps table.dataTable th:nth-child(n+2):nth-child(-n+4),
.pk-report-preview-panel--pkps table.dataTable td:nth-child(n+2):nth-child(-n+4) {
  width: 35px !important;
  min-width: 35px !important;
  max-width: 35px !important;
}

.pk-report-preview-panel--pkps table.dataTable td.pk-report-summary-label {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  text-align: center !important;
  vertical-align: middle !important;
  font-weight: 700;
}

.pk-report-preview-panel--compact table.dataTable th:first-child,
.pk-report-preview-panel--compact table.dataTable td:first-child,
.pk-report-preview-panel--compact table.dataTable th:nth-child(n+2):nth-child(-n+4),
.pk-report-preview-panel--compact table.dataTable td:nth-child(n+2):nth-child(-n+4) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.pk-report-preview-panel .dataTables_info {
  display: none !important;
}

.pk-results-card .dataTables_info {
  display: none !important;
}

.pk-results-card .dataTables_paginate {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding: 4px 2px 0;
}

.pk-results-card .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  margin: 0 4px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
}

.pk-results-card .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.pk-results-card .dataTables_paginate .paginate_button.current,
.pk-results-card .dataTables_paginate .paginate_button.current:hover {
  background: #0ea5e9 !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25) !important;
}

.pk-results-card .dataTables_paginate .paginate_button.disabled,
.pk-results-card .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent !important;
  color: #94a3b8 !important;
}

.pk-results-card .dataTables_paginate .previous,
.pk-results-card .dataTables_paginate .next {
  width: auto !important;
  min-width: 28px !important;
  font-size: 1.1rem !important;
  line-height: 1;
}

.pk-report-preview-panel .dataTables_paginate {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding: 4px 2px 0;
}

.pk-report-preview-panel .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  margin: 0 4px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
}

.pk-report-preview-panel .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.pk-report-preview-panel .dataTables_paginate .paginate_button.current,
.pk-report-preview-panel .dataTables_paginate .paginate_button.current:hover {
  background: #0ea5e9 !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25) !important;
}

.pk-report-preview-panel .dataTables_paginate .paginate_button.disabled,
.pk-report-preview-panel .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent !important;
  color: #94a3b8 !important;
}

.pk-report-preview-panel .dataTables_paginate .previous,
.pk-report-preview-panel .dataTables_paginate .next {
  width: auto !important;
  min-width: 28px !important;
  font-size: 1.1rem !important; /* 使‹ ›符号更显眼 */
  line-height: 1;
}

.workbench-empty-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
  border: 1px dashed #ced8e1;
  border-radius: 4px;
}

.workbench-empty-state h3,
.workbench-empty-state h4 {
  margin: 0;
  color: var(--sw-text);
}

.workbench-empty-state p {
  margin: 0;
  color: var(--sw-text-muted);
}

.analysis-console-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bslib-sidebar-layout .bslib-grid,
.bslib-sidebar-layout .layout-columns {
  column-gap: 2px !important;
  row-gap: 2px !important;
}

.bslib-sidebar-layout .bslib-grid > *,
.bslib-sidebar-layout .layout-columns > * {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.bslib-sidebar-layout .pk-workbench-sidebar .sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 41px;
  margin: -10px -12px 10px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #cfd8e0;
  border-top-left-radius: var(--sw-radius);
  border-top-right-radius: var(--sw-radius);
  background: linear-gradient(180deg, #dfe6ec 0%, #d6dee5 100%);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-transform: none;
  color: var(--sw-text);
}


.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .collapse-toggle {
  display: none !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) {
  height: calc(100vh - 132px) !important;
  min-height: calc(100vh - 132px) !important;
  max-height: calc(100vh - 132px) !important;
  overflow: hidden;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .sidebar,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .main,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) > [class*="main"],
.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .html-fill-container,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .html-fill-item {
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
}

.bslib-sidebar-layout .sidebar-content {
  padding: 0 !important;
}

.bslib-sidebar-layout .sidebar-content:has(.pk-control-shell),
.bslib-sidebar-layout .sidebar-content:has(.pd-workbench-control-shell),
.bslib-sidebar-layout .sidebar-content:has(.ivpt-workbench-control-shell) {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
}

.pd-workbench-control-shell,
.ivpt-workbench-control-shell {
  min-height: 100%;
}

.bslib-sidebar-layout .sidebar-content:has(.pk-control-shell) .pk-control-shell,
.bslib-sidebar-layout .sidebar-content:has(.pd-workbench-control-shell) .pd-workbench-control-shell,
.bslib-sidebar-layout .sidebar-content:has(.ivpt-workbench-control-shell) .pk-control-shell,
.bslib-sidebar-layout .sidebar-content:has(.ivpt-workbench-control-shell) .ivpt-workbench-control-shell {
  flex: 1 1 auto;
  min-height: 100%;
}

.bslib-sidebar-layout .sidebar-content:has(.pd-preprocess-control-shell) {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  padding-bottom: 12px !important;
}

.bslib-sidebar-layout .sidebar-content:has(.pd-preprocess-control-shell) .pd-preprocess-control-shell {
  flex: 1 1 auto;
  min-height: 100%;
}

.pd-workbench-control-shell,
.pd-preprocess-control-shell {
  gap: 12px;
  padding: 16px 0 0; /* 顶部留白，底部由 action-bar 处理 */
}

.pd-preprocess-control-shell .pk-control-section,
.pd-preprocess-control-shell .pk-control-source-actions,
.pd-preprocess-control-shell .pk-control-inline-group,
.pd-preprocess-control-shell .pk-control-advanced {
  width: 100%;
}

.pd-workbench-control-section > .pk-control-section-title-row {
  margin-bottom: 4px;
}

.pd-workbench-control-section > .pk-control-section-title-row .pk-control-step {
  min-width: 24px;
  min-height: 24px;
  margin-bottom: 0;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.pd-workbench-control-section > .pk-control-section-title-row .pk-control-section-title {
  margin-bottom: 0;
}

.pd-preprocess-trial-tabs .shiny-input-radiogroup,
.pk-data-type-tabs .shiny-input-radiogroup {
  margin-bottom: 0 !important;
}

.pd-preprocess-trial-tabs .shiny-options-group,
.pk-data-type-tabs .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.pd-preprocess-trial-tabs .radio-inline,
.pk-data-type-tabs .radio-inline {
  margin: 0 !important;
  padding: 11px 15px !important;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  border: 1px solid #d2dde7;
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  color: #233243;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.pd-preprocess-trial-tabs .radio-inline + .radio-inline,
.pk-data-type-tabs .radio-inline + .radio-inline {
  margin-left: 0 !important;
}

.pd-preprocess-trial-tabs .radio-inline span,
.pk-data-type-tabs .radio-inline span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.pd-preprocess-trial-tabs .radio-inline span::after,
.pk-data-type-tabs .radio-inline span::after {
  content: "";
  order: -1;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #b3c2d1;
  transition: all 0.18s ease;
}

.pd-preprocess-trial-tabs .radio-inline:hover,
.pk-data-type-tabs .radio-inline:hover {
  color: #152334;
  border-color: #b7cddd;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 8px 18px rgba(128, 149, 169, 0.1);
}

.pd-preprocess-trial-tabs .radio-inline:has(input:checked),
.pk-data-type-tabs .radio-inline:has(input:checked) {
  border-color: #2890d8;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9fe 100%);
  box-shadow: 0 12px 24px rgba(40, 144, 216, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.94);
  color: var(--sw-text);
}

.pd-preprocess-trial-tabs .radio-inline:has(input:checked) span::after,
.pk-data-type-tabs .radio-inline:has(input:checked) span::after {
  background: #ffffff;
  box-shadow: inset 0 0 0 7px #1480cf, 0 0 0 2px rgba(20, 128, 207, 0.14);
}

.pd-preprocess-trial-tabs .radio-inline:has(input:checked)::before,
.pk-data-type-tabs .radio-inline:has(input:checked)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(20, 128, 207, 0.15);
  pointer-events: none;
}

.pd-preprocess-trial-tabs input[type="radio"],
.pk-data-type-tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-preprocess-advanced-panel .accordion {
  --bs-accordion-border-radius: 10px;
  --bs-accordion-border-color: #d8e2ea;
}

.pd-preprocess-advanced-panel .accordion-item {
  border: 1px solid #d8e2ea;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafcfd 0%, #f5f8fb 100%);
  box-shadow: none;
}

.pd-preprocess-advanced-panel .accordion-button {
  padding: 8px 11px;
  background: transparent;
  color: #465565;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: none;
}

.pd-preprocess-advanced-panel .accordion-button:not(.collapsed) {
  background: transparent;
  color: var(--sw-text);
}

.pd-preprocess-advanced-panel .accordion-body {
  padding: 4px 10px 6px;
  background: transparent;
  border-top: 1px solid #e2e9ef;
}

.pd-preprocess-advanced-fields {
  gap: 0;
}

.pd-preprocess-filter-summary {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d9e2ea;
  border-radius: 7px;
  background: linear-gradient(180deg, #fdfefe 0%, #f5f8fb 100%);
  color: #647487;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pd-preprocess-filter-summary > span {
  display: inline-flex;
  align-items: center;
}

.pd-preprocess-filter-summary:empty,
.pd-preprocess-filter-summary:has(> span:empty) {
  display: none;
}

.pd-preprocess-filter-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff8ea;
  border: 1px solid #f2dfb0;
  color: #8c6413;
  font-size: 0.76rem;
  line-height: 1.35;
}

.pd-preprocess-advanced-fields .form-group {
  margin-bottom: 0 !important;
}

.pd-preprocess-advanced-fields .form-group + .form-group {
  margin-top: 4px !important;
}

.pd-preprocess-advanced-fields .control-label {
  margin-bottom: 1px !important;
  font-size: 0.66rem !important;
  font-weight: 700;
  color: #6a7a89;
}

.pd-preprocess-advanced-fields .selectize-control,
.pd-preprocess-advanced-fields .selectize-input,
.pd-preprocess-advanced-fields .form-control {
  box-shadow: none !important;
}

.pd-preprocess-advanced-fields .selectize-input,
.pd-preprocess-advanced-fields .form-control {
  min-height: 34px !important;
  height: auto !important;
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
}

.pd-preprocess-advanced-fields .selectize-control {
  margin-bottom: 0 !important;
}

.pd-preprocess-advanced-fields .selectize-input {
  padding: 3px 7px !important;
  border-radius: 7px !important;
}


.pd-preprocess-advanced-fields .selectize-input.items-not-full > input,
.pd-preprocess-advanced-fields .selectize-input.has-items > input {
  width: 1px !important;
}

.pd-preprocess-sheet-slot {
  gap: 6px !important;
}

.pd-preprocess-sheet-slot > .shiny-html-output {
  width: 100%;
}

.pd-preprocess-sheet-slot .form-group {
  margin-bottom: 0 !important;
}

.pd-preprocess-sheet-slot .control-label {
  margin-bottom: 4px !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  color: #6a7a89;
}

.pd-preprocess-sheet-note {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px dashed #cfdae4;
  border-radius: 8px;
  background: #f7fafc;
  color: #718194;
  font-size: 0.74rem;
  line-height: 1.35;
}

.pd-preprocess-sheet-note--warning {
  border-color: #e9cf94;
  background: #fff9eb;
  color: #8c6413;
}

.pd-preprocess-control-shell .pk-control-source-actions .form-group,
.pd-preprocess-control-shell .pk-control-source-actions .shiny-input-container {
  margin-bottom: 0 !important;
}

.pd-preprocess-control-shell .pk-control-source-actions .shiny-file-input-progress {
  margin-top: 6px;
  margin-bottom: 0;
}

.pd-preprocess-control-shell .pk-control-source-actions .input-group {
  margin-bottom: 0;
}

.bslib-sidebar-layout .pd-workbench-sidebar + .sidebar-content,
.bslib-sidebar-layout .sidebar.pd-workbench-sidebar .sidebar-content,
.bslib-sidebar-layout .sidebar:has(.pd-workbench-control-shell) .sidebar-content,
.bslib-sidebar-layout .sidebar-content:has(.pd-workbench-control-shell) {
  gap: 10px !important;
  padding-bottom: 0 !important;
}

.pd-workbench-control-shell .pk-control-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 8px 0 0;
  border-top: 1px solid #d4dde5;
  background: linear-gradient(180deg, rgba(244, 247, 250, 0.82) 0%, rgba(239, 243, 246, 0.98) 100%);
  backdrop-filter: blur(4px);
  box-shadow: 0 -6px 12px rgba(218, 225, 232, 0.72);
}

.pd-preprocess-action-bar {
  gap: 8px;
}

.pd-preprocess-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pd-preprocess-import-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.pd-workbench-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden; /* 禁止横向滚动 */
}

/* 修正 Bootstrap fluidRow 负 margin 在 pd-workbench-pane 内造成的横向溢出 */
.pd-workbench-pane > .row,
.pd-workbench-pane .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pd-preprocess-plot-shell {
  position: relative;
  padding: 22px 18px 16px;
  border: 1px solid #c8d1d9;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.pd-preprocess-plot-shell:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07), 0 0 1px rgba(0, 0, 0, 0.08);
}

.pd-preprocess-export-panel {
  display: grid;
  gap: 12px;
}

.pd-preprocess-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pd-preprocess-export-grid .btn {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 600;
}

.pd-preprocess-plot-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  border-radius: 8px 8px 0 0;
}

.pd-preprocess-plot-shell--individual {
  background: #ffffff;
  border-color: #c0cad3;
}

.pd-preprocess-plot-shell--individual::before {
  background: linear-gradient(90deg, #2B6A99, #3D9EA3);
}

.pd-preprocess-plot-shell--mean {
  background: #ffffff;
  border-color: #c0cad3;
}

.pd-preprocess-plot-shell--mean::before {
  background: linear-gradient(90deg, #3D9EA3, #3D8B6E);
}

.pd-preprocess-plot-shell > .shiny-plot-output,
.pd-preprocess-plot-shell > .shiny-spinner-output-container {
  position: relative;
  z-index: 1;
}

.pd-preprocess-plot-shell .shiny-plot-output {
  border-radius: 4px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .card-body,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .tab-content,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .tab-pane.active,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .workbench-tab-pane,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .pd-workbench-pane {
  height: 100%;
  min-height: 0;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .tab-content,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .workbench-tab-pane,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card .pd-workbench-pane {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

@media (max-width: 991px) {
  .pd-preprocess-plot-shell {
    padding: 8px;
    border-radius: 10px;
  }
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pk-results-card .tab-pane {
  overflow: hidden;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .card-body,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .tab-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100% !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) {
  height: calc(100vh - 100px) !important;
  min-height: 0 !important;
  max-height: calc(100vh - 100px) !important;
  width: 100% !important;
  max-width: none !important;
  align-items: stretch !important;
  margin-bottom: 0 !important;
  gap: 0 !important;
  --bslib-sidebar-gutter: 0 !important;
  --bslib-grid-gap: 0 !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .sidebar {
  height: 100% !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .main {
  height: 100% !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* 主内容列占满可用空间 */
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-column-layout > div:has(.workbench-main-card),
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-grid > div:has(.workbench-main-card) {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-width: 0;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-column-layout > div:has(.pk-results-card),
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-grid > div:has(.pk-results-card) {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  align-self: stretch !important;
  min-width: 0;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main > .row,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main > .bslib-column-layout,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main > .bslib-grid {
  flex: 1 !important;
  display: flex !important;
  align-items: stretch !important;
  margin: 0 !important;
  height: 100% !important;
  width: 100% !important;
  gap: 0 !important;
  --bslib-grid-gap: 0 !important;
}

/* 确保所有容器内的卡片都没有底部间距并且撑满 */
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .card {
  height: 100% !important;
  margin-bottom: 0 !important;
  flex: 1 !important;
}

/* 确保 uiOutput 内部也撑满 */
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-column-layout > div,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .main .bslib-grid > div,
.system-workbench-wrapper .bslib-column-layout > div {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  flex: 1 !important;
}

/* 系统页面使用无侧栏的全宽内容网格 */
.system-workbench-wrapper,
.system-workbench-grid {
  height: calc(100vh - 58px) !important;
  max-height: calc(100vh - 58px) !important;
  min-height: 0 !important;
  width: 100% !important;
}

.system-workbench-grid {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  --bslib-grid-gap: 0 !important;
}

.system-workbench-grid > .workbench-main-card,
.system-workbench-grid > div:has(.workbench-main-card) {
  display: flex !important;
  flex: 1 1 0% !important;
  flex-direction: column !important;
  min-width: 0;
  height: 100% !important;
}

.system-workbench-grid .workbench-main-card,
.system-workbench-grid .workbench-main-card > .card-body,
.system-workbench-grid .workbench-main-card .tab-pane.active {
  min-height: 0;
  height: 100% !important;
}

.system-workbench-grid .workbench-main-card > .card-body {
  display: flex;
  flex-direction: column;
}

.system-workbench-grid .workbench-main-card > .card-body > .tabbable {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.system-workbench-grid .workbench-main-card > .card-body > .tabbable > .nav-tabs {
  flex: 0 0 auto;
}

.system-workbench-grid .workbench-main-card .tab-content {
  flex: 1 1 auto;
  height: auto !important;
  overflow-x: hidden;
  overflow-y: auto;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card {
  height: 100% !important;
  margin-bottom: 0 !important;
  flex: 1 !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) > .sidebar,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card {
  border-bottom-left-radius: var(--sw-radius) !important;
  border-bottom-right-radius: var(--sw-radius) !important;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-main-card.pd-explore-main-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.bslib-sidebar-layout:has(.pd-explore-main-card) {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Exploration sections are separated by their header bars, not card outlines. */
.pd-explore-main-card .pd-workbench-subcard {
  flex: 0 0 auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pd-explore-main-card .pd-workbench-subcard > .card-header {
  border-radius: 0 !important;
}

.pd-explore-main-card .pd-workbench-subcard > .card-body {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pd-explore-main-card .pd-workbench-pane > .row {
  flex: 0 0 auto !important;
  height: auto !important;
  align-items: flex-start !important;
}

.pd-explore-main-card .pd-workbench-pane > .row > [class*="col-"]:has(> .pd-explore-params-shell),
.pd-explore-main-card .pd-workbench-pane > .row > [class*="col-"]:has(> .pd-explore-results-card),
.pd-explore-main-card .pd-workbench-pane > .row > [class*="col-"]:has(> .pd-grid-search-card),
.pd-explore-main-card .pd-workbench-pane > .row > [class*="col-"]:has(> .pd-grid-search-results-card) {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.pd-explore-main-card .pd-explore-params-shell > .card-body,
.pd-explore-main-card .pd-explore-results-card > .card-body,
.pd-explore-main-card .pd-grid-search-results-card > .card-body {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.welcome-workbench {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-workbench > .bslib-sidebar-layout {
  flex: 1 1 auto;
}

.pd-workbench-note,
.ivpt-workbench-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--sw-text-muted);
}



.ivpt-workbench-note {
  font-size: 0.74rem;
  line-height: 1.42;
  color: #66788a;
}

.ivpt-desktop-upload-shell .shiny-input-container,
.ivpt-desktop-upload-shell .form-group {
  margin-bottom: 0 !important;
}

.ivpt-desktop-upload-shell .control-label {
  margin-bottom: 4px !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  color: #596b7e;
}

.ivpt-desktop-upload-shell .input-group {
  display: flex;
  align-items: stretch;
}

.ivpt-desktop-upload-shell .btn-default,
.ivpt-desktop-upload-shell .input-group-btn > .btn {
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #b8c7d5;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  color: #223140;
  font-size: 0.79rem;
  font-weight: 700;
  box-shadow: none;
}

.ivpt-desktop-upload-shell .form-control {
  min-height: 34px;
  border-radius: 0 4px 4px 0;
  border: 1px solid #c6d3de;
  background: #ffffff;
  color: #2f4256;
  font-size: 0.8rem;
  box-shadow: inset 0 1px 1px rgba(19, 36, 55, 0.03);
}

.ivpt-desktop-upload-shell .shiny-file-input-progress {
  margin-top: 6px;
  margin-bottom: 0;
}

.ivpt-desktop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding-top: 2px;
}

.ivpt-desktop-meta__tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf0f6;
  color: #5e7083;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ivpt-desktop-meta__text {
  color: #6b7b8d;
  font-size: 0.72rem;
  line-height: 1.35;
}

.ivpt-desktop-mapping-shell {
  padding: 8px 9px;
  border: 1px solid #d4dde6;
  border-radius: 5px;
  background: linear-gradient(180deg, #f9fbfc 0%, #f4f7fa 100%);
}

.ivpt-desktop-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.ivpt-desktop-mapping-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ivpt-desktop-mapping-field--wide {
  grid-column: 1 / -1;
}


.ivpt-desktop-mode-shell .shiny-input-radiogroup {
  margin-bottom: 0 !important;
}

.ivpt-desktop-mode-shell .control-label {
  display: block;
  margin-bottom: 4px !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  color: #5b6e81;
}

.ivpt-desktop-mode-shell .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ivpt-desktop-property-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
}

.ivpt-desktop-property {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ivpt-desktop-mode-shell .radio-inline {
  margin: 0 !important;
  padding: 8px 10px !important;
  min-height: 34px;
  border: 1px solid #c7d3de;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  color: #2a3d50;
  font-size: 0.77rem;
  font-weight: 700;
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ivpt-desktop-mode-shell .radio-inline + .radio-inline {
  margin-left: 0 !important;
}

.ivpt-desktop-mode-shell .radio-inline:has(input:checked) {
  border-color: #2a84c8;
  background: linear-gradient(180deg, #fefefe 0%, #e9f3fb 100%);
  color: #16334f;
  box-shadow: inset 0 0 0 1px rgba(42, 132, 200, 0.12);
}

.ivpt-desktop-mode-shell input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ivpt-desktop-actionbar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding: 8px 0 0;
  border-top: 1px solid #d2dbe4;
  background: linear-gradient(180deg, rgba(244, 247, 250, 0.82) 0%, rgba(239, 243, 246, 0.98) 100%);
  backdrop-filter: blur(4px);
}

.ivpt-desktop-actionbar .btn {
  min-height: 37px;
  border-radius: 5px;
  border-color: #1e2329;
  background: linear-gradient(180deg, #23272c 0%, #171a1e 100%);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ivpt-desktop-actionbar .btn:hover,
.ivpt-desktop-actionbar .btn:focus {
  background: linear-gradient(180deg, #282d33 0%, #1b1f24 100%);
  color: #ffffff;
}

@media (max-width: 991px) {
  .ivpt-desktop-mapping-grid,
  .ivpt-desktop-property-grid,
  .ivpt-desktop-mode-shell .shiny-options-group {
    grid-template-columns: 1fr;
  }
}

.pd-model-build-main-pane {
  display: grid;
  gap: 14px;
}

.pd-model-build-param-shell,
.pd-model-build-formula-shell {
  border: 1px solid #d6dee5;
  border-radius: 6px;
  background: linear-gradient(180deg, #fcfdfe 0%, #f7fafc 100%);
  box-shadow: 0 1px 2px rgba(32, 51, 70, 0.04);
}

.pd-model-build-param-shell__header,
.pd-model-build-formula-shell__header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #dbe3ea;
  background: linear-gradient(180deg, #edf3f8 0%, #e4ebf2 100%);
}

.pd-model-build-param-shell__title,
.pd-model-build-formula-shell__title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #243748;
}

.pd-model-build-param-shell__meta,
.pd-model-build-formula-shell__meta {
  display: none;
}

.pd-model-build-param-shell {
  overflow: visible;
}

.pd-model-build-formula-shell--inline {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pd-model-build-formula-shell--inline .pd-model-build-formula-shell__body {
  padding: 12px 14px 8px;
}

.pd-model-build-param-shell .pd-param-table {
  margin-bottom: 0;
  border: 0;
  overflow: visible;
}

.pd-model-build-param-shell .pd-param-table thead th {
  background: #f7fafc;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: #53687a;
}

.pd-model-build-param-shell .pd-param-table th:nth-child(1),
.pd-model-build-param-shell .pd-param-table td:nth-child(1) {
  width: 116px;
  min-width: 116px;
  max-width: 116px;
}

.pd-model-build-param-shell .pd-param-table th:nth-child(2),
.pd-model-build-param-shell .pd-param-table td:nth-child(2) {
  width: 180px;
}

.pd-model-build-param-shell .pd-param-table th:nth-child(3),
.pd-model-build-param-shell .pd-param-table td:nth-child(3) {
  width: 170px;
}

.pd-model-build-param-shell .pd-param-table th:nth-child(4),
.pd-model-build-param-shell .pd-param-table td:nth-child(4) {
  width: 124px;
}

.pd-model-build-param-shell .pd-param-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #ffffff;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.pd-model-build-param-shell .pd-model-build-param-row td:first-child {
  position: relative;
  padding-left: 18px;
  font-weight: 800;
  color: #203243;
}

.pd-model-build-param-shell .pd-model-build-param-row td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 999px;
  background: #d7e1ea;
}

.pd-model-build-param-shell .pd-model-build-param-row--baseline td:first-child::before {
  background: #9fb4c7;
}

.pd-model-build-param-shell .pd-model-build-param-row--effect td:first-child::before {
  background: #4e89c7;
}

.pd-model-build-param-shell .pd-model-build-param-row--potency td:first-child::before {
  background: #6ea57e;
}

.pd-model-build-param-shell .pd-model-build-param-row--shape td:first-child::before {
  background: #8f79b8;
}

.pd-model-build-param-shell .pd-param-table .form-control,
.pd-model-build-param-shell .pd-param-table .selectize-input {
  min-height: 32px !important;
  height: 32px !important;
  border-radius: 4px !important;
  border-color: #cad5df !important;
  font-size: 0.75rem !important;
}

.pd-model-build-param-shell .pd-param-table .selectize-input {
  padding: 4px 26px 4px 8px !important;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(2) .form-group,
.pd-model-build-param-shell .pd-param-table td:nth-child(2) .shiny-input-container,
.pd-model-build-param-shell .pd-param-table td:nth-child(3) .form-group,
.pd-model-build-param-shell .pd-param-table td:nth-child(3) .shiny-input-container,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .form-group,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .shiny-input-container {
  width: 100%;
  max-width: 220px;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(4) .form-group,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .shiny-input-container {
  max-width: 150px;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(3) .form-control,
.pd-model-build-param-shell .pd-param-table td:nth-child(3) .selectize-input,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .form-control,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .selectize-input {
  background: linear-gradient(180deg, #fbfdff 0%, #f2f6fa 100%) !important;
  border-color: #dbe3ea !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(3) .selectize-input,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .selectize-input {
  border-style: solid !important;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(3) .selectize-input.focus,
.pd-model-build-param-shell .pd-param-table td:nth-child(3) .form-control:focus,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .selectize-input.focus,
.pd-model-build-param-shell .pd-param-table td:nth-child(4) .form-control:focus {
  border-color: #a8bac9 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 0 0 1px rgba(137, 159, 177, 0.18) !important;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(3) .selectize-control.single .selectize-input::after {
  border-top-color: #73879a !important;
  right: 10px !important;
}

.pd-explore-param-table .bootstrap-select.form-control,
.pd-model-build-param-shell .pd-param-table .bootstrap-select.form-control {
  display: block !important;
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pd-explore-param-table .bootstrap-select > .dropdown-toggle,
.pd-model-build-param-shell .pd-param-table .bootstrap-select > .dropdown-toggle {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 4px 26px 4px 8px !important;
  border: 1px solid #cad5df !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  color: #33485b !important;
  box-shadow: none !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
}

.pd-model-build-param-shell .pd-param-table td:nth-child(3) .bootstrap-select > .dropdown-toggle {
  border-color: #dbe3ea !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f6fa 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

.pd-explore-param-table .bootstrap-select > .dropdown-toggle:focus,
.pd-explore-param-table .bootstrap-select.show > .dropdown-toggle,
.pd-model-build-param-shell .pd-param-table .bootstrap-select > .dropdown-toggle:focus,
.pd-model-build-param-shell .pd-param-table .bootstrap-select.show > .dropdown-toggle {
  border-color: #a8bac9 !important;
  outline: 0 !important;
  box-shadow: 0 0 0 1px rgba(137, 159, 177, 0.18) !important;
}

.pd-explore-param-table .bootstrap-select > .dropdown-toggle .filter-option,
.pd-model-build-param-shell .pd-param-table .bootstrap-select > .dropdown-toggle .filter-option {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}


.pd-model-build-param-shell .pd-param-table td:nth-child(4) input[type="number"] {
  font-weight: 600;
  color: #33485b;
}

.pd-model-build-param-shell .pd-param-table code,
.pd-model-build-formula-shell code {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef3f7;
  color: #304558;
  font-size: 0.72rem;
}

.pd-model-build-param-note {
  padding: 8px 14px 10px;
  border-top: 1px dashed #d8e1e8;
  color: #6a7c8d;
  font-size: 0.72rem;
}

.pd-model-build-formula-shell__body {
  padding: 12px 14px;
}

.pd-model-formula-preview {
  display: grid;
  gap: 10px;
}

.pd-model-formula-preview__topline {
  display: block;
}

.pd-model-formula-preview__type {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf3f8;
  color: #2b4458;
  font-size: 0.7rem;
  font-weight: 700;
}

.pd-model-formula-preview__equation {
  padding: 8px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #203243;
  overflow-x: auto;
}

.pd-model-formula-preview__equation p {
  margin: 0;
}

.pd-model-formula-preview__note {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #66798a;
}





.pd-model-build-shell .workbench-title-icon,
.pd-model-build-shell .pk-control-title-icon {
  width: 30px;
  height: 30px;
  min-height: 30px !important;
  padding: 0 !important;
  border-radius: 4px;
  border-color: #c5d1db !important;
  background: linear-gradient(180deg, #fdfefe 0%, #edf2f6 100%) !important;
  color: #42576a !important;
  box-shadow: none !important;
}

.pd-model-build-shell .form-group,
.pd-model-build-shell .shiny-input-container,
.pd-model-build-shell .selectize-control,
.pd-model-build-shell .input-group {
  margin-bottom: 5px !important;
}

.pd-model-build-shell .control-label {
  margin-bottom: 3px !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #56697b;
}

.pd-model-build-shell .form-control,
.pd-model-build-shell .selectize-input,
.pd-model-build-shell .shiny-input-container input[type="text"],
.pd-model-build-shell .shiny-input-container input[type="number"],
.pd-model-build-shell .shiny-input-container select {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 3px !important;
  border-color: #c9d4dd !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 0.78rem;
  line-height: 1.2 !important;
}

.pd-model-build-shell .form-control:focus,
.pd-model-build-shell .selectize-input.focus,
.pd-model-build-shell .selectize-input:focus,
.pd-model-build-shell .shiny-input-container input:focus,
.pd-model-build-shell .shiny-input-container select:focus {
  border-color: #7fa2bd !important;
  box-shadow: 0 0 0 2px rgba(82, 120, 150, 0.12) !important;
}

.pd-model-build-shell .selectize-input {
  width: 100% !important;
  min-width: 100% !important;
  padding: 4px 30px 4px 9px !important;
}

.pd-model-build-shell .input-group-btn > .btn,
.pd-model-build-shell .input-group-btn > .btn-file {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 3px !important;
  padding: 5px 10px !important;
  background: linear-gradient(180deg, #fefefe 0%, #eef3f7 100%) !important;
  border-color: #bac8d4 !important;
  color: #33475a !important;
  font-weight: 700;
  box-shadow: none !important;
}

.pd-model-build-shell .input-group .form-control[readonly] {
  background: #ffffff !important;
  color: #556677 !important;
}

.pd-model-build-shell .shiny-file-input-progress {
  margin-top: 4px;
  margin-bottom: 2px;
}

.pd-model-build-shell .row.pd-model-build-compact-grid {
  --bs-gutter-x: 10px;
  --bs-gutter-y: 0;
  margin-top: 0;
}

.pd-model-build-shell .row.pd-model-build-compact-grid > [class*="col-"] {
  padding-top: 0;
  padding-bottom: 0;
}

.pd-model-build-property-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-model-build-property-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
}

.pd-model-build-property-row__label {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #56697b;
}

.pd-model-build-property-row__control {
  min-width: 0;
}

.pd-model-build-property-row__control > .form-group,
.pd-model-build-property-row__control > .shiny-input-container {
  margin-bottom: 0 !important;
}

.pd-model-build-property-row__control .control-label {
  display: none !important;
}

.pd-model-build-property-subgroup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px 0 0 0;
  border-top: 1px dashed #d7dfe6;
}

.pd-model-build-shell .pd-model-build-section--source [id$="model_upload_container"],
.pd-model-build-shell .pd-model-build-section--source [id$="explore_upload_container"],
.pd-model-build-shell .pd-model-build-section--source [id$="col_mapping_ui"] {
  margin-top: 2px;
}

.pd-model-build-source-banner {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #cfd8e0;
  border-radius: 3px;
  background: linear-gradient(180deg, #fefefe 0%, #f5f8fb 100%);
  margin-bottom: 4px;
}

.pd-model-build-source-banner__label,
.pd-model-build-source-banner__meta-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7b8b;
}

.pd-model-build-source-banner__value {
  font-size: 0.9rem;
  font-weight: 800;
  color: #223446;
}

.pd-model-build-source-banner__meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 4px 10px;
}

.pd-model-build-source-banner__meta-value {
  font-size: 0.76rem;
  color: #415365;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-model-build-source-banner__hint {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #6f8090;
}

.pd-model-build-source-banner--imported {
  background: linear-gradient(180deg, #f8fbfe 0%, #edf4f9 100%);
  border-color: #c5d7e5;
}

.pd-model-build-shell .pd-model-build-section--initials .btn-primary {
  min-height: 34px !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #1e1e1e 0%, #151515 100%) !important;
  border-color: #1f1f1f !important;
  color: #ffffff !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: none !important;
}

.pd-model-build-shell .pd-model-build-section--initials .btn-primary:hover {
  background: linear-gradient(180deg, #2a2a2a 0%, #1b1b1b 100%) !important;
}

.pd-model-build-mapping-modal .pk-ct-mapping-modal__body {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
}

.pd-model-build-mapping-preview .dataTables_wrapper {
  margin-top: 6px;
}

.pd-model-build-mapping-preview table.dataTable thead th {
  font-size: 0.72rem;
  white-space: nowrap;
}

.pd-model-build-mapping-preview table.dataTable tbody td {
  font-size: 0.74rem;
  white-space: nowrap;
}

.pd-model-build-shell .pd-model-build-section--structure .shiny-panel-conditional > .form-group:first-child,
.pd-model-build-shell .pd-model-build-section--structure .shiny-panel-conditional > .shiny-input-container:first-child {
  margin-top: 0 !important;
}





.pd-model-build-shell .input-group {
  display: flex;
  align-items: stretch;
}

.pd-model-build-shell .input-group .form-control {
  min-height: 34px !important;
  height: 34px !important;
  padding: 4px 10px !important;
  font-size: 0.76rem !important;
  line-height: 1.2 !important;
}

.pd-model-build-shell .selectize-control {
  width: 100% !important;
}

.pd-model-build-param-shell .selectize-control,
.pd-model-build-param-shell .shiny-input-container,
.pd-model-build-param-shell .form-group {
  overflow: visible !important;
}

.pd-model-build-shell .selectize-control.single .selectize-input,
.pd-model-build-shell .selectize-control.multi .selectize-input {
  display: flex;
  align-items: center;
  width: 100% !important;
  min-width: 100% !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 4px 30px 4px 9px !important;
  font-size: 0.76rem !important;
  line-height: 1.2 !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
}

.pd-model-build-shell .selectize-control.single .selectize-input .item,
.pd-model-build-shell .selectize-control.multi .selectize-input .item {
  font-size: 0.76rem !important;
  line-height: 1.2 !important;
  color: #243547;
}


.pd-model-build-shell .selectize-control.single .selectize-input::after {
  right: 9px !important;
  margin-top: -2px !important;
  border-width: 6px 6px 0 6px !important;
  border-top-color: #475a6d !important;
}

.pd-model-build-shell .selectize-dropdown,
.pd-model-build-shell .selectize-dropdown.form-control {
  border-radius: 3px !important;
  border-color: #c9d4dd !important;
  box-shadow: 0 6px 18px rgba(86, 109, 131, 0.12) !important;
}

.pd-model-build-param-shell .selectize-dropdown,
.pd-model-build-param-shell .selectize-dropdown.form-control {
  z-index: 3500 !important;
}

.pd-model-build-shell .selectize-dropdown .option,
.pd-model-build-shell .selectize-dropdown .item {
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
}

.pd-model-build-shell .pd-model-build-clear-btn {
  min-height: 31px !important;
  border-radius: 3px !important;
  padding: 4px 8px !important;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: none !important;
}

.pd-model-build-shell .pd-model-build-action-bar {
  padding-top: 6px;
  border-top: 1px solid #d3dce4;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.84) 0%, rgba(240, 244, 247, 0.98) 100%);
  box-shadow: none;
}

.pd-model-build-shell .pd-model-build-action-bar .btn-primary {
  min-height: 36px !important;
  border-radius: 3px !important;
  background: linear-gradient(180deg, #181818 0%, #101010 100%) !important;
  border-color: #111111 !important;
  color: #ffffff !important;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: none !important;
}

.pd-model-build-shell .pd-model-build-action-bar .btn-primary:hover {
  background: linear-gradient(180deg, #252525 0%, #151515 100%) !important;
}

.pd-workbench-subcard {
  border-radius: var(--sw-radius) !important;
  border: 1px solid var(--sw-border) !important;
  box-shadow: var(--sw-shadow);
}

.pd-workbench-subcard > .card-body {
  padding: 12px !important;
}

.pd-workbench-tab-card > .card-body {
  padding: 0 !important;
}

.pd-workbench-tab-card .nav-tabs {
  padding: 8px 12px 0;
  border-bottom: 1px solid #d6e0e8;
  background: linear-gradient(180deg, #f5f8fb 0%, #edf2f6 100%);
  border-top-left-radius: var(--sw-radius) !important;
  border-top-right-radius: var(--sw-radius) !important;
}

.pd-workbench-tab-card .tab-content {
  padding: 12px;
}

.pd-workbench-tab-card .tab-pane.active,
.pd-workbench-tab-card .tab-pane.show.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-model-results-shell .tab-pane.active,
.pd-model-results-shell .tab-pane.show.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-model-results-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-model-results-content {
  min-height: 88px;
}

.pd-bootstrap-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 0;
  flex-wrap: wrap;
}

.pd-bootstrap-toolbar__label {
  color: #495057;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.pd-bootstrap-toolbar__input {
  width: 110px;
}

.pd-bootstrap-toolbar__input input.form-control {
  min-height: 42px;
}

.pd-bootstrap-actionbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-bootstrap-actionbar .btn {
  min-width: 132px;
  min-height: 42px;
}

.pd-model-results-panel .shiny-output-error-validation {
  display: flex;
  align-items: center;
  min-height: 88px;
  padding: 10px 4px 4px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #6c757d;
  font-size: 18px;
  font-weight: 500;
  box-shadow: none;
}

.pd-model-results-panel .dataTables_wrapper,
.pd-model-results-content .dataTables_wrapper {
  margin: 0;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.pd-model-plots-shell {
  width: 100%;
}

.pd-model-plots-shell > .bslib-sidebar-layout {
  --_sidebar-width: 340px;
}

.pd-model-plots-sidebar {
  border-right: 1px solid #d8e1e8;
}

.pd-model-plots-controls {
  gap: 14px;
}

.pd-model-plots-type-tabs .shiny-input-radiogroup {
  margin-bottom: 0 !important;
}

.pd-model-plots-type-tabs .shiny-options-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.pd-model-plots-type-tabs .radio {
  margin: 0 !important;
}

.pd-model-plots-type-tabs .radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-model-plots-type-tabs .radio label {
  margin: 0 !important;
  padding: 11px 15px !important;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  border: 1px solid #d2dde7;
  border-radius: 11px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  color: #233243;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.pd-model-plots-type-tabs .radio span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.pd-model-plots-type-tabs .radio span::after {
  content: "";
  order: -1;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #b3c2d1;
  transition: all 0.18s ease;
}

.pd-model-plots-type-tabs .radio label:hover {
  color: #152334;
  border-color: #b7cddd;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 8px 18px rgba(128, 149, 169, 0.1);
}

.pd-model-plots-type-tabs .radio:has(input:checked) label {
  border-color: #2890d8;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9fe 100%);
  box-shadow: 0 12px 24px rgba(40, 144, 216, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.94);
  color: var(--sw-text);
}

.pd-model-plots-type-tabs .radio:has(input:checked) span::after {
  background: #ffffff;
  box-shadow: inset 0 0 0 7px #1480cf, 0 0 0 2px rgba(20, 128, 207, 0.14);
}

.pd-model-plots-type-tabs .radio:has(input:checked) label::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(20, 128, 207, 0.15);
  pointer-events: none;
}

.pd-model-plots-section .selectize-control,
.pd-model-plots-section .form-group {
  margin-bottom: 0 !important;
}

.pd-model-plots-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-model-plots-action-stack .btn,
.pd-model-plots-action-stack .shiny-download-link {
  min-height: 36px !important;
}

.pd-model-plots-action-stack .shiny-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pd-model-plots-shell {
  padding: 12px 14px 14px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .workbench-tab-pane:has(.pd-model-plots-shell),
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell:has(.pd-plot-gof) {
  overflow-y: hidden !important;
}

.pd-model-plot-box {
  position: relative;
  width: min(84%, 880px);
  margin: 0 auto;
}

.pd-model-plot-box > .shiny-spinner-output-container,
.pd-model-plot-box > .shiny-plot-output {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pd-model-plots-pane {
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  width: 100%;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-model-plot-box--preview {
  width: 680px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-model-plot-box--review {
  width: 680px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--gof {
  width: 840px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--vpc {
  width: 760px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-model-plot-box--auec-compare,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--auec-compare {
  width: 820px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--individual-fit {
  width: 900px;
  height: 720px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--auec-compare {
  margin-top: 10px;
}

.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-4-3,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-gof,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-vpc,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-auec-compare,
.bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-individual-fit {
  max-height: none;
}

.pd-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid #d8e1e8;
  border-radius: 4px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
}

.pd-toolbar--compact {
  padding: 8px 10px;
}

.pd-toolbar--end {
  justify-content: flex-end;
}

.pd-toolbar .btn,
.pd-toolbar .dt-button {
  min-height: 36px !important;
}

.pd-toolbar .form-group {
  margin-bottom: 0 !important;
}

.pd-table-shell {
  border: 1px solid #d7dfe6;
  border-radius: 4px;
  background: linear-gradient(180deg, #fcfdfe 0%, #f6f9fb 100%);
  overflow: visible;
}

.pd-table-shell__body {
  padding: 10px 12px 12px;
}

.pd-table-shell .dataTables_wrapper {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.pd-table-shell table.dataTable thead th,
.pd-table-shell table.dataTable thead td,
.pd-param-table thead th,
.pd-explore-table thead th {
  background: linear-gradient(180deg, #eff4f8 0%, #e4ebf1 100%) !important;
  color: #4c5d6d !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #d6e0e8 !important;
}

.pd-table-shell table.dataTable tbody td,
.pd-param-table tbody td,
.pd-explore-table tbody td {
  background: #ffffff;
  border-bottom: 1px solid #ebf0f4 !important;
}

.pd-table-shell .dt-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.pd-table-shell .dt-buttons .dt-button,
div[id="tbl_fixed_dt"] .dt-buttons .dt-button,
div[id="tbl_bootstrap_dt"] .dt-buttons .dt-button {
  min-height: 28px;
  min-width: 72px;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f8 100%) !important;
  color: #4f5f6f !important;
  border: 1px solid #cfd8e0 !important;
  box-shadow: none !important;
}

.pd-table-shell .dt-buttons .dt-button:hover,
div[id="tbl_fixed_dt"] .dt-buttons .dt-button:hover,
div[id="tbl_bootstrap_dt"] .dt-buttons .dt-button:hover {
  background: linear-gradient(180deg, #f4f8fb 0%, #e8eef4 100%) !important;
  color: #3f5060 !important;
}

.pd-pivotal-summary-grid {
  gap: 10px;
  margin-bottom: 0;
}

.pd-pivotal-analysis-layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pd-pivotal-report-section {
  gap: 12px;
  padding: 2px 2px 0;
}

.pd-pivotal-report-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-pivotal-report-panel__title {
  color: #1f3144;
  font-family: var(--font-heading);
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-align: center;
  width: 100%;
}

.pd-pivotal-analysis-layout .pk-analysis-section + .pk-analysis-section {
  padding-top: 4px;
}

.pd-pivotal-analysis-layout .dataTables_wrapper {
  width: 100% !important;
}

.pd-pivotal-analysis-layout table.dataTable {
  width: 100% !important;
  table-layout: fixed !important;
}

.pd-pivotal-analysis-layout .dataTables_wrapper .dataTables_scrollHead table.dataTable thead th,
.pd-pivotal-analysis-layout .dataTables_wrapper .dataTables_scrollHead table.dataTable thead td,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead td,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th.sorting,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th.sorting_asc,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th.sorting_desc,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th.sorting_disabled {
  text-align: left !important;
  vertical-align: middle !important;
}

.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead th *,
.pd-pivotal-analysis-layout .dataTables_wrapper table.dataTable thead td * {
  text-align: left !important;
}

.pd-pivotal-analysis-layout table.dataTable th,
.pd-pivotal-analysis-layout table.dataTable td {
  text-align: left !important;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.pd-pivotal-analysis-layout .dataTables_scroll,
.pd-pivotal-analysis-layout .dataTables_scrollHead,
.pd-pivotal-analysis-layout .dataTables_scrollBody {
  width: 100% !important;
}

.pd-pivotal-summary-card {
  position: relative;
  min-height: 124px;
  padding: 14px 16px;
  border-radius: 4px !important;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%) !important;
  border: 1px solid #d7dfe6 !important;
  box-shadow: none !important;
}

.pd-pivotal-summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #9aa8b5;
}

.pd-pivotal-summary-card.is-pass::before {
  background: #5aa36b;
}

.pd-pivotal-summary-card.is-fail::before {
  background: #c87272;
}

.pd-pivotal-summary-card.is-pending::before {
  background: #9aa8b5;
}

.pd-pivotal-summary-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7b8a;
}

.pd-pivotal-summary-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--sw-text);
}

.pd-pivotal-summary-hint {
  font-size: 0.8rem;
  color: var(--sw-text-muted);
}

.pd-plot-frame {
  border: 1px solid #d7dfe6;
  border-radius: 4px;
  background: linear-gradient(180deg, #fcfdfe 0%, #f6f9fb 100%);
  box-shadow: none;
}

@media (max-width: 991px) {
  .bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-model-plot-box--review {
    width: min(84%, 880px);
  }

  .bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-model-plot-box--auec-compare,
  .bslib-sidebar-layout:has(.pk-workbench-sidebar) .pd-model-plots-shell .pd-plot-frame--auec-compare {
    width: min(88%, 980px);
  }

  .pd-explore-selector-grid,
  .pd-explore-compact-grid--2,
  .pd-explore-compact-grid--3 {
    grid-template-columns: 1fr;
  }

  .pd-explore-param-band,
  .pd-grid-search-body,
  .pd-grid-search-card .pd-explore-param-block--grid-values .pd-explore-compact-grid,
  .pd-grid-search-card .pd-explore-param-block--iiv .pd-explore-compact-grid {
    grid-template-columns: 1fr;
  }

  .pd-grid-search-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .pd-explore-panel-head,
  .pd-explore-results-head {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-explore-runbar {
    align-items: stretch;
  }
}

.bslib-sidebar-layout > .main > .card:last-child,
.bslib-sidebar-layout > [class*="main"] > .card:last-child,
.bslib-sidebar-layout > .html-fill-item:not(.sidebar) > .card:last-child,
.bslib-sidebar-layout > .html-fill-container:not(.sidebar) > .card:last-child {
  margin-bottom: 0 !important;
}

/* DataTables Pagination Beautification */
.dataTables_wrapper .dataTables_paginate {
  margin-top: 15px !important;
  display: flex !important;
  justify-content: flex-end;
  gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px !important;
  border: 1px solid #e2e8f0 !important;
  background: white !important;
  color: #64748b !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
  margin: 0 !important;
  cursor: pointer;
  text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}

.dataTables_wrapper .dataTables_info {
  padding-top: 15px !important;
  font-size: 0.82rem !important;
  color: #64748b !important;
}

/* --- Modern Popups & Notifications Stylings --- */

/* 1. Shiny Notifications (Enhanced Aesthetics) */
#shiny-notification-container {
  bottom: 20px;
  right: 20px;
  width: 380px;
}

.shiny-notification {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  padding: 18px 20px !important;
  margin-bottom: 12px !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  animation: notificationEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative;
  overflow: hidden;
}

@keyframes notificationEnter {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.shiny-notification::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #cbd5e1;
}

/* Notification Types */
.shiny-notification-message {
  border-left: 5px solid #3b82f6 !important;
}
.shiny-notification-message::before { background: #3b82f6; }

.shiny-notification-warning {
  border-left: 5px solid #f59e0b !important;
  background: rgba(255, 251, 235, 0.9) !important;
}
.shiny-notification-warning::before { background: #f59e0b; }

.shiny-notification-error {
  border-left: 5px solid #ef4444 !important;
  background: rgba(254, 242, 242, 0.9) !important;
}
.shiny-notification-error::before { background: #ef4444; }

.shiny-notification .shiny-notification-close {
  top: 15px !important;
  right: 15px !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.shiny-notification .shiny-notification-close:hover {
  opacity: 1;
}

/* 2. Modal Dialogs (Professional Refinement) */
.modal-content {
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
  background: #ffffff !important;
}

.modal-header {
  padding: 24px 30px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.modal-title {
  width: 100% !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
  margin-bottom: 0 !important;
  display: block !important;
}

.modal-header-container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding-right: 10px !important;
}

.modal-header-actions {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  margin-left: auto !important;
}

.modal-header-actions .btn {
  padding: 6px 16px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.modal-body {
  padding: 30px !important;
  background: #ffffff !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: #334155 !important;
}

.modal-footer {
  padding: 20px 30px !important;
  background: #f8fafc !important;
  border-top: 1px solid #f1f5f9 !important;
  display: flex !important;
  gap: 12px;
}

/* Modal Action Buttons */
.modal-footer .btn {
  padding: 10px 24px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.modal-footer .btn-primary {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2) !important;
}

.modal-footer .btn-primary:hover {
  background: #2563eb !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3) !important;
}

.modal-footer .btn-default {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

.modal-footer .btn-default:hover {
  background: #f8fafc !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

/* 隐藏默认的 Bootstrap 关闭 'X'，统一使用我们的功能键 */
.modal-header .close {
  display: none !important;
}

/* Premium Backdrop effect */
.modal-backdrop.in {
  opacity: 0.4 !important;
  background-color: #0f172a !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.report-workbench-shell {
  --report-bg: linear-gradient(165deg, #f0ece4 0%, #e8e2d6 35%, #f2efe8 70%, #ebe6dc 100%);
  --report-panel: rgba(255, 253, 248, 0.82);
  --report-panel-strong: rgba(255, 255, 255, 0.94);
  --report-border: rgba(20, 42, 52, 0.1);
  --report-rule: rgba(20, 42, 52, 0.07);
  --report-ink: #1a2730;
  --report-muted: #546872;
  --report-soft-ink: #7a8d96;
  --report-accent: #0b6b5e;
  --report-accent-deep: #0f3d42;
  --report-accent-soft: rgba(11, 107, 94, 0.09);
  --report-warm-soft: rgba(188, 160, 100, 0.12);
  --report-accent-glow: rgba(11, 107, 94, 0.16);
  --report-success: #2d7a4f;
  --report-warning: #b8852a;
  --report-error: #b5403a;
  --report-shadow: 0 28px 64px rgba(15, 25, 32, 0.12), 0 8px 20px rgba(15, 25, 32, 0.06);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--report-border);
  border-radius: 28px;
  background: linear-gradient(165deg, #f0ece4 0%, #e8e2d6 35%, #f2efe8 70%, #ebe6dc 100%);
  box-shadow: var(--report-shadow);
  padding: 24px;
  display: grid;
  gap: 16px;
  animation: report-shell-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes report-shell-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-workbench-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(23, 36, 45, 0.045) 0.5px, transparent 0.5px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 20%, rgba(188, 160, 100, 0.06) 0%, transparent 50%);
  background-size: 10px 10px, auto, auto;
  opacity: 0.25;
}

.report-workbench-section,
.report-workbench-meta-panel,
.report-workbench-meta-import-panel,
.report-ct-import-card,
.report-workbench-actions,
.report-workbench-analysis-panel {
  position: relative;
  z-index: 1;
}
.report-workbench-panel-kicker {
  font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--report-accent);
  margin-bottom: 8px;
}

.report-workbench-panel-head p,
.report-ct-import-card__head p {
  margin: 0;
  color: var(--report-muted);
  line-height: 1.6;
  max-width: 62ch;
}

.report-workbench-section {
  display: grid;
  gap: 12px;
  animation: report-section-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.report-workbench-section:nth-child(2) { animation-delay: 0.08s; }
.report-workbench-section:nth-child(3) { animation-delay: 0.16s; }
.report-workbench-section:nth-child(4) { animation-delay: 0.24s; }

@keyframes report-section-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-workbench-section__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.report-workbench-section__index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(15, 61, 66, 0.12), rgba(11, 107, 94, 0.08));
  color: var(--report-accent-deep);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  border: 1px solid rgba(11, 107, 94, 0.1);
  box-shadow: 0 2px 8px rgba(11, 107, 94, 0.06);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.report-workbench-section:hover .report-workbench-section__index {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(11, 107, 94, 0.12);
}

.report-workbench-section__copy h3 {
  margin: 2px 0 2px;
  color: var(--report-ink);
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: -0.01em;
}

.report-workbench-section__copy p {
  margin: 0;
  color: var(--report-muted);
  line-height: 1.45;
  font-size: 13px;
}

.report-workbench-section__body {
  display: grid;
  gap: 12px;
}

.report-workbench-meta-panel,
.report-ct-import-card,
.report-workbench-actions,
.report-workbench-analysis-panel {
  background: var(--report-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.report-workbench-meta-panel:hover,
.report-workbench-meta-import-panel:hover,
.report-workbench-analysis-panel:hover {
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);
  border-color: rgba(255, 255, 255, 0.88);
}

.report-workbench-meta-panel,
.report-workbench-meta-import-panel,
.report-workbench-actions,
.report-workbench-analysis-panel {
  padding: 16px;
}

.report-workbench-meta-import-panel {
  display: grid;
  gap: 12px;
}

.report-workbench-meta-import-panel__head,
.report-workbench-meta-import-panel__upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-workbench-meta-import-panel__copy {
  min-width: 0;
}

.report-workbench-meta-import-panel__copy h4 {
  margin: 0 0 4px;
  color: var(--report-ink);
  font-family: var(--font-heading);
  font-size: 19px;
}

.report-workbench-meta-import-panel__upload > .form-group,
.report-workbench-meta-import-panel__upload > .shiny-input-container {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.report-workbench-meta-import-panel__upload .input-group {
  width: 100%;
}

.report-workbench-template-download,
.report-workbench-template-clear {
  flex: 0 0 auto;
  min-height: 40px;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.report-workbench-template-download {
  border: 1px solid rgba(11, 107, 94, 0.24) !important;
  background: rgba(11, 107, 94, 0.08) !important;
  color: var(--report-accent-deep) !important;
}

.report-workbench-template-clear {
  border: 1px solid rgba(20, 42, 52, 0.12) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--report-muted) !important;
}

.report-workbench-template-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 42, 52, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--report-muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-workbench-template-status.is-ready {
  border-color: rgba(45, 122, 79, 0.22);
  background: rgba(45, 122, 79, 0.08);
  color: var(--report-success);
}

.report-workbench-template-status.is-warning {
  border-color: rgba(184, 133, 42, 0.24);
  background: rgba(184, 133, 42, 0.08);
  color: var(--report-warning);
}

.report-workbench-template-status.is-error {
  border-color: rgba(181, 64, 58, 0.24);
  background: rgba(181, 64, 58, 0.08);
  color: var(--report-error);
}

.report-workbench-meta-manual-launch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(11, 107, 94, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--report-accent-deep);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.report-workbench-meta-manual-launch:hover,
.report-workbench-meta-manual-launch:focus-visible {
  border-color: rgba(11, 107, 94, 0.34);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 22px rgba(11, 107, 94, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.report-workbench-meta-manual-launch__title {
  color: var(--report-accent-deep);
  font-size: 13px;
  font-weight: 700;
}

.report-workbench-meta-manual-launch__action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--report-accent);
  font-size: 12px;
  font-weight: 700;
}



.report-workbench-panel-head h4,
.report-ct-import-card__head h4 {
  margin: 0 0 6px;
  color: var(--report-ink);
  font-family: var(--font-heading);
  font-size: 21px;
}

.report-workbench-meta-section + .report-workbench-meta-section {
  margin-top: 10px;
  padding-top: 10px;
}

.report-workbench-meta-disclosure {
  margin-top: 12px;
  border: 1px solid rgba(11, 107, 94, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 107, 94, 0.04), rgba(255, 255, 255, 0.6));
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.report-workbench-meta-disclosure::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--report-accent) 0%, rgba(11, 107, 94, 0.4) 100%);
  border-radius: 14px 0 0 14px;
}

.report-workbench-meta-disclosure[open] {
  border-color: rgba(11, 107, 94, 0.24);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 16px rgba(11, 107, 94, 0.06);
}

.report-workbench-meta-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 12px 20px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.report-workbench-meta-disclosure > summary:hover {
  background: rgba(11, 107, 94, 0.05);
}

.report-workbench-meta-disclosure > summary::-webkit-details-marker {
  display: none;
}

.report-workbench-meta-disclosure__title {
  color: var(--report-accent-deep);
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-workbench-meta-disclosure__hint {
  color: var(--report-accent);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.report-workbench-meta-disclosure__hint::after {
  content: '▸';
  font-size: 10px;
  transition: transform 0.25s ease;
}

.report-workbench-meta-disclosure[open] .report-workbench-meta-disclosure__hint::after {
  transform: rotate(90deg);
}

.report-workbench-meta-disclosure__body {
  padding: 0 16px 14px 20px;
}

.report-workbench-meta-section__title {
  margin-bottom: 6px;
  color: var(--report-ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.report-workbench-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.report-workbench-field-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-workbench-meta-panel .form-group,
.report-workbench-meta-panel .shiny-input-container,
.report-workbench-analysis-panel .form-group,
.report-workbench-analysis-panel .shiny-input-container,
.report-ct-import-card .form-group,
.report-ct-import-card .shiny-input-container {
  margin-bottom: 0;
}

.report-workbench-meta-panel .control-label,
.report-workbench-analysis-panel .control-label,
.report-ct-import-card .control-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--report-ink);
  margin-bottom: 4px;
}

.report-workbench-meta-panel .form-control,
.report-workbench-analysis-panel .form-control,
.report-ct-import-card .form-control {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(20, 42, 52, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  color: var(--report-ink);
  padding: 7px 12px;
  font-size: 13px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.report-workbench-meta-panel textarea.form-control,
.report-workbench-analysis-panel textarea.form-control,
.report-ct-import-card textarea.form-control {
  min-height: 56px;
}

.report-workbench-meta-panel .form-control:hover,
.report-workbench-analysis-panel .form-control:hover,
.report-ct-import-card .form-control:hover {
  border-color: rgba(20, 42, 52, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.report-workbench-meta-panel .form-control:focus,
.report-workbench-analysis-panel .form-control:focus,
.report-ct-import-card .form-control:focus {
  border-color: rgba(11, 107, 94, 0.45);
  box-shadow: 0 0 0 4px rgba(11, 107, 94, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.02);
  background: #fff;
}

.report-workbench-settings-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(20, 42, 52, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.report-workbench-settings-summary__title {
  color: var(--report-accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-workbench-settings-summary__items {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.report-workbench-settings-summary__item {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(20, 42, 52, 0.07);
  background: rgba(252, 253, 251, 0.92);
  color: var(--report-ink);
  font-weight: 600;
}

.report-workbench-settings-summary__item > span:first-child {
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 700;
}

.report-workbench-settings-summary__items--scenarios {
  grid-template-columns: 1fr;
  gap: 8px;
}

.report-workbench-settings-summary__item--scenario {
  display: grid;
  grid-template-columns: 110px repeat(5, minmax(0, 1fr)) minmax(220px, 1.25fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
}

.report-workbench-settings-summary__scenario-name {
  color: var(--report-accent-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-right: 1px solid rgba(20, 42, 52, 0.08);
  background: rgba(241, 245, 242, 0.88);
}

.report-workbench-settings-summary__metric {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  align-content: center;
  border-right: 1px solid rgba(20, 42, 52, 0.08);
  min-width: 0;
}

.report-workbench-settings-summary__metric > span:first-child {
  color: var(--report-muted);
  font-size: 11px;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.report-workbench-settings-summary__metric > strong {
  color: var(--report-ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  min-width: 0;
  word-break: break-word;
}

.report-workbench-settings-summary__metric--distribution {
  border-right: none;
}

.report-workbench-settings-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-workbench-settings-summary__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(111, 138, 173, 0.35);
  background: rgba(244, 248, 255, 0.88);
  color: #304764;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.report-workbench-settings-summary__empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(20, 42, 52, 0.14);
  color: var(--report-soft-ink);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.82);
}

.report-workbench-core-settings {
  display: grid;
  gap: 8px;
}

.report-workbench-param-picker {
  display: grid;
  gap: 10px;
}

.report-workbench-param-picker__block {
  display: grid;
  gap: 8px;
}

.report-workbench-param-picker__label {
  color: var(--report-ink);
  font-size: 11px;
  font-weight: 700;
}

.report-workbench-param-picker__required {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-workbench-param-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 42, 52, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--report-ink);
  font-size: 12px;
  font-weight: 600;
}

.report-workbench-param-chip.is-required {
  background: rgba(240, 247, 243, 0.92);
  border-color: rgba(13, 108, 103, 0.16);
}

.report-workbench-analysis-panel .shiny-input-checkboxgroup {
  margin-bottom: 0;
}

.report-workbench-analysis-panel .checkbox-group-buttons,
.report-workbench-analysis-panel .shiny-options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.report-workbench-analysis-panel .checkbox-group-buttons .checkbox,
.report-workbench-analysis-panel .shiny-options-group .checkbox {
  margin: 0;
}

.report-workbench-analysis-panel .checkbox-group-buttons label,
.report-workbench-analysis-panel .shiny-options-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 42, 52, 0.09);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 600;
}

.report-workbench-advanced-disclosure {
  border: 1px solid rgba(11, 107, 94, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 107, 94, 0.04), rgba(255, 255, 255, 0.6));
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.report-workbench-advanced-disclosure::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--report-accent) 0%, rgba(11, 107, 94, 0.4) 100%);
  border-radius: 14px 0 0 14px;
}

.report-workbench-advanced-disclosure[open] {
  border-color: rgba(11, 107, 94, 0.24);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 16px rgba(11, 107, 94, 0.06);
}

.report-workbench-advanced-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 12px 20px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.report-workbench-advanced-disclosure > summary:hover {
  background: rgba(11, 107, 94, 0.05);
}

.report-workbench-advanced-disclosure > summary::-webkit-details-marker {
  display: none;
}

.report-workbench-advanced-disclosure__title {
  color: var(--report-accent-deep);
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.report-workbench-advanced-disclosure__hint {
  color: var(--report-accent);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.report-workbench-advanced-disclosure__hint::after {
  content: '▸';
  font-size: 10px;
  transition: transform 0.25s ease;
}

.report-workbench-advanced-disclosure[open] .report-workbench-advanced-disclosure__hint::after {
  transform: rotate(90deg);
}

.report-workbench-advanced-disclosure__body {
  padding: 0 16px 14px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(340px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.report-workbench-advanced-pane {
  min-width: 0;
}

.report-workbench-meta-section--params,
.report-workbench-meta-section--amplification {
  min-width: 0;
}

.report-workbench-field-grid--advanced-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}

.report-workbench-field-stack {
  display: grid;
  gap: 10px;
}

.report-workbench-field-stack--left {
  max-width: 420px;
}

.report-workbench-field-grid--amplification {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.report-workbench-meta-section--amplification {
  padding-top: 18px;
  border-top: 1px solid rgba(20, 42, 52, 0.08);
}

.report-workbench-advanced-side-stack {
  display: grid;
  gap: 12px;
}

.report-workbench-advanced-checks {
  display: grid;
  gap: 8px;
}

.report-workbench-advanced-checks .checkbox {
  margin-bottom: 0;
}

.report-workbench-advanced-checks label {
  min-height: auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--report-ink) !important;
}

.report-workbench-advanced-checks input[type="checkbox"] {
  margin-top: 0;
}

.report-workbench-advanced-boundary {
  margin-top: 2px;
}

.report-workbench-advanced-alpha .form-group {
  margin-bottom: 0;
}

.report-workbench-advanced-alpha .shiny-input-container > label.control-label {
  display: block;
}

.report-workbench-advanced-amplification .shiny-input-checkboxgroup {
  margin-bottom: 0;
}

.report-workbench-meta-section--amplification .shiny-input-checkboxgroup {
  margin-top: 2px;
}

.report-workbench-meta-section--amplification .checkbox {
  margin-bottom: 0;
}

.report-workbench-meta-section--amplification .checkbox input[type="checkbox"] {
  margin-top: 0;
}

.report-workbench-meta-section--amplification .shiny-input-container > label.control-label {
  display: none;
}

.report-workbench-meta-section--amplification .pk-be-boundary-inputs {
  margin-bottom: 0;
}

.report-workbench-meta-section--amplification .pk-be-boundary-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.report-workbench-meta-section--amplification .pk-be-boundary-input-field {
  min-width: 0;
}

.report-workbench-meta-section--amplification .pk-be-boundary-input-field__control .form-control {
  width: 100%;
  min-width: 0;
}

.report-workbench-meta-section--amplification .pk-be-boundary-range-separator {
  padding-top: 0;
  margin-top: 0;
  justify-content: center;
  align-self: end;
}

.report-workbench-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-ct-import-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(255, 255, 255, 0.86));
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-ct-import-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);
}

.report-ct-import-card__head {
  margin-bottom: 0;
}

.report-ct-import-card__head h4 {
  margin: 0;
}

.report-ct-import-card__actions {
  padding-top: 8px;
  border-top: 1px solid rgba(20, 42, 52, 0.06);
}

.report-ct-import-params-disclosure {
  border: 1px solid rgba(20, 42, 52, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.report-ct-import-params-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.report-ct-import-params-disclosure > summary::-webkit-details-marker {
  display: none;
}

.report-ct-import-params-disclosure__title {
  color: var(--report-ink);
  font-size: 13px;
  font-weight: 800;
}

.report-ct-import-params-disclosure__hint {
  color: var(--report-muted);
  font-size: 11px;
  font-weight: 700;
}

.report-ct-import-params-disclosure__body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(20, 42, 52, 0.06);
}

.report-ct-import-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding-top: 12px;
}

.report-ct-import-param-grid .form-group,
.report-ct-import-param-grid .shiny-input-container,
.report-ct-import-param-boundary .form-group,
.report-ct-import-param-boundary .shiny-input-container,
.report-ct-import-param-optional .form-group,
.report-ct-import-param-optional .shiny-input-container {
  margin-bottom: 0 !important;
}

.report-ct-import-param-checks {
  display: grid;
  gap: 8px;
}

.report-ct-import-param-checks .checkbox {
  margin: 0;
}

.report-ct-import-param-checks label {
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 700;
}

.report-ct-import-param-optional {
  display: grid;
  gap: 8px;
}

.report-ct-import-param-optional__label {
  color: var(--report-ink);
  font-size: 12px;
  font-weight: 800;
}

.report-ct-import-param-optional .shiny-options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.report-ct-import-param-optional .checkbox-inline {
  margin-left: 0 !important;
}

.report-ct-import-param-amplification {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  padding-top: 4px;
  border-top: 1px solid rgba(20, 42, 52, 0.06);
}

.report-ct-import-param-amplification .shiny-input-container {
  width: auto !important;
  margin-bottom: 0;
}

.report-ct-import-param-amplification .shiny-options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.report-ct-import-param-amplification .checkbox-inline {
  margin-left: 0 !important;
  font-size: 12.5px;
}

.report-ct-import-card__required-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  background: var(--report-accent-soft);
  color: var(--report-muted);
  font-size: 11px;
  line-height: 1.5;
}

.report-ct-import-card__label {
  color: var(--report-accent);
  font-weight: 700;
  white-space: nowrap;
}

.report-ct-import-analysis-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(17, 38, 56, 0.05);
  color: var(--report-muted);
}

.report-ct-import-analysis-status__label {
  font-weight: 700;
  color: var(--report-ink);
}

.report-ct-import-analysis-status.is-ready {
  background: rgba(13, 107, 102, 0.12);
}

.report-ct-import-analysis-status.is-running {
  background: rgba(204, 138, 28, 0.14);
}

.report-ct-import-analysis-status.is-error {
  background: rgba(181, 62, 54, 0.14);
}

.report-workbench-actions {
  margin-top: 4px;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.97), rgba(244, 248, 246, 0.92)),
    linear-gradient(135deg, rgba(188, 160, 100, 0.08), transparent);
  border: 1px solid rgba(11, 107, 94, 0.08);
  padding: 20px;
  display: grid;
  gap: 16px;
}

/* 双卡片网格 */
.report-workbench-output-deck__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* 操作卡片基础 */
.report-workbench-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(20, 42, 52, 0.08);
  background: rgba(255, 255, 255, 0.85);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.report-workbench-action-card:hover {
  border-color: rgba(20, 42, 52, 0.14);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

/* 图标区域 */
.report-workbench-action-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(11, 107, 94, 0.12), rgba(11, 107, 94, 0.06));
  color: var(--report-accent);
  border: 1px solid rgba(11, 107, 94, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.report-workbench-action-card:hover .report-workbench-action-card__icon {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(11, 107, 94, 0.1);
}

.report-workbench-action-card__icon--download {
  background: linear-gradient(145deg, rgba(56, 78, 86, 0.12), rgba(56, 78, 86, 0.06));
  color: #546872;
  border-color: rgba(56, 78, 86, 0.1);
}

.report-workbench-action-card:hover .report-workbench-action-card__icon--download {
  box-shadow: 0 4px 12px rgba(56, 78, 86, 0.1);
}

/* 文案区域 */
.report-workbench-action-card__body {
  flex: 1;
  min-width: 0;
}

.report-workbench-action-card__title {
  color: var(--report-ink);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
}

.report-workbench-action-card__desc {
  color: var(--report-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* 操作按钮 */
.report-workbench-generate,
.report-workbench-cancel,
.report-workbench-download {
  min-height: 38px !important;
  height: auto !important;
  width: auto !important;
  padding: 8px 20px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px !important;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  border: 0 !important;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.report-workbench-generate {
  background: linear-gradient(135deg, #0f3d42 0%, #0b6b5e 50%, #1a7a6e 100%) !important;
  box-shadow: 0 6px 18px rgba(11, 107, 94, 0.22);
  color: #fff !important;
}

.report-workbench-generate:hover {
  box-shadow: 0 10px 26px rgba(11, 107, 94, 0.3) !important;
  transform: translateY(-1px);
}

.report-workbench-generate:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(11, 107, 94, 0.16) !important;
}

.report-workbench-cancel {
  background: linear-gradient(135deg, #ad4a43 0%, #c85a52 52%, #d67163 100%) !important;
  box-shadow: 0 6px 18px rgba(181, 64, 58, 0.2);
  color: #fff !important;
}

.report-workbench-cancel:hover {
  box-shadow: 0 10px 26px rgba(181, 64, 58, 0.28) !important;
  transform: translateY(-1px);
}

.report-workbench-cancel:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(181, 64, 58, 0.14) !important;
}

.report-workbench-cancel:disabled,
.report-workbench-cancel[disabled],
.report-workbench-cancel.disabled,
.report-workbench-cancel.shinyjs-disabled,
.report-workbench-cancel[aria-disabled="true"],
.btn.disabled.report-workbench-cancel {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  opacity: 1 !important;
  color: rgba(181, 64, 58, 0.5) !important;
  background: linear-gradient(135deg, #f3e2e0, #f7ecea) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  text-decoration: none !important;
  border: 1px solid rgba(181, 64, 58, 0.12) !important;
}

.report-workbench-cancel:disabled:hover,
.report-workbench-cancel[disabled]:hover,
.report-workbench-cancel.disabled:hover,
.report-workbench-cancel.shinyjs-disabled:hover,
.report-workbench-cancel[aria-disabled="true"]:hover,
.btn.disabled.report-workbench-cancel:hover {
  transform: none;
  box-shadow: none !important;
}

.report-workbench-download {
  background: linear-gradient(135deg, #384e56, #546872) !important;
  box-shadow: 0 6px 16px rgba(56, 78, 86, 0.18);
  color: #fff !important;
}

.report-workbench-download:hover {
  box-shadow: 0 10px 24px rgba(56, 78, 86, 0.26) !important;
  transform: translateY(-1px);
}

.report-workbench-download:active {
  transform: translateY(0);
}

.report-workbench-download:disabled,
.report-workbench-download[disabled],
.report-workbench-download.disabled,
.report-workbench-download.shinyjs-disabled,
.report-workbench-download[aria-disabled="true"],
.report-workbench-download.shiny-download-link.disabled,
.btn.disabled.report-workbench-download {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  opacity: 1 !important;
  color: rgba(56, 78, 86, 0.5) !important;
  background: linear-gradient(135deg, #e4e9ec, #edf0f2) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  text-decoration: none !important;
  border: 1px solid rgba(20, 42, 52, 0.08) !important;
}

.report-workbench-download:disabled:hover,
.report-workbench-download[disabled]:hover,
.report-workbench-download.disabled:hover,
.report-workbench-download.shinyjs-disabled:hover,
.report-workbench-download[aria-disabled="true"]:hover,
.report-workbench-download.shiny-download-link.disabled:hover,
.btn.disabled.report-workbench-download:hover {
  transform: none;
  box-shadow: none !important;
}

.report-workbench-generate .fa,
.report-workbench-cancel .fa,
.report-workbench-download .fa,
.report-workbench-generate .fas,
.report-workbench-cancel .fas,
.report-workbench-download .fas {
  margin-right: 0;
}

.report-workbench-output-deck__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 16px;
}

.report-workbench-output-deck__summary-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 42, 52, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--report-muted);
}

.report-workbench-output-deck__summary-label {
  color: var(--report-ink);
  font-weight: 700;
}

.report-workbench-task-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid rgba(20, 42, 52, 0.07);
  background: rgba(255, 255, 255, 0.75);
  color: var(--report-muted);
  transition: all 0.35s ease;
}

.report-workbench-task-status.is-running {
  background: linear-gradient(135deg, #f8edd9, #f2e4c8);
  border-color: rgba(184, 133, 42, 0.2);
  box-shadow: 0 4px 16px rgba(184, 133, 42, 0.08);
}

.report-workbench-task-status.is-ready {
  background: linear-gradient(135deg, #e8f5ed, #dff0e5);
  border-color: rgba(45, 122, 79, 0.2);
  box-shadow: 0 4px 16px rgba(45, 122, 79, 0.08);
}

.report-workbench-task-status.is-error {
  background: linear-gradient(135deg, #fce8e7, #f8dada);
  border-color: rgba(181, 64, 58, 0.2);
  box-shadow: 0 4px 16px rgba(181, 64, 58, 0.08);
}

.report-workbench-task-status__label {
  color: var(--report-ink);
  font-weight: 700;
  white-space: nowrap;
  font-size: 13px;
}

.report-workbench-task-status__body {
  flex: 1;
  display: grid;
  gap: 8px;
}

.report-workbench-task-status__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.report-workbench-task-status__stage {
  color: var(--report-ink);
  font-weight: 700;
  font-size: 13px;
}

.report-workbench-task-status__percent {
  color: var(--report-muted);
  font-weight: 700;
  font-size: 13px;
}

.report-workbench-task-status__bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 42, 52, 0.07);
  overflow: hidden;
  position: relative;
}

.report-workbench-task-status__bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b6b5e 0%, #1a8a7a 50%, #245d7b 100%);
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.report-workbench-task-status.is-running .report-workbench-task-status__bar-fill {
  background: linear-gradient(90deg, #b8852a 0%, #d4a03a 50%, #c49030 100%);
}

.report-workbench-task-status.is-running .report-workbench-task-status__bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  animation: report-bar-shimmer 1.8s ease-in-out infinite;
}

@keyframes report-bar-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.report-workbench-task-status.is-ready .report-workbench-task-status__bar-fill {
  background: linear-gradient(90deg, #2d7a4f 0%, #3a9960 100%);
}

.report-workbench-task-status.is-error .report-workbench-task-status__bar-fill {
  background: linear-gradient(90deg, #b5403a 0%, #d04e46 100%);
}

.report-workbench-task-status__message {
  font-size: 12px;
  line-height: 1.4;
  color: var(--report-muted);
}

.report-ct-import-card .btn-primary {
  min-height: 36px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #0f3d42 0%, #0b6b5e 50%, #1a7a6e 100%);
  box-shadow: 0 6px 16px rgba(11, 107, 94, 0.18);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.report-ct-import-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(11, 107, 94, 0.24);
}

.report-ct-import-card .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(11, 107, 94, 0.14);
}

/* Report workbench: compact layout aligned with the main application shell. */
.report-workbench-shell {
  --report-bg: var(--ui-surface-muted, #f6f9fc);
  --report-panel: var(--ui-surface-strong, #fff);
  --report-panel-strong: var(--ui-surface-strong, #fff);
  --report-border: #c7d6e2;
  --report-rule: #dfe8ef;
  --report-ink: var(--ui-text, #142235);
  --report-muted: var(--ui-text-muted, #5f7186);
  --report-soft-ink: #7a8a9c;
  --report-accent: var(--ui-accent-strong, #0284c7);
  --report-accent-deep: #0c5f8f;
  --report-accent-soft: var(--ui-accent-soft, rgba(14, 165, 233, 0.12));
  --report-warm-soft: #f6f9fc;
  --report-accent-glow: rgba(14, 165, 233, 0.12);
  --report-success: var(--ui-success, #10b981);
  --report-warning: var(--ui-warning, #f59e0b);
  --report-error: var(--ui-danger, #ef4444);
  --report-shadow: 0 3px 10px rgba(39, 67, 91, 0.07);
  overflow: visible;
  padding: 12px;
  gap: 20px;
  border: 0;
  border-radius: 10px;
  background: #f3f6f9;
  box-shadow: none;
  animation: none;
}

.report-workbench-grain {
  display: none;
}

.report-workbench-section {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--report-border);
  border-radius: 8px;
  background: var(--report-panel-strong);
  box-shadow: var(--report-shadow);
  animation: none;
}

.report-workbench-section:nth-child(2),
.report-workbench-section:nth-child(3),
.report-workbench-section:nth-child(4) {
  animation-delay: 0s;
}

.report-workbench-section__head {
  position: relative;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 10px 15px 10px 16px;
  border-bottom: 1px solid #c7d8e5;
  background: #eaf3f9;
  box-shadow: inset 4px 0 0 #0788c8;
}

.report-workbench-section__index {
  width: 30px;
  height: 30px;
  border: 1px solid #067db8;
  border-radius: 7px;
  background: #0788c8;
  box-shadow: 0 3px 8px rgba(7, 136, 200, 0.18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 780;
  letter-spacing: 0.03em;
  transition: none;
}

.report-workbench-section--step-1 {
  border-color: #bcded8;
}

.report-workbench-section--step-1 .report-workbench-section__head {
  border-bottom-color: #c5e2dd;
  background: linear-gradient(135deg, #eef9f7 0%, #e6f4f1 100%);
  box-shadow: inset 4px 0 0 #128276;
}

.report-workbench-section--step-1 .report-workbench-section__index {
  border-color: #0d756b;
  background: #128276;
  box-shadow: 0 3px 8px rgba(18, 130, 118, 0.2);
}

.report-workbench-section--step-2 {
  border-color: #bfd6e8;
}

.report-workbench-section--step-2 .report-workbench-section__head {
  border-bottom-color: #c7ddeb;
  background: linear-gradient(135deg, #eef6fb 0%, #e7f2f9 100%);
  box-shadow: inset 4px 0 0 #0788c8;
}

.report-workbench-section--step-2 .report-workbench-section__index {
  border-color: #067db8;
  background: #0788c8;
  box-shadow: 0 3px 8px rgba(7, 136, 200, 0.2);
}

.report-workbench-section--step-3 {
  border-color: #d7cce7;
}

.report-workbench-section--step-3 .report-workbench-section__head {
  border-bottom-color: #ddd2eb;
  background: linear-gradient(135deg, #f7f3fb 0%, #f0eaf8 100%);
  box-shadow: inset 4px 0 0 #7958ad;
}

.report-workbench-section--step-3 .report-workbench-section__index {
  border-color: #6b4c9d;
  background: #7958ad;
  box-shadow: 0 3px 8px rgba(121, 88, 173, 0.2);
}

.report-workbench-section:hover .report-workbench-section__index {
  transform: none;
  box-shadow: none;
}

.report-workbench-section__copy h3 {
  margin: 0;
  color: #17283b;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.report-workbench-section__copy p {
  margin-top: 2px;
  font-size: 12px;
}

.report-workbench-section__body {
  gap: 12px;
  padding: 16px 18px 18px;
  background: #fff;
}

.report-workbench-meta-panel,
.report-workbench-meta-import-panel,
.report-ct-import-card,
.report-workbench-actions,
.report-workbench-analysis-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: border-color 0.18s ease;
}

.report-workbench-meta-panel:hover,
.report-workbench-meta-import-panel:hover,
.report-workbench-analysis-panel:hover,
.report-ct-import-card:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.report-workbench-meta-panel,
.report-workbench-meta-import-panel,
.report-workbench-actions,
.report-workbench-analysis-panel,
.report-ct-import-card {
  padding: 0;
}

.report-workbench-meta-import-panel,
.report-ct-import-card {
  gap: 10px;
}

.report-workbench-meta-import-panel__head,
.report-workbench-meta-import-panel__upload {
  gap: 10px;
}

.report-workbench-meta-import-panel__upload {
  align-items: flex-start;
}

.report-workbench-meta-import-panel__upload > .form-group,
.report-workbench-meta-import-panel__upload > .shiny-input-container {
  max-width: calc(100% - 150px);
}

.report-workbench-meta-import-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.report-workbench-meta-import-panel__copy h4,
.report-workbench-panel-head h4,
.report-ct-import-card__head h4 {
  margin: 0;
  color: var(--report-ink);
  font-family: var(--font-heading, "Segoe UI", sans-serif);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.report-workbench-template-download,
.report-workbench-template-clear {
  min-height: 36px;
  padding: 7px 12px !important;
  border-radius: 6px !important;
  font-size: 12.5px !important;
}

.report-workbench-template-download {
  border-color: #9dcfe8 !important;
  background: #eef8fd !important;
  color: var(--report-accent-deep) !important;
}

.report-workbench-template-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  min-height: 43px;
  border-color: var(--report-border) !important;
  background: #fff !important;
  color: var(--report-muted) !important;
}

.report-workbench-template-status {
  padding: 9px 0 0;
  border: 1px solid var(--report-rule);
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.report-workbench-template-status.is-ready,
.report-workbench-template-status.is-warning,
.report-workbench-template-status.is-error {
  border-color: var(--report-rule);
  background: transparent;
}

.report-workbench-meta-manual-launch {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--report-border);
  border-radius: 6px;
  background: #fff;
  color: var(--report-muted);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.report-workbench-meta-manual-launch:hover,
.report-workbench-meta-manual-launch:focus-visible {
  border-color: #9dcfe8;
  background: #eef8fd;
  box-shadow: none;
  transform: none;
}

.report-workbench-meta-manual-launch__title {
  color: var(--report-ink);
}

.report-workbench-meta-manual-launch__action {
  gap: 0;
  color: var(--report-accent-deep);
}

.report-workbench-meta-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 12px;
}

.report-workbench-meta-modal::backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.report-workbench-meta-modal[open] {
  animation: none;
}

.report-workbench-meta-modal__surface {
  max-height: calc(100vh - 32px);
  border-color: #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.24);
}

.report-workbench-meta-modal__head,
.report-workbench-meta-modal__footer {
  gap: 12px;
  padding: 12px 16px;
  background: #f6f8fb;
}

.report-workbench-meta-modal__head {
  border-bottom-color: var(--report-border);
}

.report-workbench-meta-modal__head h3 {
  font-family: var(--font-heading, "Segoe UI", sans-serif);
  font-size: 17px;
  font-weight: 750;
}

.report-workbench-meta-modal__close {
  width: 32px;
  height: 32px;
  border-color: var(--report-border);
  border-radius: 6px;
  background: #fff;
}

.report-workbench-meta-modal__body {
  padding: 14px 16px;
  background: #fff;
}

.report-workbench-meta-modal__form {
  padding: 12px;
  border-color: var(--report-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.report-workbench-meta-modal__form .control-label {
  margin-bottom: 4px;
  color: var(--report-ink);
  font-size: 11px;
  font-weight: 700;
}

.report-workbench-meta-modal__form .form-control,
.report-workbench-meta-panel .form-control,
.report-workbench-analysis-panel .form-control,
.report-ct-import-card .form-control {
  min-height: 36px;
  padding: 6px 10px;
  border-color: var(--report-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.report-workbench-meta-modal__form .form-control:focus,
.report-workbench-meta-panel .form-control:focus,
.report-workbench-analysis-panel .form-control:focus,
.report-ct-import-card .form-control:focus {
  border-color: var(--ui-accent, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.report-workbench-meta-modal__footer {
  border-top-color: var(--report-border);
}

.report-workbench-meta-modal__done {
  min-height: 36px;
  border-color: var(--ui-accent-strong, #0284c7);
  border-radius: 6px;
  background: var(--ui-accent-strong, #0284c7);
}

/* ==========================================================================
   Report Workbench - Metadata Manual Modal (补充与修改弹窗) Premium Design
   ========================================================================== */

.report-workbench-meta-modal {
  width: min(1040px, calc(100vw - 32px));
  max-width: 1040px;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #1e293b;
  box-shadow: none;
  overflow: visible;
}

.report-workbench-meta-modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.report-workbench-meta-modal[open] {
  animation: report-meta-modal-pop 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes report-meta-modal-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.report-workbench-meta-modal__surface {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Modal Header */
.report-workbench-meta-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.report-workbench-meta-modal__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.report-workbench-meta-modal__title-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a7dcd2;
  border-radius: 9px;
  background: #e6f5f2;
  color: #0f766e;
  font-size: 15px;
}

.report-workbench-meta-modal__head h3 {
  margin: 0;
  color: #0f172a;
  font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.report-workbench-meta-modal__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.report-workbench-meta-modal__close:hover,
.report-workbench-meta-modal__close:focus-visible {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #ef4444;
  outline: none;
}

/* Modal Body */
.report-workbench-meta-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 24px 20px;
  background: #ffffff;
  overscroll-behavior: contain;
}

.report-workbench-meta-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Sections — Frameless, accent-strip step flow */
.report-workbench-meta-section {
  padding: 20px 0 4px;
  border: 0;
  background: transparent;
}

.report-workbench-meta-section + .report-workbench-meta-section {
  margin-top: 0;
  padding-top: 12px;
  border-top: none;
}

.report-workbench-meta-section__header {
  margin-bottom: 16px;
}

.report-workbench-meta-section__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border-radius: 8px;
  color: #1e293b;
  font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

/* section header background tints by type */
.report-workbench-meta-section--basic .report-workbench-meta-section__title {
  background: linear-gradient(90deg, #f0fdf9 0%, #f8fffd 100%);
  border-left: 3px solid #34d399;
}

.report-workbench-meta-section--trial .report-workbench-meta-section__title {
  background: linear-gradient(90deg, #f0f8ff 0%, #f8fcff 100%);
  border-left: 3px solid #60a5fa;
}

.report-workbench-meta-section--supplement .report-workbench-meta-section__title {
  background: linear-gradient(90deg, #faf5ff 0%, #fdfbff 100%);
  border-left: 3px solid #a78bfa;
}

.report-workbench-meta-section__badge {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", Monaco, monospace;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.report-workbench-meta-section--basic .report-workbench-meta-section__badge {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.report-workbench-meta-section--trial .report-workbench-meta-section__badge {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.report-workbench-meta-section--supplement .report-workbench-meta-section__badge {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.report-workbench-meta-section__text {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

/* Grids inside Sections */
.report-workbench-meta-modal__form .report-workbench-field-grid {
  display: grid;
  gap: 12px 16px;
}

.report-workbench-field-grid--basic-top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.report-workbench-field-grid--basic-bottom {
  grid-template-columns: 1fr;
}

.report-workbench-field-grid--trial-top {
  grid-template-columns: 1fr 1.3fr 1.3fr;
  margin-bottom: 12px;
}

.report-workbench-field-grid--trial-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-workbench-field-grid--supplement {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Form Controls & Inputs */
.report-workbench-meta-modal__form .report-workbench-field {
  min-width: 0;
}

.report-workbench-meta-modal__form .form-group,
.report-workbench-meta-modal__form .shiny-input-container {
  margin-bottom: 0;
  width: 100%;
}

.report-workbench-meta-modal__form .control-label {
  display: block;
  margin-bottom: 5px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.report-workbench-meta-modal__form .form-control {
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.report-workbench-meta-modal__form .form-control:hover {
  border-color: #9ca3af;
}

.report-workbench-meta-modal__form .form-control:focus {
  border-color: #0f766e;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.report-workbench-meta-modal__form textarea.form-control {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

/* Date input tweaks */
.report-workbench-meta-modal__form .input-group {
  width: 100%;
}

.report-workbench-meta-modal__form .input-group-addon {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f9fafb;
  color: #6b7280;
}

.report-workbench-meta-modal__form .input-group .form-control {
  border-radius: 8px 0 0 8px;
}

/* Modal Footer */
.report-workbench-meta-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.report-workbench-meta-modal__footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.report-workbench-meta-modal__cancel {
  min-height: 36px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.report-workbench-meta-modal__cancel:hover,
.report-workbench-meta-modal__cancel:focus-visible {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #1e293b;
  outline: none;
}

.report-workbench-meta-modal__done {
  min-height: 36px;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.22);
  cursor: pointer;
  transition: all 0.16s ease;
}

.report-workbench-meta-modal__done:hover,
.report-workbench-meta-modal__done:focus-visible {
  border-color: #115e59;
  background: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.32);
  transform: translateY(-1px);
  outline: none;
}

.report-workbench-meta-modal__done:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

@media (max-width: 991px) {
  .report-workbench-field-grid--basic-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-workbench-field-grid--trial-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .report-workbench-meta-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .report-workbench-meta-modal__head {
    padding: 14px 16px;
  }
  .report-workbench-meta-modal__body {
    padding: 14px 16px;
  }
  .report-workbench-field-grid--basic-top,
  .report-workbench-field-grid--trial-bottom,
  .report-workbench-field-grid--supplement {
    grid-template-columns: 1fr;
  }
  .report-workbench-meta-modal__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }
  .report-workbench-meta-modal__footer-actions {
    display: flex;
    width: 100%;
  }
  .report-workbench-meta-modal__cancel,
  .report-workbench-meta-modal__done {
    flex: 1 1 50%;
  }
}

.report-workbench-meta-disclosure,
.report-workbench-advanced-disclosure,
.report-ct-import-params-disclosure,
.report-workbench-settings-summary {
  border-color: var(--report-border);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.report-workbench-meta-disclosure::before,
.report-workbench-advanced-disclosure::before {
  display: none;
}

.report-workbench-meta-disclosure > summary,
.report-workbench-advanced-disclosure > summary,
.report-ct-import-params-disclosure > summary {
  padding: 9px 12px;
}

.report-workbench-meta-disclosure__body,
.report-workbench-advanced-disclosure__body,
.report-ct-import-params-disclosure__body {
  padding: 0 12px 12px;
}

.report-workbench-settings-summary {
  padding: 10px 12px;
}

.report-workbench-settings-summary__item,
.report-workbench-settings-summary__empty,
.report-workbench-settings-summary__chip,
.report-ct-import-card__required-fields,
.report-ct-import-analysis-status {
  border-radius: 6px;
}

.report-workbench-mode-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--report-rule);
}

.report-workbench-mode-picker__label {
  flex: 0 0 auto;
  color: var(--report-ink);
  font-size: 12px;
  font-weight: 750;
}

.report-workbench-mode-picker > .shiny-html-output {
  width: auto;
  min-width: 0;
}

.report-workbench-mode-picker__binding {
  display: none !important;
}

.report-workbench-mode-picker__choices {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: #edf2f6;
}

.report-workbench-mode-picker__option.btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--report-muted) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.report-workbench-mode-picker__option.btn:hover,
.report-workbench-mode-picker__option.btn:focus-visible {
  background: #e8f2f8 !important;
  color: var(--report-accent-deep) !important;
}

.report-workbench-mode-picker__option.btn.is-active,
.report-workbench-mode-picker__option.btn.is-active:disabled {
  opacity: 1 !important;
  border-color: transparent !important;
  background: #d9eff9 !important;
  color: var(--report-accent-deep) !important;
  box-shadow: none !important;
  cursor: default;
}

.report-workbench-mode-confirm {
  color: var(--ui-text, #142235);
}

.report-workbench-mode-confirm__transition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.report-workbench-mode-confirm__mode {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #d7e0e9;
  border-radius: 9px;
  background: #f8fafc;
}

.report-workbench-mode-confirm__mode--next {
  border-color: #9dcfe8;
  background: #eef8fd;
}

.report-workbench-mode-confirm__mode-label {
  color: #6b7d90;
  font-size: 11px;
  font-weight: 700;
}

.report-workbench-mode-confirm__mode strong {
  overflow: hidden;
  color: #26384c;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-workbench-mode-confirm__mode--next strong {
  color: #0c5f8f;
}

.report-workbench-mode-confirm__arrow {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9ddef;
  border-radius: 50%;
  background: #fff;
  color: #0284c7;
}

.report-workbench-mode-confirm__notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #f1d6a8;
  border-radius: 8px;
  background: #fff9ed;
  color: #6e562d;
  font-size: 12.5px;
  line-height: 1.55;
}

.report-workbench-mode-confirm__notice-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #c88418;
}

.report-workbench-mode-confirm-modal .modal-dialog {
  width: calc(100vw - 24px) !important;
  max-width: 600px !important;
  margin: 10vh auto 24px;
}

.report-workbench-mode-confirm-modal .modal-content {
  overflow: hidden;
  border: 1px solid #cbd7e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 35, 56, 0.24);
}

.report-workbench-mode-confirm-modal .modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid #dce5ed;
  background: linear-gradient(135deg, #f7fbfe 0%, #eef6fb 100%);
}

.report-workbench-mode-confirm-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #142235;
  font-family: var(--font-heading, "Segoe UI", sans-serif);
  font-size: 18px;
  font-weight: 750;
}

.report-workbench-mode-confirm__title-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9ddef;
  border-radius: 8px;
  background: #e7f4fb;
  color: #0c6f9f;
  font-size: 14px;
}

.report-workbench-mode-confirm-modal .modal-body {
  padding: 22px;
  background: #fff;
}

.report-workbench-mode-confirm-modal .modal-footer {
  padding: 14px 22px;
  border-top: 1px solid #dce5ed;
  background: #f7f9fb;
}

.report-workbench-mode-confirm-modal .modal-footer .btn {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}

.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__cancel {
  border-color: #cbd7e2 !important;
  background: #fff !important;
  color: #526579 !important;
  box-shadow: none !important;
}

.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__cancel:hover,
.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__cancel:focus-visible {
  border-color: #9eb1c3 !important;
  background: #f1f5f9 !important;
}

.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: #0284c7 !important;
  background: #0284c7 !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.2) !important;
}

.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__submit:hover,
.report-workbench-mode-confirm-modal .report-workbench-mode-confirm__submit:focus-visible {
  border-color: #036fa7 !important;
  background: #036fa7 !important;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25) !important;
}

@media (max-width: 480px) {
  .report-workbench-mode-confirm__transition {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .report-workbench-mode-confirm__arrow {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .report-workbench-mode-confirm__mode strong {
    white-space: normal;
  }

  .report-workbench-mode-confirm-modal .modal-header,
  .report-workbench-mode-confirm-modal .modal-body,
  .report-workbench-mode-confirm-modal .modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.report-workbench-sources {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.report-workbench-output-deck__cards {
  gap: 0;
}

.report-workbench-source-slot {
  min-width: 0;
}

.report-workbench-source-slot .report-ct-import-card {
  padding: 0;
}

.report-ct-import-card .pk-import-action-bundle {
  padding: 6px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.report-ct-params-launch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 9px 0;
  border: 1px solid var(--report-rule);
  border-width: 1px 0;
  border-radius: 0;
  background: transparent;
  color: var(--report-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.report-ct-params-launch:hover,
.report-ct-params-launch:focus-visible {
  border-color: #b9ddef;
  color: var(--report-accent-deep);
  outline: none;
}

.report-ct-params-launch__title {
  font-size: 13px;
  font-weight: 750;
}

.report-ct-params-launch__action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--report-accent-deep);
  font-size: 11.5px;
  font-weight: 700;
}

.report-ct-params-modal {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #17263a;
  font-family: var(--font-body);
}

.report-ct-params-modal::backdrop {
  background: rgba(15, 29, 45, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.report-ct-params-modal[open] {
  animation: report-ct-params-enter 0.18s ease-out;
}

@keyframes report-ct-params-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.report-ct-params-modal__surface {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid #c7d5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 72px rgba(15, 35, 56, 0.28);
}

.report-ct-params-modal__head,
.report-ct-params-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  background: #f5f8fb;
}

.report-ct-params-modal__head {
  border-bottom: 1px solid #d8e3ec;
  background: linear-gradient(135deg, #f8fbfe 0%, #edf6fb 100%);
}

.report-ct-params-modal__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-ct-params-modal__title-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #b6dced;
  border-radius: 8px;
  background: #e5f4fb;
  color: #0b6f9f;
  font-size: 14px;
}

.report-ct-params-modal__head h3 {
  margin: 0;
  color: #142235;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.report-ct-params-modal__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #cbd8e3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #61758a;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.report-ct-params-modal__close:hover,
.report-ct-params-modal__close:focus-visible {
  border-color: #8fc7e2;
  background: #fff;
  color: #0b6f9f;
  outline: none;
  transform: translateY(-1px);
}

.report-ct-params-modal__body {
  overflow-y: auto;
  padding: 2px 20px;
  background: #fbfcfe;
  scrollbar-color: #b9c8d6 transparent;
  scrollbar-width: thin;
}

.report-ct-params-modal__body::-webkit-scrollbar {
  width: 8px;
}

.report-ct-params-modal__body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b9c8d6;
  background-clip: padding-box;
}

.report-ct-param-section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 0 18px;
}

.report-ct-param-section + .report-ct-param-section {
  border-top: 1px solid #e1e9f0;
}

.report-ct-param-section__index {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #afd9ec;
  border-radius: 8px;
  background: linear-gradient(145deg, #edf9fe 0%, #dff1fa 100%);
  box-shadow: 0 2px 5px rgba(14, 116, 164, 0.08);
  color: #0a6794;
  font-size: 12.5px;
  font-weight: 760;
}

.report-ct-param-section__title {
  color: #1b2d42;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 720;
  letter-spacing: -0.005em;
  line-height: 32px;
}

.report-ct-param-section__body {
  margin-top: 11px;
}

.report-ct-param-section .report-ct-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding-top: 0;
}

.report-ct-param-section .report-ct-param-grid--single {
  grid-template-columns: minmax(0, 520px);
}

.report-ct-param-section .form-group,
.report-ct-param-section .shiny-input-container {
  margin-bottom: 0 !important;
}

/* Each parameter uses one compact label-control row instead of a stacked field. */
.report-ct-param-section .report-ct-param-grid > .form-group,
.report-ct-param-section .report-ct-param-grid > .shiny-input-container,
.report-ct-param-section .report-ct-param-grid > [data-display-if] > .form-group,
.report-ct-param-section .report-ct-param-grid > [data-display-if] > .shiny-input-container {
  display: grid;
  grid-template-columns: max-content minmax(150px, 1fr);
  align-items: center;
  column-gap: 12px;
  min-width: 0;
}

.report-ct-param-section .report-ct-param-grid .control-label {
  margin: 0;
  white-space: nowrap;
}

.report-ct-param-section .report-ct-param-grid .selectize-control,
.report-ct-param-section .report-ct-param-grid .form-control {
  width: 100%;
  min-width: 0;
}

.report-ct-param-section .control-label,
.report-ct-param-section .report-ct-import-param-optional__label {
  margin-bottom: 6px;
  color: #40556b;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.report-ct-param-section .form-control {
  min-height: 40px;
  padding: 8px 11px;
  border-color: #c7d4df;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
  color: #1c2e42;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.report-ct-param-section .form-control:hover {
  border-color: #a8bac9;
}

.report-ct-param-section .form-control:focus,
.report-ct-param-section .selectize-input.focus {
  border-color: #42a6d5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.report-ct-param-section .form-control::placeholder {
  color: #8a99a8;
  font-weight: 450;
}

.report-ct-param-section .report-ct-import-param-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.report-ct-param-section .checkbox,
.report-ct-param-section .checkbox-inline {
  color: #485e74;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 520;
  line-height: 1.45;
}

.report-ct-param-section .checkbox label,
.report-ct-param-section label.checkbox-inline {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.report-ct-param-section .checkbox {
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.16s ease, color 0.16s ease;
}

.report-ct-param-section .checkbox:hover,
.report-ct-param-section .checkbox-inline:hover {
  background: #eef7fc;
  color: #1d506e;
}

.report-ct-param-section input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #0788c8;
}

.report-ct-param-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.8fr);
  gap: 18px;
}

.report-ct-param-output-grid > .report-ct-import-param-optional,
.report-ct-param-output-grid > .report-ct-import-param-amplification {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
}

.report-ct-param-output-grid .report-ct-import-param-optional__label {
  margin: 7px 0 0;
  white-space: nowrap;
}

.report-ct-param-output-grid .shiny-options-group {
  min-width: 0;
}

.report-ct-import-param-amplification {
  display: grid;
  align-content: start;
  gap: 9px;
}

.report-ct-import-param-amplification .shiny-options-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.report-ct-import-param-amplification .checkbox-inline {
  margin-left: 0 !important;
}

.report-ct-params-modal__footer {
  justify-content: flex-end;
  border-top: 1px solid #d8e3ec;
  background: #f5f8fb;
}

.report-ct-params-modal__done {
  min-width: 92px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1px solid #0284c7;
  border-radius: 7px;
  background: #0284c7;
  box-shadow: 0 6px 15px rgba(2, 132, 199, 0.2);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.report-ct-params-modal__done:hover,
.report-ct-params-modal__done:focus-visible {
  border-color: #036fa7;
  background: #036fa7;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.25);
  outline: none;
  transform: translateY(-1px);
}

.report-ct-import-card__actions {
  padding-top: 10px;
  border-top-color: var(--report-rule);
}

/* PK report step 2: scenario task cards. */
.report-workbench-sources {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.report-workbench-section--step-2:has(.report-workbench-mode-picker__binding input[value="dual"]:checked) .report-workbench-sources {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-workbench-source-slot,
.report-workbench-source-slot .report-ct-import-card {
  min-width: 0;
  height: 100%;
}

.report-workbench-source-slot .report-ct-import-card {
  gap: 14px;
  padding: 16px;
  border: 1px solid #d7e5ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbfe 100%);
}

/* Single-source reports use the available width as a horizontal workspace. */
.report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-import-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  grid-template-areas:
    "head head"
    "source params"
    "source actions";
  align-items: stretch;
  column-gap: 18px;
}

.report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-import-card__head {
  grid-area: head;
}

.report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-import-task--source {
  grid-area: source;
}

.report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-params-launch {
  grid-area: params;
}

.report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-import-card__actions {
  grid-area: actions;
}

.report-ct-import-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid #dce7ef;
}

.report-ct-import-card__head h4 {
  font-size: 16px;
}

.report-ct-import-card__status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d5e1ea;
  border-radius: 999px;
  background: #f4f7f9;
  color: #617587;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.report-ct-import-card__status-badge.is-mapping {
  border-color: #ead5a8;
  background: #fff9ec;
  color: #8b6723;
}

.report-ct-import-card__status-badge.is-ready-to-run,
.report-ct-import-card__status-badge.is-running {
  border-color: #a9d5ea;
  background: #edf8fd;
  color: #0877ab;
}

.report-ct-import-card__status-badge.is-ready {
  border-color: #afdccf;
  background: #edf9f5;
  color: #137663;
}

.report-ct-import-card__status-badge.is-error {
  border-color: #e7bdb9;
  background: #fff3f2;
  color: #a3453d;
}

.report-ct-import-task,
.report-ct-params-launch {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.report-ct-import-task--source {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  padding: 13px;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  background: #fff;
}

.report-ct-import-task__index {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8dced;
  border-radius: 7px;
  background: #eaf6fc;
  color: #0877ab;
  font-size: 11px;
  font-weight: 800;
}

.report-ct-import-task__content,
.report-ct-import-task__content .shared-import-mapping-shell {
  width: 100%;
  min-width: 0;
}

.report-ct-import-card .pk-import-action-bundle {
  gap: 9px !important;
  padding: 0;
}

.report-ct-import-card .pk-import-upload-title {
  color: #24384b;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.report-ct-import-card .pk-import-upload-actions {
  gap: 7px;
}

.report-ct-import-card .report-ct-mapping-action {
  width: auto;
  min-width: 0;
  height: 32px;
  gap: 6px;
  padding: 5px 9px;
  border-color: #b8dced;
  border-radius: 6px;
  background: #f0f8fc;
  color: #0877ab;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.report-ct-import-card .report-ct-mapping-action:hover,
.report-ct-import-card .report-ct-mapping-action:focus {
  border-color: #7fc2e2;
  background: #e7f5fb;
  color: #056b9c;
}

.report-ct-import-card .pk-import-file-wrap,
.report-ct-import-card .pk-import-file-wrap > .form-group,
.report-ct-import-card .pk-import-file-wrap .shiny-input-container,
.report-ct-import-card .pk-import-file-wrap .input-group {
  width: 100% !important;
  max-width: none !important;
}

.report-ct-import-card .pk-import-file-wrap .input-group {
  display: flex;
}

.report-ct-import-card .pk-import-file-wrap .form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.report-ct-params-launch {
  width: 100%;
  min-height: 58px;
  padding: 12px 13px;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  background: #fff;
}

.report-ct-params-launch:hover,
.report-ct-params-launch:focus-visible {
  border-color: #9ccfe6;
  background: #f6fbfe;
}

.report-ct-params-launch__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-ct-params-launch__title {
  color: #24384b;
  font-size: 12.5px;
}

.report-ct-params-launch__summary {
  overflow: hidden;
  color: #6b8092;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-ct-params-launch__action {
  font-size: 11px;
  white-space: nowrap;
}

.report-ct-import-card__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #dce7ef;
}

.report-ct-import-card__actions > .shiny-html-output {
  min-width: 0;
}

.report-ct-import-analysis-status {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.report-ct-import-analysis-status.is-ready,
.report-ct-import-analysis-status.is-running,
.report-ct-import-analysis-status.is-error {
  background: transparent;
}

.report-ct-import-analysis-status__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-ct-import-analysis-status__label {
  color: #24384b;
  font-size: 12px;
  font-weight: 750;
}

.report-ct-import-analysis-status__message {
  overflow: hidden;
  color: #6b8092;
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-ct-import-analysis-status__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #667b8d;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.report-ct-import-analysis-status.is-running .report-ct-import-analysis-status__state {
  color: #0877ab;
}

.report-ct-import-analysis-status.is-ready .report-ct-import-analysis-status__state {
  color: #137663;
}

.report-ct-import-analysis-status.is-error .report-ct-import-analysis-status__state {
  color: #a3453d;
}

.report-ct-import-card .report-ct-import-card__analyze {
  min-width: 126px;
  min-height: 38px !important;
  padding: 7px 14px !important;
  white-space: nowrap;
}

.report-workbench-actions {
  margin-top: 0;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.report-workbench-output-deck__cards {
  padding-top: 2px;
  border-top: 1px solid var(--report-rule);
}

.report-workbench-action-card {
  gap: 12px;
  padding: 10px 14px 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: border-color 0.18s ease;
}

.report-workbench-action-card:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.report-workbench-action-card + .report-workbench-action-card {
  padding-right: 0;
  padding-left: 14px;
  border-left: 1px solid var(--report-rule);
}

.report-workbench-action-card__icon {
  width: 38px;
  height: 38px;
  border-color: #b9ddef;
  border-radius: 7px;
  background: #e7f4fb;
  color: var(--report-accent-deep);
  font-size: 1.05rem;
  transition: none;
}

.report-workbench-action-card:hover .report-workbench-action-card__icon,
.report-workbench-action-card:hover .report-workbench-action-card__icon--download {
  transform: none;
  box-shadow: none;
}

.report-workbench-action-card__icon--download {
  border-color: #cbd5e1;
  background: #eef2f6;
  color: #526579;
}

.report-workbench-action-card__title {
  margin-bottom: 2px;
  font-size: 13px;
}

.report-workbench-action-card__desc {
  font-size: 11.5px;
}

.report-workbench-generate,
.report-workbench-cancel,
.report-workbench-download,
.report-ct-import-card .btn-primary {
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 12px !important;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.report-workbench-generate,
.report-ct-import-card .btn-primary {
  background: var(--ui-accent-strong, #0284c7) !important;
}

.report-workbench-download {
  background: #526579 !important;
}

.report-workbench-cancel {
  background: var(--ui-danger, #ef4444) !important;
}

.report-workbench-generate:hover,
.report-workbench-cancel:hover,
.report-workbench-download:hover,
.report-ct-import-card .btn-primary:hover {
  box-shadow: none !important;
  filter: brightness(0.95);
  transform: none;
}

.report-workbench-cancel:disabled,
.report-workbench-cancel[disabled],
.report-workbench-cancel.disabled,
.report-workbench-cancel.shinyjs-disabled,
.report-workbench-cancel[aria-disabled="true"],
.btn.disabled.report-workbench-cancel,
.report-workbench-download:disabled,
.report-workbench-download[disabled],
.report-workbench-download.disabled,
.report-workbench-download.shinyjs-disabled,
.report-workbench-download[aria-disabled="true"],
.report-workbench-download.shiny-download-link.disabled,
.btn.disabled.report-workbench-download {
  border-color: #d7dee6 !important;
  background: #edf1f5 !important;
  box-shadow: none !important;
  color: #8a98a8 !important;
}

.report-workbench-output-deck__summary {
  gap: 10px;
  margin: 10px 0;
}

.report-workbench-output-deck__summary-item {
  gap: 4px;
  padding: 10px 12px;
  border-color: var(--report-border);
  border-radius: 8px;
  background: #f8fafc;
}

.report-workbench-task-status {
  gap: 10px;
  padding: 4px 0 8px;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-workbench-task-status.is-running,
.report-workbench-task-status.is-ready,
.report-workbench-task-status.is-error {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.report-workbench-task-status__bar {
  height: 6px;
}

.report-workbench-task-status__bar-fill {
  background: var(--ui-accent-strong, #0284c7);
}

/* Report workbench: keep step colors consistent across headings and actions. */
.report-workbench-section--step-1 .report-workbench-template-download {
  border-color: #83c8bd !important;
  background: #e9f7f4 !important;
  color: #0d756b !important;
}

.report-workbench-section--step-1 .btn-file {
  border-color: #83c8bd !important;
  background: #eef9f7 !important;
  color: #0d756b !important;
}

.report-workbench-section--step-1 .report-workbench-template-download:hover,
.report-workbench-section--step-1 .report-workbench-template-download:focus-visible {
  border-color: #52aa9d !important;
  background: #dcf1ed !important;
}

.report-workbench-section--step-1 .report-workbench-meta-manual-launch:hover,
.report-workbench-section--step-1 .report-workbench-meta-manual-launch:focus-visible,
.report-workbench-section--step-1 .btn-file:hover,
.report-workbench-section--step-1 .btn-file:focus-visible {
  border-color: #83c8bd !important;
  background: #eef9f7 !important;
  color: #0d756b !important;
}

.report-workbench-section--step-1 .report-workbench-template-clear {
  border-color: #e5caca !important;
  background: #fff8f7 !important;
  color: #9a4f4b !important;
}

.report-workbench-section--step-1 .report-workbench-template-clear:hover,
.report-workbench-section--step-1 .report-workbench-template-clear:focus-visible {
  border-color: #d99f9a !important;
  background: #fff0ee !important;
  color: #873d39 !important;
}

.report-workbench-section--step-2 .report-workbench-mode-picker__option.btn.is-active,
.report-workbench-section--step-2 .report-workbench-mode-picker__option.btn.is-active:disabled {
  border-color: transparent !important;
  background: #d9eff9 !important;
  color: #0877ab !important;
}

.report-workbench-section--step-2 .btn-file {
  border-color: #8ec9e5 !important;
  background: #eef7fc !important;
  color: #0877ab !important;
}

.report-workbench-section--step-2 .btn-file:hover,
.report-workbench-section--step-2 .btn-file:focus-visible,
.report-workbench-section--step-2 .report-ct-params-launch:hover,
.report-workbench-section--step-2 .report-ct-params-launch:focus-visible {
  border-color: #8ec9e5 !important;
  background: #eef7fc !important;
  color: #0877ab !important;
}

.report-workbench-section--step-2 .report-ct-import-card .btn-primary:not(:disabled):not(.disabled) {
  border-color: #0788c8 !important;
  background: #0788c8 !important;
  color: #fff !important;
}

.report-workbench-section--step-3 .report-workbench-task-status__bar-fill {
  background: #7958ad;
}

.report-workbench-section--step-3 .report-workbench-action-card:first-child .report-workbench-action-card__icon {
  border-color: #d2c2e6;
  background: #f2ecf9;
  color: #6b4c9d;
}

.report-workbench-section--step-3 .report-workbench-action-card:last-child .report-workbench-action-card__icon {
  border-color: #bcded8;
  background: #eaf7f4;
  color: #0d756b;
}

.report-workbench-section--step-3 .report-workbench-generate:not(:disabled):not(.disabled) {
  border-color: #7958ad !important;
  background: #7958ad !important;
  color: #fff !important;
}

.report-workbench-section--step-3 .report-workbench-generate:not(:disabled):not(.disabled):hover,
.report-workbench-section--step-3 .report-workbench-generate:not(:disabled):not(.disabled):focus-visible {
  border-color: #684a99 !important;
  background: #684a99 !important;
}

@media (max-width: 1199px) {
  .report-workbench-field-grid,
  .report-workbench-field-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-ct-import-param-grid {
    grid-template-columns: 1fr;
  }

  .report-workbench-settings-summary__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-workbench-settings-summary__items--scenarios {
    grid-template-columns: 1fr;
  }

  .report-workbench-settings-summary__item--scenario {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-workbench-settings-summary__scenario-name {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: 1px solid rgba(20, 42, 52, 0.08);
  }

  .report-workbench-settings-summary__metric {
    border-right: none;
    border-bottom: 1px solid rgba(20, 42, 52, 0.06);
  }

  .report-workbench-settings-summary__metric--distribution {
    grid-column: 1 / -1;
    border-bottom: none;
  }

  .report-workbench-advanced-disclosure__body {
    grid-template-columns: 1fr;
  }

  .report-workbench-field-grid--advanced-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .report-workbench-section--step-2:has(.report-workbench-mode-picker__binding input[value="dual"]:checked) .report-workbench-sources {
    grid-template-columns: 1fr;
  }

  .report-workbench-section--step-2:not(:has(.report-workbench-mode-picker__binding input[value="dual"]:checked)) .report-ct-import-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "source"
      "params"
      "actions";
    row-gap: 14px;
  }
}

@media (max-width: 767px) {
  .report-workbench-shell {
    padding: 8px;
    gap: 14px;
    border-radius: 8px;
  }

  .report-workbench-section__head {
    min-height: 48px;
    padding: 8px 11px 8px 13px;
  }

  .report-workbench-section__body {
    padding: 12px 13px 14px;
  }

  .report-workbench-meta-import-panel__head,
  .report-workbench-meta-import-panel__upload {
    align-items: stretch;
    flex-direction: column;
  }

  .report-workbench-meta-import-panel__upload > .form-group,
  .report-workbench-meta-import-panel__upload > .shiny-input-container {
    width: 100%;
    max-width: none;
  }

  .report-workbench-meta-import-panel__actions {
    width: 100%;
  }

  .report-workbench-template-download,
  .report-workbench-template-clear {
    width: 100%;
  }

  .report-workbench-meta-manual-launch {
    flex: 1 1 auto;
    align-items: center;
    flex-direction: row;
  }

  .report-workbench-meta-import-panel__actions .report-workbench-template-download {
    flex: 1 1 auto;
    width: auto;
  }

  .report-workbench-meta-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .report-workbench-meta-modal__surface {
    max-height: calc(100vh - 20px);
    border-radius: 10px;
  }

  .report-workbench-meta-modal__head,
  .report-workbench-meta-modal__body,
  .report-workbench-meta-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .report-workbench-meta-modal__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .report-workbench-meta-modal__done {
    width: 100%;
  }

  .report-ct-params-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .report-ct-params-modal__surface {
    max-height: calc(100vh - 20px);
  }

  .report-ct-param-section {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .report-ct-param-section .report-ct-param-grid,
  .report-ct-param-section .report-ct-import-param-checks,
  .report-ct-param-output-grid {
    grid-template-columns: 1fr;
  }

  .report-ct-param-section .report-ct-param-grid--single {
    grid-template-columns: 1fr;
  }

  .report-ct-param-section .report-ct-param-grid > .form-group,
  .report-ct-param-section .report-ct-param-grid > .shiny-input-container,
  .report-ct-param-section .report-ct-param-grid > [data-display-if] > .form-group,
  .report-ct-param-section .report-ct-param-grid > [data-display-if] > .shiny-input-container,
  .report-ct-param-output-grid > .report-ct-import-param-optional,
  .report-ct-param-output-grid > .report-ct-import-param-amplification {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  .report-ct-param-output-grid .report-ct-import-param-optional__label {
    margin-top: 0;
  }

  .report-ct-params-modal__done {
    width: 100%;
  }

  .report-workbench-sources,
  .report-workbench-field-grid,
  .report-workbench-field-grid--compact,
  .report-workbench-settings-summary__items {
    grid-template-columns: 1fr;
  }

  .report-workbench-source-slot .report-ct-import-card {
    padding: 13px;
  }

  .report-ct-import-card__head {
    gap: 10px;
  }

  .report-ct-import-card__actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-ct-import-card .report-ct-import-card__analyze {
    width: 100%;
  }

  .report-workbench-field-grid--supplement .report-workbench-field--sampling {
    grid-column: auto;
  }

  .report-workbench-mode-picker {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .report-workbench-mode-picker > .shiny-html-output,
  .report-workbench-mode-picker__choices {
    width: 100%;
  }

  .report-workbench-mode-picker__option.btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  .report-workbench-field-grid--advanced-main {
    grid-template-columns: 1fr;
  }

  .report-workbench-settings-summary__item--scenario {
    grid-template-columns: 1fr;
  }

  .report-workbench-settings-summary__scenario-name {
    grid-column: auto;
    border-bottom: 1px solid rgba(20, 42, 52, 0.08);
  }

  .report-workbench-settings-summary__metric {
    border-bottom: 1px solid rgba(20, 42, 52, 0.06);
  }

  .report-workbench-settings-summary__metric--distribution {
    grid-column: auto;
    border-bottom: none;
  }

  .report-workbench-section__copy h3 {
    font-size: 15px;
  }

  .report-workbench-output-deck__cards {
    grid-template-columns: 1fr;
  }

  .report-workbench-action-card {
    padding: 10px 0;
  }

  .report-workbench-action-card + .report-workbench-action-card {
    padding: 10px 0 0;
    border-top: 1px solid var(--report-rule);
    border-left: 0;
  }

  .report-workbench-source-slot + .report-workbench-source-slot {
    padding-top: 12px;
    border-top: 1px solid var(--report-rule);
  }

  .report-ct-import-param-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .report-ct-import-card__head {
    flex-direction: column;
  }

  .report-ct-import-task--source,
  .report-ct-params-launch {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .report-ct-import-task__index {
    width: 28px;
    height: 28px;
  }

  .report-ct-params-launch__action {
    grid-column: 2;
    justify-self: start;
  }

  .report-ct-import-card .pk-import-upload-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-ct-import-card .pk-import-upload-actions {
    width: 100%;
    justify-content: space-between;
  }

  .report-ct-import-analysis-status {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .report-ct-import-analysis-status__state {
    grid-column: 2;
  }
}

/* 报告工作台 - 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .report-workbench-shell,
  .report-workbench-section {
    animation: none;
  }

  .report-workbench-task-status.is-running .report-workbench-task-status__bar-fill::after {
    animation: none;
  }

  .report-ct-import-card,
  .report-workbench-download,
  .report-workbench-generate,
  .report-ct-import-card .btn-primary,
  .report-workbench-section__index {
    transition: none;
  }
}

/* ═══════════════════════════════════════════════════
   系统 — 关于平台页面 (Premium About Page)
   ═══════════════════════════════════════════════════ */

.sys-about-container {
  padding: 0;
  background: #ffffff;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Grid Layout */
.sys-about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  padding: 40px;
  margin-top: -20px;
  flex: 1;
  overflow-y: auto;
}

.sys-about-card {
  background: white;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.sys-about-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
}

.sys-about-card__header i {
  color: #0ea5e9;
}

.sys-about-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sys-about-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.5;
}

.sys-about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

/* Version Grid */
.sys-about-version-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sys-about-version-item {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
}

.sys-about-version-item__label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.sys-about-version-item__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.sys-about-version-item__value code {
  color: #0e7490;
  background: transparent;
  padding: 0;
}

.sys-about-env-pill {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sys-about-env-pill--production { background: #dcfce7; color: #166534; }
.sys-about-env-pill--dev { background: #e0f2fe; color: #075985; }

/* Footer */
@media (max-width: 991px) {
  .sys-about-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   Module-first navigation — entry hub + focused workspaces
   ═══════════════════════════════════════════════════ */

/* Analysis pages are entered through the icon launcher, not text links. */
.navbar .nav-link[data-value="module_hub"],
.navbar .nav-link[data-value="pk_workspace"],
.navbar .nav-link[data-value="pd_workspace"],
.navbar .nav-link[data-value="nonclinical_workspace"],
.navbar .navbar-nav > li > a[data-value="module_hub"],
.navbar .navbar-nav > li > a[data-value="pk_workspace"],
.navbar .navbar-nav > li > a[data-value="pd_workspace"],
.navbar .navbar-nav > li > a[data-value="nonclinical_workspace"] {
  display: none !important;
}

.navbar .nav-item:has(> .nav-link[data-value="module_hub"]),
.navbar .nav-item:has(> .nav-link[data-value="pk_workspace"]),
.navbar .nav-item:has(> .nav-link[data-value="pd_workspace"]),
.navbar .nav-item:has(> .nav-link[data-value="nonclinical_workspace"]),
.navbar .navbar-nav > li:has(> a[data-value="module_hub"]),
.navbar .navbar-nav > li:has(> a[data-value="pk_workspace"]),
.navbar .navbar-nav > li:has(> a[data-value="pd_workspace"]),
.navbar .navbar-nav > li:has(> a[data-value="nonclinical_workspace"]) {
  display: none !important;
}

.app-menu-launcher-shell {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.app-menu-launcher.btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 6px 4px;
  padding: 0 !important;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
  box-shadow: none;
  font-size: 0.95rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-menu-launcher.btn:hover,
.app-menu-launcher.btn:focus-visible {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.app-menu-launcher.btn:active {
  color: #075985;
  background: #e0f2fe;
}

.analysis-workspace-shell {
  min-height: calc(100vh - 58px);
  background: #f6f8fb;
}

/* NC-PK and IVPT keep independent entry routes while reusing their host tabset. */
#ivpt_tabs {
  display: none !important;
}

/* ═══════════════════════════════════════════════════
   Workspace selector — Spatial OS Light
   ═══════════════════════════════════════════════════ */

@keyframes workspace-aurora-light {
  from { transform: translate3d(-4%, -3%, 0) scale(0.96); }
  to { transform: translate3d(5%, 4%, 0) scale(1.08); }
}

/* ═══════════════════════════════════════════════════
   Workspace selector — Spatial OS visual system
   ═══════════════════════════════════════════════════ */

/* Dark variant retained for future theme switching.

.module-hub {
  isolation: isolate;
  color: #f7f9fc;
  background:
    radial-gradient(circle at 14% 8%, rgba(44, 132, 255, 0.18), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(139, 92, 246, 0.16), transparent 30%),
    radial-gradient(circle at 70% 90%, rgba(20, 184, 166, 0.08), transparent 32%),
    linear-gradient(145deg, #050914 0%, #09111f 48%, #060b15 100%);
}

.module-hub::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -28%;
  left: 24%;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: linear-gradient(115deg, rgba(56, 189, 248, 0.13), rgba(168, 85, 247, 0.11));
  filter: blur(90px);
  opacity: 0.9;
  pointer-events: none;
  animation: workspace-aurora 12s ease-in-out infinite alternate;
}

.module-hub::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 46%, rgba(255, 255, 255, 0.018) 49%, transparent 52%),
    radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.24) 100%);
}

@keyframes workspace-aurora {
  from { transform: translate3d(-4%, -3%, 0) scale(0.96); }
  to { transform: translate3d(5%, 4%, 0) scale(1.08); }
}

.module-hub__backdrop {
  z-index: 0;
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(125, 158, 201, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 158, 201, 0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(125, 211, 252, 0.16) 1px, transparent 1.5px);
  background-size: 48px 48px, 48px 48px, 24px 24px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
}

.module-hub__content {
  z-index: 2;
}

.module-hub__hero {
  max-width: none;
  margin-bottom: 18px;
}

.module-hub__eyebrow {
  gap: 10px;
  min-height: 34px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(148, 184, 230, 0.18);
  color: #dbeafe;
  background: linear-gradient(135deg, rgba(20, 33, 53, 0.88), rgba(10, 19, 34, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px -22px rgba(59, 130, 246, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  letter-spacing: 0;
}

.module-hub__eyebrow-signal,
.module-entry-card__visual-signal {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.08), 0 0 14px rgba(103, 232, 249, 0.7);
}

.module-hub__eyebrow-kicker {
  color: #8fa9ca;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.module-hub__eyebrow-divider {
  width: 1px;
  height: 14px;
  background: rgba(148, 184, 230, 0.24);
}

.module-hub__eyebrow-label {
  color: #eaf2ff;
  font-size: 0.76rem;
  font-weight: 750;
}

.module-entry-card.btn,
.module-entry-card.action-button {
  --module-accent: #45c6ff;
  --module-accent-rgb: 69, 198, 255;
  --module-accent-soft: rgba(69, 198, 255, 0.13);
  color: #f8fafc;
  border: 1px solid rgba(140, 164, 198, 0.16);
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--module-accent-rgb), 0.11), transparent 31%),
    linear-gradient(145deg, rgba(20, 31, 49, 0.93), rgba(8, 16, 29, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(0, 0, 0, 0.36),
    0 30px 64px -42px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.module-entry-card--pd.btn {
  --module-accent: #a78bfa;
  --module-accent-rgb: 167, 139, 250;
  --module-accent-soft: rgba(167, 139, 250, 0.13);
}

.module-entry-card--nonclinical.btn {
  --module-accent: #34d399;
  --module-accent-rgb: 52, 211, 153;
  --module-accent-soft: rgba(52, 211, 153, 0.12);
}

.module-entry-card--ivpt.btn {
  --module-accent: #fbbf24;
  --module-accent-rgb: 251, 191, 36;
  --module-accent-soft: rgba(251, 191, 36, 0.12);
}

.module-entry-card.btn::before {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--module-accent) 20%, var(--module-accent) 72%, transparent 100%);
  box-shadow: 0 0 20px rgba(var(--module-accent-rgb), 0.45);
}

.module-entry-card.btn::after {
  right: -62px;
  bottom: -74px;
  width: 190px;
  height: 190px;
  border-color: rgba(var(--module-accent-rgb), 0.13);
  box-shadow:
    0 0 0 28px rgba(var(--module-accent-rgb), 0.022),
    0 0 0 58px rgba(var(--module-accent-rgb), 0.014);
}

.module-entry-card.btn:hover,
.module-entry-card.btn:focus-visible,
.module-entry-card.btn:active {
  color: #ffffff;
  border-color: rgba(var(--module-accent-rgb), 0.48);
  background:
    radial-gradient(circle at 86% 10%, rgba(var(--module-accent-rgb), 0.17), transparent 34%),
    linear-gradient(145deg, rgba(24, 38, 59, 0.97), rgba(9, 18, 33, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 32px 74px -38px rgba(var(--module-accent-rgb), 0.4),
    0 28px 64px -44px rgba(0, 0, 0, 0.98);
  transform: translateY(-5px);
}

.module-entry-card.btn:focus-visible {
  outline-color: rgba(var(--module-accent-rgb), 0.28);
}

.module-entry-card__icon {
  border: 1px solid rgba(var(--module-accent-rgb), 0.2);
  color: var(--module-accent);
  background:
    linear-gradient(145deg, rgba(var(--module-accent-rgb), 0.18), rgba(var(--module-accent-rgb), 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px -18px rgba(var(--module-accent-rgb), 0.9);
}

.module-entry-card__code {
  padding: 5px 9px;
  border: 1px solid rgba(var(--module-accent-rgb), 0.18);
  border-radius: 999px;
  color: var(--module-accent);
  background: rgba(var(--module-accent-rgb), 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-shadow: 0 0 16px rgba(var(--module-accent-rgb), 0.55);
}

.module-entry-card__title {
  color: #f8fafc;
  font-size: 1.24rem;
  letter-spacing: -0.015em;
}

.module-entry-card__description {
  color: #8fa2bc;
}

.module-entry-card__visual {
  border-color: rgba(var(--module-accent-rgb), 0.2);
  color: var(--module-accent);
  background:
    radial-gradient(circle at 75% 28%, rgba(var(--module-accent-rgb), 0.12), transparent 42%),
    linear-gradient(155deg, rgba(13, 26, 43, 0.96), rgba(6, 13, 24, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -24px 50px rgba(0, 0, 0, 0.18),
    0 20px 44px -34px rgba(var(--module-accent-rgb), 0.46);
}

.module-entry-card__visual::before {
  background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.08) 48%, transparent 74%);
}

.module-entry-card__visual-meta {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(204, 221, 244, 0.62);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.module-entry-card__visual-signal {
  width: 5px;
  height: 5px;
  flex-basis: 5px;
  background: var(--module-accent);
  box-shadow: 0 0 0 3px rgba(var(--module-accent-rgb), 0.08), 0 0 12px rgba(var(--module-accent-rgb), 0.72);
}

.module-entry-card__visual-gridline {
  stroke: #7890ae;
  opacity: 0.18;
}

.module-entry-card__visual-area {
  opacity: 0.14;
}

.module-entry-card__visual-line {
  filter: drop-shadow(0 0 6px rgba(var(--module-accent-rgb), 0.36));
}

.module-entry-card__visual-point {
  fill: #091422;
  filter: drop-shadow(0 0 6px rgba(var(--module-accent-rgb), 0.8));
}

.module-entry-card__feature {
  border-color: rgba(139, 164, 198, 0.16);
  color: #b8c7da;
  background: rgba(132, 153, 184, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.module-entry-card__action {
  color: var(--module-accent);
  letter-spacing: 0.02em;
}

.module-entry-card__action .fa-arrow-right {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--module-accent-rgb), 0.18);
  border-radius: 50%;
  background: rgba(var(--module-accent-rgb), 0.08);
  box-shadow: 0 0 22px -12px rgba(var(--module-accent-rgb), 0.95);
}

.module-entry-card:hover .module-entry-card__action .fa-arrow-right {
  transform: translateX(3px) rotate(-18deg);
}

.module-hub__footer {
  z-index: 2;
  color: #53647b;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) > nav.navbar,
.bslib-page-navbar:has(.tab-pane.active > .module-hub) > .navbar {
  border-right-color: rgba(120, 151, 193, 0.13) !important;
  background: rgba(5, 10, 19, 0.97) !important;
  box-shadow: 12px 0 32px -24px rgba(0, 0, 0, 0.95) !important;
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) .app-menu-launcher.btn {
  border-color: rgba(103, 232, 249, 0.2) !important;
  color: #8be9fb;
  background: linear-gradient(145deg, rgba(31, 60, 81, 0.88), rgba(12, 28, 45, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 26px -14px rgba(56, 189, 248, 0.8);
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) .navbar-nav > li > a,
.bslib-page-navbar:has(.tab-pane.active > .module-hub) .navbar-nav > li > .nav-link {
  color: #64748b !important;
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) .navbar-nav > li > a:hover,
.bslib-page-navbar:has(.tab-pane.active > .module-hub) .navbar-nav > li > a:focus-visible {
  border-color: rgba(125, 211, 252, 0.18) !important;
  color: #b8e7ff !important;
  background: rgba(56, 189, 248, 0.07) !important;
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) .app-rail-toggle {
  border-color: rgba(120, 151, 193, 0.18);
  color: #71839a;
  background: rgba(8, 16, 29, 0.98);
  box-shadow: 6px 0 18px -12px rgba(0, 0, 0, 0.95);
}

@media (max-width: 680px) {
  .module-hub__eyebrow-kicker,
  .module-hub__eyebrow-divider {
    display: none;
  }

  .module-entry-card__visual-meta {
    font-size: 0.52rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-hub::before {
    animation: none;
  }
}

*/

/* ═══════════════════════════════════════════════════
   Application shell — fixed narrow navigation rail
   ═══════════════════════════════════════════════════ */

:root {
  --app-rail-width: 72px;
}

.bslib-page-navbar {
  min-height: 100vh;
  padding-left: var(--app-rail-width) !important;
  box-sizing: border-box;
  transition: padding-left 180ms ease;
}

.bslib-page-navbar > nav.navbar,
.bslib-page-navbar > .navbar {
  position: fixed !important;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--app-rail-width) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  border-right: 1px solid #e2e8f0 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 12px 0 30px -26px rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: width 180ms ease, box-shadow 180ms ease;
}

.bslib-page-navbar > nav.navbar > .container-fluid,
.bslib-page-navbar > .navbar > .container-fluid {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  padding: 10px 8px !important;
}

.app-rail-nav-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bslib-page-navbar .navbar-toggler,
.bslib-page-navbar .navbar-toggle {
  display: none !important;
}

.bslib-page-navbar .navbar-collapse,
.bslib-page-navbar .navbar-collapse.collapse,
.bslib-page-navbar .navbar-collapse.collapsing {
  width: 100%;
  height: auto !important;
  min-height: 0;
  flex: 1 1 auto;
  flex-basis: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  overflow: visible !important;
}

.bslib-page-navbar .navbar-nav {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
}

.bslib-page-navbar .navbar-nav > li {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

.bslib-page-navbar .navbar-nav > li.bslib-nav-spacer,
.bslib-page-navbar .navbar-nav > li.nav-spacer,
.bslib-page-navbar .navbar-nav > .bslib-nav-spacer {
  width: 100%;
  min-height: 12px;
  flex: 1 1 auto !important;
}

.bslib-page-navbar .navbar-nav > li > a,
.bslib-page-navbar .navbar-nav > li > .nav-link {
  width: 46px;
  height: 46px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: #64748b !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1rem !important;
}

.bslib-page-navbar .navbar-nav > li > a:hover,
.bslib-page-navbar .navbar-nav > li > a:focus-visible,
.bslib-page-navbar .navbar-nav > li > .nav-link:hover,
.bslib-page-navbar .navbar-nav > li > .nav-link:focus-visible {
  color: #0369a1 !important;
  border-color: #dbeafe !important;
  background: #f0f9ff !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

.bslib-page-navbar .navbar-nav > li.active > a,
.bslib-page-navbar .navbar-nav > li > a.active,
.bslib-page-navbar .navbar-nav > li.active > .nav-link {
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
  border-bottom: 1px solid #bae6fd !important;
  background: #e0f2fe !important;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.04) !important;
}

.app-menu-launcher-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.app-menu-launcher.btn {
  width: 46px;
  height: 46px;
  margin: 0;
  border: 1px solid #bfdbfe !important;
  border-radius: 14px;
  color: #0369a1;
  background: linear-gradient(145deg, #f0f9ff 0%, #dbeafe 100%);
  box-shadow: 0 8px 20px -14px rgba(2, 132, 199, 0.9);
  font-size: 1rem;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-menu-launcher.btn:hover,
.app-menu-launcher.btn:focus-visible {
  color: #075985;
  border-color: #7dd3fc !important;
  background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%);
  box-shadow: 0 10px 24px -14px rgba(2, 132, 199, 0.95), 0 0 0 3px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.app-menu-launcher.btn:active {
  transform: translateY(0) scale(0.97);
}

.app-current-workspace-shell {
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-current-workspace.btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 !important;
  border: 1px solid var(--workspace-border) !important;
  border-radius: 12px;
  color: var(--workspace-accent);
  background: var(--workspace-soft);
  box-shadow: none;
  font-size: 1rem;
}

.app-current-workspace.btn:hover,
.app-current-workspace.btn:focus-visible {
  color: var(--workspace-accent);
  border-color: var(--workspace-accent) !important;
  background: var(--workspace-hover);
  box-shadow: 0 0 0 3px var(--workspace-ring);
}

.app-current-workspace--pk {
  --workspace-accent: #0284c7;
  --workspace-border: #bae6fd;
  --workspace-soft: #f0f9ff;
  --workspace-hover: #e0f2fe;
  --workspace-ring: rgba(2, 132, 199, 0.12);
}

.app-current-workspace--pd {
  --workspace-accent: #7c3aed;
  --workspace-border: #ddd6fe;
  --workspace-soft: #f5f3ff;
  --workspace-hover: #ede9fe;
  --workspace-ring: rgba(124, 58, 237, 0.12);
}

.app-current-workspace--nonclinical {
  --workspace-accent: #059669;
  --workspace-border: #a7f3d0;
  --workspace-soft: #ecfdf5;
  --workspace-hover: #d1fae5;
  --workspace-ring: rgba(5, 150, 105, 0.12);
}

.app-current-workspace--ivpt {
  --workspace-accent: #d97706;
  --workspace-border: #fde68a;
  --workspace-soft: #fffbeb;
  --workspace-hover: #fef3c7;
  --workspace-ring: rgba(217, 119, 6, 0.12);
}

.bslib-page-navbar .navbar-nav > li:has(.app-rail-toggle-shell) {
  position: static;
  width: 0;
  height: 0;
  margin: 0 !important;
}

.app-rail-toggle-shell {
  position: fixed;
  z-index: 1042;
  top: 50%;
  left: calc(var(--app-rail-width) - 12px);
  transform: translateY(-50%);
  transition: left 180ms ease;
}

.app-rail-toggle {
  width: 26px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dbe3ed;
  border-radius: 0 12px 12px 0;
  color: #64748b;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 6px 0 16px -12px rgba(15, 23, 42, 0.75);
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-rail-toggle:hover,
.app-rail-toggle:focus-visible {
  color: #0369a1;
  border-color: #bae6fd;
  outline: none;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1), 6px 0 16px -12px rgba(15, 23, 42, 0.75);
}

.app-rail-toggle i {
  transition: transform 180ms ease;
}

html.app-rail-collapsed .bslib-page-navbar {
  padding-left: 12px !important;
}

html.app-rail-collapsed .bslib-page-navbar > nav.navbar,
html.app-rail-collapsed .bslib-page-navbar > .navbar {
  width: 12px !important;
  box-shadow: none !important;
}

html.app-rail-collapsed .bslib-page-navbar .navbar-nav > li:not(:has(.app-rail-toggle-shell)),
html.app-rail-collapsed .bslib-page-navbar .navbar-nav > .bslib-nav-spacer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

html.app-rail-collapsed .app-rail-toggle-shell {
  left: 0;
}

html.app-rail-collapsed .app-rail-toggle i {
  transform: rotate(180deg);
}

.analysis-workspace-shell {
  min-height: 100vh;
}

.system-workbench-wrapper,
.system-workbench-grid {
  height: 100vh !important;
  max-height: 100vh !important;
}

#pk_workflow_tabs + .tab-content .bslib-sidebar-layout:has(.pk-workbench-sidebar),
#pd_tabs + .tab-content .bslib-sidebar-layout:has(.pk-workbench-sidebar) {
  height: calc(100vh - 44px) !important;
  max-height: calc(100vh - 44px) !important;
}

/* The report page has no sidebar layout to provide its own scroll container. */
#pk_workflow_tabs + .tab-content > .tab-pane:has(> .report-workbench-shell) {
  height: calc(100vh - 44px) !important;
  min-height: 0 !important;
  max-height: calc(100vh - 44px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
}

#ivpt_tabs + .tab-content .analysis-workspace-shell .bslib-sidebar-layout:has(.pk-workbench-sidebar) {
  height: 100vh !important;
  max-height: 100vh !important;
}

@media (max-width: 680px) {
  :root {
    --app-rail-width: 58px;
  }

  .bslib-page-navbar > nav.navbar > .container-fluid,
  .bslib-page-navbar > .navbar > .container-fluid {
    padding: 8px 5px !important;
  }

  .bslib-page-navbar .navbar-nav > li > a,
  .bslib-page-navbar .navbar-nav > li > .nav-link,
  .app-menu-launcher.btn,
  .app-current-workspace.btn {
    width: 42px;
    height: 42px;
  }

}

/* Integrated global menu: compact, aligned with each page header. */
.bslib-page-navbar,
html.app-rail-collapsed .bslib-page-navbar {
  padding-left: 0 !important;
}

.bslib-page-navbar > nav.navbar,
.bslib-page-navbar > .navbar,
html.app-rail-collapsed .bslib-page-navbar > nav.navbar,
html.app-rail-collapsed .bslib-page-navbar > .navbar {
  inset: 4px auto auto 8px;
  width: 38px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bslib-page-navbar > nav.navbar > .container-fluid,
.bslib-page-navbar > .navbar > .container-fluid {
  width: 38px !important;
  height: 36px !important;
  min-height: 36px !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  padding: 0 !important;
}

.bslib-page-navbar > nav.navbar .navbar-header,
.bslib-page-navbar > .navbar .navbar-header {
  display: none !important;
}

.bslib-page-navbar .navbar-collapse,
.bslib-page-navbar .navbar-collapse.collapse,
.bslib-page-navbar .navbar-collapse.collapsing,
.bslib-page-navbar .navbar-nav {
  width: 38px !important;
  height: 36px !important;
  min-height: 36px !important;
  flex: 0 0 38px !important;
  overflow: visible !important;
}

.bslib-page-navbar .navbar-collapse,
.bslib-page-navbar .navbar-collapse.collapse,
.bslib-page-navbar .navbar-collapse.collapsing {
  flex-direction: row !important;
}

.bslib-page-navbar .navbar-nav {
  flex-direction: row !important;
  gap: 0;
  padding: 0 !important;
}

.bslib-page-navbar .navbar-nav > li,
html.app-rail-collapsed .bslib-page-navbar .navbar-nav > li {
  display: none !important;
}

.bslib-page-navbar .navbar-nav > li:has(.app-global-menu),
html.app-rail-collapsed .bslib-page-navbar .navbar-nav > li:has(.app-global-menu) {
  display: block !important;
  width: 38px;
  height: 36px;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.bslib-page-navbar .nav-link[data-value="system_shared"],
.bslib-page-navbar a[data-value="system_shared"] {
  display: none !important;
}

.app-global-menu {
  position: relative;
  width: 36px;
  height: 36px;
}

.app-global-menu__trigger.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0 !important;
  color: #17658f !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.92rem;
  opacity: 0.9;
}

.app-global-menu__trigger.btn:hover,
.app-global-menu__trigger.btn:focus-visible {
  color: #075985 !important;
  border-color: rgba(14, 165, 233, 0.16) !important;
  background: rgba(14, 165, 233, 0.08) !important;
  box-shadow: none !important;
  opacity: 1;
}

.app-global-menu:has(.app-global-menu__popover:popover-open) .app-global-menu__trigger.btn {
  color: #0369a1 !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
  background: rgba(14, 165, 233, 0.1) !important;
  opacity: 1;
}

.app-global-menu__popover {
  position: fixed;
  inset: 48px auto auto 8px;
  z-index: 11000;
  width: 216px;
  margin: 0;
  padding: 6px;
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 46px -24px rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-global-menu__popover::backdrop {
  background: transparent;
}

.app-global-menu__popover:popover-open {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#current_workspace_launcher {
  width: 100%;
}

.app-global-menu__action.btn,
.app-global-menu__popover .app-current-workspace.btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 38px;
  margin: 0;
  padding: 7px 9px !important;
  color: #334155;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  font-size: 0.82rem;
  text-align: left;
}

.app-global-menu__action.btn:hover,
.app-global-menu__action.btn:focus-visible,
.app-global-menu__popover .app-current-workspace.btn:hover,
.app-global-menu__popover .app-current-workspace.btn:focus-visible {
  color: #075985;
  border-color: #d5e9f7;
  background: #eef8ff;
}

.app-global-menu__action.btn i,
.app-global-menu__popover .app-current-workspace.btn i {
  width: 18px;
  text-align: center;
}

#pk_workflow_tabs,
#pd_tabs,
#ivpt_tabs {
  box-sizing: border-box;
  padding-left: 52px !important;
}

/* NC-PK and IVPT hide their inner tab strip, so reserve the menu gutter on
   the first control heading instead of letting the fixed menu cover it. */
#ivpt_tabs + .tab-content .analysis-workspace-shell
  .pk-workbench-sidebar .pk-control-shell
  > .pk-control-section:first-child
  > .pk-control-section-title-row {
  box-sizing: border-box;
  padding-left: 10px;
}

.system-workbench-grid > .workbench-main-card > .card-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-left: 54px !important;
}

.bslib-page-navbar:has(.tab-pane.active > .module-hub) > nav.navbar,
.bslib-page-navbar:has(.tab-pane.active > .module-hub) > .navbar {
  display: none !important;
}

@media (max-width: 680px) {
  .bslib-page-navbar > nav.navbar,
  .bslib-page-navbar > .navbar,
  html.app-rail-collapsed .bslib-page-navbar > nav.navbar,
  html.app-rail-collapsed .bslib-page-navbar > .navbar {
    left: 4px;
  }

  .app-global-menu__popover {
    left: 4px;
    width: min(216px, calc(100vw - 12px));
  }

  #pk_workflow_tabs,
  #pd_tabs,
  #ivpt_tabs {
    padding-left: 48px !important;
  }

  .system-workbench-grid > .workbench-main-card > .card-header {
    padding-left: 50px !important;
  }
}

/* ═══════════════════════════════════════════════════
   Welcome template — analytics platform
   ═══════════════════════════════════════════════════ */

/* Scientific workspace launcher: fluid canvas and instrument-like panels. */
html:has(.tab-pane.active .module-hub),
body:has(.tab-pane.active .module-hub),
.bslib-page-navbar:has(.tab-pane.active .module-hub),
.bslib-page-navbar:has(.tab-pane.active .module-hub) > .tab-content,
.tab-content:has(> .tab-pane.active .module-hub),
.tab-pane.active:has(.module-hub),
html:has(body > .module-hub),
body:has(> .module-hub) {
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html:has(.tab-pane.active .module-hub)::-webkit-scrollbar,
body:has(.tab-pane.active .module-hub)::-webkit-scrollbar,
.bslib-page-navbar:has(.tab-pane.active .module-hub)::-webkit-scrollbar,
.bslib-page-navbar:has(.tab-pane.active .module-hub) > .tab-content::-webkit-scrollbar,
.tab-content:has(> .tab-pane.active .module-hub)::-webkit-scrollbar,
.tab-pane.active:has(.module-hub)::-webkit-scrollbar,
html:has(body > .module-hub)::-webkit-scrollbar,
body:has(> .module-hub)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.module-hub {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(123, 140, 159, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 140, 159, .045) 1px, transparent 1px),
    #eef1f5;
  background-size: 32px 32px;
  color: #252e3c;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.module-hub::before, .module-hub::after { display: none; }
.module-hub__content { width: calc(100% - clamp(48px, 6vw, 128px)); height: 100%; box-sizing: border-box; margin: 0 auto; padding: clamp(16px, 2.65vh, 24px) 0 clamp(18px, 3vh, 28px); display: flex; flex-direction: column; }
.module-hub__topbar { min-height: 40px; padding-bottom: 16px; border-bottom: 1px solid #c5cfda; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.module-hub__brand { display: flex; align-items: center; gap: 12px; }
.module-hub__brand-mark { position: relative; display: grid; place-items: center; width: 36px; height: 36px; background: linear-gradient(145deg, #31465e, #1f2e40); border: 1px solid #1d2b3b; border-radius: 8px; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 5px rgba(31,46,64,.13); font-size: 15px; }
.module-hub__brand-copy { display: grid; gap: 2px; }
.module-hub__brand-name { font-size: 14px; font-weight: 680; letter-spacing: .055em; }
.module-hub__brand-edition { color: #718092; font: 600 7px/1 var(--font-mono); letter-spacing: .13em; }
.module-hub__brand-caption { color: #727c89; font-size: 12px; border-left: 1px solid #d9dde3; padding-left: 12px; }
.module-hub__utilities { display: flex; align-items: center; gap: 10px; }
.module-hub__environment { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #d0d7df; border-radius: 5px; background: rgba(255,255,255,.5); color: #657386; font: 600 8px/1 var(--font-mono); letter-spacing: .08em; }
.module-hub__environment-dot { width: 5px; height: 5px; border-radius: 50%; background: #3d8d76; box-shadow: 0 0 0 2px rgba(61,141,118,.12); }
.module-hub .module-hub__settings.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 7px 10px !important; border: 1px solid #d0d7df; border-radius: 5px; color: #4f5f72; background: rgba(255,255,255,.5); box-shadow: none; font-family: inherit; font-size: 11px; font-weight: 550; line-height: 1.4; }
.module-hub .module-hub__settings.btn:hover { border-color: #aab7c5; background: #fff; color: #29394c; }
.module-hub__masthead { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding: clamp(16px, 2.4vh, 22px) 0; }
.module-hub__intro { min-width: 0; }
.module-hub__kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; color: #657487; font: 650 9px/1.2 var(--font-mono); letter-spacing: .16em; }
.module-hub__kicker-line { width: 22px; height: 1px; background: #8190a2; }
.module-hub__title { margin: 0; font-family: inherit; font-size: 30px; font-weight: 650; letter-spacing: -.035em; line-height: 1.35; color: #252e3c; }
.module-hub__subtitle { margin: 7px 0 0; font-size: 13px; line-height: 1.65; color: #687381; }
.module-hub__summary { display: grid; grid-template-columns: auto auto; width: min(430px, 38vw); flex: 0 0 auto; overflow: hidden; border: 1px solid #cbd4de; border-radius: 8px; background: rgba(255, 255, 255, .56); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.module-hub__summary-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid #d7dee6; color: #657487; font: 650 8px/1.2 var(--font-mono); letter-spacing: .12em; }
.module-hub__summary-head span:last-child { color: #344559; }
.module-hub__summary-modules { display: flex; align-items: center; gap: 6px; padding: 8px 12px; }
.module-hub__summary-module { min-width: 33px; padding: 4px 6px; border: 1px solid currentColor; border-radius: 4px; background: #fff; text-align: center; font: 650 9px/1 var(--font-mono); }
.module-hub__summary-module--pk { color: #3977b6; }
.module-hub__summary-module--pd { color: #8870b3; }
.module-hub__summary-module--nc { color: #419682; }
.module-hub__summary-module--ivpt { color: #a97839; }
.module-hub__summary-engine { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; padding: 7px 12px; border-left: 1px solid #d7dee6; color: #425267; font-size: 11px; white-space: nowrap; }
.module-hub__summary-engine-mark { grid-row: 1 / 3; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 5px; background: #29394c; color: #fff; font: 650 13px/1 var(--font-mono); }
.module-hub__summary-engine-meta { color: #7b8795; font: 550 7px/1.2 var(--font-mono); letter-spacing: .1em; }
.module-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 0; flex: 1; gap: clamp(12px, 2vh, 18px); }
.module-hub .module-entry-card.btn {
  --module-accent: #3977b6; --module-ink: #35699b;
  display: flex; flex-direction: column; gap: clamp(8px, 1.35vh, 12px); width: 100%; min-width: 0; min-height: 0;
  margin: 0; padding: clamp(14px, 2.4vh, 22px) 24px clamp(12px, 2vh, 18px) !important;
  color: #252e3c !important; background: #fff !important;
  position: relative; overflow: hidden;
  border: 1px solid #cbd4df !important; border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(28, 39, 55, .04), 0 5px 18px rgba(37, 50, 68, .025), inset 0 1px 0 #fff !important;
  text-align: left; white-space: normal; font-family: inherit; font-weight: 400;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.module-hub .module-entry-card.btn::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--module-accent); opacity: .68; transition: width 180ms ease, opacity 180ms ease; }
.module-hub .module-entry-card--pd.btn { --module-accent: #8870b3; --module-ink: #79619f; }
.module-hub .module-entry-card--nonclinical.btn { --module-accent: #419682; --module-ink: #337966; }
.module-hub .module-entry-card--ivpt.btn { --module-accent: #bc8c4c; --module-ink: #986b32; }
.module-hub .module-entry-card.btn:hover { background: color-mix(in srgb, var(--module-accent) 1.5%, white) !important; border-color: color-mix(in srgb, var(--module-accent) 48%, #d7dfe8) !important; box-shadow: 0 8px 24px rgba(28, 39, 55, .075) !important; }
.module-hub .module-entry-card.btn:hover::before { width: 4px; opacity: 1; }
.module-hub .module-entry-card.btn:active { background: color-mix(in srgb, var(--module-accent) 5%, white) !important; }
.module-hub .module-entry-card.btn:focus-visible, .module-hub .module-hub__settings.btn:focus-visible { outline: 3px solid #3977b6; outline-offset: 4px; }
.module-entry-card__topline { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.module-entry-card__identity { display: flex; align-items: center; gap: 10px; }
.module-entry-card__icon { display: grid; place-items: center; width: 34px; height: 34px; background: color-mix(in srgb, var(--module-accent) 9%, white); border: 1px solid color-mix(in srgb, var(--module-accent) 10%, #e5eaf0); color: var(--module-ink); border-radius: 7px; font-size: 15px; }
.module-entry-card__index { color: #748194; font: 650 8px/1.2 var(--font-mono); letter-spacing: .13em; }
.module-entry-card__code { color: var(--module-ink); font: 600 11px/1.4 var(--font-mono); letter-spacing: .09em; padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--module-accent) 20%, #e0e4e9); border-radius: 4px; }
.module-entry-card__body { display: grid; grid-template-columns: minmax(0, 1fr) 44%; align-items: center; gap: 24px; width: 100%; min-height: 0; flex: 1; }
.module-entry-card__copy { min-width: 0; box-sizing: border-box; align-self: center; padding: 4px 0; }
.module-entry-card__heading { color: #273341; font-size: 19px; font-weight: 650; line-height: 1.45; letter-spacing: -.025em; }
.module-entry-card__description { margin-top: 9px; color: #687381; font-size: 13px; line-height: 1.85; }
.module-entry-card__visual { min-width: 0; padding: 8px 0 4px 18px; border-left: 1px solid #e6ebf0; background: linear-gradient(90deg, rgba(241,244,247,.55), rgba(255,255,255,0) 54%); pointer-events: none; }
.module-entry-card__figure-label { display: flex; justify-content: space-between; gap: 8px; color: #637487; font-size: 10px; line-height: 1.5; margin-bottom: 6px; }
.module-entry-card__figure-label span:last-child { color: #7b8694; }
.module-entry-card__visual-img { display: block; width: 100%; height: auto; max-height: min(240px, 20vh); aspect-ratio: 360 / 224; object-fit: contain; }
.module-entry-card__bottom { display: flex; align-items: center; justify-content: space-between; width: 100%; border-top: 1px solid #e5eaf0; padding-top: 10px; gap: 10px; }
.module-entry-card__features { display: flex; align-items: center; gap: 6px; min-width: 0; }
.module-entry-card__feature { padding: 3px 7px; border: 1px solid #dce3ea; border-radius: 4px; background: #f7f9fb; color: #667487; font: 550 9px/1.2 var(--font-mono); white-space: nowrap; }
.module-entry-card__action { display: inline-flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid #e1e6ec; color: var(--module-ink); font-size: 11px; font-weight: 600; white-space: nowrap; }
.module-entry-card__action i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--module-accent) 7%, white); font-size: 10px; transition: transform 180ms ease; }
.module-entry-card:hover .module-entry-card__action i { transform: translateX(3px); }
/* workspace sidebar welcome note (nonclinical & IVPT sidebars) */
.module-hub__workspace-note {
  margin: 0 0 14px;
  padding: 7px 10px 7px 12px;
  border-left: 2px solid #b9c6d6;
  background: #eef2f7;
  border-radius: 0 6px 6px 0;
  color: #5d6c81; font-size: 11px; letter-spacing: .02em;
}


@media (max-width: 1000px) {
  .module-hub__content { width: calc(100% - 48px); }
  .module-hub .module-entry-card.btn { padding: 20px !important; }
  .module-entry-card__body { grid-template-columns: minmax(0, 1fr) 40%; gap: 16px; }
  .module-entry-card__heading { font-size: 17px; }
}
@media (max-width: 720px) {
  html:has(.tab-pane.active .module-hub),
  body:has(.tab-pane.active .module-hub),
  .bslib-page-navbar:has(.tab-pane.active .module-hub),
  .bslib-page-navbar:has(.tab-pane.active .module-hub) > .tab-content,
  .tab-content:has(> .tab-pane.active .module-hub),
  .tab-pane.active:has(.module-hub),
  html:has(body > .module-hub),
  body:has(> .module-hub) { overflow-y: auto !important; }
  .module-hub { height: auto; min-height: 100dvh; overflow: visible; }
  .module-hub__content { width: calc(100% - 32px); height: auto; padding: 20px 0 28px; }
  .module-hub__brand-caption { display: none; }
  .module-hub__masthead { display: block; padding: 28px 0 22px; }
  .module-hub__kicker { margin-bottom: 8px; }
  .module-hub__summary { display: none; }
  .module-hub__title { font-size: 26px; }
  .module-entry-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; gap: 14px; }
  .module-entry-card__body { grid-template-columns: minmax(0, 1fr); min-height: 100px; gap: 12px; }
}
@media (max-width: 720px) {
  .module-entry-card__visual { width: 100%; max-width: 360px; align-self: center; justify-self: center; }
  .module-entry-card__visual-img { max-height: 170px; }
}
@media (max-width: 380px) {
  .module-hub__brand { gap: 8px; }
  .module-hub__brand-name { font-size: 12px; }
  .module-entry-card__body { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .module-hub .module-entry-card.btn, .module-entry-card__action i { transition: none; }
  .module-entry-card:hover .module-entry-card__action i { transform: none; }
}
