* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #48bb78;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-small {
    padding: 5px 15px;
    font-size: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h3 {
    color: #333;
    font-size: 18px;
}

.delete-btn {
    background: #f56565;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c53030;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background: #667eea;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.add-task-form {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.add-task-form input,
.add-task-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.add-task-form textarea {
    resize: vertical;
    min-height: 60px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f7fafc;
    border-radius: 5px;
    transition: background 0.2s;
}

.task-item:hover {
    background: #edf2f7;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #a0aec0;
}

.task-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.task-content input[type="checkbox"] {
    margin-top: 5px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-details {
    flex: 1;
}

.task-title {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 5px;
}

.task-description {
    font-size: 14px;
    color: #718096;
}

.empty-message {
    text-align: center;
    color: #a0aec0;
    padding: 40px;
}

/* Страницы авторизации */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.auth-container .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.auth-container p {
    text-align: center;
    margin-top: 20px;
    color: #718096;
}

.auth-container a {
    color: #667eea;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Страница настроек */
.settings-page {
    max-width: 800px;
    margin: 0 auto;
}

.settings-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.settings-container h2 {
    color: #667eea;
    margin-bottom: 30px;
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.status-box {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-inactive {
    background: #fed7d7;
    color: #742a2a;
}

.status-box code {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.help-text {
    color: #718096;
    margin-bottom: 15px;
}

small {
    display: block;
    color: #a0aec0;
    margin-top: 5px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-danger {
    background: #f56565;
}

.btn-danger:hover {
    background: #c53030;
}

.notifications-list {
    margin-bottom: 20px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f7fafc;
    border-radius: 5px;
    margin-bottom: 8px;
}

.notification-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-text {
    color: #2d3748;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e0;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: #48bb78;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.add-notification {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.add-notification input,
.add-notification select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.add-notification input {
    width: 150px;
}

.delete-btn-small {
    background: none;
    border: none;
    color: #f56565;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.delete-btn-small:hover {
    color: #c53030;
}

/* Дедлайны в задачах */
.task-deadline {
    font-size: 13px;
    margin-top: 5px;
    color: #718096;
}

.task-deadline.deadline-soon {
    color: #d69e2e;
    font-weight: 500;
}

.task-deadline.deadline-urgent {
    color: #e53e3e;
    font-weight: 600;
}

.task-deadline.deadline-overdue {
    color: #e53e3e;
    font-weight: 600;
}

.task-item.deadline-urgent {
    border-left: 4px solid #e53e3e;
}

.task-item.deadline-soon {
    border-left: 4px solid #d69e2e;
}

.task-item.deadline-overdue {
    border-left: 4px solid #9b2c2c;
    background: #fff5f5;
}

.task-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 1;
}

#new-task-deadline {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}