/* ── 全局 ─────────────────────────────────────────── */ :root { --bg: #f5f6fa; --card: #ffffff; --border: #e1e4ea; --text: #1a1d23; --text-muted: #6b7280; --primary: #4f46e5; --primary-light: #eef2ff; --danger: #ef4444; --warning: #f59e0b; --success: #10b981; --info: #3b82f6; --radius: 8px; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; } a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; } /* ── 导航 ─────────────────────────────────────────── */ .navbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; } .nav-brand a { font-size: 18px; font-weight: 700; color: var(--text); text-decoration: none; } .nav-links { display: flex; gap: 8px; align-items: center; } .nav-link { padding: 6px 14px; border-radius: 6px; font-size: 14px; color: var(--text-muted); } .nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary); text-decoration: none; } .btn-new { background: var(--primary) !important; color: #fff !important; font-weight: 600; } .btn-new:hover { background: #4338ca !important; text-decoration: none; } /* ── 容器 ─────────────────────────────────────────── */ .container { max-width: 1100px; margin: 0 auto; padding: 24px; } /* ── 卡片 ─────────────────────────────────────────── */ .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; } /* ── 看板 ─────────────────────────────────────────── */ .stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 28px; } .stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; } .stat-card .num { font-size: 32px; font-weight: 700; } .stat-card .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; } .stat-card.total .num { color: var(--primary); } .stat-card.open .num { color: var(--info); } .stat-card.in_progress .num { color: var(--warning); } .stat-card.pending .num { color: #8b5cf6; } .stat-card.resolved .num { color: var(--success); } .stat-card.closed .num { color: #6b7280; } h2.section-title { font-size: 16px; margin-bottom: 14px; color: var(--text-muted); } /* ── 工单列表 ─────────────────────────────────────── */ .filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; } .filters label { font-size: 13px; color: var(--text-muted); } .filters select, .filters input { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--card); } .filters input { width: 180px; } .filters form { display: inline-flex; align-items: center; gap: 6px; } .ticket-table { width: 100%; border-collapse: collapse; } .ticket-table th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--border); } .ticket-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; } .ticket-table tr:hover { background: #fafbff; } /* ── 徽章 ─────────────────────────────────────────── */ .badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.4; } .badge-open { background: #dbeafe; color: #1e40af; } .badge-in_progress { background: #fef3c7; color: #92400e; } .badge-pending { background: #ede9fe; color: #5b21b6; } .badge-resolved { background: #d1fae5; color: #065f46; } .badge-closed { background: #e5e7eb; color: #374151; } .badge-urgent { background: #fee2e2; color: #991b1b; } .badge-high { background: #ffedd5; color: #9a3412; } .badge-medium { background: #fef3c7; color: #92400e; } .badge-low { background: #dbeafe; color: #1e40af; } .badge-bug { background: #fee2e2; color: #991b1b; } .badge-feature { background: #dbeafe; color: #1e40af; } .badge-consult { background: #d1fae5; color: #065f46; } .badge-incident { background: #fef3c7; color: #92400e; } .badge-other { background: #e5e7eb; color: #374151; } /* ── 标签 ─────────────────────────────────────────── */ .tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; background: #f0f0f0; color: #555; margin-right: 3px; } /* ── 表单 ─────────────────────────────────────────── */ .form-group { margin-bottom: 16px; } .form-group label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; } .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--card); } .form-group textarea { min-height: 100px; resize: vertical; } .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; } .btn { display: inline-block; padding: 8px 18px; border-radius: 6px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; } .btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: #4338ca; text-decoration: none; } .btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #dc2626; text-decoration: none; } .btn-secondary { background: #e5e7eb; color: #374151; } /* ── 详情页 ───────────────────────────────────────── */ .detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; } .detail-header h1 { font-size: 22px; } .detail-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; } .detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; } .detail-grid > div:first-child { min-width: 0; } .comment-list { margin-top: 8px; } .comment { border-left: 3px solid var(--primary); padding: 10px 14px; margin-bottom: 12px; background: var(--primary-light); border-radius: 4px; } .comment .author { font-weight: 600; font-size: 13px; } .comment .time { font-size: 12px; color: var(--text-muted); margin-left: 8px; } .comment .content { margin-top: 4px; white-space: pre-wrap; } .sidebar .card { margin-bottom: 14px; } /* ── 通知角标 ───────────────────────────────────────── */ .notif-link { position: relative; } .notif-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 10px; min-width: 16px; text-align: center; } .user-info { font-size: 14px; padding: 6px 12px; color: var(--text); font-weight: 600; } /* ── 登录页 ─────────────────────────────────────────── */ .auth-page { display: flex; justify-content: center; align-items: center; min-height: 80vh; } .auth-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); } .auth-card h1 { text-align: center; margin-bottom: 24px; font-size: 22px; } .auth-card .error { background: #fee2e2; color: #991b1b; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; } .auth-link { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); } /* ── 通知列表 ───────────────────────────────────────── */ .notif-item { padding: 12px 16px; border-left: 3px solid var(--primary); background: var(--primary-light); border-radius: 4px; margin-bottom: 10px; } .notif-item.unread { border-left-color: var(--danger); background: #fef2f2; } .notif-item .notif-title { font-weight: 600; font-size: 14px; } .notif-item .notif-content { font-size: 13px; color: var(--text-muted); margin-top: 2px; } .notif-item .notif-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; } /* ── 通用表单下拉优化 ─────────────────────────────── */ .form-row-select { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; } /* ── 附件上传区 ─────────────────────────────────── */ .attachment-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #fafbff; margin-top: 12px; } .attachment-zone:hover, .attachment-zone.drag-over { border-color: var(--primary); background: var(--primary-light); } .attachment-zone .az-label { color: var(--text-muted); font-size: 14px; } .attachment-zone .az-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; } .attachment-zone input[type="file"] { display: none; } /* 附件列表 */ .attachment-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; } .attachment-item { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 8px; max-width: 200px; display: flex; flex-direction: column; gap: 4px; } .attachment-item .att-thumb { width: 100%; max-height: 150px; object-fit: cover; border-radius: 4px; cursor: pointer; } .attachment-item .att-info { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .attachment-item .att-delete { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; } .attachment-item:hover .att-delete { opacity: 1; } .attachment-item .att-link { font-size: 13px; word-break: break-all; } .attachment-item .att-icon { font-size: 32px; text-align: center; padding: 8px 0; } /* 图片预览模态框 */ .image-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; justify-content: center; align-items: center; cursor: pointer; } .image-modal.show { display: flex; } .image-modal img { max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); } /* 上传进度条 */ .upload-progress { height: 3px; background: var(--border); border-radius: 2px; margin-top: 8px; overflow: hidden; display: none; } .upload-progress.active { display: block; } .upload-progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; } /* ── 富文本编辑器 ─────────────────────────────────── */ .rich-editor { min-height: 100px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); outline: none; overflow-y: auto; max-height: 300px; line-height: 1.6; } .rich-editor:focus { border-color: var(--primary); } .rich-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); } .rich-toolbar { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; } .rich-toolbar button { padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); cursor: pointer; font-size: 13px; } .rich-toolbar button:hover { background: var(--primary-light); border-color: var(--primary); } .inline-image { max-width: 100%; max-height: 300px; border-radius: 4px; margin: 4px 0; } /* ── 抄送人选择器 ─────────────────────────────────── */ .cc-select-wrap { position: relative; } .cc-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--card); cursor: pointer; display: flex; align-items: center; gap: 4px; min-height: 38px; flex-wrap: wrap; } .cc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 12px; font-size: 12px; font-weight: 600; } .cc-chip .chip-x { cursor: pointer; font-weight: 700; color: var(--primary); } .cc-dropdown { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 6px; max-height: 200px; overflow-y: auto; z-index: 50; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .cc-dropdown.show { display: block; } .cc-option { padding: 8px 12px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; align-items: center; } .cc-option:hover { background: var(--primary-light); } .cc-option.selected { background: var(--primary-light); color: var(--primary); font-weight: 600; } .cc-option .check { font-weight: 700; } .cc-placeholder { color: var(--text-muted); font-size: 13px; padding: 8px 12px; } .footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 12px; }