:root {
      --brand: #e14c46;
      --brand-soft: #fff1f0;
      --text: #1f2329;
      --text-secondary: #646a73;
      --text-tertiary: #8f959e;
      --line: #eef0f3;
      --page: #f5f6f8;
      --card: #ffffff;
      --shadow: 0 1px 2px rgba(31, 35, 41, 0.04), 0 4px 12px rgba(31, 35, 41, 0.04);
      --open: #d46b08;
      --open-soft: #fff7e8;
      --ok: #137333;
      --ok-soft: #e8f7ef;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      padding: 0;
    }

    body {
      min-height: 100vh;
      background: #e8eaee;
      color: var(--text);
      font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    .sales-confirm-page {
      width: 100%;
      max-width: 480px;
      min-height: 100vh;
      margin: 0 auto;
      background: var(--page);
      box-shadow: 0 0 28px rgba(31, 35, 41, 0.08);
    }

    .sc-top {
      position: sticky;
      top: 0;
      z-index: 20;
      background: #fff;
      padding-top: env(safe-area-inset-top);
    }

    .navbar {
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid var(--line);
    }

    .navbar h1 {
      margin: 0;
      font-size: 17px;
      font-weight: 600;
      letter-spacing: 0.2px;
    }

    .search-wrap {
      padding: 10px 12px 8px;
    }

    .search-form {
      display: flex;
      align-items: center;
      height: 36px;
      padding: 0 10px 0 12px;
      border-radius: 18px;
      background: #f2f3f5;
    }

    .search-form svg {
      flex: 0 0 auto;
      color: var(--text-tertiary);
    }

    .search-form input {
      flex: 1;
      min-width: 0;
      height: 36px;
      margin: 0 6px;
      padding: 0;
      border: 0;
      outline: none;
      background: transparent;
      color: var(--text);
      font-size: 14px;
      font-family: inherit;
    }

    .search-form input::-webkit-search-cancel-button {
      -webkit-appearance: none;
    }

    .search-form input::placeholder {
      color: #a0a4ab;
    }

    .clear-btn {
      flex: 0 0 auto;
      width: 22px;
      height: 22px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      background: #c8cdd3;
      color: #fff;
      font-size: 14px;
      line-height: 22px;
      cursor: pointer;
    }

    .clear-btn[hidden],
    .reset-btn[hidden],
    .filter-error[hidden] {
      display: none;
    }

    .filter-panel {
      margin-top: 10px;
    }

    .filter-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .filter-row + .filter-row {
      margin-top: 8px;
    }

    .filter-label {
      flex: 0 0 56px;
      color: var(--text-tertiary);
      font-size: 12px;
    }

    .date-range {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .date-range input {
      flex: 1;
      min-width: 0;
      height: 32px;
      padding: 0 6px;
      border: 1px solid #e5e6eb;
      border-radius: 8px;
      background: #f7f8fa;
      color: var(--text);
      font-size: 13px;
      font-family: inherit;
    }

    .date-sep {
      flex: 0 0 auto;
      color: var(--text-tertiary);
      font-size: 12px;
    }

    .status-options {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .status-options button {
      height: 28px;
      padding: 0 10px;
      border: 0;
      border-radius: 14px;
      background: #f2f3f5;
      color: var(--text-secondary);
      font-size: 12px;
      font-family: inherit;
      cursor: pointer;
    }

    .status-options button.is-active {
      background: var(--brand-soft);
      color: var(--brand);
      font-weight: 600;
    }

    .filter-error {
      margin: 6px 0 0 64px;
      color: var(--brand);
      font-size: 12px;
      line-height: 1.4;
    }

    .result-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 16px 10px;
      color: var(--text-tertiary);
      font-size: 12px;
    }

    .reset-btn {
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--brand);
      font-size: 12px;
      font-family: inherit;
      cursor: pointer;
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      height: 20px;
      padding: 0 6px;
      border-radius: 10px;
      background: #f2f3f5;
      color: var(--text-tertiary);
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    .status-pill.is-open {
      background: var(--open-soft);
      color: var(--open);
    }

    .status-pill.is-auditing {
      background: #e8f3ff;
      color: #1664c0;
    }

    .status-pill.is-approved {
      background: var(--ok-soft);
      color: var(--ok);
    }

    .status-pill.is-closed {
      background: #f2f3f5;
      color: var(--text-secondary);
    }

    .status-pill.is-rejected {
      background: var(--brand-soft);
      color: var(--brand);
    }

    .page-content {
      padding: 4px 12px calc(16px + env(safe-area-inset-bottom));
    }

    .bill-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .bill-card {
      margin-bottom: 12px;
      padding: 14px 14px 6px;
      border-radius: 12px;
      background: var(--card);
      box-shadow: var(--shadow);
      cursor: pointer;
    }

    .bill-card:focus {
      outline: 2px solid rgba(225, 76, 70, 0.45);
      outline-offset: 2px;
    }

    .bill-card:active {
      background: #fafafa;
    }

    .card-side {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
      flex: 0 0 auto;
    }

    .card-side-top {
      display: flex;
      align-items: center;
      gap: 2px;
    }

    .card-chevron {
      color: #c5c9d0;
    }

    .card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--line);
    }

    .customer-name {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      line-height: 1.4;
      word-break: break-all;
    }

    .customer-name mark,
    .field-value mark {
      padding: 0 1px;
      border-radius: 2px;
      background: #ffe3e0;
      color: var(--brand);
    }

    .bill-date {
      flex: 0 0 auto;
      color: var(--text-secondary);
      font-size: 12px;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .field-list {
      margin: 0;
      padding: 8px 0 4px;
    }

    .field-row {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 6px 0;
    }

    .field-row dt {
      flex: 0 0 96px;
      margin: 0;
      color: var(--text-tertiary);
      font-size: 13px;
      line-height: 1.5;
    }

    .field-row dd {
      flex: 1;
      min-width: 0;
      margin: 0;
      color: var(--text);
      font-size: 14px;
      line-height: 1.5;
      word-break: break-all;
    }

    .field-row a {
      color: var(--brand);
      text-decoration: none;
    }

    .empty-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 64px 24px 24px;
      color: var(--text-tertiary);
      text-align: center;
    }

    .empty-state[hidden] {
      display: none;
    }

    .empty-icon {
      width: 72px;
      height: 72px;
      margin-bottom: 12px;
      border-radius: 50%;
      background: #fff;
      color: #c5c9d0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .empty-title {
      margin: 0 0 6px;
      color: var(--text-secondary);
      font-size: 15px;
      font-weight: 600;
    }

    .empty-desc {
      margin: 0;
      font-size: 13px;
      line-height: 1.5;
    }
