:root { --bg:#f5f7fb; --panel:#fff; --text:#18202a; --muted:#64748b; --line:#d9e1ea; --primary:#0f766e; --danger:#dc2626; }
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft Yahei", sans-serif; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { border: 0; background: var(--primary); color: #fff; border-radius: 6px; padding: 8px 12px; cursor: pointer; }
button.ghost { background: #eef6f5; color: #075e57; }
button.danger { background: #fee2e2; color: var(--danger); }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; background: #fff; color: var(--text); }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(390px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: grid; gap: 16px; }
.login-card h1 { margin: 0; font-size: 28px; }
.login-card p { margin: -8px 0 4px; color: var(--muted); }
.app { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: grid; gap: 4px; margin-bottom: 6px; }
.brand strong { font-size: 20px; }
.brand span { color: var(--muted); font-size: 12px; }
#folderNav { display: grid; gap: 6px; overflow: auto; }
.folder-btn { width: 100%; text-align: left; background: transparent; color: var(--text); display: flex; justify-content: space-between; gap: 8px; }
.folder-btn.active, .folder-btn:hover { background: #e8f3f1; color: #064e48; }
.side-actions { margin-top: auto; display: grid; gap: 8px; }
.workspace { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 100vh; }
.doc-list-pane { border-right: 1px solid var(--line); background: #fbfdff; padding: 16px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; }
.list-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.list-tabs { display: flex; gap: 8px; }
.tab { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tab.active { background: #e8f3f1; color: #064e48; }
.doc-list { display: grid; gap: 10px; align-content: start; overflow: auto; }
.doc-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; display: grid; gap: 8px; }
.doc-item.active, .doc-item:hover { border-color: #99c9c4; background: #fbfffe; }
.doc-item h3 { margin: 0; font-size: 15px; }
.doc-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.doc-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.editor-pane { min-width: 0; padding: 18px; }
.empty { height: calc(100vh - 36px); display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); margin: 0 0 8px; }
.editor { height: calc(100vh - 36px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.editor-top { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 12px; align-items: center; }
.title-input { font-size: 22px; font-weight: 650; border-color: transparent; background: transparent; padding-left: 0; }
.title-input:focus { outline: none; border-color: var(--line); background: #fff; padding-left: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.tag-input { width: 170px; }
#editor { min-height: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
#editor .vditor { border: 0; }
#editor .vditor-toolbar { background: #f9fafb; border-bottom: 1px solid var(--line); overflow: visible; }
#editor .vditor-content, #editor .vditor-ir, #editor .vditor-wysiwyg, #editor .vditor-sv { background: #fff; font-size: 15px; line-height: 1.8; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.file-pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: #fff; font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.feedback-list { display: grid; gap: 10px; }
.feedback-card { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; background: #fff; }
.feedback-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.feedback-head h4 { margin: 0 0 4px; }
.feedback-card p, .feedback-head p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.status { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; white-space: nowrap; background: #eef2f7; }
.status.open { background: #fff7ed; color: #b45309; }
.status.processing { background: #e8f3f1; color: #075e57; }
.status.closed { background: #dcfce7; color: #15803d; }
.feedback-detail { display: grid; gap: 12px; }
.feedback-detail p { margin: 0; line-height: 1.7; white-space: pre-line; }
.detail-block { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.detail-block h4 { margin: 0; }
.file-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.dropdown { position: relative; }
.dropdown > div { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; min-width: 130px; padding: 6px; box-shadow: 0 12px 30px rgba(15, 23, 42, .12); z-index: 10; }
.dropdown:hover > div { display: grid; gap: 4px; }
.dropdown > div button { background: transparent; color: var(--text); text-align: left; }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-panel { width: min(720px, 100%); max-height: 88vh; overflow: auto; background: #fff; border-radius: 8px; padding: 20px; position: relative; }
.modal-panel h3 { margin: 0 36px 16px 0; }
.icon-btn { position: absolute; right: 10px; top: 8px; background: transparent; color: var(--text); font-size: 22px; padding: 4px 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); background: #f9fafb; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #111827; color: #fff; padding: 10px 14px; border-radius: 6px; opacity: 0; transform: translateY(10px); transition: .18s; pointer-events: none; z-index: 80; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
  .app, .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .doc-list-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-top { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
}
