:root {
  --bg: #f5f7f7;
  --panel: #fff;
  --ink: #111c1b;
  --muted: #667574;
  --line: #e1e8e6;
  --brand: #0d766e;
  --brand-dark: #075f59;
  --soft: #e8f5f2;
  --danger: #c2413f;
  --warn: #b7791f;
  --ok: #287a46;
  --shadow: 0 16px 34px rgba(17, 33, 31, 0.06);
  --shadow-soft: 0 8px 22px rgba(17, 33, 31, 0.045);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8faf9 0%, var(--bg) 260px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover { background: var(--brand-dark); }

.button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.button-link:hover {
  background: var(--brand-dark);
}

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button.secondary:hover,
.button-link.secondary:hover {
  border-color: rgba(13, 118, 110, 0.22);
  background: #f7fbfa;
  color: var(--brand-dark);
}

.button-link.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button-link.is-loading {
  pointer-events: none;
  opacity: 0.65;
}

.compact-actions {
  gap: 10px;
  align-items: center;
}

h1, h2, h3, p { margin: 0; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }

.hidden { display: none !important; }
.meta, .sub, p { color: var(--muted); line-height: 1.6; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card, .panel, .modal-card, .record, .stage-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(460px, 100%);
  padding: 24px;
  display: grid;
  gap: 14px;
}

.brand {
  color: var(--brand);
  font-size: 32px;
  font-weight: 900;
}

.brand.block { color: #fff; }

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

aside {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 14px;
  background: linear-gradient(180deg, #0d2421 0%, #102b27 100%);
  color: #d7e7e4;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 10px 0 30px rgba(11, 31, 28, 0.08);
}

aside > div:first-child {
  display: grid;
  gap: 4px;
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

aside > :not(:first-child):not(nav),
aside > div:not(:first-child),
aside > p,
aside footer,
.sidebar-note,
.side-note,
.aside-note,
.product-note,
.sidebar-tip {
  display: none !important;
}

nav {
  display: grid;
  align-content: start;
  gap: 8px;
  flex: 1;
}

nav button {
  background: transparent;
  text-align: left;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d7e7e4;
  letter-spacing: 0;
  font-weight: 850;
}

nav button.active,
nav button:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

main { padding: 24px; min-width: 0; }

main {
  padding: 28px 30px 42px;
}

main > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(221, 230, 228, 0.88);
}

main > header h1 {
  margin-top: 2px;
  font-size: 31px;
  line-height: 1.18;
  letter-spacing: 0;
}

main > header p {
  margin-top: 5px;
  font-size: 14px;
}

.top-actions, .toolbar, .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.top-actions button {
  min-height: 40px;
}

.eyebrow {
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 6px;
}

.view { display: none; }
.view.active { display: block; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand);
  opacity: 0.9;
}

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

.metric b {
  display: block;
  margin-top: 8px;
  font-size: 31px;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.asset-radar-panel {
  margin-bottom: 16px;
}

.asset-radar-shell {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.asset-radar-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.asset-radar-head p {
  margin-top: 4px;
}

.radar-priority {
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid #e3ece9;
  border-radius: 8px;
  background: #f8fbfa;
}

.radar-priority.warn {
  border-color: #f5d48a;
  background: #fffaf0;
}

.radar-priority.high {
  border-color: #f2b8b5;
  background: #fff7f5;
}

.radar-priority span,
.radar-priority small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.radar-priority strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

.asset-radar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
}

.asset-radar-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e3ece9;
  border-radius: 8px;
  background: #fbfdfc;
}

.asset-radar-card.warn {
  border-color: #f5d48a;
  background: #fffaf0;
}

.asset-radar-card.high {
  border-color: #f2b8b5;
  background: #fff7f5;
}

.asset-radar-card.active {
  outline: 2px solid rgba(13, 118, 110, 0.28);
  box-shadow: 0 12px 26px rgba(13, 118, 110, 0.12);
}

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

.radar-card-top strong,
.radar-card-top span {
  display: block;
}

.radar-card-top span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.radar-card-top b {
  font-size: 24px;
}

.asset-radar-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.radar-card-meta,
.radar-member-list {
  display: flex;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.radar-card-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.linklike {
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.linklike:hover {
  background: var(--soft);
}

.radar-filter-btn {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(13, 118, 110, 0.22);
  background: #fff;
  color: var(--brand-dark);
}

.radar-filter-btn.active {
  background: var(--brand);
  color: #fff;
}

.pending-filter-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f4fbf9;
}

.pending-filter-note strong,
.pending-filter-note span {
  display: block;
}

.pending-filter-note span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.pending-queue-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.pending-queue-summary strong,
.pending-queue-summary span {
  display: block;
}

.pending-queue-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.pending-queue-summary b {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f4;
  color: var(--brand-dark);
  font-size: 12px;
  white-space: nowrap;
}

.pending-table-wrap {
  overflow-x: auto;
  padding: 0 18px 18px;
  background: #fff;
}

.pending-table {
  min-width: 820px;
}

.pending-table td:nth-child(4) {
  max-width: 250px;
}

.pending-table .tag {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(420px, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.panel { overflow: hidden; }

.panel-head {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.panel-head p {
  max-width: 760px;
  margin-top: 4px;
  font-size: 13px;
}

.category-tabs, .record-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}

.compact-tabs { border-top: 0; }

.category-tabs button, .record-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.category-tabs button.active, .record-tabs button.active {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-dark);
}

.filters {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

input, select, textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(13, 118, 110, 0.14);
  border-color: rgba(13, 118, 110, 0.38);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.table-wrap { overflow-x: auto; padding: 16px 18px 18px; }

.member-table-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.member-table-summary strong,
.member-table-summary span {
  display: block;
}

.member-table-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.member-table-summary b {
  color: var(--brand-dark);
  font-size: 20px;
  white-space: nowrap;
}

.member-table-wrap {
  overflow-x: auto;
  padding: 16px 18px 18px;
}

.member-table-wrap .data-table {
  min-width: 920px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th, .data-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  background: #f7faf9;
  font-size: 13px;
  white-space: nowrap;
}

.data-table tr:hover td { background: #f8fbfa; }
.data-table tr.selected td { background: var(--soft); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  margin: 2px 4px 2px 0;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag.warn { background: #fff6df; color: var(--warn); }
.tag.ok { background: #e9f6ed; color: var(--ok); }
.tag.high { background: #fff0f0; color: var(--danger); }

.asset-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #dfe8e5;
  background: #f8fbfa;
  white-space: nowrap;
}

.asset-score-pill b {
  font-size: 15px;
}

.asset-score-pill em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.asset-score-pill.ok {
  border-color: #cbe8d2;
  background: #edf8f0;
  color: var(--ok);
}

.asset-score-pill.warn {
  border-color: #f5d48a;
  background: #fff8e7;
  color: var(--warn);
}

.asset-score-pill.high {
  border-color: #f2b8b5;
  background: #fff4f2;
  color: var(--danger);
}

.record-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px 18px;
}

.record {
  padding: 15px;
  box-shadow: none;
}

.compact-record {
  display: grid;
  gap: 10px;
  border-color: #e8eeee;
  background: #fff;
}

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

.record p { margin-top: 8px; }

.compact-record p {
  display: -webkit-box;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7faf9;
  color: var(--ink);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.compact-asset-record {
  display: grid;
  gap: 10px;
  border-color: #e4ece9;
  background: #fff;
}

.record-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.record-title-line strong {
  font-size: 15px;
}

.record-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.record-summary-line {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(13, 118, 110, 0.45);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--ink);
  line-height: 1.7;
}

.data-table td {
  line-height: 1.55;
}

.data-table .actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.record-tags {
  margin-top: 0;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.member-detail-page {
  display: grid;
  gap: 14px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.summary-band > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.summary-band b {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.stage-block {
  padding: 16px;
  box-shadow: none;
}

.stage-block .summary-band {
  padding: 12px 0 0;
  border: 0;
}

.inner-panel {
  box-shadow: none;
}

.feature-sections {
  display: grid;
  gap: 14px;
}

.feature-panel .panel-head p {
  margin-top: 4px;
}

.feature-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

.feature-item summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.feature-item summary::-webkit-details-marker {
  display: none;
}

.feature-item summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.feature-item[open] summary {
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.thumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.thumbs img,
.image-strip img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.image-thumb-button {
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.image-thumb-button:hover {
  background: transparent;
  box-shadow: 0 0 0 3px rgba(13, 118, 110, 0.12);
}

.diet-analysis-detail,
.training-template,
.renewal-cards {
  padding: 16px;
}

.image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.comparison-photo-section {
  margin: 18px 18px 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
}

.comparison-photo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.comparison-photo-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.comparison-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.comparison-photo-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.comparison-photo-copy {
  display: grid;
  gap: 4px;
}

.comparison-photo-copy span {
  color: var(--muted);
  font-size: 13px;
}

.comparison-photo-copy p {
  font-size: 14px;
}

.media-tag {
  min-height: 0;
  border: 0;
  cursor: pointer;
}

.analysis-grid,
.renewal-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.analysis-grid > div,
.renewal-cards article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.analysis-grid .wide,
.renewal-cards .wide,
.renewal-cards .internal-note {
  grid-column: 1 / -1;
}

.analysis-grid p,
.renewal-cards p {
  margin-top: 6px;
  line-height: 1.7;
}

.training-template {
  display: grid;
  gap: 12px;
}

.training-template h3 {
  font-size: 20px;
}

.template-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.training-template section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.training-template h4,
.renewal-cards h4 {
  margin-bottom: 10px;
}

.template-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.template-table th,
.template-table td {
  border: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

.template-table th {
  background: #f6f8f8;
}

.preserve-text {
  white-space: pre-wrap;
  line-height: 1.7;
  padding: 16px;
  margin: 0;
  font-family: inherit;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.phase-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafafa;
}

.highlight {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff6df;
  color: var(--warn);
  font-weight: 800;
}

.renewal-doc {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.renewal-doc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.renewal-doc-hero h3 {
  font-size: 24px;
  margin: 6px 0;
}

.renewal-doc-hero p {
  color: var(--muted);
  line-height: 1.7;
}

.renewal-doc-hero dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.renewal-doc-hero dl div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.renewal-doc-hero dt {
  color: var(--muted);
  font-size: 12px;
}

.renewal-doc-hero dd {
  margin-top: 4px;
  font-weight: 800;
}

.renewal-doc-body {
  display: grid;
  gap: 12px;
}

.renewal-doc-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.renewal-doc-section h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

.renewal-doc-section h5 {
  font-size: 15px;
  margin: 14px 0 8px;
}

.renewal-doc-section p,
.renewal-subsection p {
  line-height: 1.8;
  margin-top: 8px;
}

.renewal-doc-section ul {
  margin-top: 8px;
  padding-left: 18px;
  line-height: 1.8;
}

.renewal-subsection {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.renewal-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.renewal-table {
  min-width: 620px;
}

.empty.slim {
  padding: 8px 0;
  text-align: left;
}

.compact-renewal-list {
  padding: 0;
}

.renewal-history-list {
  display: grid;
  gap: 10px;
}

.renewal-ppt-panel {
  padding: 14px;
  border: 1px solid rgba(47, 118, 109, 0.22);
  border-radius: 8px;
  background: #f7fbf9;
}

.legacy-renewal-archive {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

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

.archive-title span {
  color: var(--muted);
  font-size: 13px;
}

.renewal-ppt-head,
.renewal-ppt-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.renewal-ppt-head p,
.renewal-ppt-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.renewal-ppt-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.renewal-ppt-item {
  padding: 12px 14px;
  border: 1px solid rgba(221, 230, 228, 0.95);
  border-radius: 8px;
  background: #fff;
}

.renewal-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.renewal-history-item p {
  margin-top: 4px;
}

.member-asset-page {
  display: grid;
  gap: 16px;
}

.member-detail-nav {
  position: sticky;
  top: 12px;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 230, 228, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 33, 31, 0.055);
  backdrop-filter: blur(10px);
}

.member-detail-nav .member-back-button {
  order: -1;
  min-width: 154px;
}

.member-detail-nav > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.member-detail-nav strong {
  color: var(--ink);
  font-size: 15px;
}

.member-detail-nav span {
  color: var(--muted);
  font-size: 13px;
}

.member-detail-sticky {
  position: sticky;
  top: 12px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 230, 228, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(17, 33, 31, 0.08);
  backdrop-filter: blur(10px);
}

.member-detail-sticky > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.member-detail-sticky strong {
  font-size: 15px;
}

.member-detail-sticky span {
  color: var(--muted);
  font-size: 13px;
}

.member-asset-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(420px, 1.42fr) 180px;
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.member-asset-title {
  display: grid;
  align-content: start;
  gap: 8px;
}

.member-asset-title h2 {
  font-size: 28px;
}

.asset-score-badge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #dfe8e5;
  border-radius: 8px;
  background: #f8fbfa;
}

.asset-score-badge span,
.asset-score-badge em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.asset-score-badge strong {
  grid-row: span 2;
  font-size: 30px;
  line-height: 1;
}

.asset-score-badge.ok {
  border-color: #cbe8d2;
  background: #f0faf3;
}

.asset-score-badge.warn {
  border-color: #f5d48a;
  background: #fff9e9;
}

.asset-score-badge.high {
  border-color: #f2b8b5;
  background: #fff5f2;
}

.member-hero-grid,
.asset-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-hero-grid > div,
.asset-stat-grid > article {
  border: 1px solid #edf1f0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  min-width: 0;
}

.member-hero-grid > .hero-score-card {
  border-color: rgba(13, 118, 110, 0.28);
  background: #f0f8f5;
}

.member-hero-grid b,
.asset-stat-grid b {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.asset-stat-grid > article {
  background: #fff;
}

.asset-stat-grid p {
  margin-top: 8px;
  font-size: 13px;
}

.overview-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.overview-focus-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.overview-focus-card.risk-card {
  border-color: #fedf89;
  background: #fffdf5;
}

.asset-health-card {
  grid-column: 1 / -1;
  border-color: rgba(13, 118, 110, 0.24);
  background: #f8fcfa;
}

.asset-health-card.warn {
  border-color: #f5d48a;
  background: #fffaf0;
}

.asset-health-card.high {
  border-color: #f2b8b5;
  background: #fff7f5;
}

.asset-health-card .asset-action-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-health-card .asset-pillar-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-health-card > p {
  max-width: 920px;
}

.asset-health-card .asset-pillar {
  gap: 6px;
  padding: 9px;
}

.asset-health-card .asset-pillar p,
.asset-health-card .asset-pillar small {
  display: none;
}

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

.focus-card-head b {
  max-width: 130px;
  text-align: right;
  overflow-wrap: anywhere;
}

.overview-focus-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.asset-action-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.asset-action-list li {
  position: relative;
  padding-left: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.asset-action-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.asset-action-empty {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f7f6;
}

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

.asset-pillar {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e1ebe8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.asset-pillar-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.asset-pillar-head strong {
  font-size: 13px;
}

.asset-pillar-head span {
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 900;
}

.pillar-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeee;
}

.pillar-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.asset-pillar.warn .pillar-bar i {
  background: var(--warn);
}

.asset-pillar.high .pillar-bar i {
  background: var(--danger);
}

.asset-pillar p {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.asset-pillar small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mini-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-metric-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 12px;
}

.slim-action {
  justify-self: start;
  min-height: 34px;
  padding: 7px 10px;
}

.handoff-mini-card dl,
.handoff-brief-list {
  display: grid;
  gap: 10px;
}

.handoff-mini-card dl {
  margin: 0;
}

.handoff-mini-card {
  background: #fbfdfc;
}

.handoff-mini-card dl > div,
.handoff-brief-list > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.handoff-mini-card dt,
.handoff-brief-list span {
  color: var(--muted);
  font-size: 12px;
}

.handoff-mini-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.handoff-brief-list strong {
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.member-hero-actions {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  min-width: 180px;
}

.member-back-button {
  min-height: 42px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(13, 118, 110, 0.14);
}

.member-back-button:hover {
  background: var(--brand-dark);
  color: #fff;
}

.member-secondary-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding-top: 2px;
}

.member-secondary-actions button {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  color: #2c3b3a;
  background: #fff;
  border-color: #dfe8e5;
  box-shadow: none;
}

.member-hero-actions > button {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

.muted-action {
  color: var(--muted);
  border-color: #e8eeee;
  background: #fafcfc;
  font-weight: 700;
}

.record-return-context {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.record-return-context:not(:empty) {
  display: flex;
}

.record-return-context strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.member-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

.member-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  background: transparent;
  color: var(--ink);
}

.member-tabs button span {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef4f2;
  color: var(--muted);
  font-size: 12px;
}

.member-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.member-tabs button.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.member-tab-body,
.asset-overview {
  display: grid;
  gap: 16px;
}

.overview-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
}

.clean-overview {
  align-items: start;
}

.service-timeline {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-item > div {
  position: relative;
  padding-left: 20px;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline-item p {
  margin-top: 3px;
  color: var(--ink);
  font-weight: 700;
}

.timeline-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-item .mini-tags {
  margin-top: 8px;
}

.asset-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.asset-list-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.8fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.asset-list-card strong {
  font-size: 16px;
}

.asset-list-card p,
.asset-list-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.training-card {
  grid-template-columns: minmax(260px, 1.2fr) minmax(180px, 0.9fr) auto auto;
}

.diet-card {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) auto auto;
}

.row-actions,
.status-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.record-detail-shell {
  display: grid;
  gap: 14px;
}

.detail-action-bar,
.asset-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-action-bar h3,
.asset-detail-title h3 {
  font-size: 22px;
  margin-top: 4px;
}

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

.analysis-grid > article,
.analysis-module {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.analysis-module h4 {
  margin: 0 0 10px 36px;
  font-size: 16px;
}

.analysis-module p,
.analysis-module ul {
  line-height: 1.7;
}

.analysis-module .member-reply-text {
  padding: 14px;
  border-radius: 8px;
  background: #f6fbf9;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.analysis-module.wide {
  grid-column: 1 / -1;
}

.module-index {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
  font-size: 13px;
}

.analysis-module > .module-index {
  position: absolute;
  left: 16px;
  top: 16px;
}

.profile-reference {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf9;
}

.profile-reference ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.profile-reference li {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  padding-left: 0;
  color: var(--muted);
  font-size: 13px;
}

.full-record {
  padding: 18px;
}

.training-detail-shell .training-template {
  padding: 0;
}

.training-template {
  gap: 12px;
}

.training-template section {
  border-radius: 8px;
  padding: 14px;
}

.training-template h3 {
  padding: 16px 16px 0;
  font-size: 22px;
}

.template-meta {
  margin: 0 16px;
  border-radius: 8px;
}

.training-template .check-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.training-template .check-list span {
  padding: 8px 10px;
}

.renewal-anchor-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.renewal-anchor-bar span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.renewal-core-grid {
  display: grid;
  gap: 16px;
}

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

.renewal-core-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.renewal-core-head h3 {
  font-size: 19px;
  margin: 0;
}

.renewal-section-stack {
  display: grid;
  gap: 0;
}

.renewal-mini-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid #edf1f0;
}

.renewal-mini-section:first-child {
  border-top: 0;
}

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

.renewal-mini-head span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.renewal-mini-section h4 {
  font-size: 17px;
  margin: 0;
}

.renewal-mini-section h5 {
  font-size: 14px;
  margin: 0 0 8px;
}

.renewal-lead,
.renewal-copy {
  margin: 0;
  line-height: 1.8;
  color: var(--ink);
}

.renewal-copy {
  color: var(--muted);
}

.renewal-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.renewal-check-grid li {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e3eeeb;
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--ink);
  line-height: 1.45;
}

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

.renewal-subsection-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e3eeeb;
  border-radius: 8px;
  background: #fbfdfc;
}

.renewal-subsection-card .renewal-check-grid {
  grid-template-columns: 1fr;
}

.renewal-subsection-card .renewal-check-grid li {
  padding: 7px 9px;
  background: #fff;
  font-size: 13px;
}

.record-tools {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.renewal-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.renewal-summary {
  padding: 0;
  border: 0;
}

.wide-label textarea,
#renewalContent {
  min-height: 260px;
  line-height: 1.7;
}

.check-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.check-list span {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.check-list .done {
  color: var(--ok);
  background: #f0fbf3;
}

.check-list .missing {
  color: var(--warn);
  background: #fff8e8;
}

.form, .compact-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

#recordForm {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: #fbfdfc;
  border-top: 1px solid var(--line);
}

#recordForm .record-form-guide,
#recordForm label:nth-of-type(3),
#recordForm label:nth-of-type(4),
#recordForm label:nth-of-type(6),
#recordForm .toolbar {
  grid-column: 1 / -1;
}

#recordForm label:nth-of-type(5) {
  grid-column: span 2;
}

.record-form-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(13, 118, 110, 0.18);
  border-radius: 8px;
  background: #f4fbf9;
}

.record-form-guide strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.record-form-guide p {
  font-size: 13px;
}

.record-guide-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.record-guide-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(13, 118, 110, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 850;
}

.sub-panel {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #fff;
}

.sub-panel .record-list { padding: 12px 0 0; }

.handover-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(520px, 1.28fr);
  gap: 0;
  align-items: start;
}

.handover-detail {
  border-left: 1px solid var(--line);
  padding: 18px;
  background: #f8fbfa;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.handover-card {
  display: grid;
  gap: 10px;
  line-height: 1.7;
}

.handover-queue {
  display: grid;
  gap: 8px;
}

.handover-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 2px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.handover-queue-head strong,
.handover-queue-head span {
  display: block;
}

.handover-queue-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.handover-queue-head b {
  color: var(--brand-dark);
  font-size: 20px;
  white-space: nowrap;
}

.handover-queue-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.handover-queue-summary span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.handover-queue-card {
  width: 100%;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.handover-queue-card:hover,
.handover-queue-card.selected {
  border-color: rgba(13, 118, 110, 0.45);
  background: #f5fbf9;
}

.handover-queue-main {
  display: grid;
  gap: 5px;
}

.handover-queue-main strong {
  font-size: 15px;
}

.handover-queue-main small,
.handover-queue-meta small {
  color: var(--muted);
  font-weight: 600;
}

.handover-queue-meta {
  min-width: 62px;
  text-align: right;
}

.handover-queue-meta b {
  display: block;
  font-size: 18px;
}

.handover-queue-tags {
  grid-column: 1 / -1;
  max-height: 56px;
  overflow: hidden;
}

.handover-detail-stack {
  display: grid;
  gap: 14px;
}

.handoff-card-clean {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.handoff-card-clean.compact {
  box-shadow: none;
  margin: 0 16px 16px;
}

.handoff-card-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.handoff-card-hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.handoff-card-hero h3 {
  margin-top: 4px;
  font-size: 22px;
}

.handoff-score {
  min-width: 96px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.handoff-score b {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 24px;
}

.handoff-alert-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid #f7e4bd;
}

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

.handoff-fact-grid section,
.handoff-next-step {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.handoff-fact-grid section.missing {
  border-color: #f7e4bd;
  background: #fffaf0;
}

.handoff-fact-grid section.missing p {
  color: #854a0e;
}

.handoff-fact-grid p,
.handoff-next-step p {
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.handoff-next-step {
  border-color: rgba(13, 118, 110, 0.24);
  background: #f4fbf9;
}

.handoff-card-clean.compact .handoff-fact-grid p {
  -webkit-line-clamp: 3;
}

.handoff-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.handoff-action-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.82fr) minmax(0, 1.18fr);
  gap: 12px;
  padding: 16px;
}

.handoff-action-grid textarea {
  min-height: 96px;
}

.handoff-action-grid .handoff-check,
.handoff-action-grid .toolbar {
  grid-column: 1 / -1;
}

.handoff-check {
  display: flex;
  align-items: center;
}

.handoff-note-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.handoff-note-strip b {
  color: var(--ink);
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px 16px;
  background: rgba(12, 25, 23, 0.42);
  overflow: auto;
}

.modal-card {
  width: min(720px, 100%);
  padding-bottom: 16px;
  display: grid;
  gap: 12px;
}

.member-profile-form {
  width: min(680px, 100%);
}

.image-viewer-card {
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.image-viewer-stage {
  margin: 0 16px;
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1110;
}

.image-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
  border-radius: 8px;
}

.image-viewer-card > .toolbar {
  margin-left: 16px;
  margin-right: 16px;
}

.modal-card > label, .modal-card > button, .modal-card > .form-error {
  margin-left: 16px;
  margin-right: 16px;
}

.member-profile-form > .profile-edit-summary,
.member-profile-form > .toolbar {
  margin-left: 16px;
  margin-right: 16px;
}

.profile-edit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-edit-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.profile-edit-summary b {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.modal-toolbar {
  justify-content: flex-end;
}

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

.member-form .panel-head, .member-form .form-error, .member-form button[type="submit"] {
  grid-column: 1 / -1;
}

.import-modal-card {
  width: min(1180px, calc(100vw - 36px));
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  padding: 0 16px 16px;
}

.import-uploader,
.import-preview {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.import-uploader textarea {
  min-height: 170px;
}

.compact-head {
  padding: 0;
  border: 0;
}

.import-preview-box {
  min-height: 260px;
  max-height: 440px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.import-preview-box.empty {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.import-preview-box.loading {
  color: var(--brand);
}

.import-preview-box.error {
  white-space: pre-line;
  color: #8a2d2d;
  background: #fffafa;
  border-color: #f0caca;
}

.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.import-table th,
.import-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8f7;
  color: #435452;
}

.ppt-modal-card {
  width: min(1520px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 36px));
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.ppt-modal-card > .panel-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.ppt-modal-card > .panel-head h2 {
  line-height: 1.25;
}

#pptWorkspace {
  min-height: 0;
  overflow: hidden;
}

.ppt-workspace {
  display: grid;
  grid-template-columns: 260px minmax(620px, 1fr) 330px;
  gap: 14px;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 14px;
  overflow: hidden;
}

.ppt-slide-list,
.ppt-preview-panel,
.ppt-edit-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.ppt-slide-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow: auto;
}

.ppt-slide-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ppt-slide-nav-grid button {
  min-height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: center;
  box-shadow: none;
}

.ppt-slide-nav-grid button.active {
  border-color: rgba(13, 118, 110, 0.38);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(13, 118, 110, 0.18);
}

.ppt-slide-nav-grid button span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-weight: 900;
}

.ppt-slide-nav-list {
  display: grid;
  gap: 8px;
}

.ppt-slide-nav-list .ppt-slide-button {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.ppt-slide-nav-list .ppt-slide-button.active {
  border-color: rgba(13, 118, 110, 0.42);
  background: #eef8f5;
  box-shadow: inset 3px 0 0 var(--brand);
}

.ppt-slide-nav-list .ppt-slide-button span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf5f2;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.ppt-slide-nav-list .ppt-slide-button.active span {
  background: var(--brand);
  color: #fff;
}

.ppt-slide-nav-list .ppt-slide-button b,
.ppt-slide-nav-list .ppt-slide-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppt-slide-nav-list .ppt-slide-button b {
  font-size: 13px;
  line-height: 1.3;
}

.ppt-slide-nav-list .ppt-slide-button small {
  color: var(--muted);
  font-size: 11px;
}

/* Compatibility for already-open workspaces rendered with the old slide list markup. */
.ppt-slide-list > .ppt-slide-button {
  min-height: 38px !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.ppt-slide-list > .ppt-slide-button.active {
  border-color: rgba(13, 118, 110, 0.38);
  background: #eef8f5;
  box-shadow: inset 3px 0 0 var(--brand);
}

.ppt-slide-list > .ppt-slide-button span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef5f3;
  color: var(--brand);
  font-weight: 900;
}

.ppt-slide-list > .ppt-slide-button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.ppt-slide-list > .ppt-slide-button small {
  display: none;
}

.ppt-slide-current {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ppt-slide-current span {
  color: var(--muted);
  font-size: 12px;
}

.ppt-slide-current strong {
  line-height: 1.4;
}

.ppt-slide-current small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.ppt-workspace-meta {
  flex: 0 0 auto;
  padding: 6px 4px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.ppt-workspace-meta strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.ppt-workspace-meta p {
  margin-top: 3px;
  font-size: 13px;
}

.ppt-preview-panel {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 14px;
  padding: 18px 20px;
  overflow: auto;
  background: linear-gradient(180deg, #f6faf8 0%, #edf4f2 100%);
}

.ppt-preview-toolbar {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.ppt-page-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ppt-page-select-label select {
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.ppt-preview-toolbar span {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.ppt-preview-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.ppt-stage {
  position: relative;
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 32px;
  border: 1px solid rgba(221, 230, 228, 0.95);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(17, 33, 31, 0.12);
}

.ppt-stage.cover {
  background: #0f2f2a;
  color: #fff;
}

.ppt-stage-brand {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.ppt-stage.cover .ppt-stage-brand {
  color: #bfe5dc;
}

.ppt-stage h3 {
  max-width: 82%;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: 0;
}

.ppt-subtitle,
.ppt-footer,
.ppt-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.ppt-stage.cover .ppt-subtitle,
.ppt-stage.cover .ppt-footer,
.ppt-stage.cover .ppt-note {
  color: #d9efe9;
}

.ppt-footer {
  margin-top: auto;
  font-size: 13px;
}

.ppt-page-num {
  position: absolute;
  right: 24px;
  top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.ppt-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  min-height: 0;
  overflow: hidden;
}

.ppt-card-grid article {
  min-height: 0;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid #dce8e5;
  border-radius: 10px;
  background: #f8fbfa;
}

.ppt-card-grid article.large {
  min-height: 0;
}

.ppt-card-grid article strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.ppt-stage.layout-process .ppt-card-grid,
.ppt-stage.layout-pricing .ppt-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ppt-stage.layout-steps .ppt-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ppt-stage.cover .ppt-card-grid article {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.ppt-stage.cover .ppt-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(66px, 1fr);
  max-height: 286px;
}

.ppt-stage.cover .ppt-card-grid article strong,
.ppt-stage.cover .ppt-card-grid article p {
  color: #fff;
}

.ppt-stage.cover .ppt-card-grid p {
  -webkit-line-clamp: 3;
}

.ppt-card-grid p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.ppt-card-grid article.large p {
  -webkit-line-clamp: 6;
}

.ppt-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 118, 110, 0.2);
  border-radius: 10px;
  background: #eef8f5;
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 12px;
}

.ppt-stage.cover .ppt-note {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.ppt-table-wrap {
  flex: 1;
  min-height: 0;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #d8e5e1;
  border-radius: 12px;
  background: #fff;
}

.ppt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ppt-table th,
.ppt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e6efec;
  border-right: 1px solid #e6efec;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.42;
  vertical-align: top;
}

.ppt-table th {
  background: #eef8f5;
  color: var(--brand-dark);
  font-weight: 900;
}

.ppt-table tr:last-child td {
  border-bottom: 0;
}

.ppt-table th:last-child,
.ppt-table td:last-child {
  border-right: 0;
}

.ppt-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.ppt-edit-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.ppt-edit-head strong {
  font-size: 15px;
}

.ppt-edit-head span {
  color: var(--muted);
  font-size: 12px;
}

.ppt-edit-panel label {
  flex: 0 0 auto;
}

.ppt-cards-bulk,
.ppt-table-editor {
  min-height: 132px;
  font-family: inherit;
  line-height: 1.6;
}

.ppt-cards-bulk {
  flex: 1 1 auto;
}

.ppt-edit-panel .modal-toolbar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.ppt-share-box {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(13, 118, 110, 0.18);
  border-radius: 8px;
  background: var(--soft);
}

.ppt-share-box span {
  font-weight: 900;
}

.form-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--danger);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #102826;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  aside {
    position: static;
    height: auto;
  }
  nav { grid-template-columns: repeat(2, 1fr); }
  header, .panel-head { align-items: flex-start; flex-direction: column; }
  .asset-radar-head { flex-direction: column; }
  .pending-filter-note { flex-direction: column; align-items: flex-start; }
  .pending-queue-summary { flex-direction: column; align-items: flex-start; }
  .member-table-summary { flex-direction: column; align-items: flex-start; }
  #recordForm { grid-template-columns: 1fr; }
  #recordForm label:nth-of-type(5) { grid-column: 1; }
  .record-form-guide { grid-template-columns: 1fr; }
  .record-guide-steps { justify-content: flex-start; }
  .radar-priority { min-width: 0; width: 100%; }
  .metrics,
  .asset-radar-grid,
  .grid.two,
  .summary-band,
  .handover-layout,
  .handoff-fact-grid,
  .member-asset-hero,
  .member-hero-grid,
  .asset-stat-grid,
  .overview-focus-grid,
  .profile-edit-summary,
  .overview-two-col,
  .asset-list-card,
  .training-card,
  .diet-card,
  .detail-action-bar,
  .asset-detail-title,
  .analysis-grid.numbered-grid,
  .renewal-doc-hero,
  .renewal-doc-hero dl,
  .renewal-core-head { grid-template-columns: 1fr; }
  .handover-detail { border-left: 0; border-top: 1px solid var(--line); }
  .handover-detail { position: static; max-height: none; }
  .handoff-action-grid { grid-template-columns: 1fr; }
  .asset-health-card { grid-column: auto; }
  .asset-pillar-grid { grid-template-columns: 1fr; }
  .ppt-modal-card { max-height: none; overflow: visible; }
  .ppt-workspace { grid-template-columns: 1fr; min-height: 0; max-height: none; }
  .ppt-slide-list { max-height: 280px; }
  .ppt-stage { aspect-ratio: auto; min-height: 360px; }
  .member-form { grid-template-columns: 1fr; }
  .import-grid { grid-template-columns: 1fr; }
  .member-hero-actions,
  .member-detail-nav,
  .status-pills,
  .row-actions { justify-content: flex-start; }
  .member-detail-nav { align-items: flex-start; flex-direction: column; }
  .member-detail-nav > div { text-align: left; }
  .handoff-card-hero,
  .handoff-card-footer,
  .handoff-note-strip { flex-direction: column; align-items: flex-start; }
  .member-tabs { padding-bottom: 10px; }
}
