body {
    height: 100%;
    overflow: hidden;
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100%;
}

/* ======================== LEFT PANEL ======================== */
.left-panel {
    width: 28%;
    min-width: 280px;
    max-width: 520px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

/* Draggable resize handle */
.panel-resize-handle {
    width: 4px;
    cursor: col-resize;
    background: var(--border-subtle);
    transition: background 0.15s;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.panel-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    right: -4px;
}

.panel-resize-handle:hover,
.panel-resize-handle.dragging {
    background: var(--accent-blue);
}

body.panel-resizing {
    cursor: col-resize;
    user-select: none;
}

body.panel-resizing iframe,
body.panel-resizing .excalidraw {
    pointer-events: none;
}

.problem-header {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}

.problem-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Avatar-only trigger — override the pill shape from theme.css */
.problem-header-top .user-menu-trigger {
    padding: 2px;
    border: none;
    border-radius: 50%;
    background: transparent;
}

.problem-header-top .user-menu-trigger:hover {
    background: var(--bg-hover);
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 500;
    flex-shrink: 0;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

.breadcrumb svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Problem navigation (prev/next) */
.problem-nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.problem-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-family: var(--font-sans);
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    max-width: 48%;
}

.problem-nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.problem-nav-link:hover {
    color: var(--text-primary);
}

.problem-nav-link.next {
    margin-left: auto;
}

/* Sync status indicator */
.sync-status {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: default;
    transition: color 0.2s;
    position: relative;
}

.sync-status::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-family: var(--font-sans);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 20;
}

.sync-status:hover::after {
    opacity: 1;
}

.sync-status.syncing {
    color: var(--accent-blue);
}

.sync-status.syncing .sync-icon {
    animation: spin 1s linear infinite;
}

.sync-status.synced {
    color: var(--accent-blue);
}

.problem-header h1 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin-top: 6px;
}

/* ======================== SECTION NAVIGATION ======================== */
.section-nav {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.section-nav-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.section-nav h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.section-nav .progress-dots {
    margin-top: 10px;
}

/* ======================== TABS ======================== */
.section-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    gap: 0;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.section-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    padding: 10px 14px 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.section-tab:hover {
    color: var(--text-secondary);
}

.section-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-badge {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

/* Tab panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Your Answer tab — empty-state graphic */
.answer-canvas-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    color: var(--text-tertiary);
    padding: 48px 20px;
}

.answer-canvas-note svg {
    opacity: 0.25;
    margin-bottom: 4px;
}

.canvas-note-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

.canvas-note-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.transcript-area {
    margin-top: 12px;
}

.transcript-area:empty,
.transcript-preview:empty {
    display: none;
}

/* No feedback placeholder */
.no-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.no-feedback svg {
    opacity: 0.3;
}

/* Section body */
.section-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 18px;
}

/* ======================== SECTION GUIDANCE ======================== */
.section-guidance {
    margin-bottom: 16px;
}

.section-guidance:empty {
    display: none;
}

.guide-intro {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.guide-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    padding: 5px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}

.guide-tip {
    margin-bottom: 12px;
}

.guide-tip-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-tip-header .tip-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
}

.guide-tip p, .guide-tip-body {
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    padding-left: 21px;
}

.guide-tip ul {
    margin: 4px 0 0;
    padding-left: 36px;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.guide-tip li {
    margin-bottom: 2px;
}

.guide-tip li::marker {
    color: var(--text-muted);
}

.guide-sample-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--accent-blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 0;
    margin-top: 4px;
}

.guide-sample-toggle:hover {
    opacity: 0.8;
}

.guide-sample-toggle svg {
    transition: transform 0.2s;
}

.guide-sample-toggle.open svg {
    transform: rotate(90deg);
}

.guide-sample-content {
    display: none;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 6px;
}

.guide-sample-content.open {
    display: block;
}

.guide-context {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Feedback tab */
.feedback-placeholder {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    padding: 12px 0;
}

/* ======================== SHARED FEEDBACK PRIMITIVES ======================== */

/* Score color classes */
.color-green { color: var(--accent-green); }
.color-blue  { color: var(--accent-blue); }
.color-orange { color: var(--accent-orange); }
.color-red   { color: var(--accent-red); }

/* Thin score bar (shared between section + full eval) */
.sf-bar {
    width: 100%;
    height: 3px;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin: 8px 0 12px;
    overflow: hidden;
}

.sf-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.sf-bar-fill.color-green  { background: linear-gradient(90deg, var(--accent-green), #4ade80); }
.sf-bar-fill.color-blue   { background: linear-gradient(90deg, var(--accent-blue), #60a5fa); }
.sf-bar-fill.color-orange { background: linear-gradient(90deg, var(--accent-orange), #fbbf24); }
.sf-bar-fill.color-red    { background: linear-gradient(90deg, var(--accent-red), #f87171); }

@keyframes sfFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ======================== SECTION FEEDBACK (sf-) ======================== */

.sf { padding: 4px 0; }

.sf-hero {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 2px;
}

.sf-score {
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sf-grade-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.sf-grade-pill.perfect  { background: rgba(34, 197, 94, 0.12); color: var(--accent-green); }
.sf-grade-pill.awesome  { background: var(--accent-blue-dim); color: var(--accent-blue); }
.sf-grade-pill.good     { background: var(--accent-blue-dim); color: var(--accent-blue); }
.sf-grade-pill.not-quite { background: var(--accent-orange-dim); color: var(--accent-orange); }

.sf-summary {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 0 14px;
    line-height: 1.5;
}

.sf-body p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.sf-body p:last-child { margin-bottom: 0; }

.sf-body strong { color: var(--text-primary); }
.sf-body em { color: var(--text-primary); font-style: italic; }

.sf-body ul {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.sf-body li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.sf-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.sf-body li strong { color: var(--text-primary); }
.sf-body li em { color: var(--text-primary); font-style: italic; }

/* ======================== FULL EVAL FEEDBACK (ef-) ======================== */

.ef { padding: 0; }

.ef-score-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.ef-score {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.ef-score-max {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Section-by-section feedback */
.ef-section {
    padding: 18px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.ef-section:last-child { border-bottom: none; }

.ef-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ef-section-body p {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0 0 10px;
}

.ef-section-body p:last-child { margin-bottom: 0; }

.ef-section-body ul {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.ef-section-body li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.ef-section-body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ef-section-body strong { color: var(--text-primary); }
.ef-section-body em { color: var(--text-primary); font-style: italic; }

/* ======================== SHARED ACTIONS & BLOCKS ======================== */

.feedback-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.view-sample-btn {
    width: 100%;
    margin-top: 16px;
}

.sample-answer-block {
    margin-top: 16px;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.sample-answer-block h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    color: var(--accent-blue);
}

.sample-answer-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
}

.feedback-raw {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
}

.feedback-raw strong {
    color: var(--text-primary);
}

/* ======================== VOICE NOTES (HLD + Deep Dives) ======================== */
.voice-notes-area {
    padding: 8px 0;
}

.voice-notes-box {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    overflow: hidden;
}

.voice-notes-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
    font-family: var(--font-sans);
    resize: vertical;
    min-height: 120px;
    outline: none;
    box-sizing: border-box;
}

.voice-notes-input::placeholder {
    color: var(--text-muted);
}

.voice-notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.voice-notes-toolbar-left,
.voice-notes-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-mic-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-mic-btn:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.voice-mic-btn.active {
    border-color: var(--accent-red);
    background: var(--accent-red-dim);
    color: var(--accent-red);
}

.voice-mic-btn .record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    animation: pulse 1s ease-in-out infinite;
}

.recording-elapsed {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.voice-notes-word-count {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.voice-notes-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: none;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-notes-clear-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* ======================== NAVIGATION BUTTONS ======================== */
.section-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.section-nav-buttons .btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.section-nav-buttons .btn svg {
    width: 10px;
    height: 10px;
}

.nav-spacer { flex: 1; }

/* Reference (inline details) */
.inline-reference {
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
}

.inline-reference summary {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 0;
    transition: color var(--transition-fast);
}

.inline-reference summary:hover {
    color: var(--text-secondary);
}

.inline-reference .reference-body {
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
}

.inline-reference h4 {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.inline-reference ul {
    margin-left: 16px;
    color: var(--text-tertiary);
}

.inline-reference li {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.6;
}

/* Scrollbar */
.section-body::-webkit-scrollbar,
.feedback-content::-webkit-scrollbar {
    width: 6px;
}
.section-body::-webkit-scrollbar-track,
.feedback-content::-webkit-scrollbar-track {
    background: transparent;
}
.section-body::-webkit-scrollbar-thumb,
.feedback-content::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}
.section-body::-webkit-scrollbar-thumb:hover,
.feedback-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* ======================== RIGHT PANEL ======================== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 0;
    position: relative;
}

/* Progress dots (in left panel section-nav) */
.progress-dots {
    display: flex;
    align-items: center;
    gap: 0;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-default);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.progress-dot:hover {
    border-color: var(--border-strong);
    transform: scale(1.15);
}

.progress-dot.current {
    border-color: var(--accent-blue);
    background: var(--accent-blue-dim);
    box-shadow: 0 0 0 2px var(--accent-blue-dim);
}

.progress-dot.completed {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
}

.progress-dot.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

.progress-dot.locked:hover {
    transform: none;
    border-color: var(--border-default);
}

.progress-connector {
    width: 16px;
    height: 2px;
    background: var(--border-default);
    transition: background var(--transition-fast);
}

.progress-connector.completed {
    background: var(--accent-blue);
}

/* Timer (in left panel header) */
.timer {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.timer.warning { color: var(--accent-orange); }
.timer.danger { color: var(--accent-red); }

/* ======================== EXCALIDRAW CANVAS ======================== */
#excalidraw-container {
    flex: 1;
    min-height: 300px;
    position: relative;
}

/* Hide dialogs that overlay and obscure the canvas */
#excalidraw-container .excalidraw .HelpDialog {
    display: none !important;
}

#excalidraw-fallback {
    display: none;
    flex: 1;
    min-height: 300px;
    background: var(--bg-secondary);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
}

#excalidraw-fallback svg {
    opacity: 0.3;
}

/* ======================== CANVAS SCOPE NOTICE ======================== */
.canvas-scope-notice {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 100px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.canvas-scope-notice.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.canvas-scope-notice strong {
    color: #60a5fa;
    font-weight: 600;
}

/* ======================== CANVAS TOOLBAR ======================== */
.canvas-toolbar {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hamburger toggle */
.toolbar-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toolbar-hamburger:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Toggle icon: show X when expanded, hamburger when collapsed */
.toolbar-hamburger .icon-close { display: block; }
.toolbar-hamburger .icon-menu { display: none; }
.canvas-toolbar.collapsed .toolbar-hamburger .icon-close { display: none; }
.canvas-toolbar.collapsed .toolbar-hamburger .icon-menu { display: block; }

/* Collapsed: just the hamburger */
.canvas-toolbar.collapsed .toolbar-body {
    display: none;
}

.canvas-toolbar.collapsed {
    padding: 3px;
}

.toolbar-body {
    display: flex;
    align-items: center;
    gap: 2px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar-btn-primary {
    background: var(--accent-blue);
    color: #fff;
    font-weight: 600;
}

.toolbar-btn-primary:hover {
    background: var(--accent-blue-hover);
}

.toolbar-btn-primary:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    filter: none;
}


.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-default);
    margin: 0 2px;
    flex-shrink: 0;
}

/* ======================== BUTTONS ======================== */
.btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-primary:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-tertiary);
    border: none;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-icon {
    padding: 7px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* ======================== FEEDBACK PANEL (full evaluation) ======================== */
.feedback-panel {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-strong);
    flex-direction: column;
    z-index: 9999;
    box-shadow: none;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.feedback-panel.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.feedback-header {
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.feedback-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-tertiary);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-default);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
