:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --ink: #17211f;
  --muted: #52605c;
  --line: #d8e1de;
  --green: #2f6f5d;
  --green-2: #e7f3ed;
  --blue: #2d6cdf;
  --blue-2: #dce9ff;
  --amber: #b7791f;
  --amber-2: #f7dfbd;
  --red: #c0392b;
  --red-2: #f5d6d4;
  --violet: #8057b8;
  --violet-2: #eadcf7;
  --shadow: 0 18px 45px rgba(30, 42, 39, 0.08);
  font-family: "Kanit", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.auth-locked {
  overflow: hidden;
}

.auth-locked .app-shell {
  display: none;
}

.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(54, 98, 85, 0.12), transparent 34%),
    linear-gradient(180deg, #f9fbfa 0%, #f1f5f3 100%);
}

.gate-panel {
  width: min(480px, 100%);
  padding: 26px;
}

.gate-brand {
  margin-bottom: 24px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  min-width: 0;
}

.sidebar {
  background: #fbfcfb;
  background-image: linear-gradient(180deg, #ffffff 0%, #f5f8f7 100%);
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  background: #ba0020;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border-radius: 8px;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.section-head h3,
.section-head p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.brand p {
  color: #64716d;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.nav {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #33403c;
  padding: 10px 11px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: #ba0020;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.nav-item.active,
.nav-item:hover {
  background: #edf3f1;
  color: #8d0018;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 #ba0020;
}

.nav-item:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(53, 94, 82, 0.26);
  outline-offset: 2px;
}

.nav-item:focus:not(:focus-visible),
.button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: 0;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background: #fff;
  color: #52605c;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  background: #ba0020;
  border-color: #ba0020;
  color: #fff;
}

.account-subnav,
.devops-subnav {
  display: grid;
  gap: 6px;
  margin: -2px 0 6px 38px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--line);
}

.account-subnav[hidden],
.devops-subnav[hidden] {
  display: none;
}

.account-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #5b6763;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.account-subitem:hover,
.account-subitem.active {
  background: #fff;
  color: #ba0020;
}

.subnav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ba0020;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.account-logout {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  color: #8a1f16;
}

.panel-label,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.main {
  padding: 26px;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1.2;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, 38vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  box-shadow: 0 8px 24px rgba(30, 42, 39, 0.04);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 0;
  background: transparent;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.button.primary {
  color: #fff;
  background: #ba0020;
  border-color: #ba0020;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #9f001b;
  border-color: #9f001b;
}

.button.success-button,
.button.action-button {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.button.success-button:hover,
.button.success-button:focus-visible,
.button.action-button:hover,
.button.action-button:focus-visible {
  background: #245d4c;
  border-color: #245d4c;
}

.button.external-button {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button.external-button:hover,
.button.external-button:focus-visible {
  background: #2458b8;
  border-color: #2458b8;
}

.button.utility-button {
  color: #33403c;
  background: #f7faf9;
}

.button.warning-button {
  color: #7a4b08;
  background: #fffaf1;
  border-color: #e8d4ae;
}

.button.warning-button:hover,
.button.warning-button:focus-visible {
  background: #f7dfbd;
  border-color: #b7791f;
}

.button.ghost {
  color: #33403c;
  background: var(--surface);
  border-color: var(--line);
}

.button.ghost:hover,
.button.ghost:focus-visible {
  background: #f6f9f8;
  border-color: #bfcac6;
  color: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.overview-brief {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 14px;
  margin-bottom: 18px;
}

.overview-brief label,
.overview-brief article {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.overview-brief label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.overview-brief span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.overview-brief strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

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

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.metric-card {
  padding: 18px;
  text-align: left;
}

.metric-card span {
  color: var(--muted);
  font-weight: 600;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.overview-link-card {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.overview-link-card:hover,
.overview-link-card:focus-visible {
  border-color: #b7c6c1;
  box-shadow: 0 14px 28px rgba(30, 42, 39, 0.08);
  transform: translateY(-1px);
}

.dashboard-grid,
.split-grid,
.matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.criteria-stack {
  display: grid;
  gap: 18px;
}

#matrixView .matrix-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#matrixView .matrix-panel {
  order: 1;
}

#matrixView .matrix-detail-panel {
  order: 2;
}

#matrixView #matrixList {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel.wide {
  min-height: 290px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h3 {
  font-size: 20px;
  line-height: 1.3;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.bars,
.action-list,
.compact-list,
.info-card-list,
.alert-list {
  display: grid;
  gap: 12px;
}

.alert-panel {
  grid-column: 1 / -1;
  min-height: 0;
}

.alert-list {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.alert-card,
.alert-empty {
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  text-align: left;
}

.alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 16px;
  min-height: 116px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.alert-card:hover {
  border-color: #b7c6c1;
  box-shadow: 0 12px 24px rgba(30, 42, 39, 0.08);
  transform: translateY(-1px);
}

.alert-card p,
.alert-empty p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.alert-card strong,
.alert-empty strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.alert-content {
  min-width: 0;
  grid-column: 1 / -1;
}

.alert-severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 74px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.alert-card.overdue,
.alert-card.critical {
  border-color: #e6b5b0;
}

.alert-card.urgent {
  border-color: #e4c083;
}

.alert-card.notice {
  border-color: #c8d6e8;
}

.alert-card.overdue .alert-severity,
.alert-severity.overdue,
.expiry-pill.overdue {
  background: var(--red-2);
  color: #8a1f16;
}

.alert-card.critical .alert-severity,
.alert-severity.critical,
.expiry-pill.critical {
  background: #ffe1d6;
  color: #9a3412;
}

.alert-card.urgent .alert-severity,
.alert-severity.urgent,
.expiry-pill.urgent {
  background: var(--amber-2);
  color: #7a4b08;
}

.alert-card.notice .alert-severity,
.alert-severity.notice,
.expiry-pill.notice {
  background: var(--blue-2);
  color: #224d9a;
}

.expiry-pill.normal,
.muted-pill {
  background: var(--surface-soft);
  color: var(--muted);
}

.alert-days {
  justify-self: end;
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .alert-list {
    grid-template-columns: 1fr;
  }

  .alert-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .alert-days {
    justify-self: end;
    text-align: right;
  }
}

.alert-detail-hero {
  align-items: center;
}

.bar-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 12px;
}

.bar-track {
  height: 12px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2f6f5d, #7aa497);
}

.donut-wrap {
  display: grid;
  gap: 14px;
}

.overview-watch-card,
.overview-action-card,
.activity-summary-card {
  display: grid;
  gap: 8px;
}

.overview-action-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  text-align: left;
}

.overview-card-link {
  width: fit-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: 0;
  text-align: left;
}

.overview-card-link:hover,
.overview-card-link:focus-visible {
  color: #8d0018;
  text-decoration: underline;
}

.activity-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.donut {
  width: 190px;
  height: 190px;
  margin: 8px auto 4px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 50%, var(--blue) 50% 72%, var(--amber) 72% 86%, var(--violet) 86% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  background: var(--surface);
  border-radius: 50%;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend span,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  background: var(--surface-soft);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.item-card.alert-focus-card,
.task-row.alert-focus-card {
  position: relative;
  border-color: #e6b5b0;
  background: #fff8f7;
  box-shadow: 0 0 0 3px rgba(186, 0, 32, 0.08), 0 14px 30px rgba(105, 37, 37, 0.08);
}

.item-card.alert-focus-card::before,
.task-row.alert-focus-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: var(--red);
}

.item-card strong,
.item-card a {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.item-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.renewal-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.evidence-pill {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  max-width: 260px;
  overflow: hidden;
  background: #edf3f1;
}

.evidence-pill span,
.evidence-link span {
  color: #52605c;
  font-weight: 600;
}

.evidence-pill strong,
.evidence-link strong {
  min-width: 0;
  overflow: hidden;
  color: var(--green);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewed-pill {
  background: var(--green-2);
  color: var(--green);
}

.evidence-link {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  max-width: 280px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #edf3f1;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-link:hover,
.evidence-link:focus-visible {
  background: var(--green-2);
  text-decoration: underline;
}

.renewal-history-link {
  border: 1px solid #cfdad6;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #2d4f47;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.renewal-history-link:hover,
.renewal-history-link:focus-visible {
  border-color: var(--green);
  background: #eef6f3;
}

.renewal-history-body {
  display: grid;
  gap: 14px;
}

.renewal-history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.renewal-timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.renewal-timeline-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.renewal-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.renewal-timeline-head strong {
  color: var(--ink);
}

.renewal-timeline-head span,
.renewal-timeline-grid span,
.renewal-timeline-item p {
  color: var(--muted);
  font-weight: 600;
}

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

.renewal-timeline-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.renewal-timeline-grid strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.renewal-timeline-item p {
  margin: 0;
  line-height: 1.55;
}

.renewal-timeline-actions {
  display: flex;
  justify-content: flex-end;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-toolbar .filter-group select,
.table-toolbar .filter-group input {
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  font-size: 15px;
  line-height: 1.25;
}

#projectsView .table-toolbar {
  align-items: flex-end;
}

#projectsView .filter-group {
  max-width: 720px;
}

#projectsView .filter-group select {
  min-width: 150px;
}

.activity-filters {
  width: 100%;
}

.activity-filters select,
.activity-filters input {
  min-width: 170px;
}

.activity-filters input {
  flex: 1;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  line-height: 1.35;
}

.link-button {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #225b73;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--green);
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.count-label {
  color: var(--muted);
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th {
  position: sticky;
  top: 0;
  background: #2f3f3a;
  color: #fff;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

td {
  font-size: 15px;
}

#projectsView table {
  table-layout: fixed;
}

#projectsView th:nth-child(1),
#projectsView td:nth-child(1) {
  width: 120px;
}

#projectsView th:nth-child(2),
#projectsView td:nth-child(2) {
  width: 430px;
}

#projectsView th:nth-child(3),
#projectsView td:nth-child(3) {
  width: 92px;
}

#projectsView th:nth-child(4),
#projectsView td:nth-child(4) {
  width: 150px;
}

#projectsView th:nth-child(5),
#projectsView td:nth-child(5) {
  width: 260px;
}

#projectsView th:nth-child(6),
#projectsView td:nth-child(6),
#projectsView th:nth-child(7),
#projectsView td:nth-child(7) {
  width: 150px;
}

#projectsView th:nth-child(8),
#projectsView td:nth-child(8),
#projectsView th:nth-child(9),
#projectsView td:nth-child(9) {
  width: 150px;
}

#projectsView th:nth-child(10),
#projectsView td:nth-child(10),
#projectsView th:nth-child(11),
#projectsView td:nth-child(11),
#projectsView th:nth-child(12),
#projectsView td:nth-child(12) {
  width: 92px;
}

#projectsView th:nth-child(13),
#projectsView td:nth-child(13) {
  width: 300px;
}

.project-cell {
  max-width: 430px;
}

.project-cell-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-detail-button {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.compact-edit,
.compact-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 78px;
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}

.renewal-button {
  min-width: 148px;
  background: var(--green-2);
  border-color: #c7ddd4;
  color: #245d4c;
}

.renewal-button:hover,
.renewal-button:focus-visible {
  background: #d9ece4;
  border-color: var(--green);
}

.edit-button {
  color: #33403c;
  border-color: #cfdad6;
}

.edit-button:hover,
.edit-button:focus-visible {
  background: #edf3f1;
  border-color: #aebfba;
}

.delete-button {
  color: #ba0020;
  border-color: #efc9cf;
  background: #fff8f9;
}

.delete-button:hover,
.delete-button:focus-visible {
  background: #fbeaec;
  border-color: #ba0020;
}

tbody tr:hover {
  background: #f8fbfa;
}

.status-active {
  background: #dff3e7;
  color: #17643a;
}

.status-deactive {
  background: #eeeeee;
  color: #626b68;
}

.sla-xs {
  background: #e9edf1;
}

.sla-s {
  background: #edf3f1;
}

.sla-m {
  background: var(--blue-2);
}

.sla-l {
  background: var(--amber-2);
}

.owner-tong {
  background: #cfe5fa;
  color: #1b5c9f;
}

.owner-oil {
  background: #e7f3ed;
  color: #17643a;
}

.owner-toey {
  background: var(--violet-2);
  color: var(--violet);
}

.maintenance-board {
  display: grid;
  gap: 12px;
}

.maintenance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.maintenance-summary article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.maintenance-summary span {
  color: var(--muted);
  font-weight: 600;
}

.maintenance-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.2;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.45fr) minmax(170px, 0.6fr) 130px 110px;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-row.done {
  background: #edf6ea;
}

.task-row strong {
  display: block;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.task-row span {
  color: var(--muted);
  display: block;
  margin-top: 3px;
  line-height: 1.65;
}

.check-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 92px;
  border: 1px solid #c7ddd4;
  background: #f7faf9;
  color: #245d4c;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
}

.check-button.done {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.check-button:hover:not(:disabled):not(.disabled),
.check-button:focus-visible:not(:disabled):not(.disabled) {
  background: var(--green-2);
  border-color: var(--green);
}

.check-button:disabled,
.check-button.disabled {
  cursor: not-allowed;
  opacity: 0.58;
  background: #f3f5f4;
  color: var(--muted);
}

.maintenance-evidence {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  border: 1px solid #d4e3dc;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfc;
}

.maintenance-evidence strong {
  color: var(--ink);
  font-size: 14px;
}

.maintenance-evidence span {
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.45;
}

.maintenance-evidence p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.maintenance-evidence-file {
  display: grid;
  gap: 2px;
  min-width: 220px;
  max-width: 320px;
  border: 1px solid #c7ddd4;
  border-radius: 8px;
  padding: 8px 10px;
  background: #eef6f3;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.maintenance-evidence-file span {
  color: #52605c;
  font-size: 12px;
  font-weight: 600;
}

.maintenance-evidence-file strong {
  overflow: hidden;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-evidence-file:hover,
.maintenance-evidence-file:focus-visible {
  border-color: var(--green);
  background: var(--green-2);
}

.info-card-list .item-card {
  display: grid;
  gap: 8px;
}

.tools-list {
  display: grid;
  gap: 12px;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  overflow: hidden;
}

.tool-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.tool-title {
  min-width: 0;
}

.tool-title a {
  display: block;
  margin-top: 4px;
  color: #315d55;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tool-title strong {
  display: block;
}

.tool-credentials {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr) minmax(180px, 0.9fr);
  gap: 10px;
  min-width: 0;
}

.tool-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.compact-tool-field {
  min-height: 64px;
}

.tool-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.tool-field strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
  white-space: pre-wrap;
}

.secret-field {
  background: #fbf7f7;
}

.secret-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.tool-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.tool-meta.compact-tool-field {
  min-height: 64px;
}

.tool-meta span {
  overflow-wrap: anywhere;
}

.tool-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.effort-list {
  display: grid;
  gap: 14px;
}

.effort-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.effort-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fbfcfb;
  border-bottom: 1px solid var(--line);
}

.effort-group-head h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.effort-group-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.effort-task-list {
  display: grid;
}

.effort-task-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.15fr);
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.effort-task-card:last-child {
  border-bottom: 0;
}

.effort-task-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.effort-frequency {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.effort-pill {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.effort-pill b {
  color: #355e52;
  font-size: 13px;
}

.effort-pill.empty {
  background: #f5f6f6;
  border-color: var(--line);
  color: #9aa3a0;
}

.effort-pill.empty b {
  color: #7e8784;
}

.sla-summary-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sla-summary-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sla-summary-card strong {
  color: var(--ink);
  font-size: 16px;
}

.sla-summary-card span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3f1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sla-summary-card p,
.sla-summary-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-plot {
  position: relative;
  min-width: 1080px;
  height: 700px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: visible;
}

.matrix-panel {
  overflow-x: auto;
}

.matrix-panel .section-head {
  min-width: 1080px;
}

.matrix-summary-section {
  min-width: 1080px;
  margin-top: 18px;
}

.matrix-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.matrix-summary-card {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.matrix-summary-card.core {
  border-color: #d6b884;
  background: #fffaf1;
}

.matrix-summary-card.support {
  border-color: #bfd8cd;
  background: #f4faf7;
}

.matrix-summary-card.specialist {
  border-color: #c8d6e8;
  background: #f5f8fd;
}

.matrix-summary-card.low {
  background: #f8faf9;
}

.matrix-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.matrix-summary-head strong,
.matrix-summary-project strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.matrix-summary-head span,
.matrix-summary-card p,
.matrix-summary-project span {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}

.matrix-summary-card p {
  margin: 0;
  font-size: 14px;
  max-width: 68ch;
}

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

.matrix-summary-project {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.matrix-summary-project span:not(.matrix-summary-project-top) {
  font-size: 13px;
}

.matrix-summary-project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.matrix-summary-project:hover,
.matrix-summary-project:focus-visible {
  border-color: var(--green);
  background: #eef6f3;
}

.axis-label {
  position: absolute;
  z-index: 2;
  color: #26312e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  background: #ffffff;
  padding: 2px 6px;
}

.axis-top {
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
}

.axis-bottom {
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}

.axis-left {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.axis-right {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.matrix-axis {
  position: absolute;
  z-index: 1;
  background: #101817;
}

.axis-horizontal {
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
}

.axis-vertical {
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 2px;
}

.quadrant-note {
  position: absolute;
  z-index: 3;
  width: 260px;
  min-height: 54px;
  margin: 0;
  border: 1px solid #cbd6d2;
  background: #ffffff;
  color: #17211f;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.note-top-left {
  left: 14px;
  top: 12px;
}

.note-top-right {
  right: 14px;
  top: 12px;
}

.note-bottom-left {
  left: 14px;
  bottom: 12px;
}

.note-bottom-right {
  right: 14px;
  bottom: 12px;
}

.matrix-point {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, 50%);
  border: 1px solid #c7ddd4;
  border-radius: 0;
  padding: 10px 12px;
  background: #eef6f3;
  color: #17211f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  box-shadow: none;
  cursor: pointer;
  width: 150px;
  min-height: 46px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matrix-point:hover,
.matrix-point:focus-visible {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  outline: 2px solid rgba(47, 111, 93, 0.22);
  outline-offset: 2px;
}

.matrix-point.deactive {
  background: #eeeeee;
  border-color: #b9c0bd;
  color: #5f6865;
}

.matrix-point.deactive:hover,
.matrix-point.deactive:focus-visible {
  background: #777f7c;
  border-color: #777f7c;
  color: #fff;
  outline-color: rgba(95, 104, 101, 0.26);
}

.dialog {
  width: min(720px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.project-edit-dialog {
  width: min(1040px, calc(100vw - 44px));
}

.detail-dialog {
  width: min(980px, calc(100vw - 28px));
}

.table-wrap.embedded {
  box-shadow: none;
}

.framework-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 10px;
}

.framework-grid strong,
.framework-grid article {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  line-height: 1.65;
}

.framework-grid strong {
  display: flex;
  align-items: center;
  color: #8d0018;
}

.framework-empty {
  min-height: 92px;
}

.auth-layout {
  display: grid;
  max-width: 520px;
}

.auth-panel {
  min-height: 0;
}

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

.settings-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.55fr);
  gap: 12px;
  align-items: end;
}

.settings-form .button {
  justify-self: end;
}

.settings-form label:nth-child(3) {
  grid-column: 1 / -1;
}

.production-note {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #ead7aa;
  border-radius: 8px;
  background: #fff8e8;
  color: #4a4437;
  line-height: 1.55;
}

.production-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.production-note p {
  margin: 6px 0 0;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.login-form label,
.user-form label,
.settings-form label,
.check-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

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

.check-task-title {
  margin: 4px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

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

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-weight: 600;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.google-login-button {
  min-height: 44px;
}

.help-text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.field-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: #8d0018;
  font-weight: 600;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.account-panel {
  display: none;
}

.account-panel.active {
  display: block;
}

.owner-select {
  width: 100%;
  min-width: 140px;
  margin-top: 6px;
}

.user-table-wrap {
  margin-top: 12px;
}

.user-table-wrap table {
  min-width: 1160px;
}

.user-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.user-action-button {
  min-width: 78px;
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
}

.user-action-button.delete-button {
  background: #fff8f9;
  border-color: #efc9cf;
}

.user-action-button:disabled {
  background: #f6f6f6;
  border-color: #e4e8e6;
  color: #b8aaaa;
  cursor: not-allowed;
  opacity: 1;
}

.user-action-button:disabled:hover,
.user-action-button:disabled:focus-visible {
  background: #f6f6f6;
  border-color: #e4e8e6;
  color: #b8aaaa;
}

.activity-table-wrap table {
  min-width: 1120px;
}

.activity-table-wrap td:last-child {
  min-width: 360px;
  white-space: normal;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dialog::backdrop {
  background: rgba(35, 48, 44, 0.34);
}

.dialog form {
  padding: 20px;
}

.project-edit-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: min(900px, calc(100vh - 44px));
  overflow: auto;
  padding: 18px;
}

.detail-dialog form {
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dialog-head {
  justify-content: space-between;
}

.dialog-actions {
  justify-content: flex-end;
}

.evidence-body {
  display: grid;
  gap: 14px;
}

.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-preview {
  display: block;
  width: 100%;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.evidence-pdf {
  min-height: 70vh;
}

.dialog-head h3 {
  margin: 0;
}

.detail-body {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfc 0%, #f5f8f7 100%);
}

.detail-hero h4 {
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
}

.detail-hero a {
  color: #225b73;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 420px;
}

.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  overflow: hidden;
}

.detail-section h4 {
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f6f9f8;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

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

.detail-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-item.span-2 {
  grid-column: 1 / -1;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}

.detail-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.matrix-score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(120px, 0.6fr);
  gap: 10px;
  padding: 12px 12px 0;
}

.matrix-score-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.matrix-score-item:last-child {
  border-right: 1px solid var(--line);
}

.matrix-score-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.matrix-score-item strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
}

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

.form-grid.sectioned-form-grid {
  display: block;
  min-width: 0;
  overflow: auto;
  padding-right: 6px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  align-content: start;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.form-section + .form-section {
  margin-top: 12px;
}

.form-section-title {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfc 0%, #f5f8f7 100%);
}

.form-section-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.form-section-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
  padding: 12px;
}

.form-section-grid label {
  min-width: 0;
}

.form-section-grid .span-2 {
  grid-column: 1 / -1;
}

.project-edit-form .field-help {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fbfcfb;
  color: #52615d;
  font-size: 12px;
  line-height: 1.5;
}

.project-edit-form select,
.project-edit-form input {
  min-height: 44px;
}

.project-edit-form textarea {
  min-height: 92px;
}

.score-help {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.score-help p {
  margin: 0;
}

.score-help strong {
  color: #8d0018;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .brand {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
  }

  .nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .metric-grid,
  .overview-brief,
  .dashboard-grid,
  .split-grid,
  .matrix-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .main {
    padding: 18px;
  }

  .topbar,
  .top-actions,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions .button {
    width: 100%;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

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

  .metric-card {
    padding: 14px;
  }

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

  .maintenance-summary,
  .framework-grid {
    grid-template-columns: 1fr;
  }

  .framework-empty {
    display: none;
  }

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

  .maintenance-evidence {
    align-items: stretch;
    flex-direction: column;
  }

  .maintenance-evidence-file {
    max-width: none;
    width: 100%;
  }

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

  .effort-frequency {
    grid-template-columns: 1fr 1fr;
  }

  .tool-row,
  .tool-credentials {
    grid-template-columns: 1fr;
  }

  .tool-actions {
    justify-content: flex-start;
  }

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

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

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

  .matrix-score-grid {
    grid-template-columns: 1fr;
  }

  .matrix-score-item {
    border-right: 1px solid var(--line);
  }

  .matrix-score-item:last-child {
    border-bottom: 1px solid var(--line);
  }

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

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

  .settings-form label:nth-child(3) {
    grid-column: auto;
  }

  .renewal-date-grid {
    grid-template-columns: 1fr;
  }
}
