:root {
  color-scheme: dark;
  --canvas: #0a0a0a;
  --surface: #171717;
  --surface-high: #242424;
  --line: #34383a;
  --line-soft: #262626;
  --text: #e9e7e6;
  --muted: #c0c8cd;
  --primary: #417890;
  --primary-strong: #417890;
  --primary-panel: rgba(65, 120, 144, 0.22);
  --success: #39d39a;
  --success-bg: rgba(31, 166, 112, 0.18);
  --warn: #f9b984;
  --warn-bg: rgba(249, 185, 132, 0.14);
  --danger: #ffb4ab;
  --danger-bg: rgba(255, 180, 171, 0.13);
  --font-display: "Space Grotesk", Inter, sans-serif;
  --font-number: "JetBrains Mono", "Space Grotesk", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.45, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(65, 120, 144, 0.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(65, 120, 144, 0.08), transparent 28%),
    var(--canvas);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body.auth-locked .top-actions {
  display: none;
}

button {
  font: inherit;
}

input,
select {
  font: inherit;
}

a {
  color: inherit;
}

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

.content-shell {
  display: grid;
  grid-template-rows: 68px 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 180px minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(65, 120, 144, 0.22);
  background:
    radial-gradient(circle at 9% 0%, rgba(65, 120, 144, 0.18), transparent 34%),
    rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(10px);
  animation: section-enter 480ms var(--ease-out) both;
}

.topbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 176px;
  min-height: 54px;
  padding: 8px 14px;
  text-decoration: none;
  transition: transform 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth);
}

.topbar-brand:hover {
  box-shadow: 0 0 34px rgba(65, 120, 144, 0.16);
  transform: translateY(-1px);
}

.topbar-brand img {
  display: block;
  width: 158px;
  max-height: 48px;
  object-fit: contain;
}

.page-title,
.top-actions,
.stakeholder-card,
.project-heading,
.project-meta,
.section-header {
  display: flex;
  align-items: center;
}

.page-title {
  gap: 20px;
  min-width: 0;
}

.page-title h1 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.page-title > span {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.page-title p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #c9cdd1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-actions {
  justify-content: end;
  gap: 12px;
}

.project-switcher {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.project-switcher span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-switcher select {
  min-height: 34px;
  border: 1px solid rgba(65, 120, 144, 0.45);
  border-radius: 4px;
  background: #111;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  transition: border-color 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth), transform 180ms var(--ease-smooth);
  transform-origin: top;
}

.project-switcher:focus-within select {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(65, 120, 144, 0.18);
  transform: scale(1.01);
}

.admin-dashboard {
  width: min(1320px, calc(100% - 48px));
}

.icon-button,
.contact-shortcut,
.text-button,
.manifest-button,
.modal-close,
.primary-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: transparent;
  color: #d8dcde;
  transition: background-color 180ms var(--ease-smooth), color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.icon-button i {
  font-size: 24px;
}

.icon-button:hover {
  background: var(--surface-high);
  color: #6ca7c1;
  filter: brightness(1.08);
  transform: scale(1.04);
}

.icon-button:active,
.text-button:active,
.manifest-button:active,
.primary-button:active {
  transform: scale(0.97);
}

.icon-button.is-spinning i {
  animation: refresh-spin 520ms var(--ease-out);
}

.icon-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.refresh-status {
  display: inline-grid;
  min-width: 0;
  min-height: 28px;
  place-items: center;
  padding: 0 9px;
  border: 1px solid rgba(57, 211, 154, 0.24);
  border-radius: 4px;
  background: rgba(57, 211, 154, 0.1);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), border-color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), color 180ms var(--ease-smooth);
  pointer-events: none;
  white-space: nowrap;
}

.refresh-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.refresh-status.error {
  border-color: rgba(255, 180, 171, 0.3);
  background: var(--danger-bg);
  color: var(--danger);
}

.contact-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(65, 120, 144, 0.34);
  border-radius: 4px;
  background: rgba(65, 120, 144, 0.08);
  color: #9cc9dc;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.contact-shortcut i {
  font-size: 18px;
}

.contact-shortcut:hover {
  background: rgba(65, 120, 144, 0.14);
  border-color: rgba(65, 120, 144, 0.52);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.stakeholder-card {
  display: grid;
  justify-items: end;
  gap: 3px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.stakeholder-card strong {
  color: #f1f1f1;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
}

#account-email {
  text-transform: none;
  font-weight: 600;
}

.stakeholder-card span {
  color: #c4c6c9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard {
  display: grid;
  gap: 32px;
  width: min(1120px, calc(100% - 48px));
  margin: 32px auto;
}

.surface-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.project-summary {
  animation: section-enter 520ms var(--ease-out) 90ms both;
}

.task-card {
  animation: section-enter 520ms var(--ease-out) 180ms both;
}

.activity-card {
  animation: section-enter 520ms var(--ease-out) 270ms both;
}

.notice-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  animation: section-enter 420ms var(--ease-out) both;
}

.notice-card[hidden] {
  display: none;
}

.notice-card i {
  color: var(--primary);
  font-size: 25px;
}

.notice-card strong {
  display: block;
  margin-bottom: 3px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 118px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.project-heading {
  gap: 12px;
  margin-bottom: 10px;
}

.project-heading h2 {
  margin: 0;
  color: #f6f5f5;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.08;
}

.project-code {
  min-width: 106px;
  padding: 6px 10px;
  border: 1px solid #607887;
  border-radius: 3px;
  background: var(--primary-panel);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
}

.project-meta {
  gap: 24px;
  margin: 0;
  color: #d5d5d6;
  font-size: 15px;
}

.project-meta strong {
  color: #fff;
  font-weight: 800;
}

.status-badge {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 170px;
  padding: 8px 14px;
  border: 1px solid rgba(57, 211, 154, 0.22);
  border-radius: 14px;
  background: rgba(57, 211, 154, 0.1);
  color: var(--success);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  transition: transform 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth), opacity 180ms var(--ease-smooth);
}

.status-badge:hover,
.status-chip:hover {
  transform: scale(1.03);
}

.status-badge.warning {
  border-color: rgba(249, 185, 132, 0.28);
  background: var(--warn-bg);
  color: var(--warn);
}

.status-badge.upcoming {
  border-color: rgba(65, 120, 144, 0.32);
  background: rgba(65, 120, 144, 0.13);
  color: #9cc9dc;
}

.status-badge.working {
  animation: live-pulse 2s ease-in-out infinite;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 168px;
}

.metric-panel {
  display: grid;
  align-content: center;
  min-height: 168px;
  padding: 24px 32px;
  border-right: 1px solid var(--line);
  transition: background-color 200ms var(--ease-smooth), box-shadow 200ms var(--ease-smooth), transform 200ms var(--ease-smooth);
}

.metric-panel:first-child {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, rgba(65, 120, 144, 0.14), rgba(23, 23, 23, 0.98) 42%);
}

.metric-panel:last-child {
  border-right: 0;
}

.metric-panel[role="button"] {
  cursor: pointer;
}

.metric-panel[role="button"]:hover,
.metric-panel.active {
  background: rgba(65, 120, 144, 0.1);
  box-shadow: inset 0 3px 0 var(--primary);
  transform: translateY(-1px);
}

.metric-panel p {
  margin: 0 0 9px;
  color: #d7dbde;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #f5f5f5;
  font-family: var(--font-number);
  font-size: 52px;
  font-weight: 800;
  line-height: 0.95;
}

.metric-panel:first-child strong {
  color: var(--primary);
}

.metric-panel > span {
  color: #c8cbcf;
  font-size: 14px;
}

.metric-number {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-number strong {
  margin: 0 0 6px;
}

.metric-number svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
  stroke-width: 1.8;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  margin-top: 4px;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 10;
}

.progress-ring-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.progress-ring-value {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  filter: drop-shadow(0 0 9px rgba(65, 120, 144, 0.28));
  transition: stroke-dashoffset 760ms var(--ease-out);
}

.progress-ring strong {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 34px;
}

.progress-track {
  display: none;
}

.task-card {
  min-height: 0;
}

.section-header {
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.section-header h2 {
  margin: 0;
  color: #f5f4f4;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}

.section-header p {
  margin: 0;
  color: #d5d8db;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-eyebrow {
  margin: 0 0 5px !important;
  color: var(--primary) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

.task-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: #141414;
  scrollbar-width: thin;
}

.task-filter-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101010;
  color: #d7dbde;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth);
}

.task-filter-button:hover,
.task-filter-button.active {
  border-color: rgba(65, 120, 144, 0.55);
  background: rgba(65, 120, 144, 0.14);
  color: #9cc9dc;
  transform: translateY(-1px);
}

.table-scroll {
  overflow-x: auto;
  transition: max-height 240ms var(--ease-out), opacity 180ms var(--ease-smooth);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 0 28px;
  text-align: left;
}

thead tr {
  height: 52px;
  background: #121212;
}

th {
  color: #d8dcdf;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

th:last-child {
  text-align: right;
}

tbody tr {
  height: 70px;
  border-top: 1px solid var(--line-soft);
  border-left: 3px solid transparent;
  background: #191919;
  transition: background-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), border-color 180ms var(--ease-smooth);
}

tbody tr.completed {
  border-left-color: var(--success);
}

tbody tr.working,
tbody tr.in_progress,
tbody tr.open {
  border-left-color: var(--warn);
}

tbody tr.upcoming {
  border-left-color: #8fa1aa;
}

tbody tr.cancelled {
  border-left-color: var(--danger);
}

tbody tr:nth-child(even) {
  background: #171717;
}

tbody tr.task-row {
  cursor: pointer;
}

tbody tr.task-row:hover {
  background: rgba(255, 255, 255, 0.025);
  transform: translateX(2px);
}

tbody tr.empty-task-row {
  height: 88px;
  border-left-color: var(--primary);
}

tbody tr.empty-task-row td {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

td {
  color: #d6d9dc;
  font-size: 14px;
  font-weight: 700;
}

td:first-child {
  color: #f3f3f3;
  font-size: 15px;
  font-weight: 800;
}

td:last-child {
  color: #dce0e3;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 3px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth), opacity 180ms var(--ease-smooth);
}

.status-chip.in_progress {
  background: rgba(152, 206, 233, 0.13);
  color: #9cc9dc;
}

.status-chip.working {
  background: var(--warn-bg);
  color: var(--warn);
  animation: live-pulse 2s ease-in-out infinite;
}

.status-chip.open {
  background: var(--warn-bg);
  color: var(--warn);
}

.status-chip.upcoming {
  background: rgba(192, 200, 205, 0.12);
  color: #aebbc2;
}

.status-chip.cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}

.manifest-button {
  display: block;
  width: 100%;
  min-height: 58px;
  border-top: 1px solid rgba(38, 38, 38, 0.55);
  background: #171717;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background-color 180ms var(--ease-smooth), color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.manifest-button:hover {
  background: #1f1f1f;
  color: #9cc9dc;
}

.work-snapshot {
  animation: section-enter 520ms var(--ease-out) 150ms both;
}

.work-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 220px;
}

.work-lane {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 24px 28px 28px;
  border-right: 1px solid var(--line);
  background: #171717;
}

.work-lane:last-child {
  border-right: 0;
}

.work-lane.completed-today {
  border-top: 3px solid var(--success);
}

.work-lane.working-now {
  border-top: 3px solid var(--warn);
}

.work-lane.tomorrow-work {
  border-top: 3px solid #8fa1aa;
}

.work-lane-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
}

.work-lane-head i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(65, 120, 144, 0.3);
  border-radius: 50%;
  color: var(--primary);
  font-size: 20px;
}

.completed-today .work-lane-head i {
  border-color: rgba(57, 211, 154, 0.32);
  color: var(--success);
}

.working-now .work-lane-head i {
  border-color: rgba(249, 185, 132, 0.34);
  color: var(--warn);
}

.work-lane-head h3 {
  margin: 0 0 4px;
  color: #f5f4f4;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.work-lane-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.work-list {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-list li {
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #141414;
}

.work-list strong {
  overflow-wrap: anywhere;
  color: #f4f4f4;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.work-list span {
  color: #c8cbd0;
  font-size: 12px;
  font-weight: 700;
}

.work-list .empty-work-item {
  align-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.activity-card {
  padding-bottom: 26px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-color: rgba(65, 120, 144, 0.2);
  background:
    linear-gradient(90deg, rgba(65, 120, 144, 0.13), rgba(23, 23, 23, 0.98) 36%),
    var(--surface);
  animation: section-enter 520ms var(--ease-out) 360ms both;
  scroll-margin-top: 88px;
}

.contact-copy {
  min-width: 0;
}

.contact-eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-copy h2 {
  margin: 0;
  color: #f5f4f4;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
}

.contact-copy p:last-child {
  max-width: 410px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.contact-method {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 116px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #141414;
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.contact-method:hover {
  border-color: rgba(65, 120, 144, 0.54);
  background: #191919;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.contact-method i {
  color: var(--primary);
  font-size: 25px;
}

.contact-method span {
  color: #d7dbde;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-method strong {
  overflow-wrap: anywhere;
  color: #f4f4f4;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.contact-method.primary-contact {
  border-left: 3px solid var(--primary);
  background: rgba(65, 120, 144, 0.1);
}

.section-header.compact {
  min-height: auto;
  padding: 26px 28px 0;
  border-bottom: 0;
}

.text-button {
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  transition: color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.sign-out-button {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(65, 120, 144, 0.34);
  border-radius: 4px;
  color: #9cc9dc;
  text-decoration: none;
  transition: border-color 180ms var(--ease-smooth), background-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), filter 180ms var(--ease-smooth);
}

.sign-out-button:hover,
.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 32px;
}

.auth-card[hidden] {
  display: none;
}

.auth-eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
}

.auth-copy {
  max-width: 420px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  color: #d7dbde;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101010;
  color: var(--text);
  padding: 0 12px;
}

.auth-form input:focus,
.project-switcher select:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(65, 120, 144, 0.22);
}

.password-field {
  position: relative;
  display: flex;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms var(--ease-smooth);
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle i {
  font-size: 19px;
}

.primary-button {
  min-height: 46px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  transition: filter 180ms var(--ease-smooth), transform 180ms var(--ease-smooth), box-shadow 180ms var(--ease-smooth);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.68;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--warn);
  font-size: 13px;
  font-weight: 700;
}

.admin-workspace {
  display: grid;
  gap: 28px;
}

.admin-workspace[hidden] {
  display: none;
}

.admin-metrics {
  overflow: hidden;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-user-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.55fr);
  gap: 28px;
  align-items: start;
}

.admin-users-card,
.admin-user-detail {
  min-height: 520px;
}

.admin-eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-add-user {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-add-user label,
.admin-project-form label {
  display: grid;
  gap: 7px;
}

.admin-add-user label > span,
.admin-project-form label > span {
  color: #d7dbde;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-inline-field input,
.admin-add-user .admin-search input,
.admin-project-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101010;
  color: var(--text);
  padding: 0 11px;
}

.admin-inline-field .primary-button {
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.admin-user-list {
  display: grid;
  max-height: 520px;
  overflow-y: auto;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.admin-user-row:hover,
.admin-user-row.is-selected {
  background: rgba(65, 120, 144, 0.12);
}

.admin-user-row.is-selected {
  box-shadow: inset 3px 0 0 var(--primary);
}

.admin-user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-panel);
  color: #9cc9dc;
  font-size: 18px;
}

.admin-user-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-copy small,
.admin-list-empty {
  color: var(--muted);
  font-size: 12px;
}

.admin-list-empty {
  padding: 24px;
}

.admin-empty-state {
  display: grid;
  min-height: 520px;
  place-content: center;
  justify-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.admin-empty-state i {
  color: var(--primary);
  font-size: 48px;
}

.admin-empty-state h2 {
  margin: 14px 0 4px;
  color: var(--text);
}

.admin-empty-state p {
  margin: 0;
}

.admin-detail-header {
  align-items: flex-start;
  justify-content: space-between;
}

.admin-detail-header h2 {
  overflow-wrap: anywhere;
}

.admin-delete-user-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 180, 171, 0.3);
  border-radius: 4px;
  background: var(--danger-bg);
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color 180ms var(--ease-smooth), border-color 180ms var(--ease-smooth), transform 180ms var(--ease-smooth);
}

.admin-delete-user-button:hover {
  border-color: rgba(255, 180, 171, 0.52);
  background: rgba(255, 180, 171, 0.19);
  transform: translateY(-1px);
}

.admin-delete-user-button i {
  font-size: 17px;
}

.admin-project-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 140px auto;
  gap: 14px;
  align-items: end;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}

.admin-project-form .checkbox-field {
  min-height: 42px;
}

.admin-form-actions {
  display: flex;
  gap: 12px;
}

.admin-form-actions .primary-button {
  min-width: 130px;
  padding: 0 16px;
}

.admin-project-form .admin-form-actions,
.admin-project-form .auth-message {
  grid-column: 1 / -1;
}

.admin-assignment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 10px;
}

.admin-assignment-heading h3 {
  margin: 0;
}

.admin-assignment-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-user-detail .admin-table {
  min-width: 680px;
}

.admin-actions .danger-action {
  border-color: rgba(255, 180, 171, 0.28);
  color: var(--danger);
}

.admin-form {
  display: grid;
  gap: 20px;
  padding-bottom: 24px;
}

.admin-form-fields {
  display: grid;
  gap: 14px;
  padding: 0 24px;
}

.admin-form label,
.admin-search {
  display: grid;
  gap: 7px;
}

.admin-form label span,
.admin-search span {
  color: #d7dbde;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-form input,
.admin-form select,
.admin-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101010;
  color: var(--text);
  padding: 0 11px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-search input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(65, 120, 144, 0.22);
}

.checkbox-field {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  flex-direction: row;
  gap: 10px !important;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.admin-form > .primary-button,
.admin-form > .auth-message {
  margin: 0 24px;
}

.admin-table-card {
  min-width: 0;
}

.admin-search {
  min-width: min(300px, 100%);
}

.admin-table {
  min-width: 840px;
}

.admin-table td:last-child {
  text-align: left;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-actions button {
  min-height: 32px;
  border: 1px solid rgba(65, 120, 144, 0.32);
  border-radius: 4px;
  background: transparent;
  color: #9cc9dc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.admin-actions button:hover {
  background: rgba(65, 120, 144, 0.12);
}

.token-text {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin: 24px 28px 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  position: relative;
  padding-left: 26px;
}

.activity-list li::after {
  position: absolute;
  top: 19px;
  bottom: -23px;
  left: 5px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(65, 120, 144, 0.4), rgba(65, 120, 144, 0.04));
  content: "";
}

.activity-list li:nth-last-child(-n + 2)::after {
  display: none;
}

.activity-list li::before {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  content: "";
  background: var(--dot, var(--primary));
  z-index: 1;
}

.activity-list strong {
  display: block;
  color: #f4f4f4;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.activity-list time {
  display: block;
  margin-top: 3px;
  color: #c8cbd0;
  font-size: 13px;
  font-weight: 500;
}

.footer {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 16px 28px;
  border-top: 1px solid var(--line-soft);
  background: #101010;
  color: #c8ccd0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.footer strong {
  color: var(--primary);
}

@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(249, 185, 132, 0);
    opacity: 0.82;
  }
  50% {
    box-shadow: 0 0 14px rgba(249, 185, 132, 0.22);
    opacity: 1;
  }
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
}

.modal-backdrop[hidden] {
  display: none;
}

.task-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #181818;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: #242424;
  color: var(--text);
}

.modal-close:hover {
  color: #9cc9dc;
}

.modal-eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.task-modal h2 {
  margin: 0 46px 20px 0;
  font-size: 26px;
  line-height: 1.15;
}

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.task-detail-grid div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #141414;
}

.task-detail-grid dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-detail-grid dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.task-description {
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.task-description h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.task-description p {
  margin: 0;
  color: #d4d8dc;
  font-size: 14px;
  line-height: 1.6;
}

.signout-modal {
  width: min(380px, 100%);
  text-align: left;
}

.signout-modal-copy {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.signout-modal-copy strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.danger-eyebrow {
  color: var(--danger);
}

.delete-user-note {
  margin: -12px 0 18px;
  padding: 11px 12px;
  border-left: 3px solid var(--warn);
  background: var(--warn-bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.signout-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.danger-button {
  background: #c8493f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.danger-button:hover {
  background: #d65b50;
}

.signout-modal-actions .danger-button {
  min-height: 38px;
  padding: 0 18px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    position: static;
  }

  .content-shell {
    display: block;
  }

  .topbar-brand img {
    width: 132px;
  }

  .page-title,
  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .project-switcher {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .project-switcher select {
    width: 100%;
  }

  .dashboard {
    width: calc(100% - 28px);
    margin: 22px auto;
  }

  .summary-head,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-metrics,
  .activity-list,
  .auth-card,
  .admin-grid,
  .admin-user-layout,
  .work-lanes,
  .contact-card,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .admin-project-form {
    grid-template-columns: 1fr;
  }

  .admin-detail-header {
    gap: 16px;
  }

  .admin-delete-user-button {
    width: 100%;
    justify-content: center;
  }

  .work-lane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .work-lane:last-child {
    border-bottom: 0;
  }

  .contact-card {
    padding: 24px;
    scroll-margin-top: 20px;
  }

  .metric-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .task-filter-bar {
    padding: 12px 16px;
  }

  .activity-list li:nth-last-child(-n + 2)::after {
    display: block;
  }

  .activity-list li:last-child::after {
    display: none;
  }

  .metric-panel:last-child {
    border-bottom: 0;
  }
}

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

@media (max-width: 560px) {
  .topbar {
    gap: 9px;
    padding: 12px;
  }

  .topbar-brand {
    justify-content: flex-start;
    width: 100%;
    min-height: 30px;
    padding: 0;
  }

  .topbar-brand img {
    width: 94px;
    max-height: 30px;
  }

  .page-title {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .page-title h1 {
    font-size: 18px;
  }

  .page-title > span {
    display: none;
  }

  .top-actions {
    gap: 8px;
  }

  .icon-button,
  .contact-shortcut,
  .sign-out-button {
    min-height: 34px;
  }

  .contact-shortcut {
    width: 36px;
    justify-content: center;
    padding: 0;
  }

  .contact-shortcut span {
    display: none;
  }

  .stakeholder-card {
    width: 100%;
    align-items: start;
    justify-items: start;
    gap: 2px;
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .refresh-status.visible {
    flex: 1 1 auto;
  }

  .project-heading,
  .project-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-heading h2 {
    font-size: 25px;
  }

  .status-badge {
    width: 100%;
    text-align: left;
  }

  .summary-head,
  .section-header,
  .contact-card,
  .auth-card {
    padding: 16px;
  }

  .dashboard {
    gap: 18px;
    width: calc(100% - 16px);
    margin: 14px auto;
  }

  .summary-head {
    min-height: auto;
    gap: 14px;
  }

  .project-heading {
    gap: 9px;
    margin-bottom: 8px;
  }

  .project-code {
    min-width: 0;
    font-size: 11px;
  }

  .project-meta {
    gap: 6px;
    font-size: 13px;
  }

  .status-badge {
    min-width: 0;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 8px;
  }

  .summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
  }

  .metric-panel {
    min-height: 104px;
    padding: 12px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .metric-panel:first-child {
    border-left-width: 2px;
  }

  .metric-panel strong {
    font-size: 28px;
  }

  .metric-panel p {
    margin-bottom: 7px;
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .metric-panel > span {
    font-size: 11px;
    line-height: 1.35;
  }

  .metric-number {
    gap: 6px;
  }

  .metric-number svg {
    width: 18px;
    height: 18px;
  }

  .progress-ring {
    width: 74px;
    height: 74px;
    margin-top: 2px;
  }

  .progress-ring circle {
    stroke-width: 8;
  }

  .progress-ring strong {
    font-size: 21px;
  }

  .work-lanes {
    display: flex;
    grid-template-columns: none;
    min-height: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .work-lanes::after {
    flex: 0 0 1px;
    content: "";
  }

  .work-lane {
    flex: 0 0 min(78vw, 270px);
    gap: 14px;
    min-height: 0;
    padding: 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .work-lane:last-child {
    border-right: 0;
  }

  .work-lane-head {
    grid-template-columns: 28px 1fr;
    gap: 10px;
  }

  .work-lane-head i {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }

  .work-lane-head h3 {
    font-size: 15px;
  }

  .work-list {
    gap: 8px;
  }

  .work-list li {
    min-height: 54px;
    padding: 11px 12px;
  }

  .section-header {
    min-height: auto;
    gap: 8px;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .section-header p {
    font-size: 12px;
  }

  .task-filter-bar {
    gap: 7px;
    padding: 9px 12px;
  }

  .task-filter-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 11px;
  }

  .table-scroll {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: grid;
    gap: 8px;
    height: auto;
    padding: 14px;
    border-top: 1px solid var(--line-soft);
    border-left-width: 3px;
  }

  tbody tr.task-row:hover {
    transform: none;
  }

  tbody tr.empty-task-row {
    min-height: 92px;
    padding: 18px;
  }

  tbody tr.empty-task-row td {
    display: block;
    text-align: left !important;
  }

  tbody tr.empty-task-row td::before {
    display: none;
  }

  td {
    display: grid;
    grid-template-columns: minmax(72px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 0;
    font-size: 14px;
    text-align: left !important;
  }

  td::before {
    color: var(--muted);
    content: attr(data-label);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  td:first-child {
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 15px;
  }

  td:first-child::before {
    display: none;
  }

  .task-detail-grid {
    grid-template-columns: 1fr;
  }

  .activity-card {
    padding-bottom: 18px;
  }

  .section-header.compact {
    padding: 16px 16px 0;
  }

  .activity-list {
    gap: 14px;
    margin: 16px 16px 0;
  }

  .activity-list strong {
    font-size: 14px;
  }

  .contact-card {
    gap: 18px;
  }

  .contact-copy h2 {
    font-size: 24px;
  }

  .contact-copy p:last-child {
    font-size: 13px;
  }

  .contact-actions {
    gap: 8px;
  }

  .contact-method {
    grid-template-columns: 28px 1fr;
    gap: 4px 10px;
    min-height: 64px;
    padding: 13px;
  }

  .contact-method i {
    grid-row: span 2;
    align-self: center;
    font-size: 20px;
  }

  .contact-method span {
    font-size: 10px;
  }

  .contact-method strong {
    font-size: 13px;
  }

  .footer {
    min-height: 50px;
    padding: 12px 14px;
  }

  .footer p {
    font-size: 10px;
    line-height: 1.45;
  }
}
