/* Isolated enterprise UI prototype. All selectors require the opt-in saas-ui class. */
body.saas-ui {
  --saas-ink:#202b3d; --saas-muted:#778294; --saas-accent:#345be8;
  --saas-line:#e7eaf0; --saas-bg:#fafbfc; --saas-green:#24735f;
  --v4-bg:var(--saas-bg); --v4-surface:#fff; --v4-surface-2:#f6f8fa;
  --v4-text:var(--saas-ink); --v4-muted:var(--saas-muted);
  --v4-line:var(--saas-line); --v4-line-strong:#ced5df;
  --v4-blue:var(--saas-accent); --v4-blue-soft:#eef2ff;
  --v4-gold:#7b684a; --v4-gold-soft:#f7f4ee; --v4-green:var(--saas-green);
  --v4-green-soft:#edf7f2; --v4-shadow:0 3px 12px rgba(32,43,61,.04);
  --ui-shell-wide:1200px; --ui-page-pad:20px;
  color:var(--saas-ink)!important; background:var(--saas-bg)!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif!important;
  font-size:14px; letter-spacing:0;
}
body.saas-ui * { box-sizing:border-box; }
body.saas-ui :is(button,input,select,textarea) { font-family:inherit!important; }
body.saas-ui :focus-visible { outline:2px solid #345be8; outline-offset:3px; }
body.saas-ui :is(.home-bg,.brand-bg) { display:none; }
.saas-sidebar,.saas-context { display:none; }
body.saas-ui .home-shell {
  width:100%!important; max-width:none!important; padding:20px!important;
  margin:0 auto!important; min-height:100vh;
}
body.saas-ui .home-shell .ui-breadcrumbs { font-size:11px; margin:0 0 14px; color:var(--saas-muted); min-height:24px; padding:0; }
body.saas-ui .home-shell .ui-breadcrumbs a { color:#596678; font-weight:500; min-height:24px; }
body.saas-ui :is(.crm-add-header,.hub-header,.app-header) {
  padding:0 0 22px!important; margin:0!important; min-height:62px;
  color:var(--saas-ink)!important; background:transparent!important;
  border:0!important; border-radius:0!important; box-shadow:none!important;
  backdrop-filter:none!important;
}
body.saas-ui .crm-add-title { text-align:left!important; }
body.saas-ui .crm-add-title strong { color:var(--saas-ink)!important; font-family:inherit!important; font-size:24px!important; line-height:1.35!important; font-weight:650!important; letter-spacing:-.02em; }
body.saas-ui .crm-add-title small { color:var(--saas-muted)!important; font-size:11px; margin-bottom:4px; }
body.saas-ui :is(.crm-add-back,.hub-back-btn) { width:34px!important; min-width:34px!important; height:34px!important; min-height:34px!important; margin-right:10px; border:1px solid var(--saas-line)!important; border-radius:7px!important; background:#fff!important; color:#6b7789!important; }
body.saas-ui .crm-add-header>.home-brand-mark { display:none; }
body.saas-ui :is(.card,.followup-panel,.hub-card,.crm-add-card,.hr-card) {
  background:#fff!important; color:var(--saas-ink)!important; border:1px solid var(--saas-line)!important;
  border-radius:10px!important; box-shadow:none!important;
}
body.saas-ui :is(.followup-panel h2,.followup-panel h3,.hr-card h3,.hub-card-head strong) {
  font-family:inherit!important; color:var(--saas-ink)!important; letter-spacing:0!important;
}
body.saas-ui :is(.followup-hint,.followup-empty,.hr-sub,.hub-count,.hub-card-sub) { color:var(--saas-muted)!important; }
body.saas-ui :is(.followup-tool-primary,.disability-cta-primary,.hub-add-btn,.crm-submit,.hr-submit) {
  background:var(--saas-accent)!important; color:#fff!important; border:1px solid var(--saas-accent)!important;
  box-shadow:none!important; border-radius:7px!important; min-height:36px; font-weight:600!important;
}
body.saas-ui :is(.followup-tool-link,.disability-cta-secondary,.followup-status-btn,.hr-actions button,.cust-quick-bar button) {
  color:#5d697c!important; background:#fff!important; border:1px solid var(--saas-line)!important;
  border-radius:7px!important; min-height:34px; font-size:12px!important; box-shadow:none!important;
}
body.saas-ui :is(.followup-form input:not([type=checkbox]):not([type=radio]),.followup-form select,.followup-form textarea,.hub-filter-card select,.hr-form input,.hr-form select,.hr-form textarea,.form-group input,.crm-input,.crm-select,.crm-textarea) {
  background:#fff!important; color:var(--saas-ink)!important; border:1px solid #dfe4eb!important;
  border-radius:7px!important; min-height:38px; box-shadow:none!important; font-size:13px;
}
body.saas-ui .followup-dialog { border:1px solid var(--saas-line)!important; border-radius:12px!important; padding:0; color:var(--saas-ink); width:min(480px,calc(100% - 24px)); max-height:90vh; }
body.saas-ui .followup-dialog::backdrop { background:rgba(24,35,51,.28); backdrop-filter:blur(3px); }
body.saas-ui .followup-dialog-body { padding:24px; }
body.saas-ui .followup-dialog-body h3 { font-family:inherit!important; font-size:19px!important; line-height:1.4; font-weight:650; }

/* Dashboard: existing six core entries and thirteen tools remain intact. */
body.saas-dashboard .home-hero { background:transparent!important; padding:0!important; margin:0 0 24px!important; min-height:0; display:flex; border:0!important; border-radius:0!important; box-shadow:none!important; }
body.saas-dashboard .home-hero::before,body.saas-dashboard .home-hero::after { display:none!important; }
body.saas-dashboard .home-hero-top { display:flex; flex:1; align-items:center; }
body.saas-dashboard .home-brand { display:none; }
body.saas-dashboard .home-user { margin:0!important; order:-1; margin-right:auto!important; }
body.saas-dashboard .home-greeting { font-size:10px!important; }
body.saas-dashboard .home-user-info strong { font-size:13px!important; }
body.saas-dashboard .home-phone { font-size:10px!important; }
body.saas-dashboard .home-avatar { width:34px!important; height:34px!important; border-radius:8px!important; background:#eef2f7!important; border:0!important; color:#526177!important; font-size:12px!important; }
body.saas-dashboard .home-logout-btn { width:32px!important; height:32px!important; min-height:32px!important; margin-left:auto; border-radius:7px!important; background:#fff!important; color:#6d788b!important; border-color:var(--saas-line)!important; }
body.saas-dashboard .home-main { gap:0!important; }
body.saas-dashboard .home-intro { padding:0 0 28px!important; background:none!important; border:0!important; box-shadow:none!important; border-radius:0!important; }
body.saas-dashboard .home-intro::before,body.saas-dashboard .home-intro-badge,body.saas-dashboard .home-phases { display:none!important; }
.saas-eyebrow { color:#8a95a5!important; font-size:10px!important; font-weight:600; letter-spacing:.08em!important; margin:0 0 10px!important; }
body.saas-dashboard .home-intro h2 { font-family:inherit!important; color:#202b3d!important; font-size:28px!important; line-height:1.35; font-weight:650!important; margin:0 0 8px!important; letter-spacing:-.03em; }
body.saas-dashboard .home-intro p:not(.saas-eyebrow) { margin:0!important; color:var(--saas-muted)!important; font-size:13px!important; }
body.saas-dashboard .home-actions { display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px!important; }
body.saas-dashboard .home-section-title { grid-column:1/-1; font-family:inherit!important; font-weight:600!important; font-size:13px!important; color:#596678; letter-spacing:0; margin:0 0 2px; order:-3; }
body.saas-dashboard .home-section-title:nth-of-type(2) { margin-top:22px; order:2; }
body.saas-dashboard .home-actions>.home-tile { min-height:130px!important; padding:18px!important; gap:14px!important; display:flex; align-items:center; flex-wrap:nowrap!important; border-radius:10px!important; border-color:var(--saas-line)!important; background:#fff!important; box-shadow:none!important; position:relative; }
body.saas-dashboard .home-actions>.home-tile:hover { border-color:#c9d4f3!important; background:#fcfdff!important; }
body.saas-dashboard .home-tile-body { flex:1!important; flex-basis:auto!important; }
body.saas-dashboard .home-tile-body strong { color:var(--saas-ink)!important; font-family:inherit!important; font-weight:600!important; font-size:14px!important; line-height:1.5; }
body.saas-dashboard .home-tile-body small { color:var(--saas-muted)!important; font-size:11px!important; line-height:1.6!important; margin-top:4px!important; }
body.saas-dashboard .home-tile-icon { width:34px!important; height:34px!important; min-width:34px!important; background:#f3f5f8!important; color:#69788d!important; border-radius:8px!important; }
body.saas-dashboard .home-tile-icon svg { width:19px; height:19px; }
body.saas-dashboard .home-tile-arrow { color:#acb5c3!important; font-size:16px!important; }
body.saas-dashboard #followupBtn { order:-2; background:#f6f8ff!important; border-color:#dbe2fb!important; }
body.saas-dashboard #glanceBtn { order:-1; }
body.saas-dashboard #followupBtn .home-tile-icon { background:#eaf0ff!important; color:var(--saas-accent)!important; }
body.saas-dashboard #glanceBtn .home-tile-icon { background:#eef7f2!important; color:var(--saas-green)!important; }
body.saas-dashboard #ledgerBtn .home-tile-icon { background:#f7f3ec!important; color:#927447!important; }
body.saas-dashboard #followupBadges { width:auto; margin:0!important; gap:5px; position:absolute; right:17px; bottom:16px; }
body.saas-dashboard .home-tile-badge { min-width:22px; padding:2px 6px!important; border-radius:5px; font-size:10px; }
body.saas-dashboard .home-tile-badge.is-overdue { background:#fff0ed!important; color:#a04936!important; }
body.saas-dashboard .home-tile-badge.is-today { background:#e6efff!important; color:#4566a0!important; }
body.saas-dashboard .home-tile-grid { grid-column:1/-1; order:3; display:grid; grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:0!important; background:#fff; border:1px solid var(--saas-line); border-radius:10px; overflow:hidden; }
body.saas-dashboard .home-tile-grid .home-tile { display:flex!important; flex-direction:row!important; text-align:left!important; align-items:center; min-height:85px!important; padding:16px!important; margin:0!important; border-radius:0!important; border:0!important; border-bottom:1px solid #eef0f4!important; background:none!important; box-shadow:none!important; grid-column:auto!important; gap:12px!important; }
body.saas-dashboard .home-tile-grid .home-tile:hover { background:#f8fafc!important; }
body.saas-dashboard .home-tile-grid .home-tile-icon { width:28px!important; min-width:28px!important; height:28px!important; background:transparent!important; color:#8995a6!important; }
body.saas-dashboard .home-tile-grid .home-tile-body strong { font-size:12px!important; }
body.saas-dashboard .home-tile-grid .home-tile-body small { font-size:10px!important; }
.saas-entry-arrow { color:#b8c1ce; font-size:14px; }
body.saas-dashboard .home-footer { padding:24px 0 0!important; margin:0!important; }
body.saas-dashboard .home-footer p { color:#a2abba!important; font-size:10px!important; }

/* Case workspace: focus on searchable work, calendar becomes supporting context. */
body.saas-ui .followup-main { width:100%!important; max-width:none!important; margin:0!important; padding:0!important; overflow:visible!important; min-width:0!important; }
body.saas-ui .ui-breadcrumbs { display:none!important; }
body.saas-cases .followup-main { display:flex; flex-direction:column; gap:14px; }
body.saas-cases .followup-banner { background:#f6f8fb!important; border:1px solid var(--saas-line)!important; border-radius:7px!important; padding:11px 13px!important; margin:0!important; }
body.saas-cases .followup-banner p { color:#8490a1!important; font-size:10px!important; line-height:1.6!important; font-weight:400; }
body.saas-cases .followup-banner-btn { background:#fff!important; color:#718197!important; border:1px solid var(--saas-line)!important; border-radius:5px!important; white-space:nowrap; font-size:10px!important; }
body.saas-cases .followup-controls { padding:0!important; border:0!important; background:none!important; box-shadow:none!important; }
body.saas-cases .followup-search-bar { margin:0 0 12px; }
body.saas-cases .followup-search-bar input { background:#fff!important; color:var(--saas-ink)!important; height:40px!important; border:1px solid var(--saas-line)!important; border-radius:7px!important; font-size:13px!important; padding-inline:14px!important; }
body.saas-cases .followup-phase-bar { flex-wrap:wrap!important; overflow:visible!important; padding:0 0 4px!important; gap:6px; }
body.saas-cases .followup-phase-chip { flex:0 0 auto; font-family:inherit!important; font-weight:500!important; font-size:11px!important; padding:6px 8px!important; border:1px solid var(--saas-line)!important; border-radius:5px!important; background:#fff!important; color:#6c7789!important; }
body.saas-cases .followup-phase-chip em { background:#f3f5f8!important; color:#8a95a6!important; font-size:10px; }
body.saas-cases .followup-phase-chip.is-on { border-color:#c8d3ff!important; color:#345be8!important; background:#eef2ff!important; }
body.saas-ui .followup-tabs { gap:5px; padding:3px 0 0!important; border-bottom:1px solid var(--saas-line); background:none!important; border-radius:0!important; }
body.saas-ui .followup-tab { padding:10px 10px!important; border:0!important; border-radius:0!important; background:none!important; color:#7b8697!important; font-size:12px!important; }
body.saas-ui .followup-tab.is-on { color:#345be8!important; box-shadow:inset 0 -2px #345be8!important; }
body.saas-ui .followup-tab em { background:#f0f3f7!important; color:#738094!important; border-radius:4px; font-size:10px; }
body.saas-ui .followup-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0!important; }
body.saas-ui #newCaseBtn { margin-left:auto; order:1; }
.saas-more { position:relative; order:0; }
.saas-more summary { list-style:none; border:1px solid var(--saas-line); color:#647184; background:#fff; padding:8px 11px; border-radius:7px; font-size:12px; cursor:pointer; }
.saas-more summary::-webkit-details-marker { display:none; }
.saas-more-body { position:absolute; top:42px; left:0; z-index:30; padding:7px; width:232px; background:#fff; border:1px solid var(--saas-line); border-radius:9px; box-shadow:0 10px 36px rgba(32,43,61,.12); }
body.saas-ui .saas-more-body .followup-tool-link { display:flex!important; align-items:center; width:100%; min-height:36px; padding:9px 10px!important; line-height:1.5; white-space:normal; text-align:left; border:0!important; margin:0!important; }
body.saas-ui .saas-more-body #hqToolbar { display:block!important; width:100%; }
body.saas-ui .saas-more-body #hqToolbar[style*="none"] { display:none!important; }
body.saas-ui .saas-more-body .followup-tool-link:is([style*="display:none"],[style*="display: none"]) { display:none!important; }
body.saas-ui .saas-more-body .followup-tool-link:hover { background:#f5f7fb!important; }
.saas-agenda { border:1px solid var(--saas-line); background:#fff; border-radius:10px; padding:16px; order:3; }
.saas-agenda-head { display:flex; flex-direction:column; gap:4px; margin-bottom:16px; }
.saas-agenda-head strong { font-size:13px; font-weight:600; }
.saas-agenda-head span { font-size:10px; color:#8b96a6; }
body.saas-ui .followup-cal { padding:0!important; margin:0!important; box-shadow:none!important; background:none!important; border:0!important; }
body.saas-ui .followup-cal-title { font-family:inherit!important; font-size:12px!important; }
body.saas-ui .followup-cal-nav { width:24px!important; height:24px!important; min-height:24px!important; color:#718094!important; border:1px solid var(--saas-line)!important; background:#fff!important; border-radius:5px!important; }
body.saas-ui .followup-cal-cell { border-radius:6px!important; min-height:38px!important; background:none!important; box-shadow:none!important; }
body.saas-ui .followup-cal-num { color:#637184!important; font-size:11px!important; }
body.saas-ui .followup-cal-weekdays { color:#a2abba!important; font-size:9px; }
body.saas-ui .followup-cal-cell.is-today { background:#f0f4ff!important; border-color:#cbd7ff!important; }
body.saas-ui .followup-cal-cell.is-selected { background:#345be8!important; }
body.saas-ui .followup-cal-cell.is-selected .followup-cal-num { color:#fff!important; }
body.saas-ui .followup-cal-count { background:#ecf1ff!important; color:#4564a8!important; font-size:8px!important; border:0!important; }
body.saas-ui .followup-cal-legend { margin:12px 0 0; color:#9aa4b2; font-size:10px; line-height:1.65; }
body.saas-cases .followup-dash { gap:10px!important; }
body.saas-cases .followup-section { border:1px solid var(--saas-line)!important; background:#fff!important; border-radius:10px!important; overflow:hidden; }
body.saas-cases .followup-section-head { padding:14px 16px!important; border-bottom:1px solid var(--saas-line); background:#fcfdff; }
body.saas-cases .followup-section-head :is(h2,strong) { font-family:inherit!important; font-size:13px!important; color:#344257!important; letter-spacing:0!important; }
body.saas-cases .followup-list { border:0!important; background:#fff!important; border-radius:9px!important; box-shadow:none!important; }
body.saas-cases .followup-row { margin:0!important; border:0!important; border-radius:0!important; border-bottom:1px solid #edf0f4!important; background:none!important; padding:15px 16px!important; box-shadow:none!important; }
body.saas-cases .followup-row:hover { background:#fafbfe!important; }
body.saas-cases .followup-row:last-child { border-bottom:0!important; }
body.saas-cases .followup-row-top strong { font-family:inherit!important; color:#283448!important; font-size:15px!important; letter-spacing:0!important; }
body.saas-cases .followup-row-meta { color:#8d97a6!important; font-size:11px!important; margin-top:4px; }
body.saas-cases .followup-row-action { color:#566477!important; font-size:12px!important; line-height:1.55; }
body.saas-cases .followup-row-risk { color:#9e664a!important; background:#fff3eb!important; border:0!important; font-size:9px!important; border-radius:4px!important; padding:3px 6px!important; font-weight:500!important; }
body.saas-cases .followup-row-contacted { margin:0 0 0 14px!important; min-height:30px!important; padding:5px 8px!important; font-size:10px!important; border:1px solid #e2e7ef!important; background:#fff!important; color:#7f8a9b!important; border-radius:5px!important; }
body.saas-cases .followup-row-side { gap:5px; }
body.saas-cases .followup-row-date { color:#8b98aa!important; font-size:10px!important; font-weight:500!important; }
body.saas-cases .followup-row-milestone { font-size:10px!important; padding:3px 0!important; background:none!important; color:#a87858!important; }
body.saas-cases .followup-person-head strong { font-family:inherit!important; font-size:15px!important; letter-spacing:0; }
body.saas-ui .followup-select-bar { color:#344257!important; background:#fff!important; border:1px solid #dce2ee!important; box-shadow:0 8px 30px rgba(32,43,61,.12); }

/* Detail, finance and people reuse the same spacing and controls. */
body.saas-detail .followup-panel,body.saas-ledger .followup-panel { padding:24px!important; }
body.saas-detail .followup-panel-flat { border:0!important; background:transparent!important; padding:0!important; }
body.saas-detail .followup-detail-tabs { margin-bottom:22px!important; }
body.saas-detail .followup-status { border:1px solid var(--saas-line)!important; border-radius:9px!important; background:#fff!important; box-shadow:none!important; padding:16px 18px!important; margin-bottom:20px; }
body.saas-detail .followup-status-text strong { font-family:inherit!important; font-size:15px!important; letter-spacing:0!important; }
body.saas-detail .followup-status-label { color:#8a96a7; font-weight:500; font-size:10px; letter-spacing:0; }
body.saas-detail .followup-compose { background:#fff!important; border:1px solid var(--saas-line)!important; border-radius:10px!important; box-shadow:none!important; padding:20px!important; margin-top:0; }
body.saas-detail .followup-compose>summary { font-size:13px!important; font-weight:600; color:#45546b; }
body.saas-detail .followup-unified-tl { background:#fff; border:1px solid var(--saas-line); border-radius:10px; padding:20px; }
body.saas-detail .followup-notes-head h2 { font-family:inherit!important; color:#536278; font-size:13px!important; font-weight:600; letter-spacing:0; }
body.saas-detail .followup-tl-h strong { color:#7f8ba0!important; font-size:11px; font-weight:500; }
body.saas-detail .followup-tl-title,body.saas-detail .followup-tl-body { font-size:12px!important; color:#526176!important; font-weight:400!important; line-height:1.75; }
body.saas-detail .followup-tl-next { color:#96a0af!important; font-size:11px!important; }
body.saas-detail .followup-tl-kind { color:#73849e!important; font-size:9px!important; background:#f1f4f8!important; }
body.saas-ui .followup-form { gap:16px; }
body.saas-ui .followup-form label { color:#677589!important; font-size:12px!important; }
body.saas-ui .followup-panel h2 { font-size:16px!important; margin-bottom:16px; }
body.saas-ui .ledger-lock-panel { max-width:520px; margin:28px auto; }
body.saas-ui .ledger-period-bar { display:flex; flex-wrap:wrap; gap:10px; padding:16px!important; border:1px solid var(--saas-line); border-radius:9px; background:#fff!important; }
body.saas-ui .ledger-period-bar select { border:1px solid #dfe4eb!important; border-radius:5px!important; min-height:32px; background:#fff!important; color:#566477!important; }
body.saas-ui :is(.ledger-stat,.ledger-metric,.ledger-stat-card) { border:1px solid var(--saas-line)!important; background:#fff!important; border-radius:10px!important; box-shadow:none!important; }
body.saas-ledger .ledger-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
body.saas-ledger .ledger-kpi { background:#fff!important; border:1px solid var(--saas-line)!important; border-radius:8px!important; box-shadow:none!important; padding:16px!important; min-height:110px; }
body.saas-ledger .ledger-kpi strong { font-family:inherit!important; color:#30415a!important; font-size:23px!important; letter-spacing:-.02em; }
body.saas-ledger .ledger-kpi span { color:#7c8b9f!important; font-size:11px!important; font-weight:500; }
body.saas-ledger .ledger-kpi :is(em,i) { color:#9ea9b9!important; font-size:10px!important; }
body.saas-ledger .ledger-kpi:is([data-metric=quote],[data-metric=received],[data-metric=pending]) { order:-2; background:#f7f9fe!important; border-color:#e0e7f8!important; }
body.saas-ledger .ledger-kpi.is-profit { background:#f1f8f5!important; border-color:#deeee6!important; }
body.saas-ledger .ledger-kpi.is-profit strong { color:#24735f!important; }
body.saas-ledger .ledger-case-card { background:#fff!important; border:1px solid var(--saas-line)!important; border-radius:8px!important; box-shadow:none!important; padding:15px!important; }
body.saas-ledger .ledger-case-card strong { font-family:inherit!important; font-size:14px!important; }
body.saas-ui .hub-filter-wrap { padding:14px 16px!important; background:#fff; border:1px solid var(--saas-line); border-radius:9px; }
body.saas-ui .hub-filter-label { color:#8a96a7!important; font-size:10px!important; }
body.saas-ui .hub-filter-btn { background:#fff!important; color:#718095!important; border:1px solid var(--saas-line)!important; min-height:34px!important; border-radius:6px!important; font-size:12px!important; }
body.saas-ui .hub-filter-btn.active { color:#345be8!important; background:#eef2ff!important; border-color:#d2dbff!important; }
body.saas-ui .hub-card { padding:18px!important; text-decoration:none; }
body.saas-ui .hub-card-head strong { font-size:15px!important; }
body.saas-ui .hub-card-meta { color:#7e8a9b!important; font-size:11px!important; }
body.saas-ui .hub-list { display:grid; gap:10px; }
body.saas-ui .hub-remind { background:#fff7ee!important; border:1px solid #f3e3cd!important; border-radius:9px!important; color:#856748!important; }
body.saas-ui :is(.hr-shell,.crm-add-shell) { max-width:1000px!important; width:100%!important; padding:22px!important; }
body.saas-ui .hr-tabs { gap:6px; }
body.saas-ui .hr-tabs button { border-radius:6px!important; font-size:12px!important; background:#fff!important; color:#637185!important; border:1px solid var(--saas-line)!important; }
body.saas-ui .hr-tabs button.on { background:#eef2ff!important; color:#345be8!important; border-color:#d3dcff!important; }
body.saas-ui .hr-card { padding:20px!important; }
body.saas-login .page { max-width:450px!important; padding:70px 26px 30px!important; }
body.saas-login .brand-header { display:flex; align-items:center; gap:13px; padding:0!important; margin-bottom:18px; }
body.saas-login .brand-logo { width:42px!important; height:42px!important; min-height:42px!important; border-radius:10px!important; font-size:22px!important; background:#263750!important; color:#fff!important; box-shadow:none!important; }
body.saas-login .brand-text h1 { color:#253449!important; font-family:inherit!important; font-size:22px!important; letter-spacing:0!important; }
body.saas-login .brand-text p { color:#94a0b2!important; font-size:10px!important; }
body.saas-login .brand-tagline { color:#8794a6!important; font-family:inherit!important; font-size:12px!important; text-align:left!important; letter-spacing:0; }
body.saas-login .brand-login-card { background:#fff!important; border:1px solid var(--saas-line)!important; box-shadow:0 6px 25px rgba(32,43,61,.03)!important; border-radius:12px!important; padding:24px!important; }
body.saas-login .form-group label { color:#6b788c!important; font-size:12px!important; }
body.saas-login :is(.btn-admin,.btn-primary) { background:#345be8!important; color:#fff!important; border-radius:7px!important; box-shadow:none!important; min-height:42px!important; font-size:13px!important; }
body.saas-login .hint { color:#98a2b2!important; font-size:10px!important; line-height:1.6; }
body.saas-login .brand-login-footer .link { color:#77869c!important; font-size:11px!important; }

/* Sales workspace: same type, spacing and hierarchy at touch sizes. */
body.saas-sales-home .home-shell { max-width:740px!important; padding:28px 22px!important; }
body.saas-sales-home .home-main { gap:24px!important; }
body.saas-sales-home .desk-top h1 { font-size:27px!important; color:#253449!important; font-weight:650; }
body.saas-sales-home .desk-avatar { background:#eaf0fc; color:#4e68aa; border-radius:10px; }
body.saas-sales-home .desk-status { background:#fff; border:1px solid var(--saas-line); color:#26364d; border-radius:12px; padding:20px; }
body.saas-sales-home .desk-status-label { font-size:15px; }
body.saas-sales-home .desk-clock { background:#345be8; color:#fff; border-radius:7px; min-height:42px; font-size:13px; }
body.saas-sales-home .desk-clock.is-on { color:#345be8; background:#eef2ff; box-shadow:none; }
body.saas-sales-home .desk-status-links { border-color:#edf0f4; gap:20px; }
body.saas-sales-home .desk-status-links button { color:#7b8799; font-size:12px; }
body.saas-sales-home .desk-label { font-size:12px; color:#7c889b; }
body.saas-sales-home .desk-group { background:#fff; border:1px solid var(--saas-line); border-radius:10px; }
body.saas-sales-home .desk-row { color:#253449; min-height:75px; }
body.saas-sales-home .desk-row-copy strong { font-size:14px; font-weight:600; }
body.saas-sales-home .desk-row-copy small { color:#8b97a8; font-size:11px; }
body.saas-sales-home .desk-lead { background:#f5f7ff; }
body.saas-sales-home .desk-group .desk-row+.desk-row { box-shadow:inset 0 1px #edf0f4; }
/* Production sales homepage keeps its existing hero, clock and tile controls. */
body.saas-sales-home .home-hero { background:#fff!important; border:1px solid var(--saas-line)!important; border-radius:10px!important; box-shadow:none!important; padding:22px!important; }
body.saas-sales-home .home-hero::before,body.saas-sales-home .home-hero::after { display:none!important; }
body.saas-sales-home .home-brand-mark { background:#263750!important; color:#fff!important; border-radius:8px!important; }
body.saas-sales-home .home-brand-text strong,body.saas-sales-home .home-user-info strong { color:var(--saas-ink)!important; font-family:inherit!important; }
body.saas-sales-home :is(.home-brand-text small,.home-greeting,.home-phone) { color:var(--saas-muted)!important; }
body.saas-sales-home .home-avatar { background:#eef2f7!important; border:0!important; color:#526177!important; border-radius:9px!important; }
body.saas-sales-home .home-main { gap:18px!important; }
body.saas-sales-home .home-intro { padding:22px!important; border:1px solid var(--saas-line)!important; border-radius:10px!important; background:#fff!important; box-shadow:none!important; text-align:left; }
body.saas-sales-home .home-intro::before { display:none!important; }
body.saas-sales-home .home-intro h2 { font-family:inherit!important; color:var(--saas-ink)!important; font-size:23px!important; letter-spacing:-.02em; }
body.saas-sales-home .home-intro p { color:#748095!important; font-size:12px!important; line-height:1.7; }
body.saas-sales-home .home-intro-badge { background:#eef2ff!important; color:#4965a0!important; border-color:#dfe6f7!important; }
body.saas-sales-home .home-phases { color:#8490a1!important; }
body.saas-sales-home .hub-work-panel { padding:18px!important; }
body.saas-sales-home .hub-work-panel summary { font-size:14px!important; color:var(--saas-ink)!important; }
body.saas-sales-home .hub-work-bar { margin-top:14px!important; padding:14px!important; border-radius:8px!important; background:#f8fafc!important; }
body.saas-sales-home .hub-work-btn { min-height:38px; border-radius:7px!important; box-shadow:none!important; }
body.saas-sales-home .home-tile { background:#fff!important; border:1px solid var(--saas-line)!important; border-radius:10px!important; box-shadow:none!important; }
body.saas-sales-home .home-tile-body strong { font-family:inherit!important; color:var(--saas-ink)!important; font-weight:600!important; }
body.saas-sales-home .home-tile-body small { color:var(--saas-muted)!important; }
body.saas-sales-home .home-tile-icon { background:#f3f5f8!important; color:#69788d!important; border-radius:8px!important; }
@media (min-width:900px) {
  body.saas-sales-home .home-main { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); align-items:start; }
  body.saas-sales-home .home-actions,body.saas-sales-home .home-growth-card { grid-column:1/-1; }
  body.saas-sales-home .home-actions { display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  body.saas-sales-home .home-actions>.home-tile { min-height:112px; }
  body.saas-sales-home .home-tile-grid { grid-column:1/-1; grid-template-columns:repeat(3,minmax(0,1fr))!important; }
}

@media (min-width:1100px) {
  body.saas-ui:has(.saas-sidebar) { padding-left:218px!important; }
  .saas-sidebar { display:flex; position:fixed; inset:0 auto 0 0; z-index:40; width:218px; padding:28px 16px 18px; background:#f6f7f9; border-right:1px solid #e6e9ef; flex-direction:column; }
  .saas-brand { display:flex; gap:11px; align-items:center; padding:0 5px; text-decoration:none; color:#243249; }
  .saas-brand-mark { display:grid; place-items:center; width:32px; height:32px; border-radius:8px; background:#263750; color:#fff; font-size:17px; }
  .saas-brand strong { display:block; font-size:14px; font-weight:650; }
  .saas-brand small { display:block; color:#98a1af; font-size:9px; margin-top:3px; }
  .saas-workspace { display:flex; gap:7px; align-items:center; padding:12px 10px; margin:28px 0 26px; background:#fff; border:1px solid var(--saas-line); border-radius:7px; color:#69778c; font-size:11px; }
  .saas-workspace-dot { width:6px; height:6px; border-radius:50%; background:#3c8978; }
  .saas-nav-label { color:#a2aaba; padding:0 11px; font-size:10px; margin-bottom:9px; }
  .saas-nav-item { display:flex; align-items:center; gap:10px; min-height:40px; padding:8px 11px; margin-bottom:5px; color:#748095; text-decoration:none; border-radius:6px; font-size:12px; }
  .saas-nav-item svg { width:16px; height:16px; }
  .saas-nav-item:hover { background:#eef0f5; color:#394b66; }
  .saas-nav-item.is-current { background:#e9edf7; color:#3c5a91; font-weight:600; }
  .saas-sidebar-foot { display:flex; gap:10px; align-items:center; margin-top:auto; border-top:1px solid var(--saas-line); padding:17px 5px 0; }
  .saas-account-avatar { display:grid; place-items:center; width:30px; height:30px; border:1px solid #dde3ec; border-radius:8px; color:#7a889e; background:#fff; font-size:12px; }
  .saas-sidebar-foot strong { display:block; color:#728095; font-size:11px; font-weight:500; }
  .saas-sidebar-foot small { display:block; color:#a1abba; font-size:9px; margin-top:2px; }
  .saas-context { display:flex; align-items:center; gap:11px; padding:0 36px; min-height:58px; border-bottom:1px solid var(--saas-line); background:#fff; font-size:11px; color:#8e99aa; }
  .saas-context strong { font-weight:500; color:#69778c; }
  .saas-context-sep { color:#c9d0db; }
  .saas-context-right { margin-left:auto; font-size:10px; color:#a7afbc; }
  body.saas-ui .home-shell { max-width:1200px!important; padding:32px 38px!important; }
  body.saas-dashboard .home-hero { position:absolute; top:10px; right:38px; min-height:38px; z-index:25; margin:0!important; }
  body.saas-dashboard .home-greeting,body.saas-dashboard .home-phone { display:none!important; }
  body.saas-dashboard .home-user-info strong { font-size:11px!important; }
  body.saas-dashboard .home-hero .home-user { gap:8px!important; }
  body.saas-dashboard .home-logout-btn { margin-left:16px; }
  body.saas-dashboard .saas-context-right { display:none; }
  body.saas-dashboard .home-intro { padding-bottom:30px!important; }
  body.saas-dashboard .home-intro h2 { font-size:30px!important; }
  body.saas-dashboard .home-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
  body.saas-dashboard .home-actions>.home-tile { min-height:104px!important; padding:16px!important; }
  body.saas-dashboard #followupBtn,body.saas-dashboard #glanceBtn { grid-column:span 2; min-height:125px!important; }
  body.saas-dashboard #followupBtn .home-tile-body strong,body.saas-dashboard #glanceBtn .home-tile-body strong { font-size:16px!important; }
  body.saas-dashboard .home-actions>.home-tile:not(#followupBtn):not(#glanceBtn) { flex-wrap:wrap!important; }
  body.saas-dashboard .home-actions>.home-tile:not(#followupBtn):not(#glanceBtn) .home-tile-icon { width:26px!important; height:26px!important; min-width:26px!important; }
  body.saas-dashboard .home-tile-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
  body.saas-cases .followup-main { display:grid; grid-template-columns:minmax(0,1fr) 248px; gap:16px 24px; align-items:start; }
  body.saas-cases .followup-main>:not(.saas-agenda) { grid-column:1; }
  body.saas-cases .saas-agenda { grid-column:2; grid-row:1/span 8; order:initial; position:sticky; top:24px; }
  body.saas-cases .followup-cal-cell { min-height:34px!important; }
  body.saas-cases .followup-row { display:flex!important; align-items:center; gap:12px; }
  body.saas-cases .followup-row-link { flex:1; min-width:0; display:flex; }
  body.saas-cases .followup-row-contacted { width:auto!important; flex:0 0 auto; white-space:nowrap; }
  body.saas-detail #main:has(.followup-unified-tl) { display:grid; grid-template-columns:minmax(0,1fr) 390px; gap:20px; align-items:start; }
  body.saas-detail #main:has(.followup-unified-tl)>.followup-detail-tabs,body.saas-detail #main:has(.followup-unified-tl)>.followup-status { grid-column:1/-1; margin:0!important; }
  body.saas-detail #main:has(.followup-unified-tl)>.followup-unified-tl { grid-column:1; min-height:300px; }
  body.saas-detail #main:has(.followup-unified-tl)>.followup-panel-flat { grid-column:2; }
  body.saas-customers .hub-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.saas-sales-customers .home-shell { max-width:1080px!important; }
  body.saas-sales-customers .hub-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:699px) {
  body.saas-ui .home-shell { padding:18px 16px!important; }
  body.saas-ui .crm-add-title strong { font-size:21px!important; }
  body.saas-dashboard .home-intro h2 { font-size:25px!important; }
  body.saas-dashboard .home-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px!important; }
  body.saas-dashboard .home-actions>.home-tile { min-height:132px!important; flex-direction:column!important; align-items:flex-start!important; gap:12px!important; padding:16px!important; }
  body.saas-dashboard .home-actions>.home-tile .home-tile-arrow { position:absolute; top:17px; right:14px; }
  body.saas-dashboard .home-tile-body strong { font-size:13px!important; }
  body.saas-dashboard .home-tile-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  body.saas-dashboard .home-tile-grid .home-tile { min-height:84px!important; padding:13px!important; gap:7px!important; }
  body.saas-dashboard .home-tile-grid .home-tile-body strong { font-size:11px!important; }
  body.saas-dashboard .home-tile-grid .home-tile-body small { font-size:9px!important; line-height:1.45!important; }
  body.saas-dashboard .home-tile-grid .home-tile-icon { display:none!important; }
  body.saas-dashboard .home-tile-grid .saas-entry-arrow { font-size:12px; }
  body.saas-dashboard #followupBadges { right:12px; top:14px; bottom:auto; }
  body.saas-cases .followup-row { padding:13px 12px!important; flex-wrap:wrap; }
  body.saas-cases .followup-row-contacted { margin:8px 0 0!important; width:100%; }
  body.saas-cases .followup-tools { gap:6px; }
  body.saas-cases .saas-agenda { order:3; padding:14px; }
  body.saas-ui .followup-tabs { overflow-x:auto; flex-wrap:nowrap!important; }
  body.saas-ui .followup-tab { white-space:nowrap; padding:10px 8px!important; }
  body.saas-detail .followup-panel,body.saas-ledger .followup-panel { padding:18px!important; }
  body.saas-detail .followup-status { align-items:flex-start; flex-direction:column; gap:13px; }
  body.saas-detail .followup-status-actions { justify-content:flex-start; gap:6px; }
  body.saas-ledger .ledger-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.saas-ui .followup-dialog-body { padding:20px; }
  body.saas-sales-home .home-shell { padding:24px 18px!important; }
  body.saas-ui .hub-card { padding:16px!important; }
}
@media(prefers-reduced-motion:reduce) { body.saas-ui * { transition:none!important; animation:none!important; } }
/* Existing inline visibility and hidden attributes always take precedence. */
body.saas-ui [hidden],body.saas-ui .home-tile[style*="display:none"],body.saas-ui .home-tile[style*="display: none"] { display:none!important; }
