/* ============================================================
   共享便签 · 视图样式（配合 style.css 的设计变量使用）
   纸质便利贴质感：暖色纸面 + 顶部渐变彩条 + 悬浮阴影。
   ============================================================ */

.breadcrumb #breadcrumb-title { margin: 0; color: inherit; }

/* ---------------- 顶部介绍横幅 ---------------- */
.notes-intro {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border: 1px solid #f0e5c0;
  border-radius: 16px;
  background: linear-gradient(115deg, #fffdf3 0%, #fffaf0 45%, #f4f8ff 130%);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
  animation: fadeUp .5s var(--ease) backwards;
}
.notes-intro-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffe9a3, #ffd25e);
  color: #8a6a14;
  font-size: 24px;
  box-shadow: 0 6px 14px -6px rgba(214, 164, 40, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.notes-intro strong { font-size: 14.5px; font-weight: 650; color: #40506e; }
.notes-intro p { font-size: 12px; color: #97a3b6; line-height: 1.8; margin: 6px 0 0; }
.sharing-badge {
  margin-left: auto;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
  color: var(--primary);
  background: #eaf1ff;
  border: 1px solid #d8e6ff;
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------------- 工具栏 ---------------- */
.notes-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.notes-toolbar .tabs span {
  background: #edf3ff;
  color: var(--primary);
  font-weight: 700;
  padding: 2px 7px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 10px;
}
.notes-toolbar .search { background: var(--surface); width: 300px; }

/* ---------------- 便签卡片 ---------------- */
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.note-card {
  position: relative;
  border: 1px solid #eee0ae;
  background: linear-gradient(180deg, #fffdf2 0%, #fff9e3 100%);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(120, 96, 30, .06), 0 14px 30px -18px rgba(120, 96, 30, .22);
  min-width: 0;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ffd84d, #f5b942);
}
.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(120, 96, 30, .08), 0 22px 44px -18px rgba(120, 96, 30, .3);
}
.note-card.note-blue { background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%); border-color: #d2e3f8; }
.note-card.note-blue::before { background: linear-gradient(90deg, #7db3f8, #4f8ef7); }
.note-card.note-green { background: linear-gradient(180deg, #f6fcf7 0%, #edf8ef 100%); border-color: #d4e9da; }
.note-card.note-green::before { background: linear-gradient(90deg, #6fcf97, #3fb97c); }

.note-body { padding: 22px 22px 18px; }
.note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: #ab9a68;
  font-size: 10.5px;
}
.note-pin {
  color: #a07c1f;
  background: rgba(255, 232, 150, .65);
  border: 1px solid rgba(214, 178, 60, .35);
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 999px;
}
.note-card.note-blue .note-pin { color: #4f7ec2; background: rgba(200, 224, 255, .6); border-color: rgba(120, 168, 230, .35); }
.note-card.note-green .note-pin { color: #4e9a68; background: rgba(198, 236, 210, .6); border-color: rgba(110, 190, 140, .35); }
.note-top time { margin-left: auto; }
.note-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 10px;
  color: #3c4a68;
  overflow-wrap: anywhere;
}
.note-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.9;
  color: #6f7c95;
  margin: 0;
  max-height: 310px;
  overflow: auto;
  scrollbar-width: thin;
}
.note-content::-webkit-scrollbar { width: 6px; }
.note-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: #9bbaf3;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color .15s;
}
.note-content a:hover { color: #174abb; text-decoration-color: currentColor; }
.note-content a:focus-visible { outline: 3px solid rgba(46, 107, 240, .35); outline-offset: 2px; border-radius: 2px; }

.note-footer {
  border-top: 1px solid rgba(150, 125, 60, .14);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .45);
}
.note-footer .owner { font-size: 11px; color: #8994a6; min-width: 0; }
.note-footer .owner > span:last-child { overflow-wrap: anywhere; }
.note-footer .avatar { background: rgba(255, 255, 255, .8); color: #697d9b; width: 25px; height: 25px; box-shadow: 0 1px 3px rgba(60, 50, 20, .12); }
.note-buttons { display: flex; gap: 4px; flex-shrink: 0; }
.note-buttons button { font-size: 11px; }

/* 删除确认条 */
.note-delete-confirm { margin: 0 20px 16px; border-top: 1px dashed #d8cba0; padding-top: 13px; }
.note-delete-confirm p { font-size: 11px; line-height: 1.6; color: #a17a61; margin: 0 0 9px; }
.note-delete-confirm button { font-size: 11px; padding: 7px 11px; }
.note-delete-confirm .confirm-remove {
  margin-left: 7px;
  color: #b44f48;
  background: #fff3f1;
  border: 1px solid #edd0cb;
  border-radius: 7px;
  font-weight: 600;
}
.note-delete-confirm .confirm-remove:hover:not(:disabled) { background: #ffe7e4; }

/* ---------------- 编辑弹窗 ---------------- */
.note-options { display: flex; align-items: center; gap: 24px; }
.note-options > label:first-child { flex: 1; }
textarea, select { font: inherit; color: #263955; background: #fff; }
form textarea, form select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 13px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #fbfcfe;
  font-size: 13px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
form textarea { resize: vertical; min-height: 110px; max-height: 350px; line-height: 1.8; }
form textarea:focus, form select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(46, 107, 240, .12);
}
.check-label { display: flex; align-items: center; gap: 8px; padding-top: 18px; white-space: nowrap; }
.check-label input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
#note-editor { width: 520px; }
#note-editor .dialog-head { margin-bottom: 20px; }
#note-editor form label { margin-bottom: 15px; }

/* ---------------- 空状态 ---------------- */
.notes-grid + .empty {
  border: 1.5px dashed #d9e2f0;
  border-radius: 16px;
  background: var(--surface);
  padding: 52px 20px;
}
.notes-grid + .empty button { margin-top: 16px; }

.notes-stale { color: #c18153; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sidebar nav { display: flex; gap: 8px; margin-top: 14px; }
  .sidebar .nav {
    display: flex;
    font-size: 14px;
    padding: 9px 12px;
    flex: 1;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .14);
    margin-bottom: 0;
  }
  .sidebar .nav.active { border-color: transparent; }
  .sidebar .nav span { font-size: 12px; }
  .notes-intro { padding: 18px 16px; gap: 12px; }
  .notes-intro-icon { width: 36px; height: 36px; font-size: 19px; }
  .notes-intro strong { font-size: 13px; }
  .sharing-badge { display: none; }
  .notes-toolbar { flex-wrap: wrap; }
  .notes-toolbar .tabs { width: auto; }
  .notes-toolbar .search { width: 100%; flex: auto; }
  .notes-grid { grid-template-columns: 1fr; gap: 16px; }
  .note-content { max-height: 350px; }
  .notes-intro p { font-size: 11px; }
  .note-body { padding: 18px 20px 14px; }
  .note-delete-confirm { margin: 0 16px 14px; }
  #note-editor { padding: 24px; }
  .note-options { flex-wrap: wrap; gap: 12px; }
  .check-label { padding-top: 4px; }
}
