/* ==========================================
   PlatformHall - 深色主题 (Material Dark)
   ========================================== */

:root {
    --primary: #ff8c42;
    --primary-hover: #e67a30;
    --primary-light: #2a2018;
    --secondary: #4da3ff;
    --secondary-hover: #3d8ee0;
    --success: #52c41a;
    --success-hover: #389e0d;
    --warning: #faad14;
    --warning-hover: #d48806;
    --danger: #ff4d4f;
    --danger-hover: #cf1322;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #2c2c2c;
    --border-dark: #383838;
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-sidebar: #0d0d0d;
    --bg-header: #161616;
    --bg-hover: #2a2a2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.6);
    --radius: 6px;
    --radius-lg: 8px;
    --sidebar-width: 220px;
    --topbar-height: 64px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--secondary);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-hover);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: rgba(255, 140, 66, 0.12);
    border-color: rgba(255, 140, 66, 0.3);
    color: #ff8c42;
}

.btn-primary:hover {
    background: rgba(255, 140, 66, 0.2);
    border-color: rgba(255, 140, 66, 0.5);
    color: #ff8c42;
}

.btn-success {
    background: rgba(82, 196, 26, 0.12);
    border-color: rgba(82, 196, 26, 0.3);
    color: #52c41a;
}

.btn-success:hover {
    background: rgba(82, 196, 26, 0.2);
    border-color: rgba(82, 196, 26, 0.5);
}

.btn-warning {
    background: rgba(250, 173, 20, 0.12);
    border-color: rgba(250, 173, 20, 0.3);
    color: #faad14;
}

.btn-warning:hover {
    background: rgba(250, 173, 20, 0.2);
    border-color: rgba(250, 173, 20, 0.5);
}

.btn-danger {
    background: rgba(255, 77, 79, 0.12);
    border-color: rgba(255, 77, 79, 0.3);
    color: #ff4d4f;
}

.btn-danger:hover {
    background: rgba(255, 77, 79, 0.2);
    border-color: rgba(255, 77, 79, 0.5);
}

.btn-default {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-default:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

/* 表单 */
input, textarea, select {
    color: var(--text-primary);
    background: var(--bg-card);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-group .required {
    color: var(--danger);
}

.form-input,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}

/* placeholder 深色适配 */
::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

::-ms-input-placeholder {
    color: var(--text-muted);
}

::-ms-input-placeholder {
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 160px;
}

.form-row .form-group[style*="flex:"] {
    min-width: auto;
}

/* 卡片 */
.pc-card,
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    overflow: hidden;
}

.pc-card-header,
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: 56px;
}

.pc-card-header h3,
.panel-header h3,
.pc-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.pc-card > .table-responsive,
.panel > .table-responsive {
    padding: 0;
}

/* 数据表格 */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.pc-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pc-table thead,
.data-table thead {
    background: #252525;
}

.pc-table th,
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.pc-table td,
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.pc-table tbody tr:hover,
.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.pc-table .price,
.data-table .price {
    color: var(--danger);
    font-weight: 500;
}

/* 状态色标签 */
.pc-badge,
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

.status-pending {
    background: #0d2137;
    color: #1890ff;
}

.status-audit {
    background: #2a2018;
    color: #fa8c16;
}

.status-approved {
    background: #0d2818;
    color: #52c41a;
}

.status-taken {
    background: #0d2828;
    color: #13c2c2;
}

.status-done {
    background: #1f1f1f;
    color: #b0b0b0;
}

.status-rejected {
    background: #2d1111;
    color: #ff4d4f;
}

/* 筛选标签 */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-bar a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.filter-bar a:hover,
.filter-bar a.active {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* 分页 */
.pc-pagination,
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.pc-pagination a,
.pagination-bar a {
    color: var(--text-secondary);
}

.pc-pagination a:hover,
.pagination-bar a:hover {
    color: var(--primary);
}

/* 通用分页组件 */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-total {
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-muted);
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-card);
    user-select: none;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(24, 144, 255, 0.06);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.page-btn.disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--text-muted);
    padding: 0 2px;
}

@media (max-width: 640px) {
    .pagination-wrap {
        justify-content: center;
    }
    .page-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        padding: 0 6px;
    }
}

/* 提示 */
.pc-alert,
.alert {
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.pc-alert-success,
.alert-success {
    background: #0d2818;
    border: 1px solid #52c41a;
    color: #52c41a;
}

.pc-alert-error,
.alert-danger {
    background: #2d1111;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
}

.pc-alert-info {
    background: #0d2137;
    border: 1px solid #1890ff;
    color: #1890ff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state-title {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 13px;
}

/* 文字工具 */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

/* =====================
   前台布局
   ===================== */
.pc-wrapper {
    display: flex;
    min-height: 100vh;
}

.pc-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.pc-sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.pc-sidebar-menu {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.pc-sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.pc-sidebar-menu a:hover,
.pc-sidebar-menu a.active {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.pc-sidebar-menu .nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

.pc-sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.pc-sidebar-user p {
    margin: 0 0 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.pc-sidebar-user a {
    color: var(--text-muted);
}

.pc-sidebar-user a:hover {
    color: #fff;
}

.pc-main-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.pc-topbar {
    height: var(--topbar-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.pc-topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pc-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.pc-topbar-right .balance {
    color: var(--danger);
    font-weight: 500;
}

.pc-content {
    flex: 1;
    padding: 20px 24px;
}

.pc-footer {
    width: 100%;
    padding: 16px 24px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    box-sizing: border-box;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
    border-left: 4px solid var(--border-dark);
}

.stat-card .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-card.stat-pending {
    border-left-color: #1890ff;
}

.stat-card.stat-approved {
    border-left-color: #52c41a;
}

.stat-card.stat-taken {
    border-left-color: #13c2c2;
}

.stat-card.stat-done {
    border-left-color: #b0b0b0;
}

.stat-card.stat-rejected {
    border-left-color: #ff4d4f;
}

/* 订单信息网格 */
.pc-info-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.pc-info-item,
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pc-info-item.full,
.detail-item.full {
    grid-column: 1 / -1;
}

.pc-info-label,
.detail-item span:first-child {
    font-size: 12px;
    color: var(--text-muted);
}

.pc-info-value,
.detail-item span:last-child {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.pc-info-value.price {
    color: var(--danger);
    font-weight: 500;
}

.pc-info-value.highlight {
    color: var(--primary);
    font-weight: 500;
}

/* =====================
   后台布局
   ===================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.admin-brand {
    height: var(--topbar-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-brand h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-brand p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.admin-nav-item .nav-icon {
    margin-right: 10px;
    font-size: 16px;
}

.admin-user {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
}

.admin-user p {
    margin: 0 0 6px;
    color: var(--text-secondary);
}

.admin-user a {
    color: var(--text-muted);
}

.admin-user a:hover {
    color: var(--primary);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: var(--topbar-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 20px 24px;
}

/* 详情区块 */
.detail-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-form .form-input {
    width: auto;
}

/* =====================
   登录页
   ===================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand h2 {
    margin: 0;
    font-size: 22px;
    color: var(--text-primary);
}

.login-brand p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.login-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 16px;
}

/* =====================
   买家页面
   ===================== */
.buyer-page {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.buyer-modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px;
    box-sizing: border-box;
}

.buyer-modal-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.buyer-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    gap: 12px;
}

.buyer-info-row:last-child {
    border-bottom: none;
}

.buyer-info-label {
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.buyer-info-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 65%;
    word-break: break-all;
    flex: 1;
}

.buyer-input-section {
    margin-top: 20px;
}

.buyer-input-group {
    margin-bottom: 16px;
}

.buyer-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.buyer-input-group input[type="text"],
.buyer-input-group input[type="number"],
.buyer-input-group input[type="tel"],
.buyer-input-group input[type="file"],
.buyer-input-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
}

.buyer-input-group input:focus,
.buyer-input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.buyer-input-group input[type="file"] {
    padding: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.buyer-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.buyer-btn:hover {
    background: var(--primary-hover);
}

.buyer-btn:active {
    background: var(--primary-hover);
    transform: scale(0.99);
}

.buyer-success {
    text-align: center;
    padding: 24px 0;
}

.buyer-success-icon {
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 24px;
    margin: 0 auto 12px;
}

.buyer-error {
    background: #2d1111;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 13px;
}

.buyer-status-icon {
    text-align: center;
    font-size: 48px;
    margin: 16px 0;
}

.buyer-status-icon.rejected {
    color: var(--danger);
}

.buyer-status-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.buyer-reject-reason {
    background: #2d1111;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 13px;
}

.buyer-order-info {
    font-size: 14px;
}

.buyer-order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.buyer-order-info-row:last-child {
    border-bottom: none;
}

.buyer-order-info-label {
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.buyer-order-info-value {
    color: var(--text-primary);
    max-width: 65%;
    text-align: right;
    word-break: break-all;
    flex: 1;
}

.buyer-order-info-value.price {
    color: var(--danger);
    font-weight: 500;
}

.buyer-timeline {
    padding-left: 8px;
}

.buyer-timeline-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    position: relative;
    color: var(--text-muted);
}

.buyer-timeline-item.done {
    color: var(--text-primary);
}

.buyer-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-dark);
    margin-right: 12px;
    margin-top: 5px;
    flex-shrink: 0;
}

.buyer-timeline-item.done .buyer-timeline-dot {
    background: var(--primary);
}

.buyer-timeline-title {
    font-size: 14px;
    font-weight: 500;
}

.buyer-timeline-time {
    font-size: 12px;
    margin-top: 2px;
}

/* ==========================================
   移动端响应式适配
   ========================================== */
@media screen and (max-width: 480px) {
    .buyer-page {
        padding: 12px 12px;
    }

    .buyer-modal {
        padding: 18px 16px;
        border-radius: 12px;
    }

    .buyer-modal-title {
        font-size: 17px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .buyer-info-row {
        font-size: 13px;
        padding: 8px 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .buyer-info-label {
        font-size: 13px;
    }

    .buyer-info-value {
        max-width: 60%;
        font-size: 13px;
        word-break: break-all;
    }

    .buyer-input-group {
        margin-bottom: 14px;
    }

    .buyer-input-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .buyer-input-group input[type="text"],
    .buyer-input-group input[type="number"],
    .buyer-input-group input[type="tel"],
    .buyer-input-group input[type="file"],
    .buyer-input-group textarea {
        font-size: 16px;
        padding: 11px 12px;
        min-height: 44px;
    }

    .buyer-input-group input[type="file"] {
        font-size: 12px;
        padding: 8px;
    }

    .buyer-btn {
        padding: 13px;
        font-size: 16px;
        min-height: 48px;
        margin-top: 8px;
    }

    .buyer-order-info-row {
        font-size: 13px;
        padding: 8px 0;
    }

    .buyer-order-info-value {
        max-width: 60%;
    }

    .buyer-status-icon {
        font-size: 40px;
        margin: 12px 0;
    }

    .buyer-error {
        font-size: 12px;
        padding: 8px 10px;
    }

    .buyer-timeline-item {
        padding: 10px 0;
    }

    .buyer-timeline-title {
        font-size: 13px;
    }

    .buyer-timeline-time {
        font-size: 11px;
    }
}

/* 超小屏幕适配 (320px) */
@media screen and (max-width: 359px) {
    .buyer-modal {
        padding: 14px 12px;
    }

    .buyer-modal-title {
        font-size: 16px;
    }

    .buyer-info-row,
    .buyer-order-info-row {
        font-size: 12px;
    }

    .buyer-info-value,
    .buyer-order-info-value {
        max-width: 55%;
    }
}

/* 桌面端保持原有样式不变 */
@media screen and (min-width: 769px) {
    .buyer-page {
        padding: 40px 16px;
    }

    .buyer-modal {
        padding: 28px;
    }
}

/* 余额卡片 */
.balance-box {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6a00 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.balance-box .label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-box .amount {
    font-size: 32px;
    font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
    .pc-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .pc-main-area,
    .admin-main {
        margin-left: 0;
    }

    .pc-content,
    .admin-content {
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pc-info-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================
   接单大厅 - 搜索与筛选面板
   ===================== */

.hall-filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px;
    margin-bottom: 16px;
}

.hall-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.hall-search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.hall-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.hall-search-input {
    width: 100%;
    padding: 10px 38px 10px 40px;
    font-size: 14px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    background: var(--bg-body);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.hall-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

.hall-search-input::placeholder {
    color: var(--text-muted);
}

.hall-search-clear {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-dark);
    color: var(--text-secondary);
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.hall-search-clear:hover {
    background: var(--danger);
    color: #fff;
}

.hall-search-btn {
    padding: 10px 24px;
    white-space: nowrap;
    flex-shrink: 0;
}

.hall-filter-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.hall-filter-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 30px;
    white-space: nowrap;
    min-width: 56px;
    flex-shrink: 0;
}

.hall-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.hall-filter-tag {
    display: inline-block;
    padding: 5px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.hall-filter-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.hall-filter-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
}

.hall-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.hall-active-filters:empty {
    display: none;
}

.hall-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(255, 140, 66, 0.25);
    border-radius: 12px;
}

.hall-active-tag a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s;
}

.hall-active-tag a:hover {
    color: var(--danger);
}

.hall-clear-all {
    font-size: 12px;
    color: var(--danger);
    text-decoration: none;
    padding: 2px 10px;
    border: 1px solid rgba(255, 77, 79, 0.3);
    border-radius: 12px;
    transition: all 0.2s;
}

.hall-clear-all:hover {
    background: rgba(255, 77, 79, 0.1);
    color: var(--danger-hover);
}

@media (max-width: 768px) {
    .hall-filter-panel {
        padding: 14px;
    }

    .hall-search-form {
        flex-direction: column;
        gap: 8px;
    }

    .hall-search-btn {
        width: 100%;
        padding: 10px;
    }

    .hall-filter-group {
        flex-direction: column;
        gap: 6px;
    }

    .hall-filter-label {
        line-height: inherit;
    }

    .hall-active-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .hall-clear-all {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hall-filter-tags {
        gap: 5px;
    }

    .hall-filter-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* ==========================================
   全局移动端响应式优化
   ========================================== */

/* iOS Safari 安全区适配 */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .buyer-page {
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    .admin-content,
    .pc-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* 触控优化：所有可点击元素最小触控区域 44px */
@media (max-width: 768px) {
    .btn,
    .pc-badge,
    .hall-filter-tag,
    .filter-bar a,
    .admin-nav-item {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-sm {
        min-height: 36px;
        padding: 6px 14px;
    }

    /* 表格单元格间距优化 */
    .pc-table th,
    .pc-table td,
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    /* 输入框适配：防止 iOS 聚焦缩放 */
    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* 表单行改为纵向排列 */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* 按钮和表单元素增加触控间距 */
    .form-group {
        margin-bottom: 12px;
    }

    /* 后台移动端菜单按钮 */
    .admin-topbar {
        padding-left: 16px;
    }

    .admin-topbar h1 {
        font-size: 16px;
    }

    /* 表格水平滚动优化 */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    /* 卡片间距优化 */
    .pc-card,
    .panel {
        margin-bottom: 12px;
    }

    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 11px;
    }

    /* 详情网格 */
    .pc-info-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    /* 隐藏 hover 效果，改用 active */
    .pc-table tbody tr:hover,
    .data-table tbody tr:hover {
        background: transparent;
    }

    .pc-table tbody tr:active,
    .data-table tbody tr:active {
        background: var(--bg-hover);
    }
}

/* 小屏幕手机优化 (≤480px) */
@media (max-width: 480px) {
    .admin-content,
    .pc-content {
        padding: 10px;
    }

    .pc-card,
    .panel {
        padding: 14px 12px;
    }

    .pc-card-header,
    .panel-header {
        padding: 0 0 12px;
    }

    .pc-card-title,
    .panel-header h3 {
        font-size: 15px;
    }

    /* 统计卡片单列 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    /* 表格字体缩小 */
    .pc-table,
    .data-table {
        font-size: 12px;
    }

    .pc-table th,
    .pc-table td,
    .data-table th,
    .data-table td {
        padding: 8px 8px;
        white-space: nowrap;
    }

    /* 按钮全宽 */
    .buyer-btn {
        width: 100%;
    }

    /* 筛选栏可横向滚动 */
    .filter-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .filter-bar a {
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 超小屏幕 (≤359px) */
@media (max-width: 359px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .pc-table,
    .data-table {
        font-size: 11px;
    }
}

/* 横屏适配 */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
    .buyer-page {
        padding: 10px 16px;
        align-items: flex-start;
    }

    .buyer-modal {
        max-width: 100%;
    }
}

/* 禁用移动端长按选中和高亮 */
@media (max-width: 768px) {
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    input,
    textarea,
    [contenteditable] {
        -webkit-user-select: text;
        user-select: text;
    }

    a,
    button,
    .btn,
    .hall-filter-tag {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==========================================
   后台移动端菜单
   ========================================== */
.admin-menu-toggle {
    display: none;
}

.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

@media (max-width: 768px) {
    .admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-topbar {
        display: flex;
        align-items: center;
        padding: 0 16px;
    }

    .admin-nav-item {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* 工作室端移动端菜单 */
.pc-menu-toggle {
    display: none;
}

.pc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

@media (max-width: 768px) {
    .pc-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .pc-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
    }

    .pc-sidebar.open {
        transform: translateX(0);
    }

    .pc-topbar {
        display: flex;
        align-items: center;
        padding: 0 12px;
        height: 52px;
    }

    .pc-topbar h1 {
        font-size: 15px;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pc-topbar-right {
        gap: 8px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .pc-topbar-right .balance {
        font-size: 13px;
    }

    .pc-content {
        padding: 12px;
        overflow-x: hidden;
    }

    /* 卡片内边距优化 */
    .pc-card {
        padding: 12px;
        margin-bottom: 10px;
    }

    .pc-card-header {
        padding: 0 0 10px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .pc-card-title {
        font-size: 14px;
    }

    /* 图片自适应 */
    img {
        max-width: 100%;
        height: auto;
    }

    /* 侧边栏菜单项触控优化 */
    .pc-sidebar-menu a {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px;
    }

    .pc-sidebar-brand {
        height: 52px;
        font-size: 16px;
        padding: 0 16px;
    }

    /* 表格优化：减少内边距 */
    .pc-table th,
    .pc-table td {
        padding: 8px 6px;
        font-size: 12px;
    }

    /* 隐藏次要列，减少横向滚动 */
    .pc-table .col-hide-mobile {
        display: none;
    }

    /* 订单状态徽章 */
    .pc-badge {
        font-size: 11px;
        padding: 2px 6px;
    }

    /* 空状态 */
    .empty-state-icon {
        font-size: 36px;
    }

    .empty-state-title {
        font-size: 14px;
    }

    .empty-state-desc {
        font-size: 12px;
    }

    /* 搜索面板优化 */
    .hall-search-input {
        padding: 10px 36px 10px 36px;
        font-size: 15px;
    }

    .hall-search-btn {
        min-height: 42px;
        font-size: 14px;
    }

    /* 分页 */
    .page-info {
        font-size: 12px;
    }

    /* 防止横向溢出 */
    .pc-wrapper {
        overflow-x: hidden;
    }

    .pc-main-area {
        margin-left: 0;
        width: 100%;
    }
}

/* 小屏幕手机 (≤480px) */
@media (max-width: 480px) {
    .pc-topbar {
        padding: 0 8px;
        height: 48px;
    }

    .pc-topbar h1 {
        font-size: 14px;
    }

    .pc-topbar-right {
        font-size: 11px;
    }

    .pc-content {
        padding: 8px;
    }

    .pc-card {
        padding: 10px;
    }

    .pc-card-header {
        padding: 0 0 8px;
    }

    .pc-card-title {
        font-size: 13px;
    }

    /* 表格更紧凑 */
    .pc-table {
        font-size: 11px;
    }

    .pc-table th,
    .pc-table td {
        padding: 6px 4px;
    }

    /* 筛选标签 */
    .filter-bar {
        gap: 4px;
        padding-bottom: 4px;
    }

    .filter-bar a {
        padding: 5px 8px;
        font-size: 11px;
        min-height: 32px;
    }

    /* 搜索框 */
    .hall-search-input {
        font-size: 14px;
        padding: 8px 32px 8px 32px;
    }

    .hall-search-icon {
        left: 8px;
        width: 14px;
        height: 14px;
    }

    /* 余额显示 */
    .pc-topbar-right .balance {
        font-size: 12px;
    }

    /* 菜单按钮缩小 */
    .pc-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-right: 8px;
    }

    /* 侧边栏菜单 */
    .pc-sidebar-menu a {
        padding: 12px 16px;
        font-size: 14px;
    }

    .pc-sidebar-brand {
        font-size: 15px;
        height: 48px;
    }
}