[hidden] { display: none !important; }

.view-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  padding: 4px;
  margin: -7px 0 22px;
  border-radius: 12px;
  background: #e8edf1;
}
.view-tab {
  min-width: 92px;
  border: 0;
  background: transparent;
  color: #627386;
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 750;
}
.view-tab.active { background: #fff; color: #1d3549; box-shadow: 0 1px 4px #1224371c; }
.bottom-nav { display: none; }
.team-view { display: none; }
.main[data-active-tab="team"] .team-view { display: block; }
.main[data-active-tab="team"] .metrics,
.main[data-active-tab="team"] .content-grid { display: none; }

.main[data-active-tab="today"] [data-tab="tasks"],
.main[data-active-tab="today"] [data-tab="more"],
.main[data-active-tab="tasks"] [data-tab="today"],
.main[data-active-tab="tasks"] [data-tab="more"],
.main[data-active-tab="more"] [data-tab="today"],
.main[data-active-tab="more"] [data-tab="tasks"] { display: none !important; }
.main[data-active-tab="tasks"] .content-grid,
.main[data-active-tab="more"] .content-grid { grid-template-columns: minmax(0, 1fr); }
.main[data-active-tab="tasks"] .right-column,
.main[data-active-tab="more"] .left-column { display: none; }
.main[data-active-tab="more"] .right-column { max-width: 680px; }

.task-filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.assignee-filter-label select { min-height: 38px; padding: 6px 28px 6px 10px; border: 1px solid #dce5eb; border-radius: 9px; background: #fff; color: #4c6172; font-size: 13px; font-weight: 700; }
.task-status { border-radius: 5px; padding: 3px 6px; background: #edf1f4; color: #647687; font-weight: 750; }
.task-status.status-progress { background: #e5effa; color: #366898; }
.task-status.status-review { background: #fff0d8; color: #976513; }
.task-status.status-blocked { background: #fbe7e7; color: #b74d4d; }
.task-status.status-done { background: #e5f3e9; color: #3f8254; }
.task-edit { flex: none; width: 34px; min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #738796; font-size: 22px; line-height: 1; }
.task-edit:hover { background: #eaf0f2; color: #2a4658; }

.team-intro { margin: -4px 0 17px; color: #607384; font-size: 14px; line-height: 1.6; max-width: 760px; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.team-card { min-width: 0; background: #fff; border: 1px solid #e4eaee; border-radius: 15px; padding: 18px; box-shadow: 0 2px 7px #1b2b3f06; }
.team-card-head { display: flex; align-items: center; gap: 11px; }
.team-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--area-color) 18%, white); color: #284157; font-size: 17px; font-weight: 850; }
.team-card-head h3 { margin: 0; font-size: 16px; }
.team-card-head p { margin: 3px 0 0; color: #718393; font-size: 12px; line-height: 1.35; }
.team-count { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 10px; }
.team-count strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.team-count span { color: #6a7d8d; font-size: 13px; }
.team-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.team-stats span { border-radius: 6px; background: #f2f5f7; color: #566d7d; padding: 5px 7px; font-size: 11px; font-weight: 750; }
.team-tasks { min-height: 88px; margin: 15px 0 0; border-top: 1px solid #edf1f3; }
.team-task { display: grid; gap: 3px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #edf1f3; background: transparent; text-align: left; cursor: pointer; }
.team-task:hover .team-task-title { color: #1c765b; }
.team-task-title { font-size: 13px; line-height: 1.4; font-weight: 750; overflow-wrap: anywhere; }
.team-task-meta { color: #7b8b99; font-size: 11px; }
.team-empty { color: #8b9aa7; font-size: 13px; }
.team-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.team-actions .text-button { min-height: 38px; }
.team-source { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #edf1f3; color: #8b99a5; font-size: 11px; }

.board-preview { margin: -5px 0 0; color: #667b8b; font-size: 12px; }
.form-more { border: 1px solid #e3e9ed; border-radius: 9px; padding: 9px 11px; }
.form-more summary { color: #526b7b; cursor: pointer; font-size: 13px; font-weight: 750; }
.form-more-inner { display: grid; gap: 13px; padding-top: 13px; }
.form-note { margin: -2px 0 0; color: #81909b; font-size: 12px; line-height: 1.45; }
.danger-button { margin-right: auto; border: 0; background: none; color: #bd4a4a; font-size: 13px; font-weight: 800; }

.week-range { color: #8091a1; font-size: 12px; font-weight: 700; white-space: nowrap; }
.habit-list { display: grid; gap: 14px; }
.habit-row { display: flex; align-items: center; gap: 10px; }
.habit-symbol {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  color: var(--habit-color); background: color-mix(in srgb, var(--habit-color) 13%, white);
  font-size: 17px; font-weight: 850;
}
.habit-body { flex: 1; min-width: 0; }
.habit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.habit-head strong { font-size: 14px; line-height: 1.3; }
.habit-head span { color: #667887; font-size: 12px; font-weight: 700; white-space: nowrap; }
.habit-progress { height: 7px; overflow: hidden; background: #e9eef1; border-radius: 20px; }
.habit-progress span { display: block; height: 100%; background: var(--habit-color); border-radius: inherit; transition: width .25s ease; }
.habit-action {
  flex: none; min-height: 40px; border: 1px solid #d8e3e8; border-radius: 9px;
  background: #fff; color: #1b7158; padding: 7px 9px; font-size: 12px; font-weight: 800;
}
.habit-action.done { border-color: #bce5d2; background: #e8f7ef; }
.habit-message { margin: 15px 0 0; color: #738392; font-size: 12px; line-height: 1.5; }
.install-panel p { color: #5e7181; font-size: 14px; line-height: 1.6; }
.install-panel .local-note { margin: 17px 0 0; padding-top: 14px; border-top: 1px solid #edf1f3; color: #7b8b99; font-size: 12px; }
.task-title { font-size: 15px; }
.task-meta { font-size: 13px; }
.task-check { min-width: 28px; min-height: 28px; }
.search-label input { min-height: 40px; }
.filter-button { min-height: 38px; }

@media (max-width: 800px) {
  .view-tabs { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #e1e8ec;
    box-shadow: 0 -7px 22px #101c2e0a;
  }
  .bottom-nav-button {
    min-height: 48px; border: 0; border-radius: 9px;
    background: transparent; color: #6d7e8d; font-size: 14px; font-weight: 750;
  }
  .bottom-nav-button.active { background: #eaf5ef; color: #1c7057; }
  .main { padding-bottom: calc(95px + env(safe-area-inset-bottom)); }
  .sidebar { padding: 12px 15px 9px; }
  .brand { padding-bottom: 11px; }
  .brand small { display: none; }
  .sidebar nav { scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-item { min-height: 43px; }
  .content-grid { display: flex; flex-direction: column; }
  .left-column, .right-column { display: contents; }
  .focus-panel { order: 1; }
  .habits-panel { order: 2; }
  .agenda-panel { order: 3; }
  .waiting-panel { order: 4; }
  .insight-panel { order: 5; }
  .all-tasks-panel, .connections-panel, .install-panel { order: 1; width: 100%; }
  .main[data-active-tab="tasks"] .right-column,
  .main[data-active-tab="more"] .left-column { display: none; }
  .main[data-active-tab="more"] .right-column { max-width: none; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .topbar { display: flex; align-items: center; }
  .topbar h1 { margin-bottom: 0; }
  .topbar .subhead { display: none; }
  .topbar .primary-button { margin-top: 0; padding: 11px 13px; }
  .metrics { gap: 8px; margin-bottom: 13px; }
  .metric { min-height: 92px; padding: 11px 13px; }
  .metric strong { margin: 8px 0 0; font-size: 26px; }
  .metric small { display: none; }
  .metric span { font-size: 12px; }
  .content-grid, .left-column, .right-column { gap: 13px; }
  .section-heading h2 { font-size: 17px; }
  .habit-head { display: block; }
  .habit-head span { display: block; margin-top: 2px; }
  .habit-action { min-width: 77px; }
  .team-grid { grid-template-columns: 1fr; }
  .bottom-nav-button { font-size: 13px; }
  .task-filters { display: block; }
  .assignee-filter-label select { width: 100%; margin: 0 0 13px; }
}

/* The unfolded Find N6 has space for a two-column working view. */
@media (min-width: 700px) and (max-width: 800px) {
  .content-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .left-column, .right-column { display: grid; grid-template-columns: minmax(0, 1fr); }
  .main[data-active-tab="tasks"] .content-grid,
  .main[data-active-tab="more"] .content-grid { grid-template-columns: minmax(0, 1fr); }
  .main[data-active-tab="tasks"] .right-column,
  .main[data-active-tab="more"] .left-column { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
