:root {
  --pink-500: #FF1C90;
  --pink-300: #FF89E2;
  --blush-100: #FFEAF6;
  --blush-50: #FFF6FB;
  --fog-100: #F4F2F4;
  --fog-200: #EAE6E9;
  --ink-900: #18141A;
  --ink-600: #635C69;
  --white: #FFFFFF;
  --line: #E9E1E7;
  --green: #1c8a5a;
  --green-bg: #E9F7EF;
  --amber: #9a6b00;
  --amber-bg: #FFF4DD;
  --red: #E1315B;
  --red-bg: #FDEAEF;
  --brand-gradient: linear-gradient(135deg, var(--pink-500) 0%, var(--pink-300) 100%);
  --font-body: 'Nunito', system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); color: var(--ink-900); background: var(--fog-100);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button, input, textarea, select { font-family: inherit; }

/* -------------------- layout -------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--white); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-header { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.logo-mark { width: 24px; height: auto; flex: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-600); padding: 10px 10px 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 700;
  color: var(--ink-900);
}
.sidebar-link:hover { background: var(--fog-100); }
.sidebar-link.active { background: var(--blush-100); color: var(--pink-500); }
.sidebar-link .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fog-200); flex: none; }
.sidebar-link.active .dot { background: var(--pink-500); }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--line); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--white);
}
.topbar h1 { font-size: 18px; font-weight: 800; margin: 0; }
.content { flex: 1; padding: 28px; max-width: 1100px; width: 100%; }

/* -------------------- profile chip / menu -------------------- */
.profile-chip {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer;
}
.profile-chip:hover { border-color: var(--pink-300); }
.avatar-box {
  width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--brand-gradient); display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 12px;
}
.avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.profile-chip-name { font-size: 13.5px; font-weight: 800; }

.profile-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 210px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 40px -16px rgba(24,20,26,0.22); padding: 8px; z-index: 60;
}
.profile-menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--ink-900);
  cursor: pointer;
}
.profile-menu-item:hover { background: var(--fog-100); }
.profile-menu-item--danger:hover { background: var(--red-bg); color: var(--red); }

/* -------------------- buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 800; font-size: 14px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand-gradient); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pink-300); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* -------------------- badges (без поворота, без пиксельного шрифта) -------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--fog-100); color: var(--ink-600);
}
.badge-pink { background: var(--blush-100); color: var(--pink-500); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }

/* -------------------- cards / lists -------------------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--white);
  border: 1px solid var(--line);
}

.empty-state {
  text-align: center; padding: 56px 24px; border: 2px dashed var(--fog-200);
  border-radius: var(--radius-lg); color: var(--ink-600);
}
.empty-state h3 { color: var(--ink-900); font-size: 17px; margin: 0 0 6px; }

/* -------------------- forms -------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); background: var(--white);
  border-radius: 10px; padding: 10px 13px; font-size: 14px; color: var(--ink-900);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--pink-300); box-shadow: 0 0 0 3px var(--blush-100);
}
.field textarea { resize: vertical; min-height: 90px; }

.form-msg { margin-top: 10px; font-weight: 700; font-size: 13px; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }

/* -------------------- modal -------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(24,20,26,0.5); visibility: hidden; opacity: 0;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.modal-overlay.open { visibility: visible; opacity: 1; }
.modal-card {
  background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; padding: 28px;
}
.modal-card h3 { margin: 0 0 18px; font-size: 18px; font-weight: 800; }
.modal-close { float: right; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-600); }

/* -------------------- board -------------------- */
.board-columns { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.board-column { width: 280px; flex: none; }
.board-column-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 14px; margin-bottom: 12px; padding: 0 4px;
}
.board-column-count { color: var(--ink-600); font-weight: 700; font-size: 12.5px; }
.board-task-list { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.task-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer;
}
.task-card:hover { border-color: var(--pink-300); }
.task-card h4 { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.task-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-card-assignee { font-size: 12px; color: var(--ink-600); font-weight: 700; }
.add-column-btn {
  width: 280px; flex: none; padding: 14px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--fog-200); background: none; color: var(--ink-600); font-weight: 700;
  cursor: pointer;
}
.add-column-btn:hover { border-color: var(--pink-300); color: var(--pink-500); }

/* -------------------- notes -------------------- */
.notes-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.notes-toolbar input { flex: 1; min-width: 200px; }
.tag-chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: var(--fog-100); color: var(--ink-600); font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1.5px solid transparent;
}
.tag-chip.active { background: var(--blush-100); color: var(--pink-500); border-color: var(--pink-300); }
.notes-list { display: flex; flex-direction: column; gap: 10px; }

/* -------------------- issues -------------------- */
.issues-filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.issue-row { display: flex; align-items: center; gap: 12px; }
.issue-number { font-weight: 800; color: var(--ink-600); font-size: 13px; min-width: 44px; }

/* -------------------- misc -------------------- */
.muted { color: var(--ink-600); font-size: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--fog-100); }
.comment:last-child { border-bottom: none; }
.comment-meta { font-size: 12.5px; color: var(--ink-600); font-weight: 700; margin-bottom: 6px; }

@media (max-width: 860px) {
  .sidebar { position: fixed; left: -100%; z-index: 90; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.3); transition: left 0.2s ease; }
  .sidebar.open { left: 0; }
  .content { padding: 20px; }
}
