/* =====================================================
   Project NP — design system
   Мята/аквамарин + тёплый текст, скруглённые формы,
   мягкие тени, плавные анимации.
   ===================================================== */

:root {
  /* Палитра */
  --mint: #21d7c5;
  --mint-soft: #d9fffa;
  --aqua: #00b8cc;
  --aqua-deep: #0a7a8a;
  --dark: #0f1e2d;
  --darker: #0a1825;
  --text: #1a2733;
  --text-soft: #4a5a6b;
  --muted: #6b7d90;
  --bg: #f0faf9;
  --bg-2: #fbfdfd;
  --card: #ffffff;
  --line: #d7efec;
  --line-soft: #e8f4f2;
  --coral: #ff5f5f;
  --coral-soft: #ffe0e0;
  --yellow: #fff3c4;
  --purple: #c8a2ff;
  --blue: #b8e0ff;
  --green: #b8f5d4;

  /* Тени */
  --shadow-xs: 0 1px 3px rgba(15, 30, 45, .04);
  --shadow: 0 4px 18px rgba(15, 30, 45, .06);
  --shadow-lg: 0 12px 40px rgba(15, 30, 45, .12);
  --shadow-xl: 0 24px 80px rgba(15, 30, 45, .18);

  /* Скругления */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Типографика */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(33, 215, 197, .12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(0, 184, 204, .08), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--mint); color: var(--dark); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--mint); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 24px 18px;
  background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--r);
  transition: background .15s;
}
.brand:hover { background: rgba(255, 255, 255, .04); }

.logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  color: var(--darker);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -.02em;
  box-shadow: 0 4px 12px rgba(33, 215, 197, .35);
  flex-shrink: 0;
}

.brand b {
  font-size: 16px;
  letter-spacing: -.01em;
  display: block;
  line-height: 1.2;
}
.brand small {
  display: block;
  color: #88a8b3;
  font-size: 11px;
  letter-spacing: .02em;
  margin-top: 2px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.nav-section {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 800;
  color: #5d7a85;
  padding: 14px 12px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #d6e6e8;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s, transform .12s;
}
.nav-link:hover { background: rgba(33, 215, 197, .10); color: #fff; transform: translateX(2px); }
.nav-link.active { background: rgba(33, 215, 197, .18); color: #fff; }

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-sub { padding-left: 12px; font-size: 13.5px; color: #b8cdd3; }
.nav-sub .nav-icon { font-size: 14px; }

.sidebar hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin: 6px 0;
}

.userbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  font-size: 13px;
  color: #b8cdd3;
}
.user-pill {
  background: rgba(33, 215, 197, .15);
  color: var(--mint);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.user-logout { color: #88a8b3; font-size: 12px; }
.user-logout:hover { color: var(--coral); }

.domain {
  color: #5d7a85;
  font-size: 11px;
  text-align: center;
  letter-spacing: .04em;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .05);
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
  margin-left: 280px;
  padding: 36px 40px;
  min-height: 100vh;
  max-width: 1400px;
}

@media (max-width: 900px) {
  .main { margin-left: 220px; padding: 24px 20px; }
  .sidebar { width: 220px; padding: 18px 12px; }
  .brand small { display: none; }
}
@media (max-width: 600px) {
  .main { margin-left: 0; padding: 16px; }
  .sidebar { display: none; }
}

/* ============================================================
   HERO + PAGE HEAD
   ============================================================ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 32px;
  padding: 28px 36px 36px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 0% 0%, rgba(33, 215, 197, .35), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0, 184, 204, .25), transparent 50%),
    linear-gradient(135deg, var(--dark), #163b4a);
  color: #fff;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(33, 215, 197, .15), transparent 60%);
  pointer-events: none;
}
.hero p { color: #b8e0e0; margin: 6px 0 0; max-width: 540px; }
.hero h1 { margin: 6px 0 8px; font-size: 36px; letter-spacing: -.03em; line-height: 1.1; color: #fff; }
.hero > div { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--card);
  color: var(--dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.pagehead h1 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--dark);
}
.pagehead p { color: var(--muted); margin: 4px 0 0; max-width: 600px; }

h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--dark); margin: 0 0 14px; }
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--dark); }
h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--text); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--aqua);
  font-weight: 800;
  font-size: 11px;
  background: var(--mint-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

.muted { color: var(--muted); font-weight: 400; }
.text-soft { color: var(--text-soft); }

/* ============================================================
   BUTTONS
   ============================================================ */

.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(180deg, var(--mint), #1cc1b0);
  color: var(--darker);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -.01em;
  transition: transform .1s, box-shadow .15s, filter .15s;
  box-shadow: 0 2px 6px rgba(33, 215, 197, .25);
}
.button:hover, button.button:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(33, 215, 197, .4);
  transform: translateY(-1px);
}
.button:active, button.button:active { transform: translateY(0); }

.button.ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.button.ghost:hover { background: var(--mint-soft); border-color: var(--mint); }

.button.danger {
  background: var(--coral-soft);
  color: #9a1d1d;
  box-shadow: none;
}
.button.danger:hover { background: #ffd0d0; box-shadow: 0 4px 12px rgba(255, 95, 95, .2); }

.mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--mint-soft);
  color: var(--aqua-deep);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  text-decoration: none;
  transition: background .12s, transform .1s;
}
.mini:hover { background: var(--mint); color: var(--darker); }
.mini:active { transform: scale(.96); }
.mini.danger { background: var(--coral-soft); color: #9a1d1d; }
.mini.danger:hover { background: #ffc8c8; }
.mini.done { background: var(--mint); color: #fff; }
.mini.done:hover { background: var(--aqua-deep); color: #fff; }
.mini.undo { background: #f0f0f0; color: #555; }
.mini.undo:hover { background: #ddd; color: var(--dark); }
.mini.done, .mini.undo { font-weight: 700; }

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

/* ============================================================
   KPI cards (дашборд)
   ============================================================ */

.kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: var(--mint-soft);
  border-radius: 50%;
  transform: translate(30%, -30%);
  opacity: .5;
  transition: transform .3s, opacity .3s;
}
.kpi:hover::after { transform: translate(20%, -20%) scale(1.5); opacity: .8; }
.kpi-link { cursor: pointer; }
.kpi-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.kpi span {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.kpi strong {
  font-size: 30px;
  color: var(--dark);
  font-weight: 800;
  letter-spacing: -.03em;
  position: relative;
  z-index: 1;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .15s, border-color .15s;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.card-head h2 { margin: 0; font-size: 17px; }
.card.clickable {
  display: block;
  cursor: pointer;
  color: var(--text);
}
.card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--mint);
}
.card.clickable b { display: block; margin-bottom: 4px; font-size: 15.5px; color: var(--dark); }
.card.clickable p { color: var(--text-soft); margin: 0 0 8px; font-size: 13.5px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card p { color: var(--text-soft); margin: 6px 0; }
.card.clickable .tag { margin-top: 4px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--aqua-deep);
  font-size: 11.5px;
  font-weight: 600;
}

/* ============================================================
   GRIDS + LISTS
   ============================================================ */

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; margin-bottom: 24px; }
@media (max-width: 900px) { .grid.two { grid-template-columns: 1fr; } }

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

.row, .row.link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line-soft);
  color: var(--text);
  transition: background .12s, border-color .12s, transform .1s;
  gap: 12px;
}
.row.link:hover { background: var(--mint-soft); border-color: var(--mint); transform: translateX(2px); }
.row b { font-weight: 600; color: var(--dark); font-size: 14px; }
.row span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.row-date { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 24px; }
.empty a { color: var(--aqua); font-weight: 600; }

/* ============================================================
   FORMS
   ============================================================ */

.form { padding: 28px; }
.form h2 { margin: 24px 0 12px; font-size: 16px; color: var(--text); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 22px;
  margin-bottom: 20px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-label .req { color: var(--coral); font-style: normal; }

.field input, .field select, .field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(33, 215, 197, .15);
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field input[type="checkbox"] { width: 18px; height: 18px; }

.checkbox { flex-direction: row; align-items: center; gap: 10px; padding: 6px 0; }
.checkbox span { font-size: 14px; color: var(--text); }

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 12px;
  padding: 10px 14px;
  background: var(--mint-soft);
  border-left: 3px solid var(--mint);
  border-radius: 8px;
}

/* ============================================================
   SEARCH
   ============================================================ */

.search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.search input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus {
  outline: 0;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(33, 215, 197, .15);
}

/* ============================================================
   TABLE
   ============================================================ */

.table-card {
  background: var(--card);
  border-radius: var(--r-lg);
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
th {
  background: #f5fbfa;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--muted);
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafefd; }

.row-actions { white-space: nowrap; text-align: right; }
.truncate { display: inline-block; max-width: 320px; color: var(--text-soft); }
td.empty { padding: 40px 16px; color: var(--muted); }

/* ============================================================
   STATUS / PRIORITY badges
   ============================================================ */

.status, .prio {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.status-open { background: var(--blue); color: #154a78; }
.status-in_progress { background: var(--yellow); color: #7a5e00; }
.status-waiting { background: var(--purple); color: #4a2670; }
.status-done { background: var(--green); color: #1a6b3f; }
.status-active { background: var(--green); color: #1a6b3f; }
.status-paused { background: #e0e0e0; color: #555; }
.status-cancelled, .status-canceled { background: var(--coral-soft); color: #9a1d1d; }
.status-idea { background: #fff3c4; color: #7a5e00; }
.status-planning, .status-draft { background: var(--blue); color: #154a78; }
.status-published, .status-completed { background: var(--green); color: #1a6b3f; }
.status-scheduled { background: var(--purple); color: #4a2670; }
.status-planned { background: #d4f1e8; color: #1a6b3f; border: 1px solid var(--mint); }
.status-confirmed { background: #c9efff; color: #154a78; border: 1px solid #4fc3e8; }
.status-in_planning { background: #fff3c4; color: #7a5e00; border: 1px solid #f0c440; }
.status-active_session { background: #ffe0e0; color: #9a1d1d; border: 1px solid var(--coral); animation: pulse-urgent 2s ease-in-out infinite; }

.prio-low { background: #f0f0f0; color: #555; }
.prio-normal { background: var(--blue); color: #154a78; }
.prio-medium { background: var(--blue); color: #154a78; }
.prio-high { background: var(--yellow); color: #7a5e00; }
.prio-urgent { background: var(--coral-soft); color: #9a1d1d; animation: pulse-urgent 2s infinite; }

@keyframes pulse-urgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 95, 95, .5); }
  50% { box-shadow: 0 0 0 4px rgba(255, 95, 95, 0); }
}

/* ============================================================
   KANBAN
   ============================================================ */

.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 1200px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .kanban { grid-template-columns: 1fr; } }

.lane {
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 2px;
}
.lane header h2 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
}
.lane-count {
  background: var(--mint);
  color: var(--darker);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
}
.lane-add {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, color .15s;
}
.lane-add:hover { background: var(--mint); color: var(--darker); border-color: var(--mint); }

.lane-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}
.lane-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  font-style: italic;
  padding: 24px 0;
  border: 2px dashed var(--line);
  border-radius: var(--r);
}

.task {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, transform .12s, opacity .2s, border-color .15s;
  position: relative;
}
.task:hover { box-shadow: var(--shadow); border-color: var(--line); }
.task::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--mint);
}
.task[data-priority="urgent"]::before { background: var(--coral); }
.task[data-priority="high"]::before { background: var(--yellow); }
.task[data-priority="low"]::before { background: #e0e0e0; }
.task-ghost { opacity: .4; background: var(--mint-soft); border-style: dashed; }
.task-chosen { box-shadow: var(--shadow-lg); transform: scale(1.02); }
.task-drag { transform: rotate(2deg); cursor: grabbing; }
.task-saving { opacity: .55; }
.task-flash { animation: flash .8s ease-out; }

@keyframes flash {
  0% { background: var(--yellow); }
  100% { background: #fff; }
}

.task-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.task-handle {
  cursor: grab;
  color: var(--muted);
  font-weight: 800;
  user-select: none;
  font-size: 14px;
  padding: 0 4px;
  opacity: .5;
  transition: opacity .12s;
}
.task:hover .task-handle { opacity: 1; }
.task-handle:active { cursor: grabbing; }
.task-title { flex: 1; font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--dark); }
.task-del {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .12s, color .12s, background .12s;
}
.task:hover .task-del { opacity: 1; }
.task-del:hover { color: var(--coral); background: var(--coral-soft); }

.task-notes {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.45;
  cursor: text;
  min-height: 0;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px dashed transparent;
  transition: all .12s;
}
.task-notes:hover {
  background: rgba(33, 215, 197, .05);
  border-color: rgba(33, 215, 197, .25);
}
.task-notes[title]:hover::after {
  content: ' ✏️';
  font-size: 11px;
  opacity: .5;
  margin-left: 4px;
}
.task-title, .task-prio { cursor: text; }
.task-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 8px;
  color: var(--muted);
  font-size: 11.5px;
}
.task-open {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--aqua);
  font-weight: 600;
}
.task-open:hover { color: var(--aqua-deep); }

.task-check {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--mint);
  flex-shrink: 0;
  opacity: .55;
  transition: opacity .12s;
}
.task:hover .task-check { opacity: 1; }

/* ============================================================
   BULK-ACTION BAR
   ============================================================ */

.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 9998;
  font-size: 13.5px;
  transition: transform .25s, opacity .25s;
  opacity: 0;
  border: 1px solid rgba(33, 215, 197, .3);
}
.bulk-bar-active {
  display: flex;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.bulk-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.bulk-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint);
  cursor: pointer;
}
.bulk-actions { display: flex; gap: 6px; }
.bulk-actions .mini.danger { background: var(--coral-soft); color: #9a1d1d; }
.bulk-actions .mini.danger:hover { background: #ffc8c8; }

/* ============================================================
   TOAST
   ============================================================ */

#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-show { opacity: 1; transform: translateX(0); }
.toast-ok { background: linear-gradient(180deg, var(--mint), #1cc1b0); color: var(--darker); }
.toast-ok::before { content: '✓'; font-weight: 900; }
.toast-err { background: var(--coral); color: #fff; }
.toast-err::before { content: '✕'; font-weight: 900; }

/* ============================================================
   LOGIN
   ============================================================ */

.login-card {
  max-width: 460px;
  margin: 80px auto;
  padding: 48px 40px;
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  text-align: center;
  border: 1px solid var(--line-soft);
}
.login-card h1 { margin: 8px 0 12px; font-size: 28px; }
.login-card p { color: var(--text-soft); margin: 8px 0; }
.login-card .hint {
  margin-top: 20px;
  background: var(--mint-soft);
  text-align: left;
  border-left-color: var(--mint);
}

/* ============================================================
   PLANNINGS (планёрки)
   ============================================================ */

.planning-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media (max-width: 1100px) { .planning-layout { grid-template-columns: 1fr; } }

.planning-section {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.planning-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text);
}
.planning-section h2 .sec-icon { font-size: 18px; }

.md-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 240px;
}
@media (max-width: 800px) { .md-editor { grid-template-columns: 1fr; } }
.md-editor textarea {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  resize: vertical;
  min-height: 240px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: #fafefd;
}
.md-editor textarea:focus { outline: 0; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(33,215,197,.15); }
.md-preview {
  padding: 14px 16px;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--r);
  background: #fafefd;
  overflow-y: auto;
  min-height: 240px;
  max-height: 600px;
  font-size: 14px;
  line-height: 1.6;
}
.md-preview h1, .md-preview h2, .md-preview h3 { color: var(--dark); margin: 8px 0; }
.md-preview h1 { font-size: 22px; }
.md-preview h2 { font-size: 18px; }
.md-preview h3 { font-size: 15px; }
.md-preview p { margin: 6px 0; }
.md-preview ul, .md-preview ol { margin: 6px 0; padding-left: 20px; }
.md-preview code {
  background: var(--mint-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--aqua-deep);
}
.md-preview pre {
  background: var(--dark);
  color: #e6f7f5;
  padding: 12px;
  border-radius: var(--r);
  overflow-x: auto;
  font-size: 12.5px;
}
.md-preview blockquote {
  border-left: 3px solid var(--mint);
  padding: 4px 12px;
  margin: 8px 0;
  color: var(--text-soft);
  background: var(--mint-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.md-preview a { color: var(--aqua); text-decoration: underline; }
.md-empty { color: var(--muted); font-style: italic; }

/* Planning items (задачи планёрки) */
.planning-items { display: flex; flex-direction: column; gap: 8px; }
.planning-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: background .12s, border-color .12s;
}
.planning-item:hover { background: #fafefd; border-color: var(--line); }
.planning-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--mint); cursor: pointer; }
.planning-item-text { flex: 1; font-size: 14px; }
.planning-item.done .planning-item-text { text-decoration: line-through; color: var(--muted); }
.planning-item-meta { color: var(--muted); font-size: 12px; }

/* Attachments (ссылки) */
.attachments { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--mint-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  transition: background .12s;
}
.attachment:hover { background: #c5f5ee; }
.attachment-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.attachment-text { flex: 1; min-width: 0; }
.attachment-text b { font-weight: 600; color: var(--dark); display: block; }
.attachment-text small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; display: block; }
.attachment-del {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}
.attachment-del:hover { color: var(--coral); }

.attachment-form {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 600px) { .attachment-form { grid-template-columns: 1fr; } }
.attachment-form input { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; font-family: inherit; }
.attachment-form input:focus { outline: 0; border-color: var(--mint); }

/* Transcript */
.transcript-box {
  background: #fafefd;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 16px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
}
.transcript-line { margin: 6px 0; }
.transcript-speaker {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--aqua-deep);
  font-weight: 700;
  font-size: 12px;
  margin-right: 6px;
}
.transcript-speaker-alt { background: var(--yellow); color: #7a5e00; }
.transcript-speaker-alt2 { background: var(--purple); color: #4a2670; }
.transcript-speaker-alt3 { background: var(--coral-soft); color: #9a1d1d; }
.transcript-time { color: var(--muted); font-size: 11.5px; margin-right: 6px; font-family: var(--font-mono); }

/* Calendar widget */
.cal-widget {
  background: linear-gradient(135deg, var(--card), #f8fdfc);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.cal-widget::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle, rgba(33, 215, 197, .12), transparent 60%);
  pointer-events: none;
}
.cal-widget h2 { position: relative; z-index: 1; }
.cal-list { position: relative; z-index: 1; }
.cal-event {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r);
  transition: background .12s;
  cursor: pointer;
}
.cal-event:hover { background: var(--mint-soft); }
.cal-date {
  flex-shrink: 0;
  width: 50px;
  text-align: center;
  padding: 6px 4px;
  background: var(--mint-soft);
  border-radius: var(--r-sm);
  color: var(--aqua-deep);
}
.cal-date b { display: block; font-size: 18px; line-height: 1; }
.cal-date span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.cal-event-now { background: linear-gradient(135deg, var(--mint), var(--aqua)); color: var(--darker); }
.cal-event-now .cal-date { background: rgba(255, 255, 255, .25); color: var(--darker); }
.cal-event-now b { color: var(--darker); }
.cal-info { flex: 1; min-width: 0; }
.cal-info b { display: block; font-size: 14px; color: var(--dark); margin-bottom: 2px; }
.cal-info span { color: var(--muted); font-size: 12px; }

/* ============================================================
   MISC
   ============================================================ */

kbd {
  background: #f0f0f0;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
code {
  background: var(--mint-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--aqua-deep);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, .55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal-backdrop.modal-open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--r-xl);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 28px;
  animation: modalIn .2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-close { background: transparent; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); padding: 0 8px; line-height: 1; }
.modal-close:hover { color: var(--coral); }

/* === Floating Action Buttons (FAB) === */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 900;
}
.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  color: #fff;
  border: 0;
  box-shadow: 0 8px 24px rgba(33, 215, 197, .35), 0 2px 6px rgba(0,0,0,.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all .18s;
  text-decoration: none;
  position: relative;
}
.fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(33, 215, 197, .45), 0 4px 10px rgba(0,0,0,.18);
}
.fab:active { transform: scale(.97); }
.fab-ai {
  background: linear-gradient(135deg, #6e7bff, #4a55d6);
  box-shadow: 0 8px 24px rgba(110, 123, 255, .35), 0 2px 6px rgba(0,0,0,.12);
}
.fab-ai:hover {
  box-shadow: 0 12px 32px rgba(110, 123, 255, .45), 0 4px 10px rgba(0,0,0,.18);
}
.fab-secondary {
  background: var(--card);
  color: var(--dark);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.fab-secondary:hover {
  border-color: var(--mint);
  color: var(--aqua-deep);
  background: var(--mint-soft, #ecfaf7);
}
.fab-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.fab:hover .fab-tooltip { opacity: 1; }
.fab-tooltip::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: var(--dark);
}

/* === Side calendar drawer (right side floating panel) === */
.cal-drawer {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: 380px;
  max-width: 92vw;
  background: var(--card);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .15);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  z-index: 950;
  display: flex;
  flex-direction: column;
}
.cal-drawer.cal-drawer-open { transform: translateX(0); }
.cal-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, var(--mint-soft, #ecfaf7), transparent);
}
.cal-drawer-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--dark); }
.cal-drawer-head h2 .ico { margin-right: 6px; }
.cal-drawer-actions { display: flex; gap: 6px; align-items: center; }
.cal-drawer-actions a, .cal-drawer-actions button {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--dark);
  cursor: pointer;
  text-decoration: none;
  transition: all .12s;
}
.cal-drawer-actions a:hover, .cal-drawer-actions button:hover {
  border-color: var(--mint);
  background: var(--mint-soft, #ecfaf7);
}
.cal-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}
.cal-drawer-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
}
.cal-drawer-day {
  margin-bottom: 18px;
}
.cal-drawer-day h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 8px;
  padding: 0 4px;
}
.cal-drawer-day .day-pill {
  background: var(--mint-soft, #ecfaf7);
  color: var(--aqua-deep);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.cal-drawer-event {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  margin-bottom: 6px;
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  transition: all .12s;
  cursor: pointer;
}
.cal-drawer-event:hover {
  border-color: var(--mint);
  background: var(--mint-soft, #ecfaf7);
  transform: translateX(2px);
}
.cal-drawer-event-now {
  background: linear-gradient(135deg, #fff3c4, #ffe0e0);
  border-color: var(--coral);
  animation: pulse-now 2.4s ease-in-out infinite;
}
@keyframes pulse-now {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, .35); }
  50% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0); }
}
.cal-drawer-event .ev-time {
  font-size: 12px;
  color: var(--aqua-deep);
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cal-drawer-event .ev-title {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin: 2px 0;
  font-size: 14px;
}
.cal-drawer-event .ev-loc {
  font-size: 11.5px;
  color: var(--muted);
}
.cal-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, .25);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 940;
}
.cal-drawer-backdrop.cal-drawer-backdrop-open {
  opacity: 1;
  pointer-events: auto;
}

/* === AI assistant panel === */
.ai-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 420px;
  max-width: 92vw;
  max-height: 70vh;
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(110, 123, 255, .25), 0 4px 12px rgba(0,0,0,.15);
  z-index: 960;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.ai-panel.ai-panel-open { display: flex; animation: modalIn .25s ease-out; }
.ai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #6e7bff, #4a55d6);
  color: #fff;
}
.ai-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.ai-head h3 .ico { margin-right: 6px; }
.ai-head .ai-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark);
  min-height: 120px;
}
.ai-msg {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 90%;
}
.ai-msg-user {
  background: var(--mint-soft, #ecfaf7);
  color: var(--dark);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.ai-msg-bot {
  background: #f1f3ff;
  color: var(--dark);
  border-bottom-left-radius: 4px;
}
.ai-foot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg, #fafbfc);
}
.ai-foot input {
  flex: 1;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--dark);
  background: var(--card);
  outline: none;
}
.ai-foot input:focus { border-color: #6e7bff; box-shadow: 0 0 0 3px rgba(110, 123, 255, .15); }
.ai-foot button {
  background: linear-gradient(135deg, #6e7bff, #4a55d6);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ai-foot button:disabled { opacity: .5; cursor: wait; }

/* === File preview modal === */
.preview-card { max-width: 720px; }
.preview-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.preview-meta b { color: var(--dark); }
.preview-content {
  max-height: 60vh;
  overflow: auto;
  padding: 14px 16px;
  background: var(--bg, #fafbfc);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  color: var(--dark);
  line-height: 1.5;
}
.preview-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.preview-no-preview {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.preview-no-preview .ico { font-size: 48px; display: block; margin-bottom: 12px; }
.preview-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

/* === Compact dashboard charts === */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (max-width: 700px) {
  .charts-row { grid-template-columns: 1fr; }
}
.chart-card { padding: 12px 16px !important; }
.chart-card h2 { font-size: 13px !important; }
.chart-wrap {
  position: relative;
  height: 200px;
  max-width: 320px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .chart-wrap { height: 180px; max-width: 260px; }
}

/* Inline link in text fields */
.linkify {
  color: var(--aqua-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.linkify:hover { color: var(--dark); }

/* === Task Checkpoints === */
.checkpoints-section {
  border-left: 4px solid var(--mint);
}
.cp-stats {
  background: var(--mint-soft, #ecfaf7);
  color: var(--aqua-deep);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: all .25s;
}
.cp-stats.cp-all-done {
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  color: #fff;
  animation: cp-pulse 1.5s ease-in-out;
}
@keyframes cp-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.cp-progress {
  height: 6px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 16px;
}
.cp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--aqua));
  border-radius: 999px;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.cp-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.cp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  margin-bottom: 6px;
  background: var(--card);
  transition: all .2s;
  position: relative;
}
.cp-item:hover {
  border-color: var(--mint);
  background: var(--mint-soft, #ecfaf7);
}
.cp-item.cp-done {
  background: linear-gradient(90deg, #f0fff8 0%, transparent 100%);
  border-color: #c8e8d8;
}
.cp-item.cp-done .cp-title {
  text-decoration: line-through;
  color: var(--muted);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--mint);
}
.cp-item.cp-just-done {
  animation: cp-flash 0.6s ease-out;
}
@keyframes cp-flash {
  0% { background: linear-gradient(90deg, #21d7c5 0%, #ecfaf7 100%); transform: scale(1.02); }
  100% { background: linear-gradient(90deg, #f0fff8 0%, transparent 100%); transform: scale(1); }
}
.cp-check {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cp-check input { display: none; }
.cp-check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 6px;
  display: inline-block;
  position: relative;
  transition: all .15s;
  background: var(--card);
}
.cp-check input:checked + .cp-check-box {
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  border-color: var(--mint);
}
.cp-check input:checked + .cp-check-box::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.cp-title {
  flex: 1;
  font-size: 14px;
  color: var(--dark);
  cursor: text;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .12s;
  word-break: break-word;
}
.cp-title:hover { background: rgba(33, 215, 197, .05); }
.cp-title.cp-editing {
  background: var(--card);
  outline: 2px solid var(--mint);
  cursor: text;
}
.cp-title[contenteditable="true"] {
  outline: 2px solid var(--mint);
  background: var(--card);
}
.cp-del {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s;
  flex-shrink: 0;
  line-height: 1;
}
.cp-del:hover {
  background: var(--coral-soft, #ffe0e0);
  color: var(--coral);
}
.cp-empty {
  list-style: none;
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.cp-add {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.cp-add input {
  flex: 1;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--card);
  color: var(--dark);
  outline: none;
  transition: all .15s;
}
.cp-add input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(33, 215, 197, .15);
}
.cp-add button {
  flex-shrink: 0;
  padding: 0 18px;
  font-size: 18px;
  font-weight: 800;
}
.cp-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.cp-hint code {
  background: var(--mint-soft, #ecfaf7);
  color: var(--aqua-deep);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
}

/* On the kanban — small CP progress bar inside task card */
.task-cp {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.task-cp-bar {
  flex: 1;
  height: 4px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
  max-width: 80px;
}
.task-cp-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--aqua));
  border-radius: 999px;
}
.task-cp.cp-all-done .task-cp-bar > div {
  background: linear-gradient(90deg, var(--coral), #f0c440);
  animation: cp-pulse 2s ease-in-out infinite;
}
.task-cp-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: var(--aqua-deep);
}
.task-cp.cp-all-done .task-cp-text {
  color: var(--coral);
  font-weight: 800;
}
.task.done-from-cp {
  background: linear-gradient(90deg, #f5f5f5 0%, #ececec 100%);
  border-color: #d0d0d0;
  opacity: .65;
  filter: grayscale(.4);
}
.task.done-from-cp .task-title,
.task.done-from-cp .task-notes {
  color: #6b7280;
}
.task.done-from-cp .task-cp-bar > div {
  background: linear-gradient(90deg, #94a3b8, #64748b);
  animation: none;
}
.task.done-from-cp::before {
  content: '✓ ';
  text-decoration: none;
  display: inline-block;
  margin-right: 2px;
  color: var(--mint);
  font-weight: 700;
}
