/* Базовые стили */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Заголовок */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header h1 a {
    background: linear-gradient(to right, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
    background-color: #f3f4f6;
}

/* Главная страница */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 0;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

/* Особенности */
.features {
    padding: 60px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Формы */
.form-container {
    max-width: 500px;
    margin: 2.5rem auto;
    background-color: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.form-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #ffe5e5;
    border-left: 4px solid var(--danger-color);
    color: #c0392b;
}

.alert-success {
    background-color: #e7f9e7;
    border-left: 4px solid var(--success-color);
    color: #27ae60;
}

/* Панель управления */
.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.sidebar {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    color: var(--primary-color);
    background-color: #f3f4f6;
}

.sidebar-menu a i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sidebar-menu a:hover i {
    opacity: 1;
}

.content {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.content-header h2 {
    font-size: 1.5rem;
}

/* Статистика */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card p {
    color: #777;
}

/* Таблица задач */
.tasks-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1.5rem;
}

.tasks-table th, .tasks-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.tasks-table th {
    background-color: #f9fafb;
    font-weight: 600;
}

.tasks-table tr:hover {
    background-color: #f9fafb;
}

.table-actions {
    display: flex;
    gap: 5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background-color: #dcfce7;
    color: #166534;
}

.badge-high {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-low {
    background-color: #f3f4f6;
    color: #374151;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
}

/* Подвал */
footer {
    background-color: #fff;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #777;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 30px 0;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-bottom: 1.5rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .tasks-table {
        display: block;
        overflow-x: auto;
    }
}

/* Прогресс бар */
.progress {
    height: 1.5rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--info-color));
    color: white;
    text-align: center;
    line-height: 1.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: width 0.5s ease;
}

/* API токен */
.api-token {
    background-color: #f5f7fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.api-token code {
    font-family: monospace;
    font-size: 0.9rem;
}

/* Утилиты */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--success-color); }