/* ANATA brand tokens + компоненты. См. CLAUDE.md → "Бренд", "Layout", "UI-правила". */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Hide Vue templates until mounted */
[v-cloak] { display: none !important; }

/* Global: disable text selection everywhere. Only board names and card names
   stay selectable. Form inputs / contenteditable keep selection so typing
   and editing still work. */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.ak-board-tile-title,
.ak-board-title,
.ak-card-title,
.ak-task-title,
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* Prevent accidental drag of decorative logos/avatars. */
img.ak-board-icon, img.ak-avatar-img, .ak-brand img,
.ak-dash-board-icon, .ak-board-tile-icon {
  -webkit-user-drag: none;
  user-drag: none;
}

:root {
  --ak-primary: #28D6B1;
  --ak-primary-light: #89EDD9;
  --ak-primary-dark: #1FAE85;
  --ak-accent: #0FBF8C;

  --ak-bg: #F6FAF9;
  --ak-surface: #FFFFFF;
  --ak-surface-alt: #EEF7F3;
  --ak-surface-hover: #E8F6EF;
  --ak-border: #E2F0EA;
  --ak-border-strong: #C8E4D8;

  --ak-text: #0E2823;
  --ak-text-muted: #6B8880;
  --ak-text-soft: #94ABA5;

  --ak-danger: #FF5C7A;
  --ak-danger-bg: #FFEFF2;
  --ak-warning: #FFB547;
  --ak-warning-bg: #FFF7E8;
  --ak-info: #4FC3F7;
  --ak-info-bg: #E8F6FD;
  --ak-success: #28D6B1;
  --ak-success-bg: #E6F9F3;

  --ak-radius-sm: 10px;
  --ak-radius: 16px;
  --ak-radius-lg: 24px;
  --ak-radius-pill: 999px;

  --ak-shadow-xs: 0 1px 2px rgba(15, 70, 55, .04);
  --ak-shadow-sm: 0 2px 8px rgba(15, 70, 55, .06);
  --ak-shadow: 0 8px 24px rgba(15, 70, 55, .08);
  --ak-shadow-lg: 0 18px 48px rgba(15, 70, 55, .12);
  --ak-shadow-glow: 0 0 0 4px rgba(40, 214, 177, .12);

  --ak-grad: linear-gradient(135deg, #89EDD9 0%, #28D6B1 55%, #1FAE85 100%);
  --ak-grad-soft: linear-gradient(135deg, #F0FBF6 0%, #E1F6EC 100%);
}

/* Bootstrap 5 overrides */
:root {
  --bs-primary: var(--ak-primary);
  --bs-primary-rgb: 40, 214, 177;
  --bs-link-color: var(--ak-text);
  --bs-link-hover-color: var(--ak-text);
  --bs-body-bg: var(--ak-bg);
  --bs-body-color: var(--ak-text);
  --bs-border-color: var(--ak-border);
  --bs-border-radius: var(--ak-radius);
  --bs-border-radius-sm: var(--ak-radius-sm);
  --bs-border-radius-lg: var(--ak-radius-lg);
}

html, body {
  font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background: var(--ak-bg);
  color: var(--ak-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.015em; color: var(--ak-text); }
h1, .display-4 { font-weight: 800; letter-spacing: -0.025em; }

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

/* --- Layout: .container-fluid — полная ширина, как в чистом Bootstrap. --- */
.ak-wrap { max-width: 1320px; margin-inline: auto; padding: 0 1.5rem; }

/* --- Кнопки --- */
/* ---------- Buttons (unified, serious look) ---------- */
.btn {
  --ak-btn-radius: 8px;
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: -0.005em;
  border-radius: var(--ak-btn-radius);
  padding: .5rem 1rem;
  line-height: 1.4;
  border-width: 1px;
  border-style: solid;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.btn:focus-visible {
  outline: 2px solid rgba(40, 214, 177, .35);
  outline-offset: 2px;
  box-shadow: none;
}
.btn-lg  { --ak-btn-radius: 10px; padding: .65rem 1.2rem; font-size: 1rem; }
.btn-sm  { --ak-btn-radius: 6px;  padding: .35rem .75rem; font-size: .8125rem; }

/* Primary — solid mint, no gradient, no lift */
.btn-primary {
  background: var(--ak-primary);
  border-color: var(--ak-primary);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--ak-primary-dark);
  border-color: var(--ak-primary-dark);
  color: #fff;
}
.btn-primary:active {
  background: var(--ak-primary-dark);
  border-color: var(--ak-primary-dark);
  color: #fff;
  filter: brightness(.95);
}
.btn-primary:disabled, .btn-primary.disabled {
  background: var(--ak-primary);
  border-color: var(--ak-primary);
  opacity: .5;
}

/* Secondary/outline — neutral border, subtle fill on hover */
.btn-outline-primary,
.btn-outline-secondary {
  background: var(--ak-surface);
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
}
.btn-outline-primary { color: var(--ak-primary-dark); border-color: var(--ak-primary); }
.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
  background: var(--ak-surface-alt);
  border-color: var(--ak-text-muted);
  color: var(--ak-text);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background: var(--ak-primary);
  border-color: var(--ak-primary);
  color: #fff;
}
.btn-outline-primary:active,
.btn-outline-secondary:active { filter: brightness(.97); }

/* Danger outline — used for destructive like Delete */
.btn-outline-danger {
  background: var(--ak-surface);
  border-color: var(--ak-danger);
  color: var(--ak-danger);
}
.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
  background: var(--ak-danger);
  border-color: var(--ak-danger);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ak-text-muted);
}
.btn-ghost:hover { background: var(--ak-surface-alt); color: var(--ak-text); }

.btn-danger {
  background: var(--ak-danger);
  border-color: var(--ak-danger);
  color: #fff;
}
.btn-danger:hover,
.btn-danger:focus-visible {
  background: #ef4b69;
  border-color: #ef4b69;
  color: #fff;
}

/* --- Карточки --- */
.ak-card, .card {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  box-shadow: var(--ak-shadow-xs);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ak-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--ak-shadow);
  border-color: var(--ak-border-strong);
}
.ak-card-accent { border-top: 3px solid var(--ak-primary); }

/* --- Navbar --- */
.ak-navbar {
  background: var(--ak-surface);
  border-bottom: 1px solid var(--ak-border);
  box-shadow: var(--ak-shadow-xs);
  padding: .85rem 0;
  position: sticky; top: 0; z-index: 1030;
  backdrop-filter: saturate(180%) blur(6px);
}
.ak-navbar-inner {
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.ak-brand {
  display: inline-flex; align-items: center;
  color: var(--ak-text);
}
.ak-brand img { height: 30px; width: auto; display: block; }

.ak-nav-links {
  display: flex; align-items: center; gap: .25rem;
}
.ak-nav-link {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem;
  border-radius: 12px;
  color: var(--ak-text-muted);
  font-weight: 600;
  font-size: .9rem;
  transition: all .15s ease;
}
.ak-nav-link:hover { background: var(--ak-surface-alt); color: var(--ak-text); }
.ak-nav-link.active {
  background: transparent;
  color: var(--ak-text);
  border-bottom: 2px solid var(--ak-primary);
  border-radius: 12px 12px 0 0;
}
.ak-nav-link i { font-size: 1.05rem; }

.ak-user-menu {
  display: inline-flex; align-items: center; gap: .55rem;
  height: 40px;
  padding: 0 .85rem 0 .3rem;
  background: var(--ak-surface-alt);
  border-radius: var(--ak-radius-pill);
  font-weight: 600;
  font-size: .82rem;
  color: var(--ak-text);
}
.ak-user-menu .ak-avatar,
.ak-user-menu .ak-avatar-img { width: 34px !important; height: 34px !important; }

.ak-logout-btn {
  height: 40px; width: 40px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--ak-surface-alt);
  border: none;
  color: var(--ak-text-muted);
  transition: all .12s ease;
}
.ak-logout-btn:hover {
  background: var(--ak-danger-bg);
  color: var(--ak-danger);
}
.ak-user-menu .ak-user-name { font-weight: 700; }
.ak-user-menu .ak-user-login { font-size: .68rem; color: var(--ak-text-muted); font-weight: 600; }
.ak-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ak-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
}

/* --- Pills / badges — единый стандарт высоты и паддинга --- */
.ak-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  height: 28px;
  padding: 0 .7rem;
  border-radius: var(--ak-radius-pill);
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  font-weight: 600; font-size: .75rem;
  white-space: nowrap;
  line-height: 1;
  border: 1px solid transparent;
}
.ak-pill-danger { background: var(--ak-danger-bg); color: var(--ak-danger); }
.ak-pill-warning { background: var(--ak-warning-bg); color: #B07314; }
.ak-pill-info { background: var(--ak-info-bg); color: #0284B8; }
.ak-pill-success { background: var(--ak-success-bg); color: var(--ak-primary-dark); }

/* --- Stat cards --- */
.ak-stat {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: all .18s ease;
}
.ak-stat:hover { transform: translateY(-2px); box-shadow: var(--ak-shadow); }
.ak-stat-label { font-size: .78rem; color: var(--ak-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ak-stat-value { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin-top: .35rem; letter-spacing: -0.03em; }
.ak-stat-sub { font-size: .8rem; color: var(--ak-text-muted); margin-top: .25rem; }
.ak-stat-icon {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ak-surface-alt); color: var(--ak-text-muted);
  font-size: 1.3rem;
}
.ak-stat.primary { background: var(--ak-grad); color: #fff; border: none; }
.ak-stat.primary .ak-stat-label,
.ak-stat.primary .ak-stat-sub { color: rgba(255,255,255,.85); }
.ak-stat.primary .ak-stat-icon { background: rgba(255,255,255,.18); color: #fff; }

/* --- Progress --- */
.ak-progress {
  height: 8px;
  background: var(--ak-surface-alt);
  border-radius: var(--ak-radius-pill);
  overflow: hidden;
}
.ak-progress-bar {
  height: 100%;
  background: var(--ak-grad);
  border-radius: var(--ak-radius-pill);
  transition: width .4s ease;
}
.ak-progress-sm { height: 5px; }

/* --- Hero --- */
.ak-hero {
  background: var(--ak-grad-soft);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.ak-hero::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(40, 214, 177, .18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.ak-hero > * { position: relative; }

/* --- Dashboard hero (combined hero + stats) --- */
.ak-dash-hero {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.ak-dash-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: var(--ak-grad-soft);
  border-bottom: 1px solid var(--ak-border);
}
.ak-dash-greeting {
  font-size: .82rem;
  color: var(--ak-text-muted);
  font-weight: 500;
  margin-bottom: .15rem;
}
.ak-dash-headline {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ak-text);
  letter-spacing: -.02em;
}
.ak-dash-stats {
  display: flex;
  align-items: center;
  padding: .9rem 1.75rem;
  gap: 0;
}
.ak-dash-stat {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex: 1;
  min-width: 0;
}
.ak-dash-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--ak-border);
  margin: 0 1rem;
  flex-shrink: 0;
}
.ak-dash-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
}
.ak-dash-stat-icon--primary { background: rgba(40,214,177,.12); color: var(--ak-primary); }
.ak-dash-stat-icon--danger  { background: rgba(255,92,122,.1); color: var(--ak-danger); }
.ak-dash-stat-icon--success { background: rgba(40,214,177,.12); color: var(--ak-primary-dark); }
.ak-dash-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ak-text);
}
.ak-dash-stat-total {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ak-text-muted);
}
.ak-dash-stat-label {
  font-size: .75rem;
  color: var(--ak-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* --- Forms --- */
.form-control, .form-select {
  border-radius: 12px;
  border-color: var(--ak-border);
  padding: .55rem .85rem;
  font-size: .92rem;
  transition: all .15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--ak-border-strong);
  box-shadow: 0 0 0 3px rgba(15, 42, 36, .07);
}
.form-control-lg { padding: .75rem 1rem; font-size: 1rem; }
.form-label { font-weight: 600; font-size: .82rem; color: var(--ak-text-muted); letter-spacing: .01em; }
.form-check-input:checked { background-color: var(--ak-primary); border-color: var(--ak-primary); }
.form-switch .form-check-input:focus { box-shadow: var(--ak-shadow-glow); }

/* --- Board tile (grid list) --- */
.ak-board-tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: all .18s ease;
  box-shadow: var(--ak-shadow-xs);
}
.ak-board-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--ak-shadow);
  border-color: var(--ak-border-strong);
  color: inherit;
}
.ak-board-tile-stripe {
  height: 5px;
  background: var(--ak-primary);
}
.ak-board-tile-body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.ak-board-tile-ws {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ak-text-muted);
  background: var(--ak-surface-alt);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--ak-border);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ak-board-tile-ws i { font-size: .7rem; opacity: .7; }
.ak-board-tile-ws-icon {
  width: 14px; height: 14px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.ak-board-tile-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 70, 55, .1);
}
.ak-board-tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ak-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.ak-board-tile-desc {
  font-size: .78rem;
  color: var(--ak-text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.2em;
}
.ak-board-tile-progress { margin-top: auto; margin-bottom: .9rem; }
.ak-board-tile-stats {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-top: .85rem;
  border-top: 1px solid var(--ak-border);
  font-size: .78rem;
  color: var(--ak-text-muted);
  flex-wrap: wrap;
}
.ak-board-stat {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600;
}
.ak-board-stat strong { color: var(--ak-text); font-weight: 700; }
.ak-board-stat.text-danger strong { color: var(--ak-danger); }
.ak-board-stat i { font-size: .95rem; opacity: .75; }

/* --- Workspace / board tiles --- */
.ak-tile {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 1.35rem;
  height: 100%;
  transition: all .18s ease;
  display: block;
  color: inherit;
}
.ak-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--ak-shadow);
  border-color: var(--ak-border-strong);
}
.ak-tile-accent { border-left: 4px solid var(--ak-primary); }
.ak-tile-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: .75rem; gap: .5rem;
}
.ak-tile-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ak-primary);
  flex-shrink: 0;
}
.ak-tile-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.ak-tile-desc { color: var(--ak-text-muted); font-size: .85rem; line-height: 1.4; }
.ak-tile-stats {
  display: flex; gap: 1rem; margin-top: 1rem;
  font-size: .78rem; color: var(--ak-text-muted);
  padding-top: .85rem; border-top: 1px dashed var(--ak-border);
}
.ak-tile-stat { display: inline-flex; align-items: center; gap: .3rem; }
.ak-tile-stat strong { color: var(--ak-text); font-weight: 700; }

/* --- Kanban --- */
.ak-board-header {
  padding: 1.5rem 1.5rem .5rem;
}
.ak-board-toolbar {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  padding: .45rem .55rem;
  display: flex; gap: .4rem; flex-wrap: wrap; align-items: center;
  box-shadow: var(--ak-shadow-xs);
  margin-top: .6rem;
}
.ak-board-toolbar .form-control-sm,
.ak-board-toolbar .form-select-sm {
  padding: .3rem .65rem;
  font-size: .82rem;
}

/* --- Кастомный dropdown-фильтр --- */
.ak-filter { position: relative; }
.ak-filter-trigger {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 32px;
  padding: 0 .75rem;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 10px;
  color: var(--ak-text);
  font-size: .82rem; font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
  white-space: nowrap;
}
.ak-filter-trigger:hover {
  background: var(--ak-surface);
  border-color: var(--ak-border-strong);
}
.ak-filter-trigger.active {
  background: var(--ak-surface);
  border-color: var(--ak-border-strong);
  box-shadow: 0 0 0 3px rgba(15, 42, 36, .07);
}
.ak-filter-trigger .bi-chevron-down {
  font-size: .7rem;
  opacity: .6;
  transition: transform .15s ease;
}
.ak-filter-trigger[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
.ak-filter-trigger .ak-filter-badge {
  background: var(--ak-primary);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: .68rem;
  font-weight: 700;
  min-width: 16px; text-align: center;
}

.ak-dropdown {
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  min-width: 240px;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 14px;
  box-shadow: var(--ak-shadow-lg);
  padding: .45rem;
  z-index: 1055;
  max-height: 360px;
  overflow-y: auto;
  animation: akDropdown .16s ease-out;
}
@keyframes akDropdown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ak-dropdown-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .65rem;
  border-radius: 10px;
  color: var(--ak-text);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: background .1s ease;
  user-select: none;
}
.ak-dropdown-item:hover { background: var(--ak-surface-alt); }
.ak-dropdown-item.active {
  background: var(--ak-surface-alt);
  color: var(--ak-text);
  font-weight: 700;
}
.ak-dropdown-item .check-slot {
  width: 16px; flex-shrink: 0;
  color: var(--ak-primary);
  font-size: .9rem;
}
.ak-dropdown-item.active .check-slot::before { content: "\F633"; font-family: "bootstrap-icons"; }
.ak-dropdown-swatch {
  width: 14px; height: 14px; border-radius: 50%;
  flex-shrink: 0;
}
.ak-dropdown-section {
  font-size: .68rem; font-weight: 700;
  color: var(--ak-text-soft);
  text-transform: uppercase; letter-spacing: .05em;
  padding: .5rem .65rem .25rem;
}
.ak-board-toolbar .form-control,
.ak-board-toolbar .form-select {
  border-color: var(--ak-border);
  background: var(--ak-surface-alt);
}
.ak-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 0;
}
.ak-mini-stat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 28px;
  padding: 0 .7rem;
  border-radius: var(--ak-radius-pill);
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  box-shadow: none;
  line-height: 1;
}
.ak-mini-stat-label {
  font-size: .68rem; color: var(--ak-text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.ak-mini-stat-value {
  font-size: .85rem; font-weight: 800;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}

/* Канбан: доска занимает весь оставшийся viewport — горизонтальный скролл
   всегда приклеен к низу браузера. top подстраивается через JS на mount. */
.ak-board-scroll {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  top: 180px; /* fallback — реальное значение проставляется JS на mount */
  overflow: hidden;
  background: var(--ak-bg);
}
.ak-board {
  display: flex; gap: .25rem;
  overflow-x: auto; overflow-y: hidden;
  padding: .5rem 1.5rem 1rem;
  height: 100%;
}
.ak-column {
  flex: 0 0 288px;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: .85rem;
  display: flex; flex-direction: column; gap: .55rem;
  height: 100%;
}
.ak-column[data-system="draft"]    { background: #FFF9EB; border-color: #FFE9A3; }
.ak-column[data-system="completed"]{ background: #E9FAF2; border-color: #BDEDD4; }
.ak-column[data-system="archived"] { background: #F1F4F5; border-color: #DEE2E6; }

.ak-board-icon {
  width: 32px; height: 32px; font-size: .95rem;
  border-radius: 9px; flex-shrink: 0;
}
.ak-search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 10px;
  box-shadow: var(--ak-shadow);
  max-height: 260px; overflow-y: auto;
  z-index: 1060;
  margin-top: .35rem;
}
.ak-search-results > div:hover { background: var(--ak-surface-alt); }

.ak-column-header {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--ak-text);
  padding: .25rem .35rem .5rem;
  font-size: .92rem;
  gap: .35rem;
}
.ak-column-count {
  font-size: .72rem; color: var(--ak-text-muted); font-weight: 700;
  background: var(--ak-surface); padding: .1rem .55rem; border-radius: 999px;
  border: 1px solid var(--ak-border);
}
.ak-column-name {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  transition: background .12s ease;
}
.ak-column-name:hover {
  background: var(--ak-surface);
  color: var(--ak-text);
}

.ak-danger-zone {
  background: var(--ak-danger-bg);
  border: 1px solid #FBD3DB;
  border-radius: 12px;
  padding: 1rem;
}

.ak-column-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 24px;
  color: var(--ak-text-soft);
  cursor: grab;
  border-radius: 4px;
  transition: all .12s ease;
  flex-shrink: 0;
}
.ak-column-drag-handle:hover {
  background: var(--ak-surface);
  color: var(--ak-text);
}
.ak-column-drag-handle:active { cursor: grabbing; }

/* Drag visual feedback для колонок */
.ak-column-ghost {
  opacity: .25;
  background: var(--ak-primary-light) !important;
  border: 2px dashed var(--ak-primary) !important;
}
.ak-column-ghost > * { visibility: hidden; }
.ak-column-chosen {
  box-shadow: var(--ak-shadow-lg) !important;
  transform: rotate(1.5deg);
  z-index: 10;
}
.ak-column-drag {
  box-shadow: 0 20px 60px rgba(15, 70, 55, .25) !important;
  cursor: grabbing !important;
  opacity: .95;
  transform: rotate(2deg) scale(1.02);
}

.ak-card-item {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  padding: .75rem .85rem;
  box-shadow: var(--ak-shadow-xs);
  cursor: grab;
  transition: all .15s ease;
  position: relative;
}
.ak-card-item:hover { transform: translateY(-1px); box-shadow: var(--ak-shadow-sm); border-color: var(--ak-border-strong); }
.ak-card-item.ak-card-ghost { opacity: .4; }

/* Context menu on right-click of a card. */
.ak-ctx-menu {
  position: fixed;
  z-index: 2000;
  min-width: 200px;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15, 42, 36, .14), 0 2px 6px rgba(15, 42, 36, .06);
  padding: .3rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: ak-ctx-fade .08s ease-out;
}
@keyframes ak-ctx-fade {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1); }
}
.ak-ctx-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .7rem;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ak-text);
  text-align: left;
  cursor: pointer;
  transition: background .1s ease;
}
.ak-ctx-item:hover:not(:disabled) { background: var(--ak-surface-alt); }
.ak-ctx-item:disabled { opacity: .45; cursor: not-allowed; }
.ak-ctx-item i { font-size: .9rem; color: var(--ak-text-muted); width: 16px; text-align: center; }
.ak-ctx-item.ak-ctx-danger { color: var(--ak-danger); }
.ak-ctx-item.ak-ctx-danger i { color: var(--ak-danger); }
.ak-ctx-item.ak-ctx-danger:hover:not(:disabled) { background: var(--ak-danger-bg); }
.ak-ctx-sep { height: 1px; background: var(--ak-border); margin: .25rem .3rem; }
.ak-card-title { font-weight: 600; font-size: .9rem; line-height: 1.35; color: var(--ak-text); }
.ak-card-meta {
  display: flex; gap: .45rem; align-items: center; flex-wrap: wrap;
  margin-top: .55rem;
  font-size: .72rem; color: var(--ak-text-muted); font-weight: 600;
}
.ak-card-meta > span { display: inline-flex; align-items: center; gap: .25rem; }
.ak-card-meta .overdue { color: var(--ak-danger); }

.ak-labels-row { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ak-label { display: inline-block; height: 6px; min-width: 32px; border-radius: 999px; }

.ak-assignees { display: inline-flex; }
.ak-assignees .ak-avatar { width: 22px; height: 22px; font-size: .65rem; border: 2px solid var(--ak-surface); margin-left: -6px; }
.ak-assignees .ak-avatar:first-child { margin-left: 0; }

.ak-add-card {
  padding: .55rem;
  text-align: center;
  background: transparent;
  border: 1px dashed var(--ak-border-strong);
  border-radius: 12px;
  color: var(--ak-text-muted);
  font-weight: 600; font-size: .85rem;
  cursor: pointer;
  transition: all .15s ease;
}
.ak-add-card:hover { background: var(--ak-surface); color: var(--ak-text); border-color: var(--ak-border-strong); }

/* Inserter между колонками: тонкая зона 8px. Hover-триггер — ТОЛЬКО сами три точки. */
.ak-col-inserter {
  flex: 0 0 6px;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin: 0;
  z-index: 2;
  pointer-events: none; /* контейнер не ловит hover */
}
.ak-col-inserter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 38px;
  border-radius: 6px;
  color: var(--ak-text-soft);
  font-size: .95rem;
  cursor: pointer;
  pointer-events: auto; /* только кнопка принимает hover/click */
  transition: width .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.ak-col-inserter-btn:hover {
  width: 28px;
  color: #fff;
  background: var(--ak-grad);
  box-shadow: 0 4px 14px rgba(40, 214, 177, .35);
}
.ak-col-inserter-btn .icon-dots { display: inline-flex; }
.ak-col-inserter-btn .icon-plus { display: none; }
.ak-col-inserter-btn:hover .icon-dots { display: none; }
.ak-col-inserter-btn:hover .icon-plus { display: inline-flex; }

/* Hide inserters while a column is being dragged — SortableJS mutates the DOM
   order and the inserters (separate siblings) would end up in weird positions
   until Vue re-renders from the realtime event. */
.ak-board.is-col-dragging .ak-col-inserter { visibility: hidden; }

/* --- Modal --- */
.modal-content {
  border: none;
  border-radius: var(--ak-radius-lg);
  box-shadow: var(--ak-shadow-lg);
  overflow: hidden;
}
.modal-header { border-bottom: 1px solid var(--ak-border); padding: 1.1rem 1.5rem; }
.modal-footer { border-top: 1px solid var(--ak-border); padding: 1rem 1.5rem; }
.modal-body { padding: 1.5rem; }

/* --- Card modal: shell --- */
.ak-card-modal { background: var(--ak-bg); }
.ak-card-modal-header {
  background: var(--ak-surface);
  border-bottom: 1px solid var(--ak-border);
  padding: 1.1rem 1.5rem !important;
  align-items: flex-start !important;
}
.ak-card-title-input {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ak-text);
  width: 100%;
  outline: none;
  padding: 0;
  letter-spacing: -0.02em;
}
.ak-card-title-input:focus { background: var(--ak-surface-alt); border-radius: 6px; padding: 2px 6px; margin: -2px -6px; }
.ak-card-modal-body { background: var(--ak-bg); padding: 1.5rem !important; }

/* --- Card modal: секции в левой колонке --- */
.ak-section {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--ak-shadow-xs);
}
.ak-section:last-child { margin-bottom: 0; }
.ak-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem;
  margin-bottom: .75rem;
  font-weight: 700; font-size: .88rem;
  color: var(--ak-text);
}
.ak-section-head > div:first-child { display: flex; align-items: center; gap: .45rem; }
.ak-section-head i { color: var(--ak-text-soft); }
.ak-section-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px;
  padding: 0 6px;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  border-radius: 999px;
  font-size: .68rem; font-weight: 700;
  margin-left: .25rem;
}
.ak-section-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--ak-text-muted);
  font-size: .82rem;
  background: var(--ak-surface-alt);
  border: 1px dashed var(--ak-border);
  border-radius: 10px;
}

/* --- Quill --- */
.ak-quill {
  min-height: 180px;
  background: #fff;
  border-radius: 10px;
}
.ak-section .ql-toolbar.ql-snow,
.ak-section .ql-container.ql-snow {
  border-color: var(--ak-border);
}
.ak-section .ql-toolbar.ql-snow {
  border-radius: 10px 10px 0 0;
  background: var(--ak-surface-alt);
}
.ak-section .ql-container.ql-snow {
  border-radius: 0 0 10px 10px;
  font-family: 'Manrope', sans-serif;
  font-size: .92rem;
}

/* --- Checklist --- */
.ak-checklist {
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  padding: .85rem;
  margin-bottom: .65rem;
}
.ak-checklist:last-child { margin-bottom: 0; }
.ak-checklist-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .3rem .25rem;
  border-radius: 6px;
  font-size: .88rem;
  transition: background .1s ease;
}
.ak-checklist-item:hover { background: rgba(255, 255, 255, .6); }
.ak-checklist-item-remove { opacity: 0; transition: opacity .12s ease; }
.ak-checklist-item:hover .ak-checklist-item-remove { opacity: 1; }

/* --- Dropzone --- */
.ak-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--ak-surface-alt);
  border: 2px dashed var(--ak-border-strong);
  border-radius: 14px;
  cursor: pointer;
  transition: all .15s ease;
  color: var(--ak-text);
}
.ak-dropzone:hover {
  border-color: var(--ak-border-strong);
  background: var(--ak-surface);
  transform: translateY(-1px);
}
.ak-dropzone-compact {
  padding: 1rem;
}
.ak-dropzone-compact .ak-dropzone-icon {
  width: 36px; height: 36px; font-size: 1.1rem; margin-bottom: .4rem;
}

.ak-comments-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: .25rem;
  margin-right: -.25rem;
}
.ak-side-comments { padding: 1rem 1.1rem; }
.ak-side-comments .ak-comment { padding: .5rem 0; }
.ak-side-comments .ak-comment > .ak-avatar { width: 28px; height: 28px; font-size: .7rem; }
.ak-side-comments .ak-comment-text { font-size: .82rem; padding: .5rem .7rem; }
.ak-side-comments .ak-comment-form { gap: .4rem; padding-top: .65rem; }
.ak-side-comments .ak-comment-form > .ak-avatar { width: 28px; height: 28px; font-size: .7rem; }
.ak-side-comments .ak-comment-form .btn-primary { width: 32px; height: 32px; }

.ak-dropzone-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ak-surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--ak-text-muted);
  margin-bottom: .6rem;
  box-shadow: var(--ak-shadow-xs);
}

/* --- Attachment tile --- */
.ak-attachment {
  display: block;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: all .15s ease;
}
.ak-attachment:hover { transform: translateY(-2px); box-shadow: var(--ak-shadow-sm); border-color: var(--ak-border-strong); }
.ak-attachment-preview {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  color: var(--ak-text-soft); font-size: 2rem;
  overflow: hidden;
}
.ak-attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.ak-attachment-name {
  padding: .5rem .7rem;
  font-size: .76rem; font-weight: 600;
  color: var(--ak-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid var(--ak-border);
}

/* --- Comments --- */
.ak-comment {
  display: flex; gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--ak-border);
}
.ak-comment:last-of-type { border-bottom: none; }
.ak-comment > .ak-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px; font-size: .8rem;
}
.ak-comment-body { flex-grow: 1; min-width: 0; }
.ak-comment-head {
  display: flex; align-items: baseline; gap: .5rem;
  margin-bottom: .25rem;
  font-size: .78rem;
}
.ak-comment-head strong { color: var(--ak-text); font-weight: 700; }
.ak-comment-head .text-muted { font-size: .72rem; }
.ak-comment-text {
  background: var(--ak-surface-alt);
  border-radius: 12px;
  padding: .6rem .85rem;
  font-size: .88rem;
  color: var(--ak-text);
}
.ak-comment-text p:last-child { margin-bottom: 0; }

.ak-comment-form {
  display: flex; gap: .6rem; align-items: center;
  padding-top: .85rem;
  border-top: 1px solid var(--ak-border);
  margin-top: .5rem;
}
.ak-comment-form > .ak-avatar { flex-shrink: 0; width: 34px; height: 34px; font-size: .8rem; }
.ak-comment-form .form-control { border-radius: 999px; background: var(--ak-surface-alt); border-color: transparent; }
.ak-comment-form .form-control:focus { background: var(--ak-surface); border-color: var(--ak-border-strong); }
.ak-comment-form .btn-primary { border-radius: 50%; width: 38px; height: 38px; padding: 0; flex-shrink: 0; }

/* --- Side blocks --- */
.ak-side-block {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 14px;
  padding: .9rem 1rem;
  margin-bottom: .85rem;
  box-shadow: var(--ak-shadow-xs);
}
.ak-side-block:last-child { margin-bottom: 0; }
.ak-side-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ak-text-muted); font-weight: 700;
  margin-bottom: .55rem;
  display: flex; align-items: center; gap: .35rem;
}
.ak-card-meta-info {
  font-size: .76rem; color: var(--ak-text-muted);
}
.ak-card-meta-info > div { display: flex; align-items: center; gap: .4rem; margin-bottom: .2rem; }
.ak-card-meta-info strong { color: var(--ak-text); font-weight: 600; }

/* --- Chips --- */
/* Assignee row: аватар + ФИО + remove */
.ak-assignee-row {
  display: flex; align-items: center; gap: .55rem;
  padding: .35rem .5rem;
  border-radius: 10px;
  background: var(--ak-surface-alt);
  transition: background .12s ease;
}
.ak-assignee-row:hover { background: var(--ak-surface-hover); }
.ak-assignee-row .ak-avatar { width: 30px; height: 30px; font-size: .72rem; flex-shrink: 0; }
.ak-assignee-remove { opacity: .4; transition: opacity .12s ease; }
.ak-assignee-row:hover .ak-assignee-remove { opacity: 1; }

.ak-avatar-img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--ak-surface);
}

.ak-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--ak-border-strong);
  background: var(--ak-surface);
  color: var(--ak-text);
  font-size: .78rem; font-weight: 600;
  cursor: pointer;
  transition: all .12s ease;
  line-height: 1;
}
.ak-chip:hover:not(:disabled) { background: var(--ak-surface-alt); }
.ak-chip.active {
  background: var(--ak-primary);
  color: #fff;
  border-color: var(--ak-primary);
}
.ak-chip-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ak-grad);
  color: #fff; font-size: .6rem; font-weight: 700;
}
.ak-chip.active .ak-chip-dot { background: rgba(255,255,255,.25); }
.ak-chip:disabled { opacity: .6; cursor: not-allowed; }

/* --- Timer --- */
.ak-timer {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 14px;
  padding: 1rem;
}
.ak-timer-value {
  font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ak-timer-value.running { color: var(--ak-primary-dark); }
.ak-timer-label { font-size: .72rem; color: var(--ak-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* --- Empty states --- */
.ak-empty {
  background: var(--ak-surface);
  border: 1px dashed var(--ak-border-strong);
  border-radius: var(--ak-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}
.ak-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--ak-grad-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ak-primary-dark); font-size: 2rem;
  margin-bottom: 1rem;
}

/* --- Scrollbars --- */
.ak-board::-webkit-scrollbar, .ak-column::-webkit-scrollbar { height: 10px; width: 8px; }
.ak-board::-webkit-scrollbar-thumb, .ak-column::-webkit-scrollbar-thumb {
  background: var(--ak-border-strong); border-radius: 999px;
}
.ak-board::-webkit-scrollbar-thumb:hover, .ak-column::-webkit-scrollbar-thumb:hover {
  background: var(--ak-primary-light);
}

/* --- Гант --- */
.ak-gantt-wrap {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  overflow: hidden;
  box-shadow: var(--ak-shadow-xs);
}
.ak-gantt-toolbar {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--ak-border);
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6FCFA 100%);
  position: relative;
}
.ak-gantt-toolbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ak-primary-light) 20%, var(--ak-primary) 50%, var(--ak-primary-light) 80%, transparent);
  opacity: .4;
}

/* Gantt zoom segmented control — flat, pill-shaped */
.ak-gantt-zoom {
  display: inline-flex;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.ak-gantt-zoom-btn {
  border: 0;
  background: transparent;
  color: var(--ak-text-muted);
  font-weight: 600;
  font-size: .8rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .01em;
}
.ak-gantt-zoom-btn:hover { color: var(--ak-text); }
.ak-gantt-zoom-btn.active {
  background: var(--ak-surface);
  color: var(--ak-text);
  box-shadow: 0 1px 3px rgba(15, 42, 36, .08);
}

/* Gantt group selector */
.ak-gantt-select {
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  background: var(--ak-surface);
  padding: .4rem 2.2rem .4rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ak-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235B7A72'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.ak-gantt-select:hover { border-color: var(--ak-border-strong); }
.ak-gantt-select:focus { outline: none; border-color: var(--ak-border-strong); box-shadow: 0 0 0 3px rgba(15, 42, 36, .07); }

/* Gantt today button */
.ak-gantt-today-btn {
  border: 1px solid var(--ak-border);
  background: var(--ak-surface);
  color: var(--ak-text);
  border-radius: 999px;
  padding: .4rem .95rem;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  transition: all .15s;
}
.ak-gantt-today-btn:hover {
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
  background: var(--ak-surface-alt);
}
.ak-gantt-today-btn i { color: var(--ak-text-muted); }

/* Gantt toolbar stat pills */
.ak-gantt-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  border: 1px solid var(--ak-border);
  letter-spacing: .02em;
}
.ak-gantt-stat i { font-size: .85rem; }
.ak-gantt-stat--total { background: #ECFBF6; color: var(--ak-primary-dark); border-color: #C9F0E3; }
.ak-gantt-stat--nodates { background: #FFF7E8; color: #B87700; border-color: #FCE7B8; }
.ak-gantt-stat--overdue { background: #FFE8EC; color: #C4264A; border-color: #FFC9D3; }
.ak-gantt-stat--critical {
  background: var(--ak-surface);
  color: var(--ak-text-muted);
  border: 1px solid var(--ak-border);
  cursor: pointer;
  transition: all .15s;
}
.ak-gantt-stat--critical:hover { border-color: #FFB3C0; color: #C4264A; }
.ak-gantt-stat--critical.active {
  background: linear-gradient(135deg, #FFE8EC, #FFF0F3);
  color: #C4264A;
  border-color: #FFB3C0;
  box-shadow: 0 2px 6px rgba(196, 38, 74, .15);
}
.ak-gantt-stat--critical.active i { color: #FF5C7A; }
.ak-gantt-scroll {
  overflow: auto;
  max-height: calc(100vh - 340px);
  min-height: 420px;
  position: relative;
}
.ak-gantt-svg { display: block; }

.gantt-header-top { fill: var(--ak-surface-alt); }
.gantt-header-bottom { fill: var(--ak-surface); }
.gantt-header-label { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 12px; fill: var(--ak-text); }
.gantt-header-sub { font-family: 'Manrope', sans-serif; font-weight: 500; font-size: 10px; fill: var(--ak-text-muted); }
.gantt-header-border { stroke: var(--ak-border); }
.gantt-weekend { fill: rgba(40, 214, 177, .05); }
.gantt-grid-row { stroke: var(--ak-border); stroke-dasharray: 2 4; }
.gantt-row-zebra { fill: rgba(15, 42, 36, .028); }
.gantt-group-row { fill: var(--ak-surface-alt); }
.gantt-group-label { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 12px; fill: var(--ak-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.gantt-bar {
  transition: filter .15s, transform .15s;
  stroke: rgba(15, 42, 36, .25);
  stroke-width: 1;
  filter: drop-shadow(0 2px 4px rgba(15, 42, 36, .18));
}
.gantt-bar:hover {
  filter: drop-shadow(0 4px 10px rgba(15, 42, 36, .28)) brightness(1.06);
}
.gantt-bar.completed { opacity: .55; }
.gantt-bar.overdue {
  stroke: var(--ak-danger);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.gantt-bar.critical {
  stroke: #B8294A;
  stroke-width: 1.5;
}
.gantt-bar.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 6px 14px rgba(15, 42, 36, .3)) brightness(1.08);
}
.gantt-bar-resize {
  fill: rgba(255, 255, 255, 0);
  cursor: ew-resize;
}
.gantt-bar:hover ~ .gantt-bar-resize,
.gantt-bar-resize:hover { fill: rgba(255, 255, 255, .3); }
.gantt-bar-label {
  font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 11px; fill: #fff;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.gantt-today {
  stroke: var(--ak-danger); stroke-width: 2; stroke-dasharray: 4 4;
}
.gantt-dep-path {
  fill: none; stroke: var(--ak-text-muted); stroke-width: 1.5;
  opacity: .55;
}
.gantt-dep-path.critical { stroke: var(--ak-danger); stroke-width: 2.2; opacity: 1; }

/* Tooltip */
.ak-gantt-tooltip {
  position: absolute;
  pointer-events: none;
  background: #0F2A24;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 42, 36, .35);
  font-size: .78rem;
  max-width: 260px;
  z-index: 20;
  line-height: 1.4;
}
.ak-gantt-tooltip-title {
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: 4px;
}
.ak-gantt-tooltip-board {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, .75);
  font-weight: 600;
  margin-bottom: 4px;
}
.ak-gantt-tooltip-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}
.ak-gantt-tooltip-dates {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255, 255, 255, .9);
}
.ak-gantt-tooltip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  padding: 2px 8px;
  background: var(--ak-danger);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
}
.ak-gantt-tooltip-badge--ok { background: var(--ak-primary); }

/* Toolbar toggle pill */
.ak-pill-toggle {
  cursor: pointer;
  border: 1px solid var(--ak-border);
  background: var(--ak-surface);
  color: var(--ak-text-muted);
  transition: all .15s;
}
.ak-pill-toggle:hover { background: var(--ak-surface-alt); color: var(--ak-text); }
.ak-pill-toggle.ak-pill-active {
  background: rgba(255, 92, 122, .1);
  border-color: var(--ak-danger);
  color: var(--ak-danger);
}

/* ============ Users table ============ */
.ak-users-table thead th {
  background: var(--ak-surface-alt);
  border-bottom: 1px solid var(--ak-border);
  color: var(--ak-text-muted);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
}
.ak-users-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ak-border);
  vertical-align: middle;
}
.ak-users-table tbody tr:last-child td { border-bottom: none; }
.ak-users-table tbody tr { transition: background .15s; }
.ak-users-table tbody tr:hover { background: var(--ak-surface-alt); }
.ak-users-table .ak-row-inactive { opacity: .55; }

.ak-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--ak-border);
}
.ak-user-avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ak-grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

/* Toggle card — checkbox с описанием в виде кликабельной карточки */
.ak-toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  margin-bottom: 0;
}
.ak-toggle-card:hover {
  border-color: var(--ak-border-strong);
  background: var(--ak-surface);
}
.ak-toggle-card input[type="checkbox"],
.ak-toggle-card input[type="radio"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--ak-primary);
}
.ak-toggle-card input[type="checkbox"]:checked + div .ak-toggle-title {
  color: var(--ak-primary-dark);
}
.ak-toggle-card:has(input:checked) {
  border-color: var(--ak-primary);
  background: rgba(40, 214, 177, .07);
}
.ak-toggle-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--ak-text);
  line-height: 1.3;
}
.ak-toggle-desc {
  font-size: .76rem;
  color: var(--ak-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Сетка роль-карточек (UserCreate/Edit) */
.ak-role-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Цветные pill'ы для ролей в борде */
.ak-role-pill-owner  { background: rgba(255, 181, 71, .15); color: #C77800; }
.ak-role-pill-admin  { background: rgba(79, 195, 247, .15); color: #0277BD; }
.ak-role-pill-member { background: rgba(40, 214, 177, .15); color: var(--ak-primary-dark); }
.ak-role-pill-viewer { background: var(--ak-surface-alt);   color: var(--ak-text-muted); }
.ak-role-pill-owner i,
.ak-role-pill-admin i,
.ak-role-pill-member i,
.ak-role-pill-viewer i { font-size: .7rem; }

/* --- Breadcrumbs — фикс высота и отступ, одинаково на всех страницах --- */
.ak-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: .35rem;
  font-size: .78rem;
  color: var(--ak-text-muted);
  margin-bottom: .75rem;
  height: 24px;
  line-height: 1;
}
.ak-breadcrumb a {
  color: var(--ak-text-muted);
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 6px;
  transition: all .12s ease;
  display: inline-flex; align-items: center; gap: .3rem;
}
.ak-breadcrumb a:hover {
  background: var(--ak-surface-alt);
  color: var(--ak-text);
  text-decoration: underline;
}
.ak-breadcrumb .sep {
  color: var(--ak-text-soft);
  font-size: .68rem;
}
.ak-breadcrumb .current {
  color: var(--ak-text);
  font-weight: 700;
  padding: .15rem .5rem;
}
.ak-breadcrumb-ws {
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--ak-text-muted);
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 6px;
  background: var(--ak-surface-alt);
}
.ak-breadcrumb-ws i { font-size: .72rem; opacity: .8; }

/* Кнопка-карандашик на тайле доски — поверх ссылки */
.ak-tile-edit {
  position: absolute;
  top: 12px; right: 18px;
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 50%;
  color: var(--ak-text-muted);
  box-shadow: var(--ak-shadow-xs);
  opacity: 0;
  transition: all .15s ease;
  z-index: 3;
}
.col-md-6:hover .ak-tile-edit,
.col-lg-4:hover .ak-tile-edit,
.col-xxl-3:hover .ak-tile-edit { opacity: 1; }
.ak-tile-edit:hover {
  background: var(--ak-primary);
  color: #fff;
  border-color: var(--ak-primary);
  transform: scale(1.08);
}

.ak-tile-overdue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--ak-danger);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(255, 92, 122, .35);
}
.ak-tile-overdue i { font-size: .78rem; }

/* ============ Dashboard lists ============ */
.ak-dash-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ak-text-muted);
}
.ak-dash-section-label.text-danger { color: var(--ak-danger) !important; }
.ak-dash-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  font-size: .68rem;
  font-weight: 700;
  border-radius: 999px;
}
.ak-dash-section-label.text-danger .ak-dash-count {
  background: rgba(255, 92, 122, .12);
  color: var(--ak-danger);
}

.ak-dash-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ak-dash-row,
.ak-dash-board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background .15s, transform .15s, box-shadow .15s;
  border: 1px solid transparent;
}
.ak-dash-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--row-accent, var(--ak-primary));
}
.ak-dash-row { padding-left: 16px; }
.ak-dash-row:hover,
.ak-dash-board-row:hover {
  background: var(--ak-surface-alt);
  border-color: var(--ak-border);
  transform: translateX(2px);
  color: inherit;
}
.ak-dash-row--danger:hover { background: rgba(255, 92, 122, .06); }

.ak-dash-row-body { flex: 1; min-width: 0; }
.ak-dash-row-title {
  font-weight: 600;
  font-size: .88rem;
  color: var(--ak-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.ak-dash-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ak-dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--ak-text-muted);
  background: var(--ak-surface-alt);
  border-radius: 999px;
  line-height: 1.4;
}
.ak-dash-chip i { font-size: .72rem; }
.ak-dash-chip--danger {
  background: rgba(255, 92, 122, .12);
  color: var(--ak-danger);
}
.ak-dash-chevron {
  color: var(--ak-text-muted);
  font-size: .9rem;
  opacity: .5;
  transition: opacity .15s, transform .15s;
}
.ak-dash-row:hover .ak-dash-chevron,
.ak-dash-board-row:hover .ak-dash-chevron {
  opacity: 1;
  transform: translateX(2px);
}

.ak-dash-board-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid var(--ak-border);
}

/* Скрытый file-input, доступный через <label for=> */
.ak-file-hidden {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* --- Utilities --- */
.text-muted { color: var(--ak-text-muted) !important; }
.text-soft { color: var(--ak-text-soft); }
.ak-divider { height: 1px; background: var(--ak-border); margin: 1rem 0; }

/* --- Toast --- */
.ak-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1090;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--ak-radius);
  background: var(--ak-surface);
  color: var(--ak-text);
  box-shadow: 0 10px 30px rgba(31, 174, 133, 0.25), 0 2px 8px rgba(15, 42, 36, 0.08);
  border: 1px solid var(--ak-border);
  font-weight: 500;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.ak-toast.ak-toast-show {
  opacity: 1;
  transform: translateY(0);
}
.ak-toast i { font-size: 1.25rem; }
.ak-toast-success i { color: var(--ak-primary); }
.ak-toast-danger { border-color: var(--ak-danger); }
.ak-toast-danger i { color: var(--ak-danger); }

/* Workspace chips (boards list filter) */
.ak-ws-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.ak-ws-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--ak-border);
  background: var(--ak-surface);
  color: var(--ak-text);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}
.ak-ws-chip:hover {
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
}
.ak-ws-chip.active {
  background: var(--ak-text);
  color: #fff;
  border-color: var(--ak-text);
  box-shadow: 0 2px 8px rgba(15, 42, 36, .15);
}
.ak-ws-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ak-ws-chip-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}
.ak-ws-chip-add {
  border-style: dashed;
  color: var(--ak-text-muted);
}
.ak-ws-chip-manage {
  color: var(--ak-text-muted);
}

/* ============================================================ */
/* ---------- Responsive (tablet + mobile) ------------------- */
/* ============================================================ */

/* Board title: flexible width, truncates when needed */
.ak-board-title { max-width: 280px; }
@media (max-width: 767.98px) { .ak-board-title { max-width: 180px; font-size: 1rem !important; } }

/* Offcanvas mobile nav styling */
.ak-mobile-nav { max-width: 320px; width: 85vw; }
.ak-mobile-nav .ak-nav-link {
  width: 100%;
  padding: .7rem 1rem;
  font-size: .95rem;
  border-radius: 10px;
}
.ak-mobile-nav .offcanvas-header {
  border-bottom: 1px solid var(--ak-border);
}

/* --- Tablet & below (< 992px) --- */
@media (max-width: 991.98px) {
  .ak-navbar-inner { padding: 0 1rem; gap: .75rem; }
  .ak-user-menu { padding: 0 .6rem 0 .25rem; height: 36px; }
  .ak-user-menu .ak-avatar,
  .ak-user-menu .ak-avatar-img { width: 28px !important; height: 28px !important; }
  .ak-logout-btn { height: 36px; width: 36px; }

  .ak-hero { padding: 1.35rem 1.4rem; }
  .ak-hero h1 { font-size: 1.5rem; }
  .ak-hero::after { width: 160px; height: 160px; }

  .ak-stat { padding: 1rem 1.1rem; }
  .ak-stat-value { font-size: 1.7rem; }
  .ak-stat-icon { width: 38px; height: 38px; font-size: 1.1rem; top: 1rem; right: 1rem; }

  .ak-dash-hero-top { padding: 1rem 1.2rem; }
  .ak-dash-headline { font-size: 1.15rem; }
  .ak-dash-stats { padding: .75rem 1.2rem; flex-wrap: wrap; gap: .6rem 0; }
  .ak-dash-stat-divider:nth-of-type(2) { display: none; }
  .ak-dash-stat { flex: 0 0 calc(50% - .5rem); }
  .ak-dash-stat-value { font-size: 1.25rem; }

  .ak-board-header { padding: 1rem 1rem .4rem; }
  .ak-board-toolbar { padding: .5rem .55rem; }

  .ak-column { flex: 0 0 272px; }

  .ak-gantt-scroll { max-height: calc(100vh - 260px); }
  .ak-gantt-toolbar { padding: .65rem .75rem; gap: .5rem; }
}

/* --- Mobile (< 768px) --- */
@media (max-width: 767.98px) {
  /* Generic paddings */
  section.container-fluid { padding-left: 1rem !important; padding-right: 1rem !important; }
  .ak-card.p-4 { padding: 1rem !important; }

  /* Type scale */
  h1, .h1 { font-size: 1.55rem; }
  h2, .h2 { font-size: 1.35rem; }
  h3, .h3 { font-size: 1.2rem; }
  .ak-hero { padding: 1.15rem 1.2rem; border-radius: var(--ak-radius); }
  .ak-hero h1, .ak-hero .h2 { font-size: 1.35rem; }

  /* Navbar */
  .ak-navbar { padding: .55rem 0; }
  .ak-brand img { height: 26px; }

  /* Dashboard / lists: compact stats */
  .ak-stat { padding: .9rem 1rem; }
  .ak-stat-value { font-size: 1.5rem; }
  .ak-stat-label { font-size: .7rem; }
  .ak-stat-icon { width: 32px; height: 32px; font-size: 1rem; top: .85rem; right: .85rem; }

  .ak-dash-hero { border-radius: var(--ak-radius); }
  .ak-dash-hero-top { padding: .9rem 1rem; }
  .ak-dash-headline { font-size: 1.05rem; }
  .ak-dash-stats { padding: .65rem 1rem; flex-wrap: wrap; gap: .5rem 0; }
  .ak-dash-stat-divider { display: none; }
  .ak-dash-stat { flex: 0 0 50%; gap: .5rem; }
  .ak-dash-stat-icon { width: 32px; height: 32px; font-size: .9rem; }
  .ak-dash-stat-value { font-size: 1.15rem; }
  .ak-dash-stat-label { font-size: .7rem; }

  /* Board tiles full width */
  .ak-board-tile-body { padding: 1rem; }

  /* Kanban board header stacks vertically */
  .ak-board-header { padding: .85rem .9rem .4rem; }
  .ak-board-header > div.d-flex.flex-wrap { gap: .5rem !important; }
  .ak-board-header h1 { font-size: 1.05rem; max-width: none !important; }

  /* Mini-stats row — horizontal scroll so it doesn't wrap messily */
  .ak-stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: 0 !important;
    padding-bottom: 2px;
  }
  .ak-stats-row::-webkit-scrollbar { display: none; }
  .ak-stats-row .ak-mini-stat { flex-shrink: 0; }

  /* Board toolbar: make filters wrap nicely */
  .ak-board-toolbar { flex-direction: column; align-items: stretch !important; }
  .ak-board-toolbar > div { width: 100%; }
  .ak-board-toolbar .ak-filter-trigger { width: 100%; justify-content: space-between; }
  .ak-board-toolbar .position-relative { max-width: none !important; flex: 1 1 100% !important; }

  /* Kanban columns: full-width with peek of next */
  .ak-column { flex: 0 0 86vw; max-width: 320px; }
  .ak-board { padding: .4rem .75rem 1rem; gap: .5rem; }
  .ak-board-scroll { top: 230px; /* more header space on mobile, JS overrides */ }

  /* Card modal: reduce padding */
  .ak-card-modal-body { padding: 1rem !important; }
  .ak-card-modal-header { padding: .85rem 1rem !important; }
  .ak-card-title-input { font-size: 1.15rem; }
  .ak-section { padding: .85rem .9rem; }
  .ak-quill { min-height: 200px; }

  /* Modal chrome */
  .modal-header, .modal-footer { padding: .85rem 1rem; }
  .modal-body { padding: 1rem; }

  /* Gantt: narrower left column hint */
  .ak-gantt-toolbar { padding: .55rem .65rem; }
  .ak-gantt-scroll { max-height: calc(100vh - 220px); }

  /* Workspace chips row: horizontal scroll */
  .ak-ws-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .ak-ws-chips::-webkit-scrollbar { display: none; }
  .ak-ws-chips > * { flex-shrink: 0; }
  .ak-ws-chip-manage.ms-auto { margin-left: .4rem !important; }

  /* Dashboard row: avoid translating on hover (jitters on touch) */
  .ak-dash-row:hover, .ak-dash-board-row:hover { transform: none; }

  /* Tile edit button always visible on touch */
  .ak-tile-edit { opacity: 1; }
}

/* --- Small phones (< 576px) --- */
@media (max-width: 575.98px) {
  section.container-fluid { padding-left: .75rem !important; padding-right: .75rem !important; }
  .ak-breadcrumb { font-size: .78rem; }
  .ak-column { flex: 0 0 90vw; }
  .ak-board { padding: .35rem .5rem 1rem; }
  .ak-mini-stat { height: 26px; padding: 0 .55rem; }
  .ak-mini-stat-value { font-size: .78rem; }
  .ak-mini-stat-label { font-size: .64rem; }
  .ak-hero h1, .ak-hero .h2 { font-size: 1.2rem; }
  .ak-stat-value { font-size: 1.35rem; }
}

/* --- Users table: mobile (< 768px) --- */
@media (max-width: 767.98px) {
  /* Hide less-important columns on mobile */
  .ak-users-table thead th:nth-child(3),
  .ak-users-table tbody td:nth-child(3),
  .ak-users-table thead th:nth-child(4),
  .ak-users-table tbody td:nth-child(4) {
    display: none;
  }
  .ak-users-table thead th { padding: 10px 10px; font-size: .65rem; }
  .ak-users-table tbody td { padding: 10px 10px; }
  .ak-user-avatar { width: 34px; height: 34px; border-radius: 10px; }
}
/* --- Users table: small phones (< 576px) --- */
@media (max-width: 575.98px) {
  /* Also hide Role column on very small screens */
  .ak-users-table thead th:nth-child(5),
  .ak-users-table tbody td:nth-child(5) {
    display: none;
  }
}

/* --- Gantt: small phones (< 576px) --- */
@media (max-width: 575.98px) {
  .ak-gantt-toolbar { flex-direction: column; align-items: stretch; gap: .4rem; }
  .ak-gantt-toolbar .ms-auto { margin-left: 0 !important; }
}

/* Images shouldn't overflow their container */
img { max-width: 100%; height: auto; }
.ak-avatar-img, .ak-brand img, .ak-board-icon,
.ak-dash-board-icon, .ak-board-tile-icon { max-width: none; }

/* --- Tag chip on card tile --- */
.ak-tag-chip {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color) 14%, var(--ak-surface));
  color: var(--tag-color);
  border: 1px solid color-mix(in srgb, var(--tag-color) 35%, transparent);
  line-height: 1.4;
}

/* --- Board tag chip (on tile + in picker) --- */
.ak-board-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  border: 1px solid var(--ak-border);
  line-height: 1.4;
  white-space: nowrap;
}
.ak-board-tag-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Manrope', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--ak-border);
  background: var(--ak-surface);
  color: var(--ak-text-muted);
  cursor: pointer;
  outline: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.ak-board-tag-pick:hover {
  border-color: var(--ak-border-strong);
  color: var(--ak-text);
}
.ak-board-tag-pick.active {
  background: var(--ak-text);
  color: #fff;
  border-color: var(--ak-text);
}
.ak-tag-remove {
  color: inherit;
  opacity: .55;
  cursor: pointer;
  line-height: 1;
}
.ak-tag-remove:hover { opacity: 1; }

/* --- Ownership tabs (My / Invited / All) on boards list --- */
.ak-ownership-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
}
.ak-own-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--ak-text-muted);
  font-weight: 600;
  font-size: .85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.ak-own-tab:hover { color: var(--ak-text); }
.ak-own-tab.active {
  background: var(--ak-surface);
  color: var(--ak-text);
  box-shadow: 0 1px 3px rgba(15, 42, 36, .08);
}
.ak-own-tab-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ak-border);
  color: var(--ak-text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}
.ak-own-tab.active .ak-own-tab-count {
  background: var(--ak-text);
  color: #fff;
}

/* --- Global flash messages --- */
.ak-flash-stack {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
}
.ak-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 16px;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-left: 4px solid var(--ak-primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 42, 36, .12);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ak-text);
  animation: ak-flash-in .25s ease;
}
.ak-flash i { font-size: 1.1rem; color: var(--ak-primary); flex-shrink: 0; }
.ak-flash span { flex-grow: 1; }
.ak-flash-success { border-left-color: var(--ak-primary); }
.ak-flash-success i { color: var(--ak-primary); }
.ak-flash-error,
.ak-flash-danger { border-left-color: var(--ak-danger); }
.ak-flash-error i,
.ak-flash-danger i { color: var(--ak-danger); }
.ak-flash-warning { border-left-color: var(--ak-warning); }
.ak-flash-warning i { color: var(--ak-warning); }
.ak-flash-close {
  background: transparent;
  border: none;
  color: var(--ak-text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.ak-flash-close:hover { color: var(--ak-text); }
.ak-flash-leave { opacity: 0; transform: translateX(20px); transition: opacity .25s ease, transform .25s ease; }
@keyframes ak-flash-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 575.98px) {
  .ak-flash-stack { top: 64px; right: 12px; left: 12px; max-width: none; }
}

/* Auth pages (login / password reset) */
.ak-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--ak-bg);
}
.ak-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--ak-surface);
  border-radius: var(--ak-radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 4px 24px -12px rgba(15,42,36,.12);
  border: 1px solid var(--ak-border);
}
.ak-auth-logo {
  height: 56px;
  width: auto;
}
.ak-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ak-surface-alt);
  color: var(--ak-primary-dark);
  font-size: 1.75rem;
}

/* Dependency rows in card modal */
.ak-dep-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .6rem;
  border-radius: var(--ak-radius-sm);
  margin-bottom: 4px;
  transition: background .12s;
}
.ak-dep-row:hover { background: var(--ak-surface-alt); }
.ak-dep-row--in { border-left: 3px solid var(--ak-danger); }
.ak-dep-row--out { border-left: 3px solid var(--ak-primary); }

.ak-dep-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
}
.ak-dep-row--in .ak-dep-icon { background: #FFE8EC; color: var(--ak-danger); }
.ak-dep-row--out .ak-dep-icon { background: #ECFBF6; color: var(--ak-primary-dark); }

.ak-dep-body { flex: 1; min-width: 0; }
.ak-dep-title {
  font-size: .82rem; font-weight: 600; color: var(--ak-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ak-dep-meta {
  font-size: .68rem; color: var(--ak-text-muted); font-weight: 500;
}

.ak-dep-remove {
  flex-shrink: 0;
  border: none; background: none;
  color: var(--ak-text-muted);
  font-size: .9rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s, color .12s;
  padding: 0; line-height: 1;
}
.ak-dep-row:hover .ak-dep-remove { opacity: 1; }
.ak-dep-remove:hover { color: var(--ak-danger); }

/* Add dependency controls */
.ak-dep-add {}
.ak-dep-select {
  border-radius: var(--ak-radius-sm) !important;
  font-size: .8rem;
}
.ak-dep-dir-btn {
  border: 1px solid var(--ak-border);
  background: var(--ak-surface);
  border-radius: 999px;
  padding: .3rem .7rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ak-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: all .12s;
}
.ak-dep-dir-btn:hover { border-color: var(--ak-border-strong); color: var(--ak-text); }
.ak-dep-dir-btn.active {
  background: var(--ak-text);
  color: #fff;
  border-color: var(--ak-text);
}
.ak-dep-dir-btn.active i { color: #fff; }

/* Tasks page */
.ak-tasks-search {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  padding: .4rem 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.ak-tasks-search:focus-within {
  border-color: var(--ak-border-strong);
  box-shadow: 0 0 0 3px rgba(15, 42, 36, .07);
}
.ak-tasks-search i { color: var(--ak-text-muted); font-size: .85rem; }
.ak-tasks-search input {
  border: none; outline: none; background: transparent;
  font-size: .85rem; font-family: 'Manrope', sans-serif;
  color: var(--ak-text); width: 180px; font-weight: 500;
}
.ak-tasks-search input::placeholder { color: var(--ak-text-muted); }

/* --- Filter rows (workspaces / tags) --- */
.ak-filter-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1rem;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
}
.ak-filter-row-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--ak-text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  min-width: auto;
}
.ak-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-pill);
  background: transparent;
  color: var(--ak-text-muted);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ak-filter-chip:hover { border-color: var(--ak-primary); color: var(--ak-text); }
.ak-filter-chip.active {
  background: var(--ak-primary);
  border-color: var(--ak-primary);
  color: #fff;
  font-weight: 600;
}
.ak-filter-chip-logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}
.ak-filter-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ak-filter-manage {
  font-size: .75rem;
  font-weight: 500;
  color: var(--ak-text-muted);
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
  transition: color .15s;
}
.ak-filter-manage:hover { color: var(--ak-text); }

.ak-tasks-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  margin-bottom: 1rem;
}
.ak-tasks-pill-group {
  display: inline-flex;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.ak-tasks-pill {
  border: 0; background: transparent; color: var(--ak-text-muted);
  font-weight: 600; font-size: .78rem; padding: .3rem .75rem;
  border-radius: 999px; cursor: pointer; display: inline-flex;
  align-items: center; gap: .35rem; transition: all .12s;
  white-space: nowrap;
}
.ak-tasks-pill:hover { color: var(--ak-text); }
.ak-tasks-pill.active {
  background: var(--ak-surface);
  color: var(--ak-text);
  box-shadow: 0 1px 3px rgba(15,42,36,.08);
}
.ak-tasks-filter-divider {
  width: 1px; height: 24px;
  background: var(--ak-border);
  margin: 0 .25rem;
}
.ak-tasks-filter-select {
  border: 1px solid var(--ak-border);
  border-radius: 999px; background: var(--ak-surface);
  padding: .35rem 2rem .35rem .75rem; font-size: .78rem;
  font-weight: 600; color: var(--ak-text-muted);
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235B7A72'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right .5rem center;
  background-size: 12px; transition: border-color .12s;
}
.ak-tasks-filter-select:hover { border-color: var(--ak-border-strong); color: var(--ak-text); }
.ak-tasks-filter-select:focus { outline: none; border-color: var(--ak-border-strong); }

.ak-tasks-clear {
  border: none; background: none;
  color: var(--ak-text-muted); font-size: .78rem;
  font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .5rem; border-radius: 999px;
  transition: all .12s;
}
.ak-tasks-clear:hover { color: var(--ak-danger); background: #FFE8EC; }

/* Multi-select dropdown (status filter) */
.ak-tasks-multi { position: relative; }
.ak-tasks-multi-btn {
  border: 1px solid var(--ak-border);
  border-radius: 999px; background: var(--ak-surface);
  padding: .4rem .85rem; font-size: .78rem;
  font-weight: 600; color: var(--ak-text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .45rem;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.ak-tasks-multi-btn:hover {
  color: var(--ak-text); border-color: var(--ak-primary);
  background: #F4FBF9;
}
.ak-tasks-multi.open .ak-tasks-multi-btn {
  color: var(--ak-text); border-color: var(--ak-primary);
  background: #F4FBF9;
  box-shadow: 0 0 0 3px rgba(40,214,177,.12);
}
.ak-tasks-multi-btn > .bi-funnel { color: var(--ak-primary); font-size: .82rem; }
.ak-tasks-multi-btn > .bi-chevron-down {
  font-size: .65rem; opacity: .6;
  transition: transform .18s;
}
.ak-tasks-multi.open .ak-tasks-multi-btn > .bi-chevron-down { transform: rotate(180deg); }
.ak-tasks-multi-count {
  background: var(--ak-primary); color: #fff;
  padding: 1px 7px; border-radius: 999px;
  font-size: .66rem; font-weight: 700;
  letter-spacing: .02em;
}

.ak-tasks-multi-menu {
  position: absolute; right: 0; top: calc(100% + .4rem);
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,42,36,.08), 0 2px 8px rgba(31,174,133,.06);
  min-width: 200px; padding: .35rem;
  z-index: 20;
  transform-origin: top right;
  animation: ak-multi-pop .14s ease-out;
}
@keyframes ak-multi-pop {
  from { opacity: 0; transform: scale(.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ak-tasks-multi-head {
  padding: .45rem .7rem .3rem;
  font-size: .64rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ak-text-muted);
}
.ak-tasks-multi-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .6rem; border-radius: 8px;
  font-size: .85rem; font-weight: 500; color: var(--ak-text);
  cursor: pointer; user-select: none;
  transition: background .12s;
}
.ak-tasks-multi-item:hover { background: #F4FBF9; }
.ak-tasks-multi-item input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ak-border);
  border-radius: 5px; background: var(--ak-surface);
  cursor: pointer; position: relative; flex-shrink: 0;
  transition: all .14s;
}
.ak-tasks-multi-item input[type=checkbox]:hover { border-color: var(--ak-primary); }
.ak-tasks-multi-item input[type=checkbox]:checked {
  background: var(--ak-primary); border-color: var(--ak-primary);
}
.ak-tasks-multi-item input[type=checkbox]:checked::after {
  content: ""; position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ak-tasks-multi-footer {
  display: flex; gap: .25rem;
  padding: .25rem; margin-top: .25rem;
  border-top: 1px solid var(--ak-border);
  padding-top: .4rem;
}
.ak-tasks-multi-link {
  flex: 1;
  background: none; border: none;
  font-size: .72rem; font-weight: 600;
  color: var(--ak-text-muted);
  padding: .3rem .5rem; border-radius: 6px;
  cursor: pointer; transition: all .12s;
}
.ak-tasks-multi-link:hover { color: var(--ak-primary); background: var(--ak-surface-alt); }

/* Table */
.ak-tasks-card {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  overflow: hidden;
}
.ak-tasks-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
}
.ak-tasks-table thead th {
  background: linear-gradient(180deg, #FAFCFB 0%, #F4F9F7 100%);
  border-bottom: 1px solid var(--ak-border);
  font-weight: 700; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--ak-text-muted); padding: .7rem .85rem;
  white-space: nowrap; user-select: none;
  position: sticky; top: 0; z-index: 1;
}
.ak-th-sort { cursor: pointer; }
.ak-th-sort:hover { color: var(--ak-text); }
.ak-th-sort i { font-size: .6rem; margin-left: 3px; opacity: .6; }

.ak-tasks-table tbody td {
  padding: .6rem .85rem; vertical-align: middle;
  border-bottom: 1px solid rgba(226,242,236,.6);
}
.ak-task-row { cursor: pointer; transition: background .08s; }
.ak-task-row:hover { background: #F6FCFA; }

.ak-tasks-empty {
  text-align: center; color: var(--ak-text-muted); padding: 3rem 1rem !important;
  font-size: .9rem;
}
.ak-tasks-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .4; }

/* Title cell */
.ak-task-title-cell {
  display: flex; align-items: center; gap: .5rem;
}
.ak-task-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.ak-task-ws-logo {
  width: 28px; height: 28px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
}
.ak-task-ws-letter {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.ak-task-title-wrap { min-width: 0; }
.ak-task-title {
  font-weight: 600; color: var(--ak-text);
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.ak-task-row:hover .ak-task-title { color: var(--ak-text); }
.ak-task-labels { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.ak-chip-tiny {
  display: inline-block; padding: 1px 7px;
  border-radius: 999px; font-size: .62rem;
  font-weight: 700; color: #fff;
  white-space: nowrap; line-height: 1.5;
}

/* Board cell */
.ak-task-board {
  display: flex; align-items: center; gap: .35rem;
  font-size: .78rem; color: var(--ak-text-muted);
  font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.ak-task-board-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

/* Column cell */
.ak-task-col {
  font-size: .78rem; color: var(--ak-text-muted);
  font-weight: 500;
}

/* Assignees */
.ak-task-assignees { display: flex; gap: 2px; }
.ak-task-ava {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--ak-surface);
}
.ak-task-ava-letter {
  display: flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 700;
  background: var(--ak-surface-alt); color: var(--ak-text-muted);
}
.ak-task-ava-more {
  display: flex; align-items: center; justify-content: center;
  font-size: .52rem; font-weight: 700;
  background: var(--ak-border); color: var(--ak-text-muted);
}

/* Creator cell */
.ak-task-creator {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: var(--ak-text-muted);
  font-weight: 500;
}
.ak-task-creator-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 110px;
}

/* Due date */
.ak-task-due {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600;
  color: var(--ak-text-muted);
}
.ak-task-due i { font-size: .75rem; }
.ak-task-due.overdue { color: var(--ak-danger); }
.ak-task-nodue { color: var(--ak-border); font-size: .78rem; }

/* Status pills */
.ak-status-pill {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .02em;
}
.ak-status-draft { background: #F0F1F3; color: #6B7280; }
.ak-status-active { background: #E0F4FF; color: #0369A1; }
.ak-status-completed { background: #ECFDF5; color: #047857; }
.ak-status-archived { background: #F5F3FF; color: #7C3AED; }

/* ── Recent Activity feed ── */
.ak-activity-list {
  display: flex; flex-direction: column; gap: 2px;
}
.ak-activity-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--ak-radius-sm);
  text-decoration: none; color: var(--ak-text);
  transition: background .15s;
}
.ak-activity-row:hover {
  background: var(--ak-surface-alt);
  color: var(--ak-text);
}
.ak-activity-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.ak-activity-completed {
  background: #ECFDF5; color: #047857;
}
.ak-activity-created {
  background: #E0F4FF; color: #0369A1;
}
.ak-activity-updated {
  background: #F0F1F3; color: #6B7280;
}
.ak-activity-body {
  flex: 1; min-width: 0;
}
.ak-activity-title {
  font-size: .88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ak-activity-meta {
  display: flex; align-items: center; gap: .35rem;
  font-size: .75rem; color: var(--ak-text-muted); margin-top: 1px;
}
.ak-activity-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; flex-shrink: 0;
}
.ak-activity-time {
  flex-shrink: 0; font-size: .72rem; font-weight: 500;
  color: var(--ak-text-muted); white-space: nowrap;
}

/* ============================================================ */
/* ---------- Search Command Palette (Cmd+K) ----------------- */
/* ============================================================ */

.ak-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem 1rem;
  border-radius: var(--ak-radius-pill);
  border: none;
  background: var(--ak-surface-alt);
  color: var(--ak-text-muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  height: 40px;
  min-width: 160px;
}
.ak-search-trigger:hover {
  color: var(--ak-text);
  background: var(--ak-border);
}
.ak-search-trigger i { font-size: .85rem; }
.ak-search-trigger-label {
  font-size: .78rem;
  font-weight: 500;
}
.ak-search-trigger-kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ak-surface);
  margin-left: auto;
  border: 1px solid var(--ak-border);
  font-size: .62rem;
  font-weight: 600;
  color: var(--ak-text-muted);
  font-family: inherit;
  line-height: 1.4;
}

/* Modal overrides for command-palette feel */
.ak-search-dialog {
  max-width: 580px;
}
.ak-search-content {
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg) !important;
  box-shadow: 0 24px 64px rgba(15, 42, 36, .18);
  overflow: hidden;
  background: var(--ak-surface);
}

/* Input row */
.ak-search-input-wrap {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--ak-border);
}
.ak-search-icon {
  font-size: 1.1rem;
  color: var(--ak-text-muted);
  flex-shrink: 0;
}
.ak-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Manrope', sans-serif;
  color: var(--ak-text);
}
.ak-search-input::placeholder {
  color: var(--ak-text-soft);
  font-weight: 400;
}
.ak-search-kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--ak-surface-alt);
  border: 1px solid var(--ak-border);
  font-size: .65rem;
  font-weight: 600;
  color: var(--ak-text-muted);
  font-family: inherit;
  flex-shrink: 0;
}

/* Results body */
.ak-search-body {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ak-border) transparent;
}

/* Empty / hint state */
.ak-search-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 2.5rem 1rem;
  color: var(--ak-text-muted);
  font-size: .88rem;
  font-weight: 500;
}
.ak-search-state i {
  font-size: 1.6rem;
  opacity: .45;
}

/* Result list */
.ak-search-list {
  padding: .35rem;
}
.ak-search-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  border-radius: var(--ak-radius-sm);
  text-decoration: none;
  color: var(--ak-text);
  cursor: pointer;
  transition: background .1s;
}
.ak-search-item:hover,
.ak-search-item--active {
  background: var(--ak-surface-alt);
  color: var(--ak-text);
}
.ak-search-item--active {
  background: var(--ak-surface-hover);
}

/* Colored dot */
.ak-search-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Item body */
.ak-search-item-body {
  flex: 1;
  min-width: 0;
}
.ak-search-title {
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ak-search-title mark {
  background: rgba(40, 214, 177, .22);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.ak-search-meta {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 500;
  color: var(--ak-text-muted);
  margin-top: 1px;
}
.ak-search-board {
  font-weight: 600;
}
.ak-search-sep {
  opacity: .5;
}
.ak-search-due {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  margin-left: .15rem;
}
.ak-search-due i { font-size: .65rem; }
.ak-search-due.overdue {
  color: var(--ak-danger);
}

/* Enter arrow hint */
.ak-search-enter {
  flex-shrink: 0;
  font-size: .8rem;
  color: var(--ak-text-soft);
  opacity: 0;
  transition: opacity .1s;
}
.ak-search-item:hover .ak-search-enter,
.ak-search-item--active .ak-search-enter {
  opacity: 1;
}

/* Responsive */
@media (max-width: 575.98px) {
  .ak-search-dialog { margin: .5rem; max-width: none; }
  .ak-search-content { border-radius: var(--ak-radius) !important; }
  .ak-search-body { max-height: 50vh; }
  .ak-search-trigger { padding: .35rem .5rem; }
  .ak-search-trigger-label,
  .ak-search-trigger-kbd { display: none !important; }
}
