/* AxoCommand — Custom styles */
:root {
    /* v0.4.0 — dark theme ported from macbook_dashboard (macOS Tahoe inspired) */
    /* Surface palette */
    --bg-0: #0a0d14;
    --bg-1: #10141d;
    --bg-2: #171b26;
    --surface-glass: rgba(255, 255, 255, 0.06);
    --surface-glass-strong: rgba(255, 255, 255, 0.09);
    --surface-glass-hover: rgba(255, 255, 255, 0.11);
    --border-glass: rgba(255, 255, 255, 0.11);
    --border-glass-strong: rgba(255, 255, 255, 0.18);

    /* Semantic aliases (kept for backwards compat with existing CSS) */
    --content-bg: #0a0d14;
    --card-bg: #171b26;
    --sidebar-bg: #10141d;
    --sidebar-border: rgba(255, 255, 255, 0.08);

    /* Text */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.62);
    --text-tertiary: rgba(255, 255, 255, 0.38);

    /* Accents (blue-purple, macOS Tahoe) */
    --accent-primary: #0a84ff;
    --accent-secondary: #bf5af2;
    --accent-gradient: linear-gradient(135deg, #0a84ff 0%, #bf5af2 100%);
    --accent-glow: rgba(10, 132, 255, 0.35);

    /* Status colors */
    --success: #30d158;
    --warning: #ffd60a;
    --danger: #ff453a;

    /* Motion (from v0.3.0) */
    --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows for dark theme — heavier drop, subtle inset highlight */
    --shadow-tile: 0 4px 16px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-tile-hover: 0 12px 40px rgba(10, 132, 255, 0.28), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

* { box-sizing: border-box; }
html, html {
    background: var(--content-bg);
}

body {
    margin: 0; padding: 0; height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    background: transparent;
    position: relative;
}

/* v0.3.1 — Ambient aurora — strengthened alpha + html-canvas fix */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1200px 800px at 15% 20%, rgba(10, 132, 255, 0.28), transparent 50%),
        radial-gradient(1000px 700px at 85% 75%, rgba(191, 90, 242, 0.24), transparent 55%),
        radial-gradient(800px 600px at 50% 100%, rgba(48, 209, 88, 0.12), transparent 55%),
        linear-gradient(180deg, #0a0d14 0%, #060810 100%);
    animation: ambientDrift 32s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1);       filter: hue-rotate(0deg); }
    50%  { transform: translate3d(-1.5%, 1%, 0) scale(1.03); filter: hue-rotate(6deg); }
    100% { transform: translate3d(1.5%, -1%, 0) scale(1.02); filter: hue-rotate(-4deg); }
}
[x-cloak] { display: none !important; }

/* App shell layout */
.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* Sidebar (dark) */
.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 14px;
}
.sidebar-brand-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: white; font-size: 16px;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
}
.sidebar-brand-text {
    color: white; font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
}
.sidebar-brand-sub {
    color: rgba(255,255,255,0.5); font-size: 10px; margin-top: 2px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 2px;
    user-select: none;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.95);
}
.nav-item.active {
    background: rgba(255, 255, 255, 0.07);
    color: white;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 12px rgba(0, 0, 0, 0.3);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--accent-gradient);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(10, 132, 255, 0.6), 0 0 16px rgba(191, 90, 242, 0.35);
}
.nav-icon { font-size: 18px; flex-shrink: 0; width: 22px; text-align: center; }
.nav-badge {
    margin-left: auto; background: rgba(255,255,255,0.15);
    padding: 2px 7px; border-radius: 10px; font-size: 11px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.03);
    font-size: 13px;
}
.user-avatar {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
}

/* Content area (light) */
.content {
    padding: 24px 32px;
    overflow-x: hidden;
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.page-title { font-size: 22px; font-weight: 700; margin: 0; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin: 2px 0 0; }

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent-gradient);
}
.stat-value { font-size: 26px; font-weight: 700; margin: 4px 0 2px; }
.stat-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-hint { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
    cursor: pointer; border: 1px solid transparent; transition: all 0.15s ease;
    background: var(--surface-glass); color: var(--text-primary);
    border-color: var(--border-glass);
}
.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-glass-strong); }
.btn-primary {
    background: var(--accent-gradient); color: white; border: none;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3); }
.btn-danger {
    background: transparent; border-color: rgba(239, 68, 68, 0.3); color: var(--danger);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.08); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

/* Inputs */
.input, textarea.input, select.input {
    width: 100%;
    padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border-glass);
    font-size: 13px;
    background: var(--surface-glass);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}
.input:focus, textarea.input:focus, select.input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}
label.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }

/* Files browser */
.file-toolbar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent-primary); text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { text-decoration: underline; }

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.file-tile {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: transform 220ms var(--spring), box-shadow 220ms var(--ease-out), border-color 200ms var(--ease-out);
    position: relative;
    user-select: none;
    box-shadow: var(--shadow-tile);
}
.file-tile:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-tile-hover);
    transform: translateY(-3px) scale(1.015);
}
.file-thumb {
    width: 100%; aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 100%);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    font-size: 32px;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-name {
    font-size: 12px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 2px;
}
.file-meta { font-size: 11px; color: var(--text-secondary); }
.file-star {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.15s ease;
    font-size: 12px; cursor: pointer;
}
.file-tile:hover .file-star, .file-tile.starred .file-star { opacity: 1; }

/* Feed items */
.feed-item {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.feed-item:hover { border-color: var(--accent-primary); }
.feed-item.unread { border-left: 3px solid var(--accent-primary); }
.feed-item.read { opacity: 0.7; }
.feed-item-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.feed-item-meta { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.feed-item-source-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 10px;
    background: rgba(10, 132, 255, 0.1);
    color: var(--accent-primary);
    font-weight: 500;
}
.feed-item-summary { font-size: 13px; line-height: 1.5; color: var(--text-secondary); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Ops / services */
.service-row {
    display: grid;
    grid-template-columns: 40px 1fr auto auto auto;
    gap: 12px; align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 8px;
}
.status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--text-secondary);
}
.status-dot.up { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.down { background: var(--danger); }

/* Cortex graph placeholder */
.cortex-graph {
    background: linear-gradient(135deg, #1a0f2e 0%, #0f0a1e 100%);
    border-radius: 14px;
    padding: 32px;
    color: rgba(255,255,255,0.9);
    min-height: 400px;
    position: relative;
    overflow: hidden;
}
.cortex-search {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    width: 100%;
    font-size: 14px;
    outline: none;
}
.cortex-search:focus { border-color: var(--accent-primary); }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    max-width: 720px; width: 100%;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-modal);
    transform: scale(0.94);
    opacity: 0;
    animation: modalSpringIn 300ms var(--spring) forwards;
}

@keyframes modalSpringIn {
    to { transform: scale(1); opacity: 1; }
}
.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex; gap: 10px; justify-content: flex-end;
}

/* Preview modal special */
.preview-modal { max-width: 1100px; }
.preview-body {
    display: flex; align-items: center; justify-content: center;
    background: #0a0a1a;
    min-height: 500px;
    padding: 0;
}
.preview-body img, .preview-body video { max-width: 100%; max-height: 80vh; }
.preview-body audio { width: 90%; }
.preview-body iframe { width: 100%; height: 80vh; border: 0; }

/* Utilities */
.text-mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
    background: rgba(0,0,0,0.05);
}
.badge-accent { background: rgba(10, 132, 255, 0.12); color: var(--accent-primary); }
.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text-primary); }
.empty-state-hint { font-size: 13px; margin: 0; }

.loading-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(10, 132, 255, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: axo-spin 0.8s linear infinite;
}
@keyframes axo-spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--bg-2);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--accent-primary);
    padding: 12px 16px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    min-width: 280px; max-width: 400px;
    font-size: 13px;
    animation: slideIn 0.2s ease-out;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Notes */
.note-card {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 10px;
}
.note-card:hover { border-color: var(--accent-primary); }
.note-card.pinned { border-left: 3px solid var(--warning); }
.note-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.note-preview { font-size: 12px; color: var(--text-secondary); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.data-table th { font-weight: 600; color: var(--text-secondary); text-transform: uppercase; font-size: 11px; letter-spacing: 0.03em; }
.data-table tr:hover td { background: rgba(10, 132, 255, 0.03); }

/* Feed source pill */
.source-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 20px;
    background: rgba(0,0,0,0.04);
    font-size: 12px; cursor: pointer;
    transition: all 0.15s ease;
}
.source-pill:hover { background: rgba(10, 132, 255, 0.08); }
.source-pill.active { background: var(--accent-gradient); color: white; }


/* ============ DATASTORE ENHANCEMENTS (v0.2.0) ============ */

.file-drop-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 132, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 3px dashed rgba(10, 132, 255, 0.6);
    border-radius: 8px;
}
.file-drop-inner {
    background: rgba(23, 27, 38, 0.92);
    border: 2px solid rgba(10, 132, 255, 0.75);
    border-radius: 16px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.file-drop-icon {
    font-size: 64px;
    margin-bottom: 12px;
    animation: bounce 0.8s ease-in-out infinite alternate;
}
@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}
.file-drop-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}
.file-drop-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.file-upload-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 15, 30, 0.95);
    border: 1px solid rgba(10, 132, 255, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0a84ff, #bf5af2);
    border-radius: 4px;
    transition: width 0.2s ease;
    box-shadow: 0 0 12px rgba(10, 132, 255, 0.6);
}

.preview-details {
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 15, 30, 0.5);
}
.preview-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}
.preview-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* v0.3.2 drag-drop tile enhancements — DO NOT REMOVE */
.file-tile[draggable="true"] { cursor: grab; }
.file-tile.tile-dragging {
    opacity: 0.45;
    transform: scale(0.97);
    cursor: grabbing;
}
.file-tile.folder-drop-target {
    outline: 2px dashed rgba(10, 132, 255, 0.75);
    outline-offset: -3px;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.10), rgba(191, 90, 242, 0.10));
    transform: translateY(-3px) scale(1.025);
    box-shadow: 0 12px 32px -8px rgba(10, 132, 255, 0.35);
}
.file-tile.folder-drop-target .file-thumb {
    transform: scale(1.08);
}

/* v0.3.3 breadcrumb drop-target — DO NOT REMOVE */
.breadcrumb a {
    transition: background 0.2s var(--ease-out, ease-out), color 0.2s var(--ease-out, ease-out), transform 0.2s var(--ease-out, ease-out);
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.breadcrumb a.breadcrumb-drop-target {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.22), rgba(191, 90, 242, 0.22));
    color: rgba(255, 255, 255, 0.98);
    outline: 2px dashed rgba(10, 132, 255, 0.8);
    outline-offset: 1px;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px -2px rgba(10, 132, 255, 0.35);
}


/* ============================================================
 * v0.5.0: Smart Filter Row — cross-folder filtering UI
 * ============================================================ */
.smart-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.smart-filter-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-right: 4px;
    font-weight: 500;
}
.smart-pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.smart-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
}
.smart-pill.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}
.smart-pill-clear {
    margin-left: auto;
    color: rgba(255, 100, 100, 0.8);
    border-color: rgba(255, 100, 100, 0.25);
}
.smart-pill-clear:hover {
    background: rgba(255, 100, 100, 0.15);
    color: rgba(255, 140, 140, 1);
}
.smart-filter-status {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: auto;
}


/* v0.5.1: Trash button as drop target (soft-delete via drag) */
.trash-drop-target {
    transition: all 0.15s ease;
}
.trash-drop-target.trash-drop-hover {
    background: rgba(255, 69, 58, 0.18);
    border-color: rgba(255, 69, 58, 0.7);
    color: rgba(255, 140, 130, 1);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 69, 58, 0.5),
                0 0 24px rgba(255, 69, 58, 0.25);
}


/* v0.5.2: Restore button — macOS system green, positive/recovery action */
.btn-restore {
    background: rgba(48, 209, 88, 0.15);
    border: 1px solid rgba(48, 209, 88, 0.4);
    color: rgba(120, 240, 150, 0.95);
    transition: all 0.15s ease;
}
.btn-restore:hover {
    background: rgba(48, 209, 88, 0.25);
    border-color: rgba(48, 209, 88, 0.7);
    color: rgba(150, 255, 175, 1);
    box-shadow: 0 0 12px rgba(48, 209, 88, 0.35);
    transform: translateY(-1px);
}


/* v0.5.3: App dialog system — native <dialog> replacing browser confirm/prompt/alert */
.app-dialog {
    background: rgba(23, 27, 38, 0.95);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0;
    max-width: 480px;
    width: 90vw;
    /* v0.5.4: centering — native <dialog> UA styles apply position:fixed + inset:0;
       explicit margin:auto guarantees center regardless of UA quirks or transforms.
       Without this, some browsers render the dialog at top-left instead of centered. */
    margin: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6),
                0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    outline: none;
}
.app-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}
.app-dialog[open] {
    animation: appDialogIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.app-dialog[open]::backdrop {
    animation: appDialogBackdropIn 0.22s ease-out;
}
@keyframes appDialogIn {
    from { opacity: 0; transform: scale(0.95) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes appDialogBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.app-dialog-body {
    padding: 24px 24px 12px;
}
.app-dialog-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}
.app-dialog-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}
.app-dialog-body-content {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
    white-space: pre-line;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.app-dialog-input {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}
.app-dialog-input:focus {
    border-color: rgba(10, 132, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}
.app-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 20px 20px;
}
/* btn-primary is used by dialogs — ensure gradient hover feel */
.btn.btn-primary {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.35), rgba(191, 90, 242, 0.35));
    border: 1px solid rgba(10, 132, 255, 0.5);
    color: rgba(255, 255, 255, 1);
}
.btn.btn-primary:hover {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.5), rgba(191, 90, 242, 0.5));
    box-shadow: 0 0 12px rgba(10, 132, 255, 0.4);
    transform: translateY(-1px);
}


/* v0.6.0 — AxoCial federation action button (send-to-axocial) */
.btn-axocial {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(138, 114, 229, 0.15));
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #a0b0ff;
}
.btn-axocial:hover {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.25), rgba(138, 114, 229, 0.25));
    border-color: rgba(88, 101, 242, 0.7);
    color: #c8d3ff;
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
}
