/* ===== 设计 Token ===== */
:root {
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
    --bg: #ffffff;
    --bg-sub: #f5f5f7;
    --text: #1d1d1f;
    --text-sub: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ff9500;
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-modal: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --glass: rgba(255,255,255,0.72);
}

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

/* 内联 SVG 图标：尺寸跟随父元素 font-size */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--bg-sub);
    color: var(--text);
    white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: var(--bg-sub); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== 登录页 ===== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}
.login-container { width: 100%; max-width: 400px; padding: 24px; }
.login-card {
    background: #fff;
    border-radius: var(--radius-modal);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    text-align: center;
}
.login-logo {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.login-subtitle {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 32px;
}
.login-form { text-align: left; }
.login-hint {
    text-align: center;
    color: var(--text-sub);
    font-size: 12px;
    margin-top: 16px;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 6px;
}
.form-group .required { color: var(--danger); }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group textarea { resize: vertical; }
.form-tip {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* ===== 顶部导航 ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo {
    font-size: 18px;
    font-weight: 600;
    margin-right: 12px;
}

/* 用户菜单 */
.user-menu { position: relative; }
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.15s;
}
.user-info:hover { background: var(--bg-sub); }
.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}
.user-name { font-size: 14px; }
.dropdown-arrow { font-size: 12px; color: var(--text-sub); display: inline-flex; align-items: center; }
.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 140px;
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    display: none;
}
.user-dropdown.show { display: block; }
.user-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.user-dropdown-item:hover { background: var(--bg-sub); }
.user-dropdown-item.danger { color: var(--danger); }

/* ===== 移动端折叠导航 ===== */
.nav-toggle {
    display: none;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    padding: 6px 8px;
}
.mobile-nav-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
}
.mobile-nav-mask.show { display: block; }
.mobile-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background: #fff;
    z-index: 301;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    transition: left 0.25s ease;
}
.mobile-nav.open { left: 0; }
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f2;
}
.mobile-nav-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: none;
    background: none;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-btn);
    font-family: inherit;
}
.mobile-nav-item:hover { background: var(--bg-sub); }
.mobile-nav-section {
    margin: 16px 4px 4px;
    font-size: 12px;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mobile-filter {
    width: 100%;
    margin-bottom: 6px;
    padding: 10px 12px;
}

/* ===== 看板 ===== */
.board {
    padding: 24px;
    min-height: calc(100vh - 60px);
}
/* 商务人员：我的需求工单视图 */
.business-wo {
    padding: 24px;
    min-height: calc(100vh - 60px);
}
.business-tabs {
    max-width: 900px;
    margin: 0 auto 16px;
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e5e5ea;
}
.business-tab {
    padding: 10px 2px;
    margin-bottom: -1px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-sub);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.business-tab:hover { color: var(--text); }
.business-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.business-wo-header {
    max-width: 900px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.business-wo-inner {
    max-width: 900px;
    margin: 0 auto;
}
.board-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}
.column {
    background: var(--bg-sub);
    border-radius: var(--radius-card);
    padding: 12px;
    min-height: 400px;
}
.column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 12px;
}
.column-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
}
.column-count {
    font-size: 12px;
    color: var(--text-sub);
    background: #e8e8ed;
    padding: 1px 8px;
    border-radius: 10px;
}
.column-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
    transition: background 0.2s;
}
.column-body.drag-over {
    background: rgba(0,113,227,0.06);
    border-radius: 8px;
}
.column-empty {
    text-align: center;
    color: var(--text-sub);
    font-size: 12px;
    padding: 24px 0;
}

/* 任务卡片 */
.card {
    background: #fff;
    border-radius: var(--radius-card);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: grab;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card:active { cursor: grabbing; }
.card.dragging {
    opacity: 0.4;
    transform: scale(1.02);
}
.card-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-desc {
    font-size: 14px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    line-height: 1.5;
    font-weight: 400;
}
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.pri-low { background: #e8f9ee; color: var(--success); }
.pri-medium { background: #fff4e5; color: var(--warning); }
.pri-high { background: #ffe8e6; color: var(--danger); }
.pri-urgent { background: var(--danger); color: #fff; }
.requester-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: #eef4ff;
    color: #3b6fd4;
}
.creator-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: #f0f0f2;
    color: var(--text-sub);
}
.deliver-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: #eaf7ee;
    color: #2f8a4c;
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.card-assignees { display: flex; align-items: center; }
.assignee-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-sub);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-sub);
    margin-right: 4px;
}
.card-icons {
    display: flex;
    gap: 4px;
    font-size: 13px;
}
.card-deadline {
    font-size: 11px;
    color: var(--text-sub);
    margin-top: 6px;
}
.card-deadline.overdue { color: var(--danger); }
.deadline-human {
    margin-left: 4px;
    font-weight: 500;
}
.card-deadline.overdue .deadline-human { color: var(--danger); }

/* 同列拖拽排序的插入指示线 */
.card.sort-before { box-shadow: 0 -3px 0 var(--accent); }
.card.sort-after { box-shadow: 0 3px 0 var(--accent); }

.empty-hint {
    text-align: center;
    color: var(--text-sub);
    padding: 80px 0;
    font-size: 14px;
}

/* ===== 加载更多 ===== */
.load-more {
    display: block;
    margin: 16px auto 0;
    padding: 9px 22px;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.load-more:hover { background: var(--bg-sub); border-color: var(--accent); }

/* ===== 备忘录 ===== */
.memo-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 80px;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 8px 0 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 96;
    box-shadow: -2px 0 8px rgba(0,0,0,0.06);
    transition: background 0.15s, right 0.3s ease;
}
.memo-tab:hover { background: rgba(255,255,255,0.9); }
.memo-tab.panel-open {
    right: 320px;
}
.memo-tab-icon { font-size: 14px; }
.memo-tab-text {
    font-size: 11px;
    writing-mode: vertical-rl;
    margin-top: 2px;
    color: var(--text-sub);
}
.memo-panel {
    position: fixed;
    right: -340px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 95;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}
.memo-panel.open { right: 0; }
.memo-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.memo-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    font-size: 16px;
}
.memo-search { padding: 12px 16px; }
.memo-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 13px;
}
.memo-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}
.memo-item {
    background: #fff;
    border-radius: var(--radius-card);
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow 0.15s;
    position: relative;
}
.memo-item:hover { box-shadow: var(--shadow-hover); }
.memo-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.memo-item-time {
    font-size: 11px;
    color: var(--text-sub);
}
.memo-item-del {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
    font-size: 14px;
    transition: opacity 0.15s;
}
.memo-item:hover .memo-item-del { opacity: 1; }
.memo-footer { padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.06); }

/* ===== 弹窗 ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}
.modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--radius-modal);
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}
.modal-lg { width: 640px; }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f2;
    font-weight: 600;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    font-size: 18px;
    padding: 4px;
}
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f2;
}

/* ===== 上传区 ===== */
.upload-area {
    border: 1.5px dashed #d2d2d7;
    border-radius: var(--radius-btn);
    padding: 20px;
    text-align: center;
    color: var(--text-sub);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.upload-area:hover {
    border-color: var(--accent);
    background: rgba(0,113,227,0.03);
}
.upload-area.dragover {
    border-color: var(--accent);
    background: rgba(0,113,227,0.06);
}
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-sub);
    border-radius: var(--radius-btn);
    font-size: 13px;
}
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-icon { display: inline-flex; align-items: center; color: var(--text-sub); }
.file-item-link { cursor: pointer; }
.file-item-del {
    background: none;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 14px;
}
.file-item-del:hover { color: var(--danger); }

/* ===== 交付物列表（图片预览卡片 + 文件列表项） ===== */
.del-list {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.del-empty {
    grid-column: 1 / -1;
    color: var(--text-sub);
    font-size: 13px;
    padding: 8px 0;
}

/* 图片预览卡片 */
.del-card {
    background: var(--bg-sub);
    border: 1px solid #e5e5ea;
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.del-card:hover { box-shadow: var(--shadow); }
.del-card-preview {
    height: 120px;
    width: 100%;
    cursor: zoom-in;
    overflow: hidden;
    background: #ececf1;
}
.del-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.del-card-preview:hover img { transform: scale(1.06); }
.del-card-body {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.del-card-name {
    flex: 1;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.del-card-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* 非图片文件列表项（视频/文档） */
.del-file {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-sub);
    border: 1px solid #e5e5ea;
    border-radius: var(--radius-btn);
    font-size: 13px;
}
.del-file-icon { font-size: 18px; }
.del-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.del-file-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* 下载/删除按钮 */
.del-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #d2d2d7;
    background: #fff;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.del-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.del-btn-del {
    border: none;
    background: transparent;
    color: var(--text-sub);
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1;
}
.del-btn-del:hover { color: var(--danger); background: transparent; }

/* ===== 负责人选择 ===== */
.assignee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.assignee-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-sub);
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.assignee-chip.selected {
    background: var(--accent);
    color: #fff;
}
.assignee-chip.locked {
    background: var(--accent);
    color: #fff;
    cursor: default;
}
.assignee-chip.locked::after {
    content: '🔒';
    font-size: 11px;
}

/* ===== 详情弹窗 ===== */
.detail-section { margin-bottom: 20px; }
.detail-section-title {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-desc-section .detail-desc {
    white-space: pre-wrap;
    line-height: 1.7;
    font-size: 15px;
    color: var(--text);
    background: #f5f7ff;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 14px 16px;
}
.reject-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reject-item {
    background: #fff5f5;
    border-left: 3px solid var(--danger);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
}
.reject-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.reject-index {
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
}
.reject-time {
    font-size: 11px;
    color: var(--text-sub);
}
.reject-reason-text {
    font-size: 13px;
    color: var(--text);
    white-space: pre-wrap;
    line-height: 1.5;
}
.detail-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-sub);
}
.detail-meta strong { color: var(--text); font-weight: 500; }
.status-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}
.status-todo { background: #e8e8ed; color: var(--text-sub); }
.status-in_progress { background: #e8f4fd; color: var(--accent); }
.status-pending_review { background: #fff4e5; color: var(--warning); }
.status-approved { background: #e8f9ee; color: var(--success); }

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.attachment-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-sub);
    border-radius: var(--radius-btn);
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}
.attachment-item:hover { background: #e8e8ed; }
.attachment-item.preview { cursor: zoom-in; }

/* ===== 用户管理表格 ===== */
.user-toolbar { margin-bottom: 12px; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f2;
}
.data-table th {
    color: var(--text-sub);
    font-weight: 500;
}
.data-table tr:hover td { background: var(--bg-sub); }
.table-actions { display: flex; gap: 8px; align-items: center; min-height: 24px; }
.table-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
}
.table-btn.danger { color: var(--danger); }
.wo-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.toolbar-search {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.toolbar-search:focus { border-color: var(--accent); }
.business-wo-tools { display: flex; gap: 8px; align-items: center; }
.business-wo-tools .toolbar-search { width: 240px; flex: none; }

/* ===== 角色权限 ===== */
.role-list { display: flex; flex-direction: column; gap: 12px; }
.role-item {
    padding: 16px;
    background: var(--bg-sub);
    border-radius: var(--radius-card);
}
.role-name {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge {
    font-size: 11px;
    background: var(--accent);
    color: #fff;
    padding: 1px 8px;
    border-radius: 8px;
    font-weight: 400;
}
.role-perms { font-size: 13px; color: var(--text-sub); }
.role-hint {
    margin-top: 16px;
    padding: 12px;
    background: #fff4e5;
    border-radius: var(--radius-btn);
    font-size: 12px;
    color: var(--warning);
}

/* 发布工单弹窗顶部提示 */
.wo-tip {
    margin-bottom: 16px;
    padding: 12px;
    background: #fff4e5;
    border-radius: var(--radius-btn);
    font-size: 20px;
    line-height: 1.6;
    color: var(--warning);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    backdrop-filter: blur(10px);
    pointer-events: none;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 图片预览 */
.img-preview {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.img-preview img { max-width: 90vw; max-height: 90vh; }

/* ===== 移动端悬浮刷新按钮 ===== */
.fab-refresh {
    position: fixed;
    right: 16px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0,113,227,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 250;
    transition: transform 0.15s ease;
}
.fab-refresh:active { transform: scale(0.9); }
.fab-refresh .icon { font-size: 22px; }
.fab-refresh.loading .icon { animation: fab-spin 0.8s linear infinite; }
@keyframes fab-spin { to { transform: rotate(360deg); } }

/* ===== 负责人筛选 ===== */
.filter-select {
    padding: 6px 10px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 13px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    outline: none;
}
.filter-select:focus { border-color: var(--accent); }

/* ===== 搜索任务 ===== */
.search-box { margin-bottom: 16px; }
.search-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}
.search-empty {
    text-align: center;
    color: var(--text-sub);
    padding: 32px 0;
    font-size: 13px;
}
.search-result-item {
    padding: 12px 14px;
    border: 1px solid #f0f0f2;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.15s;
}
.search-result-item:hover { background: var(--bg-sub); }
.search-result-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-meta {
    font-size: 12px;
    color: var(--text-sub);
}

/* ===== 新手教程 ===== */
.guide-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}
.guide-h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text);
}
.guide-h2:first-child { margin-top: 0; }
.guide-h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text);
}
.guide-p {
    margin: 8px 0;
    color: var(--text);
}
.guide-list {
    margin: 8px 0;
    padding-left: 22px;
}
.guide-list li {
    margin: 6px 0;
}
.guide-content strong { font-weight: 600; }
.guide-empty {
    text-align: center;
    color: var(--text-sub);
    padding: 32px 0;
    font-size: 13px;
}
.guide-edit textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d2d2d7;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}
.guide-edit textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    /* 顶部导航：折叠为汉堡菜单 */
    .topbar {
        padding: 10px 12px;
        gap: 8px;
    }
    .topbar-left, .topbar-right {
        gap: 6px;
    }
    .logo { margin-right: 0; }
    .logo img { height: 30px !important; }
    .user-name { display: none; }
    .nav-toggle { display: inline-flex; }
    .topbar-left .btn:not(.nav-toggle) { display: none; }
    .topbar-right .btn { display: none; }
    .topbar-right .filter-select { display: none; }

    /* 看板：改为横向滑动 */
    .board { padding: 12px; }
    .board-columns {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        overflow-x: auto;
        gap: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    .column {
        min-width: 82vw;
        scroll-snap-align: start;
        min-height: 320px;
    }

    /* 商务工单视图 */
    .business-wo { padding: 12px; }
    .business-wo-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .business-wo-tools {
        width: 100%;
        flex-wrap: wrap;
    }
    .business-wo-tools .toolbar-search {
        width: 100%;
        flex: 1 1 100%;
    }
    .business-wo-inner { overflow-x: auto; }

    /* 弹窗 */
    .modal-box {
        width: 92vw;
        max-width: 92vw;
        max-height: 90vh;
    }
    .modal-lg { width: 92vw; }
    .modal-header { padding: 12px 16px; }
    .modal-body { padding: 16px; overflow-x: auto; }
    .modal-footer { padding: 10px 16px; }

    /* 表格横向滚动 */
    .data-table { min-width: 520px; }

    /* 工单工具栏 */
    .wo-toolbar { flex-wrap: wrap; }
    .wo-toolbar .toolbar-search { flex: 1 1 100%; }

    /* 备忘录：抽屉样式，保留可点击的「备忘」标签 */
    .memo-panel { width: 92vw; right: -92vw; }
    .memo-panel.open { right: 0; }
    .memo-tab.panel-open { right: 92vw; }
    .memo-close { width: 40px; height: 40px; font-size: 18px; }

    /* Toast 自适应 */
    .toast {
        max-width: 90vw;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-card { padding: 28px 20px; }
    .login-logo { font-size: 24px; }
    .column { min-width: 88vw; }
    .card { padding: 12px; }
    .del-list { grid-template-columns: 1fr; }
}

/* ===== 移动端：表格转卡片 ===== */
@media (max-width: 768px) {
    .data-table { min-width: 0; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
    .data-table tbody { width: 100%; }
    .data-table tr {
        background: #fff;
        border: 1px solid #f0f0f2;
        border-radius: var(--radius-card);
        box-shadow: var(--shadow);
        padding: 14px;
        margin-bottom: 12px;
    }
    .data-table tr:hover td { background: transparent; }
    .data-table td {
        padding: 7px 0;
        border-bottom: 1px solid #f5f5f7;
        text-align: left;
    }
    .data-table tr td:last-child { border-bottom: none; }
    .data-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--text-sub);
        font-size: 11px;
        margin-bottom: 3px;
    }
    .data-table td.table-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        padding-top: 10px;
        border-bottom: none;
    }
    .data-table td.table-actions::before { display: none; }
}

/* ===== 移动端：显示悬浮刷新按钮 ===== */
@media (max-width: 768px) {
    .fab-refresh { display: flex; }
}
