@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #5051f9;
    --primary-hover: #4041e8;
    --success-color: #00d9a5;
    --warning-color: #ffc043;
    --danger-color: #ff5c7c;
    --info-color: #4da6ff;
    --purple-color: #a162f7;
    
    --bg-primary: #f8f9fd;
    --bg-secondary: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

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

.nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(80, 81, 249, 0.3);
}

.main {
    padding: 32px 0;
    min-height: calc(100vh - 200px);
}

.filters-panel {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.filters-panel h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.filter-input:hover,
.filter-select:hover {
    border-color: var(--text-tertiary);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(80, 81, 249, 0.1);
    background-color: white;
}

.filter-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235051f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.filter-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

.tasks-section {
    background: transparent;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasks-list {
    display: grid;
    gap: 16px;
}

.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.task-card.completed {
    opacity: 0.7;
    background: linear-gradient(135deg, rgba(0, 217, 165, 0.03), rgba(0, 217, 165, 0.08));
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.task-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.task-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.task-name a:hover {
    color: var(--primary-color);
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: rgba(77, 166, 255, 0.1);
    color: var(--info-color);
}

.status-completed {
    background: rgba(0, 217, 165, 0.1);
    color: var(--success-color);
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item strong {
    color: var(--text-tertiary);
    font-weight: 600;
}

.task-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.date-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-activity {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.activity-type {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.activity-task {
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-weight: 500;
}

.activity-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.pagination-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 24px 0;
    margin-top: 48px;
}

.footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-tertiary);
}

.breadcrumb {
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-hover);
}

.task-detail {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.task-detail-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    padding: 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.info-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.task-notes {
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-top: 16px;
    border: 1px solid var(--border-light);
}

.task-notes strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.task-history {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.history-timeline {
    position: relative;
    padding-left: 32px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.history-item {
    position: relative;
    margin-bottom: 24px;
}

.history-marker {
    position: absolute;
    left: -25px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--border-color);
}

.history-content {
    background: var(--bg-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.history-content:hover {
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-type {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.history-date {
    color: var(--text-tertiary);
    font-size: 12px;
}

.history-field {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.history-field strong {
    color: var(--text-primary);
}

.history-change {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.change-old,
.change-new {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.change-old {
    background: rgba(255, 92, 124, 0.1);
    color: var(--danger-color);
}

.change-new {
    background: rgba(0, 217, 165, 0.1);
    color: var(--success-color);
}

.change-arrow {
    color: var(--text-tertiary);
}

.history-values {
    margin-top: 8px;
    font-size: 13px;
}

.history-values code {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card,
.stat-card,
.activity-item {
    animation: slideUp 0.3s ease-out;
}
