/* ===== Color Scheme ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-main) 0%, #1a1f36 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Header ===== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.last-updated {
    margin-top: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Navigation Tabs ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 12px;
    overflow-x: auto;
}

.tab-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--primary);
    color: white;
}

.tab-icon {
    font-size: 1.2rem;
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    gap: 20px;
}

/* ===== Quick Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-card.critical .stat-number { color: var(--danger); }
.stat-card.warning .stat-number { color: var(--warning); }
.stat-card.success .stat-number { color: var(--success); }

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Action List ===== */
.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.action-item:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

.action-item.critical { border-left-color: var(--danger); }
.action-item.high { border-left-color: var(--warning); }

.action-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.action-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.action-link {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.action-link:hover {
    background: var(--primary-dark);
}

/* ===== Trends ===== */
.trends-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trend-item {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
}

.trend-label {
    font-weight: 600;
}

.trend-values {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.trend-indicator {
    font-size: 1.5rem;
}

.trend-indicator.improving { color: var(--success); }
.trend-indicator.worsening { color: var(--danger); }
.trend-indicator.stable { color: var(--text-secondary); }

/* ===== Filters ===== */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 10px 15px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Status Filter Panel ===== */
.status-filter-wrapper {
    position: relative;
    flex: 0 0 200px;
}

.status-filter-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.status-filter-btn:hover {
    border-color: var(--primary);
}

.filter-arrow {
    margin-left: 8px;
    font-size: 0.8rem;
}

.status-filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 5px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 10px 40px var(--shadow);
    max-height: 400px;
    overflow-y: auto;
}

.status-filter-header {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.filter-action-btn {
    flex: 1;
    padding: 6px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.filter-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.status-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.status-checkbox:hover {
    background: var(--bg-hover);
}

.status-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.status-checkbox span {
    flex: 1;
    font-size: 0.9rem;
    user-select: none;
}

/* ===== Multi-Select Filter Dropdowns ===== */
.filter-dropdown {
    position: relative;
    flex: 0 0 200px;
}

.filter-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-button:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 5px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 10px 40px var(--shadow);
    max-height: 400px;
    overflow-y: auto;
}

.filter-panel-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.panel-action-btn {
    flex: 1;
    padding: 6px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.panel-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
}

.tickets-table thead {
    background: var(--bg-main);
}

.tickets-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

.tickets-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.tickets-table tbody tr {
    transition: background 0.2s ease;
}

.tickets-table tbody tr:hover {
    background: var(--bg-hover);
}

.ticket-key {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.ticket-key:hover {
    text-decoration: underline;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge.backlog { background: #475569; }
.badge.in-progress { background: var(--info); }
.badge.blocked { background: var(--danger); }
.badge.under-review { background: var(--warning); }
.badge.in-review { background: var(--warning); }
.badge.testing { background: #8b5cf6; }
.badge.ready-for-deployment { background: #10b981; }
.badge.done { background: var(--success); }
.badge.closed { background: #6b7280; }

.badge.highest { background: var(--danger); }
.badge.high { background: var(--warning); }
.badge.medium { background: var(--info); }
.badge.low { background: #6b7280; }

.table-footer {
    margin-top: 15px;
    padding: 10px;
    background: var(--bg-main);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== Project Health ===== */
.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.health-card {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid var(--success);
}

.health-card.warning { border-top-color: var(--warning); }
.health-card.critical { border-top-color: var(--danger); }

.health-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.health-project {
    font-size: 1.2rem;
    font-weight: 600;
}

.health-score {
    font-size: 2rem;
    font-weight: bold;
}

.health-metrics {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
}

.health-metric {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

/* ===== Team Workload ===== */
.workload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.workload-card {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--success);
    transition: all 0.3s ease;
}

.workload-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--primary);
}

.workload-card.overloaded { border-left-color: var(--danger); }
.workload-card.busy { border-left-color: var(--warning); }

.workload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.workload-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.workload-status {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--success);
}

.workload-card.overloaded .workload-status { background: var(--danger); }
.workload-card.busy .workload-status { background: var(--warning); }

.workload-stats {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
}

.workload-stat {
    display: flex;
    justify-content: space-between;
}

/* ===== Buttons ===== */
.btn-refresh {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== Loading States ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-cell {
    text-align: center;
    padding: 40px !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .tabs {
        overflow-x: auto;
    }

    .filters {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .tickets-table {
        font-size: 0.85rem;
    }

    .tickets-table th,
    .tickets-table td {
        padding: 8px;
    }
}

/* ===== Risk List ===== */
.risk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-item {
    background: var(--bg-main);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--warning);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.risk-item.critical { border-left-color: var(--danger); }

.risk-info {
    flex: 1;
}

.risk-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.risk-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}
/* ===== Project Selector (Feature 1) ===== */
.project-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-btn {
    background: var(--bg-main);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.project-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.project-details {
    background: var(--bg-main);
    padding: 20px;
    border-radius: 8px;
}

.project-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.project-stat {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-stat.clickable-stat {
    cursor: pointer;
}

.project-stat.clickable-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--primary);
}

.project-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.project-stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== Velocity Chart (Feature 2) ===== */
.chart-container {
    padding: 20px 0;
}

.velocity-bars {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    height: 250px;
    margin-bottom: 20px;
    padding: 30px 10px 10px;
    background: var(--bg-main);
    border-radius: 8px;
}

.velocity-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
    height: 100%;
}

.velocity-bar-dual {
    display: flex;
    gap: 4px;
    width: 100%;
    align-items: flex-end;
    height: 200px; /* Fixed height for bar container */
}

.velocity-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 60px;
}

.bar-visual {
    width: 100%;
    min-height: 5px; /* Reduced from 20px to allow smaller bars */
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bar-updated {
    background: linear-gradient(180deg, var(--info), #2563eb);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.bar-completed {
    background: linear-gradient(180deg, var(--success), #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.bar-visual:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.bar-updated:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.bar-completed:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
    white-space: nowrap;
}

.bar-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    padding: 2px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.status-time-card {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.status-time-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.status-time-value {
    font-size: 1.5rem;
    color: var(--primary);
}

.status-time-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== Performance Grid (Feature 3) ===== */
.performance-grid {
    display: grid;
    gap: 15px;
}

.performance-card {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--success);
}

.performance-card.warning { border-left-color: var(--warning); }
.performance-card.danger { border-left-color: var(--danger); }

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.performance-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.performance-rate {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--success);
}

.performance-card.warning .performance-rate { color: var(--warning); }
.performance-card.danger .performance-rate { color: var(--danger); }

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    font-size: 0.85rem;
}

.performance-metric {
    display: flex;
    flex-direction: column;
}

.performance-metric-label {
    color: var(--text-secondary);
}

.performance-metric-value {
    font-weight: 600;
    font-size: 1rem;
}

/* ===== Alerts Container (Feature 4) ===== */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    background: var(--bg-main);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--info);
    display: flex;
    gap: 15px;
    align-items: start;
    transition: all 0.3s ease;
}

.alert-item:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

.alert-item.warning { border-left-color: var(--warning); }
.alert-item.critical { border-left-color: var(--danger); }

.alert-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 5px;
}

.alert-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.alert-message {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.alert-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.alert-link {
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.alert-link:hover {
    background: var(--primary-dark);
}

/* ===== Timeline Container (Feature 5) ===== */
.timeline-container {
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding: 15px;
    padding-left: 40px;
    margin-bottom: 15px;
    background: var(--bg-main);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
}

.timeline-item.overdue {
    border-left-color: var(--danger);
}

.timeline-item.overdue::before {
    background: var(--danger);
}

.timeline-item.due-soon {
    border-left-color: var(--warning);
}

.timeline-item.due-soon::before {
    background: var(--warning);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.timeline-title {
    font-weight: 600;
    font-size: 1rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.timeline-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.timeline-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.timeline-link:hover {
    text-decoration: underline;
}

/* ===== Memory Intelligence (Feature 7) ===== */
.patterns-list,
.preferences-list,
.decisions-list,
.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pattern-item,
.preference-item,
.decision-item,
.reminder-item {
    background: var(--bg-main);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.pattern-item { border-left-color: #8b5cf6; }
.preference-item { border-left-color: var(--info); }
.decision-item { border-left-color: var(--warning); }
.reminder-item { border-left-color: var(--danger); }

.item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.confidence-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--bg-card);
}

.confidence-high { background: var(--success); color: white; }
.confidence-medium { background: var(--warning); }
.confidence-low { background: var(--text-secondary); }

/* ===== Save Filter Preset (Feature 8) ===== */
.filter-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.preset-btn {
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--text-primary);
}

.preset-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-export {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-export:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ===== Sync Button & Status ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sync-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sync-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.sync-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sync-status {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sync-status.syncing {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.sync-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.sync-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}