/* ═══════════════════════════════════════════════════════════════
   Projects V2 — Full CSS
   Dark theme aesthetic — matches main page style.css tokens.
   Shoelace token mapping + layout + visual depth.
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens (mapped from style.css) ────────────────── */
:root {
    --pv2-void: var(--bg-void, #050505);
    --pv2-deep: var(--bg-deep, #0a0a0a);
    --pv2-base: var(--bg-base, #0f0f0f);
    --pv2-surface: var(--bg-surface, #141414);
    --pv2-elevated: var(--bg-elevated, #1a1a1a);
    --pv2-raised: var(--bg-hover, #222222);
    --pv2-accent: var(--accent, #FF6A00);
    --pv2-accent-dim: var(--accent-bg-strong, rgba(255,106,0,0.12));
    --pv2-accent-glow: rgba(255,106,0,0.25);
    --pv2-text-bright: var(--text-bright, #E8FFE8);
    --pv2-text-primary: var(--text-primary, #C0D0C0);
    --pv2-text-secondary: var(--text-secondary, #7A8A7A);
    --pv2-text-muted: var(--text-muted, #4A5A4A);
    --pv2-border: var(--border-subtle, #2a1a0a);
    --pv2-border-strong: var(--border-default, #3a2a1a);
    --pv2-danger: var(--danger, #FF0033);
    --pv2-warning: var(--warning, #FFB800);
    --pv2-success: var(--success, #00FF41);
    --pv2-purple: #8b5cf6;
    --pv2-blue: #3b82f6;
    --pv2-amber: #f59e0b;
    /* Inherit fonts from main page */
    --pv2-font-heading: var(--font-display, 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace);
    --pv2-font-body: var(--font-body, 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace);
    --pv2-font-mono: var(--font-mono, 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace);
    /* Sharp edges — match main page 0px radius */
    --pv2-radius-sm: var(--radius-sm, 0px);
    --pv2-radius-md: var(--radius, 0px);
    --pv2-radius-lg: var(--radius-lg, 0px);
}

/* ── Shoelace Token Mapping (Dark theme) ───────────── */
.sl-theme-dark {
    --sl-color-primary-50: rgba(255,106,0,0.05);
    --sl-color-primary-100: rgba(255,106,0,0.1);
    --sl-color-primary-200: rgba(255,106,0,0.15);
    --sl-color-primary-300: rgba(255,106,0,0.25);
    --sl-color-primary-400: rgba(255,106,0,0.5);
    --sl-color-primary-500: #CC5500;
    --sl-color-primary-600: #FF6A00;
    --sl-color-primary-700: #FF8C33;
    --sl-color-primary-800: #FFB066;
    --sl-color-primary-900: #FFD4A0;
    --sl-color-primary-950: #FFE8CC;

    --sl-color-neutral-0: #050505;
    --sl-color-neutral-50: #0a0a0a;
    --sl-color-neutral-100: #0f0f0f;
    --sl-color-neutral-200: #141414;
    --sl-color-neutral-300: #1a1a1a;
    --sl-color-neutral-400: #222222;
    --sl-color-neutral-500: #2a2a2a;
    --sl-color-neutral-600: #4A5A4A;
    --sl-color-neutral-700: #7A8A7A;
    --sl-color-neutral-800: #C0D0C0;
    --sl-color-neutral-900: #E8FFE8;
    --sl-color-neutral-950: #F0FFF0;
    --sl-color-neutral-1000: #ffffff;

    --sl-color-success-600: #00FF41;
    --sl-color-warning-600: #FFB800;
    --sl-color-danger-600: #FF0033;

    /* Sharp edges — no border radius */
    --sl-border-radius-small: 0px;
    --sl-border-radius-medium: 0px;
    --sl-border-radius-large: 0px;
    --sl-border-radius-x-large: 0px;

    --sl-font-sans: var(--pv2-font-body);
    --sl-font-mono: var(--pv2-font-mono);
    --sl-font-size-medium: 13px;

    --sl-panel-background-color: var(--pv2-surface);
    --sl-panel-border-color: var(--pv2-border);
    --sl-input-background-color: var(--pv2-deep);
    --sl-input-border-color: var(--pv2-raised);
    --sl-input-color: var(--pv2-text-bright);
    --sl-overlay-background-color: rgba(5,5,5,0.85);

    --sl-shadow-x-small: 0 1px 3px rgba(0,0,0,0.5);
    --sl-shadow-small: 0 2px 6px rgba(0,0,0,0.5);
    --sl-shadow-medium: 0 4px 12px rgba(0,0,0,0.6);
    --sl-shadow-large: 0 8px 24px rgba(0,0,0,0.6);
}

/* ── Shoelace Card Override (sharp Dark style) ────────────── */
sl-card::part(base) {
    background: var(--pv2-surface);
    border: 1px solid var(--pv2-border);
    border-radius: 0px;
    box-shadow: none;
}
sl-card::part(header) {
    border-bottom: 1px solid var(--pv2-border);
    padding: 14px 18px;
}
sl-card::part(body) {
    padding: 18px;
}

/* ── Page Shell ─────────────────────────────────────────────── */
.pv2-page {
    display: flex; flex-direction: column; height: 100vh;
    background: var(--pv2-base);
    font-family: var(--pv2-font-body);
    font-size: 15px;
    color: var(--pv2-text-primary);
    line-height: 1.5;
}

/* ── Top Bar ────────────────────────────────────────────────── */
.pv2-topbar {
    height: 52px; flex-shrink: 0;
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px;
    background: var(--pv2-deep);
    border-bottom: 1px solid var(--pv2-border);
}
.pv2-topbar-logo {
    width: 32px; height: 32px; border-radius: 0px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--pv2-font-heading); font-weight: 700; font-size: 16px;
    background: var(--pv2-accent); color: var(--pv2-void); text-decoration: none;
}

/* ── Detail Layout (sidebar + main) ─────────────────────────── */
.pv2-detail { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────────── */
.pv2-sidebar {
    width: 220px; flex-shrink: 0;
    display: flex; flex-direction: column;
    background: var(--pv2-deep);
    border-right: 1px solid var(--pv2-border);
    overflow-y: auto; scrollbar-width: thin;
}
.pv2-sidebar-dashboard {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-bottom: 1px solid var(--pv2-border);
    background: var(--pv2-elevated); cursor: pointer; border: none;
    width: 100%; text-align: left; font-family: var(--pv2-font-body);
    transition: all 0.15s ease;
}
.pv2-sidebar-dashboard svg { width: 22px; height: 22px; color: var(--pv2-accent); opacity: 0.7; flex-shrink: 0; }
.pv2-sidebar-dashboard-label {
    font-family: var(--pv2-font-heading); font-weight: 600; font-size: 15px;
    color: var(--pv2-text-bright); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pv2-sidebar-dashboard:hover { background: var(--pv2-raised); }
.pv2-sidebar-dashboard:hover svg { opacity: 1; }
.pv2-sidebar-dashboard.active {
    background: var(--pv2-accent-dim);
    border-bottom-color: var(--pv2-accent);
}
.pv2-sidebar-dashboard.active svg { opacity: 1; }
.pv2-sidebar-avatar {
    width: 36px; height: 36px; border-radius: 0px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--pv2-font-heading); font-weight: 700; font-size: 16px;
    color: var(--pv2-void); flex-shrink: 0;
}
.pv2-sidebar-avatar.active { background: var(--pv2-accent); }
.pv2-sidebar-avatar.paused { background: var(--pv2-warning); }
.pv2-sidebar-avatar.error { background: var(--pv2-danger); }
.pv2-sidebar-avatar.archived { background: var(--pv2-text-muted); }
.pv2-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.pv2-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 0px;
    font-size: 14px; font-weight: 500; color: var(--pv2-text-secondary);
    background: none; border: none; cursor: pointer;
    text-align: left; width: 100%; font-family: var(--pv2-font-body);
    transition: all 0.15s ease;
}
.pv2-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--pv2-text-primary); }
.pv2-nav-item.active {
    background: var(--pv2-accent-dim);
    color: var(--pv2-text-bright); font-weight: 600;
    border: 1px solid rgba(0,229,191,0.15);
}
.pv2-nav-item svg { width: 18px; height: 18px; opacity: 0.5; flex-shrink: 0; }
.pv2-nav-item:hover svg { opacity: 0.7; }
.pv2-nav-item.active svg { opacity: 1; color: var(--pv2-accent); }
.pv2-nav-bottom {
    padding: 8px; border-top: 1px solid var(--pv2-border); margin-top: auto;
    display: flex; flex-direction: column; gap: 2px;
}

/* ── Main Content Area ──────────────────────────────────────── */
.pv2-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ── Hero ──────────────────────────────────────────────────── */
.pv2-hero {
    padding: 14px 24px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--pv2-surface) 0%, var(--pv2-elevated) 100%);
    border-bottom: 1px solid var(--pv2-border);
    display: flex; align-items: center; gap: 14px;
}
.pv2-hero-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pv2-hero-avatar {
    width: 40px; height: 40px; border-radius: 0px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--pv2-font-heading); font-weight: 700; font-size: 18px;
    color: var(--pv2-void); flex-shrink: 0;
}
.pv2-hero-avatar.active { background: var(--pv2-accent); box-shadow: 0 2px 12px var(--pv2-accent-glow); }
.pv2-hero-avatar.paused { background: var(--pv2-warning); box-shadow: 0 2px 12px rgba(240,160,48,0.25); }
.pv2-hero-avatar.error { background: var(--pv2-danger); box-shadow: 0 2px 12px rgba(255,77,94,0.25); }
.pv2-hero-avatar.archived { background: var(--pv2-text-muted); }
.pv2-hero-info { flex: 1; min-width: 0; }
.pv2-hero-name {
    font-family: var(--pv2-font-heading); font-size: 18px; font-weight: 700;
    color: var(--pv2-text-bright); letter-spacing: -0.2px; line-height: 1.3;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pv2-hero-desc {
    font-size: 13px; color: var(--pv2-text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pv2-hero-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.pv2-hero-desc {
    font-size: 13px; color: var(--pv2-text-secondary); line-height: 1.4;
    margin-top: 2px;
}
.pv2-hero-meta {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    font-size: 13px; color: var(--pv2-text-secondary);
}
.pv2-hero-meta strong { color: var(--pv2-text-bright); font-weight: 600; }
.pv2-hero-meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--pv2-text-muted); }

/* ── View Container ─────────────────────────────────────────── */
.pv2-view { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--pv2-raised) transparent; }

/* ── Overview — Stat Cards Row ──────────────────────────────── */
.pv2-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding: 24px 28px 0;
}
.pv2-stat-card {
    background: var(--pv2-surface);
    border: 1px solid var(--pv2-border);
    border-radius: var(--pv2-radius-md);
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; gap: 6px;
}
.pv2-stat-label {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--pv2-text-muted);
}
.pv2-stat-value {
    font-family: var(--pv2-font-heading); font-size: 28px; font-weight: 700;
    color: var(--pv2-text-bright); line-height: 1;
}
.pv2-stat-value.accent { color: var(--pv2-accent); }
.pv2-stat-value.warning { color: var(--pv2-warning); }
.pv2-stat-value.danger { color: var(--pv2-danger); }
.pv2-stat-sub { font-size: 13px; color: var(--pv2-text-muted); }

/* ── Overview 2-Column Grid ────────────────────────────────── */
/* Activity dominates left (wider), summary panels stack right (narrower) */
.pv2-overview-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    padding: 24px;
    align-items: start;
}
.pv2-overview-activity .pv2-activity-list {
    max-height: none;
}
.pv2-overview-panels {
    display: flex; flex-direction: column; gap: 16px;
}
/* Right column clickable panels */
.pv2-overview-panels > [style*="cursor"] sl-card,
.pv2-overview-panels > div[onClick] {
    transition: border-color 0.15s;
}
.pv2-overview-panels sl-card::part(base) {
    transition: border-color 0.2s, box-shadow 0.2s;
}
.pv2-overview-panels sl-card:hover::part(base) {
    border-color: var(--pv2-border-strong);
}

/* ── Card Headers ───────────────────────────────────────────── */
.pv2-card-header {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--pv2-font-heading); font-weight: 600; font-size: 16px;
    color: var(--pv2-text-bright);
}
.pv2-card-header svg { width: 20px; height: 20px; color: var(--pv2-accent); flex-shrink: 0; }
.pv2-card-header .spacer { flex: 1; }

/* ── Goals in overview ──────────────────────────────────────── */
.pv2-goal-progress-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.pv2-goal-pct {
    font-size: 12px; font-weight: 600; color: var(--pv2-text-secondary);
    min-width: 36px; text-align: right;
}
.pv2-goal-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pv2-goal-item {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 15px; color: var(--pv2-text-primary); line-height: 1.5;
}
.pv2-goal-item.done { color: var(--pv2-text-muted); text-decoration: line-through; }
.pv2-goal-check { flex-shrink: 0; margin-top: 3px; }

/* ── Activity log ───────────────────────────────────────────── */
.pv2-activity-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.pv2-activity-item {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 14px 18px; border-radius: var(--pv2-radius-md);
    background: var(--pv2-elevated);
    border: 1px solid var(--pv2-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: border-color 0.15s;
}
.pv2-activity-item:hover {
    border-color: var(--pv2-border-strong);
    background: var(--pv2-raised);
}

/* Activity type icon */
.pv2-activity-icon {
    width: 36px; height: 36px; border-radius: 0px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}
.pv2-activity-icon.success { background: rgba(0,214,143,0.12); color: var(--pv2-success); }
.pv2-activity-icon.error { background: rgba(255,77,94,0.12); color: var(--pv2-danger); }
.pv2-activity-icon.warning { background: rgba(240,160,48,0.12); color: var(--pv2-warning); }
.pv2-activity-icon.tool { background: rgba(115,132,153,0.12); color: var(--pv2-text-secondary); }
.pv2-activity-icon.code { background: rgba(139,92,246,0.12); color: var(--pv2-purple); }
.pv2-activity-icon.skill { background: rgba(59,130,246,0.12); color: var(--pv2-blue); }
.pv2-activity-icon.milestone { background: rgba(245,158,11,0.12); color: var(--pv2-amber); }
.pv2-activity-icon.update { background: var(--pv2-accent-dim); color: var(--pv2-accent); }
.pv2-activity-icon.note { background: rgba(99,102,241,0.12); color: #6366f1; }
.pv2-activity-icon.info { background: rgba(56,189,248,0.12); color: #38bdf8; }

.pv2-activity-body { flex: 1; min-width: 0; }
.pv2-activity-title {
    font-family: var(--pv2-font-heading); font-size: 15px; font-weight: 700;
    color: var(--pv2-text-bright); line-height: 1.4; letter-spacing: -0.1px;
}
.pv2-activity-text {
    font-size: 14px; color: var(--pv2-text-secondary); margin-top: 6px;
    line-height: 1.6;
}
.pv2-activity-meta {
    display: flex; gap: 10px; margin-top: 8px; align-items: center;
}
.pv2-activity-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 0px;
    font-size: 12px; font-weight: 600; font-family: var(--pv2-font-mono);
    background: var(--pv2-surface); border: 1px solid var(--pv2-border);
    color: var(--pv2-text-secondary);
}
.pv2-activity-time {
    font-size: 12px; color: var(--pv2-text-muted); white-space: nowrap; flex-shrink: 0;
    margin-left: auto; font-family: var(--pv2-font-mono); letter-spacing: -0.3px;
}

/* ── Tool / Completion Activity Items ─────────────────────── */
.pv2-activity-tool { cursor: pointer; }
.pv2-activity-tool:hover { border-color: var(--pv2-accent); }
.pv2-activity-tool .pv2-tool-path {
    font-family: var(--pv2-font-mono); font-size: 13px; font-weight: 500;
    color: var(--pv2-accent); opacity: 0.85; letter-spacing: -0.3px;
}
.pv2-tool-action {
    color: var(--pv2-text-secondary); font-weight: 500;
}
.pv2-tool-filename {
    color: var(--pv2-accent); font-family: var(--pv2-font-mono);
    font-style: italic; font-weight: 600; letter-spacing: -0.3px;
}
.pv2-completion-stats {
    font-size: 13px; font-family: var(--pv2-font-mono); font-weight: 500;
    color: var(--pv2-text-muted); letter-spacing: -0.2px;
}
.pv2-activity-detail {
    margin-top: 10px; padding: 10px 12px; border-radius: 0px;
    background: var(--pv2-deep); border: 1px solid var(--pv2-border);
    font-size: 13px;
}
.pv2-activity-kv { display: flex; flex-direction: column; gap: 5px; }
.pv2-kv-row { display: flex; gap: 10px; line-height: 1.5; align-items: baseline; }
.pv2-kv-key {
    font-family: var(--pv2-font-mono); font-size: 11px; font-weight: 700;
    color: var(--pv2-text-muted); min-width: 65px; flex-shrink: 0;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.pv2-kv-val {
    font-size: 13px; color: var(--pv2-text-secondary); word-break: break-word;
    white-space: pre-wrap; line-height: 1.5;
}
.pv2-kv-link {
    color: var(--pv2-accent) !important; cursor: pointer; text-decoration: none;
}
.pv2-kv-link:hover { text-decoration: underline; }

/* ── Activity Filter Menu ─────────────────────────────────── */
.pv2-filter-wrapper { display: inline-flex; }
.pv2-filter-active { color: var(--pv2-accent); }
.pv2-filter-menu {
    position: absolute; top: 100%; right: 0; z-index: 100;
    background: var(--pv2-elevated); border: 1px solid var(--pv2-border);
    border-radius: 0px; padding: 10px 12px; min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; gap: 6px;
}
.pv2-filter-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--pv2-text-muted);
    padding-bottom: 4px; border-bottom: 1px solid var(--pv2-border);
    margin-bottom: 2px;
}
.pv2-filter-row {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 13px; color: var(--pv2-text-secondary);
    padding: 3px 0;
}
.pv2-filter-row:hover { color: var(--pv2-text-bright); }
.pv2-filter-row sl-checkbox::part(base) { font-size: 13px; }
.pv2-filter-reset {
    border-top: 1px solid var(--pv2-border); margin-top: 4px; padding-top: 4px;
    text-align: center;
}
.pv2-load-more { text-align: center; padding: 12px 0 4px; }

/* ── Diff Block ───────────────────────────────────────────── */
.pv2-diff-block {
    font-family: var(--pv2-font-mono); font-size: 12px; line-height: 1.6;
    margin: 0; padding: 8px 10px; border-radius: 0px;
    background: var(--pv2-void); border: 1px solid var(--pv2-border);
    overflow-x: auto; white-space: pre-wrap; word-break: break-word;
    max-height: 240px; overflow-y: auto;
}
.pv2-diff-del {
    color: #f87171; background: rgba(248,113,113,0.08);
    padding: 0 4px; margin: 0 -4px; border-radius: 0px;
}
.pv2-diff-add {
    color: #4ade80; background: rgba(74,222,128,0.08);
    padding: 0 4px; margin: 0 -4px; border-radius: 0px;
}

.pv2-archived-section { margin-top: 8px; }
.pv2-archived-content {
    font-family: var(--pv2-font-mono); font-size: 12px; color: var(--pv2-text-secondary);
    white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow-y: auto;
    margin: 0; padding: 8px; background: var(--pv2-void); border-radius: 0px;
    border: 1px solid var(--pv2-border);
}
.pv2-load-archived {
    background: transparent; border: 1px solid var(--pv2-border); color: var(--pv2-accent);
    border-radius: 0px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.pv2-load-archived:hover { background: var(--pv2-surface); }

/* ── Activity Rich Attachments ─────────────────────────────── */
.pv2-activity-attachments {
    display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
}
.pv2-att-image {
    border-radius: 0px; overflow: hidden;
    background: var(--pv2-deep); border: 1px solid var(--pv2-border);
}
.pv2-att-image img { width: 100%; max-height: 200px; object-fit: contain; display: block; }
.pv2-att-caption {
    font-size: 12px; color: var(--pv2-text-muted); padding: 6px 10px;
    font-style: italic; text-align: center;
}
.pv2-att-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 0px;
    background: var(--pv2-surface); border: 1px solid var(--pv2-border);
    text-decoration: none; color: inherit; transition: border-color 0.15s;
}
.pv2-att-link:hover { border-color: var(--pv2-accent); }
.pv2-att-link-icon { width: 20px; height: 20px; border-radius: 0px; flex-shrink: 0; }
.pv2-att-link sl-icon { font-size: 18px; color: var(--pv2-text-muted); flex-shrink: 0; }
.pv2-att-link-body { flex: 1; min-width: 0; }
.pv2-att-link-title { font-size: 14px; font-weight: 600; color: var(--pv2-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv2-att-link-desc { font-size: 12px; color: var(--pv2-text-muted); margin-top: 2px; line-height: 1.4; }
.pv2-att-doc {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 0px;
    background: var(--pv2-surface); border: 1px solid var(--pv2-border);
    text-decoration: none; color: inherit; transition: border-color 0.15s;
}
.pv2-att-doc:hover { border-color: var(--pv2-accent); }
.pv2-att-doc sl-icon { color: var(--pv2-text-secondary); flex-shrink: 0; }
.pv2-att-doc-info { flex: 1; min-width: 0; }
.pv2-att-doc-name { font-size: 14px; font-weight: 600; color: var(--pv2-text-bright); }
.pv2-att-doc-desc { font-size: 12px; color: var(--pv2-text-muted); margin-top: 2px; }
.pv2-att-doc-size { font-size: 11px; color: var(--pv2-text-muted); font-family: var(--pv2-font-mono); flex-shrink: 0; }
.pv2-att-html { border-radius: 0px; overflow: hidden; border: 1px solid var(--pv2-border); }

/* ── Context Preview ───────────────────────────────────────── */
.pv2-context-sections { display: flex; flex-direction: column; gap: 10px; }
.pv2-context-section {}
.pv2-context-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--pv2-text-muted); margin-bottom: 3px;
}
.pv2-context-preview {
    font-size: 13px; line-height: 1.5; color: var(--pv2-text-secondary);
    white-space: pre-line;
}

/* ── Showcase / Pinned Files ────────────────────────────────── */
.pv2-showcase-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-top: 14px;
}
a.pv2-showcase-card, .pv2-showcase-card {
    background: var(--pv2-elevated);
    border: 1px solid var(--pv2-border);
    border-radius: var(--pv2-radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; flex-direction: column; gap: 10px;
    text-decoration: none; color: inherit;
}
.pv2-showcase-card:hover {
    border-color: var(--pv2-accent);
    box-shadow: 0 0 0 1px var(--pv2-accent-dim), 0 4px 12px rgba(0,0,0,0.3);
}
.pv2-showcase-thumb {
    width: 100%; aspect-ratio: 16/10; border-radius: 0px;
    background: var(--pv2-deep); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: var(--pv2-text-muted); font-size: 32px;
}
.pv2-showcase-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv2-showcase-thumb { position: relative; }
.pv2-showcase-type {
    position: absolute; bottom: 6px; right: 6px;
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(0,0,0,0.6); color: var(--pv2-text-secondary);
    padding: 2px 6px; border-radius: 0px;
}
.pv2-showcase-name {
    font-size: 14px; font-weight: 600; color: var(--pv2-text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pv2-showcase-desc { font-size: 13px; color: var(--pv2-text-muted); line-height: 1.4; }

/* ── Dashboard Preview (in Overview) ────────────────────────── */
.pv2-dashboard-preview {
    border-radius: var(--pv2-radius-md);
    background: var(--pv2-deep);
    border: 1px solid var(--pv2-border);
    overflow: hidden; margin-top: 14px;
    position: relative;
}
.pv2-dashboard-preview iframe {
    width: 100%; height: 300px; border: none; pointer-events: none;
    background: var(--pv2-void);
}
.pv2-dashboard-preview-overlay {
    position: absolute; inset: 0; cursor: pointer;
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 16px;
    background: linear-gradient(to top, rgba(4,8,16,0.8) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.2s;
}
.pv2-dashboard-preview:hover .pv2-dashboard-preview-overlay { opacity: 1; }

/* ── Notes list compact ─────────────────────────────────────── */
.pv2-note-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pv2-note-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; color: var(--pv2-text-primary);
    padding: 8px 12px; border-radius: 0px;
    background: var(--pv2-elevated); border: 1px solid transparent;
    transition: border-color 0.15s;
}
.pv2-note-item:hover { border-color: var(--pv2-border); }
.pv2-note-layer {
    width: 24px; height: 24px; border-radius: 0px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.pv2-note-layer.critical { background: rgba(255,77,94,0.15); color: var(--pv2-danger); }
.pv2-note-layer.essential { background: rgba(240,160,48,0.15); color: var(--pv2-warning); }
.pv2-note-layer.context { background: var(--pv2-accent-dim); color: var(--pv2-accent); }

/* ── Chat preview ───────────────────────────────────────────── */
.pv2-chat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pv2-chat-msg {
    display: flex; gap: 10px; font-size: 14px; line-height: 1.5;
    padding: 8px 12px; border-radius: 0px;
    background: var(--pv2-elevated);
}
.pv2-chat-role {
    font-weight: 700; font-size: 11px; text-transform: uppercase; min-width: 36px;
    flex-shrink: 0; margin-top: 2px;
}
.pv2-chat-msg.user .pv2-chat-role { color: var(--pv2-accent); }
.pv2-chat-msg.assistant .pv2-chat-role { color: var(--pv2-text-muted); }
.pv2-chat-text { color: var(--pv2-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Configure View ─────────────────────────────────────────── */
.pv2-configure {
    display: grid; grid-template-columns: 3fr 2fr; gap: 24px;
    padding: 24px; align-items: start;
}
.pv2-configure-full { grid-column: 1 / -1; }

/* Rendered markdown */
.pv2-rendered { font-size: 15px; line-height: 1.7; color: var(--pv2-text-primary); }
.pv2-rendered ul, .pv2-rendered ol { padding-left: 24px; margin: 6px 0; }
.pv2-rendered li { margin-bottom: 6px; }
.pv2-rendered code {
    background: var(--pv2-elevated); padding: 2px 6px; border-radius: 0px;
    font-family: var(--pv2-font-mono); font-size: 13px;
}
.pv2-rendered pre {
    background: var(--pv2-deep); padding: 16px; border-radius: 0px;
    overflow-x: auto; margin: 10px 0; border: 1px solid var(--pv2-border);
}
.pv2-rendered pre code { background: none; padding: 0; }

/* ── Tools & Skills View ────────────────────────────────────── */
.pv2-ts-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; height: 100%; }
.pv2-ts-panel { overflow-y: auto; scrollbar-width: thin; height: 100%; padding: 20px; }
.pv2-ts-panel:first-child { border-right: 1px solid var(--pv2-border); }

/* ── Settings View ──────────────────────────────────────────── */
.pv2-settings { display: flex; flex-direction: column; gap: 20px; padding: 24px; max-width: 860px; }
.pv2-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pv2-settings-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.pv2-save-bar {
    position: sticky; bottom: 0; padding: 14px 28px;
    background: var(--pv2-surface); border-top: 1px solid var(--pv2-border);
    display: flex; gap: 10px; justify-content: flex-end;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
}

/* ── Dashboard (Fullscreen Agent UI) ────────────────────────── */
.pv2-dashboard { flex: 1; display: flex; flex-direction: column; height: 100%; }
.pv2-dashboard iframe { flex: 1; border: none; width: 100%; background: var(--pv2-void); }
.pv2-dashboard-toolbar {
    display: flex; gap: 8px; padding: 10px 20px;
    background: var(--pv2-deep); border-bottom: 1px solid var(--pv2-border); flex-shrink: 0;
}

/* ── Project List ───────────────────────────────────────────── */
.pv2-list { padding: 28px; max-width: 1080px; margin: 0 auto; width: 100%; }
.pv2-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.pv2-list-title { font-family: var(--pv2-font-heading); font-size: 26px; font-weight: 700; color: var(--pv2-text-bright); }
.pv2-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* Card click target for project list items */
.pv2-project-card { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.pv2-project-card::part(base) { border-color: var(--pv2-border); background: var(--pv2-surface); }
.pv2-project-card:hover::part(base) {
    border-color: var(--pv2-border-strong); background: var(--pv2-elevated);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.pv2-project-card-row { display: flex; align-items: center; gap: 14px; }
.pv2-project-card-info { flex: 1; min-width: 0; }
.pv2-project-card-name { font-family: var(--pv2-font-heading); font-weight: 600; font-size: 17px; color: var(--pv2-text-bright); }
.pv2-project-card-desc { font-size: 14px; color: var(--pv2-text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv2-project-card-meta { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--pv2-text-muted); }
.pv2-project-card-meta strong { color: var(--pv2-text-secondary); }

/* ── Empty/Loading/Error states ─────────────────────────────── */
.pv2-empty { text-align: center; padding: 48px 24px; color: var(--pv2-text-muted); font-size: 15px; }
.pv2-loading { display: flex; justify-content: center; padding: 48px; }

/* ── Section Title (used in overview subsections) ───────────── */
.pv2-section-title {
    font-family: var(--pv2-font-heading); font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--pv2-text-muted); margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
}
.pv2-section-title svg { width: 20px; height: 20px; color: var(--pv2-accent); opacity: 0.7; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
    .pv2-detail { flex-direction: column; }
    .pv2-sidebar {
        width: 100%; flex-direction: row; height: auto;
        overflow-x: auto; overflow-y: hidden; border-right: none; border-bottom: 1px solid var(--pv2-border);
    }
    .pv2-sidebar-dashboard { border-bottom: none; border-right: 1px solid var(--pv2-border); padding: 10px 14px; }
    .pv2-nav { flex-direction: row; gap: 0; padding: 6px 10px; flex-wrap: nowrap; }
    .pv2-nav-item { padding: 8px 12px; white-space: nowrap; font-size: 13px; }
    .pv2-nav-bottom { border-top: none; border-left: 1px solid var(--pv2-border); padding: 6px 10px; }
    .pv2-overview-grid { grid-template-columns: 1fr; }
    .pv2-configure { grid-template-columns: 1fr; }
    .pv2-ts-layout { grid-template-columns: 1fr; }
}
