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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 99%;
    margin: 0 auto;
    padding: 20px;
    display: none;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    margin-bottom: 1.2rem;
    text-align: center;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-align: center;
}

.user-info span {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-info button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.user-info button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

nav button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 140px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

nav button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

button {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

button.delete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

button.delete-btn:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

button.edit-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

button.edit-btn:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

button.copy-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button.copy-btn:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

button.restore-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

button.restore-btn:hover {
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

button.edit-date-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    padding: 6px 12px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

button.edit-date-btn:hover {
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

#tasks-controls {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#tasks-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: normal;
    color: #2c3e50;
    cursor: pointer;
}

#tasks-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-card {
    border: none;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #3498db;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.task-card.deleted {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: #e74c3c;
    opacity: 0.8;
}

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

.task-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    line-height: 1.4;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    transition: all 0.3s ease;
}

.task-title:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.1));
    transform: translateY(-2px);
}

.task-status {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-purple { 
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}
.status-red { 
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.status-orange { 
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}
.status-green { 
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
}
.status-gray { 
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}
.status-darkred { 
    background: linear-gradient(135deg, #8b0000, #660000);
    color: white;
}

.deleted-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.copy-badge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.role-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 15px;
    margin-left: 8px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.role-admin { 
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.role-creator { 
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
}
.role-executor { 
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.task-original {
    margin: 10px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #e8f4fd, #d4e6f1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.task-original small {
    color: #2c3e50;
    font-style: italic;
    font-size: 0.9rem;
}

.task-description {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    line-height: 1.6;
    color: #495057;
}

.task-dates-files {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 10px;
    border-left: 4px solid #f39c12;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.task-dates-files .task-dates {
    flex: 1;
    min-width: 250px;
    font-size: 0.95rem;
    color: #856404;
}

.task-dates-files .file-list {
    flex: 1;
    min-width: 250px;
    font-size: 0.95rem;
    color: #856404;
}

.task-dates-files .file-list strong {
    display: block;
    margin-bottom: 5px;
}

.task-dates-files .files-placeholder {
    color: #6c757d;
    font-style: italic;
}

.task-dates-files strong {
    color: #e67e22;
}

.task-assignments {
    margin: 20px 0;
}

.assignment {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.8);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.assignment:hover {
    background: rgba(233, 236, 239, 0.8);
    transform: translateX(5px);
}

.assignment.overdue {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 1px solid #e74c3c;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.assignment-status {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-assigned { 
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.status-in_progress { 
    background: linear-gradient(135deg, #f39c12, #e67e22);
}
.status-completed { 
    background: linear-gradient(135deg, #27ae60, #219a52);
}
.status-overdue { 
    background: linear-gradient(135deg, #8b0000, #660000);
}

.assignment-dates {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6c757d;
}

.assignment-dates small {
    display: block;
    margin: 3px 0;
}

.action-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons button {
    margin-right: 0;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 8px;
}

.task-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.task-actions button {
    padding: 8px 12px;
    font-size: 1rem;
    border-radius: 8px;
    min-width: auto;
}

.file-list {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-item a {
    color: #3498db;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.file-item a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.file-item small {
    color: #6c757d;
    margin-left: auto;
    font-size: 0.85rem;
}

.task-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
}

.task-meta small {
    color: #6c757d;
    font-size: 0.9rem;
}

.log-entry {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.log-entry:hover {
    background: #f8f9fa;
    border-radius: 8px;
}

.log-time {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 8% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideIn 0.3s ease;
}

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

.close {
    color: #6c757d;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: all 0.3s ease;
}

.close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.checkbox-group {
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid #e9ecef;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
}

.checkbox-item {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(5px);
}

.checkbox-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    color: #495057;
}

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

#login-modal .modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    text-align: center;
    max-width: 500px;
}

#login-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#login-form input[type="text"],
#login-form input[type="password"] {
    text-align: center; /* Центрирование текста в полях ввода */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#login-form input[type="text"]:focus,
#login-form input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.test-users {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border-left: 5px solid #3498db;
}

.test-users h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.test-users ul {
    list-style: none;
    padding: 0;
}

.test-users li {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.test-users li:last-child {
    border-bottom: none;
}

.test-users strong {
    color: #2c3e50;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 1.1rem;
}

.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
    border-left: 5px solid #e74c3c;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .task-actions {
        position: static;
        margin-top: 15px;
        justify-content: center;
        width: 100%;
    }
    
    nav {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .assignment {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    #login-form input[type="text"],
    #login-form input[type="password"] {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 15px;
    }
    
    .task-card {
        padding: 15px;
    }
    
    .task-title {
        font-size: 1.2rem;
    }
    
    .task-status {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .task-actions {
        gap: 5px;
    }
    
    .task-actions button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    nav button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

@media print {
    .task-actions,
    nav,
    .user-info button {
        display: none !important;
    }
    
    .task-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.user-search {
    margin-bottom: 10px;
}

.user-search input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.status-yellow { 
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
}

.task-card.closed {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-left-color: #6c757d;
    opacity: 0.8;
}

.closed-badge {
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.rework-comment {
    margin: 10px 0;
    padding: 12px 15px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.assignment-rework-comment {
    margin-top: 8px;
    padding: 8px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.assignment.rework {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
}

button.rework-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

button.rework-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

button.close-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

button.close-btn:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

button.reopen-btn {
    background: linear-gradient(135deg, #20c997, #1ea085);
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.3);
}

button.reopen-btn:hover {
    box-shadow: 0 6px 20px rgba(32, 201, 151, 0.4);
}

.show-deleted-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    color: #2c3e50;
    cursor: pointer;
}

.show-deleted-label input {
    margin: 0;
}

.show-deleted-label[style*="display: none"] {
    display: none !important;
}

.deadline-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.deadline-48h {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #856404;
}

.deadline-24h {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
    color: white;
}

.deadline-indicator {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
    font-weight: 600;
}

.task-title .deadline-badge {
    vertical-align: middle;
}

.filter-group select {
    min-width: 150px;
}

.filters {
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group select {
        width: 100%;
    }
}

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

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.admin-tab {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.admin-tab:hover {
    background: #e9ecef;
}

.admin-tab.active {
    background: #3498db;
    color: white;
}

.admin-section {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions button {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.ldap-badge {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 5px;
}

.admin-badge {
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 5px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.password-fields {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.modal-lg {
    max-width: 800px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-container input {
    flex: 1;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.stat-desc {
    color: #6c757d;
    font-size: 0.9rem;
}

.stat-card.admin-stat {
    border-left-color: #e74c3c;
}

.stat-card.ldap-stat {
    border-left-color: #2ecc71;
}

.stat-card.local-stat {
    border-left-color: #f39c12;
}

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

.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
    border-left: 5px solid #e74c3c;
    text-align: center;
}

.task-number {
    background: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 10px;
    font-weight: bold;
}

.task-header .task-title .expand-icon {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: auto;
    padding-left: 15px;
}

.task-content {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 0;
}

.task-content.expanded {
    max-height: 2000px;
}

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

.tasks-no-date-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.tasks-no-date-btn.active {
    background: linear-gradient(135deg, #138496, #117a8b);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.no-date-badge {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 10px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .task-dates-files {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-dates-files .task-dates,
    .task-dates-files .file-list {
        min-width: 100%;
    }
}
/* Стили для иконок файлов */
.file-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.file-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.file-icon-container:hover {
    transform: translateY(-5px);
}

.file-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.file-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.file-extension {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.file-name {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #495057;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.file-download-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.file-download-link:hover .file-name {
    color: #3498db;
    text-decoration: underline;
}

/* Тултип при наведении */
.file-icon-container::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.file-icon-container:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Адаптивность */
@media (max-width: 768px) {
    .file-icons-container {
        gap: 10px;
        justify-content: center;
    }
    
    .file-icon-container {
        width: 70px;
    }
    
    .file-icon {
        width: 50px;
        height: 50px;
    }
    
    .file-extension {
        font-size: 0.7rem;
    }
    
    .file-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .file-icons-container {
        gap: 8px;
    }
    
    .file-icon-container {
        width: 60px;
    }
    
    .file-icon {
        width: 45px;
        height: 45px;
    }
    
    .file-extension {
        font-size: 0.65rem;
    }
    
    .file-name {
        font-size: 0.65rem;
    }
}
.no-files {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Сделаем файлы видимыми всегда */
.task-dates-files .file-list {
    flex: 1;
    min-width: 250px;
    font-size: 0.95rem;
    color: #856404;
}

.task-dates-files .file-list strong {
    display: block;
    margin-bottom: 10px;
}

/* Уменьшим отступы для компактности */
.task-dates-files {
    margin: 10px 0;
    padding: 12px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 10px;
    border-left: 4px solid #f39c12;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}
/* Стили для иконок файлов */
.file-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.file-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.file-icon-container:hover {
    transform: translateY(-5px);
}

.file-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.file-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.file-extension {
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
    padding: 0 5px;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Для коротких текстов (1-2 символа) */
.file-extension.short {
    font-size: 1rem;
}

/* Для средних текстов (3-4 символа) */
.file-extension.medium {
    font-size: 0.9rem;
}

/* Для длинных текстов (5+ символов) */
.file-extension.long {
    font-size: 0.7rem;
}

.file-name {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #495057;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.file-download-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.file-download-link:hover .file-name {
    color: #3498db;
    text-decoration: underline;
}

/* Тултип при наведении */
.file-icon-container::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.file-icon-container:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Адаптивность */
@media (max-width: 768px) {
    .file-icons-container {
        gap: 10px;
        justify-content: center;
    }
    
    .file-icon-container {
        width: 70px;
    }
    
    .file-icon {
        width: 50px;
        height: 50px;
    }
    
    .file-extension {
        font-size: 0.7rem;
    }
    
    .file-extension.short {
        font-size: 0.9rem;
    }
    
    .file-extension.medium {
        font-size: 0.8rem;
    }
    
    .file-extension.long {
        font-size: 0.6rem;
    }
    
    .file-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .file-icons-container {
        gap: 8px;
    }
    
    .file-icon-container {
        width: 60px;
    }
    
    .file-icon {
        width: 45px;
        height: 45px;
    }
    
    .file-extension {
        font-size: 0.65rem;
    }
    
    .file-extension.short {
        font-size: 0.8rem;
    }
    
    .file-extension.medium {
        font-size: 0.7rem;
    }
    
    .file-extension.long {
        font-size: 0.55rem;
    }
    
    .file-name {
        font-size: 0.65rem;
    }
}
/* Добавьте эти стили в style.css */

.assignments-container {
    margin-top: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.assignments-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e5e9;
}

.assignment-filter-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.assignment-filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-count {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.assignments-scroll-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Стили для скроллбара */
.assignments-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.assignments-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.assignments-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.assignments-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Стили для отдельных исполнителей */
.assignment {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s;
}

.assignment:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.assignment:last-child {
    margin-bottom: 0;
}
/* Добавить в стили */
/* ========== Kanban Board Modern ========== */

.kanban-section {
    padding: 20px;
}

.kanban-board {
    min-height: 70vh;
}

.kanban-controls {
    margin-bottom: 16px;
}

.kanban-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 12px;
}

.kanban-filter-item {
    display: flex;
    align-items: center;
}

.kanban-search-input {
    width: 240px;
    padding: 8px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.kanban-search-input:focus {
    border-color: #667eea;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

.kanban-filter-item select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 130px;
    color: #2c3e50;
}

.kanban-filter-item select:focus {
    border-color: #667eea;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}

.kanban-reset-btn {
    padding: 8px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.kanban-reset-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.kanban-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 18px 14px;
}

.filter-title {
    font-weight: 600;
    color: #495057;
    background: #eef2ff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.task-count {
    color: #6c757d;
    font-size: 13px;
}

.refresh-btn {
    padding: 6px 14px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #5a6268;
}

/* ===== Columns ===== */

.kanban-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    padding: 12px 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-column-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kanban-count {
    background: rgba(255,255,255,0.3);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.kanban-overdue-count {
    background: rgba(255,255,255,0.9);
    color: #e17055;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.kanban-column-body {
    padding: 12px;
    flex: 1;
    min-height: 300px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    transition: background 0.2s ease;
}

.kanban-column-body.drag-over {
    background: #eef2ff;
    border: 2px dashed #667eea;
    border-radius: 8px;
    margin: 2px;
}

.kanban-empty {
    text-align: center;
    padding: 30px 16px;
    color: #adb5bd;
    font-style: italic;
    font-size: 13px;
}

/* ===== Cards ===== */

.kanban-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #d0d5e0;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.kanban-card-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.kanban-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.kanban-task-id {
    font-size: 11px;
    color: #adb5bd;
    font-weight: 600;
    margin-left: auto;
}

.kanban-copy-badge {
    font-size: 11px;
    opacity: 0.6;
}

.kanban-task-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    color: #1a1a2e;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-task-title:hover {
    color: #667eea;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.kanban-deadline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c757d;
    white-space: nowrap;
}

.kanban-deadline.deadline-urgent {
    color: #e17055;
    font-weight: 600;
}

.kanban-deadline.deadline-overdue {
    color: #dc2626;
    font-weight: 700;
}

.kanban-deadline.no-date {
    color: #adb5bd;
}

.kanban-assignees {
    display: flex;
    align-items: center;
    gap: 2px;
}

.kanban-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: default;
}

.kanban-avatar.small {
    width: 18px;
    height: 18px;
    font-size: 8px;
}

.kanban-more {
    font-size: 10px;
    color: #6c757d;
    margin-left: 2px;
}

.kanban-no-assignee {
    font-size: 14px;
    opacity: 0.4;
}

.kanban-files-count {
    font-size: 11px;
    color: #6c757d;
    margin-left: auto;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #adb5bd;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 2px;
}

.kanban-creator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.kanban-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.kanban-card:hover .kanban-card-actions {
    opacity: 1;
}

.kbtn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
    background: #f0f0f0;
    color: #495057;
}

.kbtn:hover { transform: scale(1.15); }

.kbtn-start { background: #dbeafe; color: #1e40af; }
.kbtn-start:hover { background: #bfdbfe; }
.kbtn-done { background: #d1fae5; color: #065f46; }
.kbtn-done:hover { background: #a7f3d0; }
.kbtn-copy { background: #f3f4f6; color: #6b7280; }
.kbtn-copy:hover { background: #e5e7eb; }

.error-message {
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #c62828;
    margin: 20px;
}

.retry-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
}

.retry-btn:hover { background: #45a049; }

/* ===== Responsive ===== */

@media (max-width: 1200px) {
    .kanban-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kanban-columns {
        grid-template-columns: 1fr;
    }
    .kanban-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .kanban-search-input {
        width: 100%;
        box-sizing: border-box;
    }
    .kanban-filter-item select {
        width: 100%;
    }
}
/* Добавим в существующий style.css */

.profile-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.profile-card p {
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.profile-card p:last-child {
    border-bottom: none;
}

.notification-settings {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin: 10px 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    font-weight: 500;
}

#notification-email {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 5px;
}

#notification-email:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}
/* ИСПОЛНИТЕЛИ В ШАПКЕ ЗАДАЧИ */
.executor-logins {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    border: 1px solid #ddd;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.executor-logins-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.executor-login-badge {
    background: #e9ecef;
    color: #495057;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}
/* public/admin-doc.html */
/* public/admin-doc.html */

/* Цвета для кнопок навигации */
.nav-btn.create { 
    background: linear-gradient(135deg, #27ae60, #219a52);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
.nav-btn.tasks { 
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.nav-btn.doc { 
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}
.nav-btn.kanban { 
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.nav-btn.help { 
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}
.nav-btn.profile { 
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.nav-btn.admin { 
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Эффекты при наведении сохраняются */
.nav-btn.create:hover { box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4); }
.nav-btn.tasks:hover { box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); }
.nav-btn.doc:hover { box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4); }
.nav-btn.kanban:hover { box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4); }
.nav-btn.help:hover { box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4); }
.nav-btn.profile:hover { box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4); }
.nav-btn.admin:hover { box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4); }
/* doc */



/* Кнопки выбора времени */
.time-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.date-btn {
    flex: 1;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.date-btn:hover {
    background: #f2f4f7;
    border-color: #3d94eb;
    transform: translateY(-2px);
}
.time-btn {
    flex: 1;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.time-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.time-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.time-btn.active:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.time-btn i {
    font-size: 16px;
}
/* Добавьте в конец style.css */
.task-card .task-meta {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
    margin-top: 0;
    font-size: 0.85rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

.task-card .task-content {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.task-card.deleted .task-meta {
    background: #f5c6cb;
    color: #721c24;
}

.task-card.closed .task-meta {
    background: #e9ecef;
    color: #6c757d;
}

@media (max-width: 768px) {
    .task-card .task-meta {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}
/* Стили для выбора типа задачи */
.task-type-selector {
    margin-bottom: 20px;
    width: 100%;
}

.task-type-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Равномерное распределение */
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.task-type-btn {
    flex: 1 1 calc(11.11% - 10px); /* 9 кнопок = примерно 11.11% каждая */
    min-width: 100px;
    max-width: 150px;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 95px;
    font-size: 12px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333; /* Темный цвет текста для неактивных кнопок */
}

.task-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.task-type-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* Цвета для разных типов задач генерируются динамически через JS */
.task-type-btn.active::before {
    background: rgba(255, 255, 255, 0.5);
}

.task-type-btn i {
    font-size: 20px;
    margin-bottom: 8px;
    color: #666;
    transition: all 0.3s ease;
}

.task-type-btn:hover i {
    color: #333;
    transform: scale(1.05);
}

.task-type-btn.active i {
    color: white;
    transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 1400px) {
    .task-type-btn {
        flex: 1 1 calc(16.66% - 10px); /* 6 в ряд */
        min-width: 120px;
    }
}

@media (max-width: 1200px) {
    .task-type-btn {
        flex: 1 1 calc(20% - 10px); /* 5 в ряд */
        min-width: 110px;
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .task-type-btn {
        flex: 1 1 calc(25% - 10px); /* 4 в ряд */
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .task-type-btn {
        flex: 1 1 calc(33.333% - 10px); /* 3 в ряд */
        min-width: 90px;
        min-height: 85px;
    }
    .task-type-btn i {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .task-type-btn {
        flex: 1 1 calc(50% - 10px); /* 2 в ряд */
        min-width: 120px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .task-type-btn {
        flex: 1 1 100%; /* 1 в ряд */
        min-width: 100%;
        max-width: 100%;
    }
}

/* Стили для календаря */
.calendar-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-weight: bold;
    color: #495057;
    border-right: 1px solid #dee2e6;
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 120px;
}

.calendar-day {
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 8px;
    overflow: hidden;
    position: relative;
    transition: background-color 0.2s;
}

.calendar-day.empty-day {
    background-color: #d4edda !important; /* светло-зеленый */
}

.calendar-day.busy-day {
    background-color: #f8d7da !important; /* розовый */
}

.calendar-day.today {
    background-color: #e7f3ff !important;
    border: 2px solid #007bff;
}

.calendar-day.weekend {
    background-color: #f8f9fa;
}

.calendar-day.empty {
    background-color: #f8f9fa;
    opacity: 0.5;
}

.calendar-date {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-badge {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: normal;
}

.calendar-tasks {
    max-height: calc(100% - 25px);
    overflow-y: auto;
}

.calendar-task {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 12px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-task:hover {
    background: #f8f9fa;
}

.calendar-task.dragging {
    opacity: 0.5;
}

.calendar-task-content {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-task-id {
    font-size: 10px;
    color: #6c757d;
    display: inline-block;
    margin-right: 4px;
}

.calendar-task-title {
    cursor: pointer;
    color: #007bff;
    display: inline;
}

.calendar-task-title:hover {
    text-decoration: underline;
}

.calendar-task-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 4px;
}

.calendar-task-status.assigned { background: #e74c3c; }
.calendar-task-status.in_progress { background: #f39c12; }
.calendar-task-status.rework { background: #f1c40f; }
.calendar-task-status.completed { background: #2ecc71; }

.no-tasks {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
}

.more-tasks {
    color: #007bff;
    font-size: 11px;
    text-align: center;
    padding: 2px;
    cursor: pointer;
}

.more-tasks:hover {
    text-decoration: underline;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-nav-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 16px;
}

.month-nav-btn:hover {
    background: #0056b3;
}

.current-month {
    font-weight: bold;
    font-size: 16px;
    min-width: 150px;
    text-align: center;
}

.today-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    margin-right: 10px;
}

.today-btn:hover {
    background: #218838;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.empty-day {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.legend-color.normal-day {
    background-color: white;
    border: 1px solid #dee2e6;
}

.legend-color.busy-day {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.drag-over {
    background-color: #e7f3ff !important;
    border: 2px dashed #007bff !important;
}
.chat-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

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

/* admin */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            border-left: 4px solid #3498db;
        }

        .stat-card.task-stat {
            border-left-color: #3498db;
        }

        .stat-card.user-stat {
            border-left-color: #2ecc71;
        }

        .stat-card.file-stat {
            border-left-color: #9b59b6;
        }

        .stat-card.status-stat {
            border-left-color: #f39c12;
        }

        .stat-card h3 {
            margin: 0 0 15px 0;
            color: #495057;
            font-size: 1.1rem;
            font-weight: 600;
        }

        .stat-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .stat-desc {
            color: #6c757d;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .stat-subitems {
            margin-top: 10px;
        }

        .stat-subitem {
            display: flex;
            justify-content: space-between;
            padding: 5px 0;
            border-bottom: 1px solid #f1f1f1;
            font-size: 0.9rem;
        }

        .stat-subitem:last-child {
            border-bottom: none;
        }

        .stat-subitem .label {
            color: #6c757d;
        }

        .stat-subitem .value {
            font-weight: 600;
            color: #2c3e50;
        }

        .recent-tasks {
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-top: 20px;
        }

        .recent-tasks h3 {
            margin: 0 0 15px 0;
            color: #495057;
            font-size: 1.2rem;
        }

        .task-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid #e9ecef;
            transition: all 0.3s ease;
        }

        .task-item:hover {
            background: #f8f9fa;
        }

        .task-item:last-child {
            border-bottom: none;
        }

        .task-info {
            flex: 1;
        }

        .task-title {
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 5px;
        }

        .task-meta {
            font-size: 0.85rem;
            color: #6c757d;
        }

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

        .view-task-btn {
            padding: 6px 12px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            text-decoration: none;
            display: inline-block;
        }

        .view-task-btn:hover {
            background: #2980b9;
        }

        .percentage-bar {
            height: 6px;
            background: #e9ecef;
            border-radius: 3px;
            margin-top: 8px;
            overflow: hidden;
        }

        .percentage-fill {
            height: 100%;
            background: #3498db;
            border-radius: 3px;
            transition: width 0.3s ease;
        }

        .users-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        .users-table th,
        .users-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e9ecef;
        }

        .users-table th {
            background: #f8f9fa;
            font-weight: 600;
            color: #495057;
        }

        .users-table tr:hover {
            background: #f8f9fa;
        }

        .user-actions {
            display: flex;
            gap: 8px;
        }

        .ldap-badge {
            background: #3498db;
            color: white;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-left: 5px;
        }

        .admin-badge {
            background: #e74c3c;
            color: white;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-left: 5px;
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .form-row .form-group {
            flex: 1;
        }

        .modal-lg {
            max-width: 800px;
        }

        .search-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }

        .search-container input {
            flex: 1;
        }

        .file-size {
            font-size: 1.2rem;
            color: #2c3e50;
            margin-top: 5px;
        }
        /* admin */
        /* style.css */
/* Основные стили для School CRM */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.modal-lg {
    max-width: 800px;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Формы */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

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

.form-row .form-group {
    flex: 1;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Административная панель */
.admin-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e6ed;
}

.admin-header h1 {
    color: #2c3e50;
    font-size: 28px;
}

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

.user-info span {
    font-weight: 600;
    color: #2c3e50;
    background: #e8f4fc;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #3498db;
}

.user-info button {
    background: #2c3e50;
    padding: 8px 16px;
    font-size: 13px;
}

.user-info button:hover {
    background: #34495e;
}

/* Вкладки */
.admin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-tab:hover {
    background: #f8f9fa;
    color: #3498db;
}

.admin-tab.active {
    background: #3498db;
    color: white;
}

/* Секции */
.admin-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.admin-section.active {
    display: block;
}

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

/* Дашборд - сетка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-desc {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.stat-subitems {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-subitem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-subitem:last-child {
    border-bottom: none;
}

.stat-subitem .label {
    color: #666;
    font-size: 13px;
}

.stat-subitem .value {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    font-size: 14px;
    color: #27ae60;
    font-weight: 600;
}

/* Прогресс бар */
.percentage-bar {
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    margin: 15px 0;
    overflow: hidden;
}

.percentage-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

/* Управление пользователями */
.search-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.users-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e6ed;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

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

.users-table tr:hover {
    background: #f8fafd;
}

.users-table .loading,
.users-table .error {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.users-table .error {
    color: #e74c3c;
}

/* Бейджи */
.ldap-badge,
.admin-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.ldap-badge {
    background: #e3f2fd;
    color: #1976d2;
}

.admin-badge {
    background: #ffebee;
    color: #d32f2f;
}

/* Действия пользователя */
.user-actions {
    display: flex;
    gap: 8px;
}

.edit-btn,
.delete-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
}

.edit-btn {
    background: #f0f7ff;
    color: #3498db;
    border: 1px solid #3498db;
}

.edit-btn:hover {
    background: #3498db;
    color: white;
}

.delete-btn {
    background: #fff5f5;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.delete-btn:hover:not(:disabled) {
    background: #e74c3c;
    color: white;
}

.delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Тестовые пользователи */
.test-users {
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.test-users h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
}

.test-users ul {
    list-style: none;
    padding-left: 0;
}

.test-users li {
    padding: 5px 0;
    color: #666;
    font-size: 13px;
}

.test-users strong {
    color: #2c3e50;
}

/* Сообщения об ошибках */
.error-message {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-message p {
    color: #e74c3c;
    margin-bottom: 15px;
}

/* Заголовки секций */
.admin-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e6ed;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .users-table {
        display: block;
        overflow-x: auto;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .filter-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .admin-container {
        padding: 15px;
    }
    
    .admin-header h1 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .edit-btn,
    .delete-btn {
        width: 100%;
    }
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stat-card:hover .stat-value {
    animation: pulse 1s ease-in-out;
}

/* Кастомные стили для разных типов статистики */
.task-stat {
    border-top: 4px solid #3498db;
}

.status-stat {
    border-top: 4px solid #9b59b6;
}

.user-stat {
    border-top: 4px solid #2ecc71;
}

.file-stat {
    border-top: 4px solid #e74c3c;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
button.btn-primary {
    width: 100%; /* Занимает всю доступную ширину */
    max-width: 600px; /* Максимальная ширина */
    padding: 14px 20px; /* Увеличиваем внутренние отступы */
    font-size: 1.1rem; /* Увеличиваем шрифт */
}
        /* Дополнительные стили для детальной статистики */
        .filters-container {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .filter-row {
            display: flex;
            gap: 20px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }
        
        .filter-group {
            flex: 1;
            min-width: 200px;
        }
        
        .filter-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #333;
        }
        
        .filter-group select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        
        .filter-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        .users-stats-table {
            width: 100%;
            border-collapse: collapse;
            background: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .users-stats-table th {
            background: #f8f9fa;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            color: #333;
            border-bottom: 2px solid #dee2e6;
        }
        
        .users-stats-table td {
            padding: 12px 15px;
            border-bottom: 1px solid #dee2e6;
        }
        
        .users-stats-table tr:hover {
            background: #f8f9fa;
        }
        
        .statuses-container {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .status-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }
        
        .status-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .status-assigned { background: #e3f2fd; color: #1976d2; }
        .status-in-progress { background: #fff3e0; color: #f57c00; }
        .status-completed { background: #e8f5e9; color: #388e3c; }
        .status-overdue { background: #ffebee; color: #d32f2f; }
        .status-rework { background: #f3e5f5; color: #7b1fa2; }
        
        .status-count {
            font-weight: 600;
            min-width: 20px;
            text-align: right;
        }
        
        .no-statuses {
            color: #999;
            font-style: italic;
            font-size: 12px;
        }
        
        .user-role {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
            background: #f5f5f5;
            color: #666;
        }
        
        .user-role.admin { background: #ffebee; color: #d32f2f; }
        .user-role.teacher { background: #e3f2fd; color: #1976d2; }
        
        .stat-numbers {
            display: flex;
            gap: 10px;
            margin-top: 5px;
        }
        
        .stat-number {
            background: #f8f9fa;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
        }
        
        .export-btn {
            background: #28a745;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 600;
        }
        
        .export-btn:hover {
            background: #218838;
        }
        
        .reset-btn {
            background: #1976d2;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .reset-btn:hover {
            background: #e00707;
        }
        
        .no-data {
            text-align: center;
            padding: 40px;
            color: #666;
            font-style: italic;
        }
        
        .stats-loading {
            text-align: center;
            padding: 40px;
            color: #666;
        }
        
        .stats-error {
            text-align: center;
            padding: 40px;
            color: #dc3545;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
        }
        
        .page-btn {
            padding: 6px 12px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .page-btn.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }
        
        .page-btn:hover:not(.active) {
            background: #f8f9fa;
        }
        
        .page-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .stats-summary {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .total-count {
            font-weight: 600;
            color: #333;
        }
        
        .page-dots {
            padding: 6px 12px;
            color: #666;
        }
        
        .user-info {
            line-height: 1.4;
        }
        
        .user-login {
            font-size: 12px;
            color: #666;
        }
        
        .user-email {
            font-size: 12px;
            color: #999;
        }
        
        .stats-header {
            margin-bottom: 20px;
        }
        
        .stats-header h2 {
            margin-bottom: 5px;
        }
        
        .stats-header p {
            color: #666;
            margin: 0;
        }
        
        .overall-stats {
            margin-bottom: 30px;
        }
        
        .overall-stats h3 {
            margin-bottom: 15px;
        }
        
        .detailed-stats h3 {
            margin-bottom: 15px;
        }
        /* Скрытые элементы */
.hidden {
    display: none !important;
}

/* Или более мягкий вариант - скрыть, но сохранить место */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Если нужно сделать плавное появление позже */
.hidden-conditional {
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}
/* Стили для модального окна доработки */
#rework-assignment-modal .modal-content {
    max-width: 550px;
    border-radius: 8px;
}

#rework-assignment-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

#rework-assignment-modal textarea:focus {
    border-color: #f39c12;
    outline: none;
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.3);
}

#rework-assignment-modal .btn-warning {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#rework-assignment-modal .btn-warning:hover {
    background-color: #e67e22;
}

#rework-assignment-modal .btn-warning:disabled {
    background-color: #f1c40f;
    cursor: not-allowed;
    opacity: 0.7;
}
/* Современный профиль */
.profile-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.5);
}

.profile-avatar i {
    font-size: 50px;
    color: white;
}

.profile-title {
    flex: 1;
}

.profile-title h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.profile-badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.profile-badge.admin {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.profile-info-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
}

.profile-info-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.info-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon i {
    font-size: 20px;
    color: white;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
}

.groups-card {
    grid-column: 1 / -1;
}

.groups-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.group-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.badge-ldap, .badge-local {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    background: rgba(255,255,255,0.2);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
}

.profile-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    text-align: center;
}

.profile-error i {
    font-size: 40px;
    margin-bottom: 10px;
}

.profile-error p {
    margin: 0;
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-modern {
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
}
/* Добавить в CSS */
.loading-spinner {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.no-users {
    padding: 20px;
    text-align: center;
    color: #999;
    background: #f5f5f5;
    border-radius: 5px;
}

.user-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-item {
    transition: opacity 0.3s;
}

.checkbox-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading-badge {
    color: #f39c12;
    margin-left: 5px;
    font-size: 0.8em;
    animation: pulse 1.5s infinite;
}

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

        .document-fields-container {
            margin: 12px 0;
            padding: 12px 15px;
            background: linear-gradient(135deg, #f8f9ff 0%, #f0f2fa 100%);
            border-left: 4px solid #4a90e2;
            border-radius: 0 8px 8px 0;
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
            font-size: 0.95em;
            width: 100%;
            box-sizing: border-box;
        }
        
        .document-fields-container.empty {
            background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
            border-left-color: #9e9e9e;
            opacity: 0.8;
        }
        
        .document-fields-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 6px;
            border-bottom: 1px dashed rgba(74, 144, 226, 0.3);
            width: 100%;
        }
        
        .document-fields-container.empty .document-fields-header {
            border-bottom-color: rgba(158, 158, 158, 0.3);
        }
        
        .document-icon {
            font-size: 1.2em;
            margin-right: 8px;
            filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
            flex-shrink: 0;
        }
        
        .document-title {
            font-weight: 600;
            color: #2c3e50;
            text-transform: uppercase;
            font-size: 0.85em;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        
        .document-fields-container.empty .document-title {
            color: #7f8c8d;
        }
        
        /* Горизонтальное расположение полей */
        .document-fields-content {
            display: flex;
            flex-wrap: wrap;
            gap: 12px 20px;
            align-items: center;
            width: 100%;
        }
        
        /* Стили для каждого поля - текст по центру вертикально */
        .document-field {
            display: inline-flex;
            align-items: center; /* Выравнивание по центру вертикально */
            background: white;
            padding: 4px 14px; /* Уменьшил верхний/нижний padding для лучшего выравнивания */
            border-radius: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            border: 1px solid rgba(0,0,0,0.03);
            transition: all 0.2s ease;
            max-width: 100%;
            flex: 0 1 auto;
            line-height: 1.4; /* Добавил для единообразия высоты строки */
        }
        
        .document-field:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
            transform: translateY(-1px);
        }
        
        .document-field.long-value {
            max-width: 300px;
        }
        
        .document-fields-container.empty .document-field {
            background: rgba(255,255,255,0.7);
        }
        
        .field-label {
            font-weight: 500;
            color: #7f8c8d;
            margin-right: 6px;
            font-size: 0.9em;
            white-space: nowrap;
            flex-shrink: 0;
            line-height: 1.4; /* Единообразие высоты строки */
        }
        
        .field-value {
            font-weight: 600;
            color: #2c3e50;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
            line-height: 1.4; /* Единообразие высоты строки */
            padding: 2px 0; /* Небольшой отступ для лучшего выравнивания */
        }
        
        .document-field.long-value .field-value {
            max-width: 250px;
        }
        
        /* Специфичные стили для разных типов полей */
        .document-number {
            color: #e67e22;
            background: rgba(230, 126, 34, 0.1);
            padding: 2px 10px;
            border-radius: 20px;
            display: inline-block;
        }
        
        .document-date {
            color: #27ae60;
            background: rgba(39, 174, 96, 0.1);
            padding: 2px 10px;
            border-radius: 20px;
            display: inline-block;
        }
        
        .document-author {
            color: #3498db;
            background: rgba(52, 152, 219, 0.1);
            padding: 2px 10px;
            border-radius: 20px;
            display: inline-block;
        }
        
        /* Стили для пустого состояния */
        .document-fields-empty {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 0;
            width: 100%;
        }
        
        .empty-message {
            color: #95a5a6;
            font-style: italic;
            font-size: 0.9em;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .empty-message::before {
            content: "⏳";
            font-size: 1.1em;
            opacity: 0.7;
        }
        
        /* Анимация появления */
        .document-fields-container {
            animation: slideIn 0.3s ease-out;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Адаптивность для мобильных и узких экранов */
        @media (max-width: 768px) {
            .document-fields-content {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
            }
            
            .document-field {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                justify-content: flex-start; /* Выравнивание по левому краю на мобильных */
            }
            
            .document-field.long-value {
                max-width: 100%;
            }
            
            .field-value {
                max-width: calc(100% - 60px);
            }
            
            .document-field.long-value .field-value {
                max-width: calc(100% - 60px);
            }
        }
        
        /* Для очень узких экранов */
        @media (max-width: 480px) {
            .document-fields-header {
                flex-wrap: wrap;
            }
            
            .document-title {
                white-space: normal;
                word-break: break-word;
            }
            
            .document-field {
                flex-wrap: wrap;
                padding: 8px 12px;
                justify-content: flex-start;
            }
            
            .field-label {
                margin-bottom: 4px;
            }
            
            .field-value {
                white-space: normal;
                word-break: break-word;
                max-width: 100%;
            }
        }
/* Стили для кнопки изменения срока */
.change-deadline-btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 0 4px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.change-deadline-btn:hover {
    background-color: #2c4a7a;
}

/* Стили для модального окна */
#change-deadline-modal .modal-content {
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

#change-deadline-modal .form-group {
    margin-bottom: 20px;
}

#change-deadline-modal label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

#change-deadline-modal .form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

#change-deadline-modal .form-control:focus {
    border-color: #4a6fa5;
    outline: none;
}

#change-deadline-modal small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

#change-deadline-modal .modal-footer {
    border-top: 1px solid #e1e5e9;
    padding-top: 20px;
}

#change-deadline-modal .btn-primary {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

#change-deadline-modal .btn-primary:hover:not(:disabled) {
    background-color: #218838;
}

#change-deadline-modal .btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#change-deadline-modal .btn-cancel {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

#change-deadline-modal .btn-cancel:hover {
    background-color: #5a6268;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Стили для кнопки создания пользователя */
.create-user-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}

.create-user-btn:hover {
    background-color: #2ecc71;
}

/* Стили для хинта в форме */
.form-hint {
    font-size: 12px;
    color: #7f8c8d;
    display: block;
    margin-top: 4px;
}

/* Обновленные стили для поиска */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
}

.search-container button:hover {
    opacity: 0.9;
}

/* Стили для кнопок действий */
.user-actions {
    display: flex;
    gap: 5px;
}

.user-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.user-actions .edit-btn {
    background-color: #f39c12;
    color: white;
}

.user-actions .edit-btn:hover {
    background-color: #e67e22;
}

.user-actions .delete-btn {
    background-color: #e74c3c;
    color: white;
}

.user-actions .delete-btn:hover {
    background-color: #c0392b;
}

.user-actions .delete-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Стили для бейджей */
.ldap-badge, .admin-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 5px;
    text-transform: uppercase;
}

.ldap-badge {
    background-color: #9b59b6;
    color: white;
}

.admin-badge {
    background-color: #e74c3c;
    color: white;
}

/* Стили для модального окна */
.modal-lg {
    max-width: 600px;
}

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

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #e74c3c;
}
.task-actions-menu-container {
    position: relative;
    display: inline-block;
}

.task-actions-menu-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.task-actions-menu-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
}

.task-actions-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    padding: 8px 0;
    display: none;
}

.task-actions-dropdown .menu-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    white-space: nowrap;
}

.task-actions-dropdown .menu-item:hover {
    background-color: #f8f9fa;
}

.task-actions-dropdown .menu-item.disabled {
    color: #aaa;
    cursor: default;
    pointer-events: none;
}
/* Стили для панели пользовательских списков */
.user-lists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-lists-header h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.btn-create-list {
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-create-list:hover {
    background: #219a52;
}

.user-lists-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 5px;
    background: #f8f9fa;
}

.user-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-list-item:hover {
    background: #f1f3f5;
}

.list-info {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.list-name {
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.list-count {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
}

.list-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.list-edit-btn, .list-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.list-edit-btn:hover {
    opacity: 1;
    color: #f39c12;
}

.list-delete-btn:hover {
    opacity: 1;
    color: #e74c3c;
}

.no-lists {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Модальное окно для списка */
#list-modal .users-checklist-scroll {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
}
.nav-btn.reports {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}
.nav-btn.reports:hover {
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}
.reports-filters {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.report-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.summary-item {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 120px;
    text-align: center;
}
.summary-item .status-badge {
    display: block;
    font-size: 20px;
    font-weight: bold;
}
.summary-item .status-label {
    color: #666;
    font-size: 12px;
}
.report-table-container {
    overflow-x: auto;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.report-table th {
    background: #f1f3f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
}
.report-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}
.report-table tr:hover {
    background: #f8f9fa;
}
.report-table .task-description {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Печатные стили */
@media print {
    body * {
        visibility: hidden;
    }
    #reports-section, #reports-section * {
        visibility: visible;
    }
    #reports-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        padding: 20px;
    }
    .reports-filters, .summary-item, .btn-primary, .btn-secondary {
        display: none !important;
    }
    .report-table th {
        background: #f0f0f0 !important;
        color: black !important;
    }
    .report-table td {
        border: 1px solid #ccc;
    }
}
.status-assigned { background: #ffc107; color: #212529; }
.status-in_progress { background: #17a2b8; color: white; }
.status-completed { background: #28a745; color: white; }
.status-overdue { background: #dc3545; color: white; }
.status-rework { background: #fd7e14; color: white; }
.status-deleted { background: #6c757d; color: white; }
.reports-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}
.filter-group {
    min-width: 150px;
}
.filter-group.buttons-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-reset:hover {
    background: #5a6268;
}
.task-type-badge.acquaintance {
    background: #3498db;
    color: white;
}

/* ========== Acquaintance Modal Modern ========== */

.acquaintance-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -30px -30px 0 -30px;
}

.acquaintance-modal-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.acquaintance-modal-header-content i {
    font-size: 24px;
}

.acquaintance-modal-header-content h3 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.acquaintance-close {
    color: rgba(255,255,255,0.8);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.acquaintance-close:hover {
    color: white;
    transform: rotate(90deg);
}

.acquaintance-modal-body {
    padding-top: 20px;
}

.acquaintance-task-card {
    background: #f8f9ff;
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.acquaintance-task-card-header {
    background: #eef1ff;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a67d8;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e8ecf4;
}

.acquaintance-task-card-body {
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.acquaintance-task-card-body strong {
    color: #667eea;
    font-size: 1.05rem;
}

.acquaintance-task-card-body small {
    display: block;
    color: #6c757d;
    margin-top: 4px;
    font-size: 0.85rem;
}

.acquaintance-form-row {
    margin-bottom: 18px;
}

.acquaintance-form-group {
    margin-bottom: 18px;
}

.acquaintance-form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.acquaintance-form-group label i {
    margin-right: 6px;
    color: #667eea;
}

.acquaintance-user-search input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.acquaintance-user-search input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.acquaintance-executor-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: #2e7d32;
}

.acquaintance-executor-box i {
    font-size: 1.2rem;
}

.acquaintance-date-group {
    display: flex;
    gap: 12px;
}

.acquaintance-date-group input[type="date"],
.acquaintance-date-group input[type="time"] {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.acquaintance-date-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.acquaintance-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.acquaintance-form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.acquaintance-file-upload {
    position: relative;
}

.acquaintance-file-upload input[type="file"] {
    display: none;
}

.acquaintance-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #d0d5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 0.9rem;
    gap: 8px;
    background: #fafbff;
}

.acquaintance-file-label i {
    font-size: 2rem;
    color: #667eea;
}

.acquaintance-file-label:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.acquaintance-file-list {
    margin-top: 10px;
}

.acquaintance-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f2ff;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: #2c3e50;
}

.acquaintance-file-item i {
    color: #667eea;
}

.acquaintance-file-item small {
    color: #6c757d;
    margin-left: auto;
}

.acquaintance-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.acquaintance-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.chat-unread-task-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
}

.kanban-task-title .chat-unread-task-badge {
    margin-left: 4px;
}

.chat-status-no-unread {
    color: #90a4ae;
    font-size: 12px;
    margin-left: 6px;
}

.chat-status-some {
    color: #f39c12;
    font-weight: 600;
    font-size: 12px;
    margin-left: 6px;
}

.chat-status-many {
    color: #e74c3c;
    font-weight: 700;
    font-size: 12px;
    margin-left: 6px;
}

/* ============== Архив документов ============== */
.archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.archive-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.archive-header h2 i { color: #00897b; margin-right: 8px; }

.archive-count {
    color: #666;
    font-size: 14px;
}

.archive-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.archive-search-wrap {
    flex: 1;
    position: relative;
}

.archive-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.archive-search-input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.archive-search-input:focus {
    border-color: #00897b;
    box-shadow: 0 0 0 2px rgba(0,137,123,0.1);
}

.archive-filter-toggle {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    transition: all 0.2s;
}

.archive-filter-toggle:hover {
    background: #f5f5f5;
    border-color: #00897b;
    color: #00897b;
}

.archive-filters {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.archive-filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.archive-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-filter-group label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.archive-filter-group select,
.archive-filter-group input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    min-width: 140px;
}

.archive-filter-group select:focus,
.archive-filter-group input:focus {
    border-color: #00897b;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 1100px) {
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .archive-grid { grid-template-columns: 1fr; }
}

.archive-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 0.2s;
}

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

.archive-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.archive-task-id {
    color: #888;
    font-size: 12px;
}

.archive-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.archive-type-badge.document { background: #e3f2fd; color: #1565c0; }
.archive-type-badge.certificate { background: #fce4ec; color: #c62828; }
.archive-type-badge.acquaintance { background: #e8f5e9; color: #2e7d32; }
.archive-type-badge.it { background: #e0f7fa; color: #00838f; }
.archive-type-badge.ahch { background: #fff3e0; color: #e65100; }
.archive-type-badge.e_journal { background: #f3e5f5; color: #7b1fa2; }
.archive-type-badge.psychologist { background: #ede7f6; color: #4527a0; }
.archive-type-badge.speech_therapist { background: #fce4ec; color: #ad1457; }
.archive-type-badge.Social_educator { background: #e8eaf6; color: #283593; }
.archive-type-badge.hr { background: #fff8e1; color: #f9a825; }
.archive-type-badge.regular { background: #f5f5f5; color: #616161; }
.archive-type-badge.document_approval { background: #e3f2fd; color: #0277bd; }

.archive-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.archive-status.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.archive-status.closed {
    background: #eceff1;
    color: #546e7a;
}

.archive-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.archive-card-title mark {
    background: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
}

.archive-card-docfields {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.archive-card-docfields mark {
    background: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
}

.archive-card-files {
    border-top: 1px solid #eee;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-file-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.archive-file-icon {
    font-size: 14px;
}

.archive-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #444;
}

.archive-file-name mark {
    background: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
}

.archive-file-size {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

.archive-file-download {
    color: #00897b;
    text-decoration: none;
    font-size: 14px;
    padding: 2px;
}

.archive-file-download:hover {
    color: #004d40;
}

.archive-zip-btn {
    margin-top: 6px;
    padding: 6px 12px;
    background: #e0f2f1;
    color: #00695c;
    border: 1px solid #b2dfdb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s;
}

.archive-zip-btn:hover {
    background: #b2dfdb;
    border-color: #80cbc4;
}

.archive-no-files {
    color: #bbb;
    font-size: 13px;
    font-style: italic;
}

.archive-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}

.archive-card-desc {
    width: 100%;
    color: #777;
    font-size: 12px;
    line-height: 1.3;
}

.archive-card-desc mark {
    background: #fff9c4;
    padding: 0 2px;
    border-radius: 2px;
}

.archive-empty {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}

.archive-empty i {
    font-size: 64px;
    margin-bottom: 15px;
    display: block;
}

.archive-empty p {
    font-size: 16px;
}

.nav-btn.archive {
    background: #00897b;
    color: white;
}

.nav-btn.archive:hover {
    background: #00695c;
}

/* ============== Пагинация задач ============== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    margin-top: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.15s;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}