/* style.css - Модерен премиум стил за Задачи.бг (Glassmorphism & Dark/Light Mode) */

/* ------------------- Променливи (Теми) ------------------- */
:root {
    /* Тъмна тема (по подразбиране) */
    --bg-main: radial-gradient(circle at top, #181926 0%, #0c0d14 100%);
    --sidebar-bg: rgba(20, 21, 33, 0.6);
    --glass-bg: rgba(30, 31, 50, 0.5);
    --glass-bg-hover: rgba(40, 42, 68, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-primary: #f4f4f7;
    --text-secondary: #a0a5b5;
    --border-color: rgba(255, 255, 255, 0.06);

    /* Цветови акценти */
    --primary: hsl(245, 80%, 65%);
    --primary-hover: hsl(245, 80%, 70%);
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Приоритети */
    --priority-low: #6b7280;
    --priority-medium: #3b82f6;
    --priority-high: #f97316;
    --priority-urgent: #ef4444;

    /* Статуси */
    --status-todo: #6366f1;
    --status-progress: #f59e0b;
    --status-review: #a855f7;
    --status-done: #10b981;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-sm: 8px;
}

/* Светла тема */
.light-theme {
    --bg-main: radial-gradient(circle at top, #fcfdfe 0%, #ebf0f6 100%);
    --sidebar-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-bg-hover: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(99, 102, 241, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.05);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: rgba(99, 102, 241, 0.06);
    --primary: hsl(245, 75%, 55%);
    --primary-hover: hsl(245, 75%, 60%);
    --primary-glow: rgba(99, 102, 241, 0.25);
}

/* ------------------- Базови Стили ------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Помощни класове */
.hidden {
    display: none !important;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

/* Гранични индикатори за статистика */
.border-indigo { border-left: 4px solid var(--status-todo); }
.border-emerald { border-left: 4px solid var(--status-done); }
.border-amber { border-left: 4px solid var(--status-progress); }
.border-purple { border-left: 4px solid var(--status-review); }
.border-rose { border-left: 4px solid var(--status-danger); }

/* Цветове за бадж статистика */
.bg-indigo { background: rgba(99, 102, 241, 0.15); color: var(--status-todo); }
.bg-emerald { background: rgba(16, 185, 129, 0.15); color: var(--status-done); }
.bg-amber { background: rgba(245, 158, 11, 0.15); color: var(--status-progress); }
.bg-purple { background: rgba(168, 85, 247, 0.15); color: var(--status-review); }
.bg-rose { background: rgba(239, 68, 68, 0.15); color: var(--status-danger); }

/* Бутони */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--glass-border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

/* ------------------- Вход / Регистрация (Auth Screen) ------------------- */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    animation: modal-fade-in 0.5s ease-out;
}

.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-accent {
    font-size: 3rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--primary-glow);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 var(--primary-glow);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.auth-form h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: left;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-toggle {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ------------------- Приложение Контейнер (App Container) ------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Странична лента (Sidebar) */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    border-left: none;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
}

.user-profile-section {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

.user-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
}

.sidebar-nav ul {
    list-style: none;
    margin-bottom: 24px;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-nav li:hover a {
    color: var(--primary);
    background: var(--glass-border);
}

.sidebar-nav > ul > li.active a {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.projects-list li.active a {
    background: color-mix(in srgb, var(--proj-color) 15%, transparent);
    color: var(--text-primary);
    border-left: 3px solid var(--proj-color);
    padding-left: 13px;
    font-weight: 600;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-left: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-icon-add {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 12px;
    transition: var(--transition);
}

.btn-icon-add:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.projects-list li {
    position: relative;
}

.projects-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Долна секция на sidebar */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-footer:hover {
    background: var(--glass-border);
    color: var(--text-primary);
}

.btn-logout-style:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

/* ------------------- Главно съдържание (Main Content) ------------------- */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

.content-view {
    animation: modal-fade-in 0.4s ease-out;
}

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

.view-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* ------------------- Kanban Борд ------------------- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background: rgba(20, 21, 33, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 16px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.light-theme .kanban-column {
    background: rgba(255, 255, 255, 0.35);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.column-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
}

.column-count {
    background: var(--glass-border);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.column-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
}

/* Карточки за Задачи */
.task-card {
    cursor: grab;
    padding: 16px;
    position: relative;
    user-select: none;
    border-left: 3px solid transparent;
}

.task-card:hover {
    transform: translateY(-2px);
    background: var(--glass-bg-hover);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.task-card:active {
    cursor: grabbing;
}

.task-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
}

.task-project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
}

.task-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-due {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due.overdue {
    color: var(--danger);
    font-weight: 500;
}

.task-assignees-avatars {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1.5px solid var(--bg-main);
    margin-left: -6px;
}

.mini-avatar:first-child {
    margin-left: 0;
}

/* Специфични приоритети цветове */
.priority-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.prio-low { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }
.prio-medium { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.prio-high { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.prio-urgent { background: rgba(239, 68, 68, 0.15); color: #f87171; animation: pulse-border 1.5s infinite; }

/* Статус тагове */
.status-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}
.status-todo-badge { background: rgba(99, 102, 241, 0.15); color: var(--status-todo); }
.status-progress-badge { background: rgba(245, 158, 11, 0.15); color: var(--status-progress); }
.status-review-badge { background: rgba(168, 85, 247, 0.15); color: var(--status-review); }
.status-done-badge { background: rgba(16, 185, 129, 0.15); color: var(--status-done); }

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ------------------- Изглед: Списък с задачи ------------------- */
.tasks-list-container {
    padding: 24px;
}

.task-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
}

.task-list-item:hover {
    background: var(--glass-border);
}

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

.task-list-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-complete-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-complete-checkbox:hover {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.task-list-item.done-task .btn-complete-checkbox {
    background: var(--success);
    border-color: var(--success);
    position: relative;
}

.task-list-item.done-task .btn-complete-checkbox::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 0.6rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-list-item.done-task h4 {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* ------------------- Сътрудничество по Проекти (Layout) ------------------- */
.project-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.project-info-block {
    display: flex;
    flex-direction: column;
}

.project-color-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.project-content-layout {
    display: flex;
    gap: 30px;
}

.project-tasks-pane {
    flex: 1;
}

.project-tasks-pane h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.project-members-pane {
    width: 320px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 40px;
}

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

.members-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

.member-role {
    font-size: 0.75rem;
    background: var(--glass-border);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    color: var(--text-secondary);
}

/* ------------------- МОДАЛНИ ДИАЛОЗИ (Dialog Styling) ------------------- */
dialog.modal-dialog {
    margin: auto;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 24px;
    border-radius: var(--border-radius);
    outline: none;
    color: var(--text-primary);
    animation: modal-fade-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

dialog.modal-large {
    max-width: 850px;
}

dialog::backdrop {
    background: rgba(12, 13, 20, 0.85);
    backdrop-filter: blur(8px);
}

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

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Цветове за проект */
.color-picker-grid {
    display: flex;
    gap: 12px;
}

.color-radio {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-radio input {
    opacity: 0;
    width: 0;
    height: 0;
}

.color-radio:has(input:checked) {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

/* Търсене на потребители */
.search-results-list {
    margin-top: 12px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.search-user-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--primary);
}

/* Избор на изпълнители */
.assignees-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--sidebar-bg);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--glass-border);
}

.assignee-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--glass-border);
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.assignee-checkbox-label input {
    margin-right: 4px;
}

.assignee-checkbox-label:has(input:checked) {
    background: var(--primary-glow);
    border: 1px solid var(--primary);
}

/* Ръчно тестване/разстояния */
.row {
    display: flex;
    gap: 16px;
}

.col {
    flex: 1;
}

/* ------------------- Преглед на задача и Дискусия (Task Details Layout) ------------------- */
.task-details-layout {
    display: flex;
    gap: 24px;
}

.task-details-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-section h3 {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-description-text {
    line-height: 1.6;
    font-size: 1rem;
}

.task-details-meta {
    width: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: fit-content;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.detail-assignees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* Коментари чат секция */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 12px;
}

.comment-bubble {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    background: var(--sidebar-bg);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 0.85rem;
    font-weight: 600;
}

.comment-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.comment-content {
    font-size: 0.85rem;
    line-height: 1.4;
}

.comment-input-area {
    display: flex;
    gap: 10px;
}

.comment-input-area input {
    flex: 1;
    padding: 10px 16px;
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.comment-input-area input:focus {
    border-color: var(--primary);
}

.btn-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
}

/* ------------------- TOAST ИЗВЕСТИЯ (Toast Notifications) ------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--border-radius-sm);
    background: rgba(20, 21, 33, 0.9);
    border-left: 4px solid var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 250px;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: toast-slide-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-info { border-left-color: var(--info); }

@keyframes toast-slide-in {
    from { transform: translateX(100%) translateY(20px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}

/* ------------------- Мобилна Адаптивност ------------------- */
@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .kanban-board {
        grid-template-columns: 1fr;
    }
    .project-content-layout {
        flex-direction: column;
    }
    .project-members-pane {
        width: 100%;
        position: relative;
        top: 0;
    }
    .row {
        flex-direction: column;
        gap: 0;
    }
    .task-details-layout {
        flex-direction: column;
    }
    .task-details-meta {
        width: 100%;
    }
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Филтърна лента във Моите задачи */
.my-tasks-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
    border-radius: var(--border-radius-sm);
}

.my-tasks-toolbar .toolbar-left,
.my-tasks-toolbar .toolbar-right {
    display: flex;
    align-items: center;
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    user-select: none;
    font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.light-theme .filter-tabs {
    background: rgba(0, 0, 0, 0.04);
}

.filter-tab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.filter-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.light-theme .filter-tab:hover {
    background: rgba(0, 0, 0, 0.02);
}

.filter-tab.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Интерактивен статус бадж за списъчен изглед */
.status-select-badge {
    font-size: 0.7rem;
    padding: 2px 20px 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a5b5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 10px;
}

.light-theme .status-select-badge {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.status-select-badge:focus {
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.status-select-badge.status-todo-badge { background-color: rgba(99, 102, 241, 0.15); color: var(--status-todo); }
.status-select-badge.status-progress-badge { background-color: rgba(245, 158, 11, 0.15); color: var(--status-progress); }
.status-select-badge.status-review-badge { background-color: rgba(168, 85, 247, 0.15); color: var(--status-review); }
.status-select-badge.status-done-badge { background-color: rgba(16, 185, 129, 0.15); color: var(--status-done); }

.status-select-badge option {
    background-color: #1a1b26;
    color: var(--text-primary);
    text-transform: none;
}

.light-theme .status-select-badge option {
    background-color: #ffffff;
    color: #111827;
}

/* Кошче стилове */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

.task-deleted-info {
    font-size: 0.75rem;
    color: var(--danger);
    font-weight: 500;
    margin-left: 8px;
}

.trash-icon-accent {
    color: var(--danger);
    font-size: 1.2rem;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------- Изглед: Администрация (Administration Pane) ------------------- */
.admin-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

.admin-card {
    padding: 24px;
    border-radius: var(--border-radius);
    height: fit-content;
}

.admin-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.admin-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-pending-item {
    padding: 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.light-theme .admin-pending-item {
    background: rgba(0, 0, 0, 0.02);
}

.admin-pending-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-pending-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.admin-pending-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-select-dept {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--sidebar-bg);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    width: 100%;
}

.admin-select-dept option {
    background: #1e1f29;
    color: var(--text-primary);
}

.light-theme .admin-select-dept option {
    background: #ffffff;
    color: #000000;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.light-theme .admin-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-badge-admin {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.admin-badge-user {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.admin-badge-dept {
    background: rgba(99, 102, 241, 0.15);
    color: var(--status-todo);
}

/* --- Известия и Профил --- */
.notification-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    display: inline-block;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.notification-badge.hidden {
    display: none;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    padding: 24px;
    border-radius: var(--border-radius);
    height: fit-content;
}

.profile-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.profile-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

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

.profile-info-item .label {
    color: var(--text-secondary);
}

.profile-info-item .value {
    font-weight: 500;
    color: var(--text-primary);
}

.notifications-container {
    padding: 24px;
    border-radius: var(--border-radius);
    max-height: 70vh;
    overflow-y: auto;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    padding: 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.01);
}

.notification-item.clickable {
    cursor: pointer;
}

.notification-item.clickable:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.light-theme .notification-item.clickable:hover {
    background: rgba(0, 0, 0, 0.01);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.3);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

.notification-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    padding-left: 8px;
}

.notification-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding-left: 8px;
}

.notification-item .time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    align-self: flex-end;
}
