/* FlowState DAW Development Hub - Styles */

:root {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --accent: #06B6D4;
    --accent-hover: #22D3EE;
    --accent-hot: #F43F5E;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --border: #334155;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

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

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.nav-links li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-links li a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-links li a.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-left-color: var(--accent);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content */
.content {
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 1400px;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

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

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Sections */
section {
    margin-bottom: 2.5rem;
}

section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Progress Overview */
.progress-overview {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.progress-bar-container {
    background: var(--bg-tertiary);
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 12px;
    transition: width 0.5s ease;
}

.progress-stats {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Phase Progress */
.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

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

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

.phase-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.phase-weeks {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.phase-progress-bar {
    background: var(--bg-tertiary);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.phase-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.phase-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.stack-category {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stack-category h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.stack-category ul {
    list-style: none;
}

.stack-category li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: inherit;
}

.action-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.action-card.danger:hover {
    border-color: var(--danger);
}

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

.action-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Research Grid */
.research-intro {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

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

.research-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.research-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Checklists */
.checklist {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.checklist-header {
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.checklist-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-progress {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.checklist-items {
    padding: 0.5rem 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.checklist-item:hover {
    background: var(--bg-tertiary);
}

.checklist-item input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
}

.checklist-item input[type="checkbox"]:checked {
    background: var(--success);
    border-color: var(--success);
}

.checklist-item input[type="checkbox"]:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checklist-item.completed .item-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.item-content {
    flex: 1;
}

.item-text {
    font-size: 0.9rem;
}

.item-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Content Pages */
.content-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.content-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
}

.content-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

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

.content-section ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Code Blocks */
pre {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin: 1rem 0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
}

td {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

tr:hover td {
    background: rgba(6, 182, 212, 0.05);
}

/* Diagrams */
.diagram {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: pre;
    margin: 1rem 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 101;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 0.75rem;
        cursor: pointer;
        color: var(--text-primary);
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
    }

    .action-card {
        display: none;
    }
}
