/* =====================================================================
   查询订单独立页样式（不依赖 user.css / 模板 style.css）
   2026-04 重做：去掉单调的"白底 + 浅灰边"配色，改成现代渐变 + 卡片层次
   ===================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px; color: #1f2937; line-height: 1.6;
    background: #f0f3fb;
    background-image: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
                      radial-gradient(ellipse 60% 50% at 100% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ============ Header ============ */
.fo-header {
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
    position: sticky; top: 0; z-index: 100;
}
.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: 17px; font-weight: 700; color: #0f172a;
    margin-right: 14px;
}
.fo-header-logo__text { font-size: 17px; font-weight: 700; color: #0f172a; letter-spacing: 0.3px; }
.fo-header-logo__img,
.fo-header-logo img {
    height: 32px !important;
    width: auto;
    max-width: 200px;
    display: block;
    object-fit: contain;
}
/* 兼容旧版"图标徽章"模式（保留以防其它代码引用） */
.fo-header-logo__mark {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; border-radius: 8px; font-size: 15px;
    box-shadow: 0 2px 6px rgba(99,102,241,0.35);
}
.fo-header-title {
    font-size: 13px; color: #6366f1; font-weight: 500;
    padding: 4px 12px;
    background: #eef2ff;
    border-radius: 999px;
    display: inline-flex; align-items: center; gap: 5px;
    letter-spacing: 0.3px;
}
.fo-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fo-header-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; font-size: 13px; color: #475569;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    transition: all 0.15s;
}
.fo-header-btn:hover {
    color: #6366f1; border-color: #c7d2fe; background: #f5f7ff;
}

/* ============ PJAX Loading ============ */
.fo-loading {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
}
.fo-loading.is-active { display: flex; }
.fo-loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e0e7ff; border-top-color: #6366f1;
    border-radius: 50%;
    animation: fo-spin 0.7s linear infinite;
}
@keyframes fo-spin { to { transform: rotate(360deg); } }

/* ============ 容器 ============ */
.fo-wrap {
    max-width: 920px;
    margin: 28px auto 80px;
    padding: 0 16px;
}
.fo-card {
    background: #fff;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04),
                0 8px 32px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.08);
}

/* ============ 默认查询表单：hero + tabs + form ============
   2026-04 第二轮：去掉紫渐变 + 装饰圆，改成左侧 accent 竖线 + 深色标题，
   走"安静的 SaaS 工具页"风格，避免一打开就是大色块的"AI 生成感"
   ============================================================ */
.fo-hero {
    position: relative;
    padding: 26px 32px 22px 30px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}
.fo-hero::before {
    content: '';
    position: absolute;
    left: 0; top: 26px; bottom: 22px;
    width: 3px;
    background: #6366f1;
    border-radius: 0 2px 2px 0;
}
.fo-hero__title {
    font-size: 17px; font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.2px;
    margin-bottom: 4px;
}
.fo-hero__sub {
    font-size: 12.5px;
    color: #94a3b8;
}

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

/* tabs：现代 segmented control */
.find-order-tabs {
    display: flex; gap: 6px;
    padding: 6px;
    margin-bottom: 22px;
    background: #f5f7fb;
    border-radius: 10px;
}
.find-order-tab {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px;
    font-size: 13.5px; color: #64748b; font-weight: 500;
    background: transparent; border: 0; border-radius: 7px;
    cursor: pointer; transition: all 0.18s;
    white-space: nowrap;
}
.find-order-tab i { font-size: 13px; }
.find-order-tab:hover { color: #4338ca; background: rgba(255, 255, 255, 0.5); }
.find-order-tab.active {
    color: #4338ca; background: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

/* 面板进入动画 */
.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: #f0f4ff;
    border: 1px solid #dbe4ff;
    color: #4338ca;
    font-size: 13px;
    border-radius: 8px;
    margin-bottom: 14px;
}
.find-order-hint i { color: #6366f1; font-size: 14px; }

/* 表单字段 */
.find-order-form { padding: 4px 2px; }
.find-order-form-group { margin-bottom: 16px; }
.find-order-form-group label {
    display: block; margin-bottom: 8px;
    font-size: 13px; color: #475569; font-weight: 500;
}
.find-order-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px; color: #1f2937;
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 8px;
    transition: all 0.15s;
    outline: none;
}
.find-order-input::placeholder { color: #94a3b8; }
.find-order-input:hover { border-color: #cbd5e1; }
.find-order-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* 算术 captcha 行：表达式 chip + 输入框 + 换一题按钮，inline 紧凑布局 */
.fo-captcha-row { margin-bottom: 16px; }
.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: 600;
    color: #4338ca; letter-spacing: 1px;
    background: #eef2ff;
    border: 1.5px solid #c7d2fe;
    border-radius: 8px;
    user-select: none;
    flex-shrink: 0;
}
.fo-captcha__input {
    flex: 1;
    /* 复用 .find-order-input 的视觉，仅覆盖宽度让它跟同行排开 */
}
.fo-captcha__refresh {
    flex-shrink: 0;
    width: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #6366f1;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.fo-captcha__refresh:hover {
    color: #4338ca;
    border-color: #c7d2fe;
    background: #f5f7ff;
}
.fo-captcha__refresh i { font-size: 14px; }
.fo-captcha__refresh i.fa-spin { animation: fo-spin 0.7s linear infinite; }

/* 提交按钮：去掉渐变 + transform 浮起 + 大阴影
   改成实色紫 + hover 加深，工具页风格而非营销页风格 */
.find-order-submit {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px; font-weight: 500; color: #fff;
    letter-spacing: 0.5px;
    background: #4f46e5;
    border: 0; border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.find-order-submit:hover { background: #4338ca; }
.find-order-submit:active { background: #3730a3; }
.find-order-submit:disabled {
    background: #c7d2fe;
    cursor: not-allowed;
}

/* 加载状态 */
.find-order-loading {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 40px 20px;
    color: #64748b; font-size: 13px;
}
.find-order-spinner {
    width: 32px; height: 32px;
    border: 3px solid #e0e7ff; border-top-color: #6366f1;
    border-radius: 50%;
    animation: fo-spin 0.7s linear infinite;
}

/* 空状态 / 错误 */
.find-order-empty {
    padding: 40px 20px;
    text-align: center;
    color: #64748b; font-size: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
.find-order-empty small { display: block; margin-top: 8px; font-size: 12.5px; color: #94a3b8; }
.find-order-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ============ 查询结果列表 ============ */
.find-order-results { margin-top: 18px; }
.find-order-results-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px; color: #166534;
}
.find-order-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.find-order-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}
.find-order-item-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px; margin-bottom: 10px;
    border-bottom: 1px dashed #f1f5f9;
}
.find-order-no {
    font-size: 12.5px; color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #f1f5f9; padding: 3px 8px; border-radius: 4px;
}
.find-order-status {
    display: inline-flex; align-items: center;
    padding: 2px 9px;
    font-size: 12px; font-weight: 500;
    border-radius: 11px;
}
/* 商品行：每个 goods 自身是一个浅灰小块，多个商品堆叠时
   行间距 + 独立背景能立刻区分出"这是 N 件不同商品"，不再糊成一坨 */
.find-order-goods {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.15s, border-color 0.15s;
}
.find-order-goods:last-of-type { margin-bottom: 0; }
.find-order-goods:hover {
    background: #f5f7ff;
    border-color: #e0e7ff;
}
.find-order-goods-img {
    width: 44px; height: 44px;
    border-radius: 6px; object-fit: cover;
    background: #fff; flex-shrink: 0;
    border: 1px solid #f1f5f9;
}
.find-order-goods-info { flex: 1; min-width: 0; }
.find-order-goods-name {
    font-size: 13.5px; color: #1f2937; 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: #6366f1;
    background: #eef2ff;
    padding: 1px 7px;
    border-radius: 3px;
    margin-top: 4px;
}
.find-order-goods-price {
    font-size: 13.5px;
    color: #4f46e5; font-weight: 600;
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* item footer：下单时间 + 实付金额 —— 与商品行用细虚线分隔 */
.find-order-item-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding-top: 10px; margin-top: 8px;
    border-top: 1px dashed #f1f5f9;
}
.find-order-time {
    font-size: 12.5px; color: #94a3b8;
    display: inline-flex; align-items: center; gap: 5px;
}
.find-order-time::before {
    content: '\f017'; /* fa-clock-o */
    font-family: FontAwesome;
    font-size: 11px;
    color: #cbd5e1;
}
.find-order-total {
    font-size: 13px; color: #64748b;
}
.find-order-total strong {
    font-size: 15px; font-weight: 700;
    color: #4f46e5 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    margin-left: 2px;
}

/* 行内操作区（结果列表项底部）：右对齐排开按钮 */
.find-order-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed #f1f5f9;
}
.find-order-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px;
    font-size: 12.5px; font-weight: 500;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    transition: all 0.15s;
    cursor: pointer;
}
.find-order-action-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}
.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: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
}
.fo-detail__title {
    font-size: 18px; font-weight: 700; letter-spacing: 0.5px;
    display: inline-flex; align-items: center; gap: 8px;
}
.fo-detail__title i { font-size: 18px; opacity: 0.9; }
.fo-detail__back {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px;
    font-size: 13px; color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    transition: background 0.15s;
}
.fo-detail__back:hover { background: rgba(255, 255, 255, 0.28); }

/* 元信息表 —— 双栏 row 紧凑布局 */
.fo-detail__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 24px;
    padding: 4px 28px 12px;
    background: #fff;
}
@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: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 14px;
}
.fo-detail__row:nth-last-child(-n+2) { border-bottom: 0; }
.fo-detail__label { font-size: 12.5px; color: #94a3b8; flex-shrink: 0; }
.fo-detail__value {
    font-size: 13px; color: #1f2937; font-weight: 500;
    text-align: right; word-break: break-all;
}
.fo-detail__amount {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #4f46e5 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 详情页彩色 status pill */
.fo-status-pill {
    display: inline-flex; align-items: center;
    padding: 3px 12px;
    font-size: 12.5px; font-weight: 600;
    border-radius: 11px;
    letter-spacing: 0.3px;
}

/* 信息分区（收货地址 / 商品明细 / 备注）—— 用浅灰大间隔分隔区块 */
.fo-detail__section {
    padding: 16px 28px;
    border-top: 8px solid #f5f7fb;
}
.fo-detail__section-title {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.fo-detail__section-title i { color: #6366f1; font-size: 13px; }

/* 商品明细 */
.fo-detail__goods {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px dashed #f1f5f9;
}
.fo-detail__goods:last-child { border-bottom: 0; }
.fo-detail__goods-cover {
    width: 56px; height: 56px;
    border-radius: 8px; object-fit: cover;
    background: #f1f5f9; flex-shrink: 0;
    border: 1px solid #f1f5f9;
}
.fo-detail__goods-cover--empty {
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; font-size: 16px;
}
.fo-detail__goods-body { flex: 1; min-width: 0; }
.fo-detail__goods-title {
    font-size: 14px; color: #1f2937; font-weight: 500;
    line-height: 1.4;
}
.fo-detail__goods-spec { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.fo-detail__goods-price {
    font-size: 13.5px; color: #4f46e5; font-weight: 600;
    flex-shrink: 0;
    text-align: right; line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 发货内容（卡密 / 链接等） */
.fo-detail__delivery {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.fo-detail__delivery-label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: #4338ca; font-weight: 500;
    margin-bottom: 6px;
}
.fo-detail__delivery-content {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: #1f2937;
    background: #fff;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 240px;
    overflow-y: auto;
}

/* 备注 */
.fo-detail__remark {
    padding: 10px 14px;
    background: #fffbeb;
    border-left: 3px solid #fcd34d;
    color: #78350f;
    font-size: 13px;
    border-radius: 4px;
    line-height: 1.7;
}

/* 移动端 */
@media (max-width: 640px) {
    .fo-wrap { margin-top: 16px; padding: 0 12px; }
    .fo-hero { padding: 22px 20px 18px 22px; }
    .fo-hero::before { top: 22px; bottom: 18px; }
    .fo-hero__title { font-size: 16px; }
    .find-order-layout { padding: 18px 18px 22px; }
    .fo-captcha__expr { min-width: 92px; padding: 0 10px; font-size: 14px; letter-spacing: 0.5px; }
    .fo-captcha__refresh { width: 40px; }
    .find-order-tabs { gap: 4px; padding: 4px; }
    .find-order-tab { padding: 8px 8px; font-size: 12.5px; }
    .find-order-tab i { display: none; }
    .fo-detail__header { padding: 18px 18px; flex-wrap: wrap; gap: 10px; }
    .fo-detail__title { font-size: 16px; }
    .fo-detail__meta,
    .fo-detail__section { padding-left: 18px; padding-right: 18px; }
}
