/**
 * SEO Checklist Dashboard Styles
 */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

/* Container */
.seo-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-meta {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
    flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #4f46e5;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8fafc;
}

.filter-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* Phase Cards */
.phase-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.phase-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.phase-header:hover {
    background: #f1f5f9;
}

.phase-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.phase-badge {
    background: #4f46e5;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.phase-title {
    font-size: 18px;
    font-weight: 600;
}

.phase-count {
    font-size: 13px;
    color: #64748b;
}

.phase-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.phase-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.phase-progress-bar {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
    width: 0%;
}

.phase-content {
    display: none;
}

.phase-content.show {
    display: block;
}

/* Task Rows */
.task-row {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.task-row:hover {
    background: #f8fafc;
}

.task-row.completed {
    background: #f0fdf4;
    opacity: 0.85;
}

.task-checkbox-col {
    padding-top: 2px;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
}

.task-content-col {
    flex: 1;
}

.task-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.task-title {
    font-weight: 600;
    font-size: 15px;
}

.task-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.task-time, .task-day, .task-day-month {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}

.task-priority {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.priority-critical {
    background: #fef2f2;
    color: #dc2626;
}

.priority-high {
    background: #fffbeb;
    color: #d97706;
}

.priority-medium {
    background: #eff6ff;
    color: #2563eb;
}

.task-hours {
    font-size: 12px;
    color: #64748b;
}

/* Status Badges */
.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.status-badge.done {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.in-progress {
    background: #fed7aa;
    color: #9a3412;
}

.status-badge.pending {
    background: #e2e8f0;
    color: #475569;
}

/* Expand QA Button */
.expand-qa {
    background: none;
    border: 1px solid #e2e8f0;
    color: #4f46e5;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 10px;
    border-radius: 20px;
    transition: all 0.2s;
}

.expand-qa:hover {
    background: #e2e8f0;
}

/* QA Panel */
.qa-panel {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.qa-header {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.qa-goal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.qa-goal:last-child {
    border-bottom: none;
}

.qa-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    transition: all 0.2s;
}

.qa-status.pending {
    background: #e2e8f0;
    color: #475569;
}

.qa-status.passed {
    background: #d1fae5;
    color: #065f46;
}

.qa-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.qa-status:hover {
    opacity: 0.8;
}

.qa-text {
    flex: 1;
}

.qa-title {
    font-size: 13px;
    font-weight: 500;
}

.qa-criteria {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* Loading & Empty States */
.empty-state {
    text-align: center;
    padding: 48px;
    color: #64748b;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.dashboard-footer {
    text-align: center;
    padding: 24px;
    color: #64748b;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 32px;
}

.dashboard-footer a {
    color: #4f46e5;
    text-decoration: none;
}

.dashboard-footer a:hover {
    text-decoration: underline;
}

/* Toast */
.custom-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.custom-toast.show {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .seo-dashboard-container {
        padding: 12px;
    }
    
    .task-row {
        flex-direction: column;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .phase-header-left {
        flex-direction: column;
        align-items: flex-start;
    }
}








* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-meta {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
    flex-wrap: wrap;
}

.user-badge {
    background: #6366f1;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #6366f1;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Phase Sections */
.phase {
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.phase-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.phase-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.phase-badge {
    background: #6366f1;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.phase-description {
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
    margin-left: 28px;
}

.phase-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.phase-progress-bar {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
    width: 0%;
}

.phase-content {
    display: block;
}

.phase-content.collapsed {
    display: none;
}

/* Task Row */
.task-row {
    display: grid;
    grid-template-columns: 40px 1fr auto 100px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.task-row:hover {
    background: #f8fafc;
}

.task-row.completed {
    background: #f0fdf4;
    opacity: 0.8;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #10b981;
}

.task-title {
    font-weight: 500;
    font-size: 15px;
}

.task-description {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-time,
.task-day,
.task-day-month {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: #64748b;
}

.task-priority {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.priority-critical {
    background: #fef2f2;
    color: #dc2626;
}

.priority-high {
    background: #fffbeb;
    color: #d97706;
}

.priority-medium {
    background: #eff6ff;
    color: #2563eb;
}

.task-hours {
    color: #64748b;
    font-size: 13px;
    text-align: right;
}

/* QA Goals */
.qa-goals {
    grid-column: 2 / -1;
    margin-top: 8px;
    margin-left: 40px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    display: none;
}

.task-row.expanded .qa-goals {
    display: block;
}

.qa-goal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.qa-goal:last-child {
    border-bottom: none;
}

.qa-status {
    width: 80px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

.qa-status.pending {
    background: #e2e8f0;
    color: #64748b;
}

.qa-status.passed {
    background: #d1fae5;
    color: #065f46;
}

.qa-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.qa-text {
    flex: 1;
    font-size: 13px;
}

.qa-criteria {
    font-size: 11px;
    color: #64748b;
}

.expand-icon {
    cursor: pointer;
    color: #6366f1;
    font-size: 12px;
    margin-left: 8px;
}

/* Loading & Empty States */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: #64748b;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: #64748b;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 32px;
}

.footer a {
    color: #6366f1;
    text-decoration: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .task-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .task-meta {
        flex-wrap: wrap;
    }
}





/* Additional styles for MySQL version */
.user-badge {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

#reminderStatus {
    font-size: 12px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.sync-indicator {
    font-size: 11px;
    color: var(--gray);
    margin-left: 10px;
}

.sync-indicator.synced {
    color: var(--success);
}

.sync-indicator.error {
    color: var(--danger);
}

.task-assignee {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Preference panel */
.pref-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.pref-panel h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

.pref-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.pref-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}















/* Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    padding: 20px;
}
.container { max-width: 1200px; margin: 0 auto; }

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}
.header h1 { font-size: 28px; margin-bottom: 10px; }
.header-meta { display: flex; gap: 24px; color: #64748b; font-size: 14px; flex-wrap: wrap; }
.user-badge {
    background: #4f46e5;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.stat-number { font-size: 32px; font-weight: 800; color: #4f46e5; }
.stat-label { font-size: 12px; color: #64748b; margin-top: 4px; }

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
}
.filter-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* Phase Cards */
.phase-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.phase-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}
.phase-title { font-size: 18px; font-weight: 600; }
.phase-badge {
    background: #4f46e5;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 10px;
}
.phase-count { font-size: 13px; color: #64748b; margin-left: 10px; }
.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 10px;
}
.progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 2px;
    width: 0%;
}
.phase-content { display: none; }
.phase-content.show { display: block; }

/* Task Items */
.task-item {
    display: flex;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
}
.task-item:hover { background: #f8fafc; }
.task-item.completed { background: #f0fdf4; opacity: 0.8; }
.priority-critical { border-left: 3px solid #ef4444; }
.priority-high { border-left: 3px solid #f59e0b; }

.task-checkbox { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; }
.task-content { flex: 1; }
.task-title { font-weight: 600; font-size: 15px; }
.task-desc { font-size: 13px; color: #64748b; margin-top: 4px; }
.task-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.meta-badge {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}
.task-hours { font-size: 13px; color: #64748b; min-width: 60px; text-align: right; }

.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}
.status-badge.done { background: #d1fae5; color: #065f46; }
.status-badge.in-progress { background: #fed7aa; color: #9a3412; }
.status-badge.pending { background: #e2e8f0; color: #475569; }

/* States */
.loading { text-align: center; padding: 40px; color: #64748b; }
.error { text-align: center; padding: 40px; color: #ef4444; }
.empty-state { text-align: center; padding: 40px; color: #64748b; }

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}
.footer a { color: #4f46e5; text-decoration: none; }

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    display: none;
    z-index: 1000;
}
.toast.error { background: #ef4444; }

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 700px) {
    .task-item { flex-direction: column; }
    .task-hours { text-align: left; }
}


/**
 * SEO Checklist Dashboard Styles
 * Complete Version - Includes all new features
 */

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

/* ============================================
   CONTAINER & HEADER
   ============================================ */

.seo-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.header-meta {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
    flex-wrap: wrap;
}

/* ============================================
   STATS BAR
   ============================================ */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #4f46e5;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FILTERS
   ============================================ */

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* ============================================
   PHASE CARDS
   ============================================ */

.phase-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.phase-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.phase-header:hover {
    background: #f1f5f9;
}

.phase-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.phase-badge {
    background: #4f46e5;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.phase-title {
    font-size: 18px;
    font-weight: 600;
}

.phase-count {
    font-size: 13px;
    color: #64748b;
}

.phase-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.phase-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.phase-progress-bar {
    height: 100%;
    background: #10b981;
    transition: width 0.3s ease;
    width: 0%;
}

.phase-content {
    display: none;
}

.phase-content.show {
    display: block;
}

/* ============================================
   TASK CARD
   ============================================ */

.task-card {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
    transition: background 0.2s;
}

.task-card:hover {
    background: #f8fafc;
}

.task-card.completed {
    background: #f0fdf4;
    opacity: 0.85;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.task-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-priority-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.task-priority-badge.critical {
    background: #fef2f2;
    color: #dc2626;
}

.task-priority-badge.high {
    background: #fffbeb;
    color: #d97706;
}

.task-priority-badge.medium {
    background: #eff6ff;
    color: #2563eb;
}

.task-title {
    font-weight: 600;
    font-size: 15px;
}

.task-description {
    font-size: 13px;
    color: #64748b;
    margin: 8px 0;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.start-btn {
    background: #10b981;
    color: white;
}

.start-btn:hover {
    background: #059669;
}

.pause-btn {
    background: #f59e0b;
    color: white;
}

.pause-btn:hover {
    background: #d97706;
}

.complete-btn {
    background: #4f46e5;
    color: white;
}

.complete-btn:hover {
    background: #4338ca;
}

.reopen-btn {
    background: #64748b;
    color: white;
}

.reopen-btn:hover {
    background: #475569;
}

.comment-toggle {
    background: #e2e8f0;
    color: #1e293b;
}

.comment-toggle:hover {
    background: #cbd5e1;
}

/* ============================================
   TASK META
   ============================================ */

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 10px 0 0 0;
}

.task-time, .task-day, .task-day-month {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}

.task-hours {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #475569;
}

/* ============================================
   STATUS BADGES
   ============================================ */

.status-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.status-badge.done {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.in-progress {
    background: #fed7aa;
    color: #9a3412;
}

.status-badge.pending {
    background: #e2e8f0;
    color: #475569;
}

/* ============================================
   SUB-TASKS (CHECKLIST)
   ============================================ */

.subtasks-section {
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.subtasks-header {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subtask-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
}

.subtask-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #10b981;
}

.subtask-text {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.4;
}

.subtask-text.checked {
    text-decoration: line-through;
    color: #64748b;
}

.subtask-meta {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 8px;
}

/* ============================================
   NOTE PREVIEW
   ============================================ */

.note-preview {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.note-icon {
    font-size: 14px;
}

.note-text {
    flex: 1;
    color: #78350f;
}

.note-meta {
    font-size: 10px;
    color: #92400e;
}

/* ============================================
   COMMENT SECTION
   ============================================ */

.comment-section {
    margin-top: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.comment-item {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
}

.comment-header strong {
    color: #1e293b;
}

.comment-time {
    font-size: 10px;
    color: #94a3b8;
}

.comment-body {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    word-wrap: break-word;
}

.comment-loading, .comment-empty, .comment-error {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
}

.comment-error {
    color: #ef4444;
}

.comment-input-area {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.comment-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.comment-submit {
    padding: 8px 20px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-submit:hover {
    background: #4338ca;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER
   ============================================ */

.dashboard-footer {
    text-align: center;
    padding: 24px;
    color: #64748b;
    font-size: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 32px;
}

.dashboard-footer a {
    color: #4f46e5;
    text-decoration: none;
    cursor: pointer;
}

.dashboard-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.custom-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.custom-toast.show {
    display: block;
}

.custom-toast.success {
    background: #10b981;
    color: white;
}

.custom-toast.error {
    background: #ef4444;
    color: white;
}

.custom-toast.info {
    background: #3b82f6;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .seo-dashboard-container {
        padding: 12px;
    }
    
    .dashboard-header {
        padding: 16px 20px;
    }
    
    .dashboard-header h1 {
        font-size: 22px;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .task-card {
        padding: 16px;
    }
    
    .task-card-header {
        flex-direction: column;
    }
    
    .task-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .phase-header {
        padding: 12px 16px;
    }
    
    .phase-title {
        font-size: 16px;
    }
    
    .subtask-item {
        flex-wrap: wrap;
    }
    
    .subtask-meta {
        margin-left: 30px;
    }
    
    .comment-input-area {
        flex-direction: column;
    }
    
    .comment-submit {
        width: 100%;
    }
    
    .header-meta {
        gap: 12px;
        font-size: 11px;
    }
    
    .filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .task-actions,
    .comment-section,
    .filters,
    .dashboard-footer a,
    .action-btn,
    .comment-toggle,
    .comment-submit {
        display: none !important;
    }
    
    .phase-content {
        display: block !important;
    }
    
    .task-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .stats-bar {
        break-inside: avoid;
    }
}

/* ============================================
   SCROLLBAR STYLING (Webkit)
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}