body.yunxil-stock-mode {
  overflow: hidden !important;
}

.yunxil-stock-menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px !important;
  padding-left: 12px !important;
  overflow: hidden;
}

.yunxil-stock-menu-item .yunxil-stock-menu-icon {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  justify-content: center;
  margin-right: 0;
  font-size: 19px;
  font-weight: 700;
}

.yunxil-stock-menu-item .yunxil-stock-menu-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 17px;
}

body:has(.sidebar-container.collapsed) .yunxil-stock-menu-item {
  justify-content: center !important;
  gap: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

body:has(.sidebar-container.collapsed) .yunxil-stock-menu-item .yunxil-stock-menu-icon {
  margin: 0 !important;
}

body:has(.sidebar-container.collapsed) .yunxil-stock-menu-item .yunxil-stock-menu-label {
  display: none !important;
}

.yunxil-stock-panel {
  position: fixed;
  z-index: 998;
  top: 50px;
  right: 0;
  bottom: 0;
  left: 200px;
  overflow: auto;
  background: #f2f5fa;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    sans-serif;
}

body:has(.sidebar-container.collapsed) .yunxil-stock-panel,
body:has(.sidebar-container.collapsed) .yunxil-stock-detail,
body:has(.sidebar-container.collapsed) .yunxil-stock-compare {
  left: 64px;
}

.yunxil-stock-panel[hidden],
.yunxil-stock-panel [hidden] {
  display: none !important;
}

.yunxil-stock-shell {
  width: min(1680px, calc(100% - 28px));
  min-height: calc(100vh - 78px);
  margin: 14px auto;
}

.yunxil-stock-header,
.yunxil-stock-strategy-bar,
.yunxil-stock-filter-card,
.yunxil-stock-content,
.yunxil-stock-footer {
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.055);
}

.yunxil-stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.yunxil-stock-header h2,
.yunxil-stock-detail-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.3;
}

.yunxil-stock-header p,
.yunxil-stock-detail-card header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

.yunxil-stock-header-actions,
.yunxil-stock-tabs,
.yunxil-stock-quick,
.yunxil-stock-detail-controls,
.yunxil-stock-board-toolbar,
.yunxil-stock-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yunxil-stock-panel button,
.yunxil-stock-panel input,
.yunxil-stock-panel select {
  box-sizing: border-box;
  font: inherit;
}

.yunxil-stock-panel button {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.yunxil-stock-panel button:hover,
.yunxil-stock-panel button.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.yunxil-stock-panel button:disabled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.yunxil-stock-header-actions button {
  min-height: 34px;
  padding: 0 13px;
}

.yunxil-stock-status,
.yunxil-stock-detail-status,
.yunxil-stock-daily-status {
  margin: 10px 0;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
}

.yunxil-stock-status.is-loading,
.yunxil-stock-detail-status.is-loading,
.yunxil-stock-daily-status.is-loading {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.yunxil-stock-status.is-warning,
.yunxil-stock-daily-status.is-warning {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.yunxil-stock-status.is-error,
.yunxil-stock-detail-status.is-error,
.yunxil-stock-daily-status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.yunxil-stock-premarket-notice {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 9px 12px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 700;
}

.yunxil-stock-premarket-notice.is-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.yunxil-stock-premarket-notice.is-warning {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.yunxil-stock-premarket-notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.yunxil-stock-premarket-notice button {
  flex: 0 0 auto;
  border-color: currentColor;
  background: #fff;
  color: inherit;
}

.yunxil-stock-tabs {
  margin: 10px 0;
}

.yunxil-stock-strategy-bar {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.8fr) minmax(190px, 1fr) repeat(4, auto);
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 11px 12px;
}

.yunxil-stock-strategy-bar strong {
  color: #0f172a;
  font-size: 13px;
}

.yunxil-stock-strategy-bar input,
.yunxil-stock-strategy-bar select {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
}

.yunxil-stock-strategy-bar button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.yunxil-stock-strategy-message {
  grid-column: 2 / -1;
  color: #64748b;
  font-size: 12px;
}

.yunxil-stock-strategy-message.is-ready {
  color: #047857;
}

.yunxil-stock-strategy-message.is-error {
  color: #b91c1c;
}

.yunxil-stock-tabs button {
  min-width: 118px;
  min-height: 38px;
  padding: 0 16px;
  font-weight: 700;
}

.yunxil-stock-filter-card {
  padding: 14px;
}

.yunxil-stock-search-row,
.yunxil-stock-range-grid {
  display: grid;
  gap: 10px;
}

.yunxil-stock-search-row {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 0.65fr));
}

.yunxil-stock-range-grid {
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  margin-top: 10px;
}

.yunxil-stock-filter-card label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #475569;
  font-size: 12px;
}

.yunxil-stock-filter-card input,
.yunxil-stock-filter-card select {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #1e293b;
}

.yunxil-stock-filter-card input:focus,
.yunxil-stock-filter-card select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.yunxil-stock-range-grid .yunxil-stock-checkbox {
  flex-direction: row;
  align-items: center;
  align-self: end;
  height: 35px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.yunxil-stock-range-grid .yunxil-stock-checkbox input {
  width: 16px;
  height: 16px;
}

.yunxil-stock-range-grid > button {
  align-self: end;
  height: 35px;
}

.yunxil-stock-quick {
  flex-wrap: wrap;
  margin-top: 12px;
}

.yunxil-stock-advanced {
  margin-top: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.yunxil-stock-advanced summary {
  padding: 10px 12px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.yunxil-stock-advanced[open] summary {
  border-bottom: 1px solid #dbe4f0;
}

.yunxil-stock-advanced-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(160px, 0.4fr) minmax(280px, 1.2fr);
  align-items: end;
  gap: 10px;
  padding: 11px 12px 0;
}

.yunxil-stock-advanced-toolbar > span {
  align-self: center;
  color: #64748b;
  font-size: 12px;
}

.yunxil-stock-advanced-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 10px;
  padding: 10px 12px 12px;
}

.yunxil-stock-quick button {
  min-height: 31px;
  padding: 0 10px;
  font-size: 12px;
}

.yunxil-stock-content {
  margin-top: 12px;
  overflow: hidden;
}

.yunxil-stock-active-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.yunxil-stock-active-filters > strong {
  color: #334155;
  font-size: 12px;
}

.yunxil-stock-active-filters > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.yunxil-stock-active-filters > button {
  min-height: 29px;
  padding: 0 9px;
  font-size: 12px;
}

.yunxil-stock-filter-chip {
  min-height: 27px;
  padding: 0 8px;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 12px;
}

.yunxil-stock-no-filter {
  align-self: center;
  color: #94a3b8;
  font-size: 12px;
}

.yunxil-stock-result-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.yunxil-stock-result-summary-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.yunxil-stock-result-summary-item span {
  color: #64748b;
  font-size: 11px;
}

.yunxil-stock-result-summary-item strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yunxil-stock-result-summary-item strong.is-up {
  color: #ef4444;
}

.yunxil-stock-result-summary-item strong.is-down {
  color: #16a34a;
}

.yunxil-stock-result-head,
.yunxil-stock-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

.yunxil-stock-result-head strong {
  color: #0f172a;
  font-size: 14px;
}

.yunxil-stock-result-head > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.yunxil-stock-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.yunxil-stock-result-actions button {
  min-height: 31px;
  padding: 0 10px;
  white-space: nowrap;
}

.yunxil-stock-board-toolbar > div {
  display: flex;
  gap: 8px;
}

.yunxil-stock-board-toolbar button {
  min-height: 31px;
  padding: 0 11px;
}

.yunxil-stock-daily-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.yunxil-stock-daily-hero h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.yunxil-stock-daily-hero p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.yunxil-stock-daily-hero button {
  min-height: 34px;
  padding: 0 13px;
  white-space: nowrap;
}

.yunxil-stock-daily-status {
  margin: 12px 14px 0;
}

.yunxil-stock-daily-status.is-ready {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.yunxil-stock-daily-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(135px, 1fr));
  gap: 8px;
  padding: 12px 14px;
}

.yunxil-stock-daily-summary-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.yunxil-stock-daily-summary-item span {
  color: #64748b;
  font-size: 11px;
}

.yunxil-stock-daily-summary-item strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yunxil-stock-daily-method,
.yunxil-stock-daily-disclaimer {
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  line-height: 1.7;
}

.yunxil-stock-daily-method {
  background: #f8fafc;
}

.yunxil-stock-daily-disclaimer {
  border-top-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.yunxil-stock-daily-table {
  min-width: 1420px;
}

.yunxil-stock-daily-table tr.is-shadow td {
  background: #fffbeb;
}

.yunxil-stock-daily-table tr.is-shadow:hover td {
  background: #fef3c7;
}

.yunxil-stock-daily-table th:nth-child(3),
.yunxil-stock-daily-table td:nth-child(3),
.yunxil-stock-daily-table th:nth-child(9),
.yunxil-stock-daily-table td:nth-child(9),
.yunxil-stock-daily-table th:nth-child(10),
.yunxil-stock-daily-table td:nth-child(10),
.yunxil-stock-daily-table th:nth-child(11),
.yunxil-stock-daily-table td:nth-child(11) {
  text-align: left;
}

.yunxil-stock-daily-rank {
  color: #64748b;
  font-weight: 700;
}

.yunxil-stock-score {
  display: inline-flex;
  min-width: 65px;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.yunxil-stock-score.is-grade-a {
  background: #ecfdf5;
  color: #047857;
}

.yunxil-stock-daily-name {
  min-width: 116px;
}

.yunxil-stock-daily-name strong,
.yunxil-stock-daily-name span {
  display: block;
}

.yunxil-stock-daily-name span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.yunxil-stock-daily-industry {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yunxil-stock-daily-tags {
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yunxil-stock-daily-tags.is-signal {
  color: #0369a1;
}

.yunxil-stock-daily-tags.is-risk {
  color: #9a3412;
}

.yunxil-stock-catalyst {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  white-space: normal;
}

.yunxil-stock-catalyst-level {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
}

.yunxil-stock-catalyst-level.is-level-a {
  background: #dcfce7;
  color: #15803d;
}

.yunxil-stock-catalyst time {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 10px;
}

.yunxil-stock-source-link {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.yunxil-stock-source-missing {
  color: #b45309;
  font-size: 11px;
}

.yunxil-stock-premarket-signals {
  margin-top: 4px;
  color: #0369a1;
  white-space: normal;
}

.yunxil-stock-premarket-state {
  color: #7c3aed;
  font-weight: 700;
}

.yunxil-stock-premarket-empty {
  min-height: 92px;
  color: #475569;
  font-weight: 700;
}

.yunxil-stock-positive-observations {
  margin: 14px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  overflow: hidden;
}

.yunxil-stock-positive-observations > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #fde68a;
}

.yunxil-stock-positive-observations h4,
.yunxil-stock-positive-observations p {
  margin: 0;
}

.yunxil-stock-positive-observations h4 {
  color: #92400e;
  font-size: 15px;
}

.yunxil-stock-positive-observations p {
  margin-top: 4px;
  color: #a16207;
  font-size: 11px;
}

.yunxil-stock-positive-observations > header > strong {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.yunxil-stock-positive-observation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.yunxil-stock-positive-observation-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fff;
}

.yunxil-stock-positive-observation-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.yunxil-stock-positive-observation-name strong,
.yunxil-stock-positive-observation-name span {
  display: block;
}

.yunxil-stock-positive-observation-name strong {
  color: #0f172a;
}

.yunxil-stock-positive-observation-name span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.yunxil-stock-observation-score {
  flex: 0 0 auto;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
}

.yunxil-stock-observation-evidence {
  color: #0369a1;
  font-size: 12px;
}

.yunxil-stock-observation-risk {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #fed7aa;
  color: #9a3412;
  font-size: 11px;
  line-height: 1.6;
}

.yunxil-stock-table-wrap {
  width: 100%;
  overflow: auto;
}

.yunxil-stock-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12px;
}

.yunxil-stock-reason-cell {
  max-width: 360px;
  overflow: hidden;
  color: #475569;
  text-align: left !important;
  text-overflow: ellipsis;
}

.yunxil-stock-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.yunxil-stock-favorite-button {
  min-height: 28px;
  padding: 0 8px;
  color: #b45309 !important;
  font-size: 12px;
}

.yunxil-stock-compare-button {
  min-height: 28px;
  padding: 0 8px;
  color: #0369a1 !important;
  font-size: 12px;
}

.yunxil-stock-table tbody tr.is-compared {
  background: #eff6ff;
  box-shadow: inset 3px 0 #2563eb;
}

.yunxil-stock-table th,
.yunxil-stock-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e8edf4;
  text-align: right;
  white-space: nowrap;
}

.yunxil-stock-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.yunxil-stock-table th:nth-child(1),
.yunxil-stock-table th:nth-child(2),
.yunxil-stock-table td:nth-child(1),
.yunxil-stock-table td:nth-child(2),
.yunxil-stock-table th:nth-child(10),
.yunxil-stock-table td:nth-child(10),
.yunxil-board-table th:first-child,
.yunxil-board-table td:first-child {
  text-align: left;
}

.yunxil-stock-table th button {
  padding: 2px 5px;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.yunxil-stock-table tbody tr:hover {
  background: #f0f7ff;
}

.yunxil-stock-table .is-up {
  color: #ef4444;
  font-weight: 700;
}

.yunxil-stock-table .is-down {
  color: #16a34a;
  font-weight: 700;
}

.yunxil-stock-detail-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.yunxil-stock-empty {
  height: 120px;
  color: #94a3b8;
  text-align: center !important;
}

.yunxil-stock-pagination {
  justify-content: center;
  padding: 12px;
  color: #64748b;
  font-size: 12px;
}

.yunxil-stock-pagination button {
  min-height: 30px;
  padding: 0 10px;
}

.yunxil-stock-footer {
  margin-top: 12px;
  padding: 12px 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}

.yunxil-stock-detail {
  position: fixed;
  z-index: 1002;
  inset: 50px 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.yunxil-stock-compare {
  position: fixed;
  z-index: 1003;
  inset: 50px 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.yunxil-stock-compare-card {
  display: flex;
  width: min(1500px, 97vw);
  max-height: calc(100vh - 82px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.35);
}

.yunxil-stock-compare-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.yunxil-stock-compare-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.yunxil-stock-compare-card header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.yunxil-stock-compare-card > header button {
  min-height: 32px;
  padding: 0 12px;
}

.yunxil-stock-compare-status {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

.yunxil-stock-compare-card .yunxil-stock-table-wrap {
  flex: 1;
  overflow: auto;
}

.yunxil-stock-compare-table {
  min-width: 1420px;
}

.yunxil-stock-compare-table th:first-child,
.yunxil-stock-compare-table td:first-child,
.yunxil-stock-compare-table th:nth-child(14),
.yunxil-stock-compare-table td:nth-child(14) {
  text-align: left;
}

.yunxil-stock-detail-card {
  display: flex;
  width: min(1250px, 96vw);
  max-height: calc(100vh - 82px);
  flex-direction: column;
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.35);
}

.yunxil-stock-detail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.yunxil-stock-detail-card > header button {
  min-height: 32px;
  padding: 0 12px;
}

.yunxil-stock-detail-status {
  margin: 10px 14px 0;
}

.yunxil-stock-detail-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  gap: 8px;
  padding: 10px 14px;
}

.yunxil-stock-summary-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.yunxil-stock-summary-item span {
  color: #64748b;
  font-size: 11px;
}

.yunxil-stock-summary-item strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yunxil-stock-detail-controls {
  justify-content: space-between;
  padding: 0 14px 8px;
}

.yunxil-stock-detail-controls > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yunxil-stock-detail-controls button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.yunxil-stock-detail-chart {
  width: 100%;
  height: 520px;
  min-height: 420px;
}

@media (max-width: 1200px) {
  .yunxil-stock-strategy-bar {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .yunxil-stock-strategy-bar strong,
  .yunxil-stock-strategy-message {
    grid-column: 1 / -1;
  }

  .yunxil-stock-search-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .yunxil-stock-range-grid {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }

  .yunxil-stock-advanced-grid {
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }

  .yunxil-stock-detail-summary {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
  }

  .yunxil-stock-result-summary {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }

  .yunxil-stock-daily-summary {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }
}

@media (max-width: 768px) {
  .yunxil-stock-panel {
    top: 50px;
    left: 0;
  }

  body:has(.sidebar-container.collapsed) .yunxil-stock-panel,
  body:has(.sidebar-container.collapsed) .yunxil-stock-detail,
  body:has(.sidebar-container.collapsed) .yunxil-stock-compare {
    left: 0;
  }

  .yunxil-stock-shell {
    width: calc(100% - 16px);
    margin: 8px auto;
  }

  .yunxil-stock-header {
    align-items: flex-start;
    padding: 13px;
  }

  .yunxil-stock-header h2,
  .yunxil-stock-detail-card h3 {
    font-size: 18px;
  }

  .yunxil-stock-header-actions {
    flex-direction: column;
  }

  .yunxil-stock-header-actions button {
    width: 100%;
  }

  .yunxil-stock-search-row,
  .yunxil-stock-range-grid,
  .yunxil-stock-advanced-grid,
  .yunxil-stock-strategy-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yunxil-stock-strategy-bar strong,
  .yunxil-stock-strategy-message,
  .yunxil-stock-advanced-toolbar > span {
    grid-column: 1 / -1;
  }

  .yunxil-stock-advanced-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yunxil-stock-search {
    grid-column: 1 / -1;
  }

  .yunxil-stock-board-toolbar,
  .yunxil-stock-result-head,
  .yunxil-stock-detail-controls,
  .yunxil-stock-daily-hero,
  .yunxil-stock-premarket-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .yunxil-stock-premarket-notice button {
    width: 100%;
  }

  .yunxil-stock-detail {
    inset: 50px 0 0;
    align-items: stretch;
    padding: 7px;
  }

  .yunxil-stock-compare {
    inset: 50px 0 0;
    align-items: stretch;
    padding: 7px;
  }

  .yunxil-stock-compare-card {
    width: 100%;
    max-height: calc(100vh - 64px);
  }

  .yunxil-stock-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yunxil-stock-daily-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yunxil-stock-positive-observation-list {
    grid-template-columns: 1fr;
  }

  .yunxil-stock-result-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .yunxil-stock-detail-card {
    width: 100%;
    max-height: calc(100vh - 64px);
  }

  .yunxil-stock-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yunxil-stock-detail-chart {
    height: 500px;
    min-height: 420px;
  }
}

@media (max-width: 420px) {
  .yunxil-stock-search-row,
  .yunxil-stock-range-grid,
  .yunxil-stock-advanced-grid,
  .yunxil-stock-advanced-toolbar,
  .yunxil-stock-strategy-bar {
    grid-template-columns: 1fr;
  }

  .yunxil-stock-tabs button {
    min-width: 0;
    flex: 1;
  }

  .yunxil-stock-active-filters {
    grid-template-columns: 1fr;
  }

  .yunxil-stock-result-actions button {
    flex: 1 1 100%;
  }

  .yunxil-stock-daily-summary {
    grid-template-columns: 1fr;
  }

  .yunxil-stock-positive-observations > header,
  .yunxil-stock-positive-observation-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
}
