/* 栖日 · 灵感笔录 Categorized Ideas Styling */

/* Card Styling */
.idea-card{cursor:pointer;transition:border-color .18s,background .18s;min-width:0}
.idea-card:hover{border-color:#b8a889;background:#fffefb}
.idea-title-link{border:0;background:none;padding:0;text-align:left;font:inherit;line-height:inherit;color:inherit;cursor:pointer}
.idea-title-link:hover{background:none;color:#806742}
.idea-category-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.idea-category-chips span{border-radius:3px;padding:4px 7px;font-size:10px;line-height:1.2;max-width:100%;overflow-wrap:anywhere;display:inline-flex;align-items:center}
.idea-category-chips b{font-weight:600;margin-left:4px}
.chip-reference{background:#f0f3f6;border:1px solid #dce3e8;color:#4f6274}
.chip-progress{background:#f5f1e8;border:1px solid #e6decb;color:#786641}
.chip-thought{background:#f6eff1;border:1px solid #e9dce0;color:#7a4f60}
.idea-excerpt{margin-top:10px;font-size:12px;color:#8c8275;line-height:1.6;overflow-wrap:anywhere;word-break:break-word}

/* Pin Badges & Buttons */
.pin-badge{display:inline-flex;align-items:center;gap:3px;background:#fbf3e6;color:#8a652e;border:1px solid #ebd8b7;border-radius:3px;padding:2px 6px;font-size:10px;font-weight:600;line-height:1.2;margin-left:6px;vertical-align:middle}
.pin-toggle-btn{font-size:11px;padding:5px 8px;border:1px solid #ded7cb;border-radius:3px;background:#fff;color:inherit;cursor:pointer}
.pin-toggle-btn:hover{background:#f3ede4}
.pin-toggle-btn.pinned{background:#f6eedf;border-color:#dcc6a0;color:#6f4e1f}
.tag.file-tag{background:#f0f4f8;border-color:#d3dee8;color:#435c75}

/* File Attachments Panel */
.files-panel{margin-top:20px;padding:20px;background:#fff;border:1px solid #e9e3da;border-radius:3px;min-width:0}
.files-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid #eee7db}
.files-panel-head h3{margin:0;font-size:14px;color:#302b24;display:flex;align-items:center;gap:8px}
.files-panel-head .files-count{font-size:11px;font-weight:600;padding:2px 7px;border-radius:10px;background:#eee8df;color:#6e6150;line-height:1.2}
.files-panel-quota{font-size:11px;color:#8c8275;margin:4px 0 0;line-height:1.4}
.files-panel-actions{display:flex;align-items:center;gap:8px}
.add-file-btn{font-size:11px;padding:6px 12px;cursor:pointer}
.files-quota-bar{height:4px;border-radius:2px;background:#eee8df;overflow:hidden;margin:10px 0 8px}
.files-quota-bar i{display:block;height:100%;background:#8f794c;border-radius:2px;transition:width .2s}
.file-upload-status{margin:8px 0;padding:8px 12px;background:#f3f6f9;border:1px solid #dbe4ec;border-radius:3px;font-size:12px;color:#35516b}
.file-upload-error{margin:8px 0;padding:8px 12px;background:#fdf2f1;border:1px solid #f3d1cd;border-radius:3px;font-size:12px;color:#b14940;display:flex;justify-content:space-between;align-items:center;gap:8px}
.file-error-dismiss{background:none;border:0;color:#b14940;font-size:16px;cursor:pointer;padding:0 4px;line-height:1}
.files-empty{padding:20px 14px;text-align:center;background:#faf8f5;border:1px dashed #ded7cc;border-radius:3px;color:#8c8275;margin-top:10px}
.files-empty p{margin:0 0 4px;font-size:12px;font-weight:500}
.files-empty small{font-size:11px;color:#9e9282}
.files-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.file-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;background:#faf8f5;border:1px solid #e8e2d8;border-radius:3px;min-width:0;transition:border-color .15s,background .15s}
.file-item:hover{border-color:#bfae98;background:#fffdfa}
.file-item-info{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.file-item-icon{font-size:15px;flex-shrink:0}
.file-item-meta{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.file-item-name{font-size:13px;font-weight:500;color:#302b24;word-break:break-all;overflow-wrap:anywhere;line-height:1.4}
.file-item-sub{font-size:11px;color:#8c8275}
.file-item-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.file-download-btn,.file-remove-btn{font-size:11px;padding:4px 8px;border-radius:3px;border:1px solid #ded7cb;background:#fff;color:inherit;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center}
.file-download-btn:hover{background:#f3ede4;color:#806742}
.file-remove-btn.danger{color:#b14940;border-color:#ebd3cf}
.file-remove-btn.danger:hover{background:#fbeae8}

/* Detail View Layout */
#idea-detail{margin-top:30px;outline:none;min-width:0}
.idea-detail-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.idea-detail-nav>button{font-size:12px}
.idea-detail-nav-actions{display:flex;align-items:center;gap:10px}
.idea-detail-nav-actions>button{font-size:12px}

.idea-overview{padding:28px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 24px;background:#fff;border:1px solid #e9e3da;border-radius:3px;min-width:0}
.idea-overview h2{font-size:26px;line-height:1.45;margin:6px 0 10px;overflow-wrap:anywhere;word-break:break-word}
.idea-overview .card-meta{margin-bottom:0}
.idea-created{margin:14px 0 0;font-size:11px;color:#8c8275}
.idea-overview-stats{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.idea-stat-chip{text-align:center;padding:10px 14px;background:#f8f6f2;border:1px solid #e7e1d7;border-radius:3px;min-width:76px}
.idea-stat-chip strong{display:block;font-size:20px;font-weight:600;color:#302b24;line-height:1.2}
.idea-stat-chip span{display:block;font-size:10px;color:#8c8275;margin-top:4px}

/* Legacy Notes Notice Panel */
.idea-legacy-panel{margin-top:20px;padding:20px;background:#fcfaf5;border:1px solid #e5dcce;border-left:3px solid #ac8b4c;border-radius:3px;min-width:0}
.idea-legacy-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #eee7db}
.idea-legacy-head strong{font-size:13px;color:#494139}
.idea-legacy-head p{margin:4px 0 0;font-size:11px;color:#8c8275}
.idea-legacy-head button{font-size:11px;padding:5px 9px}
.idea-legacy-body{font-size:13px;line-height:1.65;color:#3a352f}

/* Three Fixed Categories Grid */
.idea-categories-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px;min-width:0}
.idea-category-column{display:flex;flex-direction:column;gap:14px;background:#faf8f5;border:1px solid #e8e2d8;border-radius:3px;padding:18px;min-width:0}
.idea-category-column.cat-reference{border-top:2px solid #5a7084}
.idea-category-column.cat-progress{border-top:2px solid #8f794c}
.idea-category-column.cat-thought{border-top:2px solid #87576a}

.idea-category-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:12px;border-bottom:1px solid #e8e2d8}
.idea-category-title{display:flex;align-items:center;gap:8px;margin:0;font-size:14px;font-weight:600;color:#302b24}
.category-count{font-size:11px;font-weight:600;padding:2px 7px;border-radius:10px;background:#eee8df;color:#6e6150;line-height:1.2}
.add-entry-btn{font-size:11px;padding:5px 9px}

.idea-entries-list{display:flex;flex-direction:column;gap:12px;flex:1;min-width:0}

/* Empty State */
.category-empty{padding:30px 14px;text-align:center;background:#fff;border:1px dashed #ded7cc;border-radius:3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;flex:1;min-width:0}
.category-empty p{margin:0;font-size:13px;font-weight:500;color:#796e60}
.category-empty small{font-size:11px;color:#9e9282;line-height:1.4}
.category-empty button{margin-top:8px;font-size:12px;padding:6px 12px}

/* Entry Card */
.idea-entry-card{background:#fff;border:1px solid #e5dfd5;border-radius:3px;padding:14px;display:flex;flex-direction:column;gap:10px;transition:border-color .15s,box-shadow .15s;min-width:0}
.idea-entry-card:hover{border-color:#bfae98}
.entry-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.entry-time{font-size:10px;color:#9c9183;font-variant-numeric:tabular-nums}
.entry-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.entry-move-select{font-size:11px;padding:4px 6px;border:1px solid #ded7cb;border-radius:3px;background:#fbf9f5;color:#5a4f41;cursor:pointer;max-width:130px}
.entry-action-btn{font-size:10px;padding:4px 7px;border:1px solid #ded7cb;border-radius:3px;background:#fff;color:inherit;cursor:pointer}
.entry-action-btn:hover{background:#f3ede4}
.entry-action-btn.danger{color:#b14940;border-color:#ebd3cf}
.entry-action-btn.danger:hover{background:#fbeae8}

/* Multiline and Link Content */
.entry-title{font-size:14px;font-weight:600;line-height:1.45;color:#1f1b17;margin:0;word-break:break-word}
.entry-content{font-size:13px;line-height:1.65;color:#2c2824;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;min-width:0}
.entry-link{color:#8a6c38;text-decoration:underline;text-underline-offset:2px;word-break:break-all}
.entry-link:hover{color:#574218}

/* Missing State */
.idea-missing{padding:30px;text-align:center;background:#fff;border:1px solid #e9e3da;border-radius:3px;margin-top:20px}
.idea-missing h2{margin:0 0 10px;font-size:18px;color:#494139}

/* Responsive Breakpoints */
@media(max-width:1100px){
  .idea-categories-grid{grid-template-columns:minmax(0,1fr)}
  .idea-overview{grid-template-columns:minmax(0,1fr)}
  .idea-overview-stats{justify-content:flex-start}
}

@media(max-width:768px){
  .idea-detail-nav{flex-direction:column;align-items:flex-start;gap:10px}
  .idea-detail-nav-actions{width:100%;display:flex;justify-content:flex-end}
  .idea-overview{padding:20px 16px}
  .idea-overview h2{font-size:22px}
  .idea-category-column{padding:14px}
}

@media(max-width:560px){
  #idea-detail{margin-top:20px}
  .idea-detail-nav>button{font-size:11px;padding:9px}
  .idea-detail-nav-actions>button{font-size:11px;padding:9px}
  .idea-overview{padding:18px 14px}
  .idea-overview h2{font-size:20px}
  .idea-stat-chip{min-width:64px;padding:8px 10px}
  .idea-stat-chip strong{font-size:17px}
  .idea-category-head{flex-wrap:wrap}
  .entry-card-head{flex-direction:column;align-items:flex-start;gap:6px}
  .entry-actions{width:100%;justify-content:flex-end}
  .idea-entry-card{padding:12px}
}
@media(max-width:560px){
  .files-panel{padding:16px}
  .file-item{flex-direction:column;align-items:flex-start;gap:8px}
  .file-item-actions{width:100%;justify-content:flex-end}
}
@media(max-width:390px){
  .files-panel{padding:12px}
  .files-panel-head{flex-direction:column;align-items:flex-start;gap:8px}
  .files-panel-actions{width:100%}
  .add-file-btn{width:100%;text-align:center;justify-content:center}
  .file-item-name{font-size:12px}
  .pin-toggle-btn{padding:4px 6px;font-size:10px}
}
