@import url("../theme-palette.css?v=1");

:root {
  --text: var(--ink);
  --faint: color-mix(in srgb, var(--surface) 50%, var(--ink));
  --danger: #9a3412;
  --portal-sidebar-width: clamp(240px, 17vw, 264px);
  font-family: Archivo, "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--canvas);
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}
body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  color: var(--blue-dark);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 9px;
  background: var(--accent-solid);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
button:hover {
  border-color: var(--blue-dark);
  background: var(--accent-solid-hover);
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
}
input,
select {
  height: 36px;
  padding: 0 11px;
}
textarea {
  min-height: 92px;
  padding: 9px 11px;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--surface) 50%, var(--blue));
  outline: 2px solid var(--blue-pale);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.portal-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.portal-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.portal-sidebar-head {
  padding: 16px 14px 10px;
}
.brand {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand::after {
  color: var(--blue);
  content: ".";
}
.organization-switcher {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-top: 14px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.organization-switcher::after {
  margin-left: auto;
  color: var(--faint);
  content: "⌄";
  font-size: 13px;
}
.portal-nav {
  padding: 10px 8px;
}
.portal-nav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 1px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
}
.portal-nav a:hover {
  background: var(--hover);
  color: var(--text);
}
.portal-nav a[aria-current="page"] {
  background: var(--blue-pale);
}
.portal-sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line-soft);
}
.avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--blue-pale);
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
}
.account-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sign-out-form {
  margin-left: auto;
}
.sign-out-form button {
  min-height: auto;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
}
.sign-out-form button:hover {
  border: 0;
  background: transparent;
  color: var(--text);
}
.portal-main {
  display: grid;
  min-width: 0;
  grid-template-rows: 54px minmax(0, 1fr);
}
.portal-topbar {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.portal-crumb {
  overflow: hidden;
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-utility {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}
.portal-utility kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--faint);
  font-family: inherit;
  font-size: 11px;
}
.content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 30px 34px 70px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 0;
  font-size: 27px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 {
  margin-bottom: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.page-caption {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
}
.page-action {
  margin-left: auto;
}
.record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.record-list li {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.record-list li:hover {
  border-color: color-mix(in srgb, var(--surface) 85%, var(--ink));
}
.record-primary {
  min-width: 0;
  flex: 1 1 320px;
}
.record-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.record-title:hover {
  color: var(--blue);
}
.record-list p,
.record-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1f8f5f;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.status--archived {
  color: #8a5c26;
}
.project-list-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
.secondary-button:hover {
  border-color: color-mix(in srgb, var(--surface) 75%, var(--ink));
  background: var(--surface);
  color: var(--text);
}
.form-section,
.detail-card {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.form-section > p {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
}
form:not(.sign-out-form) {
  display: grid;
  max-width: 520px;
  gap: 14px;
}
form:not(.sign-out-form) button {
  width: fit-content;
}
label {
  display: grid;
  gap: 5px;
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-size: 13px;
  font-weight: 600;
}
small {
  color: var(--muted);
  font-size: 12.5px;
}
.error {
  margin: 14px 0;
  color: var(--danger);
  font-size: 13px;
}
.empty-state {
  margin: 20px 0 0;
  padding: 26px 18px;
  border: 1px dashed color-mix(in srgb, var(--surface) 80%, var(--ink));
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.delete-project {
  position: relative;
}
.delete-project summary {
  color: var(--faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  list-style: none;
}
.delete-project summary::-webkit-details-marker {
  display: none;
}
.project-delete-form {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 0;
  width: min(320px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--surface) 80%, var(--ink));
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 24, 33, 0.12);
}
.project-delete-form label {
  font-weight: 500;
}
.danger-button {
  border-color: var(--danger);
  background: var(--danger);
}
.danger-button:hover {
  border-color: #7c270d;
  background: #7c270d;
}
.pagination {
  display: flex;
  gap: 12px;
  margin: 20px 0 0;
  font-size: 13px;
  font-weight: 600;
}
.back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12.5px;
}
.project-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-wrap;
}
dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0 20px;
  margin: 0;
}
dt,
dd {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
dt {
  color: var(--muted);
  font-size: 13px;
}
dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.account-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}
.account-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(20, 24, 33, 0.05);
}
.account-card .brand {
  display: inline-block;
  margin-bottom: 26px;
}
.account-card h1 {
  margin-bottom: 8px;
}
.account-card > p:not(.error) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 720px) {
  .portal-shell {
    display: block;
  }
  .portal-sidebar {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .portal-sidebar-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
  }
  .organization-switcher {
    margin-top: 0;
  }
  .portal-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    padding: 0;
  }
  .portal-sidebar-foot,
  .portal-topbar {
    display: none;
  }
  .portal-main {
    display: block;
  }
  .content {
    padding: 24px 16px 48px;
  }
  .record-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .project-list-actions,
  .page-action {
    margin-left: 0;
  }
  dl {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }
  dd {
    padding-top: 2px;
  }
}

/* Dashboard v2 portal shell */
.portal-shell {
  grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
.portal-sidebar {
  position: relative;
  min-width: 0;
  overflow: visible;
}
.portal-sidebar-head {
  position: relative;
  padding: 15px 14px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-tag {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.organization-switcher {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 14px;
  width: 100%;
  height: auto;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 150ms ease;
}
.organization-switcher::after {
  content: none;
}
.organization-switcher:hover {
  border-color: color-mix(in srgb, var(--surface) 75%, var(--ink));
  background: var(--surface);
}
.organization-monogram {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border-radius: 7px;
  background: var(--text);
  color: #fff;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.organization-switcher > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.organization-switcher strong {
  overflow: hidden;
  font-size: 13px;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.organization-switcher small {
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 400;
  white-space: nowrap;
}
.switcher-chevron {
  justify-self: end;
  margin-left: 0;
  color: var(--faint);
  font-size: 11px;
}
.organization-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% - 4px);
  right: 8px;
  left: 8px;
  width: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(20, 24, 33, 0.14);
  animation: sheet-in 160ms ease-out both;
}
.organization-menu[hidden] {
  display: none;
}
.menu-label,
.nav-label,
.eyebrow {
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.menu-label {
  display: block;
  padding: 6px 9px 4px;
}
.organization-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--text);
}
.organization-menu a:hover {
  background: var(--hover);
}
.organization-menu a > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.organization-menu strong {
  font-size: 13px;
}
.organization-menu small {
  color: var(--faint);
  font-size: 11.5px;
}
.menu-monogram {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: var(--hover);
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9.5px;
  font-weight: 600;
}
.organization-menu .menu-utility {
  margin-top: 5px;
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 8px 8px;
  font-size: 12.5px;
}
.portal-nav {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 8px 14px;
}
.nav-label {
  display: block;
  padding: 0 10px 7px;
  color: color-mix(in srgb, var(--surface) 65%, var(--ink));
}
.nav-label--organization {
  margin-top: 14px;
}
.portal-nav a {
  position: relative;
  min-height: 31px;
  margin-bottom: 1px;
  padding: 6px 10px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-size: 13.5px;
  width: 100%;
  min-width: 0;
}
.portal-nav a span {
  flex: none;
  margin-left: auto;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.portal-nav a[aria-current="page"] {
  background: var(--blue-pale);
  color: var(--text);
}
.portal-nav a[aria-current="page"]::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--blue);
  content: "";
}
.portal-sidebar-foot {
  display: block;
  min-width: 0;
  padding: 0;
}
.account-row {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 11px 14px 14px;
}
.account-row .account-name {
  min-width: 0;
  flex: 1 1 auto;
}
.account-row .sign-out-form {
  flex: none;
}
.account-row .sign-out-form button {
  width: auto;
  padding: 2px 0;
  font-size: 11px;
  text-align: right;
}
.account-name {
  display: flex;
  flex-direction: column;
}
.account-name strong {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-name small {
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-main {
  height: 100vh;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.portal-topbar {
  gap: 12px;
}
.portal-search {
  display: flex;
  height: 32px;
  min-height: 32px;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  max-width: min(420px, 48vw);
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-search:hover {
  border-color: color-mix(in srgb, var(--surface) 75%, var(--ink));
  background: var(--surface);
  color: var(--muted);
}
.portal-search kbd {
  color: color-mix(in srgb, var(--surface) 75%, var(--ink));
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.content {
  width: 100%;
  max-width: 1460px;
  margin: 0;
  padding: 28px 30px 70px;
  overflow: auto;
  animation: page-in 220ms ease-out both;
}
.home-heading {
  align-items: flex-end;
}
.page-heading h1 {
  font-size: 26px;
  font-weight: 700;
}
.page-heading .page-caption {
  margin-top: 5px;
  font-size: 13.5px;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.stat-strip > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line-soft);
}
.stat-strip > div:last-child {
  border-right: 0;
}
.stat-strip span {
  display: block;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
}
.stat-strip strong {
  display: inline-block;
  margin-top: 8px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
  font-weight: 600;
}
.stat-strip small {
  margin-left: 7px;
  color: var(--faint);
  font-size: 11.5px;
}
.dashboard-section {
  margin-top: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
}
.section-heading h2 {
  font-size: 13.5px;
  font-weight: 700;
}
.section-heading span {
  margin-left: auto;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
}
.record-list {
  gap: 0;
  margin-top: 0;
}
.record-list li {
  min-height: 68px;
  gap: 14px;
  padding: 13px 8px 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  transition: background 130ms ease, transform 180ms ease;
}
.record-list li:hover {
  border-color: var(--line-soft);
  background: var(--surface);
  transform: translateX(2px);
}
.record-list li:nth-child(1) {
  animation: row-in 240ms 40ms ease-out both;
}
.record-list li:nth-child(2) {
  animation: row-in 240ms 80ms ease-out both;
}
.record-list li:nth-child(3) {
  animation: row-in 240ms 120ms ease-out both;
}
.record-list li:nth-child(4) {
  animation: row-in 240ms 160ms ease-out both;
}
.record-monogram {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 8px;
  background: var(--hover);
  color: var(--blue);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
}
.record-title {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}
.record-list p {
  margin-top: 4px;
  font-size: 12px;
}
.technical-badge {
  padding: 2px 5px;
  border: 1px solid var(--blue-pale);
  border-radius: 5px;
  color: var(--blue);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.row-action {
  min-width: 96px;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #1f8f5f;
}
.status-dot--muted {
  background: color-mix(in srgb, var(--surface) 80%, var(--ink));
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
}
.project-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.project-filters .filter-row {
  min-width: 0;
  flex: 1 1 auto;
  margin-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
  flex-wrap: wrap;
}
.project-search {
  width: 170px;
  flex: none;
}
.project-search input {
  height: 30px;
  font-size: 12.5px;
}
.project-table-scroll {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.project-table {
  min-width: 900px;
}
.project-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.6fr) 90px 78px 82px 102px 112px 46px;
  gap: 10px;
  align-items: center;
}
.project-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.project-dashboard-row {
  min-height: 72px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 130ms ease;
}
.project-dashboard-row:last-child {
  border-bottom: 0;
}
.project-dashboard-row:hover {
  background: var(--surface);
}
.project-cell--identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.project-cell--identity:hover {
  color: var(--text);
}
.project-cell--identity > span:last-child,
.metric-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.project-cell--identity strong {
  overflow: hidden;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-cell--identity small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-cell strong {
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
}
.metric-cell small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-cell--attention strong {
  color: #a6681a;
}
.project-row-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-row-actions .row-action {
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.filter-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  font-size: 12px;
}
.filter-chip:hover,
.filter-chip.is-active {
  border-color: color-mix(in srgb, var(--surface) 85%, var(--ink));
  background: var(--blue-pale);
  color: var(--blue);
}
.filter-chip:disabled {
  border-color: var(--line);
  background: var(--surface);
  color: var(--faint);
  cursor: not-allowed;
  opacity: 0.58;
}
.filter-chip span {
  margin-left: 5px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}
.project-list-actions {
  gap: 22px;
}
.status {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status::before {
  display: none;
}
.portal-dialog {
  width: min(500px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  box-shadow: 0 22px 60px rgba(20, 24, 33, 0.2);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.portal-dialog--wide {
  width: min(620px, calc(100vw - 32px));
}
.portal-dialog::backdrop {
  background: rgba(20, 24, 33, 0.32);
  backdrop-filter: blur(2px);
  animation: veil-in 150ms ease-out both;
}
.portal-dialog[open] {
  animation: sheet-in 180ms ease-out both;
}
.portal-dialog form {
  max-width: none;
  padding: 24px;
}
.portal-dialog form > p {
  margin: -2px 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 8px;
}
.dialog-head h2 {
  margin-top: 5px;
  font-size: 19px;
}
.dialog-close {
  width: 32px;
  min-height: 32px;
  margin-left: auto;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 21px;
  font-weight: 400;
}
.dialog-close:hover {
  background: var(--hover);
  color: var(--text);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.search-veil {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: start center;
  padding-top: min(18vh, 160px);
  background: rgba(20, 24, 33, 0.3);
  opacity: 0;
  transition: opacity 140ms ease;
}
.search-veil[hidden] {
  display: none;
}
.search-veil.is-open {
  opacity: 1;
}
.search-sheet {
  width: min(600px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(20, 24, 33, 0.22);
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease-out;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.search-veil.is-open .search-sheet {
  transform: none;
}
.search-sheet label {
  margin-bottom: 8px;
  font-size: 13px;
}
.search-sheet p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 12px;
}
.toast {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #141821;
  color: #fff;
  font-size: 12.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible {
  opacity: 1;
  transform: none;
}
.mobile-menu {
  display: none;
}
.toolbar-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
  flex-wrap: wrap;
}
.toolbar-search {
  width: min(360px, 100%);
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.toolbar-search input {
  margin-top: 6px;
  font-family: Archivo, sans-serif;
  letter-spacing: 0;
}
.toolbar-row > button {
  margin-left: auto;
}
.operational-empty {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 28px;
  text-align: center;
}
.operational-empty h2 {
  margin-top: 16px;
  font-size: 18px;
}
.operational-empty p {
  max-width: 480px;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.empty-signal {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--surface) 85%, var(--ink));
  border-radius: 50%;
}
.empty-signal::before,
.empty-signal::after {
  position: absolute;
  content: "";
}
.empty-signal::before {
  top: 50%;
  right: -16px;
  left: -16px;
  border-top: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
}
.empty-signal::after {
  top: 12px;
  right: 12px;
  bottom: 12px;
  left: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--blue-pale);
}
.tab-row {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  overflow-x: auto;
  border-bottom: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
}
.tab-row button {
  position: relative;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.tab-row button:hover {
  border: 0;
  background: transparent;
  color: var(--text);
}
.tab-row button.is-active {
  color: var(--text);
}
.tab-row button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.tab-row button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
}
.detail-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.detail-banner h2 {
  margin-top: 4px;
  font-size: 17px;
}
.detail-banner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.detail-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
  border-radius: 50%;
  background: var(--surface);
  color: #a6681a;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.detail-icon--neutral {
  border-color: var(--blue-pale);
  background: var(--blue-pale);
  color: var(--blue);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
  gap: 24px;
  margin-top: 24px;
}
.record-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.record-panel dl {
  grid-template-columns: 110px minmax(0, 1fr);
  margin-top: 10px;
}
.record-panel dt,
.record-panel dd {
  padding: 10px 0;
  font-size: 12px;
}
.lined-empty {
  min-height: 180px;
  padding: 38px 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}
.pipeline-placeholder {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 4px;
}
.pipeline-placeholder span {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid color-mix(in srgb, var(--surface) 80%, var(--ink));
  border-radius: 50%;
}
.pipeline-placeholder span:not(:last-child)::after {
  position: absolute;
  top: 12px;
  left: 3px;
  width: 2px;
  height: 20px;
  background: color-mix(in srgb, var(--surface) 90%, var(--ink));
  content: "";
}
.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 640px);
  gap: 28px;
  margin-top: 24px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.settings-nav button {
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--surface) 20%, var(--ink));
  text-align: left;
}
.settings-nav button:hover,
.settings-nav button.is-active {
  border: 0;
  background: var(--blue-pale);
  color: var(--text);
}
.settings-nav button:disabled {
  background: transparent;
  color: var(--faint);
  cursor: not-allowed;
  opacity: 0.58;
}
.settings-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.settings-panel h2 {
  margin-top: 6px;
}
.settings-panel > p {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13px;
}
.settings-panel label {
  margin-top: 14px;
}
.data-table {
  margin-top: 18px;
  overflow-x: auto;
  border-top: 1px solid color-mix(in srgb, var(--surface) 90%, var(--ink));
}
.data-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 160px minmax(180px, 1fr) 130px;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  min-width: 760px;
}
.data-head {
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.member-row {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.member-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.member-identity > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.member-identity strong,
.member-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-identity strong {
  color: var(--text);
  font-size: 13px;
}
.member-identity small {
  color: var(--faint);
  font-size: 11.5px;
}
.success-banner {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--surface) 80%, var(--ink));
  border-radius: 8px;
  background: var(--hover);
  color: #176244;
  font-size: 12.5px;
}
.team-summary {
  margin-bottom: 26px;
}
.team-toolbar {
  justify-content: space-between;
}
.team-role-filter {
  display: flex;
  min-width: 150px;
  flex-direction: column;
  gap: 5px;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.team-role-filter select {
  min-height: 38px;
  padding: 0 32px 0 11px;
  font-family: "Archivo", sans-serif;
  font-size: 12.5px;
  letter-spacing: normal;
  text-transform: none;
}
.team-section {
  margin-top: 28px;
}
.team-roster,
.invitation-list {
  border-top: 1px solid var(--line);
}
.team-member,
.invitation-row {
  display: grid;
  min-height: 74px;
  gap: 18px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.team-member {
  grid-template-columns: minmax(220px, 1.25fr) minmax(190px, 1fr) 120px 84px;
}
.member-access,
.member-joined,
.invitation-address,
.invitation-role,
.invitation-expiry {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.member-access strong,
.member-joined strong,
.invitation-address strong,
.invitation-role strong,
.invitation-expiry strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-access small,
.member-joined small,
.invitation-address small,
.invitation-role small,
.invitation-expiry small {
  color: var(--faint);
  font-size: 11px;
}
.member-actions {
  position: relative;
  justify-self: end;
}
.protected-owner {
  justify-self: end;
  color: var(--faint);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.member-actions summary {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11.5px;
  list-style: none;
}
.member-actions summary::-webkit-details-marker {
  display: none;
}
.member-action-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  width: 252px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(20, 24, 33, 0.16);
}
.member-action-menu form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.member-action-menu form + form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.member-action-menu label {
  margin: 0;
}
.danger-link {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a52a2a;
  font-size: 12px;
  text-align: left;
}
.danger-link:hover {
  border: 0;
  background: transparent;
  color: #7f1d1d;
}
.invitation-section {
  margin-top: 42px;
}
.invitation-row {
  grid-template-columns: minmax(220px, 1.3fr) 88px 100px 110px minmax(140px, auto);
}
.invitation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.invitation-actions form {
  margin: 0;
}
.technical-badge--failed,
.technical-badge--expired {
  border-color: color-mix(in srgb, var(--surface) 80%, var(--ink));
  background: var(--status-amber-soft);
  color: #9a5b0d;
}
.technical-badge--sent {
  border-color: color-mix(in srgb, var(--surface) 75%, var(--ink));
  background: var(--hover);
  color: #18704a;
}
.role-warning {
  margin: 2px 0 8px;
  padding: 10px 12px;
  border-left: 3px solid #d39b3a;
  background: var(--status-amber-soft);
  color: #72501d;
  font-size: 11.5px;
  line-height: 1.5;
}
.invitation-card {
  width: min(620px, 100%);
  margin: 8vh auto 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgba(20, 24, 33, 0.08);
}
.invitation-card h1 {
  margin: 8px 0 10px;
}
.invitation-card > p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
}
.invitation-card dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin: 26px 0;
  padding: 18px 0;
  border-block: 1px solid var(--line-soft);
}
.invitation-card dt {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
}
.invitation-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.invitation-card form {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connected-summary {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}
.connected-summary strong {
  margin-right: 4px;
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}
.dashboard-rows {
  display: flex;
  flex-direction: column;
}
.dashboard-row {
  display: grid;
  min-height: 68px;
  grid-template-columns: 3px minmax(240px, 1fr) minmax(210px, 0.65fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 13px 8px 13px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  transition: background 130ms ease, transform 180ms ease;
}
.dashboard-row:hover {
  background: var(--surface);
  color: var(--text);
  transform: translateX(2px);
}
.row-marker {
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: var(--blue);
}
.row-marker--amber {
  background: #a6681a;
}
.row-main,
.change-breakdown,
.controller-identity > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.row-main strong,
.controller-identity strong {
  overflow: hidden;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-main small,
.change-breakdown small,
.controller-identity small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11.5px;
}
.change-breakdown {
  color: var(--muted);
  font-size: 12px;
}
.change-breakdown b {
  margin-right: 3px;
  color: #a6681a;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}
.technical-badge--muted {
  border-color: var(--line);
  color: var(--faint);
}
.operational-empty--compact {
  min-height: 240px;
}
.controller-table .data-row {
  grid-template-columns: minmax(210px, 1fr) minmax(170px, 0.75fr) 130px 100px 44px;
}
.controller-row {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  transition: background 130ms ease;
}
.controller-row:hover {
  background: var(--surface);
  color: var(--muted);
}
.controller-row .row-action {
  min-width: 0;
  text-align: right;
}
.controller-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.controller-identity strong {
  color: var(--text);
}
.scope-note {
  margin-top: 12px;
  color: var(--faint);
  font-size: 11.5px;
}
.site-table .data-row {
  grid-template-columns: minmax(210px, 1.35fr) 104px 90px 110px minmax(140px, 0.8fr) 100px 44px;
  min-width: 930px;
}
.site-row {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  transition: background 130ms ease, transform 180ms ease;
}
.site-row:hover {
  background: var(--surface);
  color: var(--muted);
  transform: translateX(2px);
}
.site-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.site-identity > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.site-identity strong,
.site-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-identity strong {
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
}
.site-identity small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}
.site-detail-banner .detail-icon {
  color: #17835f;
  font-size: 12px;
}
.site-detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
}
.site-assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.site-assignment label {
  margin: 0;
}
.site-assignment button {
  min-width: 88px;
}
.site-project-list {
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.site-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--line-soft);
}
.site-project-row > a {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 16px;
  align-items: center;
  padding: 13px 4px;
  color: var(--text);
}
.site-project-row > a:hover strong {
  color: var(--blue);
}
.site-project-row > a > span:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.site-project-row strong,
.site-project-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-project-row strong {
  font-size: 13px;
}
.site-project-row small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11.5px;
}
.quiet-button {
  min-height: 36px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.quiet-button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
.site-record-panel > form {
  margin-top: 12px;
}
.site-record-panel label {
  margin-top: 12px;
}
.site-record-panel dl {
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.site-owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.site-owner-actions form,
.site-owner-actions .secondary-button {
  width: 100%;
}
.delete-site {
  width: 100%;
}
.delete-site summary {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--surface) 85%, var(--ink));
  border-radius: 7px;
  color: #a12c2c;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}
.delete-site form {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--surface) 85%, var(--ink));
  border-radius: 8px;
  background: var(--surface);
}
.delete-site label {
  margin: 0 0 10px;
}
@media (max-width: 760px) {
  .detail-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .data-row {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
  .dashboard-row {
    grid-template-columns: 3px minmax(0, 1fr) auto;
  }
  .change-breakdown {
    display: none;
  }
  .controller-table .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .controller-table .data-row > span:nth-child(2),
  .controller-table .data-row > span:nth-child(4) {
    display: none;
  }
  .site-detail-grid {
    grid-template-columns: 1fr;
  }
  .site-assignment {
    grid-template-columns: 1fr;
  }
  .site-assignment button {
    width: 100%;
  }
  .site-project-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-project-row > a {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-project-row .metric-cell {
    display: none;
  }
  .site-table .data-row {
    grid-template-columns: minmax(0, 1fr) auto 44px;
    min-width: 0;
  }
  .site-table .data-row > span:nth-child(3),
  .site-table .data-row > span:nth-child(4),
  .site-table .data-row > span:nth-child(5),
  .site-table .data-row > span:nth-child(6) {
    display: none;
  }
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes veil-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 900px) {
  .portal-shell {
    display: grid;
    grid-template-columns: 1fr;
  }
  .portal-sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: min(var(--portal-sidebar-width), calc(100vw - 48px));
    min-height: 100vh;
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform 200ms ease-out;
  }
  .portal-sidebar-head {
    display: block;
    padding: 15px 14px 12px;
  }
  .portal-nav {
    display: block;
    margin-left: 0;
    padding: 12px 8px 14px;
  }
  .portal-sidebar-foot {
    display: block;
  }
  .nav-open .portal-sidebar {
    transform: none;
  }
  .nav-open::after {
    position: fixed;
    z-index: 50;
    inset: 0;
    background: rgba(20, 24, 33, 0.34);
    content: "";
    animation: veil-in 150ms ease-out both;
  }
  .portal-main {
    grid-template-rows: 54px minmax(0, 1fr);
  }
  .portal-topbar {
    display: flex;
  }
  .mobile-menu {
    display: inline-flex;
    min-height: 32px;
    padding: 0 10px;
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
  }
  .portal-search {
    font-size: 0;
  }
  .portal-search::before {
    content: "Search";
    font-size: 12.5px;
  }
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .content {
    padding: 24px 20px 56px;
  }
}
@media (max-width: 600px) {
  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-strip > div {
    border-bottom: 1px solid var(--line-soft);
  }
  .stat-strip > div:nth-child(2n) {
    border-right: 0;
  }
  .filter-row {
    overflow-x: auto;
  }
  .project-filters {
    align-items: stretch;
    flex-direction: column;
  }
  .project-search {
    width: 100%;
  }
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .page-actions,
  .page-action {
    width: 100%;
    margin-left: 0;
  }
  .page-actions > button,
  .page-action {
    flex: 1 1 auto;
  }
  .record-list li {
    align-items: flex-start;
    flex-direction: row;
  }
  .technical-badge,
  .status {
    display: none;
  }
  .site-table .technical-badge {
    display: inline-block;
  }
  .row-action {
    min-width: 0;
  }
  .project-list-actions {
    margin-left: 0;
  }
  .team-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .team-role-filter {
    width: 100%;
  }
  .team-member,
  .invitation-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .member-access,
  .member-joined,
  .invitation-role,
  .invitation-expiry {
    grid-column: 1;
  }
  .member-actions,
  .protected-owner,
  .invitation-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .invitation-row .technical-badge {
    display: inline-block;
    grid-column: 1;
  }
  .member-action-menu {
    position: fixed;
    z-index: 80;
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
    top: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
