/* PaperFlow v3.3 — editable project workspace and connected files */
.project-tabs{display:flex;gap:6px;overflow:auto;padding:5px;background:#ebe8de;border:1px solid var(--line);border-radius:14px;margin:16px 0}
.project-tabs button{border:0;background:transparent;color:var(--muted);padding:10px 14px;border-radius:10px;white-space:nowrap;font-weight:800}
.project-tabs button.active{background:var(--card);color:var(--green);box-shadow:0 4px 12px rgba(27,48,37,.08)}
.project-tab-panel{display:grid;gap:16px}
.panel-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.panel-toolbar h3{margin:0;font:600 20px Georgia,"Songti SC",serif}.panel-toolbar p{margin:4px 0 0;color:var(--muted);font-size:12px}.toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.chapter-list{display:grid;gap:9px}.chapter-item{border:1px solid var(--line);background:#faf7f0;border-radius:14px;padding:13px;display:grid;grid-template-columns:54px minmax(0,1fr) 160px auto;gap:12px;align-items:start}.chapter-item:hover{border-color:#b9c9bd;background:#fffdf8}.chapter-no{font-weight:900;color:var(--green);padding-top:3px}.chapter-main{min-width:0}.chapter-main h4{margin:0 0 5px;font-size:14px;line-height:1.45}.chapter-main p{margin:0;color:var(--muted);font-size:12px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chapter-meta{display:grid;gap:6px;font-size:11px;color:var(--muted)}.chapter-progress{height:6px;background:#e5e3da;border-radius:99px;overflow:hidden}.chapter-progress i{height:100%;display:block;background:var(--green)}.chapter-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}.chapter-actions button{border:0;background:#ece8df;border-radius:9px;padding:7px 8px;font-size:11px}.chapter-actions button:hover{background:#e0dbd0}.chapter-status{display:inline-flex;width:max-content;padding:4px 8px;border-radius:999px;background:#e8f0e9;color:var(--green);font-weight:800}
.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.related-card{border:1px solid var(--line);background:#faf7f0;border-radius:14px;padding:14px;min-width:0}.related-card h4{margin:0 0 6px;font-size:14px}.related-card p{margin:5px 0;color:#3b483f;font-size:12px;line-height:1.55}.related-card small{color:var(--muted)}.related-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.related-card-actions button{border:0;background:#eae6dc;border-radius:9px;padding:7px 9px;font-size:11px}.related-card-actions .accent{background:var(--green);color:white}
.file-dropzone{border:2px dashed #bdc7bd;background:#f7f5ee;border-radius:16px;padding:27px;text-align:center;color:var(--muted);transition:.18s}.file-dropzone.dragging{border-color:var(--green);background:#eef3ed;color:var(--green)}.file-dropzone b{display:block;color:var(--ink);margin-bottom:5px}.file-dropzone input{display:none}.file-toolbar{display:flex;gap:8px;flex-wrap:wrap}.file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.file-card{border:1px solid var(--line);background:var(--card);border-radius:15px;padding:13px;min-width:0;box-shadow:var(--soft-shadow)}.file-icon{width:39px;height:39px;border-radius:11px;display:grid;place-items:center;background:#edf1e8;color:var(--green);font-weight:900;margin-bottom:10px}.file-card h4{margin:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-card p{margin:5px 0;color:var(--muted);font-size:11px;line-height:1.45}.file-card-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.file-card-actions button{border:0;background:#ece8df;border-radius:8px;padding:6px 8px;font-size:10px}.file-card img{width:100%;height:125px;object-fit:cover;border-radius:10px;margin-bottom:9px;background:#eee}.local-badge{display:inline-flex;padding:3px 7px;border-radius:999px;background:#fff0df;color:#9a5a18;font-size:9px;font-weight:800}.link-badge{background:#e9f0f8;color:#38638c}.presentation-list{display:grid;gap:10px}.presentation-card{border:1px solid var(--line);border-radius:14px;background:#faf7f0;padding:14px}.presentation-card-head{display:flex;justify-content:space-between;gap:12px}.slide-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.slide-chips span{padding:5px 8px;border-radius:8px;background:#ece8df;font-size:10px;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.office-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.office-action{border:1px solid var(--line);background:#faf7f0;border-radius:14px;padding:14px;text-align:left}.office-action b{display:block;margin-bottom:4px}.office-action span{color:var(--muted);font-size:11px;line-height:1.4}
.section-content-preview{white-space:pre-wrap;line-height:1.75;background:#f8f5ee;border:1px solid #e6dfd3;border-radius:12px;padding:13px;max-height:250px;overflow:auto;font-size:13px}.section-dialog-grid{display:grid;grid-template-columns:90px 1fr 130px 130px;gap:10px}.section-dialog-grid .full{grid-column:1/-1}.section-editor-actions{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:16px}.section-editor-actions>div{display:flex;gap:8px}.danger-link{border:0;background:transparent;color:#a64028;font-weight:800}
.ppt-slide-editor{border:1px solid var(--line);border-radius:13px;padding:12px;background:#f8f5ee;margin:9px 0}.ppt-slide-head{display:grid;grid-template-columns:45px minmax(0,1fr) auto;gap:8px;align-items:center}.ppt-slide-head input{width:100%;border:1px solid var(--line);border-radius:9px;padding:8px}.ppt-slide-editor textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:9px;min-height:75px;margin-top:8px;resize:vertical}.ppt-slide-actions{display:flex;gap:5px}.ppt-slide-actions button{border:0;background:#e8e4da;border-radius:8px;padding:6px 8px}
.image-preview{max-width:100%;max-height:70vh;display:block;margin:auto;border-radius:12px}.attachment-preview-frame{width:100%;height:70vh;border:0;border-radius:12px;background:white}
.inline-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.inline-edit-grid .full{grid-column:1/-1}
.matrix-table th{position:relative}.matrix-remove{border:0;background:transparent;color:#a64028;font-size:11px;margin-left:5px}.matrix-sample-input{width:120px;border:0;background:transparent;padding:6px;border-radius:7px}.matrix-sample-input:focus{background:white;outline:1px solid var(--green)}
.empty-action{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}
@media(max-width:1100px){.file-grid{grid-template-columns:repeat(2,1fr)}.chapter-item{grid-template-columns:45px minmax(0,1fr) 130px}.chapter-actions{grid-column:2/-1;justify-content:flex-start}.related-grid{grid-template-columns:1fr}}
@media(max-width:760px){.project-tabs{position:sticky;top:0;z-index:8;border-radius:10px}.file-grid,.office-actions{grid-template-columns:1fr}.chapter-item{grid-template-columns:38px minmax(0,1fr)}.chapter-meta{grid-column:2}.chapter-actions{grid-column:2}.section-dialog-grid,.inline-edit-grid{grid-template-columns:1fr}.section-dialog-grid .full,.inline-edit-grid .full{grid-column:auto}.file-dropzone{padding:19px}.detail-actions{overflow:auto;flex-wrap:nowrap;padding-bottom:4px}.detail-actions button{white-space:nowrap}}
