/* static/css/right-panel.css — extracted from index.html (FrameFlow prototype) */
  /* Right panel node editor */
  .flow-field-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
  .flow-field-row label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
  .flow-field {
    width: 100%; box-sizing: border-box;
    padding: 9px 11px; border-radius: 9px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text); font-size: 13px; font-family: inherit;
    outline: none; resize: vertical;
    transition: border-color .2s, box-shadow .2s;
  }
  .flow-field:focus { border-color: rgba(74,222,128,0.45); box-shadow: 0 0 0 1px rgba(74,222,128,0.12); }

  .task-row, .ver-row, .file-row, .rev-row, .sched-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
  }
  .task-row:last-child, .ver-row:last-child, .file-row:last-child, .rev-row:last-child, .sched-row:last-child { border-bottom: none; }
  .task-check {
    width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-strong); color: transparent;
  }
  .task-row.done .task-check { background: var(--neon); color: #04210f; border-color: var(--neon); }
  .task-row.active .task-check { border-color: rgba(74,222,128,0.6); }
  .task-name { flex: 1; font-size: 13px; color: var(--text); }
  .task-row.done .task-name { color: var(--text-muted); text-decoration: line-through; }
  .task-state { font-size: 11px; font-weight: 700; color: var(--text-dim); }
  .task-row.active .task-state { color: var(--neon-bright); }

  .doc-p { font-size: 13px; line-height: 1.7; color: var(--text-dim); margin: 6px 0 16px; }
  .panel-card h4 { margin: 16px 0 6px; font-size: 13px; color: var(--text); }
  .doc-ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 13px; line-height: 1.8; }

  .copy-block { padding: 12px 0; border-bottom: 1px dashed var(--border); }
  .copy-block:last-child { border-bottom: none; }
  .copy-tag { display: inline-block; font-size: 10px; font-weight: 700; color: var(--neon-bright); background: rgba(74,222,128,0.12); padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
  .copy-text { font-size: 14px; line-height: 1.7; color: var(--text); }

  .step-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .step-table th, .step-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); }
  .step-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; }
  .step-table td { color: var(--text-dim); }

  .story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
  .story-cell {
    aspect-ratio: 16 / 9; border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.08); position: relative; overflow: hidden;
  }
  .story-cell::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%); }
  .story-no { font-size: 12px; font-weight: 800; color: #cfe; font-family: var(--mono); }
  .story-cam { font-size: 11px; color: rgba(255,255,255,0.7); align-self: flex-end; }

  .sched-day, .ver-tag { font-weight: 800; color: var(--neon-bright); font-size: 13px; flex-shrink: 0; width: 56px; }
  .sched-main, .ver-main, .file-main { flex: 1; }
  .sched-scene { font-size: 13px; color: var(--text); font-weight: 600; }
  .sched-c { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
  .sched-w { font-size: 12px; color: var(--text-dim); }
  .ver-m { font-size: 12px; color: var(--text-dim); }
  .ver-state, .rev-st { font-size: 11px; font-weight: 700; color: var(--neon-bright); flex-shrink: 0; }
  .ver-state.warn, .rev-st.warn { color: var(--warning); }

  .file-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(96,165,250,0.12); color: #93c5fd; flex-shrink: 0; }
  .file-ico svg { width: 18px; height: 18px; }
  .file-n { font-size: 13px; color: var(--text); font-weight: 600; }
  .file-m { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  .rev-who { font-size: 13px; font-weight: 700; color: var(--text); display: flex; flex-direction: column; gap: 2px; width: 110px; flex-shrink: 0; }
  .rev-who span { font-size: 11px; color: var(--text-muted); font-weight: 400; font-family: var(--mono); }
  .rev-txt { flex: 1; font-size: 13px; color: var(--text-dim); line-height: 1.5; }

  .project-body {
    padding: 16px;
  }

  .project-body h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
  }

  .project-body .client {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
  }

  .project-progress {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .project-progress .bar {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
  }

  .project-progress .bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--neon), var(--neon-bright));
    border-radius: 999px;
    box-shadow: 0 0 10px var(--neon-glow);
  }

  .project-progress span {
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-bright);
    font-family: var(--mono);
  }

  .project-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }

  .project-meta-row .due {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  .avatar-stack {
    display: flex;
  }

  .avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bg-elevated);
    margin-left: -8px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  }

  .avatar-mini:first-child { margin-left: 0; }

  /* Right panel — fixed head + scrollable body, closable, slides in/out */
  .right-panel {
    grid-area: right;
    margin: 14px 14px 14px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 21;
  }
  .app-shell.no-right .right-panel {
    transform: translateX(118%);
    opacity: 0;
    margin-right: 0;
    pointer-events: none;
  }

  /* Right panel: darker, cleaner sheet surface (not a gray card stack) */
  .right-panel.glass {
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow:
      -24px 0 70px rgba(0,0,0,0.55),
      inset 1px 0 0 rgba(255,255,255,0.04);
  }
  html[data-theme="light"] .right-panel.glass {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86));
    border-color: rgba(0,0,0,0.08);
    box-shadow:
      -24px 0 70px rgba(0,0,0,0.10),
      inset 1px 0 0 rgba(255,255,255,0.7);
  }

  .panel-section h3 {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .panel-card {
    padding: 16px;
  }

  .panel-card .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }

  .panel-card .row:last-child { border-bottom: none; }

  .panel-card .row span:first-child { color: var(--text-muted); }
  .panel-card .row span:last-child { font-weight: 600; }

  .activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .activity-item:last-child { border-bottom: none; }

  .activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    background: var(--neon);
    box-shadow: 0 0 10px var(--neon);
  }

  .activity-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-dim);
  }

  .activity-item small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }

  /* Right panel head: dynamic title + close (no tabs) */
  .right-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .right-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
    min-width: 0;
  }
  .right-title .title-icon {
    width: 22px; height: 22px;
    color: var(--neon);
    display: grid; place-items: center;
    flex-shrink: 0;
  }
  .right-title .title-icon svg { width: 18px; height: 18px; }
  .right-title span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .right-close {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    display: grid; place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .right-close:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); transform: rotate(90deg); }
  .right-close svg { width: 16px; height: 16px; }

  /* Right body (scrollable) */
  .right-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  /* .right-body uses the unified site-wide scrollbar defined in base.css */

  /* Right body shows the clicked content directly (no panes / no tabs)
     不启用 fadeIn 入场动画：每次 innerHTML 重建都会重放，导致 FF 智能体/右侧面板打开时闪烁；改为静态渲染更自然流畅。 */
  .right-body > * { animation: none; }

  .pane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
  .pane-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .mark-all-read {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mark-all-read:hover {
    border-color: rgba(74,222,128,0.45);
    color: var(--neon-bright);
    background: rgba(74,222,128,0.08);
  }

  .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .btn-ghost:hover { background: var(--surface-hover); color: var(--text); border-color: rgba(74,222,128,0.35); }

  /* Notification list (inside right body) */
  .notification-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .notification-item {
    display: flex;
    gap: 12px;
    padding: 13px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
  }
  .notification-item:hover {
    background: var(--surface-hover);
    border-color: var(--border);
    transform: translateX(2px);
  }
  .notification-item.unread {
    background: rgba(74,222,128,0.06);
    border-color: rgba(74,222,128,0.18);
  }
  .notification-item.unread:hover {
    background: rgba(74,222,128,0.10);
    border-color: rgba(74,222,128,0.30);
  }

  .notification-stripe {
    width: 3px;
    border-radius: 999px;
    flex-shrink: 0;
  }
  .notification-item.announcement .notification-stripe { background: linear-gradient(180deg, #f59e0b, #fbbf24); box-shadow: 0 0 10px rgba(245,158,11,0.35); }
  .notification-item.message .notification-stripe { background: linear-gradient(180deg, #60a5fa, #93c5fd); box-shadow: 0 0 10px rgba(96,165,250,0.35); }

  .notification-body { flex: 1; min-width: 0; }
  .notification-body h4 {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .notification-item.unread .notification-body h4 { color: var(--neon-bright); }
  .notification-body p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--mono);
  }
  .notification-meta .type-tag {
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font);
  }
  .notification-item.announcement .type-tag { background: rgba(245,158,11,0.12); color: #fbbf24; }
  .notification-item.message .type-tag { background: rgba(96,165,250,0.12); color: #93c5fd; }
  .unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    flex-shrink: 0;
  }

  .notification-empty {
    padding: 28px 14px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
  }

  /* Full message view (center) */
  .msg-full-list { display: flex; flex-direction: column; gap: 10px; }
  .msg-full-item {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
  }
  .msg-full-item .notification-stripe { width: 4px; }
  .msg-full-item .notification-body h4 { font-size: 15px; margin-bottom: 8px; }
  .msg-full-item .notification-body p { font-size: 13px; line-height: 1.6; -webkit-line-clamp: unset; }

  .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 13px;
  }

  .toggle-switch {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }

  .toggle-switch.on {
    background: rgba(74,222,128,0.25);
    border-color: rgba(74,222,128,0.45);
    box-shadow: 0 0 16px rgba(74,222,128,0.25);
  }

  .toggle-switch.on::after {
    left: 20px;
    background: var(--neon);
    box-shadow: 0 0 12px var(--neon);
  }

/* right-panel Resizable 手柄 */
.right-resizer { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 30; }
.right-resizer::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s ease; }
.right-resizer:hover::after { background: rgba(74,222,128,0.5); }
body.right-panel-resizing { cursor: col-resize; user-select: none; }
body.right-panel-resizing .right-resizer::after { background: rgba(74,222,128,0.7); }
