:root {
  --bg: #f0f2f8;
  --card: #ffffff;
  --card2: #f7f8fc;
  --border: #e4e6f0;
  --accent: #6366f1;
  --accent2: #06b6d4;
  --text: #1e2030;
  --muted: #8b92a9;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --purple: #a855f7;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(99,102,241,.08);
  --shadow-card: 0 1px 4px rgba(0,0,0,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; min-height: 100vh; font-size: 14px; }

/* NAV */
.nav { background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; align-items: center; gap: 2px; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--border); }
.nav-title { color: var(--accent); font-weight: 800; font-size: 17px; margin-right: 20px; letter-spacing: -.3px; }
.tab-btn { padding: 14px 16px; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap; font-weight: 500; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* MAIN */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 24px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* CARDS */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 16px; }

/* PEOPLE GRID */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }

.person-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.person-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #6366f108 0%, #06b6d408 100%);
  border-bottom: 1px solid var(--border);
}
.avatar {
  width: 46px; height: 46px;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform .15s;
}
.avatar:hover { transform: scale(1.08); }
.person-name { font-size: 16px; font-weight: 700; cursor: pointer; flex: 1; color: var(--text); }
.person-name input { background: none; border: none; border-bottom: 2px solid var(--accent); color: var(--text); font-size: 16px; font-weight: 700; outline: none; width: 100%; }
.person-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; padding: 2px 6px; border-radius: 6px; transition: all .15s; }
.person-del:hover { background: #fef2f2; color: var(--red); }

/* SCHEMAS GRID (A-F) */
.schemas-body { padding: 16px 20px; }
.schemas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.schema-block {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 88px;
}
.schema-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.schema-label.A { color: var(--accent); }
.schema-label.B { color: var(--purple); }
.schema-label.C { color: var(--accent2); }
.schema-label.D { color: #10b981; }
.schema-label.F { color: var(--red); }
.schema-label.E { color: var(--yellow); }
.schema-full { grid-column: 1/-1; }

/* ABSTRACT BARS */
.ab-bars { display: flex; flex-direction: column; gap: 5px; }
.ab-row { display: flex; gap: 5px; align-items: center; }
.ab-bar {
  height: 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.ab-bar.A { background: linear-gradient(90deg, #6366f1, #818cf8); }
.ab-bar.B { background: linear-gradient(90deg, #a855f7, #c084fc); }
.ab-bar.C { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.ab-bar.D { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.ab-bar.F { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.ab-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ab-dot.A { background: #6366f1; }
.ab-dot.B { background: #a855f7; }
.ab-dot.C { background: #06b6d4; }
.ab-dot.D { background: #10b981; }
.ab-dot.F { background: #ef4444; }

/* POSITIVE PROGRAM ICONS */
.pos-icons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pos-icon { font-size: 22px; line-height: 1; }
.pos-icon-ghost { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #fef3c7, #fde68a); opacity: .5; }

/* STATS */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
.stat-num { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 500; }

/* ADD PERSON BUTTON */
.add-person-btn { background: var(--card); border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all .2s; color: var(--muted); font-weight: 600; font-size: 14px; }
.add-person-btn:hover { border-color: var(--accent); color: var(--accent); background: #f5f3ff; }

/* INPUT / BUTTONS */
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text); font-size: 13px; outline: none; transition: border .15s; }
.add-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #6366f115; }
.btn { padding: 8px 16px; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; font-weight: 600; transition: all .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4f46e5; }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* TASKS */
.tasks-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.task-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--card2); border-radius: var(--radius-sm); margin-bottom: 6px; border: 1px solid var(--border); }
.task-item.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; transition: all .15s; }
.task-check.checked { background: var(--green); border-color: var(--green); }
.task-title { flex: 1; font-size: 13px; }
.task-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 2px; border-radius: 4px; }
.task-del:hover { color: var(--red); background: #fef2f2; }
.list-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* PROJECTS */
.project-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--card2); border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid var(--border); }
.project-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 5px; }
.project-info { flex: 1; }
.project-title { font-size: 14px; font-weight: 600; }
.project-desc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.project-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; border-radius: 4px; }
.project-del:hover { color: var(--red); background: #fef2f2; }

/* MY DAY */
.myday-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.myday-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card2); border-radius: var(--radius-sm); margin-bottom: 6px; border: 1px solid var(--border); }
.myday-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; flex-shrink: 0; }
.myday-badge.project { background: #ede9fe; color: var(--accent); }
.myday-badge.task { background: #e0f2fe; color: #0369a1; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,17,30,.4); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 540px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.modal h3 { margin-bottom: 20px; font-size: 18px; font-weight: 700; }
.modal-footer { display: flex; gap: 10px; margin-top: 22px; }

/* AVATAR PICKER */
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.avatar-opt { font-size: 24px; cursor: pointer; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 2px solid var(--border); transition: all .15s; background: var(--card2); }
.avatar-opt:hover { border-color: var(--accent); transform: scale(1.1); }
.avatar-opt.selected { border-color: var(--accent); background: #ede9fe; }

/* UTILS */
.flex { display: flex; gap: 12px; align-items: center; }
.flex-1 { flex: 1; }
.mt-4 { margin-top: 16px; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; font-style: italic; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h2 { font-size: 18px; font-weight: 700; }

/* PROJECT CARDS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.proj-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.proj-card-header { padding: 14px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
.proj-dot-big { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.proj-title-text { font-size: 15px; font-weight: 700; flex: 1; }
.proj-del-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; border-radius: 4px; }
.proj-del-btn:hover { color: var(--red); background: #fef2f2; }
.proj-schemas { padding: 14px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.proj-schema { border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--border); }
.proj-schema.pos { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }
.proj-schema.neg { background: linear-gradient(135deg, #fff1f2, #ffe4e6); border-color: #fecdd3; }
.proj-schema-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.proj-schema.pos .proj-schema-label { color: #15803d; }
.proj-schema.neg .proj-schema-label { color: #b91c1c; }
.ab-bar.pos { background: linear-gradient(90deg, #22c55e, #86efac); }
.ab-bar.neg { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.ab-dot.pos { background: #22c55e; }
.ab-dot.neg { background: #ef4444; }

/* ─── ПУЛЬС ─────────────────────────────────── */
.pulse-wrap { text-align: center; padding: 28px 0 16px; }
.pulse-ring {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 0 rgba(99,102,241,.4);
  animation: pulse-anim 2s ease-in-out infinite;
  cursor: default;
}
.pulse-ring.low { background: linear-gradient(135deg,#f59e0b,#fbbf24); box-shadow: 0 0 0 0 rgba(245,158,11,.4); }
.pulse-ring.mid { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.pulse-ring.high { background: linear-gradient(135deg,#22c55e,#06b6d4); box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
@keyframes pulse-anim {
  0%   { box-shadow: 0 0 0 0 rgba(99,102,241,.5); transform: scale(1); }
  50%  { box-shadow: 0 0 0 20px rgba(99,102,241,0); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); transform: scale(1); }
}
.pulse-num { font-size: 42px; font-weight: 900; color: #fff; line-height: 1; }
.pulse-label { font-size: 11px; color: rgba(255,255,255,.85); font-weight: 600; letter-spacing: .5px; margin-top: 2px; }
.pulse-meta { display: flex; justify-content: center; gap: 24px; }
.pulse-meta-item { text-align: center; }
.pulse-meta-num { font-size: 22px; font-weight: 800; color: var(--accent); }
.pulse-meta-lbl { font-size: 11px; color: var(--muted); }

/* ─── АРХИВ ─────────────────────────────────── */
.archive-day { padding: 16px 0; border-bottom: 1px solid var(--border); }
.archive-date { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.archive-entries { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-person {
  display: flex; align-items: center; gap: 7px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 500;
}
.archive-pct { font-weight: 700; color: var(--green); margin-left: 4px; }

/* ─── УТРЕННИЙ РЕЖИМ ────────────────────────── */
.morning-section { margin-bottom: 32px; }
.morning-section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 16px; }
.morning-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.morning-card {
  background: #fff;
  border: 1px solid #e4e6f0;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  animation: fadeSlideIn .4s ease both;
}
.morning-card:nth-child(1) { animation-delay: .05s; }
.morning-card:nth-child(2) { animation-delay: .1s; }
.morning-card:nth-child(3) { animation-delay: .15s; }
.morning-card:nth-child(4) { animation-delay: .2s; }
.morning-card:nth-child(5) { animation-delay: .25s; }
.morning-card:nth-child(6) { animation-delay: .3s; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.morning-avatar { font-size: 36px; margin-bottom: 6px; }
.morning-name { font-size: 13px; font-weight: 700; color: #1e2030; margin-bottom: 10px; }
.morning-emojis { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; font-size: 19px; line-height: 1; }
.morning-proj-card {
  background: linear-gradient(135deg,#f0fdf4,#dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 16px;
  animation: fadeSlideIn .4s ease both;
}
.morning-proj-title { font-size: 14px; font-weight: 700; color: #15803d; margin-bottom: 8px; }
.morning-proj-emojis { display: flex; flex-wrap: wrap; gap: 5px; font-size: 18px; }

/* ─── ФАЙЛЫ / МАТРИЦА ───────────────────────────── */
.files-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.files-sidebar .card { padding: 16px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s; margin-bottom: 4px;
}
.file-item:hover { background: var(--card2); }
.file-item.active { background: #ede9fe; color: var(--accent); }
.file-item-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 2px; opacity: 0; }
.file-item:hover .file-item-del { opacity: 1; }
.file-item-del:hover { color: var(--red); }
.matrix-wrap { overflow-x: auto; }
.matrix-table { border-collapse: collapse; width: 100%; min-width: 400px; }
.matrix-table th {
  background: var(--card2); border: 1px solid var(--border);
  padding: 9px 12px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  white-space: nowrap; text-align: center;
}
.matrix-table th.person-col { text-align: left; min-width: 140px; }
.matrix-table td {
  border: 1px solid var(--border); padding: 0;
  text-align: center; vertical-align: middle;
}
.matrix-table tr:hover td { background: #fafafa; }
.person-cell {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; white-space: nowrap;
  font-size: 13px; font-weight: 500;
}
.emoji-cell {
  width: 52px; height: 44px;
  font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .1s;
  position: relative;
  user-select: none;
}
.emoji-cell:hover { background: #f5f3ff; }
.emoji-cell.empty::after { content: '·'; color: #ddd; font-size: 18px; }
.emoji-cell:not(.empty)::after { content: none; }

/* emoji picker popup */
.emoji-picker-popup {
  position: absolute; z-index: 50;
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  display: flex; flex-wrap: wrap; gap: 4px;
  width: 220px;
}
.ep-emoji {
  font-size: 22px; cursor: pointer; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: background .1s;
}
.ep-emoji:hover { background: var(--card2); }
.ep-clear {
  width: 100%; text-align: center; font-size: 11px; color: var(--muted);
  cursor: pointer; padding: 4px; border-top: 1px solid var(--border); margin-top: 4px;
}

/* create file form */
.col-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; min-height: 28px; }
.col-tag {
  background: #ede9fe; color: var(--accent); border-radius: 20px;
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.col-tag-del { cursor: pointer; color: var(--accent); opacity: .7; }
.col-tag-del:hover { opacity: 1; }

/* person file tabs */
.person-file-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px 20px 10px; border-bottom: 1px solid var(--border);
  min-height: 52px;
}
.person-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 20px;
  cursor: pointer; font-size: 13px; font-weight: 500;
  background: var(--card2); border: 2px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.person-tab:hover { background: #ede9fe; }
.person-tab.active { background: #ede9fe; border-color: var(--accent); color: var(--accent); }
.emoji-cell.auto { opacity: 0.72; }

/* project progress bar — segmented LED */
.proj-progress-wrap { margin-top: 12px; }
.seg-bar {
  display: flex; gap: 2.5px; padding: 6px 8px;
  background: #1a1a1a; border-radius: 10px;
  cursor: pointer; user-select: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.12);
}
.seg {
  flex: 1; height: 14px; border-radius: 2px; min-width: 0;
  transition: background .08s;
}

/* emoji-only grid (no table, no person column) */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.emoji-grid .emoji-cell {
  width: auto; height: 48px;
  border-radius: 6px;
  font-size: 24px;
}

/* 6-month history bars */
.month-history-block { background: linear-gradient(135deg,#f0fdf4,#dcfce7) !important; }
.month-bars {
  display: flex; gap: 6px; align-items: flex-end;
  height: 52px; padding: 4px 0 0;
}
.month-col {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; gap: 3px;
}
.month-fill-wrap {
  flex: 1; width: 100%; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0.04); border-radius: 3px; overflow: hidden;
}
.month-fill {
  width: 100%; border-radius: 3px;
  transition: height .3s ease;
}
.month-label {
  font-size: 9px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .3px;
}

/* smaller segments for file bars */
.seg.seg-sm { height: 8px; border-radius: 1px; }
.seg-bar:has(.seg-sm) { padding: 4px 6px; border-radius: 7px; }

/* ─── OVERVIEW CHIPS ───────────────────────── */
.ov-chips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.ov-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 500; border: 1px solid var(--border);
  background: var(--card2); white-space: nowrap;
}
.ov-chip-person { background: #ede9fe; border-color: #c4b5fd; }
.ov-chip-proj { background: #eff6ff; border-color: #bfdbfe; }
.ov-chip-task { background: #f0fdf4; border-color: #bbf7d0; }
.ov-chip-task.done { text-decoration: line-through; opacity: .6; }
.ov-chip-ne-nado { background: #fff7ed; border-color: #fed7aa; }
.ov-chip-ne-nado.done { text-decoration: line-through; opacity: .6; }
.ov-chip-avatar { font-size: 16px; }
.ov-chip-name { font-weight: 600; color: var(--text); }
.ov-chip-badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.ov-proj-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); flex-shrink: 0; }
.ov-section-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; margin-top: 4px; }
.ov-tasks-block { margin-bottom: 10px; }
.ov-tasks-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.empty-sm { font-size: 11px; color: var(--muted); }

/* ─── ARCHIVE PIE CHARTS ───────────────────── */
.archive-pie-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pie-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; min-width: 80px;
}
.pie-canvas-wrap { width: 64px; height: 64px; }
.pie-info { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pie-av { font-size: 14px; }
.pie-nm { font-size: 10px; font-weight: 600; color: var(--text); }
.pie-pct { font-size: 11px; font-weight: 700; }
.pie-pct.hi { color: var(--green); }
.pie-pct.mid { color: var(--yellow); }
.pie-pct.lo { color: var(--red); }

/* ─── CLEARED TONIGHT — ABSTRACT ───────────── */
.clr-sec-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 14px 0 7px;
}
.clr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}
.clr-card {
  background: #14151f;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 10px 10px 8px;
}
.clr-card-head {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 8px;
}
.clr-card-av { font-size: 15px; flex-shrink: 0; }
.clr-card-nm {
  font-size: 10px; font-weight: 600; color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.clr-card-bars { display: flex; flex-direction: column; gap: 4px; }
.dis-bar {
  height: 5px; border-radius: 3px;
  position: relative; overflow: hidden;
  animation: dis-pulse 2.8s ease-in-out infinite;
}
.dis-bar::after {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,.28);
  transform: translateY(-50%);
}
@keyframes dis-pulse {
  0%, 100% { opacity: .85; }
  50%       { opacity: .2;  }
}
.clr-card-cnt {
  font-size: 9px; color: #374151;
  text-align: right; margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

/* ─── ОЧИЩЕНИЕ ──────────────────────────────────── */
.cleanup-section { margin-bottom: 24px; }
.cleanup-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.cleanup-cards {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.cleanup-card {
  position: relative; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  min-width: 160px; max-width: 240px; flex: 1;
  transition: opacity .2s;
}
.cleanup-card.crossed { opacity: .65; }
.cleanup-card-icon { font-size: 18px; margin-bottom: 6px; }
.cleanup-card-text {
  font-size: 13px; line-height: 1.4;
  color: var(--text); word-break: break-word;
}
.cleanup-card-actions {
  display: flex; gap: 6px; margin-top: 10px;
}
.cleanup-cross-btn, .cleanup-del-btn {
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 13px; padding: 4px 8px; transition: background .15s;
}
.cleanup-cross-btn {
  background: rgba(239,68,68,.18); color: #f87171;
}
.cleanup-cross-btn:hover { background: rgba(239,68,68,.35); }
.cleanup-del-btn {
  background: rgba(255,255,255,.06); color: var(--muted);
}
.cleanup-del-btn:hover { background: rgba(255,255,255,.12); }

/* Красный X поверх карточки */
.cross-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom right,
      transparent calc(50% - 1.5px),
      rgba(239,68,68,.75) calc(50% - 1.5px),
      rgba(239,68,68,.75) calc(50% + 1.5px),
      transparent calc(50% + 1.5px)),
    linear-gradient(to bottom left,
      transparent calc(50% - 1.5px),
      rgba(239,68,68,.75) calc(50% - 1.5px),
      rgba(239,68,68,.75) calc(50% + 1.5px),
      transparent calc(50% + 1.5px));
}

/* ─── УДАЛЁННЫЕ ПРОГРАММЫ ───────────────────────── */
.delprog-section { margin-bottom: 28px; }
.delprog-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.delprog-group { margin-bottom: 10px; }
.delprog-who {
  font-size: 12px; color: var(--muted);
  margin-bottom: 6px; display: block;
}
.delprog-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.delprog-chip {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  opacity: 0.6;
  overflow: hidden;
  max-width: 300px;
}
.delprog-chip span {
  text-decoration: line-through;
  text-decoration-color: rgba(239,68,68,0.8);
  text-decoration-thickness: 2px;
  display: block;
  line-height: 1.4;
}
/* Красная диагональная полоса поверх */
.delprog-chip::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    to bottom right,
    transparent calc(50% - 1px),
    rgba(239,68,68,0.35) calc(50% - 1px),
    rgba(239,68,68,0.35) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  pointer-events: none;
}


/* ─── ЛИЧНАЯ СТРАНИЦА ЧЕЛОВЕКА ─── */
.btn-person-history {
  background: none; border: 1px solid var(--border,#313244);
  border-radius: 6px; padding: 2px 7px; font-size: 14px;
  cursor: pointer; color: var(--muted); margin-right: 4px;
  transition: background .15s;
}
.btn-person-history:hover { background: var(--surface2,#1e2030); }

.person-del-header {
  font-size: 16px; font-weight: 600;
  color: var(--text,#cdd6f4);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border,#313244);
}

.del9-section {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border,#1e2030);
}
.del9-section:last-child { border-bottom: none; }

.del9-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--muted,#6c7086);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  color: var(--muted,#6c7086); position: relative;
}
.del9-num::after {
  content: ''; position: absolute;
  width: 110%; height: 2px;
  background: var(--muted,#6c7086);
  transform: rotate(-45deg);
}

.del9-body { flex: 1; }
.del9-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted,#6c7086); margin-bottom: 6px;
}
.del9-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.del9-chip {
  background: var(--surface2,#1e2030);
  border-radius: 6px; padding: 4px 10px;
  font-size: 12px; color: var(--subtext0,#a6adc8);
}
.del9-chip s { text-decoration-color: var(--red,#f38ba8); }
.del9-empty { color: var(--overlay0,#6c7086); font-style: italic; }

/* ─── ИСТОРИЯ: ЛЮДИ ─── */
.people-summary-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--border,#1e2030);
}
.people-summary-row:last-child { border-bottom: none; }
.ps-who { font-size: 14px; min-width: 160px; color: var(--text,#cdd6f4); }
.ps-circles { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-circle {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--muted,#6c7086);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted,#6c7086);
  position: relative; flex-shrink: 0;
}
.ps-circle::before, .ps-circle::after {
  content: ''; position: absolute;
  width: 120%; height: 2px;
  background: var(--muted,#6c7086);
}
.ps-circle::before { transform: rotate(45deg); }
.ps-circle::after { transform: rotate(-45deg); }
.ps-circle s { text-decoration: none; }
