/* ═══════════════════════════════════════
   Title bar
   ═══════════════════════════════════════ */

.title-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 32px;
    background: var(--bg-secondary);
    position: relative;
}

.title-bar-drag {
    position: absolute;
    inset: 0;
    -webkit-app-region: drag;
}

.window-controls {
    display: flex;
    gap: 2px;
    padding-right: 8px;
    -webkit-app-region: no-drag;
    position: relative;
    z-index: 1;
}

.window-btn {
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        transform var(--duration-fast) var(--ease-out-expo);
}

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

.window-btn:active {
    transform: scale(0.92);
}

/* MCP status indicator */
.mcp-status-area {
    position: relative;
    z-index: 1;
    -webkit-app-region: no-drag;
    margin-right: 8px;
}

.mcp-status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: none;
    background: var(--surface-hover);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-in-out);
}

.mcp-status-indicator:hover {
    background: var(--surface-active);
}

.mcp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mcp-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.mcp-ready .mcp-dot {
    background: var(--status-info);
    box-shadow: 0 0 4px color-mix(in srgb, var(--status-info) 40%, transparent);
}

.mcp-error .mcp-dot {
    background: var(--status-error);
    box-shadow: 0 0 4px color-mix(in srgb, var(--status-error) 40%, transparent);
}

.mcp-starting .mcp-dot {
    background: var(--status-warning);
    box-shadow: 0 0 4px color-mix(in srgb, var(--status-warning) 40%, transparent);
    animation: mcp-pulse 1.5s ease-in-out infinite;
}

@keyframes mcp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* ═══════════════════════════════════════
   Tab bar — elevated, distinctive
   ═══════════════════════════════════════ */

.tab-bar {
    display: flex;
    align-items: end;
    height: var(--tab-height);
    background: var(--bg-secondary);
    padding: 0 6px;
    gap: 1px;
    border-bottom: 1px solid var(--border-subtle);
}

.tab-list {
    display: flex;
    flex: 1;
    overflow-x: auto;
    gap: 1px;
    scrollbar-width: none;
    align-items: end;
}

.tab-list::-webkit-scrollbar {
    display: none;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border-radius: 7px 7px 0 0;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 450;
    letter-spacing: 0.005em;
    white-space: nowrap;
    max-width: 200px;
    min-width: 60px;
    cursor: default;
    position: relative;
    transition:
        background var(--duration-normal) var(--ease-in-out),
        color var(--duration-normal) var(--ease-in-out);
    animation: tab-open var(--duration-slow) var(--ease-out-expo) both;
}

@keyframes tab-open {
    from {
        max-width: 0;
        padding: 0;
        opacity: 0;
    }
    to {
        max-width: 200px;
        padding: 0 12px;
        opacity: 1;
    }
}

.tab-item.closing {
    animation: tab-close 200ms var(--ease-in-out) both;
    pointer-events: none;
}

@keyframes tab-close {
    from {
        max-width: 200px;
        padding: 0 12px;
        opacity: 1;
    }
    to {
        max-width: 0;
        padding: 0;
        opacity: 0;
    }
}

.tab-item.pinned {
    max-width: 40px;
    min-width: 36px;
    padding: 0 10px;
    justify-content: center;
}

.tab-item.pinned .tab-favicon,
.tab-item.pinned .tab-favicon-fallback {
    width: 14px;
    height: 14px;
}

.tab-item:hover {
    background: var(--surface-hover);
    color: var(--text-secondary);
}

.tab-item.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
}

.tab-item.group-blue,
.tab-group-chip.group-blue { --tab-group-color: #4b8dff; }
.tab-item.group-green,
.tab-group-chip.group-green { --tab-group-color: #45b36b; }
.tab-item.group-yellow,
.tab-group-chip.group-yellow { --tab-group-color: #d9b441; }
.tab-item.group-orange,
.tab-group-chip.group-orange { --tab-group-color: #df8742; }
.tab-item.group-red,
.tab-group-chip.group-red { --tab-group-color: #e35d6a; }
.tab-item.group-purple,
.tab-group-chip.group-purple { --tab-group-color: #9b73f0; }
.tab-item.group-gray,
.tab-group-chip.group-gray { --tab-group-color: #8b95a1; }

.tab-item[class*="group-"] {
    box-shadow: inset 0 2px 0 color-mix(in srgb, var(--tab-group-color) 78%, transparent);
}

.tab-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    max-width: 150px;
    margin-bottom: 3px;
    padding: 0 8px;
    border-radius: 6px;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--tab-group-color) 18%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--tab-group-color) 48%, transparent);
    flex-shrink: 0;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        transform var(--duration-fast) var(--ease-out-expo);
}

.tab-group-chip:hover {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--tab-group-color) 26%, var(--bg-secondary));
}

.tab-group-chip:active {
    transform: scale(0.96);
}

.tab-group-chip.collapsed {
    background: color-mix(in srgb, var(--tab-group-color) 12%, var(--bg-secondary));
}

.tab-group-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--tab-group-color);
    flex-shrink: 0;
}

.tab-group-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10.5px;
    font-weight: 600;
}

.tab-group-count {
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tab-group-color) 28%, transparent);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
}

/* Subtle top accent line on active tab */
.tab-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    height: 1.5px;
    background: var(--accent-primary);
    border-radius: 0 0 2px 2px;
    opacity: 0.6;
}

.tab-item.model-active {
    background: color-mix(in srgb, var(--accent-primary) 8%, transparent);
}

.tab-item.model-active:not(.active) {
    color: var(--text-secondary);
}

.tab-item.model-active.active {
    background: var(--bg-primary);
}

.tab-item.model-active.active::before {
    opacity: 1;
    background: var(--accent-primary);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent-primary) 40%, transparent);
}

.tab-favicon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border-radius: 3px;
}

.tab-favicon-fallback {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: hsl(var(--favicon-hue), 60%, 82%);
    background: hsl(var(--favicon-hue), 40%, 22%);
    letter-spacing: -0.02em;
}

.tab-agent-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--status-info);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-info) 45%, transparent);
    animation: tab-agent-pulse 1.4s ease-out infinite;
}

.tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.tab-close {
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    opacity: 0;
    flex-shrink: 0;
    transition:
        opacity var(--duration-normal) var(--ease-in-out),
        background var(--duration-fast) var(--ease-in-out);
    margin-right: -4px;
}

.tab-item:hover .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background: var(--surface-active);
    color: var(--text-primary);
}

.tab-audio {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-right: -2px;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        transform var(--duration-fast) var(--ease-out-expo);
}

.tab-audio:hover {
    background: var(--surface-active);
    color: var(--text-primary);
}

.tab-audio:active {
    transform: scale(0.9);
}

.tab-audio-pinned {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 14px;
    height: 14px;
    margin: 0;
    background: var(--bg-primary);
    box-shadow: 0 0 0 1px var(--border-subtle);
}

.tab-loading {
    width: 8px;
    height: 8px;
    border: 1.5px solid var(--accent-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

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

@keyframes tab-agent-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-info) 42%, transparent);
    }

    70% {
        box-shadow: 0 0 0 6px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.tab-new {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 2px;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        transform var(--duration-fast) var(--ease-out-back);
}

.tab-new:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: scale(1.08);
}

.tab-new:active {
    transform: scale(0.95);
}

.tab-new-private {
    color: var(--text-muted);
    opacity: 0.6;
    font-size: 11px;
}

.tab-new-private:hover {
    color: var(--accent-primary);
    opacity: 1;
}

.tab-actions {
    display: flex;
    align-items: end;
    gap: 1px;
    flex-shrink: 0;
    padding-bottom: 1px;
}

/* ═══════════════════════════════════════
   Address bar — refined URL shell
   ═══════════════════════════════════════ */

.address-bar {
    display: flex;
    align-items: center;
    height: var(--address-bar-height);
    padding: 0 8px;
    gap: 6px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-controls {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

.nav-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        transform var(--duration-fast) var(--ease-out-expo);
}

.nav-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.nav-btn-muted {
    opacity: 0.5;
    filter: grayscale(0.6);
}

.nav-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.nav-btn.active {
    color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.nav-btn.ai-btn {
    color: var(--accent-primary);
}

.nav-btn.ai-btn:hover {
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.url-shell {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: visible;
    position: relative;
    transition:
        border-color var(--duration-normal) var(--ease-in-out),
        box-shadow var(--duration-normal) var(--ease-in-out),
        background var(--duration-normal) var(--ease-in-out);
}

.url-shell:focus-within {
    border-color: color-mix(in srgb, var(--accent-primary) 50%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-primary) 10%, transparent);
    background: color-mix(in srgb, var(--bg-tertiary) 60%, transparent);
}

.url-form {
    flex: 1;
    display: flex;
    min-width: 0;
}

.url-input {
    width: 100%;
    height: 30px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 12.5px;
    letter-spacing: 0.01em;
    transition: color var(--duration-normal) var(--ease-in-out);
}

.url-input:focus {
    outline: none;
    color: var(--text-primary);
    box-shadow: none;
}

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

/* Autocomplete dropdown */

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 4px 12px var(--shadow-color-strong);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-in-out);
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--surface-hover);
}

.autocomplete-item.selected {
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.autocomplete-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
}

.autocomplete-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.autocomplete-title {
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-url {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.private-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    margin: 0 4px;
    background: color-mix(in srgb, var(--accent-primary) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, transparent);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.private-badge svg {
    opacity: 0.8;
}

.agent-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 6px 0 10px;
    min-width: 0;
    max-width: min(280px, 26vw);
    border-left: 1px solid var(--border-glass);
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        border-color var(--duration-normal) var(--ease-in-out),
        background var(--duration-normal) var(--ease-in-out),
        color var(--duration-slow) var(--ease-in-out);
}

.agent-status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.agent-status-dismiss {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    opacity: 0.72;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out),
        opacity var(--duration-fast) var(--ease-in-out);
}

.agent-status-dismiss:hover {
    background: color-mix(in srgb, var(--text-primary) 10%, transparent);
    color: var(--text-primary);
    opacity: 1;
}

/* Active — green: agent is actively using tools */
.agent-status-badge.active {
    border-left-color: color-mix(in srgb, var(--status-info) 18%, transparent);
    background: color-mix(in srgb, var(--status-info) 5%, transparent);
    color: var(--text-primary);
}

.agent-status-badge.active .agent-status-text {
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        var(--text-primary) 40%,
        var(--status-info) 50%,
        var(--text-primary) 60%,
        var(--text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: status-shimmer 3s ease-in-out infinite;
}

@keyframes status-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Recent — amber/yellow: MCP connected or recently active */
.agent-status-badge.recent {
    border-left-color: color-mix(in srgb, var(--status-warning) 14%, transparent);
    background: color-mix(in srgb, var(--status-warning) 3%, transparent);
    color: var(--text-secondary);
}

/* Idle — gray: no connection */
.agent-status-badge.idle {
    border-left-color: color-mix(in srgb, var(--text-muted) 10%, transparent);
}

.agent-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 50%, transparent);
    flex-shrink: 0;
    transition:
        background var(--duration-slow) var(--ease-in-out),
        box-shadow var(--duration-slow) var(--ease-in-out);
}

/* Green pulsing dot for active */
.agent-status-badge.active .agent-status-dot {
    background: var(--status-info);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-info) 32%, transparent);
    animation: agent-status-pulse-green 1.8s ease-out infinite;
}

/* Steady amber dot for recent/connected */
.agent-status-badge.recent .agent-status-dot {
    background: var(--status-warning);
}

.toolbar-actions {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

/* Sidebar button — approval notification badge */
.nav-btn-sidebar {
    position: relative;
}

.nav-btn-sidebar.has-approvals {
    color: var(--accent-warm);
    animation: approval-attention 2s ease-in-out infinite;
}

@keyframes approval-attention {
    0%, 100% { color: var(--accent-warm); }
    50% { color: var(--text-primary); }
}

.nav-btn-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--accent-warm);
    color: var(--bg-primary);
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    pointer-events: none;
    animation: badge-enter var(--duration-enter) var(--ease-out-back) both;
}

/* ═══════════════════════════════════════
   Bookmark toast notifications — animated
   ═══════════════════════════════════════ */

.bookmark-toast-stack {
    position: absolute;
    top: calc(32px + var(--tab-height) + var(--address-bar-height) + 14px);
    right: 14px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: min(340px, calc(100vw - 28px));
}

.bookmark-toast {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 22%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 4px 12px var(--shadow-color),
        0 16px 40px var(--shadow-color);
    backdrop-filter: blur(16px);
    animation: toast-enter var(--duration-enter) var(--ease-out-expo) both;
    pointer-events: auto;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bookmark-toast-leaving {
    animation: toast-exit 300ms var(--ease-in-out) both;
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.94);
    }
}

.bookmark-toast-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bookmark-toast-title {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.bookmark-toast-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: -3px -5px 0 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out);
}

.bookmark-toast-close:hover,
.bookmark-toast-close:focus-visible {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.bookmark-toast-message {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.45;
    word-break: break-word;
}

.highlight-toast {
    border-color: color-mix(in srgb, var(--accent-primary) 25%, transparent);
}

/* ═══════════════════════════════════════
   Download toast — progress & completion
   ═══════════════════════════════════════ */

.download-toast-stack {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: min(340px, calc(100vw - 28px));
}

.download-toast {
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--accent-secondary) 22%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 4px 12px var(--shadow-color),
        0 16px 40px var(--shadow-color);
    backdrop-filter: blur(16px);
    animation: toast-enter var(--duration-enter) var(--ease-out-expo) both;
}

.download-toast-leaving {
    animation: toast-exit 300ms var(--ease-in-out) both;
}

.download-toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-toast-filename {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.download-toast-done {
    color: var(--accent-secondary, #8aad6b);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.download-toast-failed {
    color: var(--status-error);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.download-toast-bar-track {
    margin-top: 8px;
    height: 3px;
    border-radius: 2px;
    background: var(--surface-hover);
    overflow: hidden;
}

.download-toast-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--accent-secondary, #8aad6b);
    transition: width 300ms var(--ease-in-out);
}

.download-toast-size {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
}

.download-toast-size-done {
    color: var(--accent-secondary, #8aad6b);
}

/* ═══════════════════════════════════════
   Flow progress — agent workflow steps
   ═══════════════════════════════════════ */

.flow-progress {
    position: absolute;
    right: 14px;
    bottom: 300px;
    width: min(320px, calc(100vw - 28px));
    z-index: 40;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 18%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 4px 12px var(--shadow-color),
        0 16px 40px var(--shadow-color);
    backdrop-filter: blur(16px);
    animation: toast-enter var(--duration-enter) var(--ease-out-expo) both;
}

.flow-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.flow-progress-goal {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.flow-progress-pct {
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.flow-progress-bar-track {
    height: 3px;
    border-radius: 2px;
    background: var(--surface-hover);
    overflow: hidden;
    margin-bottom: 10px;
}

.flow-progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--accent-primary);
    transition: width 400ms var(--ease-out-expo);
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    line-height: 1.4;
}

.flow-step-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
    opacity: 0.3;
}

.flow-step-label {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flow-step-pending .flow-step-dot {
    background: var(--text-muted);
    opacity: 0.3;
}

.flow-step-active .flow-step-dot {
    background: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 0 6px color-mix(in srgb, var(--accent-primary) 40%, transparent);
}

.flow-step-active .flow-step-label {
    color: var(--text-primary);
    font-weight: 500;
}

.flow-step-done .flow-step-dot {
    background: var(--accent-secondary, #8aad6b);
    opacity: 1;
}

.flow-step-done .flow-step-label {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--text-muted) 15%, transparent);
}

.flow-step-failed .flow-step-dot {
    background: var(--status-error);
    opacity: 1;
}

.flow-step-failed .flow-step-label {
    color: var(--status-error);
}

.flow-step-skipped .flow-step-dot {
    background: var(--text-muted);
    opacity: 0.3;
}

.flow-step-skipped .flow-step-label {
    color: var(--text-muted);
    opacity: 0.5;
}

.flow-progress-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════
   Agent transcript dock — floating panel
   ═══════════════════════════════════════ */

.agent-summary-hud {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 14%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 2px 8px var(--shadow-color),
        0 8px 24px var(--shadow-color);
    backdrop-filter: blur(16px);
    animation: toast-enter var(--duration-enter) var(--ease-out-expo) both;
    max-width: min(420px, calc(100vw - 28px));
}

.agent-summary-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 6px color-mix(in srgb, var(--accent-primary) 50%, transparent);
    animation: agent-transcript-live-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.agent-summary-text {
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-transcript-dock {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: min(360px, calc(100vw - 28px));
    max-height: min(280px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 14%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 4px 16px var(--shadow-color),
        0 20px 50px var(--shadow-color-strong);
    backdrop-filter: blur(20px);
    overflow: hidden;
    z-index: 40;
    animation: dock-enter var(--duration-enter) var(--ease-out-expo) both;
}

@keyframes dock-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.agent-transcript-dock.collapsed {
    max-height: none;
}

.agent-transcript-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-primary) 8%, transparent);
}

.agent-transcript-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.agent-transcript-title {
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.agent-transcript-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 11px;
}

.agent-transcript-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--status-info);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-info) 28%, transparent);
    animation: agent-status-pulse-green 1.8s ease-out infinite;
}

.agent-transcript-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.agent-transcript-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out);
}

.agent-transcript-icon:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.agent-transcript-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    overflow: auto;
    position: relative;
}

.agent-transcript-list.scroll-fade::before {
    background: linear-gradient(to bottom, color-mix(in srgb, var(--bg-secondary) 95%, transparent), transparent);
}

.agent-transcript-list.scroll-fade::after {
    background: linear-gradient(to top, color-mix(in srgb, var(--bg-primary) 95%, transparent), transparent);
}

.agent-transcript-entry {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--surface-glass);
    transition: border-color var(--duration-normal) var(--ease-in-out);
}

.agent-transcript-entry.thinking {
    border-color: color-mix(in srgb, var(--accent-primary) 14%, transparent);
    background: color-mix(in srgb, var(--accent-primary) 3%, transparent);
}

.agent-transcript-entry.message {
    border-color: color-mix(in srgb, var(--accent-secondary) 14%, transparent);
    background: color-mix(in srgb, var(--accent-secondary) 3%, transparent);
}

.agent-transcript-entry.status {
    border-color: color-mix(in srgb, var(--accent-warm) 16%, transparent);
    background: color-mix(in srgb, var(--accent-warm) 3%, transparent);
}

.agent-transcript-entry.streaming {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-primary) 6%, transparent);
    animation: entry-stream-glow 2s ease-in-out infinite;
}

@keyframes entry-stream-glow {
    0%, 100% {
        border-color: color-mix(in srgb, var(--accent-primary) 14%, transparent);
    }
    50% {
        border-color: color-mix(in srgb, var(--accent-primary) 28%, transparent);
    }
}

.agent-transcript-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.agent-transcript-badge {
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.agent-transcript-time {
    color: var(--text-muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.agent-transcript-text {
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes agent-status-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-primary) 32%, transparent);
    }

    70% {
        box-shadow: 0 0 0 5px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@keyframes agent-status-pulse-green {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-info) 36%, transparent);
    }

    70% {
        box-shadow: 0 0 0 5px transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* ═══════════════════════════════════════
   Page diff — "What Changed?" popup
   ═══════════════════════════════════════ */

.page-diff-popup {
    position: absolute;
    top: calc(32px + var(--tab-height) + var(--address-bar-height) + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 28px));
    max-height: min(420px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    border: 1px solid color-mix(in srgb, var(--accent-warm) 20%, transparent);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        var(--glass-gradient-start),
        var(--glass-gradient-end)
    );
    box-shadow:
        0 4px 12px var(--shadow-color),
        0 16px 40px var(--shadow-color);
    backdrop-filter: blur(16px);
    overflow-y: auto;
    z-index: 50;
    animation: page-diff-enter var(--duration-enter) var(--ease-out-expo) both;
}

@keyframes page-diff-enter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.page-diff-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--accent-warm) 10%, transparent);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.page-diff-popup-header-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.page-diff-burst-meta {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 500;
}

.page-diff-popup-close {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition:
        background var(--duration-fast) var(--ease-in-out),
        color var(--duration-fast) var(--ease-in-out);
}

.page-diff-popup-close:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.page-diff-burst-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--surface-glass);
}

.page-diff-burst-history-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-diff-burst-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    align-items: start;
    padding: 7px 8px;
    border-radius: var(--radius-md);
}

.page-diff-burst-row.latest {
    background: color-mix(in srgb, var(--accent-warm) 10%, transparent);
}

.page-diff-burst-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.page-diff-burst-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 11.5px;
    line-height: 1.4;
    word-break: break-word;
}

.page-diff-burst-summary-part {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-diff-burst-summary-section {
    align-self: flex-start;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-diff-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--border-glass);
}

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

.page-diff-item-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-diff-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.page-diff-kind,
.page-diff-section {
    align-self: flex-start;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.page-diff-kind {
    background: var(--surface-elevated);
    color: var(--text-secondary);
}

.page-diff-section {
    background: var(--surface-hover);
    color: var(--text-muted);
}

.page-diff-summary {
    color: var(--text-primary);
    font-size: 12.5px;
    line-height: 1.45;
    word-break: break-word;
}

.page-diff-snippets {
    display: grid;
    gap: 6px;
}

.page-diff-snippet {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    background: var(--surface-glass);
    border: 1px solid var(--border-glass);
}

.page-diff-snippet-label,
.page-diff-list-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-diff-snippet-text {
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.page-diff-list-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-diff-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.page-diff-list li + li {
    margin-top: 4px;
}

.page-diff-added .page-diff-section {
    background: var(--status-success-bg);
    color: var(--status-success);
}

.page-diff-removed .page-diff-section {
    background: var(--status-error-bg);
    color: var(--status-error);
}

.page-diff-changed .page-diff-section,
.page-diff-modified .page-diff-section {
    background: var(--status-warning-bg);
    color: var(--status-warning);
}

/* ═══════════════════════════════════════
   Security indicator
   ═══════════════════════════════════════ */

.security-indicator-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.security-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--status-muted-gray);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.security-indicator:hover {
    background: var(--surface-hover);
}

.security-indicator.secure {
    color: var(--status-success);
}

.security-indicator.insecure {
    color: var(--status-muted-gray);
}

.security-indicator.error {
    color: var(--status-error);
}

.security-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--surface-popup-bg);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 280px;
    z-index: 100;
    box-shadow: 0 4px 12px var(--shadow-color-strong);
}

.security-popup-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.security-popup-text {
    font-size: 12px;
    color: var(--text-popup);
    line-height: 1.5;
    margin: 0;
}

.security-popup-link {
    font-size: 12px;
    color: var(--status-info-blue);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    text-decoration: underline;
}

.security-popup-link:hover {
    color: var(--status-info-blue-hover);
}

.security-popup-section {
    border-top: 1px solid var(--border-glass);
    padding-top: 8px;
    margin-top: 2px;
}

.security-popup-section-title {
    font-size: 11px;
    color: var(--status-muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.security-popup-muted {
    color: var(--status-muted-gray);
    font-size: 12px;
    margin: 0;
}

.security-popup-permission-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 12px;
    color: var(--text-primary);
    margin: 4px 0;
}

.security-popup-permission-row strong.allow { color: var(--status-allow-green); }
.security-popup-permission-row strong.deny { color: var(--status-deny-red); }

.security-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.security-popup-action-proceed {
    font-size: 11px;
    color: var(--status-warning-amber);
    background: var(--status-warning-amber-bg);
    border: 1px solid var(--status-warning-amber-border);
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
}

.security-popup-action-proceed:hover {
    background: var(--status-warning-amber-hover-bg);
}

.security-popup-action-back {
    font-size: 11px;
    color: var(--status-muted-gray);
    background: var(--status-muted-gray-bg);
    border: 1px solid var(--status-muted-gray-border);
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
}

.security-popup-action-back:hover {
    background: var(--status-muted-gray-hover-bg);
}

.clear-data-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.clear-data-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-width: 380px;
    max-width: 440px;
    box-shadow: 0 8px 32px var(--shadow-color-strong);
}

.clear-data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.clear-data-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.clear-data-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-data-close:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.clear-data-range {
    margin-bottom: 16px;
}

.clear-data-range label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.clear-data-select {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    appearance: auto;
}

.clear-data-select:focus {
    border-color: var(--accent-primary);
}

.clear-data-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.clear-data-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.clear-data-check input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.clear-data-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.clear-data-error {
    margin: -4px 0 14px;
    font-size: 12px;
    color: var(--error);
}

.clear-data-cancel {
    padding: 7px 16px;
    font-size: 13px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.clear-data-cancel:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.clear-data-confirm {
    padding: 7px 16px;
    font-size: 13px;
    background: var(--error);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
}

.clear-data-confirm:hover:not(:disabled) {
    opacity: 0.9;
}

.clear-data-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.clear-data-done {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    font-size: 14px;
    color: var(--accent-secondary);
}

.downloads-panel {
    width: min(760px, calc(100vw - 48px));
    max-height: min(680px, calc(100vh - 48px));
    background: var(--bg-panel);
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.downloads-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.downloads-panel-header h2 { margin: 0 0 4px; font-size: 18px; }
.downloads-panel-header p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.downloads-panel-actions, .downloads-row-actions { display: flex; gap: 8px; }
.downloads-panel-actions button, .downloads-row-actions button {
    padding: 6px 10px;
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
}
.downloads-panel-actions button:hover, .downloads-row-actions button:hover:not(:disabled) { background: var(--bg-hover); }
.downloads-row-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.downloads-panel-list { overflow: auto; padding: 8px; }
.downloads-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}
.downloads-row:hover { background: var(--bg-elevated); border-color: var(--border-subtle); }
.downloads-file { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.downloads-file strong, .downloads-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.downloads-file span, .downloads-file small, .downloads-empty { color: var(--text-secondary); font-size: 12px; }
.downloads-empty { padding: 28px; text-align: center; }
