/**
 * PC 端样式（仅 media min-width:769px 加载，不修改手机端 mobile / mobile-orders）
 * 与 common 变量统一：卡片、圆角、主色 #1e3a8a
 */

.desktop-only {
    display: block;
}

/* ---------- 顶栏与主区域 ---------- */
.app-header-inner {
    max-width: 1200px;
    justify-content: space-between;
}

.app-main {
    max-width: 1200px;
    padding: 16px 20px 48px;
}

.brand {
    width: auto;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
}

.header-nav {
    width: auto;
    justify-content: flex-end;
    gap: 16px;
}

.header-nav a {
    font-size: 14px;
}

.header-nav a.active {
    font-weight: 500;
}

/* ---------- 页面标题 ---------- */
.page-title-bar {
    text-align: left;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px;
    letter-spacing: 0.01em;
}

.page-title-bar--sub {
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}

.back-link {
    margin-bottom: 8px;
}

.back-link:hover {
    color: var(--primary-light);
}

/* ---------- 搜索与筛选 ---------- */
.search-panel {
    background: var(--card);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.search-panel__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: none;
}

.search-panel__input {
    flex: 1;
    min-width: 220px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
}

.search-panel__btn {
    flex-shrink: 0;
    height: 40px;
    min-width: 72px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.search-panel__btn--primary {
    background: var(--primary);
    color: #fff;
}

.search-panel__btn--primary:hover {
    background: var(--primary-hover);
}

.search-panel__btn--ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.search-panel__btn--ghost:hover {
    background: #eff6ff;
}

.search-panel__btn--icon {
    min-width: 40px;
    width: 40px;
    padding: 0;
}

.search-panel__plus-icon {
    display: block;
}

/* 筛选已启用角标（与手机逻辑一致，样式仅 PC 表） */
.search-panel__btn--filter {
    position: relative;
    overflow: visible;
}

.search-panel__filter-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    box-sizing: border-box;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 0 0 2px #fff;
}

.filter-panel {
    display: none;
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.filter-panel.is-open {
    display: block;
}

.filter-grid {
    display: grid;
    gap: 14px 16px;
    grid-template-columns: repeat(3, 1fr);
}

.filter-field input,
.filter-field select {
    margin-top: 0;
    min-height: 38px;
    padding: 8px 10px;
    font-weight: 400;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.filter-actions .btn-filter-action {
    min-width: 96px;
}

/* ---------- 列表：仅桌面表格 ---------- */
.list-mobile {
    display: none;
}

.page-orders .list-desktop {
    margin-top: 4px;
}

/* ---------- 数据表格（居中、正文不加粗） ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.data-table th,
.data-table td {
    padding: 11px 10px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
}

.data-table th {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.data-table tbody tr:hover td {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td a {
    font-weight: 400;
    color: var(--primary-light);
}

.data-table td a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.data-table td .badge {
    font-weight: 400;
}

.data-table td small {
    font-weight: 400;
    color: var(--muted);
}

.data-table .dot {
    margin: 0 auto;
}

.data-table td .user-edit-form {
    justify-content: center;
    max-width: 100%;
}

.data-table td .inline-restore {
    display: flex;
    justify-content: center;
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 12px 0 4px;
}

.pagination a {
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    box-shadow: none;
}

.pagination a:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.pagination a.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-info {
    font-size: 13px;
    color: var(--muted);
    width: auto;
    margin-left: 8px;
}

/* ---------- 订单详情 ---------- */
.page-order-view {
    max-width: 720px;
    margin: 0 auto;
}

.detail-summary-card {
    border: 1px solid var(--border);
}

.detail-no {
    font-size: 18px;
    font-weight: 600;
}

.anchor-nav {
    position: sticky;
    top: 56px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(238, 242, 246, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.anchor-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
}

.anchor-link:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.page-order-view .kv-row dd {
    font-weight: 400;
}

.page-order-view .section-card {
    border: 1px solid var(--border);
}

.page-order-view .section-head h2 {
    font-weight: 600;
}

/* ---------- 表单页 / 管理页 ---------- */
.page-narrow {
    max-width: 560px;
}

.section-card > h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
}

.page-site-settings .hint {
    max-width: 720px;
    line-height: 1.55;
}

.admin-tip {
    max-width: 960px;
}

.admin-deleted-hint {
    max-width: 960px;
    margin-bottom: 14px;
}

.form-inline-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.form-inline-grid label span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 400;
}

.user-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.user-edit-form input,
.user-edit-form select {
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
}

.users-mobile {
    display: none;
}

.users-desktop {
    display: block;
}

.deleted-orders-mobile {
    display: none;
}

.deleted-orders-desktop {
    display: block;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.deleted-orders-desktop .data-table {
    margin: 0;
}

/* ---------- 旧工具栏类（若仍有引用） ---------- */
.toolbar {
    margin-bottom: 16px;
}

.toolbar-search {
    display: flex;
    align-items: stretch;
    gap: 8px;
    max-width: 820px;
}

.toolbar-input {
    flex: 1;
    min-width: 120px;
    padding: 0 14px;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card);
    max-width: none;
}

.btn-toolbar {
    min-width: 64px;
}

.btn-icon {
    min-width: 40px;
    width: 40px;
}

/* ---------- 登录页 PC ---------- */
.login-card {
    box-shadow: 0 16px 48px rgba(15, 35, 75, 0.14);
}

.login-card h1 {
    font-weight: 600;
}
