/* CornerstoneNow Hub — dashboard design system */
:root {
	--bg: #f5f7fa;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--text: #0f172a;
	--text-2: #334155;
	--muted: #64748b;
	--faint: #94a3b8;
	--border: #e2e8f0;
	--border-strong: #cbd5e1;
	--primary: #007bc2;
	--primary-600: #00679f;
	--primary-50: #e8f4fb;
	--primary-100: #cfe8f6;
	--side: #0a1c2e;
	--side-2: #102a43;
	--side-text: #9fb3c8;
	--success: #15803d; --success-bg: #e8f7ee;
	--warn: #b45309; --warn-bg: #fef3e2;
	--danger: #b91c1c; --danger-bg: #fdecec;
	--base: #15803d; --base-bg: #e8f7ee;
	--addon: #1d4ed8; --addon-bg: #e8effd;
	--nego: #b45309; --nego-bg: #fef3e2;
	--radius: 10px;
	--radius-sm: 7px;
	--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
	--shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.lh { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
.lh a { color: var(--primary); text-decoration: none; }
.lh a:hover { text-decoration: underline; }
.lh h1, .lh h2, .lh h3 { margin: 0; color: var(--text); letter-spacing: -.01em; }
.lh h1 { font-size: 22px; font-weight: 650; }
.lh h2 { font-size: 15px; font-weight: 600; }
.lh h3 { font-size: 13px; font-weight: 600; }
.lh p { margin: 0; }
.lh code, .lh .mono { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; color: var(--text-2); }
.lh svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.lh-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.lh-side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; }
.lh-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; padding: 4px 8px 22px; font-weight: 650; font-size: 15px; line-height: 1.15; }
.lh-brand-dark { color: var(--text) !important; padding: 0; }
.lh-logo { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.lh-brand-dark .lh-logo { width: 40px; height: 40px; }
.lh-wordmark em { display: block; font-style: normal; font-weight: 500; font-size: 12px; color: #5fc3ee; letter-spacing: .02em; }
.lh-brand-dark .lh-wordmark { font-size: 18px; }
.lh-brand-dark .lh-wordmark em { color: var(--primary); font-size: 13px; }
.lh-nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5d7590; padding: 14px 10px 6px; }
.lh-nav { display: flex; flex-direction: column; gap: 2px; }
.lh-nav-item { display: flex; align-items: center; gap: 10px; color: var(--side-text) !important; text-decoration: none !important; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.lh-nav-item:hover { background: var(--side-2); color: #fff !important; }
.lh-nav-item.is-active { background: rgba(0, 123, 194, .22); color: #fff !important; box-shadow: inset 2px 0 0 #3fb1ea; }
.lh-nav-item.is-soon { opacity: .45; cursor: default; }
.lh-nav-item.is-soon:hover { background: none; color: var(--side-text) !important; }
.lh-soon { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; }
.lh-side-foot { margin-top: auto; border-top: 1px solid #1c3550; padding: 12px 10px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.lh-avatar { width: 30px; height: 30px; border-radius: 50%; background: #1e4b73; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.lh-side-foot .lh-user { min-width: 0; flex: 1; }
.lh-side-foot .lh-user span { display: block; color: #dbe7f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-side-foot a { color: var(--side-text) !important; font-size: 12px; }

.lh-main { min-width: 0; }
.lh-content { max-width: 1320px; margin: 0 auto; padding: 24px 32px 64px; }

/* ---------- page header ---------- */
.lh-crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.lh-crumbs a { color: var(--muted); }
.lh-crumbs .sep { color: var(--faint); }
.lh-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.lh-pagehead .lh-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lh-pagehead .lh-sub { color: var(--muted); margin-top: 4px; max-width: 760px; }
.lh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- tabs (sub-pages) ---------- */
.lh-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -4px 0 22px; overflow-x: auto; scrollbar-width: none; }
.lh-tabs::-webkit-scrollbar { display: none; }
.lh-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; color: var(--muted) !important; text-decoration: none !important; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.lh-tab:hover { color: var(--text) !important; }
.lh-tab.is-active { color: var(--primary) !important; border-color: var(--primary); }
.lh-tab .lh-count { font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 0 7px; color: var(--muted); }

/* segmented control */
.lh-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.lh-seg button { font: inherit; font-size: 13px; border: 0; background: none; padding: 6px 12px; border-radius: 6px; color: var(--muted); cursor: pointer; font-weight: 500; }
.lh-seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- cards ---------- */
.lh-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.lh-card + .lh-card, .lh-card + .lh-grid, .lh-grid + .lh-card { margin-top: 20px; }
.lh-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lh-card-head .lh-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.lh-card-body { padding: 20px; }
.lh-card-body.flush { padding: 0; }
.lh-card-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lh-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.lh-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.lh-grid.main-side { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 1100px) { .lh-grid.main-side { grid-template-columns: 1fr; } }

.lh-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); margin-bottom: 20px; }
.lh-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.lh-stat .k { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.lh-stat .v { font-size: 26px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lh-stat .s { color: var(--muted); font-size: 12px; }

/* key/value list */
.lh-kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; font-size: 13px; }
.lh-kv dt { color: var(--muted); }
.lh-kv dd { margin: 0; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }

/* flow explainer */
.lh-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.lh-flow-step { padding: 18px 20px; position: relative; }
.lh-flow-step + .lh-flow-step { border-left: 1px solid var(--border); }
.lh-flow-step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 12px; margin-bottom: 8px; }
.lh-flow-step p { color: var(--muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 860px) { .lh-flow { grid-template-columns: 1fr; } .lh-flow-step + .lh-flow-step { border-left: 0; border-top: 1px solid var(--border); } }

/* callout */
.lh-callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--primary-50); border: 1px solid var(--primary-100); color: #0b4f78; font-size: 13px; }
.lh-callout svg.i { margin-top: 2px; }
.lh-callout.warn { background: var(--warn-bg); border-color: #f6d9ab; color: #7c3d06; }
.lh-callout + * { margin-top: 16px; }

/* ---------- buttons ---------- */
.lh-btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text) !important; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.lh-btn:hover { background: var(--surface-2); border-color: var(--faint); }
.lh-btn:focus-visible, .lh-input:focus-visible, .lh-tab:focus-visible, .lh-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lh-btn:disabled { opacity: .55; cursor: progress; }
.lh-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff !important; }
.lh-btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.lh-btn-ghost { border-color: transparent; background: transparent; }
.lh-btn-danger { color: var(--danger) !important; border-color: #f1c4c4; }
.lh-btn-danger:hover { background: var(--danger-bg); border-color: #e9a5a5; }
.lh-btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.lh-btn-block { width: 100%; }
.lh-icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.lh-icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- forms ---------- */
.lh-input { font: inherit; height: 36px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 0; width: 100%; }
textarea.lh-input { height: auto; padding: 8px 11px; }
select.lh-input { padding-right: 28px; }
.lh-input:focus { outline: 2px solid var(--primary-100); border-color: var(--primary); }
.lh-field { display: flex; flex-direction: column; gap: 6px; }
.lh-field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.lh-field small { color: var(--muted); font-size: 12px; }
.lh-form { display: grid; gap: 16px; }
.lh-form.two { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.lh-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.lh-check input { margin-top: 3px; }
.lh-check.is-locked { color: var(--faint); }
.lh-inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.lh-inline-form .lh-input { flex: 1 1 200px; width: auto; }
.lh-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.lh-search svg.i { position: absolute; left: 11px; top: 10px; color: var(--faint); }
.lh-search .lh-input { padding-left: 34px; }
.lh-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.lh-toolbar .grow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 0; }
.lh-file { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface-2); }
.lh-file input { max-width: 100%; }
.lh-file p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.lh-radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.lh-radio-card { display: flex; gap: 10px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px; cursor: pointer; }
.lh-radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.lh-radio-card b { display: block; font-weight: 600; font-size: 13px; }
.lh-radio-card small { color: var(--muted); font-size: 12px; }

/* ---------- badges ---------- */
.lh-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.lh-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lh-badge.ok { background: var(--success-bg); color: var(--success); border-color: transparent; }
.lh-badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.lh-badge.off { background: #f1f5f9; color: var(--muted); }
.lh-badge.shared { background: var(--primary-50); color: var(--primary-600); border-color: transparent; }
.lh-badge.private { background: #f3e8ff; color: #7e22ce; border-color: transparent; }

/* ---------- tables ---------- */
.lh-table-wrap { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.lh-table-wrap.tall { max-height: 70vh; }
.lh-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.lh-table-wrap > .lh-table, .lh-table-wrap > div > .lh-table { min-width: 100%; }
.lh-table th, .lh-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
.lh-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; }
.lh-table tbody tr:hover td { background: #fbfcfe; }
.lh-table tbody tr:last-child td { border-bottom: 0; }
.lh-table td.wrap { white-space: normal; min-width: 260px; }
.lh-table .lh-sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 220px; white-space: normal; box-shadow: 1px 0 0 var(--border); }
.lh-table thead .lh-sticky-col { z-index: 3; background: var(--surface-2); }
.lh-table tbody tr:hover .lh-sticky-col { background: #fbfcfe; }
.lh-th-svc { text-align: center !important; min-width: 96px; }
.lh-th-svc .nm { color: var(--text-2); display: block; }
.lh-th-svc .pr { color: var(--faint); font-weight: 500; display: block; }
.lh-th-svc.is-private .nm::after { content: "Private"; display: inline-block; margin-left: 5px; font-size: 10px; color: #7e22ce; background: #f3e8ff; border-radius: 4px; padding: 0 4px; }
.lh-th-svc.is-locked .nm::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; opacity: .6; }
.lh-row-actions { visibility: hidden; display: inline-flex; margin-left: 4px; vertical-align: middle; }
tr:hover .lh-row-actions, tr:focus-within .lh-row-actions { visibility: visible; }
td.lh-c { text-align: center; padding: 5px 8px; }

/* status cells */
.lh-cell { width: 100%; min-width: 52px; height: 30px; border: 1px solid transparent; background: transparent; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 700; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; }
.lh-cell:hover { border-color: var(--border-strong); background: var(--surface); }
.lh-cell.is-base { background: var(--base-bg); color: var(--base); }
.lh-cell.is-addon { background: var(--addon-bg); color: var(--addon); }
.lh-cell.is-nego { background: var(--nego-bg); color: var(--nego); }
.lh-cell.is-saving { opacity: .5; }
.lh-cell[disabled] { cursor: not-allowed; opacity: .8; }
.lh-cell[disabled]:hover { border-color: transparent; }
.lh-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lh-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 5px; font-weight: 700; font-size: 12px; background: #f1f5f9; color: var(--faint); }
.lh-chip.is-base { background: var(--base-bg); color: var(--base); }
.lh-chip.is-addon { background: var(--addon-bg); color: var(--addon); }
.lh-chip.is-nego { background: var(--nego-bg); color: var(--nego); }

/* column chooser */
.lh-cols { list-style: none; margin: 0; padding: 0; }
.lh-cols li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lh-cols li:last-child { border-bottom: 0; }
.lh-cols li.is-off { background: var(--surface-2); }
.lh-cols li.is-off .nm { color: var(--faint); }
.lh-cols .nm { flex: 1 1 160px; min-width: 0; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.lh-cols .lh-input { width: 130px; flex: none; height: 32px; }
.lh-cols .ord { display: inline-flex; gap: 4px; }

/* feed */
.lh-feed { list-style: none; margin: 0; padding: 0; }
.lh-feed li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.lh-feed li:last-child { border-bottom: 0; }
.lh-feed .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); flex: none; }
.lh-feed .tx { min-width: 0; }
.lh-feed .tx span { display: block; color: var(--text-2); overflow-wrap: anywhere; }
.lh-feed time { color: var(--faint); font-size: 12px; }

/* empty state */
.lh-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.lh-empty .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 12px; }
.lh-empty h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.lh-empty .lh-btn { margin-top: 14px; }
.lh-skel { padding: 28px 20px; color: var(--faint); }

/* shortcode box */
.lh-copy { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 6px 6px 6px 12px; }
.lh-copy code { border: 0; background: none; padding: 0; flex: 1; overflow-x: auto; white-space: nowrap; }

.lh-pre { background: #0b1220; color: #dbe4ee; padding: 14px; border-radius: 8px; overflow: auto; font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; margin: 0; }
.lh-result { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lh-result .lh-kv { padding: 14px; }
.lh-result-head { padding: 10px 14px; background: var(--success-bg); color: var(--success); font-weight: 600; font-size: 13px; }

/* dialogs */
.lh-dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 94vw); box-shadow: var(--shadow-lg); color: var(--text); }
.lh-dialog.wide { width: min(900px, 94vw); }
.lh-dialog::backdrop { background: rgba(10, 20, 35, .45); }
.lh-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.lh-dialog-body { padding: 20px; display: grid; gap: 14px; }
.lh-dialog-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: flex-end; gap: 8px; }
.lh-key { font: 12px/1.5 var(--mono); }

/* toasts */
.lh-toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.lh-toast { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 380px; font-size: 13px; }
.lh-toast.is-error { background: var(--danger); }

/* login */
.lh-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 10% -10%, #d7ecf8, transparent), var(--bg); }
.lh-login-card { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.lh-alert { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 13px; }

/* preview table (mirrors the website table) */
.lh-preview-table th { text-align: center !important; background: var(--primary) !important; color: #fff !important; }
.lh-preview-table th a { color: #fff; text-decoration: underline; }
.lh-preview-table td { text-align: center; }
.lh-preview-table td:first-child { text-align: left; font-weight: 500; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
.lh-preview-table thead th:first-child { position: sticky; left: 0; z-index: 3; }
.lh-preview-table tr.is-pinned td:first-child { color: var(--primary-600); }
.lh-ico-base { color: var(--base); font-weight: 700; }
.lh-ico-addon { color: var(--addon); font-weight: 700; }
.lh-ico-nego { color: var(--nego); font-weight: 700; }

.lh-muted { color: var(--muted); }
.lh-small { font-size: 12px; }
.lh-nowrap { white-space: nowrap; }
.lh-stack { display: grid; gap: 16px; }
.lh-hide { display: none !important; }
.lh-scroll-hint { display: none; font-size: 12px; color: var(--muted); padding: 8px 20px; border-top: 1px solid var(--border); }
.lh-split { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
	.lh-shell { grid-template-columns: minmax(0, 1fr); }
	.lh-side { position: static; height: auto; padding: 12px 14px; }
	.lh-brand { padding: 2px 4px 10px; }
	.lh-nav { flex-direction: row; flex-wrap: wrap; }
	.lh-nav-group { display: none; }
	.lh-nav-item.is-soon { display: none; }
	.lh-side-foot { margin-top: 8px; }
	.lh-content { padding: 18px 16px 48px; }
	.lh-scroll-hint { display: block; }
	.lh-kv { grid-template-columns: 1fr; gap: 2px 0; }
	.lh-kv dd { margin-bottom: 8px; }
	.lh-table .lh-sticky-col { min-width: 140px; max-width: 170px; }
	.lh-search { max-width: none; }
}

/* polish */
.lh-grid { align-items: start; }
.lh-kv { grid-template-columns: 210px minmax(0, 1fr); }
.lh-kv dt .lh-badge { margin-right: 6px; }
.lh-cell[disabled] { opacity: 1; background: transparent; color: var(--faint); }
.lh-cell[disabled].is-base { background: #f1f8f3; color: #5f9b70; }
.lh-cell[disabled].is-addon { background: #f1f4fb; color: #6b85c4; }
.lh-cell[disabled].is-nego { background: #fdf6ec; color: #c08a4a; }
.lh-th-svc.is-locked { color: var(--faint); }
.lh-th-svc.is-locked .nm { color: var(--muted); font-weight: 500; }

/* =========================================================
   Sidebar v2 — light, modern SaaS layout
   ========================================================= */
.lh-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); padding: 14px 12px 12px; overflow: hidden; z-index: 40; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px; }
.sb-brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; min-width: 0; }
.sb-logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 123, 194, .15), 0 2px 6px rgba(0, 123, 194, .18); flex: none; }
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sb-brand-text strong { color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.sb-brand-text small { color: var(--muted); font-size: 12px; }
.sb-close { display: none; }

.sb-jump { position: relative; display: flex; align-items: center; margin: 0 2px 14px; }
.sb-jump svg.i { position: absolute; left: 10px; color: var(--faint); width: 15px; height: 15px; pointer-events: none; }
.sb-jump input { font: inherit; font-size: 13px; width: 100%; height: 34px; padding: 0 34px 0 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); }
.sb-jump input::placeholder { color: var(--faint); }
.sb-jump input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.sb-jump input::-webkit-calendar-picker-indicator { display: none !important; }
.sb-jump kbd { position: absolute; right: 8px; font: 11px/1 var(--font); color: var(--faint); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; background: #fff; pointer-events: none; }

.sb-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.sb-section { display: flex; flex-direction: column; gap: 1px; padding-bottom: 14px; }
.sb-section + .sb-section { border-top: 1px solid var(--border); padding-top: 14px; }
.sb-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sb-heading a { color: var(--faint); display: inline-flex; border-radius: 5px; padding: 2px; }
.sb-heading a:hover { color: var(--primary); background: var(--primary-50); }
.sb-heading svg.i { width: 14px; height: 14px; }

.sb-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--text-2) !important; text-decoration: none !important; font-weight: 500; font-size: 13.5px; position: relative; transition: background .12s, color .12s; }
.sb-item svg.i { color: var(--muted); width: 17px; height: 17px; transition: color .12s; }
.sb-item:hover { background: var(--surface-2); color: var(--text) !important; }
.sb-item:hover svg.i { color: var(--text-2); }
.sb-item.is-active { background: var(--primary-50); color: var(--primary-600) !important; font-weight: 600; }
.sb-item.is-active svg.i { color: var(--primary); }
.sb-item.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sb-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sb-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-count { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 0 7px; line-height: 18px; }
.sb-item.is-active .sb-count { background: #fff; color: var(--primary-600); border-color: var(--primary-100); }

.sb-site { height: 32px; font-size: 13px; }
.sb-mono { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--primary-600); background: var(--primary-50); border: 1px solid var(--primary-100); flex: none; }
.sb-item.is-active .sb-mono { background: var(--primary); color: #fff; border-color: var(--primary); }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px #fff; }
.sb-dot.ok { background: #22c55e; }
.sb-dot.warn { background: #f59e0b; }
.sb-dot.off { background: var(--border-strong); }
.sb-more { font-size: 12px; color: var(--muted) !important; padding: 6px 10px; }

.sb-bottom { padding-top: 12px; display: grid; gap: 10px; }
.sb-promo { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, #f0f8fd, #eef2ff); border: 1px solid #dbeafe; font-size: 12px; color: var(--text-2); }
.sb-promo strong { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 2px; }
.sb-promo span { color: var(--muted); line-height: 1.4; }
.sb-promo-ic { width: 28px; height: 28px; border-radius: 8px; background: #fff; display: grid; place-items: center; color: var(--primary); box-shadow: var(--shadow); flex: none; }
.sb-promo-ic svg.i { width: 15px; height: 15px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px 6px 2px; border-top: 1px solid var(--border); }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 13px; color: #fff; background: linear-gradient(135deg, #0ea5e9, #007bc2); flex: none; }
.sb-user-text { flex: 1; min-width: 0; line-height: 1.2; }
.sb-user-text strong { display: block; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* content area gets a subtle top separation from the sidebar */
.lh-main { background: var(--bg); }

/* mobile: top bar + slide-in drawer */
.lh-mobilebar { display: none; }
.sb-scrim[hidden] { display: none; }
@media (max-width: 960px) {
	.lh-shell { grid-template-columns: minmax(0, 1fr); }
	.lh-mobilebar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border); }
	.sb-brand-mini { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-weight: 650; font-size: 14px; text-decoration: none !important; }
	.sb-brand-mini img { border-radius: 8px; }
	.sb { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
	.sb.is-open { transform: none; }
	.sb-close { display: inline-flex; }
	.sb-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .38); z-index: 35; }
	.sb-item.is-active::before { left: -12px; }
	body.lh-drawer-open { overflow: hidden; }
}
.sb-user { min-width: 0; }
.sb-user-text { overflow: hidden; }
.sb-user .lh-icon-btn { flex: none; }
.sb-avatar { font-size: 12px; letter-spacing: .02em; }

/* =========================================================
   Typography v2 — Inter, stronger contrast, clearer hierarchy
   ========================================================= */
@font-face { font-family: "InterVariable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "InterVariable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
	--font: "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--text: #0b1220;
	--text-2: #1f2a3d;
	--muted: #4a5a70;
	--faint: #7d8ba1;
	--border: #e3e8ef;
	--border-strong: #c9d2de;
}
body.lh { font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--text); font-feature-settings: "cv11", "ss01", "ss03"; text-rendering: optimizeLegibility; }
.lh h1 { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.lh h2 { font-size: 16px; font-weight: 650; letter-spacing: -.012em; }
.lh h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.lh-pagehead .lh-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.lh-crumbs { font-size: 13px; font-weight: 500; }
.lh-card-head .lh-desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.5; }
.lh-field > span { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.lh-field small { font-size: 12.5px; color: var(--muted); }
.lh-input { font-size: 14.5px; color: var(--text); height: 40px; }
.lh-btn { font-weight: 600; font-size: 14px; letter-spacing: -.005em; }
.lh-btn-sm { font-size: 13px; }
.lh-tab { font-weight: 550; font-size: 14px; color: var(--muted) !important; }
.lh-tab.is-active { color: var(--primary-600) !important; font-weight: 650; }
.lh-table { font-size: 13.5px; }
.lh-table thead th { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lh-th-svc .nm { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-2); }
.lh-th-svc .pr { text-transform: none; letter-spacing: 0; }
.lh-stat .k { font-size: 13px; font-weight: 550; color: var(--muted); }
.lh-stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.lh-stat .s { font-size: 12.5px; color: var(--muted); }
.lh-feed .tx span { color: var(--text-2); font-weight: 500; }
.lh-kv { font-size: 14px; }
.lh-kv dt { color: var(--muted); font-weight: 500; }
.lh-kv dd { color: var(--text); font-weight: 500; }
.lh-badge { font-weight: 600; font-size: 12px; }
.lh code, .lh .mono { font-size: 12.5px; }
.sb-item { font-size: 14px; font-weight: 550; color: var(--text-2) !important; }
.sb-brand-text strong { font-size: 15px; font-weight: 700; }
.sb-heading { font-weight: 650; color: var(--faint); }

/* tabs: disabled "soon" tabs */
.lh-tab.is-soon { color: var(--faint) !important; cursor: not-allowed; }
.lh-tab.is-soon svg.i { opacity: .7; }
.lh-soon-pill { font-size: 10.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: #7c3aed; background: #f3e8ff; border-radius: 99px; padding: 1px 7px; }

/* =========================================================
   Settings layout + modules
   ========================================================= */
.lh-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.lh-settings-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.lh-settings-nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 8px; color: var(--muted) !important; font-weight: 550; text-decoration: none !important; }
.lh-settings-nav a:hover { background: #fff; color: var(--text) !important; }
.lh-settings-nav a.is-active { background: #fff; color: var(--text) !important; box-shadow: var(--shadow); }
.lh-settings-nav a.is-active svg.i { color: var(--primary); }
.lh-settings-body { display: grid; gap: 24px; min-width: 0; grid-column: 2; }
.lh-settings-extra { margin-top: 24px; }
.lh-settings > form { grid-column: 2; grid-row: 1; }
.lh-settings > .lh-settings-nav { grid-row: 1 / span 2; }
.lh-settings-body > section { scroll-margin-top: 20px; }
.lh-readonly { height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.lh-section-head { margin-bottom: 14px; }
.lh-section-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.lh-section-head p { color: var(--muted); margin-top: 4px; max-width: 760px; }

.lh-modules { display: grid; gap: 16px; }
.lh-module { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.lh-module.is-soon { background: linear-gradient(180deg, #fbfcfe, #fff); border-style: dashed; border-color: var(--border-strong); box-shadow: none; }
.lh-module-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; }
.lh-module-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.lh-module-ic svg.i { width: 20px; height: 20px; }
.lh-module.is-soon .lh-module-ic { background: #f3e8ff; color: #7c3aed; }
.lh-module-title { flex: 1; min-width: 0; }
.lh-module-title h3 { font-size: 15.5px; }
.lh-module-title p { color: var(--muted); margin-top: 3px; font-size: 13.5px; max-width: 640px; }
.lh-badge.soon { background: #f3e8ff; color: #7c3aed; border-color: transparent; }
.lh-badge.soon svg.i { width: 13px; height: 13px; }
.lh-module-features { list-style: none; margin: -4px 0 0; padding: 0 20px 14px 74px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.lh-module-features li { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.lh-module-features svg.i { width: 14px; height: 14px; color: #7c3aed; }
.lh-perm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.lh-module.is-soon .lh-perm-list { border-top-style: dashed; }
.lh-perm-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 14px 74px; }
.lh-perm-list li + li { border-top: 1px solid #eef1f5; }
.lh-lock { color: var(--faint); display: inline-flex; }
.lh-lock svg.i { width: 15px; height: 15px; }

.lh-switch { display: flex; align-items: center; gap: 14px; cursor: pointer; min-width: 0; }
.lh-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lh-switch .track { width: 40px; height: 23px; border-radius: 99px; background: var(--border-strong); position: relative; flex: none; transition: background .15s; }
.lh-switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.lh-switch input:checked + .track { background: var(--primary); }
.lh-switch input:checked + .track::after { transform: translateX(17px); }
.lh-switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.lh-switch .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lh-switch .txt strong { font-weight: 600; color: var(--text); font-size: 14px; }
.lh-switch .txt small { color: var(--muted); font-size: 13px; }
.lh-switch.is-locked { cursor: not-allowed; }
.lh-switch.is-locked .txt strong { color: var(--muted); }
.lh-switch.is-locked .track { background: #e8ecf1; }

.lh-savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px 12px 18px; background: rgba(11, 18, 32, .92); color: #dbe4ee; border-radius: 12px; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); font-size: 13.5px; }
.lh-savebar .lh-btn-primary { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }

.lh-row-ic { display: flex; gap: 14px; align-items: flex-start; }
.lh-danger { border-color: #f3c9c9; }
.lh-danger .lh-module-ic { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 960px) {
	.lh-settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.lh-settings-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; grid-row: auto; }
	.lh-settings-nav a { white-space: nowrap; background: #fff; border: 1px solid var(--border); }
	.lh-settings-body, .lh-settings > form { grid-column: 1; grid-row: auto; }
	.lh-settings > .lh-settings-nav { grid-row: auto; }
	.lh-module-features, .lh-perm-list li { padding-left: 20px; }
	.lh-module-head { flex-wrap: wrap; }
	.lh-module-title { flex-basis: calc(100% - 60px); }
}
.lh-settings { row-gap: 20px; }
.lh-settings-extra { margin-top: 0; }
.lh-settings .lh-card-head > .lh-btn { align-self: center; }
@media (max-width: 640px) {
  .lh-savebar { flex-wrap: nowrap; padding: 10px 10px 10px 14px; bottom: 10px; }
  .lh-savebar > span { font-size: 12.5px; line-height: 1.35; }
  .lh-savebar .lh-btn { flex: none; }
}
/* Streaming channels side nav */
.lh-subnav-title { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 2px 12px 8px; }
.lh-subnav a { height: auto; padding: 9px 12px; align-items: flex-start; }
.lh-subnav a svg.i { margin-top: 2px; flex: none; }
.lh-subnav-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lh-subnav-txt strong { font-weight: 600; color: inherit; }
.lh-subnav-txt small { font-size: 12px; font-weight: 450; color: var(--faint); line-height: 1.35; }
.lh-subnav a.is-active .lh-subnav-txt strong { color: var(--text); }
.lh-subpage-main { gap: 20px; }
.lh-subpage-main .lh-grid.main-side { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1400px) { .lh-subpage-main .lh-grid.main-side { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 960px) {
  .lh-subnav-title, .lh-subnav-txt small { display: none; }
  .lh-subnav a { align-items: center; height: 38px; padding: 0 12px; }
  .lh-subnav a svg.i { margin-top: 0; }
}
.lh-grid > .lh-card + .lh-card, .lh-grid > aside.lh-card { margin-top: 0; align-self: start; }
[data-lh-rows] .lh-sticky-col .lh-input { min-width: 230px; }
