/* --- SLED-BOX DESIGN SYSTEM --- */
:root {
    --bg-deep: #0f0f0f;
    --bg-sidebar: #1a1a1a;
    --accent: #FF4400;
    --text: #e0e0e0;
    --text-dim: #888;
    --border: #2a2a2a;
    --star: #FFD700;
    --warning: #ffcc00;
    --danger: #ff4444;
    --btn-active: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; 
    background: var(--bg-deep); 
    color: var(--text); 
    height: 100vh; 
    display: flex; 
    overflow: hidden; 
}

/* --- SIDEBARS --- */
#workspace-sidebar { 
    width: 60px; 
    background: var(--bg-deep); 
    border-right: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 20px 0; 
    gap: 15px; 
}

#snippet-sidebar { 
    width: 280px; 
    background: var(--bg-sidebar); 
    border-right: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
}

.ws-icon { 
    width: 36px; height: 36px; border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; font-weight: bold; font-size: 14px; transition: 0.2s; 
    filter: grayscale(0.8); border: 1px solid transparent; 
    color: white; background: #222; position: relative; overflow: hidden;
}
.ws-icon.active { filter: grayscale(0); border-color: white; box-shadow: 0 0 10px rgba(255,68,0,0.3); }
.ws-icon.all-view { background: linear-gradient(45deg, #333, #111); font-size: 18px; }

.sidebar-header { 
    padding: 20px; font-size: 0.7rem; text-transform: uppercase; 
    color: var(--text-dim); display: flex; justify-content: space-between; 
    align-items: center; letter-spacing: 1px; 
}

.search-container { padding: 10px 15px; border-bottom: 1px solid var(--border); }
#snippet-search { 
    width: 100%; background: #222; border: 1px solid var(--border); 
    color: var(--text); padding: 8px; border-radius: 4px; 
    font-size: 11px; outline: none; 
}

/* --- SNIPPET LIST ITEMS --- */
#snippet-list { overflow-y: auto; flex-grow: 1; }
.snippet-item { 
    padding: 15px 20px; border-bottom: 1px solid var(--border); 
    cursor: pointer; position: relative; display: flex; 
    justify-content: space-between; align-items: flex-start; 
}
.snippet-item:hover { background: #222; }
.snippet-item.active { background: #2a2a2a; border-left: 3px solid var(--accent); }
.snippet-item h4 { font-size: 13px; margin-bottom: 4px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snippet-item p { font-size: 10px; color: var(--text-dim); }

.snippet-actions { display: flex; gap: 12px; align-items: center; padding-left: 10px; }
.star-icon { font-size: 16px; color: #333; transition: 0.2s; cursor: pointer; }
.star-icon.active { color: var(--star) !important; }
.trash-icon { cursor: pointer; font-size: 14px; opacity: 0.3; transition: opacity 0.2s; }
.trash-icon:hover { opacity: 1; color: var(--danger); }
.stale-badge { font-size: 9px; color: #b87060; border: 1px solid #b87060; padding: 1px 4px; border-radius: 3px; margin-top: 5px; font-weight: bold; }
.done-quick-btn { cursor: pointer; font-size: 13px; color: #2a2a2a; transition: color 0.15s; line-height: 1; }
.done-quick-btn:hover { color: #4caf50; }
.done-quick-btn.active { color: #4caf50; }

/* --- EDITOR & HEADER --- */
#editor-container { flex-grow: 1; display: flex; flex-direction: column; background: var(--bg-deep); }
#editor-header { padding: 12px 30px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
#editor-title { background: transparent; border: none; color: white; font-size: 1rem; flex-grow: 1; outline: none; font-weight: 500; }

#workspace-selector { 
    display: block !important; background: #222; color: var(--text); border: 1px solid var(--border); 
    padding: 6px 10px; border-radius: 4px; font-size: 11px; outline: none; cursor: pointer; 
}

#main-textarea { 
    flex-grow: 1; background: transparent; border: none; color: #d4d4d4; 
    padding: 30px; font-family: 'SF Mono', 'Fira Code', monospace; 
    font-size: 14px; line-height: 1.6; resize: none; outline: none; 
}

.toolbar-group { display: flex; gap: 8px; align-items: center; }
.toolbar-btn { background: #222; color: #999; border: 1px solid var(--border); padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.toolbar-btn svg { display: block; pointer-events: none; }
.toolbar-btn:hover { color: #ccc; border-color: #3a3a3a; }
.btn-save:not(:disabled) { background: var(--btn-active); color: white; opacity: 1; border-color: #444; }
#star-btn.active { color: var(--star); border-color: var(--star); }
#star-btn.active svg { fill: var(--star); }

/* --- SYSTEM MODAL & TABS --- */
.modal-overlay {
    position: fixed; z-index: 5000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.88); display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(12px);
}

.modal-content.system-settings {
    background: #0e0e0e;
    border: 1px solid #222;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    max-height: 82vh;
    max-width: 580px;
    overflow: hidden;
    width: 92%;
}

.modal-tabs {
    align-items: center;
    background: #0e0e0e;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    flex-shrink: 0;
    padding: 0 20px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #444;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    padding: 14px 10px 12px;
    text-transform: uppercase;
    transition: color 0.15s;
}
.tab-btn:hover { color: #777; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-pane { display: none; overflow-y: auto; padding: 20px; flex: 1; }
.tab-pane.active { display: flex; flex-direction: column; }

.close-modal {
    align-items: center;
    background: none;
    border: 1px solid #252525;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    display: flex;
    font-size: 12px;
    height: 26px;
    justify-content: center;
    margin-left: auto;
    transition: all 0.15s;
    width: 26px;
}
.close-modal:hover { background: #1e1e1e; border-color: #3a3a3a; color: #ccc; }

/* --- WORKSPACE MANAGEMENT UI --- */
.ws-list-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-label {
    color: #3a3a3a;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ws-new-btn {
    background: none;
    border: 1px solid #252525;
    border-radius: 5px;
    color: #555;
    cursor: pointer;
    font-size: 11px;
    padding: 4px 10px;
    transition: all 0.15s;
}
.ws-new-btn:hover { border-color: var(--accent); color: var(--accent); }

.ws-manage-item {
    align-items: center;
    background: #141414;
    border: 1px solid #1c1c1c;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    margin-bottom: 5px;
    padding: 10px 12px;
    transition: border-color 0.15s, background 0.15s;
}
.ws-manage-item:hover { background: #191919; border-color: #2a2a2a; }
.ws-manage-item.editing { border-color: var(--accent); background: rgba(255,68,0,0.04); }

.ws-mini-preview {
    align-items: center;
    border-radius: 7px;
    display: flex;
    flex-shrink: 0;
    font-size: 15px;
    height: 34px;
    justify-content: center;
    overflow: hidden;
    width: 34px;
}
.ws-mini-preview img { height: 100%; object-fit: cover; width: 100%; }

.ws-manage-btn {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    padding: 4px 10px;
    transition: all 0.15s;
}
.ws-manage-btn:hover { background: #2a2a2a; color: #ccc; }

.ws-editor-form {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    margin-top: 14px;
    padding: 18px;
}

.ws-form-status {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ws-form-status span {
    color: #383838;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ws-cancel-btn {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    transition: color 0.15s;
}
.ws-cancel-btn:hover { color: var(--danger); }

.ws-name-input {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    padding: 10px 12px;
    transition: border-color 0.15s;
    width: 100%;
}
.ws-name-input:focus { border-color: #3a3a3a; }

.ws-form-row { display: grid; grid-template-columns: auto 64px 1fr; gap: 12px; margin-bottom: 14px; }
.input-col { display: flex; flex-direction: column; gap: 6px; }
.input-col label { color: #3a3a3a; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

.ws-editor-form input[type="text"] {
    background: #1a1a1a; border: 1px solid #252525; border-radius: 6px;
    color: white; font-size: 13px; outline: none; padding: 8px 10px; transition: border-color 0.15s;
}
.ws-editor-form input[type="text"]:focus { border-color: #3a3a3a; }
.ws-editor-form input[type="color"] {
    background: #1a1a1a; border: 1px solid #252525; border-radius: 6px;
    cursor: pointer; height: 36px; padding: 3px; width: 100%;
}

.file-pick-btn {
    align-items: center;
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    display: flex;
    font-size: 11px;
    height: 36px;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
    padding: 0 10px;
    text-overflow: ellipsis;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.file-pick-btn:hover { border-color: #3a3a3a; color: #ccc; }

.primary-btn {
    background: var(--accent); border: none; border-radius: 7px; color: white;
    cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
    padding: 11px; transition: opacity 0.15s; width: 100%;
}
.primary-btn:hover { opacity: 0.85; }

/* --- ARCHIVE ITEMS --- */
.archive-item {
    align-items: center;
    border-bottom: 1px solid #161616;
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
}
.archive-item:last-child { border-bottom: none; }
.archive-item:first-child { padding-top: 4px; }

.archive-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.archive-item-title { color: #bbb; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-item-date { color: #333; font-size: 10px; }

.archive-actions { display: flex; flex-shrink: 0; gap: 5px; margin-left: 14px; }
.archive-actions button {
    background: #1a1a1a; border: 1px solid #272727; border-radius: 5px;
    color: #777; cursor: pointer; font-size: 11px; padding: 4px 10px; transition: all 0.15s;
}
.archive-actions button:hover { background: #242424; color: #ccc; }
.archive-actions button.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(255,68,68,0.08); }

/* --- DEVICE / PASSKEY ITEMS --- */
.device-row {
    align-items: center;
    border-bottom: 1px solid #161616;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 0;
}
.device-row:last-child { border-bottom: none; }
.device-row:first-child { padding-top: 4px; }

.device-icon {
    align-items: center; background: #181818; border-radius: 8px;
    color: #444; display: flex; flex-shrink: 0; font-size: 17px;
    height: 36px; justify-content: center; width: 36px;
}
.device-info { display: flex; flex-direction: column; flex: 1; gap: 3px; min-width: 0; }
.device-id { color: #555; font-family: monospace; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-label { color: #333; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; }

.disconnect-btn {
    background: #1a1a1a; border: 1px solid #272727; border-radius: 5px;
    color: #666; cursor: pointer; flex-shrink: 0; font-size: 11px;
    padding: 5px 10px; transition: all 0.15s;
}
.disconnect-btn:hover { border-color: var(--danger); color: var(--danger); background: rgba(255,68,68,0.08); }

/* --- CONTEXT MENU --- */
#context-menu { 
    position: fixed; background: #222; border: 1px solid var(--border); border-radius: 6px; 
    width: 180px; display: none; z-index: 9999; padding: 5px 0; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}
.menu-item { padding: 8px 15px; font-size: 12px; cursor: pointer; color: #ccc; transition: 0.1s; }
.menu-item:hover { background: var(--accent); color: white; }
.menu-item.danger:hover { background: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 0; }

/* --- ASSET TRAY & UTILITIES --- */
#asset-tray {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    overflow-x: auto;
    min-height: 140px;
}

.asset-card {
    min-width: 120px;
    max-width: 120px;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    font-size: 10px;
}

.asset-preview {
    height: 80px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asset-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.asset-info { padding: 6px 10px; border-top: 1px solid #222; }
.asset-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #888; font-size: 9px; font-family: monospace; margin-bottom: 4px; }

.device-item { display: flex; justify-content: space-between; align-items: center; background: #0a0a0a; border: 1px solid #222; padding: 12px; border-radius: 8px; font-size: 11px; color: #aaa; margin-bottom: 8px; }
#toast { position: fixed; bottom: 25px; right: 25px; background: #222; color: var(--accent); border: 1px solid var(--accent); padding: 12px 24px; border-radius: 6px; font-size: 12px; font-weight: bold; display: none; z-index: 9999; }

.sidebar-footer { margin-top: auto; padding: 20px; border-top: 1px solid var(--border); }
.logout-link { font-size: 10px; color: #444; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.logout-link:hover { color: var(--danger); }

.modal-row {
    background: #000;
    margin-bottom: 2px;
    transition: background 0.2s;
}
.modal-row:hover {
    background: #0a0a0a;
}
.modal-row span {
    font-size: 13px;
    color: var(--text-dim);
}
.modal-row button {
    background: #222;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 5px;
    font-size: 11px;
}
.modal-row button.danger:hover {
    background: var(--danger);
}

/* ============================================================
   TASKS SYSTEM
   ============================================================ */

/* --- Type chip in toolbar --- */
.type-chip {
    font-size: 9px !important;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #555 !important;
    border-color: #252525 !important;
    min-width: 44px;
    text-align: center;
}
.type-chip.is-task {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: rgba(255,68,0,0.08) !important;
}

/* --- Task meta bar (between header and textarea) --- */
#task-meta-bar {
    align-items: center;
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    gap: 12px;
    padding: 8px 30px;
}

.due-date-group {
    align-items: center;
    display: flex;
    gap: 8px;
}

.due-label {
    color: #3a3a3a;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.due-date-input {
    background: #151515;
    border: 1px solid #252525;
    border-radius: 5px;
    color: #aaa;
    font-size: 12px;
    outline: none;
    padding: 4px 8px;
    transition: border-color 0.15s;
}
.due-date-input:focus { border-color: #3a3a3a; color: white; }

.clear-date-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    transition: color 0.15s;
}
.clear-date-btn:hover { color: var(--danger); }

.done-toggle-btn {
    background: #151515;
    border: 1px solid #252525;
    border-radius: 5px;
    color: #555;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    transition: all 0.15s;
}
.done-toggle-btn:hover { border-color: #4caf50; color: #4caf50; background: rgba(76,175,80,0.08); }
.done-toggle-btn.is-done { border-color: #4caf50; color: #4caf50; background: rgba(76,175,80,0.1); }
.done-toggle-btn.is-done:hover { border-color: #888; color: #888; background: transparent; }

/* --- Task check circle in snippet list --- */
.task-check {
    align-items: center;
    border: 1.5px solid #333;
    border-radius: 50%;
    color: transparent;
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    font-size: 10px;
    height: 18px;
    justify-content: center;
    margin-right: 2px;
    margin-top: 2px;
    transition: all 0.15s;
    width: 18px;
}
.task-check:hover { border-color: #4caf50; color: rgba(76,175,80,0.5); }
.task-check.done {
    background: rgba(76,175,80,0.15);
    border-color: #4caf50;
    color: #4caf50;
}

/* --- Done snippet state --- */
.snippet-item.is-done {
    opacity: 0.38;
}
.snippet-item.is-done h4 {
    text-decoration: line-through;
    text-decoration-color: #555;
}

/* --- Due date badges --- */
.due-badge {
    border-radius: 3px;
    border-width: 1px;
    border-style: solid;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1px 5px;
}
.due-badge.badge-overdue { border-color: var(--danger); color: var(--danger); }
.due-badge.badge-today   { border-color: #ffcc00;       color: #ffcc00; }
.due-badge.badge-soon    { border-color: #888;           color: #888; }
.due-badge.badge-later   { border-color: #2a2a2a;        color: #444; font-family: monospace; }

/* --- Smart view icons in workspace sidebar --- */
.ws-icon.smart-view {
    border: 1px solid #1e1e1e;
    font-size: 12px;
    font-weight: 700;
}
.ws-icon.smart-view.active { border-color: var(--accent); }
.ws-icon.starred-view { color: var(--star); }
.ws-icon.starred-view.active { border-color: var(--star); box-shadow: 0 0 10px rgba(255,215,0,0.2); }
.ws-icon.done-view { color: #4caf50; }
.ws-icon.done-view.active { border-color: #4caf50; box-shadow: 0 0 10px rgba(76,175,80,0.2); }

/* --- Google Calendar events in Today list --- */
.today-empty {
    padding: 14px 16px;
    font-size: 11px;
    color: #444;
    font-style: italic;
}

.gcal-section-header {
    color: #2a2a2a;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 10px 20px 6px;
    text-transform: uppercase;
}
.snippet-item.gcal-event { border-left: 2px solid #1a6b8a; }
.snippet-item.gcal-event h4 { font-size: 12px; }
.snippet-item.gcal-event:hover { background: #141f22; }

/* --- GCal sync button in task meta bar --- */
.gcal-sync-btn {
    align-items: center;
    background: none;
    border: 1px solid #1e1e1e;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    display: flex;
    font-size: 10px;
    font-weight: 600;
    gap: 5px;
    margin-left: auto;
    padding: 4px 10px;
    transition: all 0.15s;
}
.gcal-sync-btn:hover { border-color: #4caf50; color: #4caf50; }

/* --- Dropbox asset grid --- */
#dropbox-asset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dbx-asset {
    background: #141414;
    border: 1px solid #1c1c1c;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.15s;
}
.dbx-asset:hover { border-color: #3a3a3a; }

.dbx-thumb {
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    width: 100%;
}

.dbx-file-icon {
    align-items: center;
    aspect-ratio: 1;
    display: flex;
    font-size: 28px;
    justify-content: center;
    width: 100%;
}

.dbx-caption {
    border-top: 1px solid #1c1c1c;
    color: #444;
    font-size: 9px;
    font-family: monospace;
    overflow: hidden;
    padding: 5px 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dbx-load-more {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    font-size: 11px;
    margin-top: 12px;
    padding: 9px;
    transition: all 0.15s;
    width: 100%;
}
.dbx-load-more:hover { border-color: #3a3a3a; color: #ccc; }

/* --- Set Default button in workspace manage list --- */
.ws-default-btn {
    background: none;
    border: 1px solid #1e1e1e;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    transition: all 0.15s;
    white-space: nowrap;
}
.ws-default-btn:hover { border-color: var(--star); color: var(--star); }
.ws-default-btn.active { border-color: var(--star); color: var(--star); background: rgba(255,215,0,0.06); }

/* --- Selection toolbar --- */
#selection-toolbar {
    position: fixed;
    display: none;
    align-items: center;
    gap: 2px;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 7px;
    padding: 4px 6px;
    z-index: 9999;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
#selection-toolbar.visible { display: flex; }
.sel-toolbar-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sel-toolbar-btn:hover { background: #2a2a2a; color: #fff; }
.sel-toolbar-sep { width: 1px; height: 14px; background: #333; margin: 0 2px; }

/* --- Autosave status --- */
.save-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 56px;
    text-align: right;
    transition: opacity 0.3s;
}
.save-status.unsaved { color: var(--accent); }
.save-status.saving  { color: var(--text-dim); }
.save-status.saved   { color: #4caf50; }

/* --- Version history panel --- */
#version-panel {
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
}
.version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-dim);
    flex-shrink: 0;
}
.version-close-btn {
    background: none;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 10px;
    padding: 4px 10px;
}
.version-close-btn:hover { color: var(--text); border-color: #444; }
.version-empty {
    padding: 40px 20px;
    text-align: center;
    color: #333;
    font-size: 12px;
}
.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #1a1a1a;
    gap: 12px;
}
.version-item:hover { background: #111; }
.version-info { flex: 1; overflow: hidden; }
.version-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.version-preview {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.version-restore-btn {
    background: none;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    flex-shrink: 0;
}
.version-restore-btn:hover { border-color: var(--accent); color: var(--accent); }