body { background: #f7f7fb; }
.system-check-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 24px; margin-top: 24px; border: 1px solid #d8d8e3; background: #f5f5fa; border-radius: 16px; }
.system-check-card h3 { margin: 0 0 12px; font-size: 24px; }
.system-check-card p { line-height: 1.6; font-size: 13px; margin: 6px 0; }
.system-check-card[data-status="healthy"] { background: #eaf8ef; border-color: #a6d7b5; color: #185c36; }
.system-check-card[data-status="healthy"] h3::before { content: '● '; color: #168447; }
.system-check-card[data-status="attention"] { background: #fff6e9; border-color: #e6c595; color: #784511; }
.system-check-card button { border: 0; background: #5144ed; color: white; padding: 14px 20px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.system-check-card button:disabled { opacity: .6; cursor: progress; }
#systemCheckFeedback { grid-column: 1 / -1; }
.system-check-results { display: grid; gap: 12px; margin: 22px 0; }
.system-check-results article { display: flex; align-items: start; gap: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.system-check-results p { margin: 8px 0 0; line-height: 1.6; color: var(--muted); font-size: 13px; }
.check-result { flex: 0 0 140px; font-size: 13px; font-weight: 700; color: #6a637d; }
.check-result.healthy { color: #187440; }
.check-result.attention { color: #8b5015; }
@media(max-width: 700px) { .system-check-card { grid-template-columns: 1fr; padding: 20px; } .system-check-results article { flex-direction: column; gap: 12px; } .check-result { flex-basis: auto; } }
.platform-shell { margin: 0 auto; max-width: 1500px; padding: 26px 34px 70px; }
.platform-header { align-items: center; display: flex; justify-content: space-between; }
.operator-badge { background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; padding: 9px 13px; text-align: right; }
.operator-badge span { font-size: 12px; font-weight: 850; }
.operator-badge small { color: var(--muted); }
.platform-hero { align-items: end; display: flex; justify-content: space-between; padding: 36px 0 28px; }
.platform-hero h1 { font-size: clamp(34px, 4vw, 54px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: 0; }
.platform-hero p:not(.kicker) { color: var(--muted); font-size: 16px; max-width: 650px; }
.platform-metrics { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-metrics article { background: #fff; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 8px; padding: 22px; }
.platform-metrics span, .platform-metrics small { color: var(--muted); font-size: 12px; }
.platform-metrics strong { font-size: clamp(26px, 3vw, 40px); font-weight: 800; overflow-wrap: anywhere; }
.owner-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: white; margin-bottom: 24px; }
.owner-tabs [role="tab"] { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 13px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 46px; }
.owner-tabs [aria-selected="true"] { background: #5144ed; color: white; }
.owner-tabs [role="tab"]:hover:not([aria-selected="true"]) { background: #f0eefc; color: #4033cb; }
.owner-tabs button:focus-visible, .owner-shortcuts button:focus-visible { outline: 3px solid #a79fff; outline-offset: 3px; }
.owner-tab-count { background: #fff0dd; color: #7a4310; border-radius: 20px; padding: 3px 8px; font-size: 11px; }
.owner-panel[hidden] { display: none !important; }
.owner-panel { min-width: 0; animation: owner-panel-enter .18s ease-out; }
.owner-section-heading { margin: 8px 0 26px; }
.owner-section-heading h2 { font-size: 28px; letter-spacing: -.03em; margin: 6px 0 12px; }
.owner-section-heading p:not(.kicker) { color: var(--muted); line-height: 1.7; max-width: 760px; }
.owner-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.owner-shortcuts button { display: grid; gap: 12px; padding: 24px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 16px; color: #282536; cursor: pointer; font: inherit; }
.owner-shortcuts strong { font-size: 16px; color: #5144ed; }
.owner-shortcuts span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.owner-attention { padding: 14px 18px; margin: 0 0 24px; border: 1px solid #ead2ac; background: #fff8eb; color: #795018; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.owner-panel.platform-directory { margin-top: 0; padding: 30px; }
.owner-panel .alert-list, .owner-panel .audit-list { max-height: none; overflow: visible; }
.owner-panel .worker-run { padding: 20px; gap: 10px; }
.owner-panel .worker-run small, .owner-panel .worker-run p { font-size: 13px; line-height: 1.6; }
.owner-panel .worker-run > span { font-size: 12px; }
.owner-panel .alert-item { gap: 10px; padding: 22px 0; }
.owner-panel .alert-item button { padding: 10px 16px; font-size: 13px; }
.owner-panel label { display: grid; gap: 9px; margin: 20px 0; max-width: 780px; }
.owner-panel label:has(input[type="checkbox"]) { display: flex; align-items: start; }
@keyframes owner-panel-enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media(prefers-reduced-motion: reduce) { .owner-panel { animation: none; } }
@media(max-width: 850px) { .owner-shortcuts { grid-template-columns: 1fr; } .owner-tabs { gap: 6px; } .owner-tabs [role="tab"] { flex: 1 1 140px; justify-content: center; } .owner-panel.platform-directory { padding: 22px; } }
.platform-directory { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-top: 18px; padding: 26px; }
.directory-heading { align-items: end; display: flex; justify-content: space-between; }
.directory-heading h2 { font-size: 32px; letter-spacing: -.04em; margin: 0; }
.directory-filters { display: flex; gap: 8px; }
.directory-filters input { width: 240px; }
.directory-filters select { width: 150px; }
.platform-table-wrap { margin-top: 22px; overflow-x: auto; }
.platform-table { border-collapse: collapse; min-width: 880px; width: 100%; }
.platform-table th { color: var(--muted); font-size: 10px; letter-spacing: .08em; padding: 10px 12px; text-align: left; text-transform: uppercase; }
.platform-table td { border-top: 1px solid var(--line); font-size: 13px; padding: 16px 12px; }
.platform-table td strong, .platform-table td small { display: block; }
.platform-table td small { color: var(--muted); margin-top: 3px; }
.platform-table select { min-height: 36px; padding: 0 8px; width: 120px; }
.platform-table select + select { margin-left: 6px; }
.migration-button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--green); font-size: 11px; font-weight: 800; padding: 9px 10px; white-space: nowrap; }
.migration-dialog { background: transparent; border: 0; max-width: 680px; padding: 18px; width: calc(100% - 32px); }
.migration-dialog::backdrop { background: rgba(7, 26, 18, .58); }
.migration-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); display: grid; gap: 18px; padding: 28px; }
.migration-heading { align-items: start; display: flex; justify-content: space-between; }
.migration-heading h2 { font-size: 32px; letter-spacing: -.04em; margin: 0; }
.dialog-close { background: transparent; border: 0; font-size: 32px; line-height: 1; }
.migration-policy, .migration-warning { color: var(--muted); line-height: 1.5; margin: 0; }
.migration-summary { display: grid; gap: 9px; grid-template-columns: repeat(3, 1fr); }
.migration-summary article { background: #f1f4ef; border-radius: 10px; display: grid; gap: 4px; padding: 14px; }
.migration-summary strong { font-size: 22px; }
.migration-summary small { color: var(--muted); }
.migration-consent { align-items: start; display: flex; font-weight: 700; gap: 10px; line-height: 1.4; }
.migration-consent input { margin-top: 3px; min-height: auto; width: auto; }
.migration-warning { background: #fff4df; border-radius: 10px; color: #78511e; padding: 12px; }
.migration-actions { display: flex; gap: 10px; justify-content: flex-end; }
.connection-state { align-items: center; display: flex; gap: 7px; }
.connection-state i { background: #aaa; border-radius: 50%; height: 8px; width: 8px; }
.connection-state.connected i { background: var(--green); }
.platform-gate { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin: 60px auto; max-width: 560px; padding: 45px; text-align: center; }
.platform-gate h2 { font-size: 34px; letter-spacing: -.04em; margin: 0; }
.platform-gate p:not(.kicker) { color: var(--muted); line-height: 1.6; }
.platform-gate a { background: var(--green); border-radius: 9px; color: #fff; display: inline-block; font-weight: 800; margin-top: 12px; padding: 12px 18px; text-decoration: none; }
.operations-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.health-badge { background: var(--mint); border-radius: 999px; color: var(--green); font-size: 11px; font-weight: 850; padding: 8px 11px; text-transform: capitalize; }
.health-badge.degraded { background: #f8e5e2; color: #963b3b; }
.readiness-summary { color: var(--muted); margin: 12px 0 0; }
.readiness-checks { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.readiness-check { align-items: start; background: #f1f4ef; border: 1px solid transparent; border-radius: 12px; display: flex; gap: 11px; padding: 15px; }
.readiness-check > span { align-items: center; background: var(--mint); border-radius: 50%; color: var(--green); display: flex; flex: 0 0 25px; font-size: 13px; font-weight: 900; height: 25px; justify-content: center; }
.readiness-check div { display: grid; gap: 5px; }
.readiness-check strong { font-size: 13px; }
.readiness-check small { color: var(--muted); line-height: 1.35; }
.readiness-check.pending { background: #fff8ec; border-color: #f1dbb9; }
.readiness-check.pending > span { background: #f7dfbd; color: #875816; }
.health-summary { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 20px 0 8px; }
.health-summary div { background: #f1f4ef; border-radius: 10px; display: grid; gap: 3px; padding: 12px; }
.health-summary strong { font-size: 20px; }
.health-summary small { color: var(--muted); }
.worker-run-list { display: grid; gap: 9px; margin: 14px 0; }
.worker-run { align-items: center; background: rgba(79, 70, 229, .07); border: 1px solid rgba(79, 70, 229, .16); border-radius: 11px; display: grid; gap: 4px; grid-template-columns: 1fr auto; padding: 12px; }
.worker-run > div { display: grid; gap: 3px; }
.worker-run small, .worker-run p { color: var(--muted); font-size: 10px; }
.worker-run p { grid-column: 1 / -1; margin: 3px 0 0; }
.worker-run > span { background: var(--mint); border-radius: 999px; color: var(--green); font-size: 9px; font-weight: 850; padding: 6px 8px; text-transform: capitalize; }
.worker-run.failed { background: rgba(242, 107, 94, .08); border-color: rgba(242, 107, 94, .25); }
.worker-run.failed > span { background: rgba(242, 107, 94, .14); color: #963b3b; }
.worker-run.retention-preview { background: rgba(242, 107, 94, .06); border-color: rgba(242, 107, 94, .18); }
.worker-run.retention-preview > span { background: rgba(242, 107, 94, .14); color: #963b3b; }
.alert-list, .audit-list { display: grid; max-height: 360px; overflow-y: auto; }
.alert-item, .audit-item { border-top: 1px solid var(--line); display: grid; gap: 4px; padding: 14px 2px; }
.alert-item strong, .audit-item strong { font-size: 13px; }
.alert-item small, .audit-item small { color: var(--muted); }
.alert-item details, .alert-history, #ownerCampaignNotice details { margin-top: 10px; }
.alert-item summary, .alert-history > summary, #ownerCampaignNotice summary { cursor: pointer; font-weight: 650; }
.alert-item details p, #ownerCampaignNotice p { overflow-wrap: anywhere; line-height: 1.6; }
.alert-item details a, #ownerCampaignNotice a { display: inline-block; margin: 8px 0; }
#ownerCampaignNotice { padding: 20px 24px; border-radius: 12px; line-height: 1.6; }
#ownerCampaignNotice button { margin-top: 12px; padding: 10px 16px; border: 1px solid currentColor; border-radius: 8px; background: white; cursor: pointer; }
.alert-item button { background: #fff; border: 1px solid var(--line); border-radius: 7px; color: var(--green); font-size: 10px; font-weight: 800; justify-self: start; padding: 6px 8px; }
.severity { font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.severity.critical { color: #963b3b; }
.severity.warning { color: #ad5c22; }
@media (max-width: 850px) {
  .platform-shell { padding: 20px 16px 50px; }
  .platform-hero, .directory-heading { align-items: stretch; display: grid; gap: 20px; }
  .platform-metrics { grid-template-columns: repeat(2, 1fr); }
  .directory-filters { display: grid; }
  .directory-filters input, .directory-filters select { width: 100%; }
  .operations-grid { grid-template-columns: 1fr; }
  .readiness-checks { grid-template-columns: 1fr; }
  .migration-summary { grid-template-columns: 1fr; }
}
.platform-header-actions { display: flex; align-items: center; gap: 16px; }
.workspace-return { color: var(--green); font-weight: 750; text-decoration: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.directory-help, .directory-count { color: var(--muted); font-size: 13px; line-height: 1.5; }
.directory-count { margin: 22px 0 10px; }
.client-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }
.client-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: #fff; }
.client-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.client-card h3 { font-size: 19px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.client-card-heading p { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.client-status { background: #eeecff; color: #4f46b5; padding: 5px 9px; border-radius: 7px; font-size: 11px; text-transform: capitalize; white-space: nowrap; }
.client-connection { display: grid; gap: 7px; margin: 20px 0; font-size: 13px; }
.client-connection small { color: var(--muted); text-transform: capitalize; }
.client-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; background: #f7f7fb; border-radius: 12px; padding: 16px; margin: 0 0 20px; }
.client-stats dt, .client-stats small { color: var(--muted); font-size: 11px; }
.client-stats dd { margin: 6px 0; font-size: 25px; font-weight: 800; }
.client-open { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 12px 16px; background: #5144ed; color: white; border-radius: 10px; text-decoration: none; font-weight: 750; font-size: 14px; }
.client-open:hover { background: #4033cb; }
.client-open:focus-visible, .workspace-return:focus-visible, .client-management summary:focus-visible { outline: 3px solid #a79fff; outline-offset: 3px; }
.client-management { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.client-management summary { cursor: pointer; font-size: 13px; font-weight: 700; padding: 6px 0; color: var(--muted); }
.client-management p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.client-management-fields { display: grid; gap: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.client-management-fields label { font-size: 12px; margin: 0; }
.client-management-fields select { width: 100%; min-width: 0; font-size: 13px; }
.client-migration { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.client-migration small { color: var(--muted); font-size: 11px; }
.client-empty { padding: 30px; grid-column: 1 / -1; text-align: center; color: var(--muted); }
#numberTransferPanel { margin-top: 24px; }
#numberTransferForm:not([hidden]) { display: grid; gap: 16px; max-width: 780px; }
#numberTransferForm label { display: grid; gap: 8px; }
#numberTransferForm input, #numberTransferForm select, #numberTransferForm textarea { width: 100%; min-width: 0; }
#numberTransferStatus, #numberTransferSummary { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .client-grid { grid-template-columns: 1fr; }
  .client-card { padding: 16px; }
  .platform-directory { padding: 18px; }
  .platform-header { flex-wrap: wrap; gap: 16px; }
  .platform-header-actions { flex-wrap: wrap; gap: 8px; }
  .client-management-fields { grid-template-columns: 1fr; }
}
