
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --subtext: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #16a34a;
    --muted: #94a3b8;
    --shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    --radius: 14px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 96px;
}

.page {
    padding: 16px 14px 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.title-wrap h1 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.title-wrap p {
    font-size: 13px;
    color: var(--subtext);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 18px;
    color: var(--text);
}

.section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 0 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 12px;
    color: var(--subtext);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.value-primary { color: var(--primary); }
.value-success { color: var(--success); }
.value-warning { color: var(--warning); }
.value-danger  { color: var(--danger); }

.search-panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-row:last-child {
    margin-bottom: 0;
}

.input,
.select,
.btn {
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
}

.input,
.select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 12px;
    color: var(--text);
}

.btn {
    border: none;
    padding: 0 14px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-light {
    background: #eef2f7;
    color: var(--text);
}

.bill-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bill-card {
    background: var(--card);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.bill-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.bill-customer {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 3px;
}

.bill-no {
    font-size: 12px;
    color: var(--muted);
}

.bill-amount {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.bill-product {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.bill-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--subtext);
}

.bill-meta-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
}

.bill-remark {
    font-size: 13px;
    color: var(--subtext);
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.bill-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-unpaid {
    background: #fff7ed;
    color: #d97706;
}

.status-paid {
    background: #dcfce7;
    color: #15803d;
}

.status-cancel {
    background: #e5e7eb;
    color: #6b7280;
}

.bill-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    min-width: 64px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 0 12px;
}

.action-edit {
    color: #d97706;
    border-color: #fde68a;
    background: #fffbeb;
}

.action-delete {
    color: var(--danger);
    border-color: #fecaca;
    background: #fef2f2;
}

.action-status {
    color: var(--success);
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.fab {
    position: fixed;
    right: 18px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
    z-index: 200;
}

.empty-box {
    background: var(--card);
    border-radius: 16px;
    padding: 28px 16px;
    text-align: center;
    color: var(--subtext);
    box-shadow: var(--shadow);
    font-size: 14px;
}

@media (max-width: 360px) {
    .bill-meta {
    grid-template-columns: 1fr;
    }

    .stat-value {
    font-size: 18px;
    }
}

/* 下面是新增订单的css样式 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 999;
}

.modal-mask.show {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 16px 14px 20px;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.12);
  max-height: 88vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 22px;
  line-height: 1;
}

.bill-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  outline: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.form-actions .btn {
  flex: 1;
}

/* 分页css样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
}

.page-btn {
  min-width: 76px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #eef2f7;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.45;
}

.page-info {
  font-size: 13px;
  color: #6b7280;
}


/* 分享卡片css */
.share-preview-wrap {
  padding: 4px 0 12px;
}

.share-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.share-card-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #d1d5db;
}

.share-card-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.share-card-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.share-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.share-row-amount .share-value {
  font-size: 22px;
  font-weight: 800;
  color: #2563eb;
}

.share-label {
  font-size: 13px;
  color: #6b7280;
}

.share-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-align: right;
  word-break: break-all;
}

.share-remark {
  margin-top: 4px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

.share-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}