:root {
  --btl-blue: #2563EB;
  --btl-purple: #7C3AED;
  --btl-ink: #0B132B;
  --btl-slate: #64748B;
  --btl-surface: #F5F6FA;
  --btl-success: #10B981;
  --btl-warning: #F59E0B;
  --btl-info: #06B6D4;
  --btl-accent: #EC4899;
  --btl-indigo: #6366F1;
  --btl-white: #FFFFFF;
  --btl-gray-50: #F8FAFC;
  --btl-gray-100: #F1F5F9;
  --btl-gray-200: #E2E8F0;
  --btl-gray-400: #94A3B8;
  --btl-gray-600: #475569;
  --btl-gray-900: #0F172A;
  --btl-danger: #EF4444;
  --btl-radius-sm: 8px;
  --btl-radius-md: 12px;
  --btl-radius-lg: 16px;
  --btl-radius-xl: 24px;
  --btl-shadow-sm: 0 4px 16px rgba(15, 23, 42, .05);
  --btl-shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
  --btl-sidebar-width: 272px;
  --btl-font: Dana, IRANSansX, IRANSans, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--btl-surface); }
body.betterly-app-shell { margin: 0; background: var(--btl-surface); color: var(--btl-ink); font-family: var(--btl-font); direction: rtl; }
a { color: inherit; }
.btl-icon { width: 22px; height: 22px; display: block; }
.btl-app { min-height: 100vh; display: flex; flex-direction: row; }
.btl-sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--btl-sidebar-width); padding: 28px 20px; background: linear-gradient(180deg, #102344 0%, #09172f 100%); color: #fff; z-index: 40; display: flex; flex-direction: column; gap: 26px; }
.btl-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 16px; border-bottom: 1px solid rgba(255,255,255,.1); direction: ltr; justify-content: flex-end; }
.btl-brand img { width: 38px; height: 38px; object-fit: contain; }
.btl-brand strong { font-family: Poppins, Arial, sans-serif; font-size: 25px; letter-spacing: -.6px; }
.btl-nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: thin; }
.btl-nav__item { min-height: 48px; padding: 0 14px; border-radius: 12px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.82); text-decoration: none; font-size: 14px; font-weight: 650; transition: .18s ease; }
.btl-nav__item:hover { background: rgba(255,255,255,.07); color: #fff; }
.btl-nav__item.is-active { color: #fff; background: linear-gradient(135deg, rgba(37,99,235,.42), rgba(124,58,237,.2)); box-shadow: inset 0 0 0 1px rgba(147,197,253,.12); }
.btl-nav__icon { width: 24px; display: grid; place-items: center; color: rgba(255,255,255,.72); }
.btl-nav__item.is-active .btl-nav__icon { color: #bfdbfe; }
.btl-plan-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.04); display: grid; gap: 6px; }
.btl-plan-card span, .btl-plan-card small { color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.8; }
.btl-plan-card strong { font-size: 14px; }
.btl-main { min-width: 0; width: calc(100% - var(--btl-sidebar-width)); margin-inline-start: var(--btl-sidebar-width); }
.btl-topbar { height: 78px; padding: 0 32px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--btl-gray-200); display: flex; align-items: center; gap: 22px; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); }
.btl-search { width: min(430px, 44vw); height: 44px; margin-inline-end: auto; border: 1px solid var(--btl-gray-200); border-radius: 12px; background: #fff; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--btl-gray-400); }
.btl-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; color: var(--btl-ink); }
.btl-user-context { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.btl-user-context div:last-child { display: grid; gap: 2px; }
.btl-user-context strong { font-size: 13px; }
.btl-user-context span { font-size: 11px; color: var(--btl-slate); }
.btl-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #dbeafe, #ede9fe); color: var(--btl-blue); font-weight: 800; }
.btl-mobile-menu { display: none; }
.btl-icon-button { width: 42px; height: 42px; border: 1px solid var(--btl-gray-200); border-radius: 12px; background: #fff; color: var(--btl-ink); place-items: center; cursor: pointer; }
.btl-workspace { width: min(100% - 48px, 1480px); margin: 0 auto; padding: 34px 0 54px; }
.btl-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.btl-page-head h1 { margin: 2px 0 8px; font-size: clamp(25px, 2.5vw, 34px); line-height: 1.45; }
.btl-page-head p { margin: 0; color: var(--btl-slate); font-size: 14px; }
.btl-eyebrow { color: var(--btl-blue)!important; font-size: 11px!important; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.btl-page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btl-button { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; }
.btl-button .btl-icon { width: 18px; height: 18px; }
.btl-button--primary { color: #fff; background: linear-gradient(135deg, var(--btl-blue), var(--btl-purple)); box-shadow: 0 7px 20px rgba(37,99,235,.16); }
.btl-button--secondary { color: var(--btl-blue); background: #fff; border-color: rgba(37,99,235,.24); }
.btl-button:disabled { opacity: .45; cursor: not-allowed; }
.btl-legal-readiness { padding: 16px 18px; margin-bottom: 20px; border: 1px solid rgba(245,158,11,.28); border-inline-start: 4px solid var(--btl-warning); border-radius: 14px; background: linear-gradient(90deg, rgba(245,158,11,.07), #fff); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.btl-legal-readiness__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(245,158,11,.12); color: #d97706; }
.btl-legal-readiness strong { font-size: 14px; }
.btl-legal-readiness p { margin: 4px 0 0; color: var(--btl-slate); font-size: 12px; }
.btl-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.btl-metric-card { min-height: 148px; padding: 20px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 16px; box-shadow: var(--btl-shadow-sm); display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; position: relative; }
.btl-metric-card__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.btl-metric-card__icon.is-blue, .is-blue { color: var(--btl-blue); background: #eff6ff; }
.btl-metric-card__icon.is-green, .is-green { color: #059669; background: #ecfdf5; }
.btl-metric-card__icon.is-orange, .is-orange { color: #ea580c; background: #fff7ed; }
.btl-metric-card__icon.is-purple, .is-purple { color: var(--btl-purple); background: #f5f3ff; }
.btl-metric-card > div { display: grid; gap: 4px; }
.btl-metric-card span { color: var(--btl-slate); font-size: 12px; }
.btl-metric-card strong { font-size: 27px; line-height: 1.2; }
.btl-metric-card small { color: var(--btl-gray-400); font-size: 11px; }
.btl-metric-card > a { grid-column: 1 / -1; width: fit-content; color: var(--btl-blue); font-size: 11px; font-weight: 750; text-decoration: none; }
.btl-dashboard-grid { display: grid; grid-template-columns: 1.4fr .85fr; gap: 16px; margin-bottom: 16px; }
.btl-dashboard-grid--lower { grid-template-columns: 1.65fr .8fr; }
.btl-panel { background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 16px; box-shadow: var(--btl-shadow-sm); padding: 20px; min-width: 0; }
.btl-panel__head { min-height: 42px; margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.btl-panel__head h2 { margin: 1px 0 0; font-size: 18px; }
.btl-panel__head > a { color: var(--btl-blue); font-size: 11px; font-weight: 800; text-decoration: none; }
.btl-action-list { display: grid; gap: 10px; }
.btl-action-item { min-height: 70px; padding: 11px 12px; border-radius: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; border: 1px solid var(--btl-gray-200); }
.btl-action-item > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.btl-action-item.is-warning { border-color: rgba(245,158,11,.25); background: #fffdf8; }
.btl-action-item.is-warning > span { background: #fff7ed; color: #ea580c; }
.btl-action-item.is-danger { border-color: rgba(239,68,68,.22); background: #fffafa; }
.btl-action-item.is-danger > span { background: #fef2f2; color: var(--btl-danger); }
.btl-action-item.is-success > span { background: #ecfdf5; color: var(--btl-success); }
.btl-action-item > div { display: grid; gap: 3px; }
.btl-action-item strong { font-size: 12px; }
.btl-action-item small { color: var(--btl-slate); font-size: 11px; }
.btl-action-item > a { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid rgba(37,99,235,.23); border-radius: 9px; color: var(--btl-blue); font-size: 11px; font-weight: 800; text-decoration: none; }
.btl-quick-list { display: grid; gap: 8px; }
.btl-quick-list > a { padding: 10px; border-radius: 12px; text-decoration: none; display: flex; align-items: center; gap: 11px; transition: .18s; }
.btl-quick-list > a:hover { background: var(--btl-gray-50); }
.btl-quick-list > a > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.btl-quick-list > a > div { display: grid; gap: 2px; }
.btl-quick-list strong { font-size: 12px; }
.btl-quick-list small { font-size: 10px; color: var(--btl-slate); }
.btl-table-wrap { overflow-x: auto; }
.btl-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.btl-table th, .btl-table td { padding: 11px 10px; border-bottom: 1px solid var(--btl-gray-100); text-align: right; font-size: 11px; white-space: nowrap; }
.btl-table th { color: var(--btl-slate); font-weight: 700; background: var(--btl-gray-50); }
.btl-table td > a { color: var(--btl-blue); font-weight: 750; text-decoration: none; }
.btl-status { padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; }
.btl-status.is-success { color: #047857; background: #ecfdf5; }
.btl-status.is-warning { color: #c2410c; background: #fff7ed; }
.btl-status.is-danger { color: #b91c1c; background: #fef2f2; }
.btl-status.is-info { color: #1d4ed8; background: #eff6ff; }
.btl-empty-inline, .btl-empty-table { min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 20px; border: 1px dashed var(--btl-gray-200); border-radius: 12px; background: var(--btl-gray-50); }
.btl-empty-inline strong, .btl-empty-table strong { font-size: 12px; }
.btl-empty-inline span, .btl-empty-table span { font-size: 10px; color: var(--btl-slate); max-width: 440px; }
.btl-activity-list { display: grid; gap: 12px; }
.btl-activity-list > div { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; }
.btl-activity-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--btl-blue); box-shadow: 0 0 0 5px #eff6ff; }
.btl-activity-list strong { font-size: 11px; display: block; }
.btl-activity-list small { font-size: 9px; color: var(--btl-gray-400); }
.btl-module-placeholder, .btl-process-card { min-height: 440px; padding: 44px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 18px; box-shadow: var(--btl-shadow-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.btl-module-placeholder__icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #eff6ff, #f5f3ff); color: var(--btl-blue); }
.btl-module-placeholder h2 { margin: 18px 0 8px; font-size: 22px; }
.btl-module-placeholder p { max-width: 680px; margin: 0; color: var(--btl-slate); font-size: 13px; line-height: 2; }
.btl-contract-note { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.btl-contract-note code { padding: 7px 9px; border-radius: 8px; background: var(--btl-gray-50); border: 1px solid var(--btl-gray-200); direction: ltr; font-size: 11px; }
.btl-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.btl-choice-grid--single { grid-template-columns: minmax(0, 650px); justify-content: center; }
.btl-choice-card { min-height: 310px; padding: 34px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 18px; box-shadow: var(--btl-shadow-sm); text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; transition: .18s ease; }
.btl-choice-card:hover { border-color: rgba(37,99,235,.35); transform: translateY(-2px); box-shadow: var(--btl-shadow-md); }
.btl-choice-card > span { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: var(--btl-blue); background: #eff6ff; }
.btl-choice-card h2 { margin: 20px 0 8px; font-size: 22px; }
.btl-choice-card p { margin: 0 0 22px; color: var(--btl-slate); font-size: 13px; line-height: 2; }
.btl-choice-card strong { color: var(--btl-blue); font-size: 12px; }
.btl-process-card { align-items: stretch; justify-content: flex-start; text-align: right; gap: 28px; }
.btl-process-steps { padding: 12px; border-radius: 12px; background: var(--btl-gray-50); display: flex; flex-wrap: wrap; gap: 8px; }
.btl-process-steps span { padding: 7px 10px; border-radius: 9px; color: var(--btl-slate); font-size: 11px; }
.btl-process-steps .is-current { background: #fff; color: var(--btl-blue); box-shadow: var(--btl-shadow-sm); font-weight: 800; }
.btl-dropzone { min-height: 280px; border: 1px dashed var(--btl-gray-400); border-radius: 16px; background: var(--btl-gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.btl-dropzone > span { color: var(--btl-blue); }
.btl-dropzone h2 { margin: 12px 0 6px; font-size: 18px; }
.btl-dropzone p { margin: 0 0 18px; color: var(--btl-slate); font-size: 12px; }
.btl-engine-shell { min-height: 300px; padding: 32px; border: 1px dashed var(--btl-gray-300, #CBD5E1); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.btl-engine-shell > div { max-width: 650px; }
.btl-engine-shell__icon { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; color: var(--btl-purple); background: #f5f3ff; }
.btl-engine-shell h2 { margin: 16px 0 7px; font-size: 20px; }
.btl-engine-shell p { margin: 0; color: var(--btl-slate); font-size: 12px; line-height: 2; }
.btl-state-page { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.btl-state-card { max-width: 540px; padding: 42px; border: 1px solid var(--btl-gray-200); border-radius: 18px; background: #fff; box-shadow: var(--btl-shadow-sm); text-align: center; }
.btl-state-card__icon { width: 58px; height: 58px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: #fff7ed; color: #ea580c; }
.btl-state-card h1 { margin: 18px 0 8px; font-size: 23px; }
.btl-state-card p { margin: 0 0 20px; color: var(--btl-slate); font-size: 13px; line-height: 2; }
.btl-overlay { display: none; }

@media (max-width: 1180px) {
  .btl-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btl-dashboard-grid, .btl-dashboard-grid--lower { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  :root { --btl-sidebar-width: 264px; }
  .btl-sidebar { transform: translateX(110%); transition: transform .22s ease; }
  .btl-main { width: 100%; margin-inline-start: 0; }
  .btl-mobile-menu { display: grid; }
  .btl-menu-open .btl-sidebar { transform: translateX(0); }
  .btl-overlay { position: fixed; inset: 0; background: rgba(11,19,43,.44); z-index: 35; }
  .btl-menu-open .btl-overlay { display: block; }
  .btl-topbar { padding-inline: 20px; }
  .btl-search { width: auto; flex: 1; }
}

@media (max-width: 700px) {
  .btl-topbar { height: 68px; gap: 10px; }
  .btl-user-context { min-width: 0; }
  .btl-user-context div:last-child { display: none; }
  .btl-search { display: none; }
  .btl-workspace { width: min(100% - 28px, 1480px); padding-top: 24px; }
  .btl-page-head { flex-direction: column; }
  .btl-page-head__actions { width: 100%; }
  .btl-page-head__actions .btl-button { flex: 1; }
  .btl-legal-readiness { grid-template-columns: auto 1fr; }
  .btl-legal-readiness .btl-button { grid-column: 1 / -1; }
  .btl-metric-grid { grid-template-columns: 1fr; }
  .btl-metric-card { min-height: 128px; }
  .btl-panel { padding: 15px; }
  .btl-action-item { grid-template-columns: auto 1fr; }
  .btl-action-item > a { grid-column: 2; width: fit-content; }
  .btl-choice-grid { grid-template-columns: 1fr; }
  .btl-choice-card { min-height: 250px; padding: 24px; }
  .btl-module-placeholder, .btl-process-card { padding: 24px; min-height: 360px; }
  .btl-engine-shell { flex-direction: column; align-items: stretch; }
}

/* v0.3.0 — account controls, subscription surface and legal profile */
.btl-sidebar { gap: 18px; }
.btl-nav:not(.btl-nav--footer) { flex: 1 1 auto; min-height: 0; }
.btl-sidebar-bottom { flex: 0 0 auto; display: grid; gap: 10px; }
.btl-nav--footer { flex: 0 0 auto; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.09); overflow: visible; }
.btl-nav__item--logout { color: rgba(255,255,255,.7); }
.btl-nav__item--logout:hover { color: #fff; background: rgba(239,68,68,.13); }
.btl-plan-card { margin-top: 0; padding: 14px; gap: 9px; }
.btl-plan-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btl-plan-card__head span { font-size: 11px; }
.btl-plan-card__head strong { font-size: 13px; }
.btl-plan-card small { font-size: 10px; line-height: 1.7; }
.btl-plan-progress { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.12); direction: rtl; }
.btl-plan-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #a78bfa); }
.btl-plan-card__action { min-height: 34px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.08); color: #fff; display: flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; font-size: 11px; font-weight: 800; }
.btl-plan-card__action:hover { background: rgba(255,255,255,.14); }
.btl-plan-card__action .btl-icon { width: 16px; height: 16px; }

.btl-user-menu { position: relative; }
button.btl-user-context { border: 0; background: transparent; color: inherit; font-family: inherit; padding: 5px 6px; border-radius: 11px; cursor: pointer; text-align: right; }
button.btl-user-context:hover, button.btl-user-context[aria-expanded="true"] { background: var(--btl-gray-50); }
.btl-user-context__chevron { color: var(--btl-gray-400); display: grid; place-items: center; }
.btl-user-context__chevron .btl-icon { width: 16px; height: 16px; }
.btl-user-dropdown { position: absolute; inset-inline-end: 0; top: calc(100% + 9px); z-index: 70; width: 235px; padding: 8px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 14px; box-shadow: var(--btl-shadow-md); }
.btl-user-dropdown[hidden] { display: none; }
.btl-user-dropdown__head { display: grid; gap: 3px; padding: 10px 10px 12px; border-bottom: 1px solid var(--btl-gray-100); margin-bottom: 5px; }
.btl-user-dropdown__head strong { font-size: 12px; }
.btl-user-dropdown__head span { color: var(--btl-slate); font-size: 10px; }
.btl-user-dropdown > a { min-height: 40px; padding: 0 9px; border-radius: 9px; display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--btl-gray-600); }
.btl-user-dropdown > a:hover { background: var(--btl-gray-50); color: var(--btl-ink); }
.btl-user-dropdown > a .btl-icon { width: 18px; height: 18px; }
.btl-user-dropdown > a.is-logout { margin-top: 5px; border-top: 1px solid var(--btl-gray-100); border-radius: 0 0 9px 9px; color: #b91c1c; }

.btl-profile-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.btl-profile-status-card { min-height: 128px; padding: 18px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 16px; box-shadow: var(--btl-shadow-sm); display: flex; align-items: center; gap: 14px; }
.btl-profile-status-card__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; }
.btl-profile-status-card__icon.is-blue { color: var(--btl-blue); background: #eff6ff; }
.btl-profile-status-card__icon.is-green { color: #047857; background: #ecfdf5; }
.btl-profile-status-card__icon.is-orange { color: #c2410c; background: #fff7ed; }
.btl-profile-status-card__icon.is-purple { color: var(--btl-purple); background: #f5f3ff; }
.btl-profile-status-card > div { display: grid; gap: 4px; min-width: 0; }
.btl-profile-status-card small { color: var(--btl-slate); font-size: 10px; }
.btl-profile-status-card strong { font-size: 14px; }
.btl-profile-status-card span, .btl-profile-status-card a { color: var(--btl-slate); font-size: 10px; text-decoration: none; }
.btl-profile-status-card a { color: var(--btl-blue); font-weight: 800; }

.btl-settings-grid { display: grid; gap: 12px; }
.btl-settings-card { min-height: 112px; padding: 18px 20px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 16px; box-shadow: var(--btl-shadow-sm); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; text-decoration: none; }
.btl-settings-card:hover { border-color: rgba(37,99,235,.3); }
.btl-settings-card > span { width: 42px; height: 42px; border-radius: 12px; background: #eff6ff; color: var(--btl-blue); display: grid; place-items: center; }
.btl-settings-card > div h2 { margin: 0 0 5px; font-size: 15px; }
.btl-settings-card > div p { margin: 0; color: var(--btl-slate); font-size: 11px; line-height: 1.8; }
.btl-settings-card > .btl-icon { width: 18px; height: 18px; color: var(--btl-gray-400); }

.btl-form-notice { margin-bottom: 16px; padding: 14px 16px; border-radius: 13px; display: flex; align-items: center; gap: 11px; }
.btl-form-notice > span { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.btl-form-notice strong { font-size: 12px; }
.btl-form-notice p { margin: 3px 0 0; font-size: 10px; line-height: 1.8; }
.btl-form-notice.is-success { border: 1px solid rgba(16,185,129,.24); background: #f0fdf4; color: #065f46; }
.btl-form-notice.is-success > span { background: #d1fae5; }
.btl-form-notice.is-error { border: 1px solid rgba(239,68,68,.22); background: #fff7f7; color: #991b1b; }
.btl-form-notice.is-error > span { background: #fee2e2; }

.btl-legal-profile-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.6fr); gap: 18px; align-items: start; }
.btl-profile-form { padding: 24px; background: #fff; border: 1px solid var(--btl-gray-200); border-radius: 18px; box-shadow: var(--btl-shadow-sm); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.btl-form-section-head { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--btl-gray-100); }
.btl-form-section-head h2 { margin: 0 0 5px; font-size: 18px; }
.btl-form-section-head p { margin: 0; color: var(--btl-slate); font-size: 11px; }
.btl-verified-mobile { grid-column: 1/-1; padding: 13px 14px; border-radius: 12px; background: #f0fdf4; border: 1px solid rgba(16,185,129,.2); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.btl-verified-mobile > span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #047857; background: #d1fae5; }
.btl-verified-mobile > div { display: grid; gap: 2px; }
.btl-verified-mobile small { color: #047857; font-size: 9px; }
.btl-verified-mobile strong { font-size: 12px; direction: ltr; text-align: right; }
.btl-verified-mobile em { color: #047857; font-size: 9px; font-style: normal; }
.btl-field { display: grid; gap: 7px; }
.btl-field--full { grid-column: 1/-1; }
.btl-field > span { font-size: 11px; font-weight: 750; }
.btl-field input, .btl-field textarea { width: 100%; border: 1px solid var(--btl-gray-200); border-radius: 11px; background: #fff; color: var(--btl-ink); font: inherit; font-size: 12px; outline: none; transition: .16s; }
.btl-field input { height: 44px; padding: 0 12px; }
.btl-field textarea { padding: 11px 12px; resize: vertical; line-height: 1.8; }
.btl-field input:focus, .btl-field textarea:focus { border-color: rgba(37,99,235,.55); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.btl-form-actions { grid-column: 1/-1; display: flex; gap: 9px; padding-top: 5px; }
.btl-legal-profile-aside { display: grid; gap: 12px; }
.btl-aside-note { padding: 18px; border: 1px solid var(--btl-gray-200); border-radius: 16px; background: #fff; box-shadow: var(--btl-shadow-sm); display: flex; gap: 11px; }
.btl-aside-note > span { width: 36px; height: 36px; border-radius: 10px; background: #f5f3ff; color: var(--btl-purple); display: grid; place-items: center; flex: 0 0 auto; }
.btl-aside-note h3 { margin: 1px 0 6px; font-size: 13px; }
.btl-aside-note p { margin: 0; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }

.btl-access-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.btl-access-overview article { min-height: 90px; padding: 17px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; box-shadow: var(--btl-shadow-sm); display: grid; align-content: center; gap: 5px; }
.btl-access-overview small { color: var(--btl-slate); font-size: 10px; }
.btl-access-overview strong { font-size: 14px; }
.btl-access-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.btl-permission-list { display: flex; flex-wrap: wrap; gap: 7px; }
.btl-permission-list span { padding: 7px 9px; border: 1px solid var(--btl-gray-200); border-radius: 8px; background: var(--btl-gray-50); color: var(--btl-gray-600); direction: ltr; font-size: 10px; }
.btl-permission-list span.is-full { direction: rtl; color: #047857; background: #ecfdf5; border-color: rgba(16,185,129,.2); }
.btl-scope-list { display: grid; gap: 8px; }
.btl-scope-list > div { min-height: 42px; padding: 0 11px; border: 1px solid var(--btl-gray-100); border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btl-scope-list strong, .btl-scope-list span { direction: ltr; font-size: 10px; }
.btl-scope-list span { color: var(--btl-blue); font-weight: 800; }

@media (max-height: 850px) and (min-width: 981px) {
  .btl-sidebar { padding-block: 18px; gap: 12px; }
  .btl-nav__item { min-height: 42px; font-size: 12px; }
  .btl-plan-card { padding: 11px; }
}

@media (max-width: 980px) {
  .btl-sidebar-bottom { margin-top: auto; }
  .btl-profile-summary-grid { grid-template-columns: 1fr; }
  .btl-legal-profile-layout { grid-template-columns: 1fr; }
  .btl-access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  button.btl-user-context { min-width: 44px; }
  .btl-user-context__chevron { display: none; }
  .btl-user-dropdown { width: min(235px, calc(100vw - 28px)); }
  .btl-profile-form { grid-template-columns: 1fr; padding: 17px; }
  .btl-field--full, .btl-form-section-head, .btl-verified-mobile, .btl-form-actions { grid-column: 1; }
  .btl-verified-mobile { grid-template-columns: auto 1fr; }
  .btl-verified-mobile em { grid-column: 2; }
  .btl-form-actions { flex-direction: column; }
  .btl-access-overview { grid-template-columns: 1fr; }
}

/* v0.4.0 — legal-profile validation + identity verification */
.btl-form-error-list { margin: 8px 0 0; padding-right: 18px; display: grid; gap: 4px; font-size: 10px; line-height: 1.75; }
.btl-field.has-error input, .btl-field.has-error textarea { border-color: rgba(239,68,68,.55); background: #fffafa; }
.btl-field.has-error input:focus, .btl-field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.08); }
.btl-field-error { color: #b91c1c; font-size: 9px; line-height: 1.6; }
.btl-verification-card { padding: 18px; border: 1px solid rgba(99,102,241,.2); border-radius: 16px; background: linear-gradient(180deg,#fff 0%,#fafaff 100%); box-shadow: var(--btl-shadow-sm); display: grid; gap: 13px; scroll-margin-top: 18px; }
.btl-verification-card__head { display: flex; align-items: center; gap: 10px; }
.btl-verification-card__head small { color: var(--btl-blue); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.btl-verification-card__head h3 { margin: 2px 0 0; font-size: 14px; }
.btl-verification-card > p { margin: 0; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }
.btl-verification-status { min-height: 42px; padding: 0 11px; border: 1px solid var(--btl-gray-100); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btl-verification-status span { color: var(--btl-slate); font-size: 10px; }
.btl-verification-status strong { font-size: 11px; }
.btl-verification-caveat { padding: 10px 11px; border-radius: 10px; background: #fff7ed; color: #9a3412 !important; }
.btl-verification-config { padding: 10px 11px; border-radius: 10px; background: #fef2f2; color: #991b1b !important; }
.btl-button--full { width: 100%; justify-content: center; }
.btl-button[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* v0.4.1 — organization registry and signing-authority verification */
.btl-verification-steps { display: grid; gap: 7px; }
.btl-verification-step { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid var(--btl-gray-100); border-radius: 9px; background: #fff; }
.btl-verification-step span { color: var(--btl-slate); font-size: 9px; }
.btl-verification-step strong { font-size: 9px; }
.btl-verification-step strong.is-success { color: #047857; }
.btl-verification-step strong.is-warning { color: #b45309; }
.btl-verification-step strong.is-neutral { color: var(--btl-slate); }
.btl-registry-snapshot { display: grid; gap: 3px; padding: 10px 11px; border-radius: 10px; background: #eff6ff; border: 1px solid #dbeafe; }
.btl-registry-snapshot strong { font-size: 11px; color: var(--btl-ink); }
.btl-registry-snapshot span { color: var(--btl-slate); font-size: 9px; line-height: 1.7; }
.btl-verification-evidence { padding: 9px 10px; border-radius: 9px; background: #f8fafc; border: 1px solid var(--btl-gray-100); color: #334155 !important; }

/* v0.5.0 — account-specific operational dashboards */
.is-red, .btl-metric-card__icon.is-red { color: #dc2626; background: #fef2f2; }
.btl-dashboard-head { margin-bottom: 22px; }
.btl-dashboard-head .btl-page-head__actions .btl-icon { width: 17px; height: 17px; }
.btl-topbar-actions { display: flex; align-items: center; gap: 8px; }
.btl-topbar-link { display: grid; text-decoration: none; color: var(--btl-gray-600); }
.btl-topbar-link:hover { color: var(--btl-blue); border-color: rgba(37,99,235,.25); }
.btl-organization-chip { max-width: 230px; min-height: 38px; padding: 0 11px; border: 1px solid var(--btl-gray-200); border-radius: 11px; background: var(--btl-gray-50); color: var(--btl-gray-600); display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 750; }
.btl-organization-chip .btl-icon { width: 17px; height: 17px; color: var(--btl-blue); flex: 0 0 auto; }
.btl-organization-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btl-metric-grid--individual,
.btl-metric-grid--organization { grid-template-columns: repeat(4,minmax(0,1fr)); }
.btl-metric-card--wallet { grid-template-columns: auto 1fr; }

.btl-dashboard-grid--individual-primary { grid-template-columns: .95fr 1.45fr; }
.btl-dashboard-grid--individual-lower { grid-template-columns: 1.15fr 1fr; }
.btl-org-insight-grid { display: grid; grid-template-columns: .72fr 1.15fr 1.05fr; gap: 16px; margin-bottom: 16px; }
.btl-dashboard-grid--organization-lower { grid-template-columns: 1.55fr .85fr; }

.btl-empty-inline--dashboard { min-height: 150px; padding: 26px; border: 1px dashed var(--btl-gray-200); border-radius: 13px; background: var(--btl-gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; }
.btl-empty-inline__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #047857; background: #ecfdf5; }
.btl-empty-inline--dashboard strong { font-size: 12px; }
.btl-empty-inline--dashboard > span:last-child { max-width: 360px; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }

.btl-empty-table { min-height: 210px; padding: 26px; border: 1px dashed var(--btl-gray-200); border-radius: 13px; background: var(--btl-gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.btl-empty-table__icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--btl-blue); background: #eff6ff; }
.btl-empty-table strong { font-size: 12px; }
.btl-empty-table > span:not(.btl-empty-table__icon) { max-width: 430px; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }
.btl-empty-table > a { margin-top: 3px; color: var(--btl-blue); font-size: 10px; font-weight: 800; text-decoration: none; }

.btl-quick-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.btl-quick-card { min-height: 164px; padding: 16px 13px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; transition: .18s ease; }
.btl-quick-card:hover { transform: translateY(-1px); border-color: rgba(37,99,235,.28); box-shadow: var(--btl-shadow-sm); }
.btl-quick-card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px; }
.btl-quick-card strong { font-size: 12px; }
.btl-quick-card small { min-height: 34px; color: var(--btl-slate); font-size: 9px; line-height: 1.8; }
.btl-quick-card em { margin-top: auto; color: var(--btl-blue); font-size: 9px; font-style: normal; font-weight: 800; }
.btl-quick-list--org > a { min-height: 62px; border: 1px solid transparent; }
.btl-quick-list--org > a:hover { border-color: var(--btl-gray-100); }

.btl-chart-empty { min-height: 215px; padding: 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 7px; border: 1px dashed var(--btl-gray-200); border-radius: 13px; background: linear-gradient(180deg,#fff,#fafcff); }
.btl-chart-empty > span { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--btl-blue); background: #eff6ff; }
.btl-chart-empty strong { font-size: 11px; }
.btl-chart-empty small { max-width: 310px; color: var(--btl-slate); font-size: 9px; line-height: 1.9; }
.btl-trend-chart { min-height: 215px; padding: 4px 4px 0; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.btl-trend-chart svg { width: 100%; height: 190px; overflow: visible; }
.btl-trend-chart__grid { fill: none; stroke: #eef2f7; stroke-width: .55; vector-effect: non-scaling-stroke; }
.btl-trend-chart__line { fill: none; stroke: var(--btl-blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.btl-trend-chart circle { fill: #fff; stroke: var(--btl-blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.btl-trend-chart__labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.btl-trend-chart__labels span { color: var(--btl-slate); font-size: 9px; text-align: center; }

.btl-distribution { min-height: 215px; display: grid; grid-template-columns: minmax(140px,.8fr) 1fr; gap: 18px; align-items: center; }
.btl-donut { width: 154px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: var(--btl-donut-gradient); position: relative; display: grid; place-items: center; }
.btl-donut::after { content: ''; position: absolute; inset: 27px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--btl-gray-100); }
.btl-donut > div { position: relative; z-index: 1; display: grid; text-align: center; gap: 2px; }
.btl-donut strong { font-size: 24px; }
.btl-donut span { color: var(--btl-slate); font-size: 9px; }
.btl-distribution__legend { display: grid; gap: 10px; }
.btl-distribution__legend > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.btl-distribution__legend i { width: 8px; height: 8px; border-radius: 50%; }
.btl-distribution__legend span { color: var(--btl-slate); font-size: 9px; }
.btl-distribution__legend strong { font-size: 10px; }

.btl-org-context-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.btl-context-card { min-height: 90px; padding: 14px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; box-shadow: var(--btl-shadow-sm); text-decoration: none; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.btl-context-card:hover { border-color: rgba(37,99,235,.28); }
.btl-context-card__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.btl-context-card__icon.is-red { color: #dc2626; background: #fef2f2; }
.btl-context-card > div { min-width: 0; display: grid; gap: 2px; }
.btl-context-card small { color: var(--btl-slate); font-size: 9px; }
.btl-context-card strong { font-size: 12px; }
.btl-context-card span { color: var(--btl-gray-400); font-size: 9px; }
.btl-context-card > .btl-icon { width: 16px; height: 16px; color: var(--btl-gray-400); }

.btl-panel--contracts .btl-table td:first-child strong { font-size: 10px; }
.btl-activity-list { display: grid; }
.btl-activity-list > div { min-height: 58px; padding: 9px 2px; border-bottom: 1px solid var(--btl-gray-100); display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; }
.btl-activity-list > div:last-child { border-bottom: 0; }
.btl-activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--btl-blue); box-shadow: 0 0 0 5px #eff6ff; }
.btl-activity-list > div > div { display: grid; gap: 3px; }
.btl-activity-list strong { font-size: 10px; }
.btl-activity-list small { color: var(--btl-slate); font-size: 9px; line-height: 1.7; }
.btl-activity-list time { color: var(--btl-gray-400); font-size: 8px; white-space: nowrap; }

@media (max-width: 1240px) {
  .btl-org-insight-grid { grid-template-columns: 1fr 1fr; }
  .btl-panel--quick-org { grid-row: span 2; }
  .btl-quick-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .btl-topbar-actions { margin-inline-start: auto; }
  .btl-organization-chip { display: none; }
  .btl-metric-grid--individual, .btl-metric-grid--organization { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .btl-dashboard-grid--individual-primary,
  .btl-dashboard-grid--individual-lower,
  .btl-dashboard-grid--organization-lower,
  .btl-org-insight-grid { grid-template-columns: 1fr; }
  .btl-panel--quick-org { grid-row: auto; }
  .btl-org-context-strip { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .btl-topbar-actions .btl-topbar-link:last-child { display: none; }
  .btl-metric-grid--individual, .btl-metric-grid--organization { grid-template-columns: 1fr; }
  .btl-quick-cards { grid-template-columns: 1fr 1fr; }
  .btl-distribution { grid-template-columns: 1fr; }
  .btl-dashboard-head { align-items: stretch; }
  .btl-dashboard-head .btl-page-head__actions { width: 100%; }
  .btl-dashboard-head .btl-page-head__actions .btl-button { flex: 1; }
}

@media (max-width: 440px) {
  .btl-quick-cards { grid-template-columns: 1fr; }
}

/* v0.6.1 — P4 Contract Platform Pages + Bulk Workspace */
.btl-contract-toolbar { margin-bottom: 14px; padding: 13px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; box-shadow: var(--btl-shadow-sm); }
.btl-contract-filters { display: grid; grid-template-columns: minmax(240px,1.6fr) repeat(3,minmax(130px,.7fr)) auto; gap: 9px; align-items: center; }
.btl-contract-filters input, .btl-contract-filters select, .btl-inline-fields input, .btl-inline-fields select, .btl-form-grid-demo input, .btl-demo-textarea textarea { width: 100%; min-height: 42px; border: 1px solid var(--btl-gray-200); border-radius: 10px; background: #fff; padding: 0 11px; font: inherit; font-size: 11px; color: var(--btl-ink); outline: none; }
.btl-contract-filters input:focus, .btl-contract-filters select:focus, .btl-inline-fields input:focus, .btl-inline-fields select:focus, .btl-form-grid-demo input:focus, .btl-demo-textarea textarea:focus { border-color: rgba(37,99,235,.48); box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.btl-filter-search { min-height: 42px; padding: 0 10px; border: 1px solid var(--btl-gray-200); border-radius: 10px; display: flex; align-items: center; gap: 7px; }
.btl-filter-search .btl-icon { width: 17px; height: 17px; color: var(--btl-gray-400); }
.btl-filter-search input { min-height: 38px; padding: 0; border: 0; box-shadow: none!important; }
.btl-soft-count { min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 8px; background: var(--btl-gray-50); color: var(--btl-slate); font-size: 9px; font-weight: 750; }
.btl-contract-list-panel { padding-bottom: 8px; }
.btl-contract-table td strong { display: block; font-size: 11px; color: var(--btl-ink); }
.btl-contract-table td small { display: block; margin-top: 3px; color: var(--btl-slate); font-size: 8px; }
.btl-table-action { min-height: 30px; padding: 0 9px; border: 1px solid rgba(37,99,235,.2); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.btl-empty-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }

.btl-contract-wizard { border: 1px solid var(--btl-gray-200); border-radius: 18px; background: #fff; box-shadow: var(--btl-shadow-sm); overflow: hidden; }
.btl-wizard-steps { padding: 14px; border-bottom: 1px solid var(--btl-gray-100); background: var(--btl-gray-50); display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
.btl-wizard-steps button { min-height: 54px; padding: 7px; border: 0; border-radius: 10px; background: transparent; color: var(--btl-slate); display: flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 9px; cursor: pointer; }
.btl-wizard-steps button span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--btl-gray-200); color: var(--btl-gray-600); font-size: 8px; font-weight: 800; }
.btl-wizard-steps button.is-current { background: #fff; color: var(--btl-blue); box-shadow: var(--btl-shadow-sm); font-weight: 800; }
.btl-wizard-steps button.is-current span { color: #fff; background: linear-gradient(135deg,var(--btl-blue),var(--btl-purple)); }
.btl-wizard-body { min-height: 500px; padding: 28px; }
.btl-wizard-body > section { min-height: 430px; }
.btl-wizard-footer { min-height: 68px; padding: 12px 18px; border-top: 1px solid var(--btl-gray-100); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btl-wizard-footer > span { color: var(--btl-slate); font-size: 10px; }
.btl-form-section-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.btl-form-section-head h2 { margin: 0 0 5px; font-size: 19px; }
.btl-form-section-head p { margin: 0; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }
.btl-option-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.btl-select-card { min-height: 150px; padding: 16px; border: 1px solid var(--btl-gray-200); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; position: relative; }
.btl-select-card:hover { border-color: rgba(37,99,235,.3); background: #fbfdff; }
.btl-select-card input { position: absolute; top: 12px; inset-inline-end: 12px; accent-color: var(--btl-blue); }
.btl-select-card > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--btl-blue); background: #eff6ff; }
.btl-select-card strong { margin-top: 7px; font-size: 12px; }
.btl-select-card small { color: var(--btl-slate); font-size: 8px; line-height: 1.8; }
.btl-party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btl-party-card { min-height: 300px; padding: 20px; border: 1px solid var(--btl-gray-200); border-radius: 15px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.btl-party-card.is-verified { background: linear-gradient(180deg,#fff,#f8fffc); border-color: rgba(16,185,129,.22); }
.btl-party-card__badge { width: fit-content; padding: 6px 8px; border-radius: 8px; background: #ecfdf5; color: #047857; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 800; }
.btl-party-card__badge .btl-icon { width: 14px; height: 14px; }
.btl-party-card h3 { margin: 5px 0 0; font-size: 16px; }
.btl-party-card p { margin: 0; color: var(--btl-slate); font-size: 10px; line-height: 1.9; }
.btl-party-card small { color: var(--btl-gray-400); font-size: 8px; line-height: 1.9; }
.btl-inline-tabs { width: fit-content; max-width: 100%; padding: 3px; border-radius: 10px; background: var(--btl-gray-100); display: flex; gap: 2px; }
.btl-inline-tabs button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--btl-slate); font: inherit; font-size: 9px; cursor: pointer; }
.btl-inline-tabs button.is-active { background: #fff; color: var(--btl-blue); box-shadow: var(--btl-shadow-sm); font-weight: 800; }
.btl-inline-fields { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; margin: 10px 0; }
.btl-form-grid-demo { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.btl-form-grid-demo label, .btl-demo-textarea { display: grid; gap: 6px; color: var(--btl-gray-600); font-size: 10px; font-weight: 700; }
.btl-demo-textarea { margin-top: 16px; }
.btl-demo-textarea textarea { min-height: 130px; padding: 11px; resize: vertical; line-height: 1.9; }
.btl-clause-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.btl-clause-grid label { min-height: 52px; padding: 0 12px; border: 1px solid var(--btl-gray-200); border-radius: 11px; display: flex; align-items: center; gap: 8px; font-size: 10px; }
.btl-clause-grid input { accent-color: var(--btl-blue); }
.btl-review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.btl-review-grid article { min-height: 105px; padding: 15px; border: 1px solid var(--btl-gray-200); border-radius: 13px; display: grid; align-content: center; gap: 5px; }
.btl-review-grid span { color: var(--btl-slate); font-size: 9px; }
.btl-review-grid strong { font-size: 12px; }
.btl-final-stage { min-height: 330px; border: 1px dashed var(--btl-gray-200); border-radius: 14px; background: var(--btl-gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 26px; }
.btl-final-stage > span { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: #eff6ff; color: var(--btl-blue); }
.btl-final-stage h3 { margin: 5px 0 0; font-size: 15px; }
.btl-final-stage p { max-width: 520px; color: var(--btl-slate); font-size: 9px; line-height: 2; }

.btl-bulk-layout { display: grid; grid-template-columns: 1.5fr .55fr; gap: 15px; align-items: start; }
.btl-process-card--compact { min-height: 520px; padding: 24px; }
.btl-process-card--compact .btl-dropzone small { margin-top: 10px; color: var(--btl-gray-400); font-size: 8px; }
.btl-bulk-side { display: grid; gap: 10px; }
.btl-bulk-side article { padding: 15px; border: 1px solid var(--btl-gray-200); border-radius: 13px; background: #fff; box-shadow: var(--btl-shadow-sm); display: grid; gap: 5px; }
.btl-bulk-side span { color: var(--btl-slate); font-size: 8px; }
.btl-bulk-side strong { font-size: 11px; }
.btl-bulk-side small { color: var(--btl-slate); font-size: 8px; line-height: 1.9; }

.btl-analysis-layout { display: grid; grid-template-columns: 1.45fr .6fr; gap: 15px; margin-bottom: 15px; }
.btl-analysis-input { min-height: 470px; }
.btl-analysis-panel { margin-top: 14px; }
.btl-analysis-input .btl-dropzone { min-height: 330px; }
.btl-analysis-config { display: flex; flex-direction: column; }
.btl-config-row { min-height: 48px; padding: 0 2px; border-bottom: 1px solid var(--btl-gray-100); display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--btl-gray-600); font-size: 10px; }
.btl-config-row input { accent-color: var(--btl-blue); }
.btl-engine-status { margin: 14px 0; padding: 12px; border-radius: 11px; background: var(--btl-gray-50); display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; }
.btl-engine-status > span { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--btl-purple); background: #f5f3ff; }
.btl-engine-status strong { font-size: 9px; }
.btl-engine-status small { color: var(--btl-slate); font-size: 8px; }
.btl-analysis-results { margin-bottom: 15px; }
.btl-result-shell { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.btl-result-shell > div { min-height: 84px; padding: 12px; border: 1px solid var(--btl-gray-100); border-radius: 11px; display: grid; align-content: center; gap: 5px; }
.btl-result-shell span { color: var(--btl-slate); font-size: 8px; }
.btl-result-shell strong { font-size: 11px; }

.btl-case-types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.btl-case-type-card { min-height: 110px; padding: 15px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; text-decoration: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.btl-case-type-card > span { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #fff7ed; color: #ea580c; }
.btl-case-type-card > div { display: grid; gap: 3px; }
.btl-case-type-card strong { font-size: 11px; }
.btl-case-type-card small { color: var(--btl-slate); font-size: 8px; }
.btl-case-type-card em { color: var(--btl-blue); font-size: 8px; font-style: normal; font-weight: 800; }
.btl-case-type-card.is-disabled { opacity: .62; }
.btl-legal-case-workspace, .btl-contract-detail { border: 1px solid var(--btl-gray-200); border-radius: 16px; background: #fff; box-shadow: var(--btl-shadow-sm); overflow: hidden; }
.btl-tablist { padding: 10px 12px; border-bottom: 1px solid var(--btl-gray-100); background: var(--btl-gray-50); display: flex; gap: 5px; overflow-x: auto; }
.btl-tablist button { min-height: 36px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: var(--btl-slate); font: inherit; font-size: 9px; white-space: nowrap; cursor: pointer; }
.btl-tablist button.is-active { color: var(--btl-blue); background: #fff; box-shadow: var(--btl-shadow-sm); font-weight: 800; }
.btl-tab-panel { min-height: 390px; padding: 22px; }
.btl-case-editor-empty { min-height: 280px; border: 1px dashed var(--btl-gray-200); border-radius: 13px; background: var(--btl-gray-50); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; padding: 24px; }
.btl-case-editor-empty > span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #eff6ff; color: var(--btl-blue); }
.btl-case-editor-empty strong { font-size: 11px; }
.btl-case-editor-empty p { max-width: 440px; margin: 0; color: var(--btl-slate); font-size: 9px; line-height: 1.9; }

.btl-title-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btl-title-status h1 { margin-bottom: 2px; }
.btl-contract-detail-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.btl-contract-detail-metrics article { min-height: 92px; padding: 14px; border: 1px solid var(--btl-gray-200); border-radius: 13px; background: #fff; display: grid; align-content: center; gap: 4px; }
.btl-contract-detail-metrics span { color: var(--btl-slate); font-size: 8px; }
.btl-contract-detail-metrics strong { font-size: 12px; }
.btl-contract-detail-metrics small { color: var(--btl-gray-400); font-size: 8px; }
.btl-detail-grid, .btl-two-column-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.btl-detail-card { padding: 17px; border: 1px solid var(--btl-gray-100); border-radius: 13px; background: #fff; }
.btl-detail-card h3 { margin: 0 0 13px; font-size: 13px; }
.btl-party-row { min-height: 62px; padding: 9px 0; border-bottom: 1px solid var(--btl-gray-100); display: grid; gap: 2px; }
.btl-party-row:last-child { border-bottom: 0; }
.btl-party-row span, .btl-detail-card dt { color: var(--btl-slate); font-size: 8px; }
.btl-party-row strong, .btl-detail-card dd { font-size: 10px; }
.btl-party-row small { color: var(--btl-gray-400); font-size: 8px; }
.btl-detail-card dl { margin: 0; display: grid; gap: 1px; }
.btl-detail-card dl > div { min-height: 46px; border-bottom: 1px solid var(--btl-gray-100); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btl-detail-card dl > div:last-child { border-bottom: 0; }
.btl-detail-card dd { margin: 0; }
.btl-muted-copy { color: var(--btl-slate); font-size: 9px; line-height: 1.9; }
.btl-contract-actions-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.btl-contract-actions-grid > * { min-height: 150px; padding: 14px; border: 1px solid var(--btl-gray-200); border-radius: 13px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.btl-contract-actions-grid > * > span { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eff6ff; color: var(--btl-blue); }
.btl-contract-actions-grid strong { margin-top: 5px; font-size: 11px; }
.btl-contract-actions-grid small { color: var(--btl-slate); font-size: 8px; line-height: 1.8; }
.btl-contract-actions-grid .is-disabled { opacity: .55; }
.btl-empty-inline a { color: var(--btl-blue); text-decoration: none; font-size: 9px; font-weight: 800; }

@media (max-width: 1180px) {
  .btl-contract-filters { grid-template-columns: 1fr 1fr 1fr; }
  .btl-filter-search { grid-column: span 2; }
  .btl-wizard-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .btl-option-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .btl-bulk-layout, .btl-analysis-layout { grid-template-columns: 1fr; }
  .btl-bulk-side { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .btl-contract-actions-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 800px) {
  .btl-contract-filters { grid-template-columns: 1fr 1fr; }
  .btl-filter-search { grid-column: 1 / -1; }
  .btl-party-grid, .btl-detail-grid, .btl-two-column-cards, .btl-form-grid-demo, .btl-case-types { grid-template-columns: 1fr; }
  .btl-clause-grid, .btl-result-shell, .btl-contract-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .btl-bulk-side { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .btl-contract-filters { grid-template-columns: 1fr; }
  .btl-filter-search { grid-column: 1; }
  .btl-wizard-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .btl-wizard-body { padding: 17px; }
  .btl-option-grid, .btl-clause-grid, .btl-review-grid, .btl-result-shell, .btl-contract-detail-metrics, .btl-contract-actions-grid { grid-template-columns: 1fr; }
  .btl-wizard-footer { flex-wrap: wrap; }
  .btl-wizard-footer > span { order: -1; width: 100%; text-align: center; }
  .btl-inline-fields { grid-template-columns: 1fr; }
  .btl-tab-panel { padding: 15px; }
}

/* v0.7.0 — P5 Shared Legal Platform */
.btl-service-filter,.btl-notification-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.btl-service-filter span,.btl-notification-tabs a{min-height:34px;padding:0 11px;border:1px solid var(--btl-gray-200);border-radius:9px;background:#fff;color:var(--btl-slate);font-size:9px;font-weight:750;text-decoration:none;display:inline-flex;align-items:center}.btl-service-filter .is-active,.btl-notification-tabs a.is-active{border-color:rgba(37,99,235,.24);background:#eff6ff;color:var(--btl-blue)}
.btl-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:15px}.btl-service-card{min-height:300px;padding:16px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff;box-shadow:var(--btl-shadow-sm);display:flex;flex-direction:column;gap:12px}.btl-service-card.is-selected{border-color:rgba(37,99,235,.34);box-shadow:0 0 0 3px rgba(37,99,235,.05)}.btl-service-card__icon{width:42px;height:42px;border-radius:12px;background:#eff6ff;color:var(--btl-blue);display:grid;place-items:center}.btl-service-card__body{display:grid;gap:5px}.btl-service-card h2{margin:0;font-size:13px}.btl-service-card p{margin:0;color:var(--btl-slate);font-size:9px;line-height:1.9}.btl-service-card dl{margin:0;display:grid}.btl-service-card dl>div{min-height:38px;border-bottom:1px solid var(--btl-gray-100);display:flex;align-items:center;justify-content:space-between;gap:8px}.btl-service-card dt{color:var(--btl-slate);font-size:8px}.btl-service-card dd{margin:0;font-size:9px;font-weight:750}.btl-service-card .btl-button{margin-top:auto;width:100%}.btl-service-detail{margin-bottom:15px}.btl-service-detail__content{display:grid;gap:12px}.btl-service-detail__content>p{margin:0;color:var(--btl-slate);font-size:10px;line-height:2}.btl-service-detail__content .btl-button{justify-self:start}
.btl-document-filters{display:grid;grid-template-columns:minmax(240px,1.6fr) minmax(140px,.6fr) auto;gap:9px;align-items:center}.btl-document-filters select{width:100%;min-height:42px;border:1px solid var(--btl-gray-200);border-radius:10px;background:#fff;padding:0 10px;font:inherit;font-size:10px;color:var(--btl-ink)}.btl-security-note{margin-top:14px;padding:14px 16px;border:1px solid #dbeafe;border-radius:13px;background:#f8fbff;display:grid;grid-template-columns:auto 1fr;gap:11px;align-items:start}.btl-security-note>span{width:38px;height:38px;border-radius:10px;background:#eff6ff;color:var(--btl-blue);display:grid;place-items:center}.btl-security-note strong{font-size:10px}.btl-security-note p{margin:4px 0 0;color:var(--btl-slate);font-size:8px;line-height:1.9}
.btl-notification-center{min-height:420px}.btl-notification-list{display:grid}.btl-notification-list article{min-height:76px;padding:12px 2px;border-bottom:1px solid var(--btl-gray-100);display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.btl-notification-list article:last-child{border-bottom:0}.btl-notification-list__icon{width:38px;height:38px;border-radius:11px;background:#eff6ff;color:var(--btl-blue);display:grid;place-items:center}.btl-notification-list article>div{display:grid;gap:3px}.btl-notification-list strong{font-size:10px}.btl-notification-list p{margin:0;color:var(--btl-slate);font-size:8px;line-height:1.8}.btl-notification-list a{color:var(--btl-blue);font-size:8px;font-weight:800;text-decoration:none}.btl-notification-list time{color:var(--btl-gray-400);font-size:8px;white-space:nowrap}
.btl-signature-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.btl-signature-metrics article{min-height:86px;padding:14px;border:1px solid var(--btl-gray-200);border-radius:13px;background:#fff;box-shadow:var(--btl-shadow-sm);display:grid;align-content:center;gap:4px}.btl-signature-metrics span{color:var(--btl-slate);font-size:8px}.btl-signature-metrics strong{font-size:18px}.btl-signature-state-guide{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.btl-signature-state-guide article{min-height:115px;padding:14px;border:1px solid var(--btl-gray-200);border-radius:13px;background:#fff;display:grid;align-content:start;gap:6px}.btl-signature-state-guide strong{font-size:9px;color:var(--btl-ink)}.btl-signature-state-guide span{font-size:8px;line-height:1.85;color:var(--btl-slate)}
@media(max-width:1100px){.btl-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.btl-signature-state-guide{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.btl-document-filters{grid-template-columns:1fr 1fr}.btl-document-filters .btl-filter-search{grid-column:1/-1}.btl-signature-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.btl-service-grid,.btl-document-filters,.btl-signature-metrics,.btl-signature-state-guide{grid-template-columns:1fr}.btl-document-filters .btl-filter-search{grid-column:1}.btl-notification-list article{grid-template-columns:auto 1fr}.btl-notification-list time{grid-column:2}}

/* v0.8.0 — Organization & Human Capital */
.btl-page-context{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--btl-border);border-radius:12px;background:#fff;color:var(--btl-ink);font-size:13px;white-space:nowrap}.btl-page-context .btl-icon{width:17px;height:17px;color:var(--btl-blue)}
.btl-section-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;padding:6px;border:1px solid var(--btl-border);background:#fff;border-radius:14px}.btl-section-tabs a{padding:9px 13px;border-radius:10px;color:var(--btl-slate);font-size:13px;font-weight:700;text-decoration:none}.btl-section-tabs a:hover,.btl-section-tabs a.is-active{background:rgba(37,99,235,.08);color:var(--btl-blue)}
.btl-org-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.btl-org-kpi{display:flex;gap:13px;align-items:flex-start;padding:18px;background:#fff;border:1px solid var(--btl-border);border-radius:16px;box-shadow:var(--btl-shadow-sm)}.btl-org-kpi>span{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;flex:0 0 auto}.btl-org-kpi>span.is-blue{background:#eff6ff;color:#2563eb}.btl-org-kpi>span.is-green{background:#ecfdf5;color:#059669}.btl-org-kpi>span.is-orange{background:#fff7ed;color:#ea580c}.btl-org-kpi>span.is-purple{background:#f5f3ff;color:#7c3aed}.btl-org-kpi .btl-icon{width:21px;height:21px}.btl-org-kpi small,.btl-org-kpi p{display:block;color:var(--btl-slate)}.btl-org-kpi strong{display:block;margin:3px 0 2px;font-size:24px;color:var(--btl-ink)}.btl-org-kpi p{margin:0;font-size:11px}
.btl-org-overview-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.btl-panel-card{background:#fff;border:1px solid var(--btl-border);border-radius:16px;padding:18px;box-shadow:var(--btl-shadow-sm)}.btl-panel-card__head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.btl-panel-card__head h2{font-size:17px;margin:3px 0 0}.btl-panel-card__head a{font-size:12px;color:var(--btl-blue);font-weight:800;text-decoration:none}
.btl-org-action-list{display:grid;gap:8px}.btl-org-action{display:grid;grid-template-columns:38px 1fr 18px;align-items:center;gap:10px;padding:12px;border:1px solid #edf1f7;border-radius:12px;text-decoration:none;color:var(--btl-ink);transition:.15s}.btl-org-action:hover{border-color:#cbdafe;background:#f8fbff}.btl-org-action>span{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#f4f7fb;color:var(--btl-blue)}.btl-org-action strong,.btl-org-action small{display:block}.btl-org-action small{margin-top:2px;color:var(--btl-slate);font-size:11px}.btl-org-action>.btl-icon{width:16px;color:#94a3b8}
.btl-org-overview-grid .btl-empty-inline{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;text-align:start;gap:12px;padding:15px;border:1px dashed #d9e2ef;border-radius:13px;background:#fafcff}.btl-org-overview-grid .btl-empty-inline>span:first-child{display:grid;place-items:center;width:38px;max-width:none;height:38px;border-radius:10px;background:#ecfdf5;color:#059669;flex:0 0 auto}.btl-org-overview-grid .btl-empty-inline>div{min-width:0}.btl-org-overview-grid .btl-empty-inline strong{display:block;margin-bottom:4px}.btl-org-overview-grid .btl-empty-inline p{margin:0;color:var(--btl-slate);font-size:12px;line-height:1.9}
.btl-org-empty{margin-top:16px}.btl-department-suggestions{display:flex;gap:8px;flex-wrap:wrap}.btl-department-suggestions span{padding:8px 12px;border-radius:999px;background:#f4f7fb;border:1px solid #e5ebf3;font-size:12px;font-weight:700}.btl-muted-copy{color:var(--btl-slate);font-size:11px;margin:12px 0 0}.btl-department-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.btl-department-card{padding:17px;background:#fff;border:1px solid var(--btl-border);border-radius:15px}.btl-department-card>span{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#eff6ff;color:#2563eb}.btl-department-card h2{font-size:16px;margin:11px 0 3px}.btl-department-card p{margin:0;color:var(--btl-slate);font-size:12px}.btl-department-card dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 0}.btl-department-card dl div{padding:9px;background:#f8fafc;border-radius:10px}.btl-department-card dt{font-size:10px;color:var(--btl-slate)}.btl-department-card dd{margin:2px 0 0;font-weight:800}
.btl-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}.btl-role-card{padding:17px;background:#fff;border:1px solid var(--btl-border);border-radius:15px}.btl-role-card.is-current{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(37,99,235,.06)}.btl-role-card>div{display:flex;align-items:center;gap:9px}.btl-role-card>div>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f5f3ff;color:#7c3aed}.btl-role-card h2{font-size:14px;margin:0}.btl-role-card p{margin:12px 0 4px;font-size:12px;color:var(--btl-ink)}.btl-role-card small{color:var(--btl-slate);font-size:10px;line-height:1.8}.btl-access-model{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}.btl-access-model span{padding:9px 12px;border:1px solid #e4eaf3;border-radius:10px;background:#f8fafc;font-size:11px;font-weight:800}.btl-access-model i{font-style:normal;color:#94a3b8;font-weight:800}
.btl-settings-grid--org .is-disabled{opacity:.72;cursor:default}.btl-hc-capabilities{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.btl-hc-capabilities article{display:flex;gap:11px;padding:16px;background:#fff;border:1px solid var(--btl-border);border-radius:15px}.btl-hc-capabilities article>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#f5f3ff;color:#7c3aed;flex:0 0 auto}.btl-hc-capabilities h2{font-size:14px;margin:0 0 4px}.btl-hc-capabilities p{font-size:11px;color:var(--btl-slate);line-height:1.8;margin:0}.btl-scope-note{display:flex;gap:8px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:#f8fafc;border:1px solid #e5eaf1;color:var(--btl-slate);font-size:11px;margin-top:14px}.btl-scope-note strong{color:var(--btl-ink)}
.btl-activity-list{display:grid;gap:9px}.btl-activity-list article{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:11px;padding:13px 15px;background:#fff;border:1px solid var(--btl-border);border-radius:13px}.btl-activity-list article>span{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eff6ff;color:#2563eb}.btl-activity-list strong{display:block;font-size:13px}.btl-activity-list p{margin:2px 0 0;color:var(--btl-slate);font-size:11px}.btl-activity-list time{font-size:10px;color:var(--btl-slate);white-space:nowrap}
.btl-table td small{display:block;margin-top:2px;color:var(--btl-slate);font-size:10px}
@media (max-width:1100px){.btl-org-kpis,.btl-hc-capabilities{grid-template-columns:repeat(2,minmax(0,1fr))}.btl-org-overview-grid{grid-template-columns:1fr}.btl-role-grid,.btl-department-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){.btl-org-kpis,.btl-hc-capabilities,.btl-role-grid,.btl-department-grid{grid-template-columns:1fr}.btl-section-tabs{overflow-x:auto;flex-wrap:nowrap}.btl-section-tabs a{white-space:nowrap}.btl-page-context{display:none}.btl-activity-list article{grid-template-columns:34px 1fr}.btl-activity-list time{grid-column:2}.btl-access-model{justify-content:flex-start}}


/* v0.8.1 — Bulk discovery hardening + desktop visual balance */
@media (min-width: 981px) {
  :root { --btl-sidebar-width: 248px; }
  .btl-sidebar { padding: 20px 14px; gap: 14px; }
  .btl-brand { gap: 10px; padding: 0 8px 12px; }
  .btl-brand img { width: 34px; height: 34px; }
  .btl-brand strong { font-size: 22px; }
  .btl-nav { gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
  .btl-nav::-webkit-scrollbar { width: 4px; }
  .btl-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
  .btl-nav__item { min-height: 42px; padding: 0 11px; border-radius: 10px; gap: 10px; font-size: 13px; }
  .btl-nav__icon { width: 21px; }
  .btl-nav__icon .btl-icon { width: 19px; height: 19px; }
  .btl-plan-card { padding: 12px; gap: 7px; border-radius: 14px; }
  .btl-plan-card__action { min-height: 32px; }
  .btl-topbar { height: 68px; padding: 0 26px; gap: 14px; }
  .btl-search { width: min(400px, 40vw); height: 40px; border-radius: 11px; }
  .btl-icon-button { width: 38px; height: 38px; border-radius: 11px; }
  .btl-user-context { min-width: 0; max-width: 220px; gap: 9px; }
  .btl-user-context div:last-child { min-width: 0; max-width: 145px; }
  .btl-user-context strong, .btl-user-context div:last-child > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btl-user-context strong { font-size: 12px; }
  .btl-user-context span { font-size: 10px; }
  .btl-avatar { width: 36px; height: 36px; }
  .btl-workspace { width: min(calc(100% - 40px), 1320px); padding: 28px 0 48px; }
  .btl-page-head { margin-bottom: 22px; }
  .btl-page-head h1 { font-size: clamp(27px, 2.1vw, 33px); }
  .btl-page-head p { font-size: 13px; }
  .btl-choice-grid--creation { width: min(100%, 1040px); margin-inline: auto; gap: 16px; }
  .btl-choice-grid--creation .btl-choice-card { min-height: 270px; padding: 28px; border-radius: 16px; }
  .btl-choice-grid--creation .btl-choice-card > span { width: 50px; height: 50px; border-radius: 14px; }
  .btl-choice-grid--creation .btl-choice-card h2 { margin: 17px 0 7px; font-size: 20px; }
  .btl-choice-grid--creation .btl-choice-card p { margin-bottom: 18px; font-size: 12px; line-height: 1.95; }
  .btl-choice-card--bulk > span { color: #059669; background: #ecfdf5; }
}

@media (min-width: 1500px) {
  .btl-workspace { width: min(calc(100% - 48px), 1360px); }
}


/* v0.8.2 — profile identity, integrated bulk IA, dashboard empty states, compact desktop nav */
.btl-user-context__meta { display: grid; gap: 2px; min-width: 0; }
.btl-user-context__meta strong,
.btl-user-context__meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btl-empty-inline--dashboard { width: 100%; min-width: 0; min-height: 170px; overflow: hidden; }
.btl-empty-inline--dashboard > strong { width: 100%; text-align: center; }
.btl-empty-inline--dashboard > span:last-child { width: min(100%, 420px); max-width: 420px; display: block; white-space: normal; overflow-wrap: normal; word-break: normal; text-align: center; line-height: 1.9; }
.btl-panel--actions,
.btl-panel--activity { min-width: 0; overflow: hidden; }
.btl-panel--actions .btl-action-list,
.btl-panel--activity .btl-activity-list { min-width: 0; }

.btl-contract-origin { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 8px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.btl-contract-origin.is-single { color: #1d4ed8; background: #eff6ff; }
.btl-contract-origin.is-bulk { color: #047857; background: #ecfdf5; }

@media (min-width: 981px) {
  :root { --btl-sidebar-width: 236px; }
  .btl-sidebar { padding: 16px 12px; gap: 10px; }
  .btl-brand { padding: 0 7px 10px; gap: 9px; }
  .btl-brand img { width: 31px; height: 31px; }
  .btl-brand strong { font-size: 20px; }
  .btl-nav { gap: 1px; }
  .btl-nav__item { min-height: 38px; padding: 0 10px; border-radius: 9px; gap: 8px; font-size: 11.5px; line-height: 1.35; }
  .btl-nav__icon { width: 19px; }
  .btl-nav__icon .btl-icon { width: 17px; height: 17px; }
  .btl-sidebar-bottom { gap: 7px; }
  .btl-plan-card { padding: 10px; gap: 5px; border-radius: 12px; }
  .btl-plan-card__head span { font-size: 9px; }
  .btl-plan-card__head strong { font-size: 11px; }
  .btl-plan-card small { font-size: 8.5px; line-height: 1.55; }
  .btl-plan-card__action { min-height: 29px; font-size: 9.5px; }
  .btl-nav--footer { padding-top: 5px; }
  .btl-topbar { height: 64px; }
  .btl-user-context { max-width: 235px; }
  .btl-user-context__meta { max-width: 158px; }
  .btl-user-context__meta strong { font-size: 11.5px; }
  .btl-user-context__meta > span { font-size: 9px; }
}

@media (min-width: 981px) and (max-height: 860px) {
  .btl-sidebar { padding-block: 12px; gap: 7px; }
  .btl-brand { padding-bottom: 7px; }
  .btl-nav__item { min-height: 34px; font-size: 10.5px; }
  .btl-plan-card { padding: 8px; }
  .btl-plan-card small { line-height: 1.4; }
  .btl-nav--footer .btl-nav__item { min-height: 33px; }
}

@media (min-width: 1181px) {
  .btl-contract-filters { grid-template-columns: minmax(220px,1.5fr) repeat(4,minmax(118px,.66fr)) auto; }
}

/* v0.9.0 — P7 Wallet / Subscription / Usage */
.btl-wallet-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}.btl-wallet-kpis article{min-height:132px;padding:18px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff;box-shadow:var(--btl-shadow-sm);display:flex;align-items:center;gap:14px}.btl-wallet-kpis__icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;flex:0 0 auto}.btl-wallet-kpis__icon.is-primary{color:#7c3aed;background:#f5f3ff}.btl-wallet-kpis__icon.is-info{color:#2563eb;background:#eff6ff}.btl-wallet-kpis__icon.is-warning{color:#d97706;background:#fff7ed}.btl-wallet-kpis article>div{display:grid;gap:3px}.btl-wallet-kpis small{color:var(--btl-slate);font-size:10px}.btl-wallet-kpis strong{font-size:22px;letter-spacing:-.02em}.btl-wallet-kpis em{font-size:10px;color:var(--btl-slate);font-style:normal}
.btl-billing-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-bottom:16px}.btl-billing-grid>.btl-panel{min-width:0}.btl-commerce-flow{display:grid;grid-template-columns:repeat(7,auto);justify-content:center;align-items:center;gap:10px;padding:16px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff}.btl-commerce-flow>div{min-width:145px;padding:12px;border:1px solid var(--btl-gray-100);border-radius:11px;background:var(--btl-gray-50);display:grid;gap:3px;text-align:center}.btl-commerce-flow strong{font-size:10px}.btl-commerce-flow span{font-size:8px;color:var(--btl-slate)}.btl-commerce-flow i{font-style:normal;color:#94a3b8;font-size:16px}
.btl-current-plan{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px;margin-bottom:16px;border:1px solid rgba(37,99,235,.18);border-radius:15px;background:linear-gradient(135deg,#eff6ff,#f5f3ff)}.btl-current-plan>div{display:grid;gap:3px}.btl-current-plan span:first-child{font-size:9px;color:var(--btl-blue);font-weight:800}.btl-current-plan strong{font-size:20px}.btl-current-plan small{color:var(--btl-slate);font-size:9px}.btl-plan-catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.btl-plan-option{min-height:280px;padding:17px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff;box-shadow:var(--btl-shadow-sm);display:flex;flex-direction:column;gap:9px}.btl-plan-option.is-current{border-color:rgba(37,99,235,.35);box-shadow:0 0 0 3px rgba(37,99,235,.05)}.btl-plan-option>span{font-size:8px;color:var(--btl-blue);font-weight:800}.btl-plan-option h2{margin:0;font-size:18px}.btl-plan-option p{margin:0;color:var(--btl-slate);font-size:9px;line-height:1.9}.btl-plan-price-placeholder{margin-top:auto;padding:10px;border-radius:10px;background:var(--btl-gray-50);color:var(--btl-slate);font-size:8px;text-align:center}.btl-plan-option .btl-button{width:100%}
.btl-usage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.btl-usage-grid article{min-height:180px;padding:17px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff;box-shadow:var(--btl-shadow-sm);display:flex;flex-direction:column;gap:10px}.btl-usage-grid__head{display:flex;align-items:center;justify-content:space-between;gap:10px}.btl-usage-grid__head strong{font-size:13px}.btl-usage-grid p{margin:0;color:var(--btl-slate);font-size:9px}.btl-usage-progress{height:7px;border-radius:999px;background:#eef2f7;overflow:hidden}.btl-usage-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--btl-blue),var(--btl-purple))}.btl-usage-grid small{font-size:8px;color:var(--btl-slate)}.btl-usage-unconnected{margin-top:auto;padding:10px;border-radius:10px;background:#f8fafc;color:var(--btl-slate);font-size:8px}
@media(max-width:1120px){.btl-plan-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.btl-billing-grid{grid-template-columns:1fr}.btl-commerce-flow{grid-template-columns:1fr}.btl-commerce-flow i{transform:rotate(-90deg)}}
@media(max-width:760px){.btl-wallet-kpis,.btl-usage-grid,.btl-plan-catalog{grid-template-columns:1fr}.btl-wallet-kpis article{min-height:105px}.btl-current-plan{align-items:flex-start;flex-direction:column}}

/* v0.10.0 — reports, global search, responsive/state polish */
.btl-mobile-search-link{display:none}
.btl-global-search-panel{margin-bottom:14px;padding:16px;border:1px solid var(--btl-gray-200);border-radius:15px;background:#fff;box-shadow:var(--btl-shadow-sm)}
.btl-global-search-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.btl-global-search-form label{min-height:46px;padding:0 14px;border:1px solid var(--btl-gray-200);border-radius:12px;display:flex;align-items:center;gap:10px;background:#fff;color:var(--btl-gray-400)}
.btl-global-search-form label .btl-icon{width:18px;height:18px}.btl-global-search-form input{width:100%;border:0!important;outline:0!important;box-shadow:none!important;background:transparent;font:inherit;color:var(--btl-ink)}
.btl-search-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.btl-search-tabs a{padding:7px 12px;border-radius:999px;border:1px solid var(--btl-gray-200);color:var(--btl-slate);font-size:10px;font-weight:800;text-decoration:none;background:#fff}.btl-search-tabs a.is-active{border-color:#bfdbfe;background:#eff6ff;color:var(--btl-blue)}
.btl-search-results-panel{min-height:360px}.btl-search-result-list{display:grid;gap:8px}.btl-search-result{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--btl-gray-200);border-radius:12px;color:inherit;text-decoration:none;background:#fff;transition:.15s ease}.btl-search-result:hover{border-color:#bfdbfe;background:#fbfdff;transform:translateY(-1px)}
.btl-search-result__icon{width:39px;height:39px;border-radius:11px;display:grid;place-items:center;background:#eff6ff;color:var(--btl-blue)}.btl-search-result__body{min-width:0}.btl-search-result__body strong{display:block;font-size:12px;margin-bottom:3px}.btl-search-result__body small{display:block;color:var(--btl-slate);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btl-search-result__meta{text-align:left;color:var(--btl-blue);font-size:9px;font-weight:800}.btl-search-result__meta small{display:block;margin-top:3px;color:var(--btl-slate);font-weight:500}.btl-search-result__arrow{color:var(--btl-gray-400)}
.btl-report-filter-panel{margin-bottom:12px;padding:12px;border:1px solid var(--btl-gray-200);border-radius:14px;background:#fff}.btl-report-filters{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:9px}.btl-report-filters select,.btl-report-filters input{min-height:40px;padding:0 10px;border:1px solid var(--btl-gray-200);border-radius:10px;background:#fff;color:var(--btl-ink);font:inherit;font-size:10px}
.btl-report-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.btl-report-kpis article{min-height:92px;padding:15px;border:1px solid var(--btl-gray-200);border-radius:14px;background:#fff;box-shadow:var(--btl-shadow-sm);display:grid;align-content:center;gap:5px}.btl-report-kpis small{color:var(--btl-slate);font-size:9px}.btl-report-kpis strong{font-size:22px}
.btl-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:12px}.btl-report-breakdown{min-width:0}.btl-report-bars{display:grid;gap:11px}.btl-report-bars>div header{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:5px}.btl-report-bars header span{font-size:9px;color:var(--btl-slate);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btl-report-bars header strong{font-size:10px}.btl-report-bars i{height:7px;border-radius:999px;background:#eef2f7;display:block;overflow:hidden}.btl-report-bars i b{height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--btl-blue),var(--btl-purple))}.btl-report-expiring{margin-bottom:14px}
.btl-skeleton{position:relative;overflow:hidden;background:#eef2f7!important;color:transparent!important;border-color:transparent!important}.btl-skeleton:after{content:"";position:absolute;inset:0;transform:translateX(100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);animation:btl-shimmer 1.35s infinite}@keyframes btl-shimmer{to{transform:translateX(-100%)}}
.btl-state-card.is-error .btl-state-card__icon{background:#fef2f2;color:#dc2626}.btl-state-card.is-success .btl-state-card__icon{background:#ecfdf5;color:#059669}.btl-button[disabled],.btl-button.is-disabled{opacity:.5;cursor:not-allowed;pointer-events:none}
@media(max-width:1180px){.btl-report-grid{grid-template-columns:1fr 1fr}.btl-report-grid .btl-report-breakdown:last-child{grid-column:1/-1}.btl-report-filters{grid-template-columns:1fr 1fr}.btl-report-filters .btl-button{width:100%}}
@media(max-width:800px){.btl-mobile-search-link{display:grid}.btl-report-kpis{grid-template-columns:1fr 1fr}.btl-report-grid{grid-template-columns:1fr}.btl-report-grid .btl-report-breakdown:last-child{grid-column:auto}.btl-global-search-form{grid-template-columns:1fr}.btl-global-search-form .btl-button{width:100%}.btl-search-result{grid-template-columns:auto minmax(0,1fr) auto}.btl-search-result__meta{display:none}}
@media(max-width:560px){.btl-report-kpis,.btl-report-filters{grid-template-columns:1fr}.btl-search-tabs{flex-wrap:nowrap;overflow:auto;padding-bottom:3px}.btl-search-tabs a{flex:0 0 auto}.btl-search-result__arrow{display:none}.btl-search-result{grid-template-columns:auto minmax(0,1fr)}}

/* v0.10.1 — profile avatar + organization branding */
.btl-avatar.has-image { overflow: hidden; background: #fff; }
.btl-avatar.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btl-organization-chip__logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--btl-gray-200); flex: 0 0 auto; }

.btl-media-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.btl-media-settings-grid.is-single { grid-template-columns: minmax(0,680px); justify-content: center; }
.btl-media-card { min-width: 0; padding: 22px; border: 1px solid var(--btl-gray-200); border-radius: 18px; background: #fff; box-shadow: var(--btl-shadow-sm); display: grid; gap: 15px; align-content: start; }
.btl-media-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.btl-media-card__head small { display: block; color: var(--btl-blue); font: 800 9px/1.6 Poppins,Arial,sans-serif; letter-spacing: .035em; }
.btl-media-card__head h2 { margin: 4px 0 0; font-size: 18px; }
.btl-media-card > p { margin: 0; color: var(--btl-slate); font-size: 11px; line-height: 1.9; }
.btl-media-preview { margin-inline: auto; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg,#eff6ff,#f5f3ff); border: 1px solid var(--btl-gray-200); }
.btl-media-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btl-media-preview--avatar { width: 118px; height: 118px; border-radius: 50%; color: var(--btl-blue); font-size: 34px; font-weight: 850; }
.btl-media-preview--logo { width: min(240px,80%); height: 126px; padding: 16px; border-radius: 16px; background: #fff; }
.btl-media-preview--logo img { object-fit: contain; }
.btl-media-preview--logo > span .btl-icon { width: 44px; height: 44px; color: var(--btl-slate); }
.btl-media-upload { display: grid; gap: 10px; }
.btl-media-upload label { display: grid; gap: 7px; }
.btl-media-upload label > span { font-size: 10px; font-weight: 750; }
.btl-media-upload input[type="file"] { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px dashed var(--btl-gray-200); border-radius: 11px; background: var(--btl-gray-50); color: var(--btl-gray-600); font: inherit; font-size: 10px; }
.btl-link-danger { width: fit-content; padding: 0; border: 0; background: transparent; color: #b91c1c; font: 750 10px/1.7 var(--btl-font); cursor: pointer; }
.btl-inline-note { padding: 11px 12px; border: 1px solid rgba(245,158,11,.22); border-radius: 11px; background: #fffdf7; color: #9a3412; font-size: 10px; line-height: 1.8; }
.btl-branding-document-preview { margin-top: 4px; }
.btl-document-letterhead { min-height: 118px; padding: 18px 20px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; display: flex; align-items: center; gap: 18px; }
.btl-document-letterhead__logo { width: 104px; height: 72px; flex: 0 0 auto; border-inline-end: 1px solid var(--btl-gray-200); padding-inline-end: 16px; display: grid; place-items: center; }
.btl-document-letterhead__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.btl-document-letterhead__logo > span .btl-icon { width: 34px; height: 34px; color: var(--btl-gray-400); }
.btl-document-letterhead > div:last-child { min-width: 0; display: grid; gap: 5px; }
.btl-document-letterhead strong { font-size: 15px; }
.btl-document-letterhead small { color: var(--btl-slate); font-size: 9.5px; line-height: 1.75; }
.btl-muted-note { margin: 12px 0 0; color: var(--btl-slate); font-size: 10px; line-height: 1.85; }

@media (max-width: 900px) {
  .btl-media-settings-grid, .btl-media-settings-grid.is-single { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .btl-media-card { padding: 17px; }
  .btl-document-letterhead { align-items: flex-start; flex-direction: column; }
  .btl-document-letterhead__logo { width: 100%; height: 80px; border-inline-end: 0; border-bottom: 1px solid var(--btl-gray-200); padding: 0 0 14px; }
}

/* P9.1 — Contract analysis engine integration */
.btl-analysis-input-meta{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:8px;color:var(--btl-muted,#64748b);font-size:12px;flex-wrap:wrap}
.btl-engine-status.is-connected{border-color:rgba(16,185,129,.26);background:rgba(16,185,129,.06)}
.btl-engine-status.is-unavailable{border-color:rgba(245,158,11,.28);background:rgba(245,158,11,.06)}
.btl-analysis-run-status{font-size:12px;color:var(--btl-muted,#64748b);border:1px solid var(--btl-border,#e2e8f0);border-radius:999px;padding:5px 10px;background:#fff}
.btl-analysis-message{margin:0 0 16px;padding:12px 14px;border-radius:12px;font-size:13px;line-height:1.8;border:1px solid transparent}
.btl-analysis-message.is-info{background:rgba(37,99,235,.06);border-color:rgba(37,99,235,.18);color:#1d4ed8}
.btl-analysis-message.is-success{background:rgba(16,185,129,.07);border-color:rgba(16,185,129,.2);color:#047857}
.btl-analysis-message.is-error{background:rgba(239,68,68,.07);border-color:rgba(239,68,68,.2);color:#b91c1c}
.btl-analysis-executive{margin-top:18px;padding:18px;border:1px solid var(--btl-border,#e2e8f0);border-radius:14px;background:#fff}
.btl-analysis-executive h3{margin:0 0 8px;font-size:15px}.btl-analysis-executive p{margin:0;color:var(--btl-text,#0f172a);line-height:2}
.btl-analysis-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.btl-analysis-result-card{border:1px solid var(--btl-border,#e2e8f0);border-radius:14px;background:#fff;padding:16px;min-width:0}
.btl-analysis-list{display:flex;flex-direction:column;gap:10px}
.btl-analysis-list__item{display:flex;gap:10px;align-items:flex-start;padding:11px 0;border-top:1px solid rgba(148,163,184,.16)}
.btl-analysis-list__item:first-child{border-top:0}.btl-analysis-list__item>div{min-width:0;flex:1}.btl-analysis-list__item strong{display:block;font-size:13px;line-height:1.8}.btl-analysis-list__item p{margin:3px 0 0;font-size:12px;color:var(--btl-muted,#64748b);line-height:1.8}
.btl-analysis-risk-badge{flex:0 0 auto;padding:4px 7px;border-radius:999px;font-size:10px;background:#eff6ff;color:#1d4ed8}.btl-analysis-risk-badge.is-danger{background:#fef2f2;color:#b91c1c}.btl-analysis-risk-badge.is-warning{background:#fffbeb;color:#b45309}.btl-analysis-risk-badge.is-success{background:#ecfdf5;color:#047857}
@media(max-width:1100px){.btl-analysis-result-grid{grid-template-columns:1fr 1fr}}@media(max-width:720px){.btl-analysis-result-grid{grid-template-columns:1fr}}

/* v0.11.1 — Betterly Visual Identity Foundation
 * Product humanization pass for the shared shell, Dashboard, Contract Management
 * and Contract Detail. No business logic or engine contract changes.
 */
:root {
  --btl-canvas: #F6F8FC;
  --btl-paper: #FFFFFF;
  --btl-paper-soft: #FBFCFF;
  --btl-brand-navy: #0D2140;
  --btl-brand-line: #DCE5F1;
  --btl-brand-wash: rgba(37,99,235,.055);
  --btl-brand-wash-2: rgba(124,58,237,.045);
  --btl-shadow-xs: 0 1px 2px rgba(15,23,42,.025), 0 8px 24px rgba(15,23,42,.035);
  --btl-shadow-focus: 0 0 0 3px rgba(37,99,235,.09);
}

html,
body.betterly-app-shell { background: var(--btl-canvas); }
body.betterly-app-shell { letter-spacing: -.005em; }

/* Shell signature: quiet navy rail + precise active marker. */
.btl-sidebar {
  background:
    radial-gradient(circle at 86% 5%, rgba(124,58,237,.17), transparent 24%),
    linear-gradient(180deg, #102846 0%, #0B1E39 52%, #08182F 100%);
  border-inline-end: 1px solid rgba(148,163,184,.10);
}
.btl-brand { border-bottom-color: rgba(255,255,255,.075); }
.btl-brand img {
  padding: 4px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.055));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
.btl-nav__item { position: relative; color: rgba(255,255,255,.73); }
.btl-nav__item:hover { background: rgba(255,255,255,.055); }
.btl-nav__item.is-active {
  background: linear-gradient(90deg, rgba(37,99,235,.18), rgba(124,58,237,.085));
  box-shadow: none;
}
.btl-nav__item.is-active::before {
  content: '';
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #60A5FA, #A78BFA);
  box-shadow: 0 0 14px rgba(96,165,250,.25);
}
.btl-plan-card {
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border-color: rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

/* Topbar feels like product chrome, not another card. */
.btl-topbar {
  background: rgba(255,255,255,.89);
  border-bottom-color: rgba(203,213,225,.70);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.btl-search {
  background: rgba(248,250,252,.78);
  border-color: #E1E7F0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.btl-search:focus-within {
  background: #fff;
  border-color: rgba(37,99,235,.38);
  box-shadow: var(--btl-shadow-focus);
}
.btl-icon-button { border-color: #E1E7F0; box-shadow: 0 1px 2px rgba(15,23,42,.02); }
button.btl-user-context { transition: background .16s ease; }
.btl-avatar { box-shadow: inset 0 0 0 1px rgba(37,99,235,.08); }

/* A restrained brand rhythm in headings. */
.btl-page-head { margin-bottom: 24px; }
.btl-page-head h1 { letter-spacing: -.025em; font-weight: 820; }
.btl-page-head > div:first-child { min-width: 0; }
.btl-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: #47607F !important;
  font-size: 9.5px !important;
  letter-spacing: .055em;
}
.btl-eyebrow::before {
  content: '';
  width: 15px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--btl-blue), var(--btl-purple));
  flex: 0 0 auto;
}
.btl-page-head > div:first-child > p:last-child { max-width: 760px; line-height: 1.9; }

/* Buttons stay on-brand, but lose the generic glossy SaaS feel. */
.btl-button { border-radius: 10px; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease; }
.btl-button--primary {
  background: linear-gradient(118deg, #2563EB 0%, #3451DC 55%, #7C3AED 118%);
  box-shadow: 0 8px 18px rgba(37,99,235,.14);
}
.btl-button--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37,99,235,.18); }
.btl-button--secondary { border-color: #D6E2F2; box-shadow: 0 1px 1px rgba(15,23,42,.02); }
.btl-button--secondary:hover { border-color: rgba(37,99,235,.32); background: #FBFDFF; }

/* Panels are paper surfaces. Shadows are deliberately restrained. */
.btl-panel {
  border-color: var(--btl-brand-line);
  border-radius: 18px;
  box-shadow: var(--btl-shadow-xs);
}
.btl-panel__head { margin-bottom: 16px; }
.btl-panel__head h2 { font-weight: 800; letter-spacing: -.015em; }

/* KPI strip: one operational surface instead of four unrelated cards. */
.btl-metric-grid--individual,
.btl-metric-grid--organization {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--btl-brand-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--btl-shadow-xs);
}
.btl-metric-grid--individual .btl-metric-card,
.btl-metric-grid--organization .btl-metric-card {
  min-height: 124px;
  padding: 17px 18px;
  border: 0;
  border-inline-end: 1px solid #E8EDF4;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(180deg, #fff 0%, #FDFEFF 100%);
}
.btl-metric-grid--individual .btl-metric-card:last-child,
.btl-metric-grid--organization .btl-metric-card:last-child { border-inline-end: 0; }
.btl-metric-grid .btl-metric-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.08);
}
.btl-metric-grid .btl-metric-card strong { font-size: 24px; letter-spacing: -.035em; }
.btl-metric-grid .btl-metric-card > a { margin-top: 2px; }

/* Action Center is the operational heartbeat of Betterly. */
.btl-panel--actions {
  position: relative;
  border-color: rgba(37,99,235,.18);
  background:
    radial-gradient(circle at 6% 0%, rgba(124,58,237,.055), transparent 32%),
    linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%);
}
.btl-panel--actions::before {
  content: '';
  position: absolute;
  inset-block: 20px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--btl-blue), var(--btl-purple));
}
.btl-action-item {
  border-color: #E6ECF4;
  border-radius: 11px;
  background: rgba(255,255,255,.82);
  transition: border-color .14s ease, transform .14s ease, background .14s ease;
}
.btl-action-item:hover { transform: translateX(-1px); border-color: #D3DFF0; background: #fff; }
.btl-action-item > a { border: 0; background: #EFF6FF; }

/* Humanized empty states: quieter, less template-like. */
.btl-empty-inline--dashboard {
  min-height: 148px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(248,250,252,.55), rgba(239,246,255,.45));
}
.btl-empty-inline--dashboard .btl-empty-inline__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(16,185,129,.055);
}
.btl-empty-table,
.btl-chart-empty {
  border-color: #DCE5F1;
  border-style: solid;
  background: linear-gradient(145deg, #FCFDFF, #F8FAFE);
}
.btl-empty-table__icon,
.btl-chart-empty > span { border-radius: 50%; }

/* Quick access uses compact tools rather than promotional cards. */
.btl-quick-card {
  min-height: 132px;
  padding: 14px;
  border-color: #E5EBF3;
  border-radius: 12px;
  box-shadow: none;
  background: #FCFDFF;
}
.btl-quick-card:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 8px 18px rgba(15,23,42,.045); }
.btl-quick-card__icon { width: 36px; height: 36px; border-radius: 10px; }
.btl-quick-card small { min-height: auto; }
.btl-quick-card em { opacity: .82; }

/* Contract status is a first-class legal object: dot + seal-like pill. */
.btl-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(148,163,184,.22);
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}
.btl-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .78;
}

/* Contract Management: a records surface, not a stack of cards. */
.btl-contract-toolbar {
  border-color: var(--btl-brand-line);
  box-shadow: none;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
}
.btl-filter-search,
.btl-contract-filters input,
.btl-contract-filters select {
  border-color: #DFE6EF;
  background: #FCFDFF;
}
.btl-contract-list-panel {
  position: relative;
  overflow: hidden;
  padding-top: 22px;
}
.btl-contract-list-panel::before,
.btl-contract-detail::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--btl-blue), #4F46E5 54%, var(--btl-purple));
}
.btl-table thead th {
  background: #F8FAFD;
  color: #53657C;
  font-weight: 800;
  border-bottom-color: #E3EAF3;
}
.btl-table tbody tr { transition: background .13s ease; }
.btl-table tbody tr:hover { background: #FBFDFF; }
.btl-table-action {
  border-color: #D7E3F3;
  background: #fff;
  color: #1D4ED8;
  transition: background .14s ease, border-color .14s ease;
}
.btl-table-action:hover { background: #EFF6FF; border-color: #BFDBFE; }
.btl-contract-origin { border: 1px solid transparent; border-radius: 999px; }
.btl-contract-origin.is-single { border-color: #DBEAFE; }
.btl-contract-origin.is-bulk { border-color: #D1FAE5; }

/* Creation cards borrow from a legal-document motif through a subtle spine. */
.btl-choice-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  border-color: var(--btl-brand-line);
  box-shadow: var(--btl-shadow-xs);
}
.btl-choice-card::before {
  content: '';
  position: absolute;
  inset-block: 24px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--btl-blue), var(--btl-purple));
}
.btl-choice-card--bulk::before { background: linear-gradient(180deg, var(--btl-success), var(--btl-blue)); }
.btl-choice-card:hover { box-shadow: 0 14px 30px rgba(15,23,42,.07); }

/* Contract Detail is the visual anchor of the product. */
.btl-contract-detail-head {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--btl-brand-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 4% 0%, rgba(124,58,237,.055), transparent 31%),
    linear-gradient(180deg, #fff, #FCFDFF);
  box-shadow: var(--btl-shadow-xs);
}
.btl-contract-detail-head .btl-title-status { gap: 12px; }
.btl-contract-detail-head h1 { font-size: clamp(24px,2.2vw,31px); }
.btl-contract-detail-metrics {
  gap: 0;
  overflow: hidden;
  margin-top: -10px;
  border: 1px solid var(--btl-brand-line);
  border-radius: 16px;
  background: #fff;
}
.btl-contract-detail-metrics article {
  min-height: 86px;
  border: 0;
  border-inline-end: 1px solid #E8EDF4;
  border-radius: 0;
  background: #fff;
}
.btl-contract-detail-metrics article:last-child { border-inline-end: 0; }
.btl-contract-detail-metrics span { font-size: 9px; }
.btl-contract-detail-metrics strong { font-size: 12px; }
.btl-contract-detail {
  position: relative;
  border-color: var(--btl-brand-line);
  border-radius: 18px;
  box-shadow: var(--btl-shadow-xs);
}
.btl-tablist {
  padding: 11px 16px 0;
  gap: 18px;
  border-bottom-color: #E7EDF4;
  background: #FCFDFF;
}
.btl-tablist button {
  min-height: 42px;
  padding: 0 1px 10px;
  border-radius: 0;
  position: relative;
}
.btl-tablist button.is-active {
  color: var(--btl-ink);
  background: transparent;
  box-shadow: none;
}
.btl-tablist button.is-active::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg,var(--btl-blue),var(--btl-purple));
}
.btl-tab-panel { background: #fff; }
.btl-detail-card {
  border-color: #E5EBF3;
  border-radius: 14px;
  background: #FCFDFF;
}
.btl-detail-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.btl-detail-card h3::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 99px;
  background: linear-gradient(180deg,var(--btl-blue),var(--btl-purple));
}
.btl-party-row { padding-inline: 4px; }
.btl-party-row strong { color: var(--btl-brand-navy); }
.btl-contract-actions-grid > * {
  min-height: 132px;
  border-color: #E4EAF2;
  background: #FCFDFF;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.btl-contract-actions-grid > a:hover { transform: translateY(-1px); border-color: #CFE0F5; background: #fff; }

/* Focus visibility and motion respect. */
.btl-nav__item:focus-visible,
.btl-button:focus-visible,
.btl-tablist button:focus-visible,
.btl-choice-card:focus-visible,
.btl-table-action:focus-visible {
  outline: 2px solid rgba(37,99,235,.62);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .btl-metric-grid--individual,
  .btl-metric-grid--organization { gap: 10px; border: 0; overflow: visible; background: transparent; box-shadow: none; }
  .btl-metric-grid--individual .btl-metric-card,
  .btl-metric-grid--organization .btl-metric-card { border: 1px solid var(--btl-brand-line); border-radius: 14px; }
  .btl-contract-detail-metrics { gap: 10px; border: 0; overflow: visible; background: transparent; }
  .btl-contract-detail-metrics article { border: 1px solid var(--btl-brand-line); border-radius: 13px; }
}

@media (max-width: 700px) {
  .btl-page-head h1 { letter-spacing: -.015em; }
  .btl-contract-detail-head { padding: 16px; }
  .btl-tablist { gap: 14px; }
  .btl-choice-card::before { inset-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .btl-button,
  .btl-action-item,
  .btl-quick-card,
  .btl-choice-card,
  .btl-table tbody tr,
  .btl-contract-actions-grid > * { transition: none !important; transform: none !important; }
}


/* v0.11.2 — Betterly visual rollout + content stability
   Density/desktop sizing remain intentionally unchanged pending the agreed 18-inch validation. */

/* Guardrails: legal-workspace content must never collapse into icon-sized text columns. */
.btl-tab-panel,
.btl-tab-panel > *,
.btl-detail-grid > *,
.btl-two-column-cards > *,
.btl-detail-card,
.btl-detail-card > *,
.btl-empty-inline,
.btl-empty-inline > * { min-width: 0; }
.btl-detail-card .btl-empty-inline {
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}
.btl-detail-card .btl-empty-inline > span {
  width: min(100%, 440px);
  max-width: 440px;
  height: auto;
  display: block;
  color: var(--btl-slate);
  background: transparent;
  border-radius: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.9;
}
.btl-detail-card .btl-empty-inline > strong,
.btl-detail-card .btl-empty-inline > a { width: auto; max-width: 100%; }
.btl-tablist { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }
.btl-tablist::-webkit-scrollbar { height: 4px; }
.btl-tablist::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }

/* A shared Betterly workspace signature: domain surfaces carry a quiet brand rail, not decorative cards. */
.btl-analysis-input,
.btl-analysis-config,
.btl-analysis-results,
.btl-legal-case-workspace,
.btl-notification-center,
.btl-search-results-panel,
.btl-report-expiring,
.btl-billing-grid > .btl-panel,
.btl-panel-card {
  position: relative;
  overflow: hidden;
  border-color: var(--btl-brand-line);
  box-shadow: var(--btl-shadow-xs);
}
.btl-analysis-input::before,
.btl-analysis-results::before,
.btl-legal-case-workspace::before,
.btl-notification-center::before,
.btl-search-results-panel::before,
.btl-report-expiring::before,
.btl-billing-grid > .btl-panel::before,
.btl-panel-card::before {
  content: '';
  position: absolute;
  inset-block: 18px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--btl-blue), var(--btl-purple));
  opacity: .82;
}

/* Contract Analysis: input → review → result reads as one legal workflow. */
.btl-analysis-input { background: linear-gradient(180deg,#fff 0%,#FCFDFF 100%); }
.btl-analysis-config {
  border-color: rgba(37,99,235,.16);
  background: radial-gradient(circle at 0 0,rgba(124,58,237,.045),transparent 34%),#fff;
}
.btl-engine-status.is-connected { border: 1px solid rgba(16,185,129,.15); background: #F7FFFB; }
.btl-engine-status.is-connected > span { color: #047857; background: #ECFDF5; }
.btl-result-shell {
  gap: 0;
  overflow: hidden;
  border: 1px solid #E6ECF4;
  border-radius: 13px;
  background: #fff;
}
.btl-result-shell > div {
  border: 0;
  border-inline-end: 1px solid #E8EDF4;
  border-radius: 0;
  background: linear-gradient(180deg,#fff,#FDFEFF);
}
.btl-result-shell > div:last-child { border-inline-end: 0; }
.btl-analysis-result-card { border-color:#E5EBF3; background:#FCFDFF; }

/* Legal cases use evidence/process language rather than a generic app-card pattern. */
.btl-case-type-card {
  position: relative;
  overflow: hidden;
  border-color: #E2E9F2;
  box-shadow: none;
  background: #FCFDFF;
}
.btl-case-type-card::before {
  content:'';
  position:absolute;
  inset-block:18px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,#F59E0B,var(--btl-purple));
}
.btl-case-type-card:hover { border-color:#CFDAE9; background:#fff; }
.btl-case-editor-empty { border-style:solid; border-color:#E2E8F0; background:linear-gradient(145deg,#FCFDFF,#F8FAFD); }

/* Legal services: product catalogue, but unmistakably part of the same Betterly legal workspace. */
.btl-service-filter { padding-bottom: 2px; }
.btl-service-card {
  position: relative;
  overflow: hidden;
  border-color: #E2E9F2;
  box-shadow: var(--btl-shadow-xs);
  background: linear-gradient(180deg,#fff 0%,#FDFEFF 100%);
}
.btl-service-card::before {
  content:'';
  position:absolute;
  inset-block:20px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple));
  opacity:.72;
}
.btl-service-card__icon { box-shadow: inset 0 0 0 1px rgba(37,99,235,.06); }
.btl-service-card.is-selected { background:#fff; }

/* Documents & notifications: calmer records surfaces with explicit security/action meaning. */
.btl-security-note {
  border-color: rgba(37,99,235,.15);
  border-inline-start: 3px solid var(--btl-blue);
  background: linear-gradient(90deg,rgba(37,99,235,.035),#fff 42%);
}
.btl-notification-tabs { border-bottom:1px solid #E7EDF4; padding-bottom:7px; }
.btl-notification-tabs a { border-color:transparent; background:transparent; border-radius:8px; }
.btl-notification-tabs a.is-active { border-color:#DBEAFE; background:#EFF6FF; }
.btl-notification-list article { border-radius:10px; padding-inline:8px; }
.btl-notification-list article:hover { background:#FBFDFF; }

/* Organization identity: structure and authority, not generic HR cards. */
.btl-org-kpi,
.btl-department-card,
.btl-role-card,
.btl-hc-capabilities article {
  border-color:#E2E9F2;
  box-shadow:var(--btl-shadow-xs);
  background:linear-gradient(180deg,#fff,#FDFEFF);
}
.btl-org-action { border-color:#E8EDF4; background:#FCFDFF; }
.btl-org-action:hover { border-color:#CFDDF0; background:#fff; }
.btl-role-card.is-current { border-color:rgba(37,99,235,.34); box-shadow:0 0 0 3px rgba(37,99,235,.045); }
.btl-access-model span { border-color:#E2E8F0; background:#FBFCFE; }

/* Billing: financial history is a ledger workspace; colour is semantic, not promotional. */
.btl-wallet-kpis article { border-color:#E2E9F2; box-shadow:var(--btl-shadow-xs); background:linear-gradient(180deg,#fff,#FDFEFF); }
.btl-commerce-flow { border-color:#E2E9F2; box-shadow:var(--btl-shadow-xs); background:#FCFDFF; }
.btl-commerce-flow > div { border-color:#E7EDF4; background:#fff; }
.btl-plan-option { border-color:#E2E9F2; box-shadow:var(--btl-shadow-xs); }

/* Search & reports inherit the same record language. */
.btl-search-result { border-color:#E5EBF3; background:#FCFDFF; }
.btl-search-result:hover { background:#fff; border-color:#CFDDF0; }
.btl-report-filter-panel { border-color:#E2E9F2; box-shadow:none; background:rgba(255,255,255,.82); }
.btl-report-kpis article { border-color:#E2E9F2; box-shadow:var(--btl-shadow-xs); }

/* Keep all current desktop density decisions frozen until the dedicated 18-inch pass. */
@media (max-width: 800px) {
  .btl-result-shell { gap:10px; border:0; overflow:visible; background:transparent; }
  .btl-result-shell > div { border:1px solid #E6ECF4; border-radius:11px; }
}


/* v0.11.3 — Betterly Signature Components
   Semantic legal objects become recognizable product primitives without changing agreed desktop density. */

/* Neutral semantic state: draft / archived / not-yet-evaluated. */
.btl-status.is-neutral,
.btl-mini-state.is-neutral,
.btl-signature-seal.is-neutral {
  color: #64748B;
  background: #F8FAFC;
  border-color: #E2E8F0;
}

/* Date Status: deadline meaning is visible at a glance, not only as copy. */
.btl-date-metric { position: relative; }
.btl-date-metric::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block: 20px;
  width: 3px;
  border-radius: 99px;
  background: #CBD5E1;
  opacity: .78;
}
.btl-date-metric.is-success::after { background: var(--btl-success); }
.btl-date-metric.is-warning::after { background: var(--btl-warning); }
.btl-date-metric.is-danger::after { background: var(--btl-danger); }
.btl-date-state {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  background: #F8FAFC;
  color: #64748B !important;
  line-height: 1.35;
}
.btl-date-state::before { content:''; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.8; }
.btl-date-metric.is-success .btl-date-state { color:#047857 !important; border-color:#D1FAE5; background:#F0FDF4; }
.btl-date-metric.is-warning .btl-date-state { color:#B45309 !important; border-color:#FDE68A; background:#FFFBEB; }
.btl-date-metric.is-danger .btl-date-state { color:#B91C1C !important; border-color:#FECACA; background:#FEF2F2; }

/* Signature State: an exact-version state seal. */
.btl-signature-seal,
.btl-mini-state {
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.btl-signature-seal::before,
.btl-mini-state::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.8; }
.btl-signature-seal.is-success,.btl-mini-state.is-success { color:#047857; background:#ECFDF5; border-color:#A7F3D0; }
.btl-signature-seal.is-warning,.btl-mini-state.is-warning { color:#B45309; background:#FFFBEB; border-color:#FDE68A; }
.btl-signature-seal.is-danger,.btl-mini-state.is-danger { color:#B91C1C; background:#FEF2F2; border-color:#FECACA; }
.btl-signature-seal.is-info,.btl-mini-state.is-info { color:#1D4ED8; background:#EFF6FF; border-color:#BFDBFE; }

/* Legal analysis state: one compact legal signal instead of another generic empty card. */
.btl-legal-state {
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid #E5EBF3;
  border-radius: 12px;
  background: #fff;
}
.btl-legal-state__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #64748B;
  background: #F1F5F9;
}
.btl-legal-state > div { min-width:0; display:grid; gap:5px; }
.btl-legal-state strong { font-size:12px; }
.btl-legal-state small { color:var(--btl-slate); font-size:9px; line-height:1.9; }
.btl-legal-state.is-success { border-color:#D1FAE5; background:#FBFFFD; }
.btl-legal-state.is-success .btl-legal-state__mark { color:#047857; background:#ECFDF5; }
.btl-legal-state.is-info { border-color:#DBEAFE; background:#FCFEFF; }
.btl-legal-state.is-info .btl-legal-state__mark { color:#1D4ED8; background:#EFF6FF; }
.btl-legal-state.is-danger { border-color:#FECACA; background:#FFFCFC; }
.btl-legal-state.is-danger .btl-legal-state__mark { color:#B91C1C; background:#FEF2F2; }

/* Risk signature: a semantic bar that can accept real engine output later. */
.btl-risk-state {
  min-height: 62px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #E2E8F0;
  border-inline-start: 3px solid #CBD5E1;
  border-radius: 11px;
  background:#fff;
}
.btl-risk-state > span { color:var(--btl-slate); font-size:9px; }
.btl-risk-state > strong { font-size:12px; }
.btl-risk-state > em { padding:3px 6px; border-radius:999px; background:#F8FAFC; color:#64748B; font-size:9px; font-style:normal; font-weight:800; }
.btl-risk-state.is-success { border-inline-start-color:var(--btl-success); }
.btl-risk-state.is-warning { border-inline-start-color:var(--btl-warning); background:#FFFEFA; }
.btl-risk-state.is-danger { border-inline-start-color:var(--btl-danger); background:#FFFCFC; }
.btl-risk-state.is-info { border-inline-start-color:var(--btl-blue); }
.btl-risk-empty { margin:10px 0 0; color:var(--btl-slate); font-size:9px; line-height:1.9; }

/* Clause signals are a Betterly-specific legal primitive: severity + clause + reference. */
.btl-clause-signals { display:grid; gap:7px; margin-top:10px; }
.btl-clause-signal {
  min-width:0;
  min-height:52px;
  padding:8px 10px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:9px;
  border:1px solid #E5EBF3;
  border-radius:10px;
  background:#fff;
}
.btl-clause-signal > span { width:7px; height:28px; border-radius:99px; background:#94A3B8; }
.btl-clause-signal > div { min-width:0; display:grid; gap:2px; }
.btl-clause-signal strong { font-size:10px; }
.btl-clause-signal small { color:var(--btl-slate); font-size:8px; line-height:1.7; }
.btl-clause-signal em { max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#64748B; font-size:8px; font-style:normal; }
.btl-clause-signal.is-success > span { background:var(--btl-success); }
.btl-clause-signal.is-warning > span { background:var(--btl-warning); }
.btl-clause-signal.is-danger > span { background:var(--btl-danger); }
.btl-clause-signal.is-info > span { background:var(--btl-blue); }

/* Betterly legal timeline: version, analysis, signature and renewal share one audit language. */
.btl-legal-timeline { position:relative; display:grid; gap:0; padding-block:2px; }
.btl-legal-timeline::before {
  content:'';
  position:absolute;
  inset-block:14px;
  inset-inline-start:8px;
  width:1px;
  background:#E2E8F0;
}
.btl-legal-timeline__item {
  position:relative;
  min-width:0;
  min-height:60px;
  padding:10px 30px 10px 8px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:start;
  gap:8px;
  border-bottom:1px solid #F0F3F7;
}
.btl-legal-timeline__item:last-child { border-bottom:0; }
.btl-legal-timeline__node {
  position:absolute;
  inset-inline-start:3px;
  top:17px;
  width:11px;
  height:11px;
  border:3px solid #fff;
  border-radius:50%;
  background:#64748B;
  box-shadow:0 0 0 1px #CBD5E1;
}
.btl-legal-timeline__item > div { min-width:0; display:grid; gap:3px; }
.btl-legal-timeline__item strong { font-size:10px; }
.btl-legal-timeline__item small { color:var(--btl-slate); font-size:8px; line-height:1.8; }
.btl-legal-timeline__item time { color:#94A3B8; font-size:8px; white-space:nowrap; }
.btl-legal-timeline__item.is-success .btl-legal-timeline__node { background:var(--btl-success); box-shadow:0 0 0 1px #A7F3D0; }
.btl-legal-timeline__item.is-warning .btl-legal-timeline__node { background:var(--btl-warning); box-shadow:0 0 0 1px #FDE68A; }
.btl-legal-timeline__item.is-danger .btl-legal-timeline__node { background:var(--btl-danger); box-shadow:0 0 0 1px #FECACA; }
.btl-legal-timeline__item.is-info .btl-legal-timeline__node { background:var(--btl-blue); box-shadow:0 0 0 1px #BFDBFE; }

/* Legal actions carry domain identity without decorative illustration. */
.btl-legal-actions > * { position:relative; overflow:hidden; }
.btl-legal-actions > *::before { content:''; position:absolute; inset-inline-start:0; inset-block:16px; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-legal-actions > .is-analysis::before { background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple)); }
.btl-legal-actions > .is-case::before { background:linear-gradient(180deg,var(--btl-warning),var(--btl-purple)); }
.btl-legal-actions > .is-signature::before { background:linear-gradient(180deg,var(--btl-success),var(--btl-blue)); }
.btl-legal-actions > .is-renewal::before { background:#CBD5E1; }

/* Action Center priority: the signal is semantic, not simply a coloured icon. */
.btl-action-item { position:relative; overflow:hidden; }
.btl-action-item::before { content:''; position:absolute; inset-block:12px; inset-inline-start:0; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-action-item.is-success::before { background:var(--btl-success); }
.btl-action-item.is-warning::before { background:var(--btl-warning); }
.btl-action-item.is-danger::before { background:var(--btl-danger); }
.btl-action-item.is-info::before { background:var(--btl-blue); }
.btl-action-item > div em { color:#64748B; font-size:8px; font-style:normal; }

/* Notification tone is visible before reading the full copy. */
.btl-notification-list article { position:relative; overflow:hidden; }
.btl-notification-list article::before { content:''; position:absolute; inset-block:10px; inset-inline-start:0; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-notification-list article.is-danger::before { background:var(--btl-danger); }
.btl-notification-list article.is-warning::before { background:var(--btl-warning); }
.btl-notification-list article.is-success::before { background:var(--btl-success); }
.btl-notification-list article.is-info::before { background:var(--btl-blue); }

/* Signature workspace: the lifecycle itself becomes a recognizable product pattern. */
.btl-signature-summary { gap:0; overflow:hidden; border:1px solid var(--btl-brand-line); border-radius:14px; background:#fff; }
.btl-signature-summary article { position:relative; min-height:82px; border:0; border-inline-end:1px solid #E8EDF4; border-radius:0; box-shadow:none; }
.btl-signature-summary article:last-child { border-inline-end:0; }
.btl-signature-summary article::before { content:''; position:absolute; inset-inline-start:0; inset-block:18px; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-signature-summary .is-pending::before { background:var(--btl-warning); }
.btl-signature-summary .is-sent::before { background:var(--btl-blue); }
.btl-signature-summary .is-signed::before { background:var(--btl-success); }
.btl-signature-summary .is-closed::before { background:var(--btl-danger); }
.btl-signature-state-guide article { position:relative; overflow:hidden; }
.btl-signature-guide-mark { width:22px; height:4px; border-radius:99px; background:#CBD5E1; }
.btl-signature-state-guide .is-ready .btl-signature-guide-mark { background:var(--btl-blue); }
.btl-signature-state-guide .is-progress .btl-signature-guide-mark { background:var(--btl-warning); }
.btl-signature-state-guide .is-complete .btl-signature-guide-mark { background:var(--btl-success); }
.btl-signature-state-guide .is-closed .btl-signature-guide-mark { background:var(--btl-danger); }

@media (max-width: 800px) {
  .btl-risk-state { grid-template-columns:1fr auto; }
  .btl-risk-state > em { grid-column:1/-1; width:fit-content; }
  .btl-legal-timeline__item { grid-template-columns:1fr; }
  .btl-legal-timeline__item time { white-space:normal; }
  .btl-signature-summary { gap:10px; border:0; overflow:visible; background:transparent; }
  .btl-signature-summary article { border:1px solid var(--btl-brand-line); border-radius:12px; }
}

/* v0.11.4 — Organization Identity, Document Vault & Legal Case language
   Visual identity deepening only. Desktop width/density remains frozen for the later 18-inch validation. */

/* Organization identity: legal entity, assurance and acting representative are visibly distinct. */
.btl-org-identity {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(250px,.9fr) minmax(240px,.75fr);
  gap: 0;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--btl-brand-line);
  border-radius: 16px;
  background: linear-gradient(120deg,#fff 0%,#FCFDFF 55%,rgba(124,58,237,.025) 100%);
  box-shadow: var(--btl-shadow-xs);
}
.btl-org-identity::before { content:''; position:absolute; inset-block:18px; inset-inline-start:0; width:3px; border-radius:99px; background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple)); }
.btl-org-identity > div { min-width:0; padding:17px 18px; }
.btl-org-identity > div + div { border-inline-start:1px solid #E8EDF4; }
.btl-org-identity__brand { display:flex; align-items:center; gap:13px; }
.btl-org-identity__logo { width:54px; height:54px; flex:0 0 auto; display:grid; place-items:center; overflow:hidden; border:1px solid #E2E8F0; border-radius:14px; background:#fff; color:var(--btl-blue); box-shadow:0 3px 12px rgba(15,23,42,.04); }
.btl-org-identity__logo img { width:100%; height:100%; object-fit:contain; padding:6px; }
.btl-org-identity__logo .btl-icon { width:25px; height:25px; }
.btl-org-identity__brand > div { min-width:0; display:grid; gap:3px; }
.btl-org-identity__brand small,.btl-org-identity__actor small { color:var(--btl-slate); font-size:9px; }
.btl-org-identity__brand h2 { margin:0; font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.btl-org-identity__brand p,.btl-org-identity__actor p { margin:0; color:var(--btl-slate); font-size:9px; line-height:1.8; }
.btl-org-identity__assurance { display:flex; align-content:center; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:7px; }
.btl-assurance-seal { min-height:25px; padding:0 8px; display:inline-flex; align-items:center; gap:6px; border:1px solid #E2E8F0; border-radius:999px; background:#F8FAFC; color:#64748B; font-size:8px; font-weight:800; white-space:nowrap; }
.btl-assurance-seal::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.82; }
.btl-assurance-seal.is-success { color:#047857; border-color:#A7F3D0; background:#ECFDF5; }
.btl-assurance-seal.is-info { color:#1D4ED8; border-color:#BFDBFE; background:#EFF6FF; }
.btl-assurance-seal.is-neutral { color:#64748B; border-color:#E2E8F0; background:#F8FAFC; }
.btl-org-identity__actor { display:grid; grid-template-columns:34px 1fr; align-items:center; gap:9px; }
.btl-org-identity__actor > span:first-child { width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:#F1F5F9; color:#475569; }
.btl-org-identity__actor > div { min-width:0; display:grid; gap:2px; }
.btl-org-identity__actor strong { font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.btl-org-identity__actor > a { grid-column:2; width:fit-content; color:var(--btl-blue); font-size:8px; font-weight:800; text-decoration:none; }

/* Document Vault: files read as governed legal records rather than a generic file table. */
.btl-document-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin-bottom:14px; overflow:hidden; border:1px solid #E4EAF2; border-radius:14px; background:#fff; box-shadow:var(--btl-shadow-xs); }
.btl-document-summary article { min-height:68px; padding:12px 14px; display:flex; align-items:center; gap:10px; border-inline-end:1px solid #E8EDF4; }
.btl-document-summary article:last-child { border-inline-end:0; }
.btl-document-summary article > span { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:#F3F7FC; color:var(--btl-blue); }
.btl-document-summary article:nth-child(3) > span { color:#B45309; background:#FFF7ED; }
.btl-document-summary article:nth-child(4) > span { color:#047857; background:#ECFDF5; }
.btl-document-summary article > div { display:grid; gap:2px; }
.btl-document-summary small { color:var(--btl-slate); font-size:8px; }
.btl-document-summary strong { font-size:13px; }
.btl-document-vault { position:relative; overflow:hidden; border:1px solid var(--btl-brand-line); border-radius:16px; background:#fff; box-shadow:var(--btl-shadow-xs); }
.btl-document-vault::before { content:''; position:absolute; inset-block:18px; inset-inline-start:0; width:3px; border-radius:99px; background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple)); }
.btl-document-vault__head { min-height:78px; padding:14px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #E8EDF4; background:linear-gradient(180deg,#fff,#FCFDFF); }
.btl-document-vault__head > div { min-width:0; display:flex; align-items:center; gap:11px; }
.btl-document-vault__mark { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border:1px solid #DBEAFE; border-radius:11px; background:#EFF6FF; color:var(--btl-blue); }
.btl-document-vault__head h2 { margin:2px 0; font-size:14px; }
.btl-document-vault__head small,.btl-document-vault__head p { color:var(--btl-slate); font-size:8px; }
.btl-document-vault__head p { margin:0; line-height:1.8; }
.btl-document-vault .btl-contract-toolbar { margin:0; border:0; border-bottom:1px solid #EDF1F6; border-radius:0; box-shadow:none; background:#FBFCFE; }
.btl-document-vault__records { min-width:0; }
.btl-document-table tbody tr { position:relative; }
.btl-document-table tbody tr::before { content:''; position:absolute; inset-block:10px; inset-inline-start:0; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-document-table tbody tr.is-blue::before { background:var(--btl-blue); }
.btl-document-table tbody tr.is-orange::before { background:var(--btl-warning); }
.btl-document-table tbody tr.is-purple::before { background:var(--btl-purple); }
.btl-document-record { min-width:0; display:flex; align-items:center; gap:9px; }
.btl-document-record__mark { width:30px; height:30px; display:grid; place-items:center; flex:0 0 auto; border-radius:8px; background:#F3F7FC; color:#475569; }
.btl-document-record__mark .btl-icon { width:15px; height:15px; }
.btl-document-record > div { min-width:0; display:grid; gap:2px; }
.btl-document-record strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.btl-document-record small { color:var(--btl-slate); font-size:8px; }
.btl-document-kind { min-height:23px; padding:0 7px; display:inline-flex; align-items:center; border:1px solid #E2E8F0; border-radius:999px; background:#F8FAFC; color:#64748B; font-size:8px; font-weight:800; white-space:nowrap; }
.btl-document-kind.is-blue { color:#1D4ED8; border-color:#BFDBFE; background:#EFF6FF; }
.btl-document-kind.is-orange { color:#B45309; border-color:#FDE68A; background:#FFFBEB; }
.btl-document-kind.is-purple { color:#6D28D9; border-color:#DDD6FE; background:#F5F3FF; }

/* Legal Case signature: state, domain and process are distinguishable before the user reads detail copy. */
.btl-case-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin-bottom:14px; overflow:hidden; border:1px solid #E4EAF2; border-radius:14px; background:#fff; box-shadow:var(--btl-shadow-xs); }
.btl-case-summary article { position:relative; min-height:68px; padding:12px 15px; display:grid; align-content:center; gap:3px; border-inline-end:1px solid #E8EDF4; }
.btl-case-summary article:last-child { border-inline-end:0; }
.btl-case-summary article::before { content:''; position:absolute; inset-block:14px; inset-inline-start:0; width:3px; border-radius:99px; background:#CBD5E1; }
.btl-case-summary article.is-info::before { background:var(--btl-blue); }
.btl-case-summary article.is-warning::before { background:var(--btl-warning); }
.btl-case-summary article.is-contract::before { background:var(--btl-purple); }
.btl-case-summary small { color:var(--btl-slate); font-size:8px; }
.btl-case-summary strong { font-size:17px; }
.btl-case-domain-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.btl-case-domain { min-height:92px; padding:13px 14px; display:grid; grid-template-columns:36px 1fr auto; align-items:center; gap:10px; overflow:hidden; position:relative; border:1px solid #E2E9F2; border-radius:13px; background:#FCFDFF; color:var(--btl-ink); text-decoration:none; }
.btl-case-domain::before { content:''; position:absolute; inset-block:16px; inset-inline-start:0; width:3px; border-radius:99px; background:linear-gradient(180deg,var(--btl-warning),var(--btl-purple)); }
.btl-case-domain > span { width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:#FFF7ED; color:#C2410C; }
.btl-case-domain > div { min-width:0; display:grid; gap:2px; }
.btl-case-domain small { color:var(--btl-slate); font-size:8px; }
.btl-case-domain strong { font-size:11px; }
.btl-case-domain p { margin:0; color:var(--btl-slate); font-size:8px; line-height:1.7; }
.btl-case-domain em { color:var(--btl-blue); font-size:8px; font-style:normal; font-weight:800; }
.btl-case-domain.is-disabled { opacity:.62; }
.btl-case-records { position:relative; overflow:hidden; border-color:var(--btl-brand-line); box-shadow:var(--btl-shadow-xs); }
.btl-case-records::before { content:''; position:absolute; inset-block:18px; inset-inline-start:0; width:3px; border-radius:99px; background:linear-gradient(180deg,var(--btl-warning),var(--btl-purple)); }
.btl-case-state { min-height:24px; padding:0 8px; display:inline-flex; align-items:center; gap:6px; border:1px solid #E2E8F0; border-radius:999px; background:#F8FAFC; color:#64748B; font-size:8px; font-weight:800; white-space:nowrap; }
.btl-case-state::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.btl-case-state.is-success { color:#047857; border-color:#A7F3D0; background:#ECFDF5; }
.btl-case-state.is-warning { color:#B45309; border-color:#FDE68A; background:#FFFBEB; }
.btl-case-state.is-danger { color:#B91C1C; border-color:#FECACA; background:#FEF2F2; }
.btl-case-state.is-info { color:#1D4ED8; border-color:#BFDBFE; background:#EFF6FF; }
.btl-case-phase-map { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:0; margin-bottom:12px; overflow:hidden; border:1px solid #E3EAF3; border-radius:13px; background:#fff; box-shadow:var(--btl-shadow-xs); }
.btl-case-phase-map > div { position:relative; min-height:54px; padding:9px 8px; display:flex; align-items:center; justify-content:center; gap:7px; border-inline-end:1px solid #E8EDF4; color:#64748B; }
.btl-case-phase-map > div:last-child { border-inline-end:0; }
.btl-case-phase-map span { width:21px; height:21px; display:grid; place-items:center; border:1px solid #E2E8F0; border-radius:50%; background:#F8FAFC; font-size:8px; font-weight:900; }
.btl-case-phase-map small { font-size:8px; font-weight:800; }
.btl-case-phase-map .is-current { color:var(--btl-blue); background:#F8FBFF; }
.btl-case-phase-map .is-current span { color:#fff; border-color:var(--btl-blue); background:var(--btl-blue); }
.btl-case-section-head { min-height:86px; padding:14px 16px; display:grid; grid-template-columns:40px 1fr auto; align-items:center; gap:11px; border-bottom:1px solid #E8EDF4; background:linear-gradient(180deg,#fff,#FCFDFF); }
.btl-case-section-head > span:first-child { width:40px; height:40px; display:grid; place-items:center; border-radius:11px; background:#FFF7ED; color:#C2410C; }
.btl-case-section-head > div { min-width:0; display:grid; gap:2px; }
.btl-case-section-head small { color:var(--btl-slate); font-size:8px; }
.btl-case-section-head h2 { margin:0; font-size:13px; }
.btl-case-section-head p { margin:0; color:var(--btl-slate); font-size:8px; line-height:1.75; }
.btl-case-readiness { min-height:25px; padding:0 8px; display:inline-flex; align-items:center; border:1px solid #E2E8F0; border-radius:999px; background:#F8FAFC; color:#64748B; font-size:8px; font-weight:800; white-space:nowrap; }
.btl-case-readiness.is-ready { color:#047857; border-color:#A7F3D0; background:#ECFDF5; }
.btl-legal-case-workspace .btl-tab-panel { padding-top:0; }
.btl-legal-case-workspace .btl-case-editor-empty { margin:14px; min-height:220px; }

@media (max-width: 1100px) {
  .btl-org-identity { grid-template-columns:1fr 1fr; }
  .btl-org-identity__actor { grid-column:1/-1; border-inline-start:0 !important; border-top:1px solid #E8EDF4; }
  .btl-document-summary,.btl-case-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .btl-document-summary article:nth-child(2),.btl-case-summary article:nth-child(2) { border-inline-end:0; }
  .btl-document-summary article:nth-child(-n+2),.btl-case-summary article:nth-child(-n+2) { border-bottom:1px solid #E8EDF4; }
  .btl-case-phase-map { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .btl-case-phase-map > div:nth-child(3n) { border-inline-end:0; }
  .btl-case-phase-map > div:nth-child(-n+3) { border-bottom:1px solid #E8EDF4; }
}
@media (max-width: 720px) {
  .btl-org-identity,.btl-case-domain-strip { grid-template-columns:1fr; }
  .btl-org-identity > div + div { border-inline-start:0; border-top:1px solid #E8EDF4; }
  .btl-org-identity__actor { grid-column:auto; }
  .btl-document-summary,.btl-case-summary { grid-template-columns:1fr; }
  .btl-document-summary article,.btl-case-summary article { border-inline-end:0; border-bottom:1px solid #E8EDF4; }
  .btl-document-summary article:last-child,.btl-case-summary article:last-child { border-bottom:0; }
  .btl-document-vault__head { align-items:flex-start; }
  .btl-case-phase-map { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .btl-case-phase-map > div { border-bottom:1px solid #E8EDF4; }
  .btl-case-phase-map > div:nth-child(2n) { border-inline-end:0; }
  .btl-case-phase-map > div:nth-last-child(-n+2) { border-bottom:0; }
  .btl-case-section-head { grid-template-columns:36px 1fr; }
  .btl-case-readiness { grid-column:2; width:fit-content; }
}


/* v0.11.5 — Human Capital / People / Legal Services product identity rollout.
   Desktop shell density and workspace width intentionally remain unchanged. */

/* Organization people identity */
.btl-people-summary {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  margin-bottom:14px;
  overflow:hidden;
  border:1px solid #E3EAF3;
  border-radius:14px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-people-summary article {
  position:relative;
  min-height:70px;
  padding:12px 15px;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-areas:"label value" "note value";
  align-content:center;
  align-items:center;
  column-gap:12px;
  border-inline-end:1px solid #E8EDF4;
}
.btl-people-summary article:last-child { border-inline-end:0; }
.btl-people-summary article::before {
  content:'';
  position:absolute;
  inset-block:14px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:#CBD5E1;
}
.btl-people-summary article.is-primary::before { background:var(--btl-blue); }
.btl-people-summary article.is-success::before { background:var(--btl-success); }
.btl-people-summary article.is-warning::before { background:var(--btl-warning); }
.btl-people-summary article.is-muted::before { background:var(--btl-purple); }
.btl-people-summary small { grid-area:label; color:var(--btl-slate); font-size:8px; }
.btl-people-summary strong { grid-area:value; justify-self:end; font-size:18px; color:var(--btl-ink); }
.btl-people-summary span { grid-area:note; color:#94A3B8; font-size:8px; }

.btl-people-workspace {
  position:relative;
  overflow:hidden;
  border:1px solid var(--btl-brand-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-people-workspace::before {
  content:'';
  position:absolute;
  inset-block:18px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple));
}
.btl-people-workspace__head {
  min-height:82px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid #E8EDF4;
  background:linear-gradient(180deg,#fff,#FCFDFF);
}
.btl-people-workspace__head > div {
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
}
.btl-people-workspace__mark {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid #DBEAFE;
  border-radius:11px;
  background:#EFF6FF;
  color:var(--btl-blue);
}
.btl-people-workspace__head small,
.btl-people-workspace__head p { color:var(--btl-slate); font-size:8px; }
.btl-people-workspace__head h2 { margin:2px 0; font-size:14px; }
.btl-people-workspace__head p { margin:0; line-height:1.8; }

.btl-people-toolbar {
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(230px,1fr) 150px 150px auto;
  gap:8px;
  border-bottom:1px solid #EDF1F6;
  background:#FBFCFE;
}
.btl-people-toolbar select {
  min-height:36px;
  padding:0 10px;
  border:1px solid #E2E8F0;
  border-radius:10px;
  background:#fff;
  color:var(--btl-ink);
  font:inherit;
  font-size:9px;
}
.btl-person-record {
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}
.btl-person-avatar {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid #DCE7F5;
  border-radius:10px;
  background:linear-gradient(145deg,#EFF6FF,#F5F3FF);
  color:#3157A3;
  font-size:9px;
  font-weight:900;
}
.btl-person-record > div { min-width:0; display:grid; gap:2px; }
.btl-person-record strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.btl-person-record small,.btl-cell-meta { color:var(--btl-slate); font-size:8px; }
.btl-person-context {
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#475569;
  font-size:8px;
  font-weight:700;
}
.btl-person-context .btl-icon { width:13px; height:13px; color:var(--btl-purple); }
.btl-role-seal,.btl-member-state {
  min-height:24px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #E2E8F0;
  border-radius:999px;
  background:#F8FAFC;
  color:#475569;
  font-size:8px;
  font-weight:800;
  white-space:nowrap;
}
.btl-role-seal { border-color:#DDD6FE; background:#F5F3FF; color:#6D28D9; }
.btl-member-state::before {
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.btl-member-state.is-success { color:#047857; border-color:#A7F3D0; background:#ECFDF5; }
.btl-member-state.is-warning { color:#B45309; border-color:#FDE68A; background:#FFFBEB; }
.btl-member-state.is-danger { color:#B91C1C; border-color:#FECACA; background:#FEF2F2; }
.btl-member-state.is-neutral { color:#64748B; }
.btl-people-empty { border:0; border-radius:0; }

/* Department blueprint keeps organization structure visually connected to scope. */
.btl-department-blueprint {
  overflow:hidden;
  margin-bottom:14px;
  border:1px solid var(--btl-brand-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-department-blueprint__head {
  min-height:88px;
  padding:15px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid #E8EDF4;
  background:linear-gradient(180deg,#fff,#FCFDFF);
}
.btl-department-blueprint__head > div { min-width:0; display:flex; align-items:center; gap:11px; }
.btl-department-blueprint__mark {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:12px;
  background:#F5F3FF;
  color:var(--btl-purple);
}
.btl-department-blueprint__head small,.btl-department-blueprint__head p { color:var(--btl-slate); font-size:8px; }
.btl-department-blueprint__head h2 { margin:2px 0; font-size:14px; }
.btl-department-blueprint__head p { margin:0; line-height:1.8; }
.btl-department-blueprint .btl-department-suggestions { padding:14px 16px; }
.btl-department-card--identity { position:relative; overflow:hidden; }
.btl-department-card--identity::before {
  content:'';
  position:absolute;
  inset-block:15px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-purple),var(--btl-blue));
}
.btl-department-card__identity { display:flex; align-items:center; gap:10px; }
.btl-department-card__identity > span {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:11px;
  background:#F5F3FF;
  color:var(--btl-purple);
}
.btl-department-card__identity small { color:var(--btl-slate); font-size:8px; }
.btl-department-card__identity h2 { margin:1px 0; }
.btl-department-card__scope {
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#64748B;
  font-size:8px;
  font-weight:700;
}
.btl-department-card__scope .btl-icon { width:13px; height:13px; }

/* Human Capital visual language: the legal employment relationship, not generic HRMS. */
.btl-employment-journey {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  margin-bottom:14px;
  overflow:hidden;
  border:1px solid #E3EAF3;
  border-radius:14px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-employment-journey > div {
  position:relative;
  min-height:66px;
  padding:10px 13px;
  display:grid;
  grid-template-columns:25px 1fr;
  align-items:center;
  gap:8px;
  border-inline-end:1px solid #E8EDF4;
}
.btl-employment-journey > div:last-child { border-inline-end:0; }
.btl-employment-journey > div:not(:last-child)::after {
  content:'';
  position:absolute;
  inset-inline-end:-5px;
  top:50%;
  width:9px;
  height:9px;
  z-index:2;
  border-top:1px solid #D9E2EF;
  border-inline-end:1px solid #D9E2EF;
  background:#fff;
  transform:translateY(-50%) rotate(45deg);
}
.btl-employment-journey > div > span {
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border:1px solid #DCE6F3;
  border-radius:50%;
  background:#F8FAFC;
  color:#64748B;
  font-size:7px;
  font-weight:900;
}
.btl-employment-journey > div.is-current { background:#F8FBFF; }
.btl-employment-journey > div.is-current > span { border-color:var(--btl-blue); background:var(--btl-blue); color:#fff; }
.btl-employment-journey small { display:block; color:var(--btl-slate); font-size:7px; }
.btl-employment-journey strong { display:block; margin-top:2px; font-size:9px; }

.btl-hc-command {
  position:relative;
  overflow:hidden;
  margin-top:14px;
  border:1px solid var(--btl-brand-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-hc-command::before {
  content:'';
  position:absolute;
  inset-block:18px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-blue),var(--btl-success));
}
.btl-hc-command__head {
  min-height:86px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid #E8EDF4;
  background:linear-gradient(180deg,#fff,#FCFDFF);
}
.btl-hc-command__head > div { min-width:0; display:flex; align-items:center; gap:11px; }
.btl-hc-command__mark {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:11px;
  background:#ECFDF5;
  color:#047857;
}
.btl-hc-command__head small,.btl-hc-command__head p { color:var(--btl-slate); font-size:8px; }
.btl-hc-command__head h2 { margin:2px 0; font-size:14px; }
.btl-hc-command__head p { margin:0; line-height:1.8; }
.btl-hc-command .btl-hc-capabilities { margin:0; padding:12px; border-bottom:1px solid #EDF1F6; background:#FBFCFE; }
.btl-hc-command .btl-hc-capabilities article { box-shadow:none; }
.btl-hc-command .btl-empty-table { border-radius:0; }
.btl-hc-toolbar { border-top:1px solid #EDF1F6; grid-template-columns:minmax(240px,1fr) 170px auto; }
.btl-scope-note--quiet { margin-top:12px; opacity:.86; }

/* Legal Services: marketplace identity based on the service journey rather than generic cards. */
.btl-service-page-head { align-items:flex-end; }
.btl-service-assurance {
  max-width:290px;
  display:flex;
  align-items:flex-start;
  gap:7px;
  color:#64748B;
  font-size:8px;
  line-height:1.8;
}
.btl-service-assurance .btl-icon { width:16px; height:16px; flex:0 0 auto; color:#047857; }

.btl-service-paths {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin-bottom:14px;
}
.btl-service-paths a {
  min-height:60px;
  padding:10px 11px;
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid #E3EAF3;
  border-radius:12px;
  background:#fff;
  color:var(--btl-ink);
  text-decoration:none;
  transition:border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.btl-service-paths a:hover { border-color:#CBD9EC; background:#FCFDFF; transform:translateY(-1px); }
.btl-service-paths a.is-active { border-color:#BFDBFE; background:#F8FBFF; box-shadow:inset 0 -2px 0 var(--btl-blue); }
.btl-service-paths a > span {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:9px;
  background:#F3F7FC;
  color:#526276;
}
.btl-service-paths a.is-active > span { background:#EFF6FF; color:var(--btl-blue); }
.btl-service-paths small { display:block; color:var(--btl-slate); font-size:7px; }
.btl-service-paths strong { display:block; margin-top:2px; font-size:9px; }

.btl-service-marketplace {
  position:relative;
  overflow:hidden;
  border:1px solid var(--btl-brand-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-service-marketplace::before {
  content:'';
  position:absolute;
  inset-block:18px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple));
}
.btl-service-marketplace__head {
  min-height:82px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:13px;
  border-bottom:1px solid #E8EDF4;
  background:linear-gradient(180deg,#fff,#FCFDFF);
}
.btl-service-marketplace__head > div { min-width:0; display:flex; align-items:center; gap:10px; }
.btl-service-marketplace__mark {
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:11px;
  background:#EFF6FF;
  color:var(--btl-blue);
}
.btl-service-marketplace__head small,.btl-service-marketplace__head p { color:var(--btl-slate); font-size:8px; }
.btl-service-marketplace__head h2 { margin:2px 0; font-size:14px; }
.btl-service-marketplace__head p { margin:0; line-height:1.8; }

.btl-service-grid--marketplace {
  margin:0;
  padding:12px;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  background:#FBFCFE;
}
.btl-service-card--signature {
  position:relative;
  min-width:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-color:#E3EAF3;
  box-shadow:none;
}
.btl-service-card--signature::before {
  content:'';
  position:absolute;
  inset-block:14px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:#CBD5E1;
}
.btl-service-card--signature.is-blue::before { background:var(--btl-blue); }
.btl-service-card--signature.is-purple::before { background:var(--btl-purple); }
.btl-service-card--signature.is-green::before { background:var(--btl-success); }
.btl-service-card--signature.is-indigo::before { background:var(--btl-indigo); }
.btl-service-card--signature.is-selected { border-color:#BFD3F5; background:#FCFDFF; }
.btl-service-card__top { display:flex; align-items:center; justify-content:space-between; gap:9px; }
.btl-service-card--signature .btl-service-card__icon {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  margin:0;
  border-radius:10px;
  background:#F3F7FC;
  color:#475569;
}
.btl-service-card--signature.is-blue .btl-service-card__icon { background:#EFF6FF; color:var(--btl-blue); }
.btl-service-card--signature.is-purple .btl-service-card__icon { background:#F5F3FF; color:var(--btl-purple); }
.btl-service-card--signature.is-green .btl-service-card__icon { background:#ECFDF5; color:#047857; }
.btl-service-card--signature.is-indigo .btl-service-card__icon { background:#EEF2FF; color:#4F46E5; }
.btl-service-kind {
  min-height:22px;
  padding:0 7px;
  display:inline-flex;
  align-items:center;
  border:1px solid #E2E8F0;
  border-radius:999px;
  background:#F8FAFC;
  color:#64748B;
  font-size:7px;
  font-weight:800;
}
.btl-service-card--signature .btl-service-card__body { margin-top:9px; }
.btl-service-card--signature .btl-service-card__body h2 { font-size:12px; }
.btl-service-card--signature .btl-service-card__body p { min-height:42px; }
.btl-service-card--signature dl { margin-top:auto; }
.btl-service-card__action {
  min-height:36px;
  margin-top:10px;
  padding-top:9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border-top:1px solid #EDF1F6;
  color:var(--btl-blue);
  font-size:8px;
  font-weight:800;
  text-decoration:none;
}
.btl-service-card__action .btl-icon { width:14px; height:14px; }

.btl-service-detail--signature {
  position:relative;
  overflow:hidden;
  margin-top:14px;
  padding:0;
  border:1px solid var(--btl-brand-line);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--btl-shadow-xs);
}
.btl-service-detail--signature::before {
  content:'';
  position:absolute;
  inset-block:18px;
  inset-inline-start:0;
  width:3px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--btl-blue),var(--btl-purple));
}
.btl-service-detail__head {
  min-height:92px;
  padding:15px 16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  border-bottom:1px solid #E8EDF4;
}
.btl-service-detail__head > div { min-width:0; display:flex; align-items:flex-start; gap:11px; }
.btl-service-detail__head small { color:var(--btl-slate); font-size:8px; }
.btl-service-detail__head h2 { margin:2px 0; font-size:15px; }
.btl-service-detail__head p { max-width:660px; margin:0; color:var(--btl-slate); font-size:8px; line-height:1.85; }
.btl-service-detail__head > a { color:var(--btl-blue); font-size:8px; font-weight:800; text-decoration:none; }
.btl-service-detail__flow {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  border-bottom:1px solid #E8EDF4;
  background:#FBFCFE;
}
.btl-service-detail__flow > div {
  min-height:58px;
  padding:9px 11px;
  display:grid;
  grid-template-columns:24px 1fr;
  align-items:center;
  gap:8px;
  border-inline-end:1px solid #E8EDF4;
}
.btl-service-detail__flow > div:last-child { border-inline-end:0; }
.btl-service-detail__flow > div > span {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:1px solid #DCE6F3;
  border-radius:50%;
  background:#fff;
  color:#64748B;
  font-size:7px;
  font-weight:900;
}
.btl-service-detail__flow > div.is-current > span { border-color:var(--btl-blue); background:var(--btl-blue); color:#fff; }
.btl-service-detail__flow small { display:block; color:var(--btl-slate); font-size:7px; }
.btl-service-detail__flow strong { display:block; margin-top:2px; font-size:8px; }
.btl-service-detail--signature .btl-service-detail__content { padding:14px 16px; }
.btl-service-readiness {
  padding:11px 12px;
  display:grid;
  grid-template-columns:30px 1fr;
  align-items:flex-start;
  gap:9px;
  border:1px solid #E2E8F0;
  border-radius:11px;
  background:#F8FAFC;
}
.btl-service-readiness > span {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#EEF2F7;
  color:#64748B;
}
.btl-service-readiness strong { display:block; font-size:9px; }
.btl-service-readiness p { margin:3px 0 0; color:var(--btl-slate); font-size:8px; line-height:1.8; }

@media (max-width: 1100px) {
  .btl-people-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .btl-people-summary article:nth-child(2) { border-inline-end:0; }
  .btl-people-summary article:nth-child(-n+2) { border-bottom:1px solid #E8EDF4; }
  .btl-people-toolbar { grid-template-columns:minmax(210px,1fr) 140px 140px; }
  .btl-people-toolbar .btl-button { grid-column:1/-1; width:fit-content; }
  .btl-service-paths { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .btl-service-grid--marketplace { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .btl-employment-journey,.btl-service-detail__flow { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .btl-employment-journey > div:nth-child(2),.btl-service-detail__flow > div:nth-child(2) { border-inline-end:0; }
  .btl-employment-journey > div:nth-child(-n+2),.btl-service-detail__flow > div:nth-child(-n+2) { border-bottom:1px solid #E8EDF4; }
  .btl-people-workspace__head,.btl-hc-command__head,.btl-department-blueprint__head,.btl-service-marketplace__head { align-items:flex-start; }
}
@media (max-width: 720px) {
  .btl-people-summary,.btl-service-grid--marketplace { grid-template-columns:1fr; }
  .btl-people-summary article { border-inline-end:0; border-bottom:1px solid #E8EDF4; }
  .btl-people-summary article:last-child { border-bottom:0; }
  .btl-people-toolbar,.btl-hc-toolbar { grid-template-columns:1fr; }
  .btl-service-paths { grid-template-columns:1fr 1fr; }
  .btl-service-page-head { align-items:flex-start; }
  .btl-service-assurance { max-width:none; }
  .btl-people-workspace__head,.btl-hc-command__head,.btl-department-blueprint__head,.btl-service-marketplace__head { flex-direction:column; }
  .btl-employment-journey,.btl-service-detail__flow { grid-template-columns:1fr; }
  .btl-employment-journey > div,.btl-service-detail__flow > div { border-inline-end:0; border-bottom:1px solid #E8EDF4; }
  .btl-employment-journey > div:last-child,.btl-service-detail__flow > div:last-child { border-bottom:0; }
  .btl-employment-journey > div::after { display:none; }
}

/* v0.12.1 — governed document ingestion + controlled remediation */
.btl-analysis-upload { position: relative; }
.btl-analysis-upload > small { margin-top: 10px; color: var(--btl-slate); font-size: 11px; line-height: 1.8; }
.btl-upload-selection { width: min(100%, 520px); margin-top: 16px; padding: 12px 14px; border: 1px solid rgba(37,99,235,.16); border-radius: 12px; background: #fff; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; text-align: start; align-items: center; }
.btl-upload-selection strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.btl-upload-selection span { color: var(--btl-slate); font-size: 10px; }
.btl-upload-selection .btl-link-button { grid-column: 2; grid-row: 1 / span 2; }
.btl-link-button { border: 0; padding: 4px 6px; background: transparent; color: var(--btl-blue); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.btl-link-button:hover { text-decoration: underline; }
.btl-ingestion-summary { width: min(100%, 520px); margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(16,185,129,.2); background: rgba(16,185,129,.055); display: grid; gap: 4px; text-align: start; }
.btl-ingestion-summary strong { color: #047857; font-size: 12px; }
.btl-ingestion-summary span { color: var(--btl-gray-600); font-size: 10px; }
.btl-ingestion-summary small { color: #92400e; font-size: 10px; line-height: 1.8; }
.btl-analysis-item-meta { display: block; margin-top: 5px; color: #9a6700; font-size: 10px; line-height: 1.8; }
.btl-analysis-item-action { margin-top: 9px; border: 0; border-bottom: 1px solid rgba(37,99,235,.25); padding: 2px 0 4px; background: transparent; color: var(--btl-blue); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.btl-analysis-item-action:hover { color: var(--btl-purple); border-bottom-color: rgba(124,58,237,.45); }
.btl-remediation-workspace { margin-top: 18px; padding: 20px; border: 1px solid #dce5f2; border-inline-start: 4px solid var(--btl-purple); border-radius: 16px; background: linear-gradient(180deg,#fff 0%,#fbfaff 100%); }
.btl-remediation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(148,163,184,.18); }
.btl-remediation-head h3 { margin: 3px 0 5px; font-size: 16px; }
.btl-remediation-head p { margin: 0; max-width: 880px; color: var(--btl-gray-600); font-size: 12px; line-height: 1.9; }
.btl-remediation-kicker { color: var(--btl-purple); font-size: 10px; font-weight: 850; }
.btl-remediation-context { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.btl-remediation-context > div:not(.btl-remediation-warning) { padding: 12px 14px; border: 1px solid var(--btl-gray-200); border-radius: 12px; background: #fff; }
.btl-remediation-context small { display: block; margin-bottom: 5px; color: var(--btl-slate); font-size: 10px; font-weight: 750; }
.btl-remediation-context p { margin: 0; color: var(--btl-ink); font-size: 12px; line-height: 1.9; }
.btl-reference-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.btl-reference-chips span { padding: 4px 8px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 10px; }
.btl-remediation-warning { grid-column: 1 / -1; padding: 10px 12px; border: 1px solid rgba(245,158,11,.25); border-radius: 10px; background: rgba(245,158,11,.07); color: #92400e; font-size: 11px; line-height: 1.9; }
.btl-remediation-target,.btl-remediation-editor { display: grid; gap: 7px; margin-top: 12px; }
.btl-remediation-target > span,.btl-remediation-editor > span { font-size: 12px; font-weight: 800; }
.btl-remediation-target select { width: 100%; min-height: 44px; border: 1px solid var(--btl-gray-200); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--btl-ink); font: inherit; }
.btl-remediation-editor textarea { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--btl-gray-200); border-radius: 12px; padding: 13px 14px; background: #fff; color: var(--btl-ink); font: inherit; font-size: 12px; line-height: 2; outline: 0; }
.btl-remediation-editor textarea:focus,.btl-remediation-target select:focus { border-color: rgba(37,99,235,.55); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.btl-remediation-target small,.btl-remediation-editor small { color: var(--btl-slate); font-size: 10px; line-height: 1.8; }
.btl-remediation-diff { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.btl-remediation-diff > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--btl-gray-200); border-radius: 12px; background: #fff; }
.btl-remediation-diff > div:first-child { border-inline-start: 3px solid #f59e0b; }
.btl-remediation-diff > div:last-child { border-inline-start: 3px solid #10b981; }
.btl-remediation-diff small { color: var(--btl-slate); font-size: 10px; font-weight: 750; }
.btl-remediation-diff pre { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--btl-gray-900); font: 11px/2 var(--btl-font); }
.btl-remediation-message { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 11px; line-height: 1.9; border: 1px solid transparent; }
.btl-remediation-message.is-info { background: rgba(37,99,235,.055); border-color: rgba(37,99,235,.16); color: #1d4ed8; }
.btl-remediation-message.is-success { background: rgba(16,185,129,.06); border-color: rgba(16,185,129,.18); color: #047857; }
.btl-remediation-message.is-warning { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.22); color: #92400e; }
.btl-remediation-message.is-error { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.18); color: #b91c1c; }
.btl-remediation-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.btl-confirm-check { display: inline-flex; align-items: center; gap: 7px; color: var(--btl-gray-600); font-size: 11px; }
.btl-confirm-check input { width: 16px; height: 16px; accent-color: var(--btl-blue); }
@media(max-width:760px){
  .btl-remediation-context,.btl-remediation-diff{grid-template-columns:1fr}
  .btl-upload-selection{grid-template-columns:1fr}.btl-upload-selection .btl-link-button{grid-column:auto;grid-row:auto;justify-self:start;padding-inline:0}
  .btl-remediation-actions{align-items:stretch}.btl-remediation-actions .btl-button{width:100%}.btl-confirm-check{width:100%}
}

/* v0.12.2 — governed Legal Intelligence case workspace integration */
.btl-case-runtime { margin-bottom: 16px; padding: 13px 15px; border: 1px solid rgba(148,163,184,.22); border-inline-start: 4px solid var(--btl-gray-400); border-radius: 14px; background: #fff; display: flex; align-items: center; gap: 12px; }
.btl-case-runtime > span { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: var(--btl-gray-100); color: var(--btl-slate); }
.btl-case-runtime > span .btl-icon { width: 18px; height: 18px; }
.btl-case-runtime > div { min-width: 0; display: grid; gap: 3px; }
.btl-case-runtime strong { font-size: 12px; }
.btl-case-runtime small { color: var(--btl-slate); font-size: 10px; line-height: 1.8; }
.btl-case-runtime.is-ready { border-inline-start-color: var(--btl-success); background: linear-gradient(90deg,rgba(16,185,129,.04),#fff 24%); }
.btl-case-runtime.is-ready > span { color: #047857; background: #ecfdf5; }
.btl-case-runtime.is-restricted { border-inline-start-color: var(--btl-warning); background: linear-gradient(90deg,rgba(245,158,11,.045),#fff 24%); }
.btl-case-runtime.is-restricted > span { color: #b45309; background: #fffbeb; }
.btl-case-service-state { max-width: 720px; margin: 42px auto; }
.btl-case-selector { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fff; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.btl-case-selector label { min-width: min(360px,100%); flex: 1; display: grid; gap: 6px; }
.btl-case-selector label > span { color: var(--btl-slate); font-size: 10px; font-weight: 750; }
.btl-case-selector select { width: 100%; min-height: 42px; border: 1px solid var(--btl-gray-200); border-radius: 10px; padding: 0 11px; background: #fff; color: var(--btl-ink); font: inherit; font-size: 12px; outline: 0; }
.btl-case-selector select:focus { border-color: rgba(37,99,235,.5); box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.btl-case-selector > small { margin-inline-start: auto; padding-bottom: 8px; color: var(--btl-slate); font-size: 10px; }
.btl-case-summary--live { margin-bottom: 14px; }
.btl-case-phase-map > div.is-ready span { color: var(--btl-blue); border-color: rgba(37,99,235,.24); background: #eff6ff; }
.btl-legal-case-workspace.is-live { border-top-color: rgba(37,99,235,.22); }
.btl-case-live-empty { min-height: 110px; padding: 22px; border: 1px dashed var(--btl-gray-200); border-radius: 12px; background: #fbfcfe; display: grid; place-items: center; text-align: center; color: var(--btl-slate); font-size: 11px; line-height: 1.9; }
.btl-case-live-list { display: grid; border: 1px solid var(--btl-gray-200); border-radius: 13px; overflow: hidden; background: #fff; }
.btl-case-live-row { min-width: 0; min-height: 58px; padding: 11px 13px; display: grid; grid-template-columns: minmax(180px,1.25fr) minmax(120px,.8fr) auto; gap: 14px; align-items: center; border-bottom: 1px solid #edf1f6; }
.btl-case-live-row:last-child { border-bottom: 0; }
.btl-case-live-row > div { min-width: 0; display: grid; gap: 2px; }
.btl-case-live-row strong { font-size: 11px; }
.btl-case-live-row small { color: var(--btl-slate); font-size: 9px; }
.btl-case-live-row > span { min-width: 0; color: var(--btl-gray-600); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.btl-case-live-row > em { padding: 4px 7px; border-radius: 999px; background: var(--btl-gray-100); color: var(--btl-gray-600); font-size: 9px; font-style: normal; white-space: nowrap; }
.btl-case-position-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.btl-case-position { min-width: 0; padding: 14px 15px; border: 1px solid var(--btl-gray-200); border-inline-start: 3px solid var(--btl-gray-400); border-radius: 13px; background: #fff; }
.btl-case-position.is-claim { border-inline-start-color: var(--btl-blue); }
.btl-case-position.is-defense { border-inline-start-color: var(--btl-purple); }
.btl-case-position > span { color: var(--btl-blue); font-size: 9px; font-weight: 850; }
.btl-case-position.is-defense > span { color: var(--btl-purple); }
.btl-case-position p { margin: 7px 0 9px; color: var(--btl-gray-900); font-size: 11px; line-height: 2; overflow-wrap: anywhere; }
.btl-case-position small { color: var(--btl-slate); font-size: 9px; }
.btl-case-position-documents{margin-top:10px;padding-top:9px;border-top:1px dashed var(--btl-gray-200);display:grid;gap:6px}
.btl-case-position-document{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:8px;background:var(--btl-gray-50)}
.btl-case-position-document div{min-width:0;display:grid;gap:2px}
.btl-case-position-document strong,.btl-case-position-document small{overflow-wrap:anywhere}
.btl-case-position-document strong{font-size:9px;color:var(--btl-gray-800)}
.btl-case-position-document a{flex:0 0 auto;color:var(--btl-blue);font-size:9px;font-weight:850;text-decoration:none}
.btl-case-analysis-list { display: grid; gap: 10px; }
.btl-case-analysis-item { padding: 15px 16px; border: 1px solid var(--btl-gray-200); border-inline-start: 4px solid var(--btl-gray-400); border-radius: 13px; background: #fff; }
.btl-case-analysis-item.is-success { border-inline-start-color: var(--btl-success); }
.btl-case-analysis-item.is-warning { border-inline-start-color: var(--btl-warning); }
.btl-case-analysis-item.is-danger { border-inline-start-color: var(--btl-danger); }
.btl-case-analysis-item__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.btl-case-analysis-item__head > div { display: grid; gap: 3px; }
.btl-case-analysis-item__head small { color: var(--btl-slate); font-size: 9px; }
.btl-case-analysis-item__head strong { font-size: 12px; }
.btl-case-analysis-item__head > span { padding: 4px 7px; border-radius: 999px; background: var(--btl-gray-100); color: var(--btl-gray-600); font-size: 9px; white-space: nowrap; }
.btl-case-analysis-item > p { margin: 10px 0 0; color: var(--btl-gray-600); font-size: 11px; line-height: 1.9; }
.btl-case-authorities { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btl-case-authorities small { color: var(--btl-slate); font-size: 9px; font-weight: 750; }
.btl-case-authorities em { padding: 4px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 9px; font-style: normal; }
.btl-case-artifacts { margin-bottom: 16px; padding: 15px; border: 1px solid var(--btl-gray-200); border-radius: 14px; background: #fbfcff; }
.btl-case-artifacts .btl-panel__head { min-height: 0; margin-bottom: 8px; }
.btl-case-artifacts h3 { margin: 0; font-size: 13px; }
.btl-case-artifact { padding: 12px 0; display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 13px; border-bottom: 1px solid #e9eef5; }
.btl-case-artifact:last-child { border-bottom: 0; padding-bottom: 0; }
.btl-case-artifact__type { align-self: start; padding: 5px 7px; border-radius: 8px; background: #eef2ff; color: #4338ca; font-size: 9px; font-weight: 750; text-align: center; }
.btl-case-artifact > div { min-width: 0; display: grid; gap: 5px; }
.btl-case-artifact strong { font-size: 11px; }
.btl-case-artifact p { margin: 0; color: var(--btl-gray-600); font-size: 10px; line-height: 1.9; overflow-wrap: anywhere; }
.btl-case-artifact small { color: var(--btl-slate); font-size: 9px; }
.btl-case-artifact em { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #fff7ed; color: #c2410c; font-size: 9px; font-style: normal; }
.btl-case-live-timeline { padding: 4px 2px; display: grid; }
.btl-case-live-timeline__item { position: relative; min-height: 54px; padding-inline-start: 28px; display: flex; align-items: flex-start; }
.btl-case-live-timeline__item::before { content: ''; position: absolute; inset-inline-start: 8px; top: 17px; bottom: -8px; width: 1px; background: #dbe3ee; }
.btl-case-live-timeline__item:last-child::before { display: none; }
.btl-case-live-timeline__item > span { position: absolute; inset-inline-start: 2px; top: 8px; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: var(--btl-gray-400); box-shadow: 0 0 0 1px #cbd5e1; }
.btl-case-live-timeline__item.is-current > span { background: var(--btl-blue); box-shadow: 0 0 0 1px rgba(37,99,235,.35),0 0 0 5px rgba(37,99,235,.07); }
.btl-case-live-timeline__item > div { display: grid; gap: 3px; }
.btl-case-live-timeline__item strong { font-size: 11px; }
.btl-case-live-timeline__item small { color: var(--btl-slate); font-size: 9px; }
.btl-case-no-matter { margin-top: 20px; }

.btl-case-create-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--btl-gray-200);
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.btl-case-create-card > div { min-width: 0; max-width: 720px; }
.btl-case-create-card h2 { margin: 3px 0 7px; font-size: 16px; }
.btl-case-create-card p:not(.btl-eyebrow) { margin: 0; color: var(--btl-gray-600); font-size: 11px; line-height: 1.9; }
.btl-case-create-form { flex: 0 0 auto; }

@media(max-width:820px){
  .btl-case-position-grid{grid-template-columns:1fr}
  .btl-case-live-row{grid-template-columns:1fr auto}.btl-case-live-row>em{grid-column:2;grid-row:1}.btl-case-live-row>span{grid-column:1/-1}
  .btl-case-artifact{grid-template-columns:1fr}.btl-case-artifact__type{width:fit-content}
}
@media(max-width:620px){
  .btl-case-selector{align-items:stretch}.btl-case-selector .btl-button{width:100%}.btl-case-selector>small{margin-inline-start:0;padding-bottom:0}
  .btl-case-live-row{grid-template-columns:1fr}.btl-case-live-row>em,.btl-case-live-row>span{grid-column:auto;grid-row:auto;width:fit-content}
}


/* v0.12.3 — Full Contract Analysis Workspace transfer.
   Keep the upstream Legal Workspace as the functional owner and only harmonize
   its visual tokens inside the Betterly Product Shell. Width/density remain
   untouched pending the agreed 18-inch monitor validation. */
.btl-native-analysis-host {
    width: 100%;
    min-width: 0;
}
.btl-native-analysis-host .contrai-workspace {
    --cw-primary: #2563eb;
    --cw-primary-dark: #4f46e5;
    --cw-bg: #f5f6fa;
    --cw-panel: #ffffff;
    --cw-border: #dfe5ef;
    --cw-text: #0b132b;
    --cw-muted: #64748b;
    --cw-success: #087f5b;
    --cw-warning: #b26a00;
    --cw-danger: #b42318;
    font-family: inherit;
}
.btl-native-analysis-host .contrai-workspace__button--primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .14);
}
.btl-native-analysis-host .contrai-workspace__button--primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    border-color: transparent;
}
.btl-native-analysis-host .contrai-workspace__eyebrow {
    color: #2563eb;
}
.btl-native-analysis-host .contrai-workspace__panel,
.btl-native-analysis-host .contrai-workspace__finding {
    border-color: #dfe5ef;
}


/* v0.12.4 — P9.2B.1 governed Legal Cases controlled write.
   This layer only styles Betterly-owned forms/status. Engine governance and
   persistence remain owned by Legal Intelligence. */
.btl-case-flash {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid var(--btl-gray-200);
  border-radius: 12px;
  background: #fff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.9;
}
.btl-case-flash.is-success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.btl-case-flash.is-warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.btl-case-flash.is-danger { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

.btl-case-write-state {
  margin: 14px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--btl-gray-200);
  border-radius: 13px;
  background: #fff;
}
.btl-case-write-state > div { min-width: 0; display: grid; gap: 3px; }
.btl-case-write-state strong { font-size: 11px; }
.btl-case-write-state span { color: var(--btl-gray-600); font-size: 10px; line-height: 1.8; }
.btl-case-write-state em {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}
.btl-case-write-state.is-ready { border-color: #bae6fd; background: #f8fdff; }
.btl-case-write-state.is-ready em { background: #e0f2fe; color: #0369a1; }
.btl-case-write-state.is-blocked em { background: var(--btl-gray-100); color: var(--btl-gray-600); }

.btl-case-subsection {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--btl-gray-200);
  border-radius: 14px;
  background: #fbfcff;
}
.btl-case-subsection .btl-panel__head { min-height: 0; margin-bottom: 10px; }
.btl-case-subsection h3 { margin: 0; font-size: 12px; }
.btl-case-party-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.btl-case-party-grid article {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--btl-gray-200);
  border-radius: 11px;
  background: #fff;
}
.btl-case-party-grid strong { font-size: 11px; overflow-wrap: anywhere; }
.btl-case-party-grid span { color: var(--btl-gray-600); font-size: 9px; }
.btl-case-party-grid small { color: var(--btl-blue); font-size: 9px; font-weight: 750; }

.btl-case-compose {
  margin: 12px 0 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
  background: #fbfcff;
}
.btl-case-compose[open] { border-style: solid; border-color: #bfdbfe; background: #f8fbff; }
.btl-case-compose > summary {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--btl-blue);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.btl-case-compose > summary::-webkit-details-marker { display: none; }
.btl-case-compose > summary svg { width: 15px; height: 15px; }
.btl-case-write-form {
  padding: 0 12px 12px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.btl-case-write-form label { min-width: 0; display: grid; gap: 5px; }
.btl-case-write-form label > span { color: var(--btl-gray-700); font-size: 9px; font-weight: 800; }
.btl-case-write-form label.is-wide { grid-column: 1 / -1; }
.btl-case-write-form input,
.btl-case-write-form select,
.btl-case-write-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--btl-gray-200);
  border-radius: 9px;
  background: #fff;
  color: var(--btl-gray-900);
  font: inherit;
  font-size: 10px;
  line-height: 1.8;
  outline: 0;
}
.btl-case-write-form input,
.btl-case-write-form select { min-height: 38px; padding: 0 10px; }
.btl-case-write-form textarea { padding: 9px 10px; resize: vertical; }
.btl-case-file-field > small{color:var(--btl-slate);font-size:8px;line-height:1.8}
.btl-case-write-form .btl-case-file-field input[type=file]{padding:6px 8px;height:auto}
.btl-case-write-form input:focus,
.btl-case-write-form select:focus,
.btl-case-write-form textarea:focus {
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,.07);
}
.btl-case-write-actions { grid-column: 1 / -1; display: flex; justify-content: flex-start; }
.btl-case-write-actions .btl-button { min-width: 118px; }
.btl-case-inline-action { margin-top: 10px; }
.btl-case-inline-action .btl-button { min-height: 34px; padding: 6px 10px; font-size: 9px; }

@media(max-width:820px){
  .btl-case-party-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  .btl-case-write-state{align-items:flex-start;flex-direction:column}
  .btl-case-write-form{grid-template-columns:1fr}
  .btl-case-write-form label.is-wide,.btl-case-write-actions{grid-column:auto}
}

@media (max-width: 760px) {
  .btl-case-create-card { align-items: stretch; flex-direction: column; }
  .btl-case-create-form .btl-button { width: 100%; }
}

/* v0.14.1 — Billing & Usage Workspace */
.btl-billing-page-head{margin-bottom:14px}
.btl-billing-hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,.8fr);gap:14px;margin-bottom:16px}
.btl-billing-hero__plan,.btl-billing-hero__wallet{min-height:168px;border:1px solid #E2E9F2;border-radius:18px;background:#fff;box-shadow:var(--btl-shadow-xs);padding:22px}
.btl-billing-hero__plan{background:linear-gradient(135deg,#F7FAFF,#FFFFFF 56%,#F7F5FF)}
.btl-billing-hero__eyebrow{display:block;color:var(--btl-blue);font-size:9px;font-weight:850;margin-bottom:8px}
.btl-billing-hero__title{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.btl-billing-hero__title strong{font-size:24px;line-height:1.5}
.btl-billing-hero__plan p{margin:8px 0 0;color:var(--btl-slate);font-size:10px;line-height:1.9}
.btl-billing-hero__actions{margin-top:14px}.btl-billing-hero__actions a{font-size:9px;font-weight:800;color:var(--btl-blue);text-decoration:none}
.btl-billing-hero__wallet{display:grid;align-content:center;justify-items:start;gap:3px}
.btl-billing-hero__wallet>span{font-size:9px;color:var(--btl-slate);font-weight:750}
.btl-billing-hero__wallet>strong{font-size:32px;line-height:1.4;letter-spacing:-.02em}
.btl-billing-hero__wallet>em{font-size:10px;font-style:normal;color:var(--btl-slate)}
.btl-billing-hero__wallet>small{margin-top:8px;font-size:8px;color:var(--btl-slate)}
.btl-billing-section{margin-bottom:16px}.btl-panel-link{font-size:9px;font-weight:750;color:var(--btl-blue);text-decoration:none}
.btl-billing-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.btl-billing-service-card{min-width:0;border:1px solid #E2E9F2;border-radius:14px;background:linear-gradient(180deg,#fff,#FDFEFF);padding:15px;display:grid;gap:12px}
.btl-billing-service-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.btl-billing-service-card__head strong{font-size:11px;line-height:1.7}.btl-billing-service-card__head>span{font-size:8px;color:var(--btl-blue);white-space:nowrap}
.btl-billing-service-card__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.btl-billing-service-card__stats>span{min-width:0;padding:8px;border-radius:10px;background:#F8FAFC;display:grid;gap:3px}
.btl-billing-service-card__stats small{font-size:7.5px;color:var(--btl-slate);line-height:1.5}.btl-billing-service-card__stats b{font-size:9px;line-height:1.6;overflow-wrap:anywhere}
.btl-billing-grid--limits{align-items:stretch}.btl-resource-list{display:grid;gap:2px}.btl-resource-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--btl-gray-100)}
.btl-resource-row:last-child{border-bottom:0}.btl-resource-row span{font-size:9px;color:var(--btl-slate)}.btl-resource-row strong{font-size:10px;text-align:left}
.btl-panel-note{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#F8FAFC;color:var(--btl-slate);font-size:8px;line-height:1.9}
.btl-service-price-list{display:grid;gap:2px}.btl-service-price-list>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--btl-gray-100)}
.btl-service-price-list>div:last-child{border-bottom:0}.btl-service-price-list span{font-size:9px;color:var(--btl-slate)}.btl-service-price-list strong{font-size:10px;white-space:nowrap}
@media(max-width:1180px){.btl-billing-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.btl-billing-hero{grid-template-columns:1fr}}
@media(max-width:760px){.btl-billing-service-grid{grid-template-columns:1fr}.btl-billing-service-card__stats{grid-template-columns:1fr}.btl-billing-hero__plan,.btl-billing-hero__wallet{min-height:auto;padding:17px}.btl-billing-hero__title strong{font-size:20px}.btl-billing-hero__wallet>strong{font-size:27px}}


/* v0.14.3 — Contract list pagination + date-state readability */
.btl-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 4px 7px;border-top:1px solid #EDF1F6;margin-top:10px}
.btl-pagination__info{color:var(--btl-slate);font-size:9px;font-weight:700;line-height:1.8}
.btl-pagination__pages{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.btl-pagination__page,.btl-pagination__nav{min-width:32px;min-height:32px;padding:5px 9px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #DCE5F0;border-radius:9px;background:#fff;color:#334155;text-decoration:none;font-size:9px;font-weight:800;transition:border-color .14s ease,background .14s ease,color .14s ease}
.btl-pagination__nav{min-width:auto;padding-inline:12px;color:var(--btl-blue)}
.btl-pagination__page:hover,.btl-pagination__nav:hover{border-color:#BFDBFE;background:#F8FBFF;color:#1D4ED8}
.btl-pagination__page.is-current{border-color:#BFD2FF;background:#EEF4FF;color:#1D4ED8;box-shadow:inset 0 0 0 1px rgba(37,99,235,.04)}
.btl-pagination__ellipsis{min-width:20px;text-align:center;color:var(--btl-slate);font-size:11px}
.btl-contract-table td>small.is-success{color:#15803D}.btl-contract-table td>small.is-warning{color:#B45309}.btl-contract-table td>small.is-danger{color:#B91C1C}
@media(max-width:760px){.btl-pagination{align-items:stretch;flex-direction:column}.btl-pagination__pages{justify-content:flex-start}}


/* Notification read-state persistence (v0.14.4) */
.btl-notification-mark-all{margin:0}
.btl-notification-list article.is-read{opacity:.68;background:#fbfcfe}
.btl-notification-list article.is-read::before{background:#cbd5e1}
.btl-notification-list article.is-unread strong{font-weight:900}
.btl-notification-read-state{display:inline-flex;width:max-content;align-items:center;min-height:20px;padding:0 7px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:7px;font-weight:800}

/* P9.4 — contract lifecycle / renewal workflow */
.btl-renewal-inline{display:block;width:max-content;max-width:100%;margin-top:6px;padding:3px 8px;border-radius:999px;font-size:11px;line-height:1.7;background:#f1f5f9;color:#475569}
.btl-renewal-inline.is-warning{background:#fff7ed;color:#9a3412}.btl-renewal-inline.is-info{background:#eff6ff;color:#1d4ed8}.btl-renewal-inline.is-success{background:#ecfdf5;color:#047857}.btl-renewal-inline.is-neutral{background:#f1f5f9;color:#64748b}
.btl-lifecycle-banner{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin:0 0 18px;padding:15px 17px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.btl-lifecycle-banner.is-warning{border-color:#fed7aa;background:#fffaf5}.btl-lifecycle-banner.is-info{border-color:#bfdbfe;background:#f8fbff}.btl-lifecycle-banner.is-success{border-color:#bbf7d0;background:#f7fff9}
.btl-lifecycle-banner__icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#f1f5f9;color:#334155}.btl-lifecycle-banner__icon svg{width:20px;height:20px}
.btl-lifecycle-banner div{min-width:0}.btl-lifecycle-banner small{display:block;color:#64748b;font-size:11px}.btl-lifecycle-banner strong{display:block;margin-top:2px;color:#0f172a;font-size:14px}.btl-lifecycle-banner p{margin:4px 0 0;color:#64748b;font-size:12px;line-height:1.8}.btl-lifecycle-banner em{font-style:normal;color:#64748b;font-size:11px;white-space:nowrap}
.btl-contract-lifecycle{margin-top:20px;padding:20px;border:1px solid #dbe4f0;border-radius:18px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}
.btl-contract-lifecycle__head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:16px;border-bottom:1px solid #eef2f7}.btl-contract-lifecycle__head h3{margin:2px 0 5px;font-size:17px;color:#0f172a}.btl-contract-lifecycle__head p{margin:0;max-width:760px;color:#64748b;font-size:12px;line-height:1.9}
.btl-lifecycle-form{display:grid;gap:12px;margin-top:16px;padding:16px;border:1px solid #e5eaf1;border-radius:14px;background:#fff}.btl-lifecycle-form--inline{grid-template-columns:minmax(0,1fr) auto;align-items:end}.btl-lifecycle-form label{display:grid;gap:6px}.btl-lifecycle-form label>span{font-size:11px;font-weight:700;color:#475569}.btl-lifecycle-form input,.btl-lifecycle-form select,.btl-lifecycle-form textarea{width:100%;min-height:40px;padding:9px 11px;border:1px solid #d7dee8;border-radius:10px;background:#fff;color:#0f172a;font:inherit;outline:none}.btl-lifecycle-form textarea{min-height:74px;resize:vertical;line-height:1.8}.btl-lifecycle-form input:focus,.btl-lifecycle-form select:focus,.btl-lifecycle-form textarea:focus{border-color:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.12)}.btl-lifecycle-form>small{color:#64748b;font-size:11px}.btl-lifecycle-form__grid{display:grid;grid-template-columns:minmax(180px,.45fr) minmax(260px,1fr);gap:12px}
.btl-lifecycle-context{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:16px;padding:14px 16px;border-radius:13px;background:#f8fafc;border:1px solid #e2e8f0}.btl-lifecycle-context strong{color:#0f172a;font-size:13px}.btl-lifecycle-context span,.btl-lifecycle-context p{margin:0;color:#64748b;font-size:11px;line-height:1.8}.btl-lifecycle-context p{flex-basis:100%}.btl-lifecycle-context.is-success{background:#f0fdf4;border-color:#bbf7d0}.btl-lifecycle-context a:not(.btl-button){color:#2563eb;font-size:12px;font-weight:700}
.btl-archive-control{margin-top:20px;padding-top:16px;border-top:1px dashed #d8e0ea}.btl-archive-control summary{cursor:pointer;width:max-content;color:#64748b;font-size:12px;font-weight:700}.btl-archive-control .btl-lifecycle-form p{margin:0;color:#64748b;font-size:11px;line-height:1.8}
@media (max-width:900px){.btl-lifecycle-banner{grid-template-columns:auto minmax(0,1fr)}.btl-lifecycle-banner em{grid-column:1/-1}.btl-contract-lifecycle__head{flex-direction:column}.btl-lifecycle-form__grid{grid-template-columns:1fr}.btl-lifecycle-form--inline{grid-template-columns:1fr}}

/* P9.5 — Organization Members, Departments & Operational RBAC */
.btl-org-commandbar,.btl-rbac-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px;padding:15px 17px;border:1px solid #dfe7f1;border-radius:16px;background:linear-gradient(135deg,#fff,#f8fbff);box-shadow:var(--btl-shadow-xs)}
.btl-org-commandbar>div,.btl-rbac-intro>div{display:flex;align-items:center;gap:11px;min-width:0}.btl-org-commandbar>div>span,.btl-rbac-intro>div>span{display:grid;place-items:center;flex:0 0 auto;width:38px;height:38px;border-radius:11px;background:#eef4ff;color:#315fe8}.btl-org-commandbar svg,.btl-rbac-intro svg{width:18px;height:18px}.btl-org-commandbar strong,.btl-rbac-intro strong{display:block;font-size:12px;color:#0f172a}.btl-org-commandbar small,.btl-rbac-intro small{display:block;margin-top:3px;color:#64748b;font-size:9px;line-height:1.8}
.btl-department-card.is-disabled{opacity:.65;background:#f8fafc}.btl-department-card.is-disabled .btl-department-card__scope{color:#94a3b8}
.btl-role-grid--operational .btl-role-card{display:grid;align-content:start;gap:10px}.btl-role-card__head{display:flex!important;align-items:center!important;gap:10px}.btl-role-card__head>span{display:grid!important;place-items:center!important;flex:0 0 auto;width:36px!important;height:36px!important;border-radius:11px!important;background:#f5f3ff!important;color:#6d4aff!important}.btl-role-card__head small{display:block;font-size:7px;text-transform:none;color:#94a3b8}.btl-role-card__head h2{margin:1px 0 0;font-size:12px}.btl-role-grid--operational .btl-role-card>p{margin:0;color:#475569;font-size:9px;font-weight:750}
.btl-role-scopes{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important}.btl-role-scopes>span{display:grid!important;gap:2px!important;padding:8px!important;border:1px solid #edf1f6!important;border-radius:9px!important;background:#f8fafc!important}.btl-role-scopes small{font-size:7px!important;color:#94a3b8!important}.btl-role-scopes strong{font-size:8px;color:#334155;line-height:1.5}.btl-role-capabilities{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:wrap}.btl-role-capabilities em{font-style:normal;padding:4px 7px;border-radius:999px;background:#eef4ff;color:#315fe8;font-size:7px;font-weight:800;line-height:1.6}
.btl-org-member-editor,.btl-org-permission-editor,.btl-org-department-editor{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.btl-org-member-editor select,.btl-org-member-editor input,.btl-org-permission-editor select,.btl-org-department-editor select,.btl-org-department-editor input{min-height:34px;max-width:170px;border:1px solid #dbe4ef;border-radius:8px;background:#fff;padding:5px 8px;color:#334155;font:inherit;font-size:8px}.btl-org-permission-editor{margin-top:7px;padding-top:7px;border-top:1px dashed #e5eaf1}
.btl-contract-assignment{margin-top:20px;padding:20px;border:1px solid #dbe4f0;border-radius:18px;background:linear-gradient(180deg,#fff,#fbfdff)}.btl-contract-assignment__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #eef2f7}.btl-contract-assignment__head h3{margin:2px 0 5px;font-size:17px}.btl-contract-assignment__head p{margin:0;max-width:760px;color:#64748b;font-size:11px;line-height:1.9}.btl-contract-assignment__current{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:14px}.btl-contract-assignment__current>div{padding:11px 12px;border:1px solid #edf1f6;border-radius:11px;background:#f8fafc}.btl-contract-assignment__current small{display:block;color:#94a3b8;font-size:8px}.btl-contract-assignment__current strong{display:block;margin-top:3px;color:#334155;font-size:10px;line-height:1.6}.btl-assignment-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr) auto;gap:10px;align-items:end;margin-top:14px;padding:14px;border:1px solid #e5eaf1;border-radius:13px;background:#fff}.btl-assignment-form label{display:grid;gap:5px}.btl-assignment-form label>span{font-size:9px;font-weight:800;color:#475569}.btl-assignment-form select{width:100%;min-height:38px;border:1px solid #d7dee8;border-radius:9px;background:#fff;padding:0 9px;color:#0f172a;font:inherit;font-size:9px}.btl-assignment-form small{font-size:7px;color:#94a3b8;line-height:1.7}.btl-assignment-readonly{display:flex;align-items:center;gap:8px;margin-top:14px;padding:10px 12px;border-radius:10px;background:#f8fafc;color:#64748b;font-size:9px}.btl-assignment-readonly svg{width:14px;height:14px}
@media(max-width:900px){.btl-org-commandbar,.btl-rbac-intro,.btl-contract-assignment__head{align-items:stretch;flex-direction:column}.btl-assignment-form{grid-template-columns:1fr}.btl-contract-assignment__current{grid-template-columns:1fr}}
@media(max-width:680px){.btl-role-scopes{grid-template-columns:1fr}.btl-org-member-editor,.btl-org-permission-editor,.btl-org-department-editor{align-items:stretch;flex-direction:column}.btl-org-member-editor select,.btl-org-member-editor input,.btl-org-permission-editor select,.btl-org-department-editor select,.btl-org-department-editor input{width:100%;max-width:none}}
.btl-role-scopes>span{width:auto!important;height:auto!important;place-items:initial!important;color:inherit!important}

/* P9.6 — Document Lifecycle & Private Vault */
.btl-document-filters{grid-template-columns:minmax(240px,1.6fr) minmax(125px,.55fr) minmax(125px,.55fr) auto}
.btl-document-detail{margin-bottom:18px;overflow:hidden}
.btl-document-detail__facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--btl-gray-200);border-bottom:1px solid var(--btl-gray-200);background:#fbfcfe}
.btl-document-detail__facts article{padding:13px 16px;display:grid;gap:4px;border-inline-end:1px solid var(--btl-gray-200)}
.btl-document-detail__facts article:last-child{border-inline-end:0}
.btl-document-detail__facts small{font-size:8px;color:var(--btl-slate)}
.btl-document-detail__facts strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btl-document-detail__actions,.btl-document-version-list{padding:16px}
.btl-document-detail__actions{border-bottom:1px solid var(--btl-gray-200)}
.btl-document-version-list code{font-size:9px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:3px 5px}
.btl-document-detail .btl-archive-control{margin:0 16px 16px}
.btl-related-document-list{display:grid;gap:8px}
.btl-related-document-list>article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;border:1px solid var(--btl-gray-200);border-radius:10px;background:#fff}
.btl-related-document-list>article>div:first-child{display:grid;gap:3px;min-width:0}
.btl-related-document-list strong{font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btl-related-document-list small{font-size:8px;color:var(--btl-slate)}
.btl-related-document-list>article>div:last-child{display:flex;gap:8px;white-space:nowrap}
.btl-related-document-list a{font-size:8px;font-weight:800;color:var(--btl-blue)}
@media(max-width:800px){.btl-document-filters{grid-template-columns:1fr 1fr}.btl-document-filters .btl-filter-search{grid-column:1/-1}.btl-document-detail__facts{grid-template-columns:repeat(2,minmax(0,1fr))}.btl-document-detail__facts article:nth-child(2){border-inline-end:0}}
@media(max-width:560px){.btl-document-filters{grid-template-columns:1fr}.btl-document-filters .btl-filter-search{grid-column:1}.btl-document-detail__facts{grid-template-columns:1fr}.btl-document-detail__facts article{border-inline-end:0;border-bottom:1px solid var(--btl-gray-200)}.btl-document-detail__facts article:last-child{border-bottom:0}.btl-related-document-list>article{align-items:flex-start;flex-direction:column}}
