:root {
  --blue: #1d5cff;
  --blue-2: #2c72ff;
  --blue-soft: #edf4ff;
  --ink: #101a36;
  --text: #263653;
  --muted: #70809e;
  --line: #e3e9f5;
  --panel: #ffffff;
  --bg: #f4f7fc;
  --green: #13aa67;
  --orange: #f59e0b;
  --red: #f04438;
  --gray: #8b98ad;
  --shadow: 0 18px 45px rgba(24, 42, 76, 0.08);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 18% 0%, rgba(29, 92, 255, 0.08), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(22, 193, 145, 0.08), transparent 22%),
    var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #1762ff, #2c7bff);
  box-shadow: 0 12px 30px rgba(29, 92, 255, 0.25);
}

.brand-title {
  font-size: 20px;
  color: var(--ink);
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #50617f;
  background: transparent;
  text-align: left;
  font-weight: 650;
}

.nav-item.active {
  color: white;
  background: linear-gradient(135deg, #1258ff, #176cff);
  box-shadow: 0 12px 30px rgba(29, 92, 255, 0.25);
}

.sidebar-spacer {
  flex: 1;
}

.user-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-card strong {
  color: var(--ink);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #244b7d, #0b1d3a);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 22px 30px 28px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: start;
  gap: 24px;
  margin-bottom: 18px;
}

.page-title h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: 0;
}

.page-title p {
  margin: 0;
  color: #61708d;
  line-height: 1.55;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.global-search {
  width: 430px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 35px rgba(35, 52, 84, 0.08);
}

.global-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: #52627f;
  display: grid;
  place-items: center;
  position: relative;
}

.badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--red);
  color: white;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.hero,
.panel,
.toolbar,
.filterbar,
.table-card,
.model-stats,
.model-filters {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  min-height: 146px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.hero-copy {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-icon {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eff5ff, #dce8ff);
  color: var(--blue);
}

.hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--ink);
}

.hero p {
  margin: 0 0 12px;
  color: #61708d;
}

.stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #51617d;
}

.stats-inline span + span {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.hero-actions,
.toolbar-actions,
.selection-actions,
.drawer-actions,
.modal-actions,
.form-row,
.row-actions,
.pagination,
.tabs,
.chip-list,
.field-actions,
.model-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: #263653;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.btn.primary {
  color: white;
  border-color: var(--blue);
  background: linear-gradient(135deg, #145dff, #1e72ff);
  box-shadow: 0 12px 28px rgba(29, 92, 255, 0.24);
}

.btn.soft {
  color: var(--blue);
  border-color: transparent;
  background: var(--blue-soft);
}

.btn.danger {
  color: var(--red);
  border-color: #ffd4d0;
  background: #fff4f3;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  padding: 0 8px;
}

.link-btn,
.text-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 750;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.link-btn:hover,
.text-link:hover {
  text-decoration: underline;
}

.toolbar {
  padding: 14px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.selection-hint {
  color: #637391;
}

.selection-pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.filterbar {
  padding: 14px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(140px, 0.8fr)) auto;
  gap: 12px;
  align-items: center;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  border-radius: 8px;
  outline: 0;
}

.input,
.select {
  height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.searchbox input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
}

.metric-filter {
  display: grid;
  grid-template-columns: 1fr 74px 74px;
  gap: 8px;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  height: 56px;
  padding: 0 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  height: 52px;
  color: #2c3954;
  font-size: 13px;
  background: #f8faff;
}

td {
  font-size: 14px;
  color: #273653;
}

.title-cell {
  max-width: 330px;
  white-space: normal;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.muted {
  color: var(--muted);
}

.tag,
.status,
.remain {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
}

.tag.blue {
  color: var(--blue);
  background: #eaf1ff;
}

.tag.purple {
  color: #7c3aed;
  background: #f1eaff;
}

.tag.green {
  color: var(--green);
  background: #e9f9f1;
}

.tag.orange {
  color: #d97706;
  background: #fff7e6;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status.unanalyzed {
  color: #667085;
  background: #f1f4f9;
}

.status.queued {
  color: #7c3aed;
  background: #f1eaff;
}

.status.analyzing {
  color: var(--orange);
  background: #fff7e6;
}

.status.analyzed {
  color: var(--blue);
  background: #eaf1ff;
}

.status.stored {
  color: var(--green);
  background: #e9f9f1;
}

.status.failed {
  color: var(--red);
  background: #fff0ef;
}

.status.queued .dot,
.status.analyzing .dot {
  animation: pulse 1.1s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.55; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.55; }
}

.table-footer {
  min-height: 64px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: white;
  color: #3b4b66;
  border-radius: 7px;
}

.page-btn.active {
  color: var(--blue);
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(29, 92, 255, 0.1);
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 32, 0.45);
  z-index: 40;
  display: none;
}

.overlay.show {
  display: block;
}

.modal,
.drawer {
  position: fixed;
  z-index: 50;
  background: white;
  box-shadow: -20px 0 50px rgba(23, 38, 66, 0.16);
}

.modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 34px));
  max-height: calc(100vh - 50px);
  border-radius: 8px;
  display: none;
  overflow: hidden;
}

.modal.narrow {
  width: min(520px, calc(100vw - 34px));
}

.modal.wide {
  width: min(900px, calc(100vw - 34px));
}

.modal.show,
.drawer.show {
  display: flex;
}

.modal {
  flex-direction: column;
}

.drawer {
  top: 0;
  right: 0;
  width: min(760px, 48vw);
  min-width: 640px;
  height: 100vh;
  display: none;
  flex-direction: column;
}

.modal-header,
.drawer-header {
  min-height: 70px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.drawer-header {
  align-items: flex-start;
}

.modal-header h3,
.drawer-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.modal-title-block {
  min-width: 0;
  flex: 1;
  padding-right: 12px;
}

.modal-title {
  line-height: 1.35;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-body,
.drawer-body {
  padding: 20px 24px;
  overflow: auto;
}

.modal-footer,
.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 750;
  color: #2d3a55;
  font-size: 13px;
}

.required {
  color: var(--red);
}

.tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab-btn {
  height: 42px;
  padding: 0 12px;
  background: transparent;
  color: #5b6982;
  border-bottom: 2px solid transparent;
  font-weight: 750;
}

.tab-btn.active {
  color: var(--blue);
  border-color: var(--blue);
}

.template-panel {
  border: 1px solid #cfe0ff;
  background: linear-gradient(135deg, #f4f8ff, #ffffff);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.template-panel strong {
  color: var(--ink);
  font-size: 16px;
}

.template-panel p {
  margin: 6px 0 0;
  color: #5f6d85;
  line-height: 1.6;
}

.csv-result,
.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5f8ff;
  border: 1px solid #dce8ff;
  color: #52627f;
  line-height: 1.6;
}

.danger-box {
  text-align: center;
  padding: 12px 10px 4px;
}

.danger-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  color: white;
  background: var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.danger-box h3 {
  font-size: 24px;
  margin: 0 0 12px;
  color: var(--ink);
}

.danger-box p {
  line-height: 1.8;
  margin: 0;
}

.drawer-title-block {
  min-width: 0;
  flex: 1;
  padding-right: 12px;
}

.drawer-actions {
  flex-shrink: 0;
  justify-content: flex-end;
}

.drawer-subtitle {
  margin-top: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-subtitle strong {
  flex-basis: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-grid {
  display: grid;
  gap: 14px;
}

.analysis-field {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: start;
}

.analysis-field label {
  padding-top: 11px;
  color: #2d3a55;
  font-weight: 800;
}

.sentence-list {
  display: grid;
  gap: 8px;
}

.sentence-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-item {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 13px 15px;
  border-radius: 8px;
  color: #1f2d46;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  line-height: 1.5;
}

.toast.success {
  border-left: 4px solid var(--green);
}

.toast.error {
  border-left: 4px solid var(--red);
}

.toast.info {
  border-left: 4px solid var(--blue);
}

.model-top {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.model-stats {
  padding: 24px 20px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
}

.stat-value {
  font-size: 26px;
  font-weight: 850;
  color: var(--ink);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.model-filters {
  padding: 14px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 180px) minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.provider-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: #f1f4f9;
  color: #111827;
  font-weight: 850;
  margin-right: 8px;
}

.star-btn {
  width: 34px;
  height: 34px;
  color: #a4afc1;
  border-radius: 50%;
  background: transparent;
}

.star-btn.active {
  color: #f59e0b;
}

.switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #c9d2e3;
  position: relative;
}

.switch::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}

.switch.on {
  background: var(--blue);
}

.switch.on::after {
  transform: translateX(20px);
}

.model-form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  margin-bottom: 14px;
}

.section-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.test-area {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}

.test-result {
  border-radius: 8px;
  padding: 14px;
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
  line-height: 1.6;
}

.test-result.failed {
  background: #fff1f0;
  color: #b42318;
  border-color: #fecdca;
}

.menu {
  position: fixed;
  z-index: 70;
  min-width: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
}

.menu.show {
  display: block;
}

.menu button {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  color: var(--text);
}

.menu button:hover {
  background: #f5f8ff;
}

.menu button.danger-text {
  color: var(--red);
}

.danger-text {
  color: var(--red);
}

.modal.extra-wide {
  width: min(1220px, calc(100vw - 34px));
}

.card-filterbar {
  grid-template-columns: minmax(260px, 1.5fr) repeat(6, minmax(135px, 0.8fr)) auto;
}

.card-table {
  min-width: 1380px;
}

.text-ellipsis {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-drawer {
  width: min(860px, 56vw);
  min-width: 720px;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faff;
  color: #52627f;
}

.search-test-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 180px 90px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.search-test-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.panel-lite {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.panel-lite h4 {
  margin: 0 0 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.condition-list {
  display: grid;
  gap: 10px;
}

.condition-list div {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: center;
}

.condition-list span {
  color: var(--muted);
}

.condition-list strong {
  color: var(--text);
  font-weight: 750;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-row strong {
  color: var(--ink);
}

.result-row p {
  margin: 6px 0 10px;
  color: #5d6c86;
  line-height: 1.6;
}

.search-conclusion {
  margin-top: 16px;
  border: 1px solid #b9d1ff;
  background: #edf4ff;
  color: var(--primary);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}

.rank {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--orange);
  font-weight: 850;
}

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

.sync-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 4px;
}

.sync-summary strong {
  font-size: 28px;
  color: var(--ink);
}

.sync-summary span {
  color: var(--muted);
}

.mini-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.mini-table div {
  min-height: 42px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.7fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.mini-table div:last-child {
  border-bottom: 0;
}

.empty.small {
  min-height: 110px;
}

.trash-hero {
  margin-bottom: 14px;
}

.remain.orange {
  color: #d97706;
  background: #fff7e6;
}

.remain.green {
  color: var(--green);
  background: #e9f9f1;
}

.remain.red {
  color: var(--red);
  background: #fff0ef;
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 230px 1fr;
  }
  .filterbar,
  .model-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-filterbar,
  .search-test-form,
  .search-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .model-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .drawer {
    width: min(760px, 80vw);
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .topbar,
  .hero,
  .toolbar,
  .template-panel,
  .table-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .global-search {
    width: 100%;
  }
  .filterbar,
  .model-filters,
  .card-filterbar,
  .form-grid,
  .model-stats,
  .test-area,
  .check-list,
  .search-test-form,
  .search-test-grid,
  .sync-summary,
  .result-row {
    grid-template-columns: 1fr;
  }
  .drawer {
    width: 100vw;
  }
  .analysis-field {
    grid-template-columns: 1fr;
  }
}
