/* TaskFlow Foundation Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.user-info {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

/* Auth Container */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-container h1 {
    margin-bottom: 0.5rem;
    text-align: center;
    color: #2c3e50;
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Forms */
.auth-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.btn-primary {
    width: 100%;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #34495e;
}

.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-footer p {
    color: #666;
}

.auth-footer a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
}

.dashboard-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: #666;
}

.placeholder-message {
    background: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.placeholder-message .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-message h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.placeholder-message p {
    color: #666;
    margin-bottom: 1rem;
}

.placeholder-message ul {
    text-align: left;
    max-width: 400px;
    margin: 1.5rem auto;
    padding-left: 1.5rem;
}

.placeholder-message ul li {
    margin-bottom: 0.5rem;
    color: #555;
}

.placeholder-message .note {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    margin-top: 1.5rem;
    color: #555;
    font-style: italic;
}

/* Text Center (for error pages) */
.text-center {
    text-align: center;
    margin-top: 1rem;
}

.text-center a {
    color: #3498db;
}

/* Navigation Links */
.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: white;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card-todo { border-left: 4px solid #95a5a6; }
.stat-card-progress { border-left: 4px solid #3498db; }
.stat-card-blocked { border-left: 4px solid #e74c3c; }
.stat-card-done { border-left: 4px solid #2ecc71; }

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: #666;
    font-size: 0.85rem;
    display: block;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

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

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
    text-align: center;
}

.action-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.action-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.action-description {
    font-size: 0.9rem;
    color: #666;
}

/* Recent Projects */
.recent-projects {
    display: grid;
    gap: 1rem;
}

.recent-project-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.recent-project-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.recent-project-card h3 a:hover {
    color: #3498db;
}

.recent-project-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.project-meta {
    font-size: 0.85rem;
    color: #999;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #2c3e50;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background: #34495e;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

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

.project-header h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.project-header h3 a:hover {
    color: #3498db;
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-stats {
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
}

.stat-todo .stat-value { color: #95a5a6; }
.stat-progress .stat-value { color: #3498db; }
.stat-blocked .stat-value { color: #e74c3c; }
.stat-done .stat-value { color: #2ecc71; }

.project-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.project-date {
    font-size: 0.85rem;
    color: #999;
}

/* Form Container */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-container h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.task-metadata {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.task-metadata p {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Project View & Board View */
.project-view, .board-view {
    max-width: 100%;
}

.project-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #666;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
}

/* Task Board */
.task-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.task-column {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    min-height: 400px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.column-header-todo { border-color: #95a5a6; }
.column-header-progress { border-color: #3498db; }
.column-header-blocked { border-color: #e74c3c; }
.column-header-done { border-color: #2ecc71; }

.column-header h3 {
    color: #2c3e50;
    font-size: 1rem;
}

.task-count {
    background: rgba(0,0,0,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

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

.task-card {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 3px solid #3498db;
    transition: all 0.2s ease;
    cursor: pointer;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.task-card-blocked {
    border-left-color: #e74c3c;
    background: #fff5f5;
}

.task-card-done {
    opacity: 0.7;
    border-left-color: #2ecc71;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.task-header h4 {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
}

.task-header h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.task-header h4 a:hover {
    color: #3498db;
}

.task-priority {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-weight: bold;
}

.priority-1, .priority-2 {
    background: #e74c3c;
    color: white;
}

.priority-3 {
    background: #f39c12;
    color: white;
}

.priority-4, .priority-5 {
    background: #95a5a6;
    color: white;
}

.task-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blocker-reason {
    background: #fee;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #e74c3c;
}

.task-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-status, .btn-delete {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-status-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.btn-delete-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

.btn-status {
    background: #3498db;
    color: white;
}

.btn-status:hover {
    background: #2980b9;
}

.btn-status-blocked {
    background: #e74c3c;
}

.btn-status-blocked:hover {
    background: #c0392b;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.task-completed {
    font-size: 0.75rem;
    color: #2ecc71;
    font-weight: 500;
}

.empty-column {
    text-align: center;
    color: #999;
    padding: 2rem 1rem;
    font-style: italic;
}

/* Empty State */
.empty-state {
    background: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.empty-state h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Board View Header */
.board-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.board-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.board-subtitle {
    color: #666;
    font-size: 0.95rem;
}

/* Board Filters */
.board-filters {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.2s ease;
}

.filter-group select:hover {
    border-color: #3498db;
}

.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Swimlane Header */
.swimlane-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swimlane-header h2 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Task Project Badge */
.task-project-badge {
    margin: 0.5rem 0;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
}

.task-project-badge a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.task-project-badge a:hover {
    text-decoration: underline;
}

/* Responsive Design */
/* Tablet (2 columns) */
@media (max-width: 1024px) {
    .task-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (1 column) */
@media (max-width: 768px) {
    .task-board {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .page-header .btn {
        align-self: flex-end;
    }

    .project-header, .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .board-filters {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
        min-width: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Notification Badge */
.notification-link {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
}

.notification-count {
    background: #f56565;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* AI Insights Badge */
.ai-insights-badge {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe8cc 100%);
    color: #f57c00;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    border: 1px solid #ffcc80;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
