/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 250px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

/* === Sidebar === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--bg-card);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bg-card);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-menu a.active {
    background: var(--accent);
    color: white;
}

.nav-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--bg-card);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* === Main Content === */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - var(--sidebar-width));
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-card.highlight {
    border-color: var(--success);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* === Project Grid === */
.projects-section,
.ideas-section,
.project-details {
    margin-bottom: 2rem;
}

.projects-section h2,
.ideas-section h2,
section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-grid,
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: block;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 1.5rem;
}

.project-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-idea {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.status-paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* === Buttons === */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #475569;
}

/* === Filters === */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--bg-card);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* === Forms === */
.add-form {
    margin-bottom: 1.5rem;
}

.add-form.hidden {
    display: none;
}

.form-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--bg-card);
}

.form-card h3 {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--bg-card);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* === Ideas Grid === */
.ideas-grid {
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 2px dashed var(--bg-card);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

.idea-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bg-card);
}

.idea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.idea-header h3 {
    font-size: 1.1rem;
}

.category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
}

.category-badge.tech {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.category-badge.service {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.category-badge.product {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.category-badge.passive {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.idea-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.idea-footer {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* === Templates === */
.idea-templates {
    margin-top: 2rem;
}

.template-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.template-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.template-card h4 {
    margin-bottom: 0.5rem;
}

.template-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.template-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* === Detail Cards === */
.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.detail-card h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-card);
    color: var(--text-secondary);
}

.tech-list li:last-child {
    border-bottom: none;
}

/* === Search Queries === */
.search-queries {
    margin-bottom: 2rem;
}

.query-list {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
}

.query-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bg-card);
}

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

.query-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.query-tag.hardware {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.query-tag.audio {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.query-tag.printer {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* === Recent Finds === */
.recent-finds {
    margin-bottom: 2rem;
}

.finds-table {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
}

.find-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--bg-card);
}

.find-row:last-child {
    border-bottom: none;
}

.find-row.header {
    background: var(--bg-card);
    font-weight: 600;
    font-size: 0.875rem;
}

.find-row .price {
    font-weight: 600;
    color: var(--success);
}

.find-row .score {
    font-weight: 600;
}

.find-row .score.high {
    color: var(--success);
}

.find-row a {
    color: var(--accent);
    text-decoration: none;
}

.find-row a:hover {
    text-decoration: underline;
}

/* === File Tree === */
.file-structure {
    margin-bottom: 2rem;
}

.file-tree {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* === Quick Links === */
.quick-links {
    margin-bottom: 2rem;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.link-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.link-card:hover {
    border-color: var(--accent);
}

.link-icon {
    font-size: 1.25rem;
}

/* === Activity Log === */
.connection-badge {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    font-size: 0.875rem;
    z-index: 1000;
    transition: all 0.3s;
}

.connection-badge.connected {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.connection-badge.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.activity-log-section {
    margin-bottom: 2rem;
}

.activity-log {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

.log-entry {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-card);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 70px;
}

.log-entry.success .log-message {
    color: var(--success);
}

.log-entry.warning .log-message {
    color: var(--warning);
}

.log-entry.error .log-message {
    color: var(--danger);
}

.log-entry.info .log-message {
    color: var(--text-secondary);
}

/* === Roadmap & Features === */
.feature-section,
.roadmap-section,
.tech-section,
.changelog-section {
    margin-bottom: 2rem;
}

.roadmap-phase {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.phase-badge {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.phase-header h3 {
    flex: 1;
    margin: 0;
}

.phase-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
}

.phase-status.in-progress {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.phase-status.planned {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.feature-item.done {
    border-color: rgba(16, 185, 129, 0.3);
    opacity: 0.8;
}

.feature-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.feature-info {
    flex: 1;
}

.feature-info h4 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.feature-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.feature-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.feature-status.done {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.feature-status.planned {
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* === Tech Stack === */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.tech-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.tech-card h4 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.tech-card ul {
    list-style: none;
}

.tech-card li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.tech-card li::before {
    content: "• ";
    color: var(--accent);
}

/* === Changelog === */
.changelog-list {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.changelog-entry {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-card);
}

.changelog-entry:last-child {
    border-bottom: none;
}

.changelog-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.changelog-version {
    background: var(--accent);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.changelog-entry ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.changelog-entry li {
    margin-bottom: 0.25rem;
}

/* === Project Editor === */
.projects-list {
    margin-bottom: 2rem;
}

.project-item {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.project-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-item-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-item-title h3 {
    margin: 0;
}

.project-priority {
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.project-priority.low {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.project-priority.medium {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.project-priority.high {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.project-priority.critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.project-status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
}

.project-status-badge.planning {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.project-status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.project-status-badge.paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.project-status-badge.completed {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.project-item-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.project-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-dates {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.project-dates .urgent {
    color: var(--danger);
    font-weight: 600;
}

.progress-bar {
    background: var(--bg-card);
    border-radius: 9999px;
    height: 8px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--accent), var(--success));
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s;
}

.progress-bar span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
}

/* === Modal === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-card);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--bg-card);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* === Project Detail === */
.project-detail-info {
    margin-bottom: 2rem;
}

.project-detail-meta {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.project-detail-meta span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.status-planning {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-completed {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.priority-low {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.priority-medium {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent);
}

.priority-high {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.priority-critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* === Tasks Section === */
.tasks-section,
.milestones-section,
.notes-section {
    margin-bottom: 2rem;
}

.tasks-header,
.milestones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tasks-header h3,
.milestones-header h3,
.notes-section h3 {
    margin: 0;
}

.task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.task-form input,
.task-form select {
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--bg-card);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.task-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-name {
    flex: 1;
}

.task-priority {
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.task-due {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-delete,
.milestone-delete {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
}

.task-delete:hover,
.milestone-delete:hover {
    opacity: 1;
}

.empty-tasks,
.empty-milestones {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

/* === Milestones === */
.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
}

.milestone-item.completed {
    opacity: 0.6;
}

.milestone-item.completed .milestone-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.milestone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.milestone-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* === Notes Section === */
.notes-section textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--bg-card);
    background: var(--bg-primary);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    resize: vertical;
}

/* === Form Row === */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* === Templates Section === */
.templates-section {
    margin-top: 2rem;
}

.template-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.template-tasks span {
    font-size: 0.7rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-secondary);
}

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
    }
    
    .content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .project-grid,
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .find-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .find-row.header {
        display: none;
    }
    
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .task-form {
        flex-direction: column;
    }
    
    .task-form input[type="text"] {
        width: 100%;
    }
}
