/* ============================================================
   Делорум v2 — Основные стили
   Design System: CSS переменные, компоненты, утилиты
   ============================================================ */

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

/* ── Переменные (светлая тема) ───────────────────────────── */
:root {
  --accent:          #7C3AED;
  --accent-dark:     #6D28D9;
  --accent-light:    rgba(124,58,237,.12);
  --accent-bg:       rgba(124,58,237,.06);

  --text:            #111827;
  --text-secondary:  #374151;
  --text-muted:      #6B7280;
  --text-light:      #9CA3AF;

  --bg:              #F3F4F6;
  --bg-card:         #FFFFFF;
  --bg-hover:        rgba(0,0,0,.04);
  --bg-tooltip:      #1F2937;
  --bg-overlay:      rgba(0,0,0,.5);

  --border:          #E5E7EB;
  --border-light:    #F3F4F6;

  --radius-sm:       6px;
  --radius:          10px;
  --radius-lg:       14px;
  --radius-xl:       20px;

  --shadow-sm:       0 1px 3px rgba(0,0,0,.08);
  --shadow:          0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:       0 8px 32px rgba(0,0,0,.14);

  --sidebar-w:       240px;
  --header-h:        56px;

  --priority-low:      #6B7280;
  --priority-normal:   #3B82F6;
  --priority-high:     #F59E0B;
  --priority-critical: #EF4444;

  --success: #10B981;
  --warning: #F59E0B;
  --danger:  #EF4444;
  --info:    #3B82F6;

  --transition: .18s ease;
}

/* ── Тёмная тема ─────────────────────────────────────────── */
[data-theme="dark"] {
  --text:           #F9FAFB;
  --text-secondary: #D1D5DB;
  --text-muted:     #9CA3AF;
  --text-light:     #6B7280;
  --bg:             #111827;
  --bg-card:        #1F2937;
  --bg-hover:       rgba(255,255,255,.06);
  --border:         #374151;
  --border-light:   #1F2937;
}

/* ── Базовые стили ───────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Golos Text', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

/* ── Приложение — shell ──────────────────────────────────── */
.app-root {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Сайдбар ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 20;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: var(--header-h);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.4px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-icon svg { width: 18px; height: 18px; }

.sidebar-collapse-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,.25); }

/* Nav */
.sidebar-nav {
  padding: 8px;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-align: left;
  position: relative;
}

.nav-item:hover  { background: rgba(255,255,255,.15); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.2);  color: #fff; font-weight: 700; }

.nav-item-icon { font-size: 18px; flex-shrink: 0; line-height: 1; }
.nav-label     { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Проекты в сайдбаре */
.sidebar-section {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
  min-height: 0;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 2px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.5);
  margin-bottom: 2px;
}

.sidebar-add-btn {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.sidebar-add-btn:hover { background: rgba(255,255,255,.25); }

.project-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.project-item:hover  { background: rgba(255,255,255,.12); color: #fff; }
.project-item.active { background: rgba(255,255,255,.2);  color: #fff; font-weight: 600; }

.project-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Подвал сайдбара */
.sidebar-footer {
  padding: 8px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.12);
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: #fff;
}
.user-panel:hover { background: rgba(255,255,255,.12); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: rgba(255,255,255,.6); }

/* ── Свёрнутый сайдбар ───────────────────────────────────── */
.sidebar { transition: width .22s ease; }
.sidebar.collapsed { width: 60px; overflow: visible; }

.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-section-header,
.sidebar.collapsed #projects-list,
.sidebar.collapsed #sidebar-projects-collapsed-placeholder,
.sidebar.collapsed .user-info { display: none !important; }

.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .sidebar-collapse-btn {
  position: absolute; right: -13px; top: 14px;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%; width: 26px; height: 26px;
  box-shadow: var(--shadow-sm);
}
.sidebar.collapsed .sidebar-nav { padding: 8px 6px; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .nav-item-icon { font-size: 20px; }
.sidebar.collapsed .user-panel { justify-content: center; }
.sidebar.collapsed .project-item { justify-content: center; }
.sidebar.collapsed .project-dot { width: 10px; height: 10px; }

/* Tooltips в свёрнутом меню */
.sidebar.collapsed [data-tooltip] { position: relative; }
.sidebar.collapsed [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--bg-tooltip); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s; z-index: 500;
  box-shadow: var(--shadow);
}
.sidebar.collapsed [data-tooltip]:hover::after { opacity: 1; }

/* Оверлей (мобиль) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 19;
}

/* ── Основная область ────────────────────────────────────── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Шапка ───────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 10;
}

.header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Таймер в шапке */
.header-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border: none;
  transition: background var(--transition);
}
.header-timer:hover { background: rgba(124,58,237,.2); }
.header-timer .timer-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; animation: pulse 1.5s infinite; }

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

/* Кнопки шапки */
.header-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.header-btn:hover { background: var(--bg-hover); color: var(--text); }

.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ── Контент ─────────────────────────────────────────────── */
.app-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Канбан ──────────────────────────────────────────────── */
.kanban-wrap {
  height: 100%;
  overflow: auto;
  padding: 16px;
}

.kanban-board {
  display: flex;
  gap: 12px;
  height: 100%;
  min-height: 0;
  align-items: flex-start;
}

.kanban-column {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-h) - 48px);
  transition: box-shadow var(--transition), opacity var(--transition);
}

.kanban-column.collapsed-col { width: 48px; }
.kanban-column.drag-over { box-shadow: 0 0 0 2px var(--accent); }
.kanban-column.col-drag-over-left  { box-shadow: -3px 0 0 0 var(--accent); }
.kanban-column.col-drag-over-right { box-shadow:  3px 0 0 0 var(--accent); }

.column-header {
  padding: 12px 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  cursor: grab;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.column-header:active { cursor: grabbing; }

.column-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.column-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 1px 7px;
  border-radius: 10px;
}

.column-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 16px;
  transition: background var(--transition);
  line-height: 1;
}
.column-menu-btn:hover { background: var(--bg-hover); color: var(--text); }

.column-collapse-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 11px; padding: 2px 4px; border-radius: 4px;
}

.column-cards {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

/* Быстрое создание задачи */
.column-quick-add {
  padding: 6px 8px 8px;
  flex-shrink: 0;
}

.quick-add-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  transition: border-color var(--transition), color var(--transition);
  outline: none;
  resize: none;
}
.quick-add-input:focus {
  border-color: var(--accent);
  color: var(--text);
  background: var(--bg-card);
  border-style: solid;
}
.quick-add-input::placeholder { color: var(--text-light); }

/* ── Карточка задачи ─────────────────────────────────────── */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  user-select: none;
}
.task-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.task-card.dragging { opacity: .5; }
.task-card.drag-over-card { border-top: 2px solid var(--accent); }

/* Полоска приоритета */
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: var(--radius) 0 0 var(--radius);
}
.task-card[data-priority="low"]::before      { background: var(--priority-low); }
.task-card[data-priority="normal"]::before   { background: transparent; }
.task-card[data-priority="high"]::before     { background: var(--priority-high); }
.task-card[data-priority="critical"]::before { background: var(--priority-critical); }

.task-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}
.task-card.completed .task-card-title { text-decoration: line-through; color: var(--text-muted); }

.task-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-muted);
  white-space: nowrap;
}
.task-chip.overdue { background: rgba(239,68,68,.1); color: var(--danger); }
.task-chip.today   { background: rgba(245,158,11,.1); color: var(--warning); }
.task-chip.active  { background: var(--accent-light); color: var(--accent); }

.task-assignee {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

.task-labels {
  display: flex; gap: 3px; flex-wrap: wrap;
}
.task-label {
  height: 4px; width: 24px;
  border-radius: 2px;
}

.drag-placeholder {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  height: 60px;
  background: var(--accent-bg);
}

/* Кнопка добавить колонку */
.kanban-add-col {
  width: 200px;
  flex-shrink: 0;
  height: 48px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition);
  align-self: flex-start;
}
.kanban-add-col:hover { border-color: var(--accent); color: var(--accent); }

/* ── Кнопки ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }
.btn-danger    { background: rgba(239,68,68,.1); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }
.btn-ghost     { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 6px; }

/* ── Поля ввода ──────────────────────────────────────────── */
.input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition);
}
.input:focus { border-color: var(--accent); }
.input-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.input-group { margin-bottom: 14px; }

select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 80px; }

/* ── Модальные окна ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .2s ease;
  width: 100%;
}

.modal-sm { max-width: 380px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 720px; }

.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text-muted); padding: 2px; }
.modal-body  { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

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

/* ── Дропдаун ────────────────────────────────────────────── */
.dropdown {
  position: fixed;
  z-index: 250;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 4px;
  animation: fadeIn .1s ease;
}

.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  border: none; background: none;
  font-size: 13px; color: var(--text);
  cursor: pointer; border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--transition);
}
.dropdown-item:hover:not(:disabled) { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item:disabled { opacity: .4; cursor: default; }
.dropdown-icon { font-size: 15px; }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Toast уведомления ───────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  pointer-events: all;
  animation: toastIn .25s cubic-bezier(.34,1.56,.64,1);
  max-width: 360px;
}
.toast.hiding { animation: toastOut .2s ease forwards; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
.toast.info    { border-left: 3px solid var(--info);    }

@keyframes toastIn  { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to   { transform: translateY(10px); opacity: 0; } }

/* ── Уведомления (панель) ────────────────────────────────── */
.notifications-panel {
  position: fixed; top: var(--header-h); right: 0;
  width: 360px; max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex; flex-direction: column;
  animation: slideIn .2s ease;
}

@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.notifications-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700;
}

.notif-list { flex: 1; overflow-y: auto; }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
  display: flex; gap: 10px;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: var(--accent-bg); }
.notif-icon { font-size: 18px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-text  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-time  { font-size: 11px; color: var(--text-light); margin-top: 3px; }

/* ── Поиск ───────────────────────────────────────────────── */
.search-modal {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 300;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  animation: fadeIn .15s ease;
}

.search-box {
  width: 100%; max-width: 600px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input {
  width: 100%;
  padding: 16px 20px;
  border: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  outline: none;
  border-bottom: 1px solid var(--border);
}

.search-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.search-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); padding: 6px 8px 4px; letter-spacing: .5px; }
.search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.search-item:hover { background: var(--bg-hover); }
.search-item-title { font-size: 14px; color: var(--text); }
.search-item-sub   { font-size: 12px; color: var(--text-muted); }

/* ── Скелетон загрузки ───────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Пустые состояния ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon  { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-sub   { font-size: 14px; margin-bottom: 20px; }

/* ── Бейджи ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success  { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning  { background: rgba(245,158,11,.12);  color: var(--warning); }
.badge-danger   { background: rgba(239,68,68,.12);   color: var(--danger); }
.badge-info     { background: rgba(59,130,246,.12);  color: var(--info); }
.badge-accent   { background: var(--accent-light);   color: var(--accent); }
.badge-muted    { background: var(--bg-hover);       color: var(--text-muted); }

/* ── Мобильная адаптация ─────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -240px;
    top: 0; bottom: 0;
    z-index: 20;
    transition: left var(--transition);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.visible { display: block; }

  .app-main { width: 100%; }
  .kanban-column { width: 260px; }
  .notifications-panel { width: 100%; border-radius: 0; }

  /* FAB — плавающая кнопка на мобиле */
  .fab {
    position: fixed; bottom: 24px; right: 20px;
    width: 56px; height: 56px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 50;
  }
}

/* ── Утилиты ─────────────────────────────────────────────── */
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }

/* ── Скроллбар ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
