:root {
  --yx-color-page-bg: #f5f6f7;
  --yx-color-surface: #ffffff;
  --yx-color-surface-soft: #fafafa;
  --yx-color-border: #eeeeee;
  --yx-color-border-strong: #e2e2e6;
  --yx-color-text-strong: #444050;
  --yx-color-text: #6d6b77;
  --yx-color-text-muted: #a4aabd;
  --yx-color-text-inverse: #ffffff;
  --yx-color-brand: #ff6600;
  --yx-color-brand-hover: #ff7a1a;
  --yx-color-brand-active: #f05c00;
  --yx-color-brand-soft: #fff3eb;
  --yx-color-success: #28c76f;
  --yx-color-warning: #ff9f43;
  --yx-color-danger: #ff4d4f;
  --yx-color-info: #00bad1;
  --yx-font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --yx-font-size-base: 14px;
  --yx-radius-card: 20px;
  --yx-radius-control: 12px;
  --yx-radius-inner: 10px;
  --yx-radius-pill: 999px;
  --yx-height-control: 44px;
  --yx-shadow-card: 0 2px 10px rgba(0, 0, 0, 0.03);
  --yx-focus-ring: 0 0 0 3px rgba(255, 106, 0, 0.14);
  --yx-space-page: 16px;
  --yx-space-section: 24px;
  --yx-space-card: 20px;
  --yx-space-stack: 16px;
  --yx-space-list-gap: 16px;
  --yx-space-control-gap: 12px;
  --yx-space-tight: 8px;
  --ui-bg: var(--yx-color-page-bg);
  --ui-surface: var(--yx-color-surface);
  --ui-border: var(--yx-color-border);
  --ui-text-primary: var(--yx-color-text-strong);
  --ui-text-secondary: var(--yx-color-text);
  --ui-text-placeholder: var(--yx-color-text-muted);
  --ui-brand: var(--yx-color-brand);
  --ui-brand-hover: var(--yx-color-brand-hover);
  --ui-focus-ring: var(--yx-focus-ring);
  --ui-font-family: var(--yx-font-family);
  --ui-font-size-base: var(--yx-font-size-base);
  --ui-radius-card: var(--yx-radius-card);
  --ui-radius-control: var(--yx-radius-control);
  --ui-radius-inner: var(--yx-radius-inner);
  --ui-height-control: var(--yx-height-control);
  --ui-shadow-card: var(--yx-shadow-card);
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--yx-color-page-bg);
  color: var(--yx-color-text);
  font-family: var(--yx-font-family);
  font-size: var(--yx-font-size-base);
}

body {
  min-height: 100vh;
}

a {
  color: #1677ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre,
.yx-code {
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
}

.yx-ui-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px;
}

.yx-ui-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 102, 0, 0.16), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-card);
  box-shadow: var(--yx-shadow-card);
  padding: 28px;
}

.yx-ui-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--yx-radius-pill);
  background: var(--yx-color-brand-soft);
  color: var(--yx-color-brand);
  font-size: 12px;
  font-weight: 700;
}

.yx-ui-hero h1 {
  margin: 18px 0 10px;
  color: var(--yx-color-text-strong);
  font-size: 34px;
  line-height: 1.2;
}

.yx-ui-hero p {
  margin: 0;
  max-width: 860px;
  color: var(--yx-color-text);
  font-size: 15px;
  line-height: 1.8;
}

.yx-ui-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.yx-ui-col-12 { grid-column: span 12; }
.yx-ui-col-8 { grid-column: span 8; }
.yx-ui-col-7 { grid-column: span 7; }
.yx-ui-col-6 { grid-column: span 6; }
.yx-ui-col-5 { grid-column: span 5; }
.yx-ui-col-4 { grid-column: span 4; }

.yx-ui-card,
.yx-card {
  background: var(--yx-color-surface);
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-card);
  box-shadow: var(--yx-shadow-card);
}

.yx-ui-card {
  padding: 22px;
}

.yx-ui-card h2,
.yx-section-title {
  margin: 0 0 12px;
  color: var(--yx-color-text-strong);
  font-size: 18px;
  line-height: 1.35;
}

.yx-ui-card p {
  margin: 0;
  line-height: 1.8;
}

.yx-ui-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--yx-radius-inner);
  background: #fff9f4;
  border: 1px solid #ffe3cd;
  color: #8a5525;
  font-size: 13px;
  line-height: 1.7;
}

.yx-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.yx-section-head h2 {
  margin: 0;
}

.yx-section-head p {
  margin: 8px 0 0;
  color: var(--yx-color-text);
  font-size: 14px;
  line-height: 1.8;
}

.yx-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yx-demo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.yx-demo-grid--controls {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.yx-preview-panel {
  padding: 18px;
  border: 1px solid var(--yx-color-border);
  border-radius: 16px;
  background: #fcfcfd;
}

.yx-mini-title {
  margin: 0 0 14px;
  color: var(--yx-color-text-strong);
  font-size: 16px;
  line-height: 1.4;
}

.yx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yx-field--half {
  flex: 1 1 240px;
}

.yx-field > label {
  color: var(--yx-color-text-strong);
  font-size: 13px;
  font-weight: 600;
}

.yx-help {
  color: var(--yx-color-text-muted);
  font-size: 12px;
  line-height: 18px;
}

.yx-input,
.yx-textarea,
.yx-control,
select.yx-select,
.yx-select > select {
  width: 100%;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-control);
  background: #fff;
  color: var(--yx-color-text);
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.yx-input,
.yx-control,
select.yx-select,
.yx-select > select {
  height: var(--yx-height-control);
  padding: 0 12px;
}

.yx-textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  line-height: 1.7;
}

.yx-input::placeholder,
.yx-textarea::placeholder,
.yx-control::placeholder {
  color: var(--yx-color-text-muted);
}

.yx-input:focus,
.yx-textarea:focus,
.yx-control:focus,
select.yx-select:focus,
.yx-select > select:focus {
  border-color: var(--yx-color-brand);
  box-shadow: var(--yx-focus-ring);
  outline: none;
}

.yx-select {
  position: relative;
  display: block;
  width: 100%;
}

select.yx-select,
.yx-select > select {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background:
    #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%239fa6b6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 12px;
}

select.yx-select:focus,
.yx-select > select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%239fa6b6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.yx-number {
  width: 100%;
  height: var(--yx-height-control);
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-control);
  background: #fff;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.yx-number:focus-within {
  border-color: var(--yx-color-brand);
  box-shadow: var(--yx-focus-ring);
}

.yx-number__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--yx-color-text-strong);
  padding: 0 14px;
  font: inherit;
  font-weight: 500;
  appearance: textfield;
  -moz-appearance: textfield;
}

.yx-number__input::-webkit-outer-spin-button,
.yx-number__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.yx-number__stepper {
  width: 38px;
  flex: 0 0 38px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid var(--yx-color-border);
  background: #fbfbfc;
}

.yx-number__btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: #9fa6b6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s ease, color .2s ease;
}

.yx-number__btn + .yx-number__btn {
  border-top: 1px solid var(--yx-color-border);
}

.yx-number__btn:hover {
  background: var(--yx-color-brand-soft);
  color: var(--yx-color-brand);
}

.yx-number__btn svg {
  width: 10px;
  height: 10px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yx-inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.yx-inline-item--day {
  width: 160px;
  flex: 0 0 160px;
}

.yx-inline-item--time {
  width: 160px;
  flex: 0 0 160px;
}

.yx-inline-colon {
  color: var(--yx-color-text-strong);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.yx-search,
.yx-search * {
  box-sizing: border-box;
}

.yx-search {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: var(--yx-height-control);
  padding: 0 12px;
  gap: 8px;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-control);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.yx-search:focus-within {
  border-color: var(--yx-color-brand);
  box-shadow: var(--yx-focus-ring);
}

.yx-search__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--yx-color-text-muted);
  pointer-events: none;
}

.yx-search__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.yx-search__icon circle,
.yx-search__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yx-search > .yx-search__input,
.yx-search > input.yx-search__input,
.yx-search > input[type="search"].yx-search__input,
.yx-search > input[type="text"].yx-search__input {
  all: unset !important;
  display: block !important;
  width: 1px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  color: var(--yx-color-text) !important;
  font: inherit !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  outline: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.yx-search__input::placeholder {
  color: var(--yx-color-text-muted);
}

.yx-search__tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--yx-radius-pill);
  background: var(--yx-color-brand-soft);
  color: var(--yx-color-brand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.yx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 96px;
  height: var(--yx-height-control);
  padding: 0 18px;
  border-radius: var(--yx-radius-control);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.yx-btn--primary {
  background: var(--yx-color-brand);
  color: var(--yx-color-text-inverse);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.18);
}

.yx-btn--primary:hover {
  background: var(--yx-color-brand-hover);
}

.yx-btn--secondary {
  background: #fff;
  color: var(--yx-color-text-strong);
  border-color: var(--yx-color-border);
}

.yx-btn--text {
  min-width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1677ff;
}

.yx-btn--text:hover {
  color: #4096ff;
  text-decoration: underline;
}

.yx-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--yx-radius-pill);
  background: #f6f6f8;
  color: var(--yx-color-text);
  font-size: 12px;
  font-weight: 600;
}

.yx-chip--success { background: rgba(40, 199, 111, 0.12); color: #1c9c56; }
.yx-chip--warning { background: rgba(255, 159, 67, 0.14); color: #d5791f; }
.yx-chip--danger { background: rgba(255, 77, 79, 0.12); color: #d9363e; }

.yx-toolbar-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.yx-toolbar__search {
  flex: 1 1 320px;
  min-width: 280px;
}

.yx-toolbar__filter {
  width: 180px;
  flex: 0 0 180px;
}

.yx-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.yx-toolbar-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--yx-radius-pill);
  border: 1px solid var(--yx-color-border);
  background: #fff;
  color: var(--yx-color-text);
  font-size: 12px;
  line-height: 18px;
}

.yx-list-shell {
  overflow: hidden;
  border: 1px solid var(--yx-color-border);
  border-radius: 16px;
  background: #fff;
}

.yx-table-wrap {
  overflow: auto;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-inner);
}

.yx-list-shell .yx-table-wrap {
  border: 0;
  border-radius: 0;
}

.yx-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.yx-table th,
.yx-table td {
  height: 52px;
  padding: 0 16px;
  font-size: 13px;
  border-top: none;
  border-bottom: 1px solid var(--yx-color-border);
  text-align: left;
  color: var(--yx-color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.yx-table thead th {
  border-top: none;
  background: var(--yx-color-surface-soft);
  color: var(--yx-color-text);
  font-weight: 600;
}

.yx-table tbody tr:nth-child(even) td {
  background: #fcfcfc;
}

.yx-table .yx-op-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: inherit;
  box-shadow: -1px 0 0 var(--yx-color-border);
}

.yx-table tbody tr:hover td {
  background: #fff8f2;
}

.yx-table thead th.yx-table__action,
.yx-table tbody td.yx-table__action {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 176px;
  min-width: 176px;
  max-width: 176px;
  text-align: center;
  border-left: 1px solid var(--yx-color-border);
  box-shadow: -8px 0 10px rgba(0, 0, 0, 0.03);
  background: #fff;
}

.yx-table thead th.yx-table__action {
  z-index: 3;
  background: var(--yx-color-surface-soft);
}

.yx-table tbody tr:nth-child(even) td.yx-table__action {
  background: #fcfcfc;
}

.yx-table tbody tr:hover td.yx-table__action {
  background: #fff8f2;
}

.yx-table__main {
  display: block;
  color: var(--yx-color-text-strong);
  font-weight: 600;
}

.yx-table__sub {
  display: block;
  margin-top: 2px;
  color: var(--yx-color-text-muted);
  font-size: 12px;
  line-height: 18px;
}

.yx-select--compact,
.yx-pagination__size {
  width: auto;
  min-width: 0;
}

.yx-select--compact > select,
select.yx-select.yx-select--compact,
.yx-pagination__select {
  width: auto;
  min-width: 128px;
  height: 36px;
  line-height: 36px;
  padding: 0 34px 0 12px;
  border-radius: var(--yx-radius-inner);
  font-size: 13px;
  background-position: calc(100% - 12px) center;
  background-size: 16px 16px;
}

.yx-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.yx-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--yx-space-list-gap);
  margin-top: var(--yx-space-list-gap);
}

.yx-pagination__left,
.yx-pagination__right {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--yx-space-control-gap);
  min-width: 0;
}

.yx-pagination__right {
  margin-left: auto;
}

.yx-pagination__total,
.yx-pagination__page {
  font-size: 14px;
  color: var(--yx-color-text);
}

.yx-pagination__page {
  min-width: 52px;
  text-align: center;
}

.yx-pagination__btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-inner);
  background: #fff;
  color: #8d8d99;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.yx-pagination__btn:hover:not([disabled]) {
  border-color: #ffd2b3;
  background: #fff8f2;
  color: var(--yx-color-brand);
}

.yx-pagination__btn[disabled] {
  color: #c9c9d2;
  cursor: not-allowed;
}

.yx-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--yx-radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.yx-status--done {
  background: rgba(40, 199, 111, 0.12);
  color: #1c9c56;
}

.yx-status--running {
  background: rgba(255, 159, 67, 0.14);
  color: #d5791f;
}

.yx-status--queued {
  background: var(--yx-color-brand-soft);
  color: var(--yx-color-brand);
}

.yx-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yx-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-inner);
  background: #fff;
}

.yx-mono-block {
  padding: 14px;
  border-radius: var(--yx-radius-inner);
  background: #fbfbfc;
  border: 1px solid var(--yx-color-border);
  color: #555;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.yx-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.yx-kpi {
  padding: 16px;
  border: 1px solid var(--yx-color-border);
  border-radius: var(--yx-radius-inner);
  background: #fff;
}

.yx-kpi strong {
  display: block;
  margin-top: 8px;
  color: var(--yx-color-text-strong);
  font-size: 24px;
}

@media (max-width: 1080px) {
  .yx-ui-col-8,
  .yx-ui-col-7,
  .yx-ui-col-6,
  .yx-ui-col-5,
  .yx-ui-col-4 {
    grid-column: span 12;
  }

  .yx-demo-grid,
  .yx-demo-grid--controls,
  .yx-kpi-row {
    grid-template-columns: 1fr;
  }

  .yx-inline-item--day,
  .yx-inline-item--time,
  .yx-toolbar__search,
  .yx-toolbar__filter {
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  .yx-inline-colon {
    display: none;
  }
}

@media (max-width: 768px) {
  .yx-ui-shell {
    padding: 14px;
  }

  .yx-ui-hero {
    padding: 20px;
  }

  .yx-ui-hero h1 {
    font-size: 26px;
  }

  .yx-section-head {
    flex-direction: column;
  }
}
