/* Task Manager v2.0 - Modern Dark Theme */

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #10b981;
    --accent-tertiary: #8b5cf6;
    --status-success: #10b981;
    --status-warning: #f59e0b;
    --status-danger: #ef4444;
    --status-info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --border: 1px solid rgba(148, 163, 184, 0.1);
}

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

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;
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--bg-secondary);
    border-bottom: var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-brand a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-link.admin-link {
    color: var(--accent-tertiary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.user-link:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(59, 130, 246, 0.1));
    padding: 1.5rem;
    border-bottom: var(--border);
}

.card-body {
    padding: 1.5rem;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-success {
    background: var(--status-success);
}

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

.btn-warning {
    background: var(--status-warning);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

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

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

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

/* ========== ALERTS ========== */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--status-success);
    border-color: var(--status-success);
}

.alert-danger, .alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-danger);
    border-color: var(--status-danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--status-warning);
    border-color: var(--status-warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========== PROJECT GRID ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: var(--border);
    border-left: 4px solid var(--accent-secondary);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-card .meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* ========== KANBAN BOARD ========== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    overflow-x: auto;
}

.kanban-column {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: var(--border);
    min-width: 280px;
}

.kanban-column-header {
    padding: 1rem 1.5rem;
    border-bottom: var(--border);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-header .count {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.kanban-column-content {
    padding: 1rem;
    min-height: 400px;
}

.kanban-task {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.kanban-task:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.kanban-task:active {
    cursor: grabbing;
}

.kanban-task h4 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.kanban-task .task-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--status-success); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--status-warning); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--status-danger); }
.badge-info { background: rgba(59, 130, 246, 0.2); color: var(--accent-primary); }
.badge-purple { background: rgba(139, 92, 246, 0.2); color: var(--accent-tertiary); }

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

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: var(--border);
    border-left: 4px solid var(--accent-primary);
    text-align: center;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-card .label {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ========== TABLES ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: var(--border);
}

.table th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* ========== FILE GRID ========== */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.file-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-card:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.file-card .file-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.file-card .file-name {
    font-size: 0.9rem;
    word-break: break-word;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-secondary);
    border-top: var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-tertiary);
    margin-top: 3rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== ADMIN PANEL ========== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    background: var(--bg-primary);
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: var(--border);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.admin-sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.admin-sidebar-menu li a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar-menu li a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.admin-sidebar-menu li a.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-content h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

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

.admin-stat-card {
    background: var(--bg-secondary);
    border: var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.admin-stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.admin-stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box input {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
}

/* ========== UTILITY ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-muted { color: var(--text-tertiary); }
.text-center { text-align: center; }
