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

@font-face {
    font-family: 'Fact-SemiExpandedExtraBold';
    src: url('/assets/fonts/Fact-SemiExpandedExtraBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Fact-SemiExpanded';
    src: url('/assets/fonts/Fact-SemiExpanded.ttf') format('truetype');
}

@font-face {
    font-family: 'Fact-Italic';
    src: url('/assets/fonts/Fact-Italic.ttf') format('truetype');
}

body {
    font-family: 'Fact-SemiExpanded', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

* {
    font-family: 'Fact-SemiExpanded', sans-serif;
}

.portal-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* ======================
   ХЕДЕР
   ====================== */
.portal-header {
    background: rgba(10, 10, 10, 0.95);
    color: #ffffff;
    padding: 0 25px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #333;
    backdrop-filter: blur(10px);
	    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.portal-title {
    font-family: 'Fact-SemiExpandedExtraBold', sans-serif;
    font-size: 1.4em;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Профиль пользователя */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.user-profile:hover {
    background-color: rgba(50, 50, 50, 0.6);
    border-color: #444;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #555;
    transition: border-color 0.3s;
}

.user-profile:hover .user-avatar {
    border-color: #777;
}

.user-name {
    font-weight: 600;
    font-family: 'Fact-SemiExpanded', sans-serif;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    min-width: 180px;
    display: none;
    z-index: 1000;
    border: 1px solid #333;
    overflow: hidden;
}

.user-profile:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.3s;
    border-bottom: 1px solid #2a2a2a;
}

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

.dropdown-item:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: #777;
}

.dropdown-item:hover i {
    color: #ffffff;
}

/* ======================
   ОСНОВНОЙ КОНТЕНТ
   ====================== */
.portal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Боковое меню */
.portal-sidebar {
    width: 280px;
    background: #111111;
    color: #e0e0e0;
    overflow-y: auto;
    border-right: 1px solid #252525;
}

.sidebar-nav {
    padding: 25px 0;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 25px;
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #555, #333);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.nav-link:hover {
    background-color: #1a1a1a;
    color: #ffffff;
    padding-left: 30px;
}

.nav-link:hover::before {
    transform: translateX(0);
}

.nav-link.active {
    background-color: #2a2a2a;
    color: #ffffff;
    border-right: 4px solid #555;
}

.nav-link.active::before {
    transform: translateX(0);
    background: linear-gradient(to bottom, #888, #666);
}

.nav-link i {
    width: 22px;
    text-align: center;
    font-size: 1.1em;
}

.nav-section {
    padding: 20px 25px 10px;
}

.nav-label {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-family: 'Fact-SemiExpanded', sans-serif;
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: #0f0f0f;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #252525;
}

.content-header h1 {
    color: #ffffff;
    font-size: 1.8em;
    font-family: 'Fact-SemiExpandedExtraBold', sans-serif;
    letter-spacing: 0.5px;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.9em;
    font-family: 'Fact-SemiExpanded', sans-serif;
}

/* ======================
   КНОПКИ И ФОРМЫ
   ====================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Fact-SemiExpanded', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: 1px solid #2980b9;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #444;
    color: white;
    border: 1px solid #555;
}

.btn-secondary:hover {
    background: #555;
    transform: translateY(-1px);
}

.btn-success {
    background: #27ae60;
    color: white;
    border: 1px solid #229954;
}

.btn-success:hover {
    background: #2ecc71;
}

.btn-warning {
    background: #e67e22;
    color: white;
    border: 1px solid #d35400;
}

.btn-warning:hover {
    background: #f39c12;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: 1px solid #c0392b;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
    background: #444;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-small:hover {
    background: #555;
}

.badge {
    background: #666;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 6px;
}

.badge-new {
    background: #2ecc71;
    animation: pulse 2s infinite;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #222;
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ======================
   МОДАЛЬНЫЕ ОКНА
   ====================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #1a1a1a;
    margin: 5% auto;
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 600px;
    max-height: max-content;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    padding: 18px 25px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #333;
    background: #222;
    border-radius: 0 0 12px 12px;
}

/* ======================
   ДАШБОРД
   ====================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 12px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #444;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.stat-card:nth-child(2) .stat-icon { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.stat-card:nth-child(3) .stat-icon { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.stat-card:nth-child(4) .stat-icon { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
    font-family: 'Fact-SemiExpandedExtraBold', sans-serif;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 1s ease;
}

/* Виджеты */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.widget {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.widget-header {
    padding: 18px 22px;
    background: #222;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-action {
    background: #333;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.widget-action:hover {
    background: #444;
    transform: rotate(90deg);
}

.widget-content {
    padding: 22px;
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.widget-footer {
    padding: 15px 22px;
    background: #222;
    border-top: 1px solid #333;
    text-align: right;
}

.widget-footer a {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.widget-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ======================
   ДОСКА ЗАДАЧ
   ====================== */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.tasks-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tasks-stats {
    display: flex;
    gap: 12px;
}

.tasks-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #222;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 13px;
    color: #ccc;
}

.tasks-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 0;
}

.tasks-tab {
    background: none;
    border: none;
    padding: 12px 22px;
    color: #aaa;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tasks-tab:hover {
    color: #fff;
}

.tasks-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tasks-content {
    display: none;
}

.tasks-content.active {
    display: block;
}

/* Канбан-доска */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.kanban-column {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    max-height: 700px;
}

.column-header {
    padding: 15px 18px;
    border-bottom: 1px solid #333;
    background: #222;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.column-header h3 {
    margin: 0;
    color: #fff;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.column-header h3 i {
    flex-shrink: 0;
}

.column-count {
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 8px;
}

.column-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.column-body.drag-over {
    background: rgba(52, 152, 219, 0.08);
}

/* Карточка задачи */
.task-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px;
    cursor: move;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card:hover {
    border-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.task-card.archived {
    cursor: pointer;
    opacity: 0.85;
    background: #1e1e1e;
}

.task-card.archived:hover {
    opacity: 1;
    border-color: #3498db;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.task-title {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    word-break: break-word;
}

.task-priority {
    flex-shrink: 0;
}

.priority-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.priority-low { background: #27ae60; color: white; }
.priority-medium { background: #f39c12; color: white; }
.priority-high { background: #e74c3c; color: white; }
.priority-critical { 
    background: #c0392b; 
    color: white;
    animation: pulse 1.5s infinite;
}

.task-description {
    color: #ccc;
    font-size: 13px;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    position: relative;
    word-break: break-word;
}

.task-description.expanded {
    max-height: none;
}

.show-more {
    color: #3498db;
    cursor: pointer;
    font-size: 11px;
    margin-top: 5px;
    display: inline-block;
    font-weight: 500;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    color: #666;
}

.deadline-expired { color: #e74c3c !important; font-weight: bold; }
.deadline-today { color: #f39c12 !important; font-weight: bold; }
.deadline-tomorrow { color: #3498db !important; }

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #333;
    margin-top: 5px;
}

.task-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 11px;
    cursor: default;
    transition: color 0.3s;
}

.stat-item:hover {
    color: #3498db;
}

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

/* Архив задач */
.tasks-archive-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 9px 16px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    white-space: nowrap;
}

.filter-tab:hover {
    background: #252525;
    color: #fff;
}

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

.search-box {
    position: relative;
    flex: 1;
    max-width: 280px;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 9px 35px 9px 12px;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 13px;
}

.archived-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Детали задачи */
.task-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-info {
    background: #222;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #333;
}

.task-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.task-tabs {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.task-tab-nav {
    display: flex;
    background: #222;
    border-bottom: 1px solid #333;
}

.task-tab-btn {
    background: none;
    border: none;
    padding: 14px 20px;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
}

.task-tab-btn:hover {
    color: #fff;
    background: #252525;
}

.task-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.task-tab-content {
    padding: 20px;
}

.task-tab-pane {
    display: none;
}

.task-tab-pane.active {
    display: block;
}

/* Комментарии */
.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    background: #222;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #333;
}

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

.comment-header strong {
    color: #3498db;
    font-size: 13px;
}

.comment-header small {
    color: #888;
    font-size: 11px;
}

.comment-body p {
    margin: 0;
    color: #ccc;
    line-height: 1.5;
    font-size: 13px;
}

.add-comment {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-comment textarea {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 13px;
}

.add-comment textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Файлы */
.upload-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(52, 152, 219, 0.05);
}

.upload-area:hover {
    background: rgba(52, 152, 219, 0.1);
}

.upload-area.dragover {
    background: rgba(52, 152, 219, 0.2);
    border-color: #2980b9;
}

.upload-area i {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 10px;
}

.upload-area p {
    color: #888;
    margin: 0;
    font-size: 14px;
}

.files-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #222;
    border-radius: 8px;
    border: 1px solid #333;
}

.file-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #3498db;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: #fff;
    font-weight: 500;
    margin-bottom: 2px;
    word-break: break-all;
    font-size: 13px;
}

.file-meta {
    color: #888;
    font-size: 11px;
}

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

/* История */
.history-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: #222;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #333;
}

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

.history-header strong {
    color: #3498db;
    font-size: 13px;
}

.history-header small {
    color: #888;
    font-size: 11px;
}

.history-body p {
    margin: 4px 0;
    color: #ccc;
    line-height: 1.5;
    font-size: 13px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    border: 1px solid #34495e;
    border-radius: 8px;
    padding: 14px 18px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    max-width: 340px;
    pointer-events: auto;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #27ae60;
    border-color: #229954;
}

.notification-error {
    background: #e74c3c;
    border-color: #c0392b;
}

.notification i {
    font-size: 16px;
    flex-shrink: 0;
}

.notification span {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.close-notification {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    flex-shrink: 0;
    margin-left: 5px;
}

.close-notification:hover {
    background: rgba(255,255,255,0.1);
}

/* Состояния загрузки/пустые */
.loading, .no-data, .error, .no-tasks, .no-comments, .no-files, .no-history {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 14px;
}

.loading {
    color: #3498db;
}

.no-tasks, .no-comments, .no-files, .no-history {
    color: #666;
}

.error {
    color: #e74c3c;
}

/* ======================
   АНИМАЦИИ
   ====================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card, .widget, .action-btn {
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

/* ======================
   ПОЛОСА ПРОКРУТКИ
   ====================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* ======================
   АДАПТИВНОСТЬ
   ====================== */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .archived-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .portal-sidebar {
        width: 70px;
    }
    
    .nav-link span,
    .nav-label,
    .nav-section {
        display: none;
    }
    
    .portal-header {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .tasks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tasks-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .kanban-column {
        min-height: 400px;
        max-height: 500px;
    }
    
    .column-body {
        min-height: 300px;
    }
    
    .tasks-tabs {
        flex-wrap: wrap;
    }
    
    .tasks-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tasks-archive-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .task-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .portal-sidebar {
        width: 60px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-profile {
        padding: 8px;
    }
    
    .task-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .archived-grid {
        grid-template-columns: 1fr;
    }
    
    .task-tab-nav {
        flex-wrap: wrap;
    }
    
    .task-tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* ======================
   ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ
   ====================== */
/* Роли пользователей */
.role-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
}

.role-administrator { background: #e74c3c; color: white; }
.role-editor { background: #3498db; color: white; }
.role-author { background: #2ecc71; color: white; }
.role-contributor { background: #f39c12; color: white; }
.role-subscriber { background: #95a5a6; color: white; }

/* Быстрые ссылки */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.quick-link {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quick-link:hover {
    background: #252525;
    border-color: #3498db;
    transform: translateY(-2px);
}

.quick-link i {
    font-size: 22px;
    color: #3498db;
}

.quick-link span {
    font-size: 12px;
    line-height: 1.2;
}

/* Адаптивные изображения */
img {
    max-width: 100%;
    height: auto;
}

/* Выделение текста */
::selection {
    background: rgba(52, 152, 219, 0.3);
    color: white;
}

/* Фокус для доступности */
:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Печать */
@media print {
    .portal-sidebar,
    .portal-header,
    .tasks-actions,
    .task-actions,
    .modal-footer {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
        background: white;
        color: black;
    }
    
    .task-card {
        break-inside: avoid;
        border: 1px solid #ddd;
        color: black;
        background: white;
    }
}

.form-control {
    background-color: #151515; /* Чуть светлее общего фона */
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    padding: 10px 14px;
    font-family: 'Fact-SemiExpanded', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    outline: none;
}

/* Эффект при фокусе (синее свечение в стиле портала) */
.form-control:focus {
    border-color: #3498db;
    background-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Стилизация выпадающего списка (Select) */
select.form-control {
    appearance: none; /* Убираем стандартную стрелку браузера */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

/* Стилизация многострочного текста (Textarea) */
textarea.form-control {
    min-height: 80px;
    resize: vertical; /* Разрешаем менять высоту, но не ширину */
    line-height: 1.5;
}

/* Плейсхолдеры (текст-подсказка) */
.form-control::placeholder {
    color: #555;
    opacity: 1;
}

/* Состояния ошибки */
.form-control.error {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

/* Загрузчик (Overlay) */
.loader-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 9999; justify-content: center; align-items: center; flex-direction: column; color: white; }
.spinner { width: 40px; height: 40px; border: 4px solid #333; border-top: 4px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Карточка задачи */
.task-card { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; padding: 12px; margin-bottom: 12px; cursor: grab; transition: 0.2s; }
.task-card:hover { border-color: #444; }
.task-title { font-weight: bold; font-size: 14px; margin-bottom: 0; color: #fff; line-height: 1.3; }

/* Умное описание (2 строки) */
.task-desc-wrap { margin-bottom: 0; }
.task-desc { 
    font-size: 12px; color: #aaa; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
    overflow: hidden; word-break: break-word;
}
.task-desc.expanded { -webkit-line-clamp: unset; display: block; }
.btn-more { display: none; background: none; border: none; color: #3498db; font-size: 11px; padding: 0; cursor: pointer; margin-top: 4px; }

/* Мета-данные */
.task-meta { font-size: 11px; color: #666; display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.task-deadline { color: #e74c3c; display: flex; align-items: center; gap: 5px; font-weight: 500; }

/* Футер карточки */
.task-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #2a2a2a; padding-top: 10px; }
.btn-chat-open { 
    width: 32px; height: 32px; min-width: 32px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 6px; background: #252525; color: #888; border: 1px solid #333; cursor: pointer; transition: 0.2s; 
}
.btn-chat-open:hover { background: #333; color: #3498db; border-color: #3498db; }

/* Сообщения в чате */
.msg-wrapper { display: flex; flex-direction: column; margin-bottom: 15px; }
.msg-my { align-items: flex-end; }
.msg-bubble {padding: 10px 15px; border-radius: 12px; max-width: 85%; font-size: 13px; white-space: pre-wrap; word-break: break-word; 
}
.msg-my .msg-bubble { background: #1a3a5f; color: white; }
.msg-other .msg-bubble { background: #2a2a2a; color: white; }
.msg-sys { text-align: center; color: #666; font-size: 11px; margin: 0 0; }

/* Блок файла в чате */
.file-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05); border: 1px solid #444; padding: 8px; border-radius: 6px; text-decoration: none; color: #fff; margin-top: 5px; }
.file-card i { color: #3498db; font-size: 18px; }

/* Стили для Канбана */
.kanban-wrapper { display: flex; gap: 20px; margin-top: 20px;}
.kanban-column { background: #151515; border-radius: 8px; width: 33%; min-height: 35vh; padding: 10px; border: 1px solid #222; }
.column-header { font-weight: bold; padding: 10px; border-bottom: 2px solid #3498db; margin-bottom: 15px; text-transform: uppercase; font-size: 12px; }
.task-card { background: #222; border: 1px solid #333; padding: 15px; border-radius: 6px; margin-bottom: 10px; cursor: grab; }
.task-card:active { cursor: grabbing; }
.desc-short { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: #aaa; margin: 10px 0; }
.desc-full { display: none; font-size: 13px; color: #eee; margin: 10px 0; border-top: 1px solid #333; padding-top: 5px; }
.tabs-header { display: flex; border-bottom: 1px solid #333; padding-bottom: 10px; gap: 10px; }
.tab-btn { background: none; border: none; color: #888; cursor: pointer; padding: 10px 20px; font-family: inherit; }
.tab-btn.active { color: #fff; border-bottom: 2px solid #3498db; }
.chat-body { height: 300px; overflow-y: auto; background: #111; padding: 15px; display: flex; flex-direction: column; gap: 10px; }

 .emp-container {
        background: var(--c-card);
        border: 1px solid var(--c-border);
        border-radius: 12px;
        overflow: hidden;
        margin-top: 10px;
    }

    .emp-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

    .emp-table th {
        background: rgba(255,255,255,0.02);
        padding: 15px 20px;
        text-align: left;
        color: #555;
        font-size: 12px;
        text-transform: uppercase;
        border-bottom: 1px solid var(--c-border);
    }

    .emp-table td {
        padding: 12px 20px;
        border-bottom: 1px solid var(--c-border);
        vertical-align: middle;
    }

    .emp-table tr:hover { background: rgba(255,255,255,0.01); }

    /* Блок пользователя с аватаркой */
    .user-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        background: #222;
        border: 1px solid var(--c-border);
    }

    .user-name {
        font-weight: 600;
        color: #eee;
        display: block;
    }

    .user-login {
        font-size: 11px;
        color: #555;
    }

    /* Статусы */
    .badge-online {
        background: rgba(46, 204, 113, 0.15);
        color: #2ecc71;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 800;
        border: 1px solid rgba(46, 204, 113, 0.3);
    }

    .task-count {
        background: var(--c-accent);
        color: #fff;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: bold;
    }

    .group-label {
        color: #999;
    }