/* ================================================ */
/* TODO APP - ОСНОВНЫЕ СТИЛИ (style.css)           */
/* ================================================ */

/* ============ ОБЩИЕ СТИЛИ ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: #000;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============ НАВИГАЦИЯ ============ */
.navbar {
    background-color: #000;
    color: #fff;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    color: #D2B48C;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links span {
    color: #D2B48C;
    font-weight: bold;
    margin-right: 1rem;
    padding: 0.3rem 0.8rem;
    background-color: rgba(255, 102, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 102, 0, 0.3);
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #D2B48C;
}

/* ============ ФЛЕШ-СООБЩЕНИЯ ============ */
.flash-messages {
    margin-bottom: 1rem;
}

.flash-message {
    padding: 1rem;
    background-color: #D2B48C;
    color: #000;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* ============ КНОПКИ ============ */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #D2B48C;
    color: #000;
}

.btn-primary:hover {
    background-color: #e65c00;
}

.btn-secondary {
    background-color: #666;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
    border: none;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: #fff;
    border: none;
}

.btn-info:hover {
    background-color: #138496;
    color: #fff;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ============ ФОРМЫ АВТОРИЗАЦИИ ============ */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    border-bottom: 3px solid #D2B48C;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
    color: #000;
    font-size: 2rem;
    font-weight: bold;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #000;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #D2B48C;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.auth-container .btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: bold;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.auth-links a {
    color: #D2B48C;
    text-decoration: none;
    margin: 0 0.5rem;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ============ ОБЩИЕ ФОРМЫ ============ */
.form-page {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-page h2 {
    border-bottom: 3px solid #D2B48C;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-align: center;
    color: #000;
    font-size: 1.8rem;
    font-weight: bold;
}

.project-form,
.task-form {
    margin-top: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.form-row input,
.form-row textarea {
    flex: 1;
    min-width: 300px;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s;
    resize: vertical;
    min-height: 46px;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #D2B48C;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 150px;
    padding: 0.8rem 1.5rem;
    text-align: center;
}

/* ================================================ */
/* СТИЛИ ДЛЯ СТРАНИЦЫ ПРОЕКТОВ (projects.html)     */
/* ================================================ */

.projects-page {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Welcome секция */
.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-content h1 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    min-width: 100px;
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.stat-active {
    background: rgba(76, 175, 80, 0.3);
}

.stat-warning {
    background: rgba(255, 152, 0, 0.3);
}

.stat-success {
    background: rgba(33, 150, 243, 0.3);
}

/* Управление проектами */
.projects-controls {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.page-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.projects-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    font-size: 0.9rem;
}

.filter-select {
    padding: 6px 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    color: #333;
    font-size: 0.85rem;
    min-width: 150px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #D2B48C;
}

#reset-filters {
    margin-left: auto;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Таблица проектов */
.projects-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projects-table thead {
    background-color: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.projects-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.85rem;
}

.projects-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.projects-table tbody tr:hover {
    background-color: #f8fafc !important;
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

/* Строки таблицы с разными статусами */
.project-row {
    transition: all 0.2s ease;
}

.project-overdue {
    background-color: #fff5f5;
}

.project-active {
    background-color: white;
}

.project-completed {
    background-color: #f0f9ff;
    opacity: 0.9;
}

.project-no-tasks {
    background-color: #f8f9fa;
}

/* Ячейки таблицы */
.project-title .title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-icon {
    font-size: 1rem;
}

.title-text {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.description-content {
    color: #666;
    line-height: 1.4;
    font-size: 0.9rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-date {
    color: #6c757d;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* Статусы проектов */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 100px;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-overdue {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-active {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.status-no-tasks {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.overdue-count {
    font-size: 0.7rem;
    background-color: #dc3545;
    color: white;
    padding: 1px 4px;
    border-radius: 8px;
    margin-left: 4px;
}

/* Задачи в проектах */
.tasks-count-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tasks-icon {
    font-size: 0.9rem;
}

.tasks-number {
    font-weight: 600;
    color: #333;
    min-width: 20px;
    font-size: 0.9rem;
}

.overdue-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: bold;
}

/* Прогресс проекта */
.project-progress {
    min-width: 120px;
}

.tasks-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    min-width: 30px;
    text-align: right;
}

.progress-details {
    font-size: 0.7rem;
    color: #6c757d;
    text-align: center;
}

/* Действия с проектами */
.action-buttons {
    display: flex;
    gap: 5px;
    min-width: 100px;
}

.action-buttons .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    min-width: 32px;
    height: 32px;
}

.action-icon {
    font-size: 0.85rem;
}

/* Информация о таблице */
.table-info {
    padding: 10px 15px;
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

/* ================================================ */
/* СТИЛИ ДЛЯ ДЕТАЛЬНОЙ СТРАНИЦЫ ПРОЕКТА (project_detail.html) */
/* ================================================ */

.project-detail {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 1.5rem;
}

.project-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D2B48C, transparent);
    border-radius: 1px;
}

.project-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-title-section h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.project-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-header-actions .btn {
    min-width: 140px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-description {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Форма добавления задачи */
.add-task-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-task-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2rem;
}

.task-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.task-title-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.task-description-input {
    flex: 2;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-height: 40px;
    resize: vertical;
}

.time-fields {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Канбан-доска */
.kanban-board {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.kanban-column {
    flex: 1;
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    min-height: 400px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.column-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.task-count {
    background: #e5e7eb;
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.column-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 300px;
}

/* Карточка задачи */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.task-card.task-overdue {
    border-left: 4px solid #dc3545;
    background-color: #fff5f5;
}

.task-card.task-critical {
    border-left: 4px solid #fd7e14;
    background-color: #fff9db;
}

.task-card.task-warning {
    border-left: 4px solid #ffc107;
    background-color: #fff9db;
}

.task-card.task-completed {
    border-left: 4px solid #28a745;
    background-color: #f0f9ff;
    opacity: 0.9;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
}

.task-actions-header {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #333;
}

.task-time-info {
    margin-bottom: 10px;
}

.task-deadline,
.task-notification {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.deadline-label,
.notification-label {
    color: #6c757d;
    white-space: nowrap;
}

.deadline-date,
.notification-date {
    color: #333;
    font-weight: 500;
}

.notification-pending {
    color: #fd7e14;
    font-size: 0.7rem;
    font-style: italic;
}

.notification-sent {
    color: #28a745;
    font-size: 0.7rem;
    font-style: italic;
}

.deadline-indicator {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.deadline-indicator.overdue {
    background-color: #dc3545;
    color: white;
}

.deadline-indicator.critical {
    background-color: #fd7e14;
    color: white;
}

.deadline-indicator.warning {
    background-color: #ffc107;
    color: #333;
}

.deadline-indicator.normal {
    background-color: #e5e7eb;
    color: #4b5563;
}

.task-description-preview {
    margin-bottom: 10px;
}

.task-description-preview small {
    color: #6c757d;
    font-size: 0.8rem;
}

.task-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.task-actions form {
    flex: 1;
    min-width: 80px;
}

.task-actions .btn-sm {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-start {
    background-color: #28a745;
    color: white;
}

.btn-start:hover {
    background-color: #218838;
    color: white;
}

/* ================================================ */
/* СТИЛИ ДЛЯ СТРАНИЦЫ ПРОФИЛЯ (profile.html)       */
/* ================================================ */

.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.profile-container h2 {
    border-bottom: 3px solid #D2B48C;
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
    color: #000;
    font-size: 2rem;
    font-weight: bold;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.profile-section {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #D2B48C;
}

.profile-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.3rem;
}

.profile-form .form-group {
    margin-bottom: 1.2rem;
}

.profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.profile-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.profile-form input:focus {
    outline: none;
    border-color: #D2B48C;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.profile-form input[readonly] {
    background-color: #e9ecef;
    color: #666;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.notification-settings {
    margin-bottom: 1.5rem;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.notification-description {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.9rem;
}

.profile-form .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
}

/* ================================================ */
/* СТИЛИ ДЛЯ СТРАНИЦЫ ЗАДАЧИ (task_detail.html)    */
/* ================================================ */

.task-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.task-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.task-detail-header h2 {
    color: #333;
    font-size: 2rem;
    margin: 0;
}

.task-detail-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.task-project {
    font-weight: bold;
    color: #D2B48C;
    background-color: rgba(255, 102, 0, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.task-content h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.task-description {
    margin-top: 1.5rem;
}

.task-description h4 {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.task-description p {
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.no-description {
    color: #999;
    font-style: italic;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.task-detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.task-detail-actions .btn {
    min-width: 140px;
}

/* ================================================ */
/* СТИЛИ ДЛЯ ВРЕМЕНИ ЗАДАЧ (общие для всех страниц) */
/* ================================================ */

.task-time-fields {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #D2B48C;
}

.task-time-fields h4 {
    color: #D2B48C;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
    font-size: 1.1rem;
    font-weight: 600;
}

.time-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.time-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-field-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-field-group .field-icon {
    font-size: 1.1rem;
}

.time-field-group input[type="datetime-local"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Arial', sans-serif;
    background-color: white;
    transition: border-color 0.3s;
}

.time-field-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #D2B48C;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.time-field-hint {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e8f5e9;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.time-field-hint p {
    color: #155724;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.time-field-hint ul {
    margin-left: 1.5rem;
    color: #155724;
    font-size: 0.85rem;
}

.time-field-hint li {
    margin-bottom: 0.3rem;
}

.hint-text {
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.3rem;
    display: block;
}

/* Текущий статус задачи */
.task-current-status {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.task-current-status p {
    margin-bottom: 0.5rem;
    color: #856404;
    font-size: 0.9rem;
}

.status-display {
    margin-bottom: 1rem;
}

.status-text {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 1rem;
}

.status-new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-in-progress {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.deadline-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 6px;
}

.deadline-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 5px;
}

.deadline-status-overdue {
    background-color: #fde8e8;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.deadline-status-critical {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
    animation: pulse 2s infinite;
}

.deadline-status-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.deadline-status-normal {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

/* Индикаторы уведомлений */
.task-notification-indicators {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.task-notification-indicator {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: #f3f4f6;
    cursor: help;
}

.task-notification-indicator.pending {
    background-color: #fef3c7;
    color: #d97706;
    animation: blink 1.5s infinite;
}

.task-notification-indicator.sent {
    background-color: #d1fae5;
    color: #065f46;
}

/* ================================================ */
/* СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ (admin_users.html)       */
/* ================================================ */

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.admin-container h2 {
    border-bottom: 3px solid #D2B48C;
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: #000;
    font-size: 2rem;
    font-weight: bold;
}

.users-list {
    margin-top: 2rem;
}

.user-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.user-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-inactive {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.user-info h4 {
    color: #D2B48C;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.user-meta {
    color: #666;
    font-size: 0.9rem;
}

.admin-badge {
    color: #D2B48C;
    font-weight: bold;
    background-color: rgba(255, 102, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.inactive-badge {
    color: #dc3545;
    font-weight: bold;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.user-actions form {
    margin: 0;
}

.user-actions .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 120px;
    text-align: center;
}

.btn-disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.change-password-form {
    max-width: 500px;
    margin: 0 auto;
}

.change-password-form .form-group {
    margin-bottom: 1.5rem;
}

.change-password-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #000;
}

.change-password-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.change-password-form input:focus {
    outline: none;
    border-color: #D2B48C;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* ================================================ */
/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА (base.html)           */
/* ================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    border: 2px solid #D2B48C;
}

.modal-header {
    background-color: #000;
    color: #D2B48C;
    padding: 1.5rem;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    color: #D2B48C;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 2rem;
    color: #000;
    font-size: 1.1rem;
    line-height: 1.5;
    text-align: center;
}

.modal-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* ================================================ */
/* УТИЛИТЫ И АНИМАЦИИ                              */
/* ================================================ */

.text-muted {
    color: #adb5bd !important;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.delete-form {
    display: inline;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ================================================ */
/* АДАПТИВНОСТЬ (общая для всех страниц)           */
/* ================================================ */

@media (max-width: 1200px) {
    .projects-page {
        padding: 10px;
    }
    
    .kanban-board {
        gap: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-title-input,
    .task-description-input {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .projects-table {
        display: block;
        overflow-x: auto;
    }
    
    .projects-table th,
    .projects-table td {
        white-space: nowrap;
        min-width: 100px;
        font-size: 0.85rem;
    }
    
    .status-badge {
        min-width: 80px;
        font-size: 0.75rem;
    }
    
    .description-content {
        max-width: 150px;
    }
    
    .kanban-board {
        flex-direction: column;
        gap: 20px;
    }
    
    .kanban-column {
        min-height: auto;
    }
    
    .time-fields {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links span {
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row input,
    .form-row textarea {
        min-width: 100%;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        margin-bottom: 10px;
    }
    
    .page-header h2 {
        font-size: 1.1rem;
    }
    
    .projects-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .filter-select {
        width: 100%;
        min-width: auto;
    }
    
    #reset-filters {
        margin-left: 0;
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .progress-details {
        display: none;
    }
    
    .project-detail {
        padding: 10px;
    }
    
    .project-header {
        padding: 15px;
    }
    
    .project-title-section {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .project-header-actions {
        justify-content: flex-start;
    }
    
    .add-task-section {
        padding: 15px;
    }
    
    .column-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .task-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .task-actions-header {
        align-self: flex-end;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .task-actions form {
        width: 100%;
    }
    
    .task-deadline,
    .task-notification {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .deadline-indicator {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .modal-body {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .task-detail-actions {
        flex-direction: column;
    }
    
    .task-detail-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .user-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .user-actions .btn-sm {
        width: 100%;
        min-width: auto;
    }
    
    .time-fields-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .task-time-fields {
        padding: 1rem;
    }
    
    .profile-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .profile-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-container,
    .form-page {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .projects-page {
        padding: 8px;
    }
    
    .welcome-section {
        padding: 15px;
    }
    
    .welcome-content h1 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .welcome-stats {
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px 10px;
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .projects-table th,
    .projects-table td {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .status-badge {
        padding: 3px 6px;
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .status-text {
        font-size: 0.7rem;
    }
    
    .status-icon {
        font-size: 0.75rem;
    }
    
    .tasks-count-display {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
    
    .overdue-badge {
        font-size: 0.6rem;
        padding: 1px 3px;
    }
    
    .action-buttons .action-btn {
        min-width: 28px;
        height: 28px;
        padding: 3px 6px;
    }
    
    .description-content {
        max-width: 100px;
        -webkit-line-clamp: 1;
    }
    
    .project-title-section h2 {
        font-size: 1.3rem;
    }
    
    .add-task-section h3 {
        font-size: 1.1rem;
    }
    
    .kanban-column {
        padding: 10px;
    }
    
    .task-card {
        padding: 10px;
    }
    
    .task-header h4 {
        font-size: 0.95rem;
    }
}

/* ================================================ */
/* МОБИЛЬНАЯ АДАПТАЦИЯ - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ      */
/* ================================================ */

/* Улучшение тач-целей для мобильных устройств */
@media (max-width: 768px) {
    /* Увеличение области нажатия для всех интерактивных элементов */
    .btn,
    .action-btn,
    .btn-icon,
    .nav-links a,
    .filter-select,
    .task-actions .btn-sm,
    .modal-footer .btn,
    .user-actions .btn-sm {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Увеличение кнопок в карточках задач */
    .task-actions .btn-sm {
        padding: 10px 8px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Увеличение иконок-кнопок */
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }
    
    /* Улучшение формы ввода для мобильных устройств */
    input,
    textarea,
    select,
    .filter-select,
    .task-title-input,
    .task-description-input,
    .time-field-group input[type="datetime-local"] {
        font-size: 16px !important; /* Предотвращает масштабирование на iOS */
        padding: 12px 10px;
    }
    
    /* Улучшение видимости фокусного состояния */
    *:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.3);
    }
    
    /* Исправление переполнения на мобильных */
    .container,
    .projects-page,
    .project-detail {
        overflow-x: hidden;
        padding: 10px;
    }
    
    /* Улучшение таблицы проектов для мобильных */
    .projects-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .projects-table {
        min-width: 600px;
    }
    
    /* Улучшение канбан-досок для мобильных */
    .kanban-board {
        gap: 15px;
    }
    
    .kanban-column {
        padding: 12px;
    }
    
    .column-content {
        gap: 12px;
    }
    
    /* Улучшение карточек задач */
    .task-card {
        padding: 12px;
        margin-bottom: 0;
    }
    
    /* Улучшение времени в карточках */
    .task-deadline,
    .task-notification {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }
    
    /* Улучшение модального окна */
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    /* Улучшение flash сообщений */
    .flash-message {
        padding: 12px;
        margin-bottom: 10px;
        font-size: 0.95rem;
    }
}

/* Специальные стили для очень маленьких экранов (iPhone SE, и т.д.) */
@media (max-width: 480px) {
    /* Основной контейнер */
    .container {
        padding: 10px;
    }
    
    /* Заголовки */
    h1, h2, h3 {
        word-break: break-word;
    }
    
    /* Welcome секция */
    .welcome-section {
        padding: 15px 12px;
    }
    
    .welcome-content h1 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .welcome-stats {
        gap: 8px;
    }
    
    .stat-card {
        padding: 8px 6px;
        min-width: 60px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Формы */
    .auth-container,
    .form-page,
    .profile-container {
        padding: 1.2rem;
        margin: 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    /* Кнопки в формах */
    .form-actions .btn {
        padding: 10px;
        min-height: 44px;
    }
    
    /* Поля времени */
    .time-fields-grid {
        gap: 12px;
    }
    
    .time-field-group input[type="datetime-local"] {
        padding: 10px;
    }
    
    /* Таблица проектов */
    .projects-table th,
    .projects-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .status-badge {
        padding: 2px 6px;
        font-size: 0.7rem;
        min-width: auto;
    }
    
    .status-text {
        font-size: 0.65rem;
    }
    
    /* Карточка задачи в детальном просмотре */
    .task-detail-card {
        padding: 1rem;
    }
    
    .task-content h3 {
        font-size: 1.2rem;
    }
    
    /* Профиль */
    .profile-section {
        padding: 1rem;
    }
    
    .profile-section h3 {
        font-size: 1.1rem;
    }
    
    /* Админ панель */
    .user-card {
        padding: 1rem;
    }
    
    .user-info h4 {
        font-size: 1rem;
    }
    
    .user-meta {
        font-size: 0.8rem;
    }
}

/* Стили для landscape ориентации на мобильных */
@media (max-width: 900px) and (orientation: landscape) {
    .kanban-board {
        flex-direction: row;
        overflow-x: auto;
        gap: 15px;
    }
    
    .kanban-column {
        min-width: 300px;
        flex: none;
    }
    
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Улучшение скролла на мобильных */
@media (max-width: 768px) {
    .projects-table-container,
    .kanban-board,
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Плавный скролл */
    html {
        scroll-behavior: smooth;
    }
}

/* Улучшение видимости активных элементов на тач-устройствах */
@media (hover: none) and (pointer: coarse) {
    .btn:active,
    .action-btn:active,
    .btn-icon:active,
    .task-card:active {
        opacity: 0.7;
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Подсветка при нажатии */
    .project-row:active {
        background-color: rgba(210, 180, 140, 0.1);
    }
}

/* Предотвращение масштабирования на iOS при фокусе на input */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="datetime-local"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Улучшение отображения времени на мобильных */
@media (max-width: 768px) {
    .task-time-info {
        font-size: 0.8rem;
    }
    
    .deadline-label,
    .notification-label {
        min-width: 70px;
    }
    
    .deadline-indicator {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
}

/* Стили для пустых состояний на мобильных */
@media (max-width: 768px) {
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.2rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* Улучшение навигации на мобильных */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 15px;
    }
    
    .nav-logo a {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 8px;
    }
    
    .nav-links a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .nav-links span {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Фильтры на мобильных - улучшение */
@media (max-width: 768px) {
    .projects-filters {
        gap: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
    
    .filter-select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    #reset-filters {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Прогресс-бар на мобильных */
@media (max-width: 768px) {
    .project-progress {
        min-width: 100px;
    }
    
    .progress-text {
        font-size: 0.7rem;
    }
    
    .progress-details {
        font-size: 0.65rem;
    }
}

/* Действия с проектами на мобильных */
@media (max-width: 768px) {
    .action-buttons {
        gap: 8px;
    }
    
    .action-buttons .action-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
    }
    
    .action-icon {
        font-size: 1rem;
    }
}

/* Улучшение читаемости на мобильных */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .task-card h4 {
        font-size: 0.95rem;
    }
    
    .project-title .title-text {
        font-size: 0.9rem;
    }
    
    .description-content {
        font-size: 0.8rem;
    }
}

/* Анимации для мобильных (упрощенные для производительности) */
@media (max-width: 768px) {
    .task-card:hover {
        transform: none;
    }
    
    .task-card:active {
        transform: scale(0.99);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.97);
    }
}

/* Исправление для iOS input[type="datetime-local"] */
@supports (-webkit-touch-callout: none) {
    input[type="datetime-local"] {
        min-height: 44px;
        line-height: normal;
    }
}

/* Улучшение видимости placeholder на мобильных */
@media (max-width: 768px) {
    ::-webkit-input-placeholder {
        font-size: 14px;
    }
    
    :-moz-placeholder {
        font-size: 14px;
    }
    
    ::-moz-placeholder {
        font-size: 14px;
    }
    
    :-ms-input-placeholder {
        font-size: 14px;
    }
}

/* Стили для загрузки на мобильных */
@media (max-width: 768px) {
    .loading-spinner {
        width: 30px;
        height: 30px;
    }
}

/* Улучшение отображения индикаторов уведомлений на мобильных */
@media (max-width: 768px) {
    .task-notification-indicator {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
    
    .notification-pending,
    .notification-sent {
        font-size: 0.65rem;
    }
}

/* Стили для модального окна подтверждения на мобильных */
@media (max-width: 768px) {
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-close {
        font-size: 1.5rem;
    }
    
    .modal-footer .btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Улучшение отображения статистики на очень маленьких экранах */
@media (max-width: 380px) {
    .welcome-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        width: auto;
    }
    
    /* Убираем 5-й стат-кард если он есть */
    .stat-card:last-child {
        grid-column: span 2;
    }
}

/* Предотвращение горизонтального скролла */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container,
    .projects-page,
    .project-detail,
    .profile-container,
    .admin-container {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* НОВЫЕ СТИЛИ ДЛЯ ИЗМЕНЕНИЯ ЗАДАЧИ */
.no-deadline-checkbox {
    background: #f0f8ff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #D2B48C;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 1rem;
}

.hint-text {
    display: block;
    margin-top: 5px;
    margin-left: 28px;
    color: #666;
    font-size: 0.8rem;
}

.time-fields-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.no-deadline-info {
    background: #f0f8ff;
    border-left: 4px solid #D2B48C;
}

/* ================================================ */
/* СТИЛИ ДЛЯ ЗАДАЧ БЕЗ СРОКА (project_detail.html)  */
/* ================================================ */

/* Чекбокс "Без срока" */
.no-deadline-checkbox {
    background: #f0f8ff;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #D2B48C;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 1rem;
}

.hint-text {
    display: block;
    margin-top: 5px;
    margin-left: 28px;
    color: #666;
    font-size: 0.8rem;
}

/* Блок полей времени (отключенное состояние) */
.time-fields {
    transition: opacity 0.3s ease;
}

.time-fields.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Карточка задачи без срока */
.task-card.task-no-deadline {
    border-left: 4px solid #6c757d;
    background-color: #f8f9fa;
}

.task-no-deadline-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.no-deadline-icon {
    font-size: 0.9rem;
}

.no-deadline-text {
    font-style: italic;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .no-deadline-checkbox {
        padding: 10px 12px;
    }
    
    .checkbox-text {
        font-size: 0.9rem;
    }
    
    .hint-text {
        font-size: 0.75rem;
        margin-left: 24px;
    }
    
    .task-no-deadline-info {
        font-size: 0.75rem;
    }
}