:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #202329;
  background: #f7f8fa;
  font-size: 14px;
  font-synthesis: none;
  --line: #e6e8ec;
  --muted: #737982;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  color: inherit;
  padding: 9px 13px;
  border-radius: 7px;
}
button:hover {
  background: #f1f3f5;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: #25282d;
  color: white;
  border-color: #25282d;
}
.primary:hover {
  background: #42474f;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 10px;
  min-width: 0;
}
textarea {
  width: 100%;
  min-height: 95px;
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
}
small {
  color: var(--muted);
  font-size: 12px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 3px 0;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.65;
}
progress {
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #eef0f3;
}
progress::-webkit-progress-bar {
  background: #eef0f3;
}
progress::-webkit-progress-value {
  background: #424a56;
  border-radius: 5px;
}
.shared-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 40px;
}
.brand small {
  display: block;
  letter-spacing: 2px;
  font-size: 10px;
  margin-top: 5px;
}
.brand img {
  display: block;
  width: 132px;
  height: auto;
}
.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.header-brand img {
  display: block;
  width: 64px;
  height: auto;
  flex-shrink: 0;
}
.brand-divider {
  color: var(--muted);
}
.header-brand b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .header-brand { gap: 8px; }
  .header-brand img { width: 56px; }
  .topbar > div { flex-shrink: 0; }
}
.login-brand img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}
.shared-sidebar nav {
  display: grid;
  gap: 6px;
}
.shared-sidebar nav button {
  text-align: left;
  border: 0;
  padding: 12px 15px;
  color: #666d77;
}
.selected {
  background: #edf0f4 !important;
  color: #202329 !important;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  margin-left: 220px;
}
.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  font-size: 12px;
  color: var(--muted);
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar button {
  font-size: 11px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  background: #e9edf1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 600;
  color: #434b54;
}
.topbar #modeLabel {
  font-size: 11px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.page-heading small {
  letter-spacing: 2px;
  font-size: 10px;
}
#main {
  max-width: 1700px;
  padding: 38px 40px 70px;
  margin: auto;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 25px;
}
.filters input[type='search'] {
  width: 230px;
}
.filters select {
  max-width: 180px;
  font-size: 12px;
}
.filters details {
  position: relative;
}
.filters details[open] {
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.filters details select {
  display: block;
  margin: 8px 0;
}
.filters .check {
  font-size: 12px;
}
.filters button {
  font-size: 11px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
input[type='checkbox'] {
  accent-color: #373f49;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 12px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric strong {
  font-size: 32px;
  font-weight: 600;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
  margin-bottom: 22px;
}
.panel h2:first-child {
  margin-top: 0;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.capsule-number {
  font-size: 48px;
  letter-spacing: -2px;
  margin: 18px 0;
}
.capsule-number small {
  font-size: 22px;
  margin-left: 5px;
}
.stage-row {
  display: grid;
  grid-template-columns: 1fr 80px 42px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f2f4;
}
.stage-row small {
  margin-left: 8px;
}
.stage-row b {
  text-align: right;
  font-size: 11px;
}
.capsule-panel > small {
  display: block;
  margin-top: 15px;
}
.task-list {
  display: grid;
}
.task-row {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f0f1f3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 90px;
  gap: 13px;
  align-items: center;
  text-align: left;
  padding: 14px 0;
}
.task-row > span:first-child {
  display: grid;
  gap: 5px;
}
.task-row strong {
  font-weight: 500;
  line-height: 1.4;
}
.task-row > span:nth-child(2) {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.priority,
.status {
  font-size: 10px;
  border-radius: 4px;
  padding: 3px 6px;
  background: #f1f3f5;
  white-space: nowrap;
  color: #65707d;
}
.priority.P0 {
  color: #a3433d;
  background: #faefed;
}
.status.in_progress {
  background: #edf2f9;
  color: #536e91;
}
.status.review {
  background: #f8f3e9;
  color: #8a7440;
}
.status.done {
  background: #edf4ee;
  color: #52765b;
}
.late {
  color: #a3433d;
}
.empty {
  color: var(--muted);
  padding: 20px 0;
  font-size: 13px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.person-card {
  text-align: left;
  padding: 24px;
  border-radius: 9px;
  min-width: 0;
}
.person-card h3 {
  font-size: 18px;
  margin: 12px 0;
}
.person-card p {
  font-size: 12px;
  min-height: 55px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0;
}
.person-card > small:last-child {
  display: block;
  margin-top: 7px;
}
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.board > section {
  min-width: 0;
}
.board h2 {
  font-size: 13px;
}
.board h2 small {
  margin-left: 8px;
}
.task-card {
  display: grid;
  text-align: left;
  gap: 10px;
  padding: 15px;
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
}
.task-card strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.task-card > span {
  display: flex;
  gap: 5px;
}
.task-card small {
  font-size: 10px;
}
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.calendar-controls > div {
  display: flex;
  gap: 6px;
}
.calendar-controls strong {
  font-size: 13px;
}
.month-head,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.month-head {
  padding: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.month-grid {
  background: white;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.day {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  min-height: 140px;
  overflow: hidden;
}
.day > span {
  font-size: 11px;
  color: var(--muted);
}
.day.current > span {
  background: #343b44;
  color: white;
  border-radius: 50%;
  padding: 4px 6px;
}
.day .task-card {
  padding: 6px;
  margin: 5px 0;
  border: 0;
  background: #f5f6f8;
  gap: 3px;
  border-left: 2px solid #b3bcc6;
}
.day .task-card strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}
.day .status {
  display: none;
}
.day .task-card small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
}
.day .priority {
  font-size: 9px;
  padding: 1px 3px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.week-grid .task-row {
  display: block;
}
.week-grid .task-row > span {
  display: block;
  margin: 7px 0;
}
.week-grid .task-row strong {
  font-size: 11px;
}
.agenda-day {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
}
.route {
  display: grid;
  gap: 12px;
  margin: 20px 0 35px;
  border-left: 2px solid #dfe4ea;
  padding-left: 20px;
}
.route > div {
  display: grid;
  gap: 6px;
}
.route button {
  text-align: left;
  border: 0;
  padding: 0;
  font-size: 12px;
}
.route small {
  font-size: 11px;
}
.proposal {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.proposal > div {
  display: flex;
  gap: 9px;
  margin-top: 10px;
}
details > summary {
  cursor: pointer;
  font-size: 13px;
}
details p {
  font-size: 12px;
}
details p small {
  display: block;
  margin: 5px 0;
}
.shared-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 580px;
  background: white;
  border-left: 1px solid var(--line);
  z-index: 30;
  overflow-y: auto;
  padding: 24px 30px;
}
.shared-drawer > header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 25px;
}
.shared-drawer > header h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0;
}
.shared-drawer > header button {
  font-size: 20px;
  padding: 4px 12px;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #18212c33;
  z-index: 29;
}
.drawer-open {
  overflow: hidden;
}
.drawer-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.drawer-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 12px 16px;
  line-height: 1.2;
  white-space: nowrap;
  flex: 0 0 auto;
}
.shared-drawer dl {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 16px;
  font-size: 12px;
  margin: 25px 0;
}
.shared-drawer dt {
  color: var(--muted);
}
.shared-drawer dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}
.shared-drawer form {
  display: grid;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.shared-drawer label {
  font-size: 12px;
}
.shared-drawer details {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.checkbox-list {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shared-drawer footer {
  position: sticky;
  bottom: -24px;
  background: white;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  z-index: 1;
}
.updates {
  margin-top: 35px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.updates article {
  border-bottom: 1px solid #f0f1f3;
  padding: 14px 0;
}
.updates article strong {
  font-size: 12px;
}
.comment-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: #eef1f5;
  color: #475569;
  font-size: 12px;
}
.updates article small {
  margin-left: 10px;
}
.updates article p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.login {
  width: min(420px, calc(100% - 40px));
  margin: 12vh auto;
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login-brand {
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 45px;
}
.login-brand span {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 3px;
  display: block;
  margin-top: 5px;
}
.login h1 {
  font-size: 24px;
}
.login p {
  font-size: 12px;
  color: var(--muted);
}
.login form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.login .error {
  color: #a3433d;
  margin: 0;
}
.login form button {
  min-height: 44px;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border: 1px solid var(--line);
  background: #252a31;
  color: white;
  border-radius: 8px;
  z-index: 50;
  max-width: 90vw;
}
#bottomNav,
#moreMenu {
  display: none;
}
@media (max-width: 1150px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shared-sidebar {
    width: 185px;
  }
  .workspace {
    margin-left: 185px;
  }
  #main {
    padding: 30px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .filters input[type='search'] {
    width: 180px;
  }
}
@media (max-width: 900px) {
  .shared-sidebar {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 65px;
    padding: 0 16px;
  }
  .topbar > div {
    gap: 8px;
  }
  .topbar #modeLabel,
  .topbar .avatar + span {
    display: none;
  }
  .topbar button {
    padding: 8px;
  }
  #main {
    padding: 25px 16px 100px;
  }
  .page-heading {
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading > button {
    font-size: 12px;
    min-height: 44px;
  }
  .filters {
    gap: 8px;
  }
  .filters input[type='search'] {
    width: 100%;
  }
  .filters select {
    max-width: 150px;
    min-height: 44px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric strong {
    font-size: 28px;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .person-card p {
    min-height: 0;
  }
  .panel {
    padding: 18px;
  }
  .task-row {
    grid-template-columns: 1fr 80px;
    font-size: 12px;
    gap: 8px;
  }
  .task-row > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .task-row > span:last-child {
    grid-column: 2;
    grid-row: 1;
  }
  .board {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .calendar-controls {
    flex-wrap: wrap;
  }
  .calendar-controls button {
    min-height: 44px;
  }
  .calendar-controls > strong {
    order: 3;
    width: 100%;
    text-align: center;
  }
  .month-grid {
    overflow-x: auto;
  }
  .day {
    min-height: 130px;
    padding: 3px;
  }
  .week-grid {
    grid-template-columns: 1fr;
  }
  .shared-drawer {
    width: 100%;
    border: 0;
    padding: 20px 18px;
    padding-top: max(20px, env(safe-area-inset-top));
  }
  .shared-drawer > header {
    position: sticky;
    top: -20px;
    z-index: 2;
    background: white;
    padding: 15px 0;
  }
  .shared-drawer > header button {
    min-width: 44px;
    min-height: 44px;
  }
  .shared-drawer input,
  .shared-drawer select,
  .shared-drawer button {
    min-height: 44px;
  }
  .shared-drawer input[type='checkbox'] {
    min-height: 20px;
  }
  .shared-drawer footer {
    bottom: -20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .shared-drawer dl {
    grid-template-columns: 100px 1fr;
  }
  .form-grid {
    gap: 10px;
  }
  #bottomNav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 6px max(8px, env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid var(--line);
    z-index: 10;
    justify-content: space-around;
  }
  #bottomNav button {
    font-size: 11px;
    border: 0;
    min-height: 44px;
    padding: 10px;
  }
  #moreMenu:not([hidden]) {
    display: grid;
    position: fixed;
    bottom: 75px;
    right: 15px;
    z-index: 11;
    padding: 8px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    gap: 5px;
  }
  #moreMenu button {
    min-height: 44px;
  }
  #notice {
    bottom: 90px;
  }
  .stage-row {
    grid-template-columns: 1fr 50px 35px;
    gap: 8px;
  }
  .login {
    padding: 28px;
    margin-top: 8vh;
  }
}
@media (max-width: 400px) {
  .board {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
.day .task-card.in_progress {
  border-left-color: #8ca1bc;
}
.day .task-card.review {
  border-left-color: #b8a273;
}
.day .task-card.done {
  border-left-color: #91af98;
}
.route-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: center;
}
.gantt-track {
  height: 22px;
  background: #f3f4f6;
  position: relative;
  border-radius: 4px;
}
.gantt-bar {
  position: absolute;
  height: 100%;
  background: #aab6c4;
  border-radius: 4px;
  min-width: 3px;
}
.gantt-bar.critical {
  background: #b07c75;
}
.deadline-badge,
.review-badge,
.health {
  font-size: 11px;
  border-radius: 4px;
  padding: 3px 6px;
  background: #f0f2f5;
  color: #4a5565;
  display: inline-block;
}
.deadline-badge.HARD_GATE,
.health.CRITICAL {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
}
.deadline-badge.INTERNAL_DEADLINE,
.health.AT_RISK {
  background: #fff0d9;
  color: #9a4c08;
}
.health.ON_TRACK {
  background: #e9f3ee;
  color: #37634d;
}
.task-card.HARD_GATE,
.task-row.HARD_GATE {
  border-left: 3px solid #dc2626;
}
.task-card.INTERNAL_DEADLINE,
.task-row.INTERNAL_DEADLINE {
  border-left: 3px solid #dd8b27;
}
.task-card.HARD_GATE {
  background: #fff8f8;
}
.task-card.INTERNAL_DEADLINE {
  background: #fffdf8;
}
.operational-summary {
  margin-bottom: 20px;
}
.operational-capsule h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.operational-capsule h2 button {
  font: inherit;
  border: 0;
  padding: 0;
  background: transparent;
}
.operational-capsule > small {
  display: block;
  margin-top: 16px;
}
.gate-title {
  display: block;
  border: 0;
  padding: 8px 0;
  background: transparent;
  text-align: left;
  color: #b91c1c;
  font-weight: 600;
}
.gate-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0;
}
.gate-stats strong {
  display: block;
  font-size: 28px;
}
.gate-stats small {
  display: block;
  color: #64748b;
}
.person-stats {
  flex-wrap: wrap;
}
.gantt-bar span {
  height: 100%;
  display: block;
  background: #596a7f;
  border-radius: 4px;
}
@media (max-width: 900px) {
  .route-row {
    grid-template-columns: 1fr;
  }
  .route-row .gantt-track {
    height: 16px;
  }
}
/* Responsive operating layout */
.filter-panel {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.filter-panel > summary {
  padding: 12px 16px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.filter-panel .filters {
  padding: 0 16px 16px;
  margin: 0;
}
.task-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.task-tabs button {
  min-height: 44px;
}
.board.single-state {
  grid-template-columns: 1fr;
}
.board.single-state > section {
  max-width: 760px;
}
.day-number {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
}
.day.current .day-number {
  background: #25282d;
  color: white;
}
.day.important-date {
  background: #fff1f2;
  box-shadow: inset 0 0 0 1px #fecdd3;
}
.day.important-date .day-number {
  color: #b91c1c;
  font-weight: 700;
}
.day.important-date.current .day-number {
  background: #b91c1c;
  color: white;
}
.day.selected-day {
  outline: 2px solid #687484;
  outline-offset: -2px;
}
.day-dots {
  display: none;
}
.day-dots i {
  width: 5px;
  height: 5px;
  background: #818a98;
  border-radius: 50%;
}
.day-dots i.critical-dot {
  background: #dc2626;
}
.selected-day-panel {
  margin-top: 20px;
}
.day .task-deadline {
  display: none;
}
.day .task-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day .task-card .deadline-badge,
.day .task-card .review-badge {
  display: none;
}
.task-context {
  margin: 24px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.task-context summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}
.preserved-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.dashboard-team > summary,
.capsule-panel > summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.dashboard-team .team-grid {
  margin-top: 20px;
}
.route-scroll {
  overflow-x: auto;
  margin: 16px 0 32px;
}
.route {
  min-width: 800px;
}
.route-row {
  grid-template-columns: 280px minmax(480px, 1fr);
  margin-bottom: 12px;
}
.route-row > div > small {
  display: block;
  line-height: 1.5;
}
.route-axis {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  padding: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.route-axis > div {
  display: flex;
  justify-content: space-between;
}
.route-row .gantt-track {
  height: 32px;
  padding: 0;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(25% - 1px),
    #dfe3e8 calc(25% - 1px),
    #dfe3e8 25%
  );
}
.route-row .gantt-bar {
  top: 6px;
  height: 18px;
}
@media (max-width: 1100px) {
  .board {
    grid-template-columns: 1fr;
  }
  .board > section,
  .board.single-state > section {
    max-width: none;
  }
  .task-tabs {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7f8fa;
    padding: 10px 0;
  }
}
@media (max-width: 900px) {
  main {
    padding: 20px 16px 96px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .filter-panel .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .filter-panel input[type='search'] {
    grid-column: 1 / -1;
  }
  .filter-panel select,
  .filter-panel summary,
  .filter-panel button,
  .filter-panel label {
    min-height: 44px;
  }
  .operational-capsule {
    padding: 16px;
  }
  .operational-capsule h2 {
    margin: 0 0 10px;
  }
  .operational-capsule > p {
    margin: 8px 0;
  }
  .operational-capsule > small {
    margin-top: 10px;
  }
  .gate-stats {
    margin: 10px 0;
    gap: 12px;
  }
  .gate-stats strong {
    font-size: 23px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .metric {
    padding: 14px;
  }
  .metric strong {
    font-size: 24px;
  }
  .operational-summary {
    gap: 12px;
  }
  .month-head {
    margin-top: 12px;
  }
  .month-grid {
    overflow: visible;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
  .month-grid .day {
    min-height: 64px;
    height: 64px;
    padding: 3px 0;
    text-align: center;
  }
  .day-desktop-tasks {
    display: none;
  }
  .day-number {
    min-width: 36px;
    min-height: 40px;
    width: 100%;
  }
  .day-dots {
    display: flex;
    justify-content: center;
    gap: 3px;
    min-height: 8px;
  }
  .calendar-controls {
    gap: 10px;
  }
  .calendar-controls > strong {
    order: -1;
    width: 100%;
    text-align: left;
    font-size: 20px;
    text-transform: capitalize;
  }
  .calendar-controls > div {
    display: flex;
    gap: 4px;
  }
  .calendar-controls > div:last-child {
    margin-left: auto;
  }
  .calendar-controls button {
    padding: 8px 10px;
  }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .person-card {
    padding: 18px;
  }
  .person-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .person-card h3 {
    font-size: 18px;
  }
  #moreMenu:not([hidden]) {
    left: 12px;
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
  }
  #moreMenu button {
    width: 100%;
    text-align: left;
    min-height: 52px;
    padding: 14px;
  }
  .topbar button {
    min-height: 44px;
  }
}
@media (max-width: 360px) {
  .calendar-controls > div:last-child {
    margin-left: 0;
  }
  .task-tabs button {
    padding: 8px;
  }
}
.compact-filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 180px) minmax(140px, 220px) auto;
  gap: 8px;
  position: relative;
  margin-bottom: 20px;
}
.compact-filters > * {
  min-width: 0;
  width: 100%;
}
.compact-filters > input,
.compact-filters > select {
  height: 44px;
  max-width: none;
}
.compact-filters > details[open] {
  padding: 0;
  background: transparent;
  border: 0;
}
.compact-filters > details > summary {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 12px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}
.extra-filters {
  position: absolute;
  right: 0;
  top: 52px;
  z-index: 15;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 30px #20232915;
  width: min(400px, 100%);
  display: grid;
  gap: 12px;
}
.extra-filters h3 {
  margin: 0;
  font-size: 17px;
}
.extra-filters button,
.extra-filters select {
  min-height: 44px;
}
@media (max-width: 900px) {
  .compact-filters {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .compact-filters > input {
    grid-column: auto;
  }
  .extra-filters {
    position: fixed;
    top: auto;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 75dvh;
    overflow-y: auto;
  }
  .day-number {
    width: 36px;
  }
  .calendar-controls > strong {
    text-transform: none;
  }
  .route {
    min-width: 0;
    padding-left: 12px;
  }
  .route-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .route-axis {
    grid-template-columns: minmax(0, 1fr);
  }
  .route-axis > span {
    display: none;
  }
}
