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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --warning-bg: #fef3c7;
    --warning-border: #f59e0b;
    --card-bg: #ffffff;
    --hover-bg: #f1f5f9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* === Экран входа === */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    padding: 20px;
    z-index: 1000;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.5s ease-in;
}

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

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    font-size: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    color: #dc2626;
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

/* === Основная панель === */
.main-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Шапка */
.header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-small {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info span {
    color: var(--text-color);
    font-weight: 500;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

/* Объявление */
.announcement {
    background: var(--warning-bg);
    border: 2px solid var(--warning-border);
    border-radius: 12px;
    padding: 20px 32px;
    margin: 24px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.announcement-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.announcement-text {
    font-size: 1rem;
    line-height: 1.6;
}

.announcement-text strong {
    color: #92400e;
    display: block;
    margin-bottom: 4px;
}

/* Контент */
.content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    padding: 24px 32px;
    gap: 24px;
}

/* Боковая панель */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--hover-bg);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-icon {
    font-size: 1.2rem;
}

/* Основной контент */
.main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    margin-bottom: 24px;
    color: var(--text-color);
    font-size: 1.8rem;
}

/* Плейсхолдеры контента */
.placeholder-content {
    color: #64748b;
    padding: 20px;
}

/* Календарь */
.calendar-widget {
    max-width: 600px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.calendar-nav {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: var(--secondary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 6px;
    color: var(--text-color);
}

/* Доска */
.board-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.board-column {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
}

.board-column h3 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.board-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Задачи */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.task-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Проекты */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Документация */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-item {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Идеи */
.idea-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idea-form textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.idea-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.idea-form button {
    align-self: flex-start;
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.idea-form button:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.idea-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
        padding: 16px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .announcement {
        margin: 16px;
        padding: 16px;
    }
    
    .board-columns {
        grid-template-columns: 1fr;
    }
}
