@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #292b31;
  background: #fff;
  font-size: 13px;
  --line: #e8e8e8;
  --muted: #777980;
  --accent: #cf553f;
  --sidebar: #f7f6f3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #d27a68;
  outline-offset: 2px;
}
button {
  border: 0;
  background: none;
}
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  width: 240px;
  flex: none;
  background: var(--sidebar);
  border-right: 1px solid #eeedea;
  display: flex;
  flex-direction: column;
  padding: 20px 12px 12px;
  overflow: auto;
}
.brand {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -1px;
  padding: 0 10px 24px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brandmark {
  display: inline-grid;
  grid-template-columns: repeat(2, 7px);
  gap: 3px;
  transform: rotate(-15deg);
}
.brandmark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e26754;
}
.brandmark i:first-child {
  grid-column: span 2;
  justify-self: center;
}
.navbtn,
.project-nav {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 11px;
  border-radius: 6px;
  color: #4d4e52;
}
.navbtn:hover,
.project-nav:hover,
.navbtn.active,
.project-nav.active {
  background: #e9e8e4;
  color: #1f2024;
}
.navicon {
  font-size: 17px;
  width: 18px;
  text-align: center;
  color: #73747a;
}
.navheading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 10px;
  font-weight: 700;
  color: #8b8b8e;
  margin: 25px 10px 8px;
}
.navheading button {
  font-size: 18px;
  color: #696b70;
}
.project-dot {
  width: 16px;
  height: 16px;
  background: #85a69a;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #e5e4e0;
  padding-top: 12px;
}
.workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.crumb {
  color: #888;
  font-size: 12px;
}
.topright {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 8px 12px;
  width: 220px;
  background: #fafafa;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #d9e8dd;
  color: #3b705a;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}
.avatar.large {
  width: 32px;
  height: 32px;
}
.content {
  overflow: auto;
  flex: 1;
}
.project-header {
  padding: 28px 38px 0;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  font-size: 11px;
  color: #696b70;
  margin-bottom: 11px;
}
.titleline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #dcebe3;
  color: #547c69;
  font-weight: 700;
  font-size: 18px;
}
.titleline h1 {
  font:
    700 24px Manrope,
    sans-serif;
  letter-spacing: -0.7px;
  margin: 0;
}
.iconbtn {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  color: #73757a;
  font-size: 18px;
}
.iconbtn:hover,
.plain:hover {
  background: #f3f3f2;
}
.title-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.button {
  border: 1px solid #dadbdd;
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover {
  background: #f8f8f7;
}
.button.primary {
  background: #bd4936;
  border-color: #bd4936;
  color: #fff;
}
.button.primary:hover {
  background: #b94b37;
}
.button.small {
  padding: 6px 10px;
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 25px;
  margin-top: 25px;
}
.tab {
  padding: 0 1px 13px;
  color: #74767c;
  border-bottom: 2px solid transparent;
}
.tab.active {
  border-color: #292b31;
  color: #292b31;
  font-weight: 700;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 38px 15px;
}
.toolbar .spacer {
  flex: 1;
}
.plain {
  padding: 7px 9px;
  border-radius: 5px;
  color: #66686e;
  white-space: nowrap;
}
.plain.active {
  background: #f0f0ee;
  color: #2f3034;
}
.list {
  padding: 0 38px 80px;
  min-width: 860px;
}
.list-head,
.task-row {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) 160px 140px 125px 110px;
  align-items: center;
}
.list-head {
  height: 38px;
  color: #696b70;
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}
.list-head > div:not(:first-child),
.task-row > div:not(:first-child) {
  border-left: 1px solid #f0f0f0;
  padding-left: 14px;
}
.section-head {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.chevron {
  color: #8d8e91;
  font-size: 11px;
}
.section-count {
  font-weight: 400;
  color: #696b70;
}
.task-row {
  min-height: 42px;
  border-bottom: 1px solid #efefef;
  color: #44464a;
}
.task-row:hover {
  background: #fafaf9;
}
.task-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 10px;
  min-width: 0;
}
.task-name button.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  padding: 6px 0;
}
.check {
  border: 1.5px solid #bec0c1;
  color: transparent;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  flex: none;
  line-height: 14px;
  padding: 0;
}
.check.done {
  background: #72a78f;
  border-color: #72a78f;
  color: #fff;
}
.task-row.done .name {
  text-decoration: line-through;
  color: #696b70;
}
.cell {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.cell select,
.cell input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #696b70;
  min-width: 0;
  font-size: 12px;
}
.empty-cell {
  color: #bbb;
}
.pill {
  border-radius: 4px;
  background: #e3f0e8;
  color: #436750;
  font-size: 11px;
  padding: 4px 8px;
}
.add-task {
  color: #696b70;
  padding: 11px 0;
  display: block;
}
.add-task:hover {
  color: #444;
}
.add-section {
  margin-top: 20px;
  color: #696b70;
}
.board {
  display: flex;
  gap: 16px;
  padding: 22px 38px 70px;
  overflow: auto;
  align-items: flex-start;
  min-height: 500px;
}
.board-column {
  min-width: 260px;
  width: 260px;
  background: #f8f8f7;
  border-radius: 8px;
  padding: 12px;
}
.board-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 14px;
}
.board-card {
  background: white;
  border: 1px solid #ebebeb;
  border-radius: 7px;
  padding: 14px;
  margin-bottom: 9px;
  box-shadow: 0 2px 5px #00000006;
  cursor: grab;
}
.board-card p {
  margin: 0 0 15px;
  line-height: 1.4;
}
.board-card footer {
  display: flex;
  justify-content: space-between;
  color: #696b70;
  font-size: 11px;
}
.board-card select {
  border: 0;
  background: #f5f5f5;
  max-width: 110px;
  font-size: 10px;
}
.overview {
  max-width: 1050px;
  padding: 34px 38px;
}
.overview h2,
.panel-title {
  font:
    700 17px Manrope,
    sans-serif;
  letter-spacing: -0.3px;
}
.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}
.box {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 22px;
}
.box p {
  color: #696b70;
  line-height: 1.7;
}
.stats {
  display: flex;
  gap: 24px;
  margin: 24px 0;
}
.stat strong {
  display: block;
  font: 700 24px Manrope;
}
.stat span {
  font-size: 12px;
  color: #696b70;
}
.progress {
  height: 8px;
  background: #eceeeb;
  border-radius: 8px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: #81ad95;
}
.calendar {
  padding: 25px 38px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.calendar-grid > div {
  min-height: 100px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #696b70;
}
.calendar-grid .weekday {
  min-height: auto;
  background: #fafafa;
  font-size: 11px;
  font-weight: 700;
}
.calendar-task {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 5px;
  padding: 5px;
  border-radius: 4px;
  background: #e8f2ec;
  color: #416b55;
  font-size: 11px;
}
.empty {
  padding: 80px 30px;
  text-align: center;
  color: #696b70;
}
.empty strong {
  display: block;
  font: 700 18px Manrope;
  color: #46474b;
  margin: 12px;
}
.drawer-shade,
.modal-shade {
  position: fixed;
  inset: 0;
  background: #0004;
  z-index: 10;
}
.drawer {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(540px, 100vw);
  background: white;
  box-shadow: -10px 0 30px #0001;
  display: flex;
  flex-direction: column;
}
.drawer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-body {
  padding: 24px 28px;
  overflow: auto;
  flex: 1;
}
.drawer-title {
  width: 100%;
  border: 0;
  font: 700 22px Manrope;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.form-row label {
  color: #696b70;
}
.form-row input,
.form-row select,
.form-row textarea,
.modal input,
.modal select,
.modal textarea {
  border: 1px solid #dedede;
  border-radius: 5px;
  padding: 9px;
  background: white;
  width: 100%;
}
.drawer h2 {
  font-size: 13px;
  margin: 28px 0 10px;
}
.drawer textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}
.subtask {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}
.comment {
  background: #f8f8f7;
  border-radius: 6px;
  padding: 10px;
  margin: 8px 0;
}
.comment small {
  color: #696b70;
}
.drawer-footer {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  gap: 8px;
}
.drawer-footer input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
}
.modal-shade {
  display: grid;
  place-items: center;
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
  box-shadow: 0 15px 45px #0002;
  max-height: 90vh;
  overflow: auto;
}
.modal h2 {
  font: 700 19px Manrope;
  margin: 0 0 20px;
}
.modal label {
  display: block;
  margin: 14px 0 6px;
  color: #696b70;
  font-size: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
.popover {
  position: absolute;
  z-index: 5;
  right: 38px;
  top: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 25px #0002;
  min-width: 270px;
}
.popover label {
  display: block;
  color: #696b70;
  font-size: 11px;
  margin: 10px 0 4px;
}
.popover select,
.popover input {
  width: 100%;
  padding: 7px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
.popover-row {
  display: flex;
  gap: 5px;
  align-items: end;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  border-radius: 6px;
  padding: 11px 16px;
  z-index: 30;
}
.error {
  background: #fff3ed;
  color: #9d432e;
  padding: 10px 16px;
}
.loading {
  padding: 40px;
  color: #696b70;
}
.mobile-menu {
  display: none;
}
@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    z-index: 9;
    height: 100%;
    left: -250px;
    visibility: hidden;
    transition: left 0.2s, visibility 0s 0.2s;
  }
  .sidebar.open {
    left: 0;
    visibility: visible;
    transition-delay: 0s;
    box-shadow: 0 0 0 100vw #0004;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    padding: 0 16px;
  }
  .search {
    width: 130px;
  }
  .project-header {
    padding: 22px 18px 0;
  }
  .titleline h1 {
    font-size: 20px;
  }
  .toolbar {
    padding: 16px 18px;
    overflow: auto;
  }
  .list {
    padding-left: 18px;
    padding-right: 18px;
  }
  .board {
    padding-left: 18px;
  }
  .overview {
    padding: 20px 18px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    overflow: auto;
  }
  .title-actions .share {
    display: none;
  }
  .calendar {
    padding: 20px 18px;
    overflow: auto;
  }
  .calendar-grid {
    min-width: 700px;
  }
}
.filter-condition {
  border-top: 1px solid #eee;
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  gap: 6px;
}
.filter-condition select,
.filter-condition input {
  min-width: 0;
}
.popover {
  max-height: 70vh;
  overflow: auto;
  min-width: 300px;
}
.mapping-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.mapping-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-footer select {
  width: 105px;
  max-height: 48px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 11px;
}
.drawer-footer input {
  min-width: 0;
}
/* Compact dark workspace shell, matching the reference's visual hierarchy. */
.sidebar {
  background: #242424;
  border-right-color: #3c3c3c;
  color: #eee;
  padding-top: 16px;
}
.brand {
  color: #f5f5f5;
}
.navbtn,
.project-nav {
  color: #ddd;
}
.navicon {
  color: #b6b6b6;
}
.navbtn:hover,
.project-nav:hover,
.navbtn.active,
.project-nav.active {
  background: #3d3d3f;
  color: #fff;
}
.navheading {
  color: #9b9b9b;
}
.navheading button {
  color: #aaa;
}
.sidebar-bottom {
  border-color: #424242;
}
.topbar {
  height: 50px;
  background: #242424;
  border-color: #393939;
  color: #eee;
}
.crumb {
  color: #b7b7b7;
}
.topbar .search {
  background: #303032;
  border-color: #505052;
  color: #eee;
}
.topbar .search::placeholder {
  color: #aaa;
}
.project-header {
  padding: 16px 30px 0;
}
.titleline h1 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.tabs {
  margin-top: 14px;
}
.tab {
  padding-bottom: 10px;
}
.toolbar {
  padding: 12px 30px;
}
.list {
  padding-left: 30px;
  padding-right: 30px;
}
.list-head {
  height: 36px;
}
.section-head {
  height: 46px;
}
.task-row,
.cell {
  min-height: 36px;
  height: 36px;
}
.board {
  padding: 16px 30px;
}
.board-column {
  background: #f0f0f0;
}
.board-card {
  padding: 12px;
}
.sidebar .project-dot {
  background: #d985ab;
}

/* Keep file upload keyboard reachable while retaining its compact label. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
label:has(.visually-hidden:focus-visible) {
  outline: 2px solid #d27a68;
  outline-offset: 2px;
}
@media (max-width: 800px) {
  .popover { right: 8px; max-width: calc(100vw - 16px); min-width: 0; width: 300px; }
  .drawer-top { flex-wrap: wrap; }
  .drawer-footer input { min-width: 0; }
}

input::placeholder, textarea::placeholder {
  color: #696b70;
  opacity: 1;
}
.topbar .search::placeholder { color: #aaa; }
.muted { color: #696b70; }

.csv-date-sample { width: 100%; border-collapse: collapse; margin: 14px 0; text-align: left; }
.csv-date-sample caption { text-align: left; font-weight: 600; margin-bottom: 6px; }
.csv-date-sample th, .csv-date-sample td { border-bottom: 1px solid var(--line); padding: 6px; overflow-wrap: anywhere; }
