:root {
  --pt-bg: #f5f7fa;
  --pt-panel: #ffffff;
  --pt-border: #e3e8ef;
  --pt-text: #172033;
  --pt-muted: #6b7485;
  --pt-primary: #3157d5;
  --pt-primary-soft: #edf1ff;
  --pt-sidebar: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--pt-bg);
  color: var(--pt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background: var(--pt-sidebar);
  color: #d8deea;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  padding: 22px 16px;
  position: fixed;
  top: 0;
  width: 236px;
  z-index: 1030;
}

.brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 11px;
  margin: 0 8px 30px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #4e6de6;
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  letter-spacing: .04em;
  width: 36px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: .94rem;
}

.brand small {
  color: #8f9aaf;
  font-size: .69rem;
  margin-top: 2px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  align-items: center;
  border-radius: 8px;
  color: #aeb7c8;
  display: flex;
  font-size: .9rem;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: #202a3b;
  color: #fff;
}

.nav-symbol {
  color: #7f8aa0;
  font-size: 1.1rem;
  text-align: center;
  width: 18px;
}

.sidebar-foot {
  border-top: 1px solid #273246;
  color: #8792a6;
  font-size: .72rem;
  margin-top: auto;
  padding: 18px 10px 2px;
}

.status-dot {
  background: #52c48b;
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  margin-right: 7px;
  width: 7px;
}

.main-panel {
  margin-left: 236px;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--pt-border);
  display: flex;
  gap: 14px;
  height: 64px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-search {
  max-width: 430px;
  width: 100%;
}

.topbar-search .form-control {
  background: #f7f8fb;
  border-color: #e2e6ed;
  font-size: .84rem;
}

.user-menu {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.user-avatar {
  align-items: center;
  background: var(--pt-primary-soft);
  border-radius: 50%;
  color: var(--pt-primary);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.user-name {
  font-size: .82rem;
  font-weight: 600;
}

.user-menu form {
  margin: 0;
}

.user-menu .btn-link {
  color: var(--pt-muted);
  text-decoration: none;
}

.sidebar-toggle {
  background: transparent;
  border: 0;
  color: var(--pt-text);
  display: none;
  font-size: 1.25rem;
}

.content-wrap {
  margin: 0 auto;
  max-width: 1360px;
  padding: 34px 36px 60px;
}

.page-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
}

.page-heading h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 2px 0 7px;
}

.page-heading p {
  color: var(--pt-muted);
  margin: 0;
}

.eyebrow {
  color: var(--pt-primary) !important;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.stage-badge {
  background: var(--pt-primary-soft);
  border-radius: 999px;
  color: var(--pt-primary);
  font-size: .72rem;
  font-weight: 700;
  padding: 7px 11px;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card,
.empty-panel {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
}

.metric-card {
  color: var(--pt-text);
  padding: 17px 18px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.metric-card:hover {
  border-color: #cbd5e5;
  box-shadow: 0 8px 22px rgba(29, 41, 64, .05);
  color: var(--pt-text);
  transform: translateY(-1px);
}

.metric-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(49, 87, 213, .16);
  outline: 0;
}

.metric-card strong,
.metric-card small,
.metric-label {
  display: block;
}

.metric-label {
  color: var(--pt-muted);
  font-size: .76rem;
  font-weight: 600;
}

.metric-card strong {
  font-size: 1.55rem;
  margin: 6px 0 1px;
}

.metric-card small {
  color: #929aaa;
  font-size: .69rem;
}

.empty-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  min-height: 160px;
  padding: 28px;
}

.empty-mark {
  align-items: center;
  background: #f0f3f8;
  border-radius: 12px;
  color: #8a94a6;
  display: flex;
  flex: 0 0 auto;
  font-size: .83rem;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.empty-panel h2 {
  font-size: 1rem;
  margin: 0 0 7px;
}

.empty-panel p {
  color: var(--pt-muted);
  font-size: .84rem;
  margin: 0;
}

.dashboard-section {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  margin-top: 18px;
  overflow: hidden;
}

.dashboard-section-heading {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 20px 22px;
}

.dashboard-section-heading h2 {
  font-size: 1.08rem;
  margin: 3px 0 0;
}

.dashboard-section-heading > p,
.dashboard-section-heading > a {
  color: var(--pt-muted);
  font-size: .76rem;
  margin: 0;
}

.dashboard-section-heading > a {
  color: var(--pt-primary);
  text-decoration: none;
}

.dashboard-project-list,
.recent-project-list {
  border-top: 1px solid var(--pt-border);
}

.dashboard-project-item,
.recent-project-item {
  color: var(--pt-text);
  display: block;
  padding: 18px 22px;
  text-decoration: none;
  transition: background-color .15s ease;
}

.dashboard-project-item + .dashboard-project-item,
.recent-project-item + .recent-project-item {
  border-top: 1px solid #edf0f4;
}

.dashboard-project-item:hover,
.recent-project-item:hover {
  background: #fafbfc;
  color: var(--pt-text);
}

.dashboard-project-item:focus-visible,
.recent-project-item:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(49, 87, 213, .14);
  outline: 0;
}

.dashboard-project-heading,
.recent-project-item,
.recent-project-main {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.dashboard-project-heading strong,
.recent-project-main strong {
  font-size: .92rem;
}

.dashboard-project-heading time,
.recent-project-item time {
  color: var(--pt-muted);
  flex: 0 0 auto;
  font-size: .7rem;
  white-space: nowrap;
}

.dashboard-action-copy {
  margin-top: 14px;
}

.dashboard-action-copy > span,
.dashboard-blocker > span,
.recent-project-main p > span {
  color: var(--pt-muted);
  display: block;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .03em;
  margin-bottom: 4px;
}

.dashboard-action-copy p,
.dashboard-blocker p,
.recent-project-main p {
  font-size: .8rem;
  line-height: 1.55;
  margin: 0;
}

.dashboard-blocker {
  border-left: 2px solid #d98982;
  color: #82463f;
  margin-top: 12px;
  padding-left: 11px;
}

.dashboard-blocker > span {
  color: #a45952;
}

.recent-project-main {
  flex: 1 1 auto;
}

.recent-project-main > div {
  flex: 0 0 220px;
}

.recent-project-main p {
  color: #566176;
  flex: 1 1 auto;
  max-width: 620px;
}

.dashboard-empty {
  align-items: center;
  border-top: 1px solid var(--pt-border);
  display: flex;
  gap: 15px;
  min-height: 126px;
  padding: 24px 22px;
}

.dashboard-empty h3 {
  font-size: .9rem;
  margin: 0 0 5px;
}

.dashboard-empty p {
  color: var(--pt-muted);
  font-size: .78rem;
  margin: 0;
}

.page-actions,
.detail-actions,
.form-submit-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.page-actions form,
.detail-actions form,
.project-card-foot form {
  margin: 0;
}

.project-page-heading > div:first-child {
  max-width: 760px;
}

.project-filter {
  align-items: end;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) 1fr;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.project-filter .form-label,
.project-form .form-label {
  color: #445066;
  font-size: .78rem;
  font-weight: 700;
}

.filter-actions {
  align-items: center;
  display: flex;
  gap: 4px;
}

.filter-actions .btn-link {
  color: var(--pt-muted);
  text-decoration: none;
}

.project-list {
  display: grid;
  gap: 13px;
}

.project-card {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.project-card:hover {
  border-color: #cfd7e5;
  box-shadow: 0 8px 24px rgba(29, 41, 64, .045);
}

.project-card-main {
  padding: 20px 22px;
}

.project-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.project-card-heading time {
  color: var(--pt-muted);
  font-size: .72rem;
  white-space: nowrap;
}

.project-name {
  color: var(--pt-text);
  font-size: 1.04rem;
  font-weight: 750;
  text-decoration: none;
}

.project-name:hover {
  color: var(--pt-primary);
}

.project-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.status-badge {
  background: #f0f3f8;
  border-radius: 999px;
  color: #526075;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
}

.lifecycle-idea {
  background: #f2efff;
  color: #6c54b8;
}

.lifecycle-research {
  background: #eaf5ff;
  color: #2975a8;
}

.lifecycle-development,
.work-active {
  background: #eaf8f1;
  color: #267856;
}

.lifecycle-maintenance {
  background: #fff5e7;
  color: #9a651b;
}

.work-paused {
  background: #f1f3f6;
  color: #626d7d;
}

.work-blocked {
  background: #fff0ef;
  color: #ae4942;
}

.work-completed {
  background: #edf2ff;
  color: #4463b5;
}

.status-badge.archived {
  background: #ebeef3;
  color: #5e6878;
}

.project-description,
.project-detail-description {
  color: #566176;
  font-size: .85rem;
  line-height: 1.65;
}

.project-description {
  margin: 15px 0;
}

.muted-copy {
  color: #939baa;
}

.project-snapshot-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-snapshot-row > div {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 11px 13px;
}

.project-snapshot-row span,
.snapshot-label {
  color: var(--pt-muted);
  display: block;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .03em;
  margin-bottom: 5px;
}

.project-snapshot-row p {
  font-size: .8rem;
  line-height: 1.5;
  margin: 0;
}

.project-blocker {
  background: #fff8ed;
  border-left: 3px solid #dfa148;
  border-radius: 6px;
  color: #75541f;
  font-size: .78rem;
  line-height: 1.55;
  margin-top: 12px;
  padding: 9px 12px;
}

.project-blocker strong {
  display: inline-block;
  margin-right: 10px;
}

.project-card-foot {
  align-items: center;
  background: #fafbfc;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid var(--pt-border);
  color: var(--pt-muted);
  display: flex;
  font-size: .72rem;
  justify-content: space-between;
  padding: 10px 22px;
}

.project-empty {
  min-height: 190px;
}

.breadcrumb-line {
  align-items: center;
  color: var(--pt-muted);
  display: flex;
  font-size: .75rem;
  gap: 8px;
  margin-bottom: 20px;
}

.breadcrumb-line a {
  color: var(--pt-primary);
  text-decoration: none;
}

.form-page-heading {
  margin-bottom: 20px;
}

.project-form {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.form-section {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  padding: 23px 25px 25px;
}

.form-section-heading {
  border-bottom: 1px solid #edf0f4;
  margin-bottom: 20px;
  padding-bottom: 16px;
}

.form-section-heading h2 {
  font-size: 1rem;
  margin: 0 0 5px;
}

.form-section-heading p {
  color: var(--pt-muted);
  font-size: .78rem;
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.project-form .form-text {
  color: #8992a2;
  font-size: .7rem;
}

.project-form textarea {
  resize: vertical;
}

.form-submit-row {
  justify-content: flex-end;
  padding-top: 4px;
}

.project-detail-header {
  align-items: flex-start;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 14px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 25px 27px;
}

.project-detail-copy {
  max-width: 850px;
}

.project-detail-copy .project-badges {
  margin: 0 0 12px;
}

.project-detail-copy h1 {
  font-size: 1.75rem;
  letter-spacing: -.025em;
  margin: 0 0 8px;
}

.project-detail-description {
  margin: 0 0 17px;
  white-space: pre-line;
}

.project-meta {
  color: var(--pt-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .72rem;
  gap: 8px 20px;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 1.08rem;
  margin: 3px 0 0;
}

.section-heading > p {
  color: var(--pt-muted);
  font-size: .75rem;
  margin: 0;
}

.snapshot-section,
.future-section {
  margin-top: 24px;
}

.snapshot-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: 1.2fr .8fr 1fr;
}

.snapshot-card {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  min-height: 150px;
  padding: 19px 20px;
}

.snapshot-card p {
  font-size: .86rem;
  line-height: 1.68;
  margin: 13px 0 0;
}

.snapshot-card.state-card {
  border-top: 3px solid #6680df;
}

.snapshot-card.blocker-card {
  background: #fffaf2;
  border-top: 3px solid #dfa148;
}

.snapshot-card.blocker-card.no-blocker {
  background: var(--pt-panel);
  border-top-color: #83b99f;
}

.snapshot-card.action-card {
  border-top: 3px solid #59a87f;
}

.future-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.future-grid > div {
  background: #f8f9fb;
  border: 1px solid var(--pt-border);
  border-radius: 10px;
  padding: 14px;
}

.future-grid strong,
.future-grid span {
  display: block;
}

.records-section {
  margin-top: 24px;
}

.records-section-heading {
  align-items: center;
}

.record-page-heading > div:first-child {
  max-width: 780px;
}

.record-filter {
  align-items: end;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(200px, 280px) 1fr;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.record-filter .form-label {
  color: #445066;
  font-size: .78rem;
  font-weight: 700;
}

.archive-notice {
  background: #f5f6f8;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  color: #596477;
  font-size: .8rem;
  margin-bottom: 18px;
  padding: 12px 15px;
}

.record-list {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  overflow: hidden;
}

.record-item {
  align-items: flex-start;
  color: var(--pt-text);
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  text-decoration: none;
}

.record-item + .record-item {
  border-top: 1px solid #edf0f4;
}

a.record-item:hover {
  background: #fafbfc;
  color: var(--pt-text);
}

.record-type-mark {
  background: #edf1ff;
  border-radius: 999px;
  color: #4b63b7;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .67rem;
  font-weight: 750;
  line-height: 1;
  padding: 6px 8px;
}

.record-type-milestone {
  background: #fff5e7;
  color: #94611a;
}

.record-type-issue {
  background: #fff0ef;
  color: #a84842;
}

.record-type-decision {
  background: #eef7f2;
  color: #327557;
}

.record-type-idea {
  background: #f2efff;
  color: #6a52b2;
}

.record-type-maintenance {
  background: #eef4f8;
  color: #477086;
}

.record-item-main {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.record-item-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.record-item-heading a,
.record-item-heading strong {
  color: var(--pt-text);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}

.record-item-heading a:hover {
  color: var(--pt-primary);
}

.record-item-heading time,
.record-meta {
  color: var(--pt-muted);
  font-size: .7rem;
}

.record-item-heading time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.record-status {
  background: #f1f3f6;
  border-radius: 999px;
  color: #626d7d;
  display: inline-flex;
  font-size: .64rem;
  font-weight: 700;
  margin-left: 7px;
  padding: 4px 7px;
  vertical-align: 1px;
}

.record-summary {
  color: #5d687b;
  display: block;
  font-size: .78rem;
  line-height: 1.55;
  margin: 8px 0 0;
  white-space: pre-line;
}

.record-project-link {
  color: var(--pt-primary);
  display: inline-block;
  font-size: .68rem;
  margin-top: 5px;
  text-decoration: none;
}

.record-updated {
  color: #929aaa;
  display: block;
  font-size: .65rem;
  margin-top: 7px;
}

.compact-record-list .record-item {
  padding: 15px 18px;
}

.records-empty {
  background: var(--pt-panel);
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  padding: 24px;
}

.records-empty strong {
  font-size: .88rem;
}

.records-empty p {
  color: var(--pt-muted);
  font-size: .76rem;
  margin: 5px 0 0;
}

.record-empty {
  min-height: 180px;
}

.record-pagination {
  align-items: center;
  color: var(--pt-muted);
  display: flex;
  font-size: .72rem;
  justify-content: space-between;
  margin-top: 16px;
}

.record-detail-card,
.confirm-card {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 14px;
}

.record-detail-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--pt-border);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  padding: 25px 27px;
}

.record-detail-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.record-detail-badges .record-status {
  margin-left: 0;
}

.record-detail-header h1 {
  font-size: 1.55rem;
  margin: 0 0 12px;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.record-content {
  font-size: .88rem;
  line-height: 1.78;
  max-width: 900px;
  min-height: 200px;
  padding: 28px;
  overflow-wrap: anywhere;
}

.record-content p:last-child {
  margin-bottom: 0;
}

.record-delete-link {
  font-size: .75rem;
  text-decoration: none;
}

.confirm-card {
  max-width: 680px;
  padding: 28px;
}

.confirm-card h1 {
  font-size: 1.35rem;
  margin: 4px 0 12px;
}

.confirm-card > p:not(.eyebrow) {
  color: var(--pt-muted);
  font-size: .84rem;
  line-height: 1.65;
}

.confirm-card form {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.confirm-record-meta {
  background: #f8f9fb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  padding: 13px 15px;
}

.confirm-record-meta dt {
  color: var(--pt-muted);
  font-size: .67rem;
  font-weight: 700;
}

.confirm-record-meta dd {
  font-size: .78rem;
  margin: 3px 0 0;
}

.resources-section {
  margin-top: 24px;
}

.todos-section {
  margin-top: 24px;
}

.todos-section-heading {
  align-items: center;
}

.todo-inline-form {
  align-items: flex-start;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px 14px;
}

.todo-inline-form .form-control {
  min-width: 0;
}

.todo-list {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  overflow: hidden;
}

.todo-row {
  align-items: center;
  display: flex;
  gap: 11px;
  min-height: 48px;
  padding: 10px 14px;
}

.todo-row + .todo-row {
  border-top: 1px solid #edf0f4;
}

.todo-row form {
  flex: 0 0 auto;
  margin: 0;
}

.todo-check-button,
.todo-check-readonly,
.todo-completed-mark {
  align-items: center;
  background: #fff;
  border: 1.5px solid #aeb7c5;
  border-radius: 5px;
  display: inline-flex;
  flex: 0 0 20px;
  height: 20px;
  justify-content: center;
  padding: 0;
  width: 20px;
}

.todo-check-button {
  cursor: pointer;
}

.todo-check-button:hover,
.todo-check-button:focus-visible {
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 3px rgba(58, 104, 184, .12);
  outline: 0;
}

.todo-check-button span {
  background: var(--pt-primary);
  border-radius: 2px;
  height: 8px;
  opacity: 0;
  width: 8px;
}

.todo-check-button:hover span,
.todo-check-button:focus-visible span {
  opacity: .25;
}

.todo-check-readonly {
  background: #f7f8fa;
  border-color: #c9d0da;
}

.todo-completed-mark {
  background: #edf7f1;
  border-color: #8bbba0;
  color: #337455;
  font-size: .72rem;
  font-weight: 800;
}

.todo-title {
  color: var(--pt-text);
  flex: 1 1 auto;
  font-size: .82rem;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
}

.todos-empty {
  background: var(--pt-panel);
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  padding: 22px 24px;
}

.todos-empty strong {
  font-size: .86rem;
}

.todos-empty p {
  color: var(--pt-muted);
  font-size: .75rem;
  margin: 5px 0 0;
}

.todo-page-heading > div:first-child {
  max-width: 780px;
}

.todo-filter {
  align-items: end;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(200px, 300px) 1fr;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.todo-filter .form-label {
  color: #445066;
  font-size: .78rem;
  font-weight: 700;
}

.todo-page-inline-form {
  margin-bottom: 18px;
}

.todo-panel {
  margin-bottom: 18px;
}

.todo-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
}

.todo-panel-heading h2 {
  font-size: .9rem;
  margin: 0;
}

.todo-panel-heading h2 span {
  color: var(--pt-muted);
  font-size: .72rem;
  margin-left: 4px;
}

.todo-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.todo-actions a,
.todo-actions .btn-link,
.todo-project-link {
  color: var(--pt-primary);
  font-size: .7rem;
  padding: 0;
  text-decoration: none;
}

.todo-project-link {
  flex: 0 0 auto;
}

.completed-todo-panel {
  margin-top: 24px;
}

.completed-todo-row {
  background: #fafbfc;
}

.completed-todo-row .todo-title {
  color: #727c8d;
  text-decoration: line-through;
  text-decoration-color: #aeb6c2;
}

.completed-todo-row time {
  color: #929aaa;
  flex: 0 0 auto;
  font-size: .68rem;
}

.todo-section-empty {
  background: var(--pt-panel);
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  color: var(--pt-muted);
  font-size: .76rem;
  padding: 18px 20px;
}

.todo-empty-panel {
  min-height: 170px;
}

.todo-form {
  max-width: 760px;
}

.resources-section-heading {
  align-items: center;
}

.compact-resource-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-resource-card,
.resource-card {
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
}

.compact-resource-card {
  min-width: 0;
  padding: 17px 18px;
}

.resource-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.resource-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-type-badge,
.pinned-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 750;
  line-height: 1;
  padding: 5px 7px;
}

.resource-type-badge {
  background: #eef3fb;
  color: #4a648d;
}

.resource-type-git {
  background: #eef7f2;
  color: #327557;
}

.resource-type-url {
  background: #edf1ff;
  color: #4b63b7;
}

.resource-type-local_path,
.resource-type-server_path {
  background: #f2efff;
  color: #6953ab;
}

.resource-type-shared_drive,
.resource-type-nas {
  background: #fff5e7;
  color: #94611a;
}

.pinned-badge {
  background: #fff2cf;
  color: #8a6414;
}

.resource-edit-link,
.resource-open-link,
.resource-project-link {
  color: var(--pt-primary);
  font-size: .7rem;
  text-decoration: none;
}

.compact-resource-card h3,
.resource-card h2 {
  color: var(--pt-text);
  font-weight: 750;
}

.compact-resource-card h3 {
  font-size: .9rem;
  margin: 12px 0 8px;
}

.resource-location {
  background: #f7f8fa;
  border: 1px solid #e8ebf0;
  border-radius: 7px;
  color: #445066;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  user-select: text;
  white-space: pre-wrap;
}

.compact-location {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  max-height: 3.35em;
  overflow: hidden;
  padding: 7px 9px;
}

.compact-resource-card > p {
  color: var(--pt-muted);
  font-size: .72rem;
  line-height: 1.5;
  margin: 9px 0 0;
}

.compact-resource-card .resource-open-link {
  display: inline-block;
  margin-top: 9px;
}

.resources-empty {
  background: var(--pt-panel);
  border: 1px dashed #d8dee8;
  border-radius: 12px;
  padding: 24px;
}

.resources-empty strong {
  font-size: .88rem;
}

.resources-empty p {
  color: var(--pt-muted);
  font-size: .76rem;
  margin: 5px 0 0;
}

.resource-page-heading > div:first-child {
  max-width: 780px;
}

.resource-filter {
  align-items: end;
  background: var(--pt-panel);
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(200px, 280px) 1fr;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.global-resource-filter {
  grid-template-columns: minmax(200px, 280px) minmax(200px, 280px) 1fr;
}

.resource-filter .form-label {
  color: #445066;
  font-size: .78rem;
  font-weight: 700;
}

.resource-list {
  display: grid;
  gap: 13px;
}

.resource-card {
  padding: 20px 22px;
}

.resource-card h2 {
  font-size: 1rem;
  margin: 11px 0 0;
}

.resource-project-link {
  display: inline-block;
  margin-top: 5px;
}

.resource-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

.resource-actions .btn-link {
  font-size: .7rem;
  text-decoration: none;
}

.full-resource-location {
  display: block;
  margin-top: 15px;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px 12px;
}

.resource-card > .resource-open-link {
  display: inline-block;
  margin-top: 9px;
}

.resource-description {
  color: #596477;
  font-size: .78rem;
  line-height: 1.6;
  margin: 13px 0 0;
}

.resource-updated {
  color: #929aaa;
  display: block;
  font-size: .65rem;
  margin-top: 12px;
}

.resource-empty {
  min-height: 180px;
}

.resource-pin-field {
  background: #f8f9fb;
  border-radius: 9px;
  padding: 13px 15px;
}

.confirm-resource-meta {
  background: #f8f9fb;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 13px 15px;
}

.confirm-resource-meta dt {
  color: var(--pt-muted);
  font-size: .67rem;
  font-weight: 700;
}

.confirm-resource-meta dd {
  font-size: .78rem;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.future-grid strong {
  font-size: .8rem;
  margin-bottom: 5px;
}

.future-grid span {
  color: var(--pt-muted);
  font-size: .68rem;
  line-height: 1.5;
}

.auth-shell {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 18px;
}

.auth-brand {
  align-items: center;
  display: flex;
  font-size: .92rem;
  font-weight: 700;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-brand .brand-mark {
  height: 32px;
  width: 32px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--pt-border);
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(24, 34, 54, .07);
  padding: 30px;
  width: min(100%, 420px);
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 4px 0 8px;
}

.auth-heading p:last-child {
  color: var(--pt-muted);
  font-size: .84rem;
  margin: 0;
}

.auth-card input {
  border: 1px solid #d9dee7;
  border-radius: .375rem;
  display: block;
  padding: .5rem .75rem;
  width: 100%;
}

.auth-foot {
  color: var(--pt-muted);
  font-size: .8rem;
  margin: 20px 0 0;
  text-align: center;
}

.disabled-icon {
  color: var(--pt-primary);
  font-size: 2rem;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .sidebar {
    box-shadow: 8px 0 28px rgba(0, 0, 0, .18);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-panel {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .future-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-resource-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .content-wrap {
    padding: 24px 18px 44px;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar-search,
  .user-name {
    display: none;
  }

  .page-heading,
  .dashboard-section-heading,
  .dashboard-project-heading,
  .recent-project-item,
  .recent-project-main,
  .project-card-heading,
  .project-detail-header,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .recent-project-main > div {
    flex-basis: auto;
  }

  .dashboard-project-heading time,
  .recent-project-item time {
    white-space: normal;
  }

  .page-actions,
  .detail-actions {
    flex-wrap: wrap;
  }

  .project-filter,
  .record-filter,
  .resource-filter,
  .todo-filter,
  .form-grid,
  .project-snapshot-row,
  .future-grid {
    grid-template-columns: 1fr;
  }

  .project-card-heading time {
    white-space: normal;
  }

  .project-card-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    gap: 14px;
  }

  .stage-badge {
    display: none;
  }

  .record-item-heading,
  .record-detail-header,
  .record-pagination,
  .resource-card-heading,
  .todo-row {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .todo-actions {
    padding-left: 31px;
  }

  .record-item-heading time {
    white-space: normal;
  }
}
