/* style.css */

/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #34495e;
}

/* Стили формы */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.task-controls select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn-primary, .btn-login {
    background-color: #1abc9c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.btn-primary:hover, .btn-login:hover {
    background-color: #16a085;
}

.error-message {
    color: #e74c3c;
    background-color: #fdd;
    border: 1px solid #e74c3c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Стили авторизации */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Стили Dashboard (index.php) */
.dashboard {
    display: flex;
    padding: 20px;
    gap: 20px;
}

.task-creation {
    flex: 0 0 300px; /* Фиксированная ширина для формы */
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.task-management {
    flex-grow: 1;
    display: flex;
    gap: 20px;
}

.task-list-container {
    flex: 0 0 300px; /* Список ожидания */
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.task-list {
    min-height: 100px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    background-color: #ecf0f1;
}

.task-item {
    background-color: #ffffff;
    border: 1px solid #bdc3c7;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.task-item h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #2980b9;
}

.task-item p {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #7f8c8d;
}

.task-controls {
    margin-top: 10px;
}

/* Стили Календаря */
.calendar-container {
    flex-grow: 1;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

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

.calendar-header {
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
}

.calendar-day {
    min-height: 100px;
    border: 1px solid #ccc;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.2s;
}

.calendar-day.ui-droppable-hover {
    background-color: #d0e8ff;
    border-color: #2980b9;
}

.calendar-day.today {
    border: 2px solid #e74c3c;
    background-color: #ffeaea;
}

.day-number {
    font-weight: bold;
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.calendar-day.empty {
    background-color: #ecf0f1;
    border: 1px solid #ecf0f1;
}

/* Стили Истории (history.php) */
.history-dashboard {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-filter, .history-results {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.history-filter form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.history-results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-results th, .history-results td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.history-results th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* jQuery UI Overrides for Sortable/Draggable */
.ui-sortable-placeholder {
    border: 1px dashed #e74c3c !important;
    background: #fbecec !important;
    height: 40px;
    margin-bottom: 8px;
    visibility: visible !important;
}

.ui-draggable-dragging {
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

