/* Starkwood ONE HUB v2.3.0-H5.7.8 — Manage Access navigation cleanup fix */
/* Starkwood ONE HUB v2.3.0-H5.7 — Manage Access JSX visual parity correction */
.sw-h55-native-hidden{display:none!important}
.sw-h55-native-modal{display:block!important}
.sw-h55-root{width:100%;min-width:0}
.sw-h55-page{padding:32px;display:flex;flex-direction:column;gap:24px;color:#334155;font-family:inherit}

/* Page header — mirrors p-8 / text-xl / text-sm in the authoritative JSX. */
.sw-h55-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.sw-h55-header h1{font-size:20px;line-height:1.4;font-weight:700;color:#1e293b;margin:0}
.sw-h55-header p{font-size:14px;line-height:1.45;color:#64748b;margin:2px 0 0;max-width:none}
.sw-h55-header-actions{display:flex;gap:8px;flex-shrink:0}
.sw-h55-header-actions button{min-height:34px;padding:7px 12px;border-radius:8px;font-size:12px;line-height:1.25;font-weight:600;background:#fff;border:1px solid #2954e5;color:#2954e5;cursor:pointer}
.sw-h55-header-actions .primary{background:#2954e5;color:#fff}

/* Shared cards — rounded-2xl / border-slate-100 / shadow-sm. */
.sw-h55-card{background:#fff;border:1px solid #f1f5f9;border-radius:16px;box-shadow:0 1px 2px rgba(15,23,42,.05);overflow:hidden}
.sw-h55-card-head{padding:12px 20px;border-bottom:1px solid #f1f5f9}
.sw-h55-card-head.compact{padding:12px 20px}
.sw-h55-card-title{font-size:14px;line-height:1.4;font-weight:700;color:#334155}
.sw-h55-card-sub{font-size:11px;line-height:1.45;color:#94a3b8;margin-top:2px;max-width:none}
.sw-h55-table-wrap{width:100%;overflow-x:auto}

/* Pipeline / Dashboard grids. */
.sw-h55-grid,.sw-h55-departments table{width:100%;border-collapse:collapse;table-layout:auto}
.sw-h55-grid th,.sw-h55-grid td,.sw-h55-departments th,.sw-h55-departments td{border-bottom:1px solid #f8fafc;padding:10px 20px;font-size:14px;line-height:1.35;color:#475569;text-align:left;white-space:normal}
.sw-h55-grid th,.sw-h55-departments th{font-size:12px;font-weight:500;color:#94a3b8;background:#fff;border-bottom-color:#f1f5f9}
.sw-h55-grid th:not(:first-child),.sw-h55-grid td:not(:first-child){padding-left:12px;padding-right:12px;text-align:center}
.sw-h55-grid tr:last-child td,.sw-h55-departments tr:last-child td{border-bottom:0}
.sw-h55-card-foot{padding:10px 20px;font-size:11px;line-height:1.45;color:#94a3b8;border-top:1px solid #f1f5f9}


.sw-h55-grid-card .sw-h55-table-wrap{overflow-x:auto}
.sw-h55-grid-card .sw-h55-grid th:first-child,.sw-h55-grid-card .sw-h55-grid td:first-child{min-width:245px}
.sw-h55-grid-card .sw-h55-grid th:not(:first-child),.sw-h55-grid-card .sw-h55-grid td:not(:first-child){min-width:118px}
.sw-h55-grid-warning{margin:14px 20px;padding:12px 14px;border:1px solid #f7d58a;background:#fffaf0;border-radius:10px;color:#7c5a13;display:flex;flex-direction:column;gap:3px;font-size:12px;line-height:1.4}
.sw-h55-grid-warning strong{font-size:13px;color:#684b0b}

/* Checkbox/button treatment. Matrix toggles are 20x20 exactly like w-5 h-5 in JSX. */
.sw-h55-check{width:20px;height:20px;min-width:20px;border:1px solid #cbd2e0;border-radius:6px;background:#fff;color:#fff;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1;font-weight:800;vertical-align:middle;cursor:pointer;box-sizing:border-box}
.sw-h55-check.on{background:#2954e5;border-color:#2954e5}
.sw-h55-check.on.tone-approval{background:#c9994a;border-color:#c9994a}
.sw-h55-check.on.tone-backup{background:#2954e5;border-color:#2954e5}
.sw-h55-check.on.tone-price{background:#d34b4b;border-color:#d34b4b}
.sw-h55-check.on.tone-docs{background:#1d9a6c;border-color:#1d9a6c}
.sw-h55-check.on.tone-head{background:#7b5fbe;border-color:#7b5fbe}
.sw-h55-check.on.tone-hr{background:#c2568a;border-color:#c2568a}
.sw-h55-check.on.tone-encoder{background:#2596a6;border-color:#2596a6}
.sw-h55-check.on.tone-restricted{background:#8a6a22;border-color:#8a6a22}
.sw-h55-check.on.tone-homeowner{background:#2f7f5f;border-color:#2f7f5f}
.sw-h55-check.on.tone-payment{background:#6b4fa8;border-color:#6b4fa8}
.sw-h55-check.on.tone-reports{background:#3e6fa8;border-color:#3e6fa8}
.sw-h55-check.on.tone-module{background:#1d9a6c;border-color:#1d9a6c}
.sw-h55-check.on.tone-grid{background:#2954e5;border-color:#2954e5}
.sw-h55-grid .sw-h55-check{width:14px;height:14px;min-width:14px;border-radius:3px;font-size:10px}
.sw-h55-check:disabled{opacity:.5;cursor:wait}
.sw-h55-check:focus-visible{outline:2px solid rgba(41,84,229,.3);outline-offset:2px}

/* Document classification — typography and spacing copied from the JSX scale. */
.sw-h55-doc-tools{display:flex;align-items:center;gap:8px;padding:10px 20px;border-bottom:1px solid #f1f5f9}
.sw-h55-doc-tools input{flex:1;min-width:180px;height:32px;border:1px solid #e2e8f0;border-radius:8px;padding:0 10px;font-size:12px;color:#475569;outline:none;background:#fff}
.sw-h55-doc-tools input:focus{border-color:#94a3b8;box-shadow:0 0 0 2px rgba(148,163,184,.12)}
.sw-h55-doc-tools button,.sw-h55-doc-tools>span{min-height:30px;border:0;border-radius:8px;padding:6px 10px;background:#eef0f5;color:#41485a;font-size:11px;line-height:1.25;font-weight:600;display:inline-flex;align-items:center;justify-content:center}
.sw-h55-doc-tools>span{background:#f1f5f9;color:#64748b}
.sw-h55-doc-tools button.active{background:#0b1739;color:#fff}
.sw-h55-doc-groups{max-height:512px;overflow:auto}
.sw-h55-doc-group{border-bottom:1px solid #f1f5f9}
.sw-h55-doc-group:last-child{border-bottom:0}
.sw-h55-doc-group-head{width:100%;min-height:38px;padding:10px 20px;border:0;background:#f8fafc;display:flex;align-items:center;text-align:left;color:#475569;cursor:pointer}
.sw-h55-doc-group-head:hover{background:#f1f5f9}
.sw-h55-doc-group-head .chev{font-size:18px;line-height:1;color:#94a3b8;width:16px;transform:rotate(0deg);transition:transform .12s}
.sw-h55-doc-group-head .chev.open{transform:rotate(90deg)}
.sw-h55-doc-group-head .stage{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.025em;color:#475569}
.sw-h55-doc-group-head .meta{margin-left:auto;display:flex;align-items:center;gap:6px;font-size:10px;color:#94a3b8}
.sw-h55-doc-group-head .meta b{font-weight:600;color:#9a6700;background:#fff7d6;border-radius:999px;padding:3px 7px}
.sw-h55-doc-list{background:#fff}
.sw-h55-doc-row{min-height:38px;padding:8px 20px 8px 40px;border-top:1px solid #f8fafc;display:flex;align-items:center;gap:12px;font-size:12px;line-height:1.35;color:#334155}
.sw-h55-doc-row>span{flex:1;min-width:0}
.sw-h55-doc-row em{font-size:10px;color:#94a3b8;font-style:normal}
.sw-h55-doc-row select{height:30px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;padding:0 8px;font-size:12px;font-weight:600;color:#475569}

/* Main per-user matrix. Crucially: prototype min-width is 1700, not the previous forced 3900. */
.sw-h55-matrix-card{overflow:hidden}
.sw-h55-matrix-scroll{width:100%;overflow-x:auto;overflow-y:visible;position:relative}
.sw-h55-matrix{border-collapse:separate;border-spacing:0;width:100%;min-width:1700px;background:#fff;table-layout:auto}
.sw-h55-matrix th,.sw-h55-matrix td{border-right:0;border-bottom:1px solid #f8fafc;padding:12px;text-align:center;font-size:14px;line-height:1.3;color:#475569;vertical-align:middle;white-space:normal}
.sw-h55-matrix th{padding-top:10px;padding-bottom:10px;font-size:12px;line-height:1.25;font-weight:500;color:#94a3b8;border-bottom-color:#f1f5f9}
.sw-h55-matrix tbody tr:last-child td{border-bottom:0}
.sw-h55-matrix .identity.user{position:sticky;left:0;z-index:3;width:190px;min-width:190px;max-width:190px;text-align:left;background:#fff;padding-left:20px;padding-right:20px;box-shadow:1px 0 0 #f1f5f9}
.sw-h55-matrix thead .identity.user{z-index:5}
.sw-h55-matrix .identity.dept{width:160px;min-width:160px;text-align:left;background:#fff;padding-left:16px;padding-right:16px}
.sw-h55-matrix td.identity.user strong{display:block;font-size:14px;line-height:1.35;color:#334155;font-weight:500;white-space:normal}
.sw-h55-matrix td.identity.user small{display:block;font-size:11px;line-height:1.35;color:#94a3b8;margin-top:1px;white-space:normal}
.sw-h55-dept-pill{display:inline-block;background:#f1f5f9;color:#64748b;border-radius:999px;padding:4px 8px;font-size:11px;line-height:1.2;white-space:nowrap}

/* Exact pastel authority columns from v49 JSX. */
.sw-h55-matrix .tone-approval{background:#fbf6e9}
.sw-h55-matrix .tone-backup{background:#eff3fc}
.sw-h55-matrix .tone-price{background:#fdeff3}
.sw-h55-matrix .tone-docs{background:#effaf3}
.sw-h55-matrix .tone-head{background:#f3f0fa}
.sw-h55-matrix .tone-hr{background:#fdf0f6}
.sw-h55-matrix .tone-encoder{background:#eef9fa}
.sw-h55-matrix .tone-restricted{background:#f5f0e6}
.sw-h55-matrix .tone-homeowner{background:#eaf4f0}
.sw-h55-matrix .tone-payment{background:#f0edf7}
.sw-h55-matrix .tone-reports{background:#e8eff7}
.sw-h55-matrix th[class*="tone-"],.sw-h55-matrix td[class*="tone-"]{min-width:112px}
.sw-h55-matrix .module-head,.sw-h55-matrix .module-cell{background:#fff;min-width:90px}
.sw-h55-always{display:inline-block;color:#1d9a6c;background:#ecfdf5;border-radius:999px;padding:4px 8px;font-size:11px;line-height:1.2;font-weight:600;white-space:nowrap}
.sw-h55-always.na{color:#64748b;background:#f1f5f9}
.sw-h55-full-access{background:#fff!important;text-align:center!important}
.sw-h55-full-access span{display:inline-block;color:#1d9a6c;background:#ecfdf5;border-radius:999px;padding:4px 8px;font-size:11px;line-height:1.2;font-weight:600}

/* Departments table. */
.sw-h55-departments .sw-h55-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:0}
.sw-h55-departments td:nth-child(1){font-weight:500;color:#334155}

.sw-h55-loading,.sw-h55-load-error{margin:32px;background:#fff;border:1px solid #f1f5f9;border-radius:16px;padding:30px;color:#64748b;font-size:14px}
.sw-h55-load-error{display:flex;flex-direction:column;gap:8px}
.sw-h55-load-error strong{color:#1e293b}
.sw-h55-load-error button{width:max-content;border:0;border-radius:8px;background:#2954e5;color:#fff;padding:8px 12px;font-size:12px;font-weight:700}
.sw-h55-toast{position:fixed;right:18px;bottom:18px;z-index:1000000;background:#102443;color:#fff;padding:10px 13px;border-radius:9px;font:600 11px/1.3 Arial,sans-serif;box-shadow:0 12px 32px rgba(16,36,67,.25);opacity:0;transform:translateY(5px);transition:.16s}
.sw-h55-toast.show{opacity:1;transform:none}
.sw-h55-toast.bad{background:#b33e48}
.sw-h55-root.is-busy{cursor:progress}
.sw-h55-root.is-busy button,.sw-h55-root.is-busy select{pointer-events:none}
.sw-h55-matrix-scroll::-webkit-scrollbar,.sw-h55-table-wrap::-webkit-scrollbar,.sw-h55-doc-groups::-webkit-scrollbar{height:10px;width:9px}
.sw-h55-matrix-scroll::-webkit-scrollbar-thumb,.sw-h55-table-wrap::-webkit-scrollbar-thumb,.sw-h55-doc-groups::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:8px}
.sw-h55-matrix-scroll::-webkit-scrollbar-track,.sw-h55-table-wrap::-webkit-scrollbar-track{background:#f8fafc}

@media(max-width:900px){
  .sw-h55-page{padding:20px 14px;gap:18px}
  .sw-h55-header{flex-direction:column}
  .sw-h55-header-actions{align-self:flex-end}
  .sw-h55-header p{font-size:13px}
  .sw-h55-card-sub{font-size:11px}
  .sw-h55-doc-tools{flex-wrap:wrap}
  .sw-h55-doc-tools input{flex-basis:100%}
}
