/* 简洁自适应样式 */
:root { --bg:#0b0c10; --card:#111218; --text:#e6edf3; --muted:#9aa6b2; --primary:#2ea043; --warn:#b54708; --success:#198754; }
* { box-sizing: border-box; }
html,body { margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif; background:var(--bg); color:var(--text); }
.container { max-width: 980px; margin: 0 auto; padding: 16px; }
.container.wide { max-width: 100vw; width: 100vw; margin: 0; padding: 12px; }
h1,h2 { margin: 0 0 16px; }
.card { background: var(--card); padding: 16px; border-radius: 10px; margin: 16px 0; border:1px solid #20222b; }
.card.warn { border-color: var(--warn); }
.card.success { border-color: var(--success); }
/* 成功页：视觉优化 */
.success-hero { padding: 20px; }
.success-header { display:flex; align-items:center; gap:12px; margin-bottom: 8px; }
.success-icon { width:36px; height:36px; border-radius: 50%; background: rgba(25,135,84,.2); color:#29cf93; display:flex; align-items:center; justify-content:center; font-weight: 700; }
.success-title { font-size: 20px; margin: 0; }
.success-subtitle { margin: 4px 0 0; color: var(--muted); }
.success-actions { display:flex; gap:10px; align-items:center; margin: 10px 0 6px; flex-wrap: wrap; }
.countdown { display:flex; align-items:center; gap:12px; margin: 6px 0 8px; }
.countdown-number { width:68px; height: 68px; border-radius: 12px; display:flex; align-items:center; justify-content:center; background:#0f1117; border:1px solid #2a2f3a; font-size: 28px; font-weight: 700; letter-spacing: .5px; }
.countdown-hint { color: var(--muted); }
.small { font-size: 13px; }
label { display:block; margin: 8px 0 4px; color: var(--muted); }
input { width: 100%; padding: 10px 12px; background: #0f1117; color: var(--text); border:1px solid #2a2f3a; border-radius: 8px; }
button, .primary { display:inline-block; margin-top: 12px; padding: 10px 16px; background: var(--primary); color: #fff; border: none; border-radius: 8px; text-decoration: none; cursor: pointer; }
.note { display:inline-flex; align-items:center; height: 42px; padding: 0 12px; margin-top: 12px; border:1px solid #2a2f3a; border-radius:8px; background:#0f1117; color: var(--text); text-transform: uppercase; letter-spacing: .5px; }
.note.muted { color: var(--muted); }
.note.warn { border-color: #b54708; color: #ffb4a6; background:#20140a; }
.note a { text-transform: none; }
.pill { height: 34px; line-height: 34px; padding: 0 12px; border:1px solid #2a2f3a; border-radius: 999px; background:#131620; color: var(--text); }
select.pill { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding-right: 28px; background-image: linear-gradient(45deg,transparent 50%,#8a93a5 50%), linear-gradient(135deg,#8a93a5 50%,transparent 50%); background-position: calc(100% - 18px) 14px, calc(100% - 10px) 14px; background-size: 8px 8px, 8px 8px; background-repeat: no-repeat; }
button.pill { background: #2a2f3a; border-color:#3b4150; color: var(--text); margin-top: 0; }
.grid { display: grid; grid-template-columns: 1fr 2fr; gap: 8px 16px; }
.inline { display:flex; gap:8px; flex-wrap: wrap; }
.tabs { display:flex; gap:10px; margin: 8px 0 12px; }
.tabs a { padding: 8px 12px; border:1px solid #2a2f3a; border-radius: 8px; color: var(--text); text-decoration: none; background:#131620; }
.tabs a.active { background:#2a2f3a; border-color:#3b4150; }
.order-info { display:grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 12px 0; }
/* 匹配成功信息更扁平的方块标签 */
.meta-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.chip { background:#0f1117; border:1px solid #2a2f3a; border-radius:10px; padding:10px 12px; overflow: hidden; }
.chip .k { color: var(--muted); margin-right:8px; }
.chip .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display:block; max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #2a2f3a; padding: 8px; text-align: left; }
.excel { table-layout: fixed; font-size: 13.5px; line-height: 1.45; }
.excel th, .excel td { word-wrap: break-word; white-space: normal; padding: 8px; min-width: 110px; }
.excel th:first-child, .excel td:first-child { width: 36px; }
.excel .id-col { width: 70px; }
.excel .ops-col { width: 110px; }
.excel tbody tr:nth-child(even) { background: #0f1117; }
.excel tbody tr:hover { background: #1a1d27; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-product_name { max-width: 360px; }
.col-order-number { min-width: 220px; max-width: 320px; }
.table-scroll { overflow:auto; }
.pagination { 
    margin-top: 12px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    flex-wrap: wrap; 
    justify-content: center;
}
.pagination a { 
    color: var(--text); 
    text-decoration: none; 
    padding: 6px 10px; 
    border:1px solid #2a2f3a; 
    border-radius: 6px; 
    background: #131620;
    transition: all 0.2s ease;
}
.pagination a:hover { 
    background: #2a2f3a; 
    border-color: #3b4150;
}
.pagination a.active { 
    background: var(--primary); 
    border-color: var(--primary);
    color: #fff;
}
.pagination span.disabled { 
    color: var(--muted); 
    padding: 6px 10px; 
    border:1px solid #2a2f3a; 
    border-radius: 6px; 
    background: #0f1117;
    cursor: not-allowed;
}
.pagination .page-info { 
    color: var(--muted); 
    font-size: 13px; 
    margin-left: 12px;
}

/* 只读字段样式 */
.readonly-field {
    background: #1a1d27;
    border: 1px solid #2a2f3a;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 4px 0 16px 0;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.readonly-value {
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
    display: block;
    width: 100%;
}
footer { margin-top: 24px; color: var(--muted); }

/* 验证码样式 */
.captcha-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap; /* 单行不换行 */
}

.captcha-input {
  flex: 0 0 220px; /* 固定宽度 */
  width: 220px;
}

.captcha-image {
  height: 40px;
  width: 120px;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  background: #0f1117;
}

.captcha-image:hover {
  opacity: 0.8;
}

/* 小屏防溢出与适配 */
.card {
  box-sizing: border-box;
  overflow: hidden;
}

input, select, button {
  max-width: 100%;
}

.captcha-container {
  max-width: 100%;
  min-width: 0;
}

.captcha-input {
  flex: 1 1 160px; /* 小屏可收缩 */
  min-width: 0;
}

.captcha-image {
  flex: 0 0 auto;
  max-width: 45%; /* 防止过宽导致溢出 */
}

.note {
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .order-info { grid-template-columns: 1fr; }
  .note { 
    font-size: 11px; 
    padding: 8px 10px; 
    height: auto; 
    min-height: 36px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
  }
  /* 保持验证码同一行：不覆盖 .captcha-container 与 .captcha-input */
}

@media (max-width: 400px) {
  /* 极窄屏允许验证码容器换行，避免整体溢出 */
  .captcha-container { flex-wrap: wrap; }
  .captcha-image { height: 35px; }
}


