/* =====================================================================
   查单独立页样式 · v7-swiss 单色双主题(与模板 style.css 同源 token)
   独立页,不依赖 user.css / 模板 style.css。CSS-only 换皮:不改 class / DOM。
   浅色白底黑字 · 深色 #0B0F14 底浅字 · 橙 accent 只点睛 · 发丝线 · 无圆角。
   深浅切换靠 <html data-theme="dark">(head FOUC 脚本已就位)。
   ===================================================================== */

:root{
  --bg:#FFFFFF; --fg:#0B0F14; --mute:#767676; --line:#E4E4E4; --line-strong:#0B0F14;
  --hover:#FAFAFA; --accent:#FF3B00; --band-bg:#0B0F14; --band-bg-hover:#111820; --band-fg:#FFFFFF; --band-mute:#A1A7B3;
}
[data-theme="dark"]{
  --bg:#0B0F14; --fg:#F5F5F7; --mute:#8A93A0; --line:rgba(255,255,255,.10); --line-strong:rgba(255,255,255,.32);
  --hover:rgba(255,255,255,.045); --accent:#FF5426; --band-bg:#171D26; --band-bg-hover:#1E2530; --band-fg:#F5F5F7; --band-mute:#A1A7B3;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Inter","MiSans","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
    font-size: 14px; color: var(--fg); line-height: 1.5;
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "tnum" 1;
    transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ============ Header ============ */
.fo-header {
    height: 64px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-strong);
    position: sticky; top: 0; z-index: 100;
    transition: background-color .3s ease, border-color .3s ease;
}
.fo-header-inner {
    max-width: 1320px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; height: 100%;
}
.fo-header-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--fg);
    margin-right: 16px;
}
.fo-header-logo__text { font-size: 15px; font-weight: 800; color: var(--fg); letter-spacing: -0.01em; }
.fo-header-logo__img,
.fo-header-logo img {
    height: 28px !important; width: auto; max-width: 200px;
    display: block; object-fit: contain;
}
/* 兼容旧"图标徽章"模式(方形单色) */
.fo-header-logo__mark {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--fg); color: var(--bg); font-size: 14px;
}
.fo-header-title {
    font-size: 12px; color: var(--mute); font-weight: 500;
    padding: 5px 12px;
    border: 1px solid var(--line);
    display: inline-flex; align-items: center; gap: 6px;
    letter-spacing: 0.02em;
}
.fo-header-title i { color: var(--accent); font-size: 12px; }
.fo-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fo-header-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; font-size: 13px; color: var(--fg);
    background: var(--bg); border: 1px solid var(--line-strong);
    transition: background-color .15s, color .15s;
}
.fo-header-btn:hover { color: var(--bg); background: var(--fg); }

/* ============ PJAX Loading ============ */
.fo-loading {
    position: fixed; inset: 0; z-index: 200;
    background: color-mix(in srgb, var(--bg) 62%, transparent);
    backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
}
.fo-loading.is-active { display: flex; }
.fo-loading-spinner {
    width: 34px; height: 34px;
    border: 2px solid var(--line); border-top-color: var(--accent);
    border-radius: 50%;
    animation: fo-spin 0.7s linear infinite;
}
@keyframes fo-spin { to { transform: rotate(360deg); } }
/* ============ 容器 ============ */
.fo-wrap {
    max-width: 920px;
    margin: 32px auto 80px;
    padding: 0 24px;
}
.fo-card {
    background: var(--bg);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
}

/* ============ 默认查询表单:hero + tabs + form ============ */
.fo-hero {
    position: relative;
    padding: 28px 32px 24px 30px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.fo-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 28px; bottom: 24px;
    width: 3px;
    background: var(--accent);
}
.fo-hero__title {
    font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
    color: var(--fg);
    margin-bottom: 5px;
}
.fo-hero__sub {
    font-size: 13px;
    color: var(--mute);
}

/* 查询表单整体 */
.find-order-layout { padding: 24px 32px 32px; }

/* tabs:Swiss segmented(发丝线方格,选中反色) */
.find-order-tabs {
    display: flex; gap: 0;
    margin-bottom: 24px;
    border: 1px solid var(--line-strong);
}
.find-order-tab {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 14px;
    font-size: 13px; color: var(--mute); font-weight: 500;
    background: transparent; border: 0; border-left: 1px solid var(--line);
    cursor: pointer; transition: background-color .18s, color .18s;
    white-space: nowrap; letter-spacing: 0.01em;
}
.find-order-tab:first-child { border-left: 0; }
.find-order-tab i { font-size: 13px; }
.find-order-tab:hover { color: var(--fg); background: var(--hover); }
.find-order-tab.active {
    color: var(--band-fg); background: var(--band-bg);
}

/* 面板进入动画 */
.find-order-panel { animation: fo-panel-in 0.25s ease-out; }
@keyframes fo-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 提示条 */
.find-order-hint {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    background: var(--hover);
    border: 1px solid var(--line);
    color: var(--fg);
    font-size: 13px;
    margin-bottom: 14px;
}
.find-order-hint i { color: var(--accent); font-size: 14px; }

/* 表单字段 */
.find-order-form { padding: 4px 2px; }
.find-order-form-group { margin-bottom: 18px; }
.find-order-form-group label {
    display: block; margin-bottom: 8px;
    font-size: 12px; color: var(--mute); font-weight: 500;
    letter-spacing: 0.03em; text-transform: uppercase;
}
.find-order-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px; color: var(--fg);
    background: var(--bg); border: 1px solid var(--line-strong);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.find-order-input::placeholder { color: var(--mute); }
.find-order-input:hover { border-color: var(--fg); }
.find-order-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* 算术 captcha 行 */
.fo-captcha-row { margin-bottom: 18px; }
.fo-captcha {
    display: flex; align-items: stretch; gap: 8px;
}
.fo-captcha__expr {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 110px;
    padding: 0 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px; font-weight: 700;
    color: var(--fg); letter-spacing: 1px;
    background: var(--hover);
    border: 1px solid var(--line-strong);
    user-select: none;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.fo-captcha__input {
    flex: 1;
}
.fo-captcha__refresh {
    flex-shrink: 0;
    width: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.fo-captcha__refresh:hover { color: var(--bg); background: var(--fg); }
.fo-captcha__refresh i { font-size: 14px; }
.fo-captcha__refresh i.fa-spin { animation: fo-spin 0.7s linear infinite; }

/* 提交按钮:实色反差块(band) */
.find-order-submit {
    width: 100%;
    padding: 13px 16px;
    font-size: 14px; font-weight: 600; color: var(--band-fg);
    letter-spacing: 0.02em;
    background: var(--band-bg);
    border: 1px solid var(--band-bg);
    cursor: pointer;
    transition: background-color .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.find-order-submit:hover { background: var(--band-bg-hover); }
.find-order-submit:active { background: var(--band-bg-hover); }
.find-order-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* 加载状态 */
.find-order-loading {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 44px 20px;
    color: var(--mute); font-size: 13px;
}
.find-order-spinner {
    width: 30px; height: 30px;
    border: 2px solid var(--line); border-top-color: var(--accent);
    border-radius: 50%;
    animation: fo-spin 0.7s linear infinite;
}

/* 空状态 / 错误 */
.find-order-empty {
    padding: 44px 20px;
    text-align: center;
    color: var(--mute); font-size: 14px;
    background: var(--hover);
    border: 1px dashed var(--line-strong);
}
.find-order-empty small { display: block; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.find-order-error {
    padding: 12px 16px;
    background: color-mix(in srgb, var(--accent) 8%, var(--bg));
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 12px;
}
/* ============ 查询结果列表(guest_find.js 注入 find-order-*) ============ */
.find-order-results { margin-top: 20px; }
.find-order-results-header {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px;
    margin-bottom: 14px;
    background: var(--hover);
    border: 1px solid var(--line);
    font-size: 13px; color: var(--fg);
}
.find-order-results-header strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.find-order-item {
    border: 1px solid var(--line-strong);
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--bg);
    transition: background-color .15s;
}
.find-order-item:hover { background: var(--hover); }
.find-order-item-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px dashed var(--line);
    gap: 12px;
}
.find-order-no {
    font-size: 12.5px; color: var(--fg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--hover); padding: 4px 9px;
    border: 1px solid var(--line);
}
/* 结果列表内状态角标:PHP/JS 注入 inline color/background(语义色),这里只写容器 */
.find-order-status {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    font-size: 12px; font-weight: 600;
    border: 1px solid var(--line);
    white-space: nowrap;
}
.find-order-status--awaiting { gap: 5px; }
.find-order-status__spin { font-size: 11px; line-height: 1; opacity: 0.95; }

/* 商品行 */
.find-order-goods {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px;
    background: var(--hover);
    border: 1px solid var(--line);
    margin-bottom: 8px;
    transition: background-color .15s;
}
.find-order-goods:last-of-type { margin-bottom: 0; }
.find-order-goods-img {
    width: 44px; height: 44px;
    object-fit: cover;
    background: var(--bg); flex-shrink: 0;
    border: 1px solid var(--line);
}
.find-order-goods-info { flex: 1; min-width: 0; }
.find-order-goods-name {
    font-size: 13.5px; color: var(--fg); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 1.4;
}
.find-order-goods-spec {
    display: inline-block;
    font-size: 11.5px; color: var(--mute);
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 1px 7px;
    margin-top: 5px;
}
.find-order-goods-price {
    font-size: 13.5px;
    color: var(--fg); font-weight: 700;
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* item footer:下单时间 + 实付金额 */
.find-order-item-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding-top: 12px; margin-top: 10px;
    border-top: 1px dashed var(--line);
}
.find-order-time {
    font-size: 12.5px; color: var(--mute);
    display: inline-flex; align-items: center; gap: 6px;
}
.find-order-time::before {
    content: '\f017'; /* fa-clock-o */
    font-family: FontAwesome; font-size: 11px; color: var(--mute);
}
.find-order-total { font-size: 13px; color: var(--mute); }
.find-order-total strong {
    font-size: 15px; font-weight: 700;
    color: var(--accent) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    margin-left: 3px;
}

/* 行内操作区 */
.find-order-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px dashed var(--line);
}
.find-order-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    font-size: 12.5px; font-weight: 600;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    transition: background-color .15s, color .15s;
    cursor: pointer;
}
.find-order-action-btn:hover { background: var(--fg); color: var(--bg); }
.find-order-action-btn::before {
    content: '\f06e'; /* fa-eye */
    font-family: FontAwesome; font-size: 11px;
}
/* ============ 订单详情页 ============ */
.fo-detail { padding: 0; }
.fo-detail__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 28px;
    background: var(--band-bg);
    color: var(--band-fg);
    gap: 12px;
}
.fo-detail__title {
    font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--band-fg);
}
.fo-detail__title i { font-size: 17px; color: var(--accent); }
.fo-detail__back {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 14px;
    font-size: 13px; color: var(--band-fg);
    background: transparent;
    border: 1px solid var(--band-mute);
    transition: background-color .15s, color .15s;
}
.fo-detail__back:hover { background: var(--band-fg); color: var(--band-bg); }

/* 元信息表 —— 双栏 row */
.fo-detail__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 28px;
    padding: 6px 28px 14px;
    background: var(--bg);
}
@media (max-width: 640px) { .fo-detail__meta { grid-template-columns: 1fr; column-gap: 0; } }
.fo-detail__row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    gap: 14px;
}
.fo-detail__row:nth-last-child(-n+2) { border-bottom: 0; }
.fo-detail__label { font-size: 12px; color: var(--mute); flex-shrink: 0; letter-spacing: 0.02em; }
.fo-detail__value {
    font-size: 13px; color: var(--fg); font-weight: 500;
    text-align: right; word-break: break-all;
}
.fo-detail__amount {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--accent) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* 详情页语义 status pill:PHP inline style="color:..;background:.." 数据驱动语义色,
   这里只写容器几何。加中性发丝描边,保证浅色系语义底在深色主题下仍可辨边界。 */
.fo-status-pill {
    display: inline-flex; align-items: center;
    padding: 4px 12px;
    font-size: 12.5px; font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--line);
}
.fo-status-pill--awaiting { gap: 6px; }
.fo-status-pill__spin { font-size: 13px; opacity: 0.9; }

/* 信息分区 */
.fo-detail__section {
    padding: 18px 28px;
    border-top: 8px solid var(--hover);
}
.fo-detail__section-title {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 700; color: var(--fg);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    letter-spacing: -0.01em;
}
.fo-detail__section-title i { color: var(--accent); font-size: 13px; }

/* 商品明细 */
.fo-detail__goods {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--line);
}
.fo-detail__goods:last-child { border-bottom: 0; }
.fo-detail__goods-cover {
    width: 56px; height: 56px;
    object-fit: cover;
    background: var(--hover); flex-shrink: 0;
    border: 1px solid var(--line);
}
.fo-detail__goods-cover--empty {
    display: flex; align-items: center; justify-content: center;
    color: var(--mute); font-size: 16px;
}
.fo-detail__goods-body { flex: 1; min-width: 0; }
.fo-detail__goods-title {
    font-size: 14px; color: var(--fg); font-weight: 600;
    line-height: 1.4;
}
.fo-detail__goods-spec { font-size: 12px; color: var(--mute); margin-top: 5px; }
.fo-detail__goods-price {
    font-size: 13.5px; color: var(--fg); font-weight: 700;
    flex-shrink: 0;
    text-align: right; line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* 发货内容(卡密面板):monospace + var(--hover) 底,同 order_result 卡密面板观感 */
.fo-detail__delivery {
    margin-top: 10px;
    padding: 12px;
    background: var(--hover);
    border: 1px solid var(--line-strong);
}
.fo-detail__delivery-label {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--fg); font-weight: 600;
    margin-bottom: 8px;
}
.fo-detail__delivery-label i { color: var(--accent); }
.fo-detail__delivery-content {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--fg);
    background: var(--bg);
    padding: 10px 12px;
    border: 1px solid var(--line);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 240px;
    overflow-y: auto;
    line-height: 1.7;
}

/* 使用教程(富文本) */
.fo-detail__section--guide { padding-top: 6px; }
.fo-detail__guide {
    padding: 12px;
    background: var(--hover);
    border: 1px solid var(--line);
}
.fo-detail__guide + .fo-detail__guide { margin-top: 10px; }
.fo-detail__guide-goods {
    font-size: 12.5px; color: var(--fg); font-weight: 700;
    margin-bottom: 8px;
}
.fo-detail__guide-body {
    font-size: 13px; color: var(--fg); line-height: 1.8;
    word-break: break-word;
}
.fo-detail__guide-body.detail-body img { max-width: 100%; height: auto; }

/* 备注 */
.fo-detail__remark {
    padding: 12px 14px;
    background: var(--hover);
    border-left: 3px solid var(--accent);
    color: var(--fg);
    font-size: 13px;
    line-height: 1.7;
}

/* ============ 移动端 ============ */
@media (max-width: 560px) {
    .fo-header-inner { padding: 0 14px; }
    .fo-header-title { display: none; }
    .fo-wrap { margin-top: 18px; padding: 0 12px; }
    .fo-hero { padding: 22px 20px 18px 22px; }
    .fo-hero::before { top: 22px; bottom: 18px; }
    .fo-hero__title { font-size: 18px; }
    .find-order-layout { padding: 18px 18px 22px; }
    .fo-captcha__expr { min-width: 88px; padding: 0 10px; font-size: 14px; letter-spacing: 0.5px; }
    .fo-captcha__refresh { width: 42px; }
    .find-order-tab { padding: 10px 8px; font-size: 12px; }
    .find-order-tab i { display: none; }
    .find-order-item-header { flex-wrap: wrap; }
    .fo-detail__header { padding: 18px; flex-wrap: wrap; }
    .fo-detail__title { font-size: 16px; }
    .fo-detail__row { flex-wrap: wrap; gap: 4px; }
    .fo-detail__value { text-align: left; }
    .fo-detail__meta,
    .fo-detail__section { padding-left: 18px; padding-right: 18px; }
}
