/* THRev vNext v0.2.8 — Console visual baseline reset.
   Source of truth: the proven console.threv.co V0.34 visual language,
   retained on Flat Able Bootstrap 5. Company CI and user preferences are additive. */
:root{
  --threv-brand-primary:var(--threv-primary,#27bdbe);
  --threv-brand-primary-rgb:var(--threv-primary-rgb,39,189,190);
  --threv-console-bg:#f5f7fb;
  --threv-console-sidebar:var(--threv-sidebar-bg,#111827);
  --threv-console-card:#fff;
  --threv-console-border:#e6eaf0;
  --threv-console-text:#111827;
  --threv-console-muted:#64748b;
  --threv-font-scale:1.10;
  --threv-ui-font-size:calc(14px * var(--threv-font-scale));
  --threv-label-font-size:calc(13px * var(--threv-font-scale));
  --threv-small-font-size:calc(12px * var(--threv-font-scale));
}
html,body{font-family:var(--threv-font-family,Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif)}
body{background:var(--threv-console-bg);color:var(--threv-console-text)}
a{text-decoration:none}
.pc-header,.pc-sidebar,.pc-container{font-size:var(--threv-ui-font-size)}
.pc-header .btn,.pc-header select,.pc-sidebar .pc-link{font-size:var(--threv-ui-font-size)}

/* Sidebar — copied back toward the existing Console proportions. */
.pc-sidebar{background:var(--threv-console-sidebar);box-shadow:none}
.pc-sidebar .m-header{min-height:74px;background:var(--threv-console-sidebar);border-bottom:1px solid var(--threv-sidebar-border);padding:0 12px;justify-content:flex-start}
.pc-sidebar .navbar-content{padding-bottom:32px}
.threv-brand{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:52px;color:var(--threv-sidebar-text)!important}
.threv-logo-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--threv-primary);color:#fff;font-size:12px;font-weight:800;flex:0 0 34px}
.threv-logo-word{font-size:1.18rem;font-weight:800;letter-spacing:-.025em;color:var(--threv-sidebar-text)}
.threv-company-logo{display:block;max-width:145px;max-height:38px;width:auto;height:auto;object-fit:contain}
.threv-company-logo-compact{display:none;max-width:38px;max-height:38px}
.pc-sidebar.pc-sidebar-hide .threv-company-logo-main{display:none}
.pc-sidebar.pc-sidebar-hide .threv-company-logo-compact{display:block}
.threv-product-tag{font-size:.68rem;color:var(--threv-sidebar-muted);border:1px solid var(--threv-sidebar-border);border-radius:999px;padding:.15rem .45rem;white-space:nowrap}
.threv-nav-disabled{opacity:.45;pointer-events:none}
.pc-sidebar .pc-navbar .pc-caption{padding-top:19px;padding-bottom:6px}
.pc-sidebar .pc-navbar .pc-caption label{color:var(--threv-sidebar-caption)!important;letter-spacing:.08em;font-size:calc(10px * var(--threv-font-scale));font-weight:700;text-transform:uppercase}
.pc-sidebar .pc-navbar .pc-link{min-height:44px;padding-top:9px;padding-bottom:9px;color:var(--threv-sidebar-link);font-weight:500}
.pc-sidebar .pc-navbar .pc-link .pc-micon{color:var(--threv-sidebar-muted)}
.pc-sidebar .pc-navbar .pc-link:hover{background:var(--threv-sidebar-hover);color:var(--threv-sidebar-text)}
.pc-sidebar .pc-navbar>.pc-item.active>.pc-link{background:var(--threv-sidebar-active-bg)!important;color:var(--threv-sidebar-text)!important;box-shadow:inset 3px 0 0 var(--threv-sidebar-active-marker)}
.pc-sidebar .pc-navbar>.pc-item.active>.pc-link .pc-micon{color:var(--threv-sidebar-active-marker)!important}

/* Header — same compact control language as console.threv.co. */
.pc-header{background:rgba(255,255,255,.98);border-bottom:1px solid var(--threv-console-border);box-shadow:none;backdrop-filter:none}
.pc-header .header-wrapper{min-height:64px}
.pc-header .pc-head-link{border-radius:9px}
.threv-module-switch{flex:0 0 auto}
.threv-module-select{height:36px;border:1px solid var(--threv-console-border);border-radius:9px;background:#fff;color:#334155;padding:0 30px 0 10px;font-size:13px;min-width:190px;max-width:230px}
.threv-top-context{display:flex;gap:8px;align-items:center;min-width:360px}
.threv-top-select{height:36px;border:1px solid var(--threv-console-border);border-radius:9px;background:#fff;color:#334155;padding:0 30px 0 10px;font-size:13px;max-width:230px;width:auto;min-width:170px}
.threv-top-context .threv-top-select:last-child{min-width:210px}
.threv-context-chip{display:inline-flex;align-items:center;gap:.4rem;height:36px;border:1px solid var(--threv-console-border);background:#fff;border-radius:9px;padding:0 .7rem;color:#334155;font-size:13px}
.threv-user-trigger{display:flex;align-items:center;gap:8px}
.threv-top-user-name{font-weight:650}
.threv-avatar{--threv-avatar-size:30px;inline-size:var(--threv-avatar-size)!important;block-size:var(--threv-avatar-size)!important;width:var(--threv-avatar-size)!important;height:var(--threv-avatar-size)!important;min-inline-size:var(--threv-avatar-size)!important;min-block-size:var(--threv-avatar-size)!important;max-inline-size:var(--threv-avatar-size)!important;max-block-size:var(--threv-avatar-size)!important;flex:0 0 var(--threv-avatar-size)!important;box-sizing:border-box;display:inline-grid!important;place-items:center;position:relative;overflow:hidden!important;border-radius:9999px!important;background:rgba(var(--threv-primary-rgb),.12);color:var(--threv-primary-ink);font-size:12px;font-weight:800;line-height:1!important;vertical-align:middle}
.threv-avatar img{position:absolute;inset:0;width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;max-width:none!important;max-height:none!important;display:block!important;object-fit:cover!important;object-position:center!important;border-radius:9999px!important}
.threv-avatar-sm{--threv-avatar-size:30px}
.threv-avatar-md{--threv-avatar-size:40px;font-size:14px}
.threv-avatar-lg{--threv-avatar-size:64px;font-size:20px}
.threv-avatar-xl{--threv-avatar-size:80px;font-size:24px}
.pc-header .header-user-profile .pc-head-link>.threv-avatar{display:inline-grid!important;transform:none}
.pc-header .header-user-profile .pc-head-link:hover>.threv-avatar,.pc-header .header-user-profile .pc-head-link:focus>.threv-avatar{transform:scale(1.03)}

/* Old Aa behavior with server-backed persistence. */
.threv-font-size-control{position:relative}
.threv-font-toggle{min-width:40px;height:36px;font-weight:750;border-color:var(--threv-console-border);background:#fff}
.threv-font-panel{position:absolute;right:0;top:calc(100% + 9px);z-index:1060;width:min(290px,calc(100vw - 24px));padding:14px;border:1px solid var(--threv-console-border);border-radius:13px;background:#fff;box-shadow:0 18px 44px rgba(15,23,42,.16)}
.threv-font-panel[hidden]{display:none!important}
.threv-font-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.threv-font-slider-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px}
.threv-font-slider-row input{min-width:0}
.threv-font-big{font-size:18px;font-weight:700}

/* Page heading — exact Console hierarchy, not Flat Able demo breadcrumbs. */
.pc-container .pc-content{padding-top:28px}
.threv-page-heading{min-height:64px}
.threv-page-title{font-family:var(--threv-font-family)!important;font-size:calc(30px * var(--threv-font-scale));line-height:1.15;font-weight:750;letter-spacing:-.035em;color:#111827;margin:0}
.threv-page-subtitle{color:var(--threv-console-muted);margin:.35rem 0 0;font-size:var(--threv-ui-font-size)}
.threv-context-pill{display:inline-flex;align-items:center;gap:.4rem;border:1px solid var(--threv-console-border);background:#fff;border-radius:999px;padding:.45rem .7rem;color:#334155;font-size:calc(12px * var(--threv-font-scale));white-space:nowrap}

/* Cards — original Console surface + the useful Flat Able top accent. */
.pc-content .card{position:relative;border:1px solid var(--threv-console-border)!important;border-top:3px solid rgba(var(--threv-primary-rgb),.78)!important;border-radius:14px!important;background:#fff;box-shadow:0 2px 12px rgba(15,23,42,.035)!important;overflow:hidden}
.pc-content .card-header{padding:16px 18px;border-bottom:1px solid var(--threv-console-border);background:transparent;min-height:auto}
.pc-content .card-header h5{font-size:calc(16px * var(--threv-font-scale));font-weight:750;color:#111827;letter-spacing:-.015em}
.pc-content .card-body{padding:18px}
.threv-card-subtitle{font-size:var(--threv-small-font-size);line-height:1.45;color:var(--threv-console-muted)}
.threv-stat-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;font-size:20px;flex:0 0 38px}

/* Forms, tables, buttons use one scale as the old Console did. */
.pc-content table,
.pc-content input:not([type="range"]),
.pc-content select,
.pc-content textarea,
.pc-content button,
.pc-content .btn{font-family:var(--threv-font-family)!important;font-size:var(--threv-ui-font-size)!important}
.pc-content label{font-size:var(--threv-label-font-size)!important}
.pc-content .small,.pc-content small,.form-text,.text-sm{font-size:var(--threv-small-font-size)!important}
.form-label{font-weight:650;color:#475569}
.form-control,.form-select,.input-group-text{min-height:38px;border:1px solid #dbe2ea;border-radius:8px!important;background:#fff;color:#334155}
.form-control:focus,.form-select:focus{border-color:rgba(var(--threv-primary-rgb),.65);box-shadow:0 0 0 .18rem rgba(var(--threv-primary-rgb),.10)}
.btn{border-radius:8px!important;font-weight:650}
.btn-primary{--bs-btn-bg:var(--threv-primary);--bs-btn-border-color:var(--threv-primary);--bs-btn-hover-bg:var(--threv-primary);--bs-btn-hover-border-color:var(--threv-primary)}
.text-primary{color:var(--threv-primary)!important}
.bg-light-primary{background:rgba(var(--threv-primary-rgb),.09)!important}
.table{color:#263244;background:#fff}
.table>thead th{font-weight:700;color:#475569;background:#fafbfc;border-bottom-color:#e7ebf0;white-space:nowrap}
.table>:not(caption)>*>*{padding:.72rem .82rem}
.table-responsive{border-radius:0 0 14px 14px}
.text-muted,.form-text,.threv-card-subtitle{color:#596579!important}

/* User management / profile details. */
.threv-user-name{font-weight:700}.threv-user-meta{font-size:var(--threv-small-font-size);color:#596579}.threv-user-id{font-size:calc(10px * var(--threv-font-scale));color:#8792a3;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.threv-profile-avatar-lg{width:68px;height:68px;flex:0 0 68px;border-radius:50%;overflow:hidden;background:rgba(var(--threv-primary-rgb),.12);color:var(--threv-primary);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;border:1px solid rgba(var(--threv-primary-rgb),.16)}
.threv-profile-avatar-lg img{width:100%;height:100%;object-fit:cover;display:block}
.threv-pref-summary{border:1px solid #dcecf0;background:rgba(var(--threv-primary-rgb),.035);border-radius:10px;padding:14px}
.threv-swatch{width:32px;height:32px;border-radius:8px;display:inline-block;border:1px solid rgba(15,23,42,.08);flex:0 0 32px}
.threv-settings-company-logo{width:110px;height:52px;display:flex;align-items:center;padding:.35rem .5rem;border:1px solid var(--threv-console-border);border-radius:8px;background:#fff}
.threv-settings-company-logo img{max-width:100%;max-height:100%;object-fit:contain}
.threv-settings-range{margin-top:.45rem}
.threv-dev-menu{min-width:290px}
.threv-mobile-context{border-top-color:rgba(var(--threv-primary-rgb),.78)!important}

/* Density remains a user preference without changing typography. */
.threv-density-compact .pc-content .card-body{padding:18px}
.threv-density-compact .table>:not(caption)>*>*{padding:.68rem .78rem}
.threv-density-comfortable .pc-content .card-body{padding:22px}
.threv-density-comfortable .table>:not(caption)>*>*{padding:.86rem .92rem}
.threv-style-soft .pc-content .card{border-radius:16px!important;box-shadow:0 8px 28px rgba(15,23,42,.055)!important}
.threv-reduce-motion *, .threv-reduce-motion *::before, .threv-reduce-motion *::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}

/* Dark appearance preserves hierarchy; brand/sidebar identity remains company-owned. */
body[data-pc-theme="dark"]{--threv-console-card:var(--bs-body-bg);--threv-console-border:rgba(255,255,255,.10);--threv-console-text:var(--bs-body-color);--threv-console-muted:#9aa6b5;background:var(--bs-body-bg)}
body[data-pc-theme="dark"] .pc-header{background:rgba(21,27,37,.98);border-bottom-color:rgba(255,255,255,.08)}
body[data-pc-theme="dark"] .threv-top-select,body[data-pc-theme="dark"] .threv-context-chip,body[data-pc-theme="dark"] .threv-font-toggle,body[data-pc-theme="dark"] .threv-font-panel{background:var(--bs-body-bg);color:var(--bs-body-color);border-color:rgba(255,255,255,.12)}
body[data-pc-theme="dark"] .threv-page-title,body[data-pc-theme="dark"] .pc-content .card-header h5{color:var(--bs-heading-color)}
body[data-pc-theme="dark"] .pc-content .card{background:var(--bs-body-bg);border-color:rgba(255,255,255,.09)!important;border-top-color:rgba(var(--threv-primary-rgb),.8)!important}
body[data-pc-theme="dark"] .pc-content .card-header{border-bottom-color:rgba(255,255,255,.08)}
body[data-pc-theme="dark"] .form-control,body[data-pc-theme="dark"] .form-select,body[data-pc-theme="dark"] .input-group-text,body[data-pc-theme="dark"] .table{background:var(--bs-body-bg);color:var(--bs-body-color);border-color:rgba(255,255,255,.12)}

@media(max-width:1399.98px){.threv-module-select{min-width:165px;max-width:185px}.threv-top-context{min-width:0}.threv-top-select{min-width:135px;max-width:180px}.threv-top-context .threv-top-select:last-child{min-width:155px}}
@media(max-width:1199.98px){.threv-module-switch.d-lg-block{display:none!important}.threv-top-context{min-width:0}.threv-top-select{min-width:140px}.threv-top-context .threv-top-select:last-child{min-width:170px}}
@media(max-width:767.98px){.pc-container .pc-content{padding-top:18px}.threv-page-heading{min-height:0}.threv-page-title{font-size:calc(25px * var(--threv-font-scale))}.pc-content .card-body{padding:15px}.threv-font-panel{position:fixed;right:12px;top:70px}}

/* v0.2.9 - Console login baseline: no Flat Able loader overlay on authentication pages. */
.threv-login-body{
  min-height:100vh;
  background:radial-gradient(circle at top right,rgba(var(--threv-primary-rgb),.12),transparent 34%),#f5f7fb;
  display:grid;
  place-items:center;
  padding:24px;
  font-family:var(--threv-font-family);
  font-size:var(--threv-ui-font-size);
}
.threv-login-wrap{width:min(100%,430px)}
.threv-login-brand{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:18px;color:#111827;font-size:21px;font-weight:800}
.threv-login-brand .threv-brand{color:#111827!important}
.threv-login-card{border:1px solid var(--threv-console-border);border-radius:18px;background:#fff;box-shadow:0 18px 50px rgba(15,23,42,.08);padding:28px;border-top:3px solid var(--threv-primary)}
.threv-login-card h1{font-size:25px;line-height:1.2;letter-spacing:-.035em;margin:0;color:#111827;font-weight:750}
.threv-login-card .sub{color:#64748b;margin:7px 0 22px}
.threv-login-card label{font-size:var(--threv-label-font-size);font-weight:650;color:#475569;margin-bottom:14px;width:100%}
.threv-login-card input{margin-top:6px}
.threv-login-foot{text-align:center;color:#94a3b8;font-size:var(--threv-small-font-size);margin-top:14px}

/* System landing pages keep the sidebar short; detailed tools live one level in. */
.threv-system-card .card-body{min-height:150px}
.threv-system-card .threv-system-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:rgba(var(--threv-primary-rgb),.10);color:var(--threv-primary);font-size:21px;flex:0 0 auto}
.threv-system-card h5{margin-bottom:5px}
.threv-system-card p{color:#64748b;margin-bottom:14px}
.threv-system-card .badge{font-weight:600}

/* v0.4.2+ — image geometry, sidebar identity modes and friendly upload editing. */
.threv-profile-avatar-lg,.threv-profile-avatar-lg img{aspect-ratio:1/1;border-radius:9999px!important}

/* Company sidebar identity modes. */
.threv-company-text-main{display:block;max-width:174px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--threv-sidebar-text);font-size:1rem;font-weight:750;letter-spacing:-.02em}
.threv-company-text-compact{display:none;width:36px;height:36px;border-radius:10px;place-items:center;background:var(--threv-sidebar-active-bg);color:var(--threv-sidebar-text);font-size:11px;font-weight:800;text-transform:uppercase}
.threv-company-logo-text-main{display:flex;align-items:center;gap:8px;min-width:0;color:var(--threv-sidebar-text)}
.threv-company-logo-mark{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;object-fit:contain;object-position:left center;flex:0 0 40px}
.threv-company-name{display:block;max-width:136px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--threv-sidebar-text);font-size:.94rem;font-weight:750;letter-spacing:-.015em}
.pc-sidebar.pc-sidebar-hide .threv-company-text-main,.pc-sidebar.pc-sidebar-hide .threv-company-logo-text-main{display:none}
.pc-sidebar.pc-sidebar-hide .threv-company-text-compact{display:grid}

/* Branding screen: keep artwork inside the preview no matter the source dimensions. */
.threv-brand-preview{height:270px;border:1px solid var(--threv-console-border);border-radius:12px;overflow:hidden;background:#fff}
.threv-brand-preview>.row{min-height:100%}
.threv-brand-preview-sidebar{min-height:270px;padding:16px 12px;overflow:hidden;color:var(--preview-text,#fff)}
.threv-brand-preview-identity{height:52px;display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:18px;overflow:hidden}
.threv-brand-preview-logo{display:block;max-width:112px;max-height:42px;width:auto;height:auto;object-fit:contain;object-position:left center;flex:0 1 auto}
.threv-brand-preview-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--preview-text,#fff);font-size:12px;font-weight:750}
.threv-brand-preview-link{padding:8px 9px;margin:3px 0;border-radius:7px;color:var(--preview-muted,rgba(255,255,255,.75));font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.threv-brand-preview-link.active{background:var(--preview-active-bg,rgba(var(--threv-primary-rgb),.23));color:var(--preview-text,#fff);box-shadow:inset 2px 0 0 var(--preview-marker,var(--preview-primary))}

.threv-brand-mode-option{display:flex;align-items:flex-start;gap:10px;height:100%;padding:12px;border:1px solid var(--threv-console-border);border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}
.threv-brand-mode-option:has(input:checked){border-color:rgba(var(--threv-primary-rgb),.65);box-shadow:0 0 0 3px rgba(var(--threv-primary-rgb),.08)}
.threv-brand-mode-option input{margin-top:3px;flex:0 0 auto}
.threv-brand-mode-option strong{display:block;color:#263244;font-size:var(--threv-ui-font-size)}
.threv-brand-mode-option small{display:block;margin-top:3px;color:#64748b;line-height:1.35}

/* Local browser image editor; no third-party crop dependency. */
.threv-image-editor-backdrop{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.58)}
.threv-image-editor-backdrop[hidden]{display:none!important}
.threv-image-editor-dialog{width:min(620px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.threv-image-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--threv-console-border)}
.threv-image-editor-head h5{margin:0;font-size:17px}
.threv-image-editor-close{border:0;background:transparent;font-size:24px;line-height:1;color:#64748b}
.threv-image-editor-body{padding:18px}
.threv-image-editor-stage{display:grid;place-items:center;min-height:280px;padding:12px;border-radius:12px;background:#eef2f6;overflow:hidden;touch-action:none;user-select:none}
.threv-image-editor-stage.is-square{cursor:grab}
.threv-image-editor-stage.is-square:active{cursor:grabbing}
.threv-image-editor-canvas{display:block;max-width:100%;height:auto;border-radius:8px;background:repeating-conic-gradient(#f8fafc 0 25%,#e5e7eb 0 50%) 50%/16px 16px;box-shadow:0 3px 18px rgba(15,23,42,.08)}
.threv-image-editor-stage.is-square .threv-image-editor-canvas{border-radius:10px}
.threv-image-editor-controls{margin-top:15px}
.threv-image-editor-meta{margin-top:10px;color:#64748b;font-size:12px}
.threv-image-editor-actions{display:flex;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--threv-console-border)}
.threv-image-editor-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px;color:#64748b;font-size:12px}
.threv-image-editor-status button{padding:0;border:0;background:none;color:var(--threv-primary);font-size:12px!important;font-weight:650}
body[data-pc-theme="dark"] .threv-image-editor-dialog{background:var(--bs-body-bg);color:var(--bs-body-color)}
body[data-pc-theme="dark"] .threv-brand-mode-option{background:var(--bs-body-bg);border-color:rgba(255,255,255,.12)}
body[data-pc-theme="dark"] .threv-brand-mode-option strong{color:var(--bs-heading-color)}

/* v0.4.4 — bridge Company CI into Flat Able preset-specific component colors.
   Flat Able preset-1 has more-specific hard-coded teal selectors such as
   [data-pc-preset=preset-1] .btn-primary; these rules intentionally override
   only brand/decorative colors. Semantic success/warning/danger states remain semantic. */
body[data-pc-preset]{
  --bs-primary:var(--threv-primary);
  --bs-primary-rgb:var(--threv-primary-rgb);
  --bs-link-color:var(--threv-primary-ink);
  --bs-link-color-rgb:var(--threv-primary-ink-rgb);
  --pc-sidebar-active-color:var(--threv-primary);
}
body[data-pc-preset] .btn-primary{
  --bs-btn-color:var(--threv-primary-foreground);
  --bs-btn-bg:var(--threv-primary);
  --bs-btn-border-color:var(--threv-primary);
  --bs-btn-hover-color:var(--threv-primary-foreground);
  --bs-btn-hover-bg:var(--threv-primary-hover);
  --bs-btn-hover-border-color:var(--threv-primary-hover);
  --bs-btn-active-color:var(--threv-primary-foreground);
  --bs-btn-active-bg:var(--threv-primary-active);
  --bs-btn-active-border-color:var(--threv-primary-active);
  --bs-btn-disabled-color:var(--threv-primary-foreground);
  --bs-btn-disabled-bg:var(--threv-primary);
  --bs-btn-disabled-border-color:var(--threv-primary);
  --bs-btn-focus-shadow-rgb:var(--threv-primary-rgb);
}
body[data-pc-preset] .btn-outline-primary{
  --bs-btn-color:var(--threv-primary-ink);
  --bs-btn-border-color:var(--threv-primary);
  --bs-btn-hover-color:var(--threv-primary-foreground);
  --bs-btn-hover-bg:var(--threv-primary);
  --bs-btn-hover-border-color:var(--threv-primary);
  --bs-btn-active-color:var(--threv-primary-foreground);
  --bs-btn-active-bg:var(--threv-primary-active);
  --bs-btn-active-border-color:var(--threv-primary-active);
  --bs-btn-disabled-color:var(--threv-primary-ink);
  --bs-btn-disabled-border-color:var(--threv-primary);
  --bs-btn-focus-shadow-rgb:var(--threv-primary-rgb);
}
body[data-pc-preset] .text-primary{color:var(--threv-primary-ink)!important}
body[data-pc-preset] .bg-primary{background-color:var(--threv-primary)!important;color:var(--threv-primary-foreground)!important}
body[data-pc-preset] .bg-light-primary{background:rgba(var(--threv-primary-rgb),.10)!important;color:var(--threv-primary-ink)!important}
body[data-pc-preset] .border-primary{border-color:var(--threv-primary)!important}
body[data-pc-preset] .link-primary{color:var(--threv-primary-ink)!important}
body[data-pc-preset] .form-check-input:checked{background-color:var(--threv-primary);border-color:var(--threv-primary)}
body[data-pc-preset] .form-check-input:focus{border-color:var(--threv-primary);box-shadow:0 0 0 .18rem rgba(var(--threv-primary-rgb),.12)}

/* Dashboard metric icons are decorative, so derive them from Company CI instead
   of keeping Flat Able's blue/green/yellow demo palette. */
.threv-stat-brand-1{background:rgba(var(--threv-primary-rgb),.10);color:var(--threv-primary-ink)}
.threv-stat-brand-2{background:rgba(var(--threv-brand-tone-2-rgb),.12);color:var(--threv-brand-tone-2-ink)}
.threv-stat-brand-3{background:rgba(var(--threv-brand-tone-3-rgb),.13);color:var(--threv-brand-tone-3-ink)}
.threv-stat-brand-4{background:rgba(var(--threv-accent-rgb),.16);color:var(--threv-accent-ink)}


/* v0.5 organization / property identity */
.threv-hotel-icon{--threv-hotel-icon-size:42px;width:var(--threv-hotel-icon-size);height:var(--threv-hotel-icon-size);min-width:var(--threv-hotel-icon-size);flex:0 0 var(--threv-hotel-icon-size);border-radius:11px;overflow:hidden;display:inline-grid;place-items:center;background:rgba(var(--threv-primary-rgb),.10);color:var(--threv-primary-ink);font-size:12px;font-weight:800;line-height:1;border:1px solid rgba(var(--threv-primary-rgb),.12)}
.threv-hotel-icon img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.threv-hotel-icon-lg{--threv-hotel-icon-size:72px;border-radius:16px;font-size:20px}
.threv-access-company-block{border:1px solid var(--threv-console-border);border-radius:12px;padding:14px;background:var(--bs-body-bg,#fff)}
.threv-access-company-block+.threv-access-company-block{margin-top:10px}
.threv-access-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 0;border-top:1px solid rgba(148,163,184,.16)}
.threv-access-row:first-of-type{border-top:0}
.threv-access-scope{display:inline-flex;align-items:center;gap:7px;min-width:220px;flex:1 1 260px}
.threv-access-role{width:min(220px,100%)}
.threv-access-feedback{min-height:20px;font-size:12px}
