:root {
  --bg: #f6f7ff;
  --card: rgba(255, 255, 255, 0.86);
  --card2: rgba(255, 255, 255, 0.93);
  --stroke: rgba(15, 23, 42, 0.14);
  --text: rgba(11, 16, 32, 0.92);
  --muted: rgba(11, 16, 32, 0.64);

  --primary: #6d5efc;
  --primary2: #13d6c8;

  --danger: #ff4d6d;
  --ok: #2ee59d;
  --warn: #ffb703;

  --shadow: 0 12px 30px rgba(11, 16, 32, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(109, 94, 252, 0.16), transparent 60%),
    radial-gradient(900px 500px at 85% 10%, rgba(19, 214, 200, 0.14), transparent 55%),
    radial-gradient(800px 700px at 55% 110%, rgba(255, 77, 109, 0.1), transparent 55%),
    var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 22px 18px;
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  background: rgba(246, 247, 255, 0.75);
}

.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.topbar__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.topbar__title {
  margin: 6px 0 6px;
  font-size: 24px;
  line-height: 1.1;
}

.topbar__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 62ch;
}

.topbar__badge {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(
    135deg,
    rgba(109, 94, 252, 0.16),
    rgba(19, 214, 200, 0.12)
  );
  box-shadow: var(--shadow);
}

.topbar__badgeTitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.topbar__badgeValue {
  font-size: 13px;
  margin-top: 2px;
}

.tabs {
  margin-top: 14px;
  border-top: 1px solid var(--stroke);
  padding: 12px 18px 0;
}

.tabs__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(11, 16, 32, 0.76);
  font-weight: 900;
  text-decoration: none;
  transition: transform 80ms ease, background 80ms ease, border-color 80ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
}

.tab[aria-current="page"] {
  border-color: rgba(109, 94, 252, 0.28);
  background: linear-gradient(
    135deg,
    rgba(109, 94, 252, 0.16),
    rgba(19, 214, 200, 0.12)
  );
  color: rgba(11, 16, 32, 0.92);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}

.controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field--compact {
  width: 170px;
}

.field__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.input,
.select {
  height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 12px;
  outline: none;
}

.textarea {
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 12px;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(109, 94, 252, 0.75);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.18);
}

.switch {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.9);
  height: 40px;
}

.switch input {
  transform: translateY(1px);
}

.switch__label {
  font-size: 13px;
  color: var(--text);
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 80ms ease, background 80ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  border-color: rgba(109, 94, 252, 0.65);
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.9), rgba(19, 214, 200, 0.9));
  color: rgba(255, 255, 255, 0.96);
}

.btn--ghost {
  background: transparent;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.adder {
  margin-top: 14px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.adder__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.16), rgba(109, 94, 252, 0.1));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.adder__summary::-webkit-details-marker {
  display: none;
}

.adder__summaryTitle {
  font-size: 14px;
  font-weight: 1000;
}

.adder__summaryHint {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.adder__form {
  padding: 14px 16px 16px;
  display: grid;
  gap: 12px;
}

.adder__grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.9fr 0.9fr;
  gap: 12px;
  align-items: end;
}

.adder__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.summary__card {
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.summary__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.summary__value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
}

.dashboard,
.roadmap,
.done {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.hero {
  margin-top: 0;
}

.hero__card {
  border: 1px solid var(--stroke);
  background: linear-gradient(
    135deg,
    rgba(109, 94, 252, 0.16),
    rgba(19, 214, 200, 0.12)
  );
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  padding: 18px 18px;
  display: grid;
  gap: 6px;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 16, 32, 0.72);
}

.hero__headline {
  font-size: 15px;
  font-weight: 900;
}

.hero__big {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}

.hero__sub {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.hero__next {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
  font-size: 13px;
}

.kpiGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.kpiCard {
  --accent: rgba(15, 23, 42, 0.2);
  --accentBg: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--accentBg), rgba(255, 255, 255, 0.92));
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.kpiCard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: var(--accent);
}

.kpiCard__label {
  font-size: 12px;
  font-weight: 900;
  color: rgba(11, 16, 32, 0.72);
}

.kpiCard__value {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}

.kpiCard__hint {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.kpiCard--week {
  --accent: rgba(19, 214, 200, 0.95);
  --accentBg: rgba(19, 214, 200, 0.14);
}

.kpiCard--progress {
  --accent: rgba(109, 94, 252, 0.95);
  --accentBg: rgba(109, 94, 252, 0.14);
}

.kpiCard--late {
  --accent: rgba(255, 77, 109, 0.95);
  --accentBg: rgba(255, 77, 109, 0.12);
}

.kpiCard--todo {
  --accent: rgba(255, 183, 3, 0.95);
  --accentBg: rgba(255, 183, 3, 0.12);
}

.kpiCard--done {
  --accent: rgba(46, 229, 157, 0.95);
  --accentBg: rgba(46, 229, 157, 0.12);
}

.infoGrid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.panel__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.panel__title {
  font-size: 14px;
  font-weight: 1000;
}

.panel__hint {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.panel__body {
  padding-top: 12px;
}

.panel__body--split {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
}

.donut {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
  z-index: 1;
}

.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
}

.donut__value {
  font-size: 26px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}

.donut__label {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legend {
  display: grid;
  gap: 10px;
}

.legendItem {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.legendItem__swatch {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.legendItem__label {
  font-size: 13px;
  font-weight: 900;
  color: rgba(11, 16, 32, 0.82);
}

.legendItem__value {
  font-size: 13px;
  font-weight: 1000;
}

.weekBars {
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.weekBar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.weekBar__wrap {
  width: 100%;
  flex: 1;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.62);
  position: relative;
  overflow: hidden;
}

.weekBar__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.85), rgba(19, 214, 200, 0.85));
  border-radius: 16px 16px 0 0;
}

.weekBar__label {
  font-size: 12px;
  font-weight: 1000;
  color: rgba(11, 16, 32, 0.72);
}

.weekBar__value {
  font-size: 12px;
  font-weight: 1000;
  color: rgba(11, 16, 32, 0.68);
}

.dashboardLists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.group--dashWeek .group__header {
  background: linear-gradient(135deg, rgba(19, 214, 200, 0.18), rgba(109, 94, 252, 0.12));
}

.group--dashProgress .group__header {
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.18), rgba(255, 255, 255, 0.0));
}

.group--dashLate .group__header {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.18), rgba(255, 183, 3, 0.12));
}

.dashCards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.dashCard {
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.dashCard__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.dashCard__value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 900;
}

.empty {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(11, 16, 32, 0.68);
  font-weight: 700;
  font-size: 13px;
}

.roadmapControls {
  margin-top: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.roadmapControls__left {
  display: flex;
  gap: 10px;
}

.groups {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.group {
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(
    135deg,
    rgba(109, 94, 252, 0.14),
    rgba(19, 214, 200, 0.1)
  );
}

.group__headerRight {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group__renameBtn {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.group__renameBtn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.group__deleteBtn {
  border-color: rgba(255, 77, 109, 0.35);
  color: rgba(122, 11, 36, 0.95);
}

.group__deleteBtn:hover {
  background: rgba(255, 77, 109, 0.14);
}

.group__title {
  margin: 0;
  font-size: 16px;
}

.group__count {
  font-size: 12px;
  font-weight: 800;
  color: rgba(11, 16, 32, 0.72);
  padding: 6px 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.group__rows {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--card2);
}

.row__title {
  font-weight: 900;
  font-size: 14px;
}

.row__notePreview {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(11, 16, 32, 0.76);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.row__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
}

.row__sep {
  opacity: 0.65;
}

.row__delayBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(11, 16, 32, 0.86);
}

.row__groupTag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(109, 94, 252, 0.24);
  background: rgba(109, 94, 252, 0.12);
  color: rgba(40, 32, 160, 0.92);
}

.row__right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row__detailsBtn {
  white-space: nowrap;
}

.row__moveBtn {
  white-space: nowrap;
}

.row__deleteBtn {
  white-space: nowrap;
  border-color: rgba(255, 77, 109, 0.4);
  background: rgba(255, 77, 109, 0.12);
  color: rgba(122, 11, 36, 0.95);
}

.row__deleteBtn:hover {
  background: rgba(255, 77, 109, 0.2);
}

.row__details {
  grid-column: 1 / -1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.moveDialog {
  width: min(92vw, 520px);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 0;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 16px 48px rgba(11, 16, 32, 0.28);
}

.moveDialog::backdrop {
  background: rgba(9, 12, 26, 0.35);
}

.moveDialog__form {
  margin: 0;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.moveDialog__title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.moveDialog__text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.moveDialog__select {
  width: 100%;
}

.moveDialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.row__detailsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.row__statusSelect {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  font-weight: 800;
}

.row__statusSelect:focus {
  border-color: rgba(109, 94, 252, 0.75);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.18);
}

.row--inprogress {
  border-color: rgba(109, 94, 252, 0.24);
  background: rgba(109, 94, 252, 0.06);
}

.row--inprogress .row__statusSelect {
  border-color: rgba(109, 94, 252, 0.3);
  background: rgba(109, 94, 252, 0.12);
  color: rgba(40, 32, 160, 0.95);
}

.row--done {
  border-color: rgba(46, 229, 157, 0.32);
  background: rgba(46, 229, 157, 0.06);
  opacity: 0.82;
}

.row--done .row__statusSelect {
  border-color: rgba(46, 229, 157, 0.35);
  background: rgba(46, 229, 157, 0.18);
  color: rgba(5, 95, 70, 0.95);
}

.row--done .row__title {
  text-decoration: line-through;
}

.row--late {
  border-color: rgba(255, 77, 109, 0.32);
  background: rgba(255, 77, 109, 0.06);
}

.row--late .row__statusSelect {
  border-color: rgba(255, 77, 109, 0.38);
  background: rgba(255, 77, 109, 0.16);
  color: rgba(122, 11, 36, 0.95);
}

.row__dateInput {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
}

.row__dateInput:focus {
  border-color: rgba(19, 214, 200, 0.75);
  box-shadow: 0 0 0 3px rgba(19, 214, 200, 0.18);
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 920px) {
  .topbar__badge {
    display: none;
  }
  .tabs__inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: 1fr;
  }
  .adder__grid {
    grid-template-columns: 1fr;
  }
  .adder__actions {
    justify-content: stretch;
  }
  .adder__actions .btn {
    flex: 1;
  }
  .dashCards {
    grid-template-columns: 1fr 1fr;
  }
  .kpiGrid {
    grid-template-columns: 1fr 1fr;
  }
  .infoGrid {
    grid-template-columns: 1fr;
  }
  .panel__body--split {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .dashboardLists {
    grid-template-columns: 1fr;
  }
  .roadmapControls {
    flex-direction: column;
    align-items: stretch;
  }
  .field--compact {
    width: 100%;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .row__right {
    justify-content: flex-start;
  }
  .actions {
    justify-content: stretch;
  }
  .actions .btn {
    flex: 1;
  }
}
