/* LetRecord v11 — production readiness */
.readiness-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr);gap:18px;margin-top:18px}.team-card,.portability-card,.audit-card{padding:0;overflow:hidden}.readiness-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid #e6edf5;background:linear-gradient(180deg,#fbfdff,#f7faff)}.readiness-head>div>span{display:block;color:#4a7db8;font-size:11px;font-weight:800;letter-spacing:.11em;margin-bottom:5px}.readiness-head h2{margin:0;color:#17385c;font-size:20px}.readiness-head p{margin:5px 0 0;color:#6d8197;font-size:13px;line-height:1.45}.workspace-switch-row{display:flex;align-items:center;gap:12px;padding:16px 24px;border-bottom:1px solid #edf2f7}.workspace-switch-row label{display:flex;align-items:center;gap:10px;flex:1}.workspace-switch-row span{font-size:12px;font-weight:800;color:#60758d}.workspace-switch-row select{min-width:220px;border:1px solid #cad8e7;border-radius:9px;padding:9px 11px;background:white;color:#183653}.team-list{padding:8px 24px 18px}.team-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #edf2f7}.team-row:last-child{border-bottom:0}.team-avatar{width:36px;height:36px;border-radius:12px;background:#e9f3ff;color:#1767bb;display:grid;place-items:center;font-weight:850;font-size:12px}.team-row strong{display:block;color:#1b3b5e;font-size:14px}.team-row small{display:block;color:#74869a;font-size:12px;margin-top:2px}.team-role{display:flex;gap:7px;align-items:center}.team-role em{font-style:normal;font-size:11px;font-weight:800;border-radius:999px;background:#eef4fa;color:#526d89;padding:5px 8px}.team-role select{border:1px solid #d1dde9;border-radius:8px;padding:6px 8px;background:white;color:#294a6b}.team-role button{border:0;background:transparent;color:#a34848;font-weight:750;cursor:pointer;padding:6px}.invite-list{margin:0 24px 20px;border-top:1px solid #edf2f7;padding-top:14px}.invite-list>strong{font-size:12px;color:#55718e}.invite-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0}.invite-row span strong{font-size:13px}.invite-row span small{display:block;color:#8291a2;font-size:11px}.invite-row button{border:0;background:transparent;color:#a34848;font-weight:750;cursor:pointer}.readiness-empty{padding:18px 0;color:#7c8da0;font-size:13px}.portability-body{padding:18px 24px}.portability-action{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:15px 0;border-bottom:1px solid #edf2f7}.portability-action:last-child{border-bottom:0}.portability-action strong{display:block;color:#1d3c5d;font-size:14px}.portability-action small{display:block;color:#74879a;line-height:1.45;margin-top:3px}.system-checks{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.system-check{border:1px solid #e1e9f2;border-radius:10px;padding:10px 11px;background:#fbfdff}.system-check span{display:flex;align-items:center;gap:7px;color:#647c95;font-size:11px}.system-check b{display:block;color:#1d3d60;margin-top:4px;font-size:13px}.system-dot{width:7px;height:7px;border-radius:50%;background:#2aa876}.system-dot.bad{background:#cf5656}.audit-card{margin-top:18px}.audit-list{padding:8px 24px 20px;max-height:430px;overflow:auto}.audit-row{display:grid;grid-template-columns:35px minmax(0,1fr) auto;gap:11px;align-items:flex-start;padding:12px 0;border-bottom:1px solid #edf2f7}.audit-row:last-child{border-bottom:0}.audit-icon{width:32px;height:32px;border-radius:10px;background:#eef5fd;display:grid;place-items:center;color:#3a76b8}.audit-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}.audit-row strong{display:block;color:#244562;font-size:13px}.audit-row p{margin:2px 0 0;color:#73879a;font-size:12px}.audit-row time{font-size:11px;color:#8393a4;white-space:nowrap}.invite-note,.share-note{padding:12px 14px;border-radius:10px;background:#f0f6fd;color:#55718c;font-size:12px;line-height:1.5}.report-share-button{border:1px solid #bcd5ee;background:#eff7ff;color:#1764ac;border-radius:8px;padding:7px 10px;font-weight:750;cursor:pointer}.share-list{margin:14px 0 0;border:1px solid #e1e8f0;border-radius:12px;overflow:hidden}.share-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #edf2f7}.share-row:last-child{border-bottom:0}.share-row strong{display:block;font-size:13px;color:#244462}.share-row small{display:block;color:#78899a;margin-top:2px}.share-row em{font-style:normal;font-size:11px;font-weight:800;padding:4px 7px;border-radius:999px;background:#edf6f0;color:#37724d}.share-row em.expired{background:#f7eded;color:#a44b4b}.share-row button{border:0;background:transparent;color:#a04444;font-weight:750;cursor:pointer}.created-share-url textarea{width:100%;min-height:78px;resize:none;border:1px solid #cad8e7;border-radius:10px;padding:11px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#214565;background:#f8fbff}.system-banner{display:none;margin:0 0 16px;padding:11px 14px;border-radius:11px;border:1px solid #efc9c9;background:#fff5f5;color:#9b3c3c;font-size:13px}.system-banner.show{display:block}.getting-started{display:none;margin-bottom:18px;border:1px solid #d9e6f4;background:linear-gradient(135deg,#fafdff,#f2f7fe);border-radius:16px;padding:18px 20px}.getting-started.show{display:block}.getting-started header{display:flex;justify-content:space-between;align-items:center;gap:15px}.getting-started h3{margin:0;color:#1b4067;font-size:17px}.getting-started p{margin:4px 0 0;color:#73879a;font-size:12px}.getting-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:14px}.getting-step{padding:11px;border-radius:11px;border:1px solid #dae5f1;background:#fff;color:#60778e;font-size:12px}.getting-step.done{background:#f0f8f3;border-color:#cde6d5;color:#39734d}.getting-step b{display:block;font-size:13px;margin-bottom:3px;color:#2b4e70}.getting-step.done b{color:#327047}@media(max-width:900px){.readiness-grid{grid-template-columns:1fr}.getting-steps{grid-template-columns:1fr}.workspace-switch-row{align-items:flex-start;flex-direction:column}.workspace-switch-row label{width:100%;flex-direction:column;align-items:flex-start}.workspace-switch-row select{width:100%;min-width:0}.team-row{grid-template-columns:38px minmax(0,1fr)}.team-role{grid-column:2;justify-content:flex-start}.system-checks{grid-template-columns:1fr}.portability-action{flex-direction:column}}

/* v11.5 System Health Dashboard */

.system-health-card[hidden] {
  display: none !important;
}

.system-health-card {
  margin-top: 18px;
  padding-bottom: 24px;
  overflow: hidden;
}

.system-health-head {
  margin-bottom: 20px;
}

.system-health-overview {
  padding: 20px;
  margin: 0 24px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.system-health-state {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-health-state > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.system-health-state small,
.system-health-backup-card > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.system-health-state strong {
  color: #17385c;
  font-size: 22px;
  font-weight: 800;
}

.system-health-state div > span {
  color: #64748b;
  font-size: 13px;
}

.system-health-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #94a3b8;
}

.system-health-dot.ok {
  background: #16a34a;
  box-shadow: 0 0 0 5px #dcfce7;
}

.system-health-dot.degraded {
  background: #d97706;
  box-shadow: 0 0 0 5px #fef3c7;
}

.system-health-dot.failed {
  background: #dc2626;
  box-shadow: 0 0 0 5px #fee2e2;
}

.system-health-dot.pending {
  background: #94a3b8;
  box-shadow: 0 0 0 5px #f1f5f9;
}

/* Individual service checks */

.system-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 0 24px 22px;
}

.system-health-check {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.system-health-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.system-health-check-name {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.system-health-check-time {
  color: #64748b;
  font-size: 12px;
}

.system-health-check-detail {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.system-health-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  white-space: nowrap;
}

.system-health-pill.ok {
  color: #166534;
  background: #dcfce7;
}

.system-health-pill.degraded {
  color: #92400e;
  background: #fef3c7;
}

.system-health-pill.failed {
  color: #991b1b;
  background: #fee2e2;
}

.system-health-pill.pending {
  color: #475569;
  background: #f1f5f9;
}

/* Backup summary */

.system-health-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 24px 24px;
}

.system-health-backup-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.system-health-backup-card > strong {
  color: #17385c;
  font-size: 19px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.system-health-backup-card > small {
  color: #64748b;
  font-size: 12px;
}

.system-health-backup-meta {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  font-size: 12px;
  color: #475569;
  overflow-wrap: anywhere;
}

.system-health-backup-meta code {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.system-health-backup-meta b {
  color: #334155;
  font-weight: 750;
}

/* Recent backup history */

.system-health-history {
  border-top: 1px solid #e2e8f0;
  margin: 0 24px;
  padding-top: 22px;
}

.system-health-history-head {
  margin-bottom: 14px;
}

.system-health-history-head > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.system-health-history-head span {
  color: #17385c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.system-health-history-head small {
  color: #64748b;
  font-size: 12px;
}

.system-health-history-list {
  display: grid;
  gap: 9px;
}

.system-health-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.system-health-history-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 260px;
}

.system-health-history-info strong {
  color: #334155;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.system-health-history-info small {
  color: #64748b;
  font-size: 12px;
}

.system-health-loading {
  padding: 20px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.system-health-error {
  padding: 14px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 13px;
}

#refreshSystemHealthButton:disabled {
  cursor: wait;
  opacity: 0.7;
}

/* Responsive layout */

@media (max-width: 720px) {
  .system-health-head {
    flex-wrap: wrap;
    gap: 14px;
  }

  .system-health-backup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-health-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-health-overview {
    margin-right: 16px;
    margin-left: 16px;
    padding: 16px;
  }

  .system-health-grid,
  .system-health-backup-grid,
  .system-health-history {
    margin-right: 16px;
    margin-left: 16px;
  }

  .system-health-backup-card {
    padding: 16px;
  }

  .system-health-state strong {
    font-size: 19px;
  }
}
