/* ============================================================
   开锁宝管理后台 · 样式
   设计基调：浅色、留白、绿色主色（沿用小程序 #07B77C）
   ============================================================ */

:root {
    --primary: #07B77C;
    --primary-d: #059A68;
    --primary-l: #E8F8F1;
    --blue: #2E9BFF;
    --bg: #F5F6F8;
    --card: #FFFFFF;
    --text: #1F2429;
    --text-2: #5B636D;
    --muted: #8A9099;
    --faint: #B3B8BF;
    --border: #E8EBEE;
    --border-2: #F0F2F4;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 0 0 1px rgba(16, 24, 40, .03);
    --side-w: 216px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
h1, h2, h3 { margin: 0; font-weight: 600; }

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.ta-r { text-align: right; }

/* ============ 骨架布局 ============ */

.shell { display: flex; min-height: 100vh; }

/* 侧边栏 */
.side {
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width .18s ease, flex-basis .18s ease;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--border-2);
}

.brand-mark {
    width: 30px; height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #34c98d);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-text b { font-size: 14px; }
.brand-text i { font-size: 11px; color: var(--faint); font-style: normal; }

.nav { padding: 10px 10px; flex: 1; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13.5px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.nav-item svg { flex: 0 0 18px; opacity: .75; }

a.nav-item:hover { background: #F5F7F9; color: var(--text); }

.nav-item.is-active {
    background: var(--primary-l);
    color: var(--primary-d);
    font-weight: 600;
}
.nav-item.is-active svg { opacity: 1; }

.nav-item.is-off { color: var(--faint); cursor: not-allowed; }
.nav-item.is-off em {
    margin-left: auto;
    font-style: normal;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #F3F5F7;
    color: #A8AEB6;
}

.side-foot {
    padding: 12px 18px 16px;
    border-top: 1px solid var(--border-2);
}
.ver { font-size: 11px; color: var(--faint); white-space: nowrap; }

/* 折叠态 */
body.side-collapsed .side { width: 0; flex-basis: 0; border-right: 0; }

/* 主区域 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.side-toggle {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-2);
    width: 30px; height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.side-toggle:hover { background: #F7F9FA; }

.page-title { font-size: 15px; }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.clock {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
    letter-spacing: .2px;
}

.user { display: flex; align-items: center; gap: 8px; }

.avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary-l);
    color: var(--primary-d);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta b { font-size: 12.5px; }
.user-meta i { font-size: 11px; color: var(--faint); font-style: normal; }

.content { padding: 20px; flex: 1; }

.page { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* ============ KPI 卡片 ============ */

.kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kpi {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px 14px;
    position: relative;
    overflow: hidden;
}

.kpi-accent::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
}

.kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.kpi-label { font-size: 12.5px; color: var(--muted); }

.kpi-tag {
    font-size: 10.5px;
    color: var(--faint);
    background: #F5F7F9;
    padding: 1px 6px;
    border-radius: 4px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -.4px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.kpi-cur { font-size: 16px; font-weight: 500; color: var(--muted); margin-right: 2px; }
.kpi-unit { font-size: 12px; font-weight: 400; color: var(--faint); margin-left: 2px; }

.kpi-foot { margin-top: 6px; font-size: 11.5px; color: var(--faint); }

.delta { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.delta-up   { color: #E0483A; background: #FFEFEC; }  /* 涨=红（国内习惯） */
.delta-down { color: #12996A; background: #E9F8F1; }  /* 跌=绿 */
.delta-flat { color: var(--muted); background: #F3F5F7; font-weight: 400; }

/* ============ 卡片 / 表格 ============ */

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-2);
}

.card-head h2 { font-size: 14px; }
.card-hint { font-size: 11.5px; color: var(--faint); }

.card-body { padding: 12px 8px 8px; }

.chart { width: 100%; height: 280px; }
.chart-fallback {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--faint);
    font-size: 13px;
}

.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.table thead th {
    position: sticky;
    top: 0;
    background: #FAFBFC;
    color: var(--muted);
    font-weight: 500;
    font-size: 12px;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    z-index: 2;
}

.table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-2);
    vertical-align: middle;
    white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFBFC; }

.table .empty {
    text-align: center;
    color: var(--faint);
    padding: 40px 0;
}

/* 状态标签 */
.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

.st-wait   { color: #C77700; background: #FFF4E5; }
.st-way    { color: #1878D6; background: #EAF4FF; }
.st-doing  { color: #5B45D6; background: #F0EDFF; }
.st-finish { color: #00807C; background: #E6F7F7; }
.st-pay    { color: #D33B28; background: #FFEDEA; }
.st-paid   { color: #05946A; background: #E8F8F1; }
.st-done   { color: #3F7F58; background: #EDF6F0; }
.st-dead   { color: #8A9099; background: #F1F3F5; }
.st-other  { color: #5B636D; background: #F1F3F5; }

/* ============ 按钮 / 表单 ============ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, border-color .15s, opacity .15s;
}

.btn:hover { background: #F7F9FA; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
}
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }

.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #F3F5F7; color: var(--text); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; height: 40px; font-size: 14px; }

.field { display: block; margin-bottom: 14px; }
.field > span {
    display: block;
    font-size: 12.5px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder { color: var(--faint); }
.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 183, 124, .12);
}

.alert {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    margin-bottom: 14px;
}
.alert-error { background: #FFEFEC; color: #C0392B; }

/* ============ 登录页 ============ */

.auth-body {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 880px;
    min-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(16, 24, 40, .08), 0 2px 8px rgba(16, 24, 40, .04);
    overflow: hidden;
}

.auth-side {
    background: linear-gradient(150deg, #0E3A2C 0%, #075B41 55%, #07B77C 130%);
    color: #fff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 34px;
}

.auth-logo .brand-mark {
    background: rgba(255, 255, 255, .16);
    width: 32px; height: 32px; flex-basis: 32px;
}

.auth-side h2 {
    font-size: 25px;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.auth-side > p {
    margin: 0 0 28px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .68);
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-points li {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .82);
    padding-left: 18px;
    position: relative;
}

.auth-points li::before {
    content: "";
    position: absolute;
    left: 0; top: 7px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4FE0A8;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 48px;
}

.auth-form { width: 100%; max-width: 300px; }
.auth-form h3 { font-size: 20px; margin-bottom: 6px; }
.auth-sub { margin: 0 0 24px; font-size: 12.5px; color: var(--muted); }

.auth-note {
    margin: 18px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--faint);
}

/* ============ 响应式 ============ */

@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
    .auth-wrap { grid-template-columns: 1fr; max-width: 420px; min-height: 0; }
    .auth-side { display: none; }
    .auth-panel { padding: 36px 28px; }
}

@media (max-width: 760px) {
    .side {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 40;
        box-shadow: 0 8px 30px rgba(16, 24, 40, .12);
    }
    body:not(.side-collapsed) .side { transform: translateX(0); }
    .content { padding: 14px; }
    .kpis { grid-template-columns: 1fr; gap: 10px; }
    .clock { display: none; }
    .user-meta { display: none; }
    .kpi-value { font-size: 23px; }
    .chart { height: 220px; }
    .table { font-size: 12.5px; }
}

/* ============================================================
   订单管理 · 筛选条（网格布局，保证各控件基线对齐）
   ============================================================ */

.filterbar {
    display: grid;
    grid-template-columns: auto 156px minmax(180px, 1fr) auto;
    align-items: end;
    gap: 0 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px 14px;
}

.fb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.fb-label {
    font-size: 12px;
    line-height: 1;
    height: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.fb-ctl { display: flex; align-items: center; gap: 8px; }

.fb-tilde { color: var(--faint); font-size: 12px; flex: 0 0 auto; }

.fb-input {
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.fb-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 183, 124, .12);
}

.fb-date { width: 132px; flex: 0 0 132px; padding-right: 6px; }
.fb-date::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
.fb-date::-webkit-calendar-picker-indicator:hover { opacity: .8; }

.fb-select {
    width: 100%;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23B3B8BF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 26px;
}

/* 快捷时间：分段控件 */
.seg {
    display: flex;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 0 0 auto;
}

.seg a {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    color: var(--text-2);
    background: #fff;
    border-left: 1px solid var(--border);
    white-space: nowrap;
}

.seg a:first-child { border-left: 0; }
.seg a:hover { background: #F7F9FA; }
.seg a.on { background: var(--primary-l); color: var(--primary-d); font-weight: 600; }

.fb-actions { display: flex; gap: 8px; }
.fb-actions .btn { height: 34px; }

/* ============================================================
   订单列表
   ============================================================ */

.table-orders td { padding-top: 10px; padding-bottom: 10px; }

.sn-link {
    color: var(--text);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}
.sn-link:hover { color: var(--primary-d); border-bottom-color: var(--primary); }

.tag {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 10.5px;
    line-height: 1.6;
    vertical-align: 1px;
}
.tag-install { background: #FFF4E5; color: #C77700; }

.cust { display: flex; flex-direction: column; line-height: 1.35; }
.cust b { font-size: 13px; font-weight: 500; }
.cust-tel { font-size: 12px; color: var(--blue); font-family: var(--mono); }
.cust-tel:hover { text-decoration: underline; }

.sub-amt { font-size: 11px; color: var(--faint); margin-top: 1px; }

.remark {
    display: inline-block;
    max-width: 100%;
    color: var(--text-2);
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.link { color: var(--primary-d); font-size: 12.5px; }
.link:hover { text-decoration: underline; }

/* 分页 */
.pager {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-2);
    flex-wrap: wrap;
}

.pg {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 12.5px;
    color: var(--text-2);
}
a.pg:hover { background: #F7F9FA; border-color: #DCE1E6; }
.pg.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.pg.is-off { color: var(--faint); background: #FAFBFC; cursor: not-allowed; }
.pg-dots { color: var(--faint); padding: 0 2px; font-size: 12px; }
.pg-info { margin-left: auto; font-size: 12px; color: var(--faint); }

/* ============================================================
   订单详情
   ============================================================ */

.detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

.back { font-size: 12.5px; color: var(--muted); display: inline-block; margin-bottom: 8px; }
.back:hover { color: var(--primary-d); }

.detail-sn {
    font-family: var(--mono);
    font-size: 18px;
    letter-spacing: .2px;
    margin-bottom: 8px;
}

.detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }

.detail-amount { text-align: right; flex: 0 0 auto; }
.da-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.da-value {
    font-size: 26px;
    font-weight: 650;
    color: var(--primary-d);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.3px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.detail-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card-body.pad { padding: 16px 18px; }

/* 键值表 */
.kv {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 9px 14px;
    margin: 0;
    font-size: 13px;
}

.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; word-break: break-all; }

.kv-fee { grid-template-columns: 90px minmax(0, 1fr); }
.kv-fee dd { text-align: right; }
.kv-mini { grid-template-columns: 76px minmax(0, 1fr); }
.kv-mini dd { font-family: var(--mono); font-size: 12.5px; }

.kv .is-main { font-weight: 650; font-size: 15px; color: var(--text); }

.tel {
    color: var(--blue);
    font-family: var(--mono);
    font-weight: 500;
}
.tel:hover { text-decoration: underline; }

/* 复查情况 */
.remark-block + .remark-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.remark-block p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.remark-idx { font-size: 11px; color: var(--faint); margin-bottom: 4px; }

/* 图片墙 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #F3F5F7;
    border: 1px solid var(--border);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--primary); }
.thumb.is-broken::after {
    content: "加载失败";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 11px;
    color: var(--faint);
}

/* 时间线 */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 0 16px 18px;
    font-size: 13px;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
    content: "";
    position: absolute;
    left: 4px; top: 6px; bottom: -6px;
    width: 1px;
    background: var(--border);
}
.timeline li:last-child::before { display: none; }

.tl-dot {
    position: absolute;
    left: 0; top: 5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--primary);
}

.tl-label { color: var(--text); }
.tl-time { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ============ 响应式补充 ============ */

@media (max-width: 1000px) {
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .filterbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }
    .fb-ctl { flex-wrap: wrap; }
    .fb-date { flex: 1 1 120px; width: auto; }
    .seg { flex: 1 1 100%; }
    .seg a { flex: 1; justify-content: center; }
    .fb-actions { width: 100%; }
    .fb-actions .btn { flex: 1; }
    .detail-head { flex-direction: column; }
    .detail-amount { text-align: left; }
    .pg-info { margin-left: 0; width: 100%; }
}

/* ============================================================
   地址列（列表）· 两行
   第一行 省市区+街道+小区（可直接复制去地图搜索）
   第二行 客户手填的精准地址
   ============================================================ */

.addr-cell {
    line-height: 1.5;
    max-width: 250px;
}

.addr-street {
    display: block;
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.5;
    word-break: break-all;
    cursor: copy;
    /* 点一下即可全选整段，方便复制 */
    user-select: all;
    -webkit-user-select: all;
}

.addr-precise {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--text);
    word-break: break-all;
}

.addr-precise i {
    font-style: normal;
    font-size: 10px;
    line-height: 1.6;
    padding: 0 4px;
    margin-right: 5px;
    border-radius: 3px;
    background: var(--primary-l);
    color: var(--primary-d);
    vertical-align: 1px;
}

.addr-dd {
    line-height: 1.7;
    color: var(--text);
}

/* 详情页的地址行：同样支持一键全选 */
dd.addr-street {
    color: var(--text);
    font-size: 13px;
}

/* ============================================================
   订单列表 · 列宽与单元格（对齐老后台订单管理2）
   ============================================================ */

.table-orders { min-width: 1320px; }

.table-orders .col-sn      { width: 168px; }
.table-orders .col-buyer   { width: 104px; }
.table-orders .col-seller  { width: 176px; }
.table-orders .col-type    { width: 52px;  }
.table-orders .col-make    { width: 52px;  }
.table-orders .col-hole    { width: 64px;  }
.table-orders .col-amount  { width: 104px; }
.table-orders .col-status  { width: 86px;  }
.table-orders .col-addr    { width: 230px; }
.table-orders .col-remark  { min-width: 190px; }
.table-orders .col-time    { width: 92px;  }
.table-orders .col-op      { width: 72px;  }

/* 来源角标（汇 / 微小 / 手 …） */
.tag-src {
    background: #1380CB;
    color: #fff;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1.7;
    vertical-align: 1px;
    cursor: help;
}

.tel-link { color: var(--blue); }
.tel-link:hover { text-decoration: underline; }

.store-name {
    display: block;
    max-width: 176px;
    font-size: 12.5px;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-tel {
    display: block;
    font-size: 11.5px;
    color: var(--faint);
    font-family: var(--mono);
}

/* 下单时间：已取消橙色 / 已标记付款红色（老后台行为） */
.time-cell.is-cancel { color: #F80; }
.time-cell.is-paid   { color: #F00; }

.link-alt { color: var(--blue); margin-left: 6px; }

.table-orders .remark { max-width: 190px; }

/* ============================================================
   订单详情 · 补充板块
   ============================================================ */

.map-link {
    display: inline-block;
    margin-left: 8px;
    font-size: 11.5px;
    color: var(--blue);
    border: 1px solid #d6e8ff;
    background: #f4f9ff;
    padding: 0 6px;
    border-radius: 4px;
    vertical-align: 1px;
    white-space: nowrap;
}
.map-link:hover { background: #e8f3ff; }

/* 安装前后图分组 */
.img-group + .img-group { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }

.img-group-title {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    margin: 0 0 8px;
}

/* 订单日志 */
.table-logs { font-size: 12.5px; }
.table-logs td { white-space: normal; }
.table-logs .log-action {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    background: #F1F3F5;
    color: var(--text-2);
    font-size: 12px;
    white-space: nowrap;
}

/* ============================================================
   订单详情 · 排版精修
   ============================================================ */

.detail-head { align-items: flex-start; }
.dh-main { min-width: 0; }
.detail-meta .meta-item { color: var(--muted); font-size: 12.5px; }

/* 左右两栏更均衡 */
.detail-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
    align-items: start;
}

.detail-col > .card { margin: 0; }

/* 详情里的地址行 */
.detail-col .addr-dd { line-height: 1.75; }
.detail-col .addr-street { display: inline; color: var(--text); font-size: 13px; }

/* 图片分组标题带数量 */
.img-group-title em {
    font-style: normal;
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 3px;
    background: #F1F3F5;
    color: var(--faint);
    font-size: 10.5px;
    line-height: 1.7;
    vertical-align: 1px;
}

.img-group { margin: 0 0 18px; }
.img-group:last-child { margin-bottom: 0; }
.img-group + .img-group { margin-top: 0; padding-top: 16px; border-top: 1px dashed var(--border); }

/* 通栏卡片之间的间距已由 .page 的 gap 控制 */

/* ============================================================
   订单号颜色 · 按师傅等级
   （与老后台 index.tpl.php 一致：合作/VIP 蓝，警告 红，普通 黑）
   ============================================================ */

.sn-link.lv-vip,
.sn-link.lv-coop { color: #1E90FF; }

.sn-link.lv-normal { color: var(--text); }

.sn-link.lv-vip:hover,
.sn-link.lv-coop:hover { color: #0B6FD0; border-bottom-color: #1E90FF; }

/* 颜色图例 */
.head-right { display: flex; align-items: center; gap: 14px; }

.legend { display: flex; align-items: center; gap: 12px; }

.legend .lg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

.legend .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-vip    { background: #1E90FF; }
.dot-coop   { background: #48A9F8; }
.dot-normal { background: #C9CFD6; }

/* 弹窗内的三档图例 */
.tf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: -2px 0 10px;
    font-size: 11.5px;
    color: var(--muted);
}
.tf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tf-legend .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-warn   { background: #E8453C; }

/* ============================================================
   转让弹窗
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
}

.modal.is-open { display: block; }

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .38);
    animation: tfFade .16s ease;
}

.modal-box {
    position: relative;
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    margin: 6vh auto 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(17, 24, 39, .22);
    animation: tfUp .18s ease;
    overflow: hidden;
}

@keyframes tfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tfUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-2);
}

.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }

.modal-x {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: var(--faint);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 5px;
}
.modal-x:hover { background: #F3F5F7; color: var(--text); }

.modal-body { padding: 16px 18px; overflow: auto; }

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 13px 18px;
    border-top: 1px solid var(--border-2);
    background: #FBFCFD;
}

/* 转让：订单信息 */
.tf-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #F7F9FA;
    margin-bottom: 12px;
    font-size: 13px;
}
.tf-k { color: var(--muted); font-size: 12px; margin-right: 6px; }

.tf-input { width: 100%; }

.tf-tip {
    margin: 8px 0 10px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.tf-tip b { color: var(--primary-d); }

/* 候选列表 */
.tf-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 300px;
    overflow: auto;
    background: #fff;
}

.tf-empty {
    padding: 34px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--faint);
}

.tf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-2);
    cursor: pointer;
    transition: background .12s;
}
.tf-item:last-child { border-bottom: 0; }
.tf-item:hover { background: #F7FAFB; }
.tf-item.is-picked { background: var(--primary-l); }

.tf-lv {
    flex: 0 0 auto;
    min-width: 34px;
    text-align: center;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.7;
    color: #fff;
}
.tf-lv.lv-vip    { background: #1E90FF; }
.tf-lv.lv-coop   { background: #48A9F8; }
.tf-lv.lv-normal { background: #C2C8D0; }

.tf-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}
.tf-main b {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tf-main em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    font-family: var(--mono);
}

.tf-extra {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    align-items: center;
}
.tf-extra i {
    font-style: normal;
    font-size: 11.5px;
    color: var(--faint);
    white-space: nowrap;
}
.tf-extra i.on  { color: #0A8F5B; }
.tf-extra i.off { color: #C9CFD6; }

.link-tf { color: #F5822A; margin-left: 8px; }
.link-tf:hover { text-decoration: underline; }

.nowrap { white-space: nowrap; }

@media (max-width: 760px) {
    .modal-box { margin-top: 3vh; max-height: calc(100vh - 24px); }
    .tf-extra { display: none; }
    .head-right { gap: 8px; }
    .legend { display: none; }
    .table-orders { min-width: 1180px; }
}

/* ============================================================
   转让候选 · 超出服务范围标记
   ============================================================ */

.tf-item.is-out { background: #FFF9F8; }
.tf-item.is-out:hover { background: #FFF3F1; }
.tf-item.is-out .tf-main b { color: #B23A30; }

.tf-extra i.out {
    color: #E8453C;
    font-weight: 500;
}

/* 「查看全部（不限范围）」按钮 */
.tf-all {
    display: block;
    margin: 14px auto 0;
}

.tf-empty b { color: var(--text); }

/* ============================================================
   订单详情 · 手工操作按钮区
   ============================================================ */

.dh-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    flex: 0 0 auto;
}

.dh-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 420px;
}

.dh-actions .btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
}

.dh-actions .btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    background: #F3F5F7;
    border-color: var(--border);
    color: var(--muted);
}

.btn-ghost {
    background: #fff;
    border-color: var(--border);
    color: var(--text-2);
}
.btn-ghost:hover { background: #F7FAFB; border-color: #DCE1E6; }

/* 小尺寸弹窗 */
.modal-sm { width: min(460px, calc(100vw - 32px)); }

.act-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #F7F9FA;
    margin-bottom: 14px;
    font-size: 13px;
}

.act-field {
    display: block;
    margin-bottom: 13px;
}

.act-field > span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
}

.act-textarea {
    height: auto;
    padding: 8px 10px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.act-warn {
    margin: 2px 0 0;
    padding: 9px 12px;
    border-radius: 7px;
    background: #FFF8E6;
    color: #8A6100;
    font-size: 12.5px;
    line-height: 1.65;
}
.act-warn[hidden] { display: none; }

@media (max-width: 760px) {
    .dh-side { align-items: flex-start; width: 100%; }
    .dh-actions { justify-content: flex-start; max-width: none; }
}
