/* Основные стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Стили заголовка */
.header {
    background-color: #0275d8;
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Стили для карточек задач */
.task {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.task:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-weight: bold;
    font-size: 18px;
    color: #0275d8;
}

.task-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.task-status.on {
    background-color: #d4edda;
    color: #155724;
}

.task-status.off {
    background-color: #f8d7da;
    color: #721c24;
}

/* Стили для форм */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #0275d8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2, 117, 216, 0.25);
}

/* Стили кнопок */
.btn-group {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: #0275d8;
    color: white;
}

.btn-primary:hover {
    background-color: #0267bf;
}

.btn-danger {
    background-color: #d9534f;
    color: white;
}

.btn-danger:hover {
    background-color: #c9302c;
}

.btn-success {
    background-color: #5cb85c;
    color: white;
}

.btn-success:hover {
    background-color: #4cae4c;
}

/* Плавающая кнопка добавления задачи */
.add-task-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0275d8;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.add-task-btn:hover {
    transform: scale(1.1);
    background-color: #0267bf;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 500px;
    max-width: 90%;
    margin: 100px auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Вкладки в форме */
.form-tabs {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #0275d8;
}

.tab-btn.active {
    color: #0275d8;
    border-bottom-color: #0275d8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Информация об организации */
.organization-info {
    margin-bottom: 15px;
    padding: 5px 0;
    font-size: 16px;
    color: #0275d8;
}

/* API информация */
.api-info {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.api-info summary {
    cursor: pointer;
    color: #555;
    font-weight: bold;
}

.api-details {
    padding: 10px;
    margin-top: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.api-details div {
    margin-bottom: 5px;
}

/* Адаптивность */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .modal-content {
        width: 90%;
        margin: 50px auto;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 8px 5px;
        font-size: 14px;
    }
}

/* Состояние загрузки */
.loading {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* Анимация для загрузки */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fadeIn {
    animation: fadeIn 0.5s ease;
}
