*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 160px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}
body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}
/* 侧边栏折叠开关 */
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 22px;
    color: #1a1a2e;
    cursor: pointer;
    padding: 4px 10px;
    margin-right: 6px;
    border-radius: 5px;
    line-height: 1;
}
.sidebar-toggle:hover {
    background: #f0f0f0;
}

.logo {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 72px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar nav ul {
    list-style: none;
    padding: 12px 0;
}

.sidebar nav ul li a {
    display: block;
    padding: 14px 20px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: #00d4ff;
}

/* 侧边栏子菜单（缩进） */
.sidebar nav ul li.nav-sub a {
    padding: 11px 20px 11px 42px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}
body.sidebar-collapsed .main-content {
    margin-left: 0;
}

.top-bar {
    background: #fff;
    padding: 18px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 48px;
    min-width: 0;
    max-width: 100%;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
    flex-shrink: 1;
}

.top-bar h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
}

.content {
    padding: 24px 30px;
    flex: 1;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 16px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 18px;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card .stat-label {
    font-size: 15px;
    color: #888;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 600;
    color: #1a1a2e;
}

.stat-card .stat-trend {
    font-size: 14px;
    margin-top: 6px;
}

.stat-card .stat-trend.up {
    color: #52c41a;
}

.stat-card .stat-trend.down {
    color: #f5222d;
}

.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
    /* 锁定行高：保证 <a>/<button> 高度一致，并防止 emoji（如 🔄）把行盒撑高导致按钮变高 */
    line-height: 1.5;
    /* 统一垂直对齐方式，避免 baseline 对齐造成的高低错落 */
    vertical-align: middle;
    /* 去除 <button> 浏览器原生默认样式，保证 button 与 a 渲染一致 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #00d4ff;
    color: #fff;
}

.btn-primary:hover {
    background: #00b8e6;
}

.btn-secondary {
    background: #c9c9c9;
    color: #222;
}

.btn-secondary:hover {
    background: #b5b5b5;
}

.btn-danger {
    background: #f5222d;
    color: #fff;
    /* 显式归一化与 .btn-sm 完全一致：不重设 line-height / font-family，
       以免渲染高度与 .btn-sm 不一致；
       font-size/padding 已被 .btn-sm 覆盖，这里仅做兜底 */
    padding: 5px 12px;
    font-size: 15px;
    font-family: inherit;
}

.btn-danger:hover {
    background: #cf1322;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

table thead {
    background: #f8f9fa;
}

table th,
table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

table tbody tr:hover {
    background: #fafafa;
}

/* ===== 作品获得激励：整行深色高亮（背景 + 文字加深），供作品列表/最新作品复用 ===== */
tr.work-incentive-biz > td {
    background-color: #fff7e6 !important;
    color: #5c3a00 !important;
}
tr.work-incentive-biz:hover > td {
    background-color: #ffe7ba !important;
}
tr.work-incentive-biz a {
    color: #ad4e00 !important;
}

.filter-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* 每日数据页 PC 端：让 .filter-row 对布局透明，form 内所有控件横向单排；
   移动端 (max-width:768px) 的媒体查询已用 .filter-row { display:flex !important } 覆盖 */
.filter-row {
    display: contents;
}
.filter-bar form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-bar input,
.filter-bar select {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    height: 40px;
    box-sizing: border-box;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0,212,255,0.1);
}

/* 筛选栏各组件桌面端默认宽度 */
.filter-input { width: 140px; text-align: center; }

/* 筛选表单行分组容器：桌面端不参与布局（子元素直接进入父 flex），移动端覆盖为网格 */
.filter-bar form .filter-fields-row,
.filter-bar form .filter-buttons-row {
    display: contents;
}
.filter-input-lg { width: 220px; }
.filter-select { width: 140px; text-align: center; }
.filter-select-md { width: 160px; }
.filter-select-lg { width: 180px; }
.filter-date { width: 140px; }
/* 日期输入框默认提示（date input 不支持 placeholder，用叠加层实现） */
.date-filter-wrap {
    position: relative;
    display: inline-block;
    width: 160px;
    vertical-align: middle;
}
.date-filter-wrap .date-filter-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    white-space: nowrap;
    text-align: center;
}
.date-filter-wrap.has-value .date-filter-hint {
    display: none;
}
.date-filter-wrap input[type="date"] {
    cursor: pointer;
}
.date-filter-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* 复选框：隐藏未配置 Cookie 账号 */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.filter-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #00d4ff;
    box-sizing: border-box;
}
.filter-checkbox-label span {
    line-height: 1.2;
}

/* 批量操作栏 */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: #f7f9fc;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    flex-wrap: wrap;
}
.batch-count {
    font-size: 13px;
    color: #666;
}
.batch-dropdown {
    position: relative;
    display: inline-block;
}
.batch-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 50;
    overflow: hidden;
}
.batch-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 14px;
    background: none;
    border: none;
    font-size: 14px;
    color: #d4380d;
    cursor: pointer;
}
.batch-menu-item:hover {
    background: #fff1f0;
}
.batch-menu-item.disabled {
    color: #bbb;
    cursor: not-allowed;
}
.batch-menu-item.disabled:hover {
    background: none;
}
.col-check {
    width: 38px;
    text-align: center;
    white-space: nowrap;
}
.col-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination .active {
    background: #00d4ff;
    color: #fff;
    border-color: #00d4ff;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select {
    width: 100%;
    height: 38px !important;
    padding: 0 14px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    outline: none;
    font-family: inherit;
    background: #fff !important;
    transition: all 0.2s;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    line-height: 38px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* 复选框 / 单选框保持原生外观，避免被全局规则渲染成输入框 */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    line-height: normal !important;
    vertical-align: middle !important;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px !important;
    padding-right: 38px !important;
}

.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    font-family: inherit;
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0,212,255,0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.form-actions {
    padding-top: 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.tag-green {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag-orange {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.tag-blue {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.tag-red {
    background: #fff1f0;
    color: #f5222d;
    border: 1px solid #ffa39e;
}

.tag-gray {
    background: #fafafa;
    color: #888;
    border: 1px solid #e8e8e8;
}

.tag-gold {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffe58f;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.grid-2 {
    display: grid;
    grid-template-columns: 25fr 75fr;
    gap: 20px;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
}

.info-list li .label {
    width: 120px;
    color: #888;
    flex-shrink: 0;
}

.info-list li .value {
    flex: 1;
    color: #333;
}

/* 移动端：基本信息列表双列显示 */
@media (max-width: 768px) {
    .info-list-2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
    }
    .info-list-2col li {
        padding: 8px 0;
        font-size: 15px;
    }
    .info-list-2col li .label {
        width: 84px;
        font-size: 14px;
    }
}

.chart-placeholder {
    height: 250px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 16px;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    margin-right: 5px;
}

.workbench-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.workbench-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
    transition: all 0.3s;
}

.workbench-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #00d4ff33;
}

.workbench-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0066ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.workbench-title {
    flex: 1;
}

.workbench-title h4 {
    font-size: 18px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.workbench-title p {
    font-size: 15px;
    color: #888;
    margin: 0;
}

.workbench-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.wb-stat {
    text-align: center;
}

.wb-stat-label {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 4px;
}

.wb-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.workbench-stages {
    font-size: 15px;
}

.stage-title {
    color: #666;
    margin-bottom: 8px;
    font-size: 15px;
}

.stage-bar {
    display: flex;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f0f0f0;
}

.stage-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    min-width: 24px;
    transition: all 0.3s;
}

.stage-segment:hover {
    filter: brightness(1.1);
}

.stage-0 { background: #f5222d; }
.stage-1 { background: #fa8c16; }
.stage-2 { background: #fadb14; color: #666; }
.stage-3 { background: #52c41a; }
.stage-4 { background: #13c2c2; }
.stage-5 { background: #1890ff; }
.stage-6 { background: #722ed1; }
.stage-7 { background: #eb2f96; }
.stage-8 { background: #fa541c; }

.stage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00d4ff;
    display: inline-block;
}

.lifecycle-flow {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.lifecycle-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 60px;
    flex-shrink: 0;
}

.node-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lifecycle-node.active .node-circle {
    background: linear-gradient(135deg, #00d4ff, #0066ff);
    color: #fff;
}

.node-name {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
}

.lifecycle-node.active .node-name {
    color: #333;
    font-weight: 500;
}

.lifecycle-arrow {
    color: #ccc;
    font-size: 16px;
    padding-bottom: 16px;
}

.stage-progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0066ff);
    border-radius: 4px;
    transition: width 0.5s;
}

/* ---- 排序表头 ---- */
.sort-header {
    color: #666;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
    display: inline-block;
}
.sort-header:hover {
    color: #1890ff;
}
.sort-header.active-sort {
    color: #1890ff;
    font-weight: 600;
}

.stage-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #999;
}

.stage-step {
    text-align: center;
    flex: 1;
    position: relative;
}

.stage-step.completed {
    color: #52c41a;
}

.stage-step.current {
    color: #1890ff;
    font-weight: 600;
}

/* ---- 侧边栏遮罩 ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    transition: opacity 0.3s;
}
.is-mobile .sidebar-overlay,
body:not(.sidebar-collapsed) .sidebar-overlay {
    display: none;
}
.is-mobile:not(.sidebar-collapsed) .sidebar-overlay {
    display: block;
}

/* ---- 移动端 UA 检测适配 ---- */
.is-mobile .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 140px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.is-mobile:not(.sidebar-collapsed) .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}
.is-mobile .main-content {
    margin-left: 0 !important;
}
.is-mobile .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 20px;
}

/* ==========================================
   平板端响应式（769px - 1080px）
   ========================================== */
@media (min-width: 769px) and (max-width: 1080px) {
    /* 平板端最大宽度限制，居中显示 */
    body {
        max-width: 1080px;
        margin: 0 auto;
    }
    
    .sidebar {
        width: 150px;
    }
    .main-content {
        margin-left: 150px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   移动端响应式
   ========================================== */
@media (max-width: 768px) {
    /* 手机端最大宽度限制，居中显示 */
    body {
        max-width: 768px;
        margin: 0 auto;
    }
    
    /* 侧边栏 - 移动端始终收起，点击展开时覆盖主内容 */
    .sidebar {
        width: 150px;
        transform: translateX(-100%);
        z-index: 1001;
    }
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    body:not(.sidebar-collapsed) .sidebar {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }

    /* 顶部栏 - 紧凑布局，允许换行 */
    .top-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .top-bar h1 {
        font-size: 16px;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .top-bar-right {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    /* "+ 新建"按钮在移动端只显示加号 */
    .quick-action-btn {
        padding: 4px 10px !important;
        font-size: 14px !important;
    }
    /* 顶部所有小按钮紧凑化 */
    .top-bar .btn-sm {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }
    .user-info {
        gap: 4px;
        flex-wrap: wrap;
    }
    .user-info .user-name {
        display: none;
    }
    .sync-status {
        font-size: 12px;
    }

    /* 内容区 */
    .content {
        padding: 12px 8px;
    }

    /* 卡片 */
    .card {
        padding: 12px 8px;
        border-radius: 4px;
    }

    /* 筛选栏 - 纵向堆叠 */
    .filter-bar {
        padding: 12px 10px;
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar > div {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    /* 批量操作栏移动端占满宽度，按钮并排 */
    .batch-bar {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        gap: 6px;
        align-items: center;
        padding: 10px 12px;
    }
    .batch-bar .btn {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 6px 8px;
        white-space: nowrap;
    }
    .batch-bar .batch-count {
        text-align: center;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    .batch-bar .show-private-toggle {
        margin-left: 0;
        justify-content: center;
        font-size: 12px;
        white-space: nowrap;
        min-width: 0;
    }
    .batch-bar .batch-dropdown {
        width: 100%;
    }
    .batch-dropdown-menu {
        left: auto;
        right: 0;
    }
    .filter-bar form {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .filter-bar form input,
    .filter-bar form select,
    .filter-bar form .btn {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
    }
    .filter-bar form label {
        width: auto;
    }
    /* 移动端：筛选表单行分组 —— 字段行（如三个下拉框）一排、按钮行一排 */
    .filter-bar form .filter-fields-row,
    .filter-bar form .filter-buttons-row {
        display: grid !important;
        width: 100%;
        gap: 8px;
    }
    .filter-bar form .filter-fields-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .filter-bar form .filter-fields-row.one-col {
        grid-template-columns: 1fr;
    }
    .filter-bar form .filter-fields-row.date-range-row {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
    }
    .filter-bar form .filter-fields-row.date-range-row .date-sep {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        line-height: 1;
        color: #999;
        font-size: 14px;
        padding: 0 6px;
        white-space: nowrap;
        min-width: 0;
    }
    .filter-bar form .filter-buttons-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .filter-bar form .filter-buttons-row.two-col {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-bar form .filter-fields-row > *,
    .filter-bar form .filter-buttons-row > * {
        min-width: 0;
        width: 100% !important;
        box-sizing: border-box;
    }
    .filter-bar form .filter-fields-row .filter-input-lg {
        width: 100% !important;
    }
    .filter-bar form .filter-fields-row input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
    }
    .date-filter-wrap {
        width: 100%;
    }
    .date-filter-wrap input[type="date"] {
        width: 100% !important;
    }
    .date-filter-wrap .date-filter-hint {
        font-size: 13px;
    }
    /* 列表层显示私密作品开关 */
    .show-private-toggle {
        margin-left: auto;
        font-size: 14px;
    }
    /* 移动端：复选框不要被 form input 的 width:100% 撑满 */
    .filter-bar form input.filter-checkbox {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        margin: 0;
        padding: 0;
        -webkit-appearance: checkbox;
        appearance: checkbox;
    }
    .filter-checkbox-label {
        white-space: normal;
        align-items: flex-start;
        width: 100%;
    }
    .filter-checkbox-label span {
        padding-top: 2px;
    }
    .filter-bar .btn {
        text-align: center;
    }
    .filter-bar form > span {
        text-align: center;
        color: #999;
        padding: 2px 0;
        font-size: 15px;
    }

    /* 表格 - 水平滚动 */
    .card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
        font-size: 15px;
    }
    table th,
    table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* 操作按钮 - 移动端允许换行 */
    .actions-cell {
        white-space: normal;
    }
    .actions-cell .btn {
        margin-bottom: 4px;
    }

    /* 按钮缩小 */
    .btn {
        padding: 6px 12px;
        font-size: 15px;
    }
    .btn-sm {
        padding: 4px 8px;
        font-size: 14px;
    }

    /* 分页 */
    .pagination a,
    .pagination span {
        padding: 4px 8px;
        font-size: 14px;
    }

    /* 表单 */
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-wrap: wrap;
    }

    /* 统计卡片 */
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-card .stat-value {
        font-size: 24px;
    }

    /* 工作台 */
    .workbench-grid {
        grid-template-columns: 1fr;
    }
    .workbench-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 双栏布局 */
    .grid-2 {
        grid-template-columns: 1fr;
    }

    /* 列表表格：手机端改为竖排卡片(grid 收缩)，零横向溢出 */
    .list-table {
        display: block;
        min-width: 0 !important;
    }
    .list-table thead {
        display: none;
    }
    .list-table tbody {
        display: block;
        width: 100%;
    }
    .list-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2px;
        width: 100%;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 8px 10px;
        margin-bottom: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    .list-table td {
        display: grid;
        grid-template-columns: 70px 1fr;
        align-items: center;
        gap: 4px;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100%;
        padding: 1px 0 !important;
        white-space: normal !important;
        border: none;
        text-align: left;
    }
    .list-table td::before {
        content: attr(data-label);
        color: #888;
        font-size: 11px;
        font-weight: 500;
        white-space: normal;
    }
    .list-table td[colspan] {
        display: block;
        text-align: center;
        color: #aaa;
        padding: 20px 0 !important;
    }
    .list-table td[colspan]::before {
        display: none;
    }
    .list-table td.actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 2px;
    }
    .list-table td.actions-cell::before {
        display: none;
    }
    .list-table td.actions-cell .btn {
        margin: 0;
        flex: 1;
        min-width: 90px;
    }
}

/* ==========================================
   极窄屏响应式（≤540px）：顶部只保留 新建/个人中心/退出
   ========================================== */
@media (max-width: 540px) {
    /* 顶部「同步数据」按钮与「同步完成」状态隐藏 */
    .btn-sync-top,
    #syncStatus {
        display: none !important;
    }
    /* 顶部栏进一步紧凑，保证 3 个按钮完整可见 */
    .top-bar {
        padding: 8px 10px;
    }
    .top-bar h1 {
        font-size: 15px;
    }
    .top-bar-right {
        gap: 4px;
    }
    .top-bar .btn-sm {
        padding: 4px 6px !important;
        font-size: 12px !important;
    }
    .quick-action-btn {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }
}
