/* Shared BTL workspace language for editor / intake / office / ECA / accounting.
   Maps leftover module-specific parents onto the same Fluent list-page chrome. */

body.btl-shell .page-content .page-title h1,
body.doc-fill-active .page-title h1,
body.intake-shell .page-title h1,
body.eca-shell .page-title h1,
body.acc-shell .page-title h1,
body.office-cu-mode .page-title h1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Document editor --- */
body.doc-fill-active .dfe-side {
  background: #fff;
  border: 1px solid var(--line, #dde5ea);
  border-radius: var(--radius-md, 8px);
  margin: 10px;
}
body.doc-fill-active .dfe-stage {
  background: #fff;
  border: 1px solid var(--line, #dde5ea);
  border-radius: var(--radius-md, 8px);
  margin: 10px 10px 10px 0;
  min-width: 0;
}
body.doc-fill-active .dfe-studio-canvas {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #dce3eb !important;
}
body.doc-fill-active .dfe-studio .dfe-drop {
  border-radius: 14px !important;
  border-color: #9bb6d4 !important;
  background:
    radial-gradient(circle at 18px 18px, #d7e2f0 1px, transparent 1.5px) 0 0 / 22px 22px, #f7fbff !important;
}
body.doc-fill-active .dfe-pages-head,
body.doc-fill-active .dfe-pages-foot {
  background: #fff;
  border-color: var(--line, #dde5ea);
}

/* --- Office embed sits inside a BTL panel --- */
.office-btl-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.office-btl-shell .page-title { display: none !important; }
.office-embed-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.office-embed-panel .panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.office-btl-shell .office-embed-shell,
.office-btl-shell .office-embed-frame-wrap,
.office-btl-shell .office-embed-frame {
  flex: 1;
  min-height: 0;
  height: 100%;
  border: 0;
  background: #fff;
}
.office-embed-loader-card {
  border-radius: var(--radius-md, 8px) !important;
  border: 1px solid var(--line, #dde5ea);
  background: #fff;
  color: var(--text-dark, #243842);
  box-shadow: none;
}

/* --- Intake --- */
body.intake-shell main.page-content {
  background: var(--bg-primary, #f0f3f4) !important;
}
.intake-app { max-width: none; margin: 0; padding: 0 0 24px; color: var(--text, #334955); }
.intake-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line, #dde5ea);
}
.intake-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #5f7380);
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  font: 600 13px inherit;
  cursor: pointer;
}
.intake-tabs button.is-on {
  background: #fff;
  color: var(--btl-blue-dark, #15658a);
  border-color: var(--line, #dde5ea);
  border-bottom-color: #fff;
}
.intake-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.intake-workspace-tabs button {
  min-width: 210px;
  border: 1px solid var(--line, #dde5ea);
  background: #fff;
  color: var(--text, #334955);
  border-radius: 8px;
  padding: 11px 16px;
  font: 800 14px inherit;
  cursor: pointer;
}
.intake-workspace-tabs button.is-on {
  background: var(--btl-blue-dark, #15658a);
  color: #fff;
  border-color: var(--btl-blue-dark, #15658a);
}
.intake-grid { display: grid; gap: 14px; }
.intake-desk { display: grid; grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); gap: 14px; }
.intake-inbox-item {
  width: 100%;
  text-align: right;
  border: 0;
  border-bottom: 1px solid var(--line, #dde5ea);
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  color: inherit;
}
.intake-inbox-item.is-active,
.intake-inbox-item:hover { background: var(--surface-blue, #f1f7fa); }
.intake-btn,
.intake-btn.ghost,
.intake-btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--soft-radius-sm, 8px);
  font: 600 13px inherit;
  cursor: pointer;
}
.intake-btn.primary,
.intake-btn.primary:hover {
  background: var(--btl-blue, #1a739c) !important;
  color: #fff !important;
  border: 1px solid var(--btl-blue, #1a739c) !important;
}
.intake-btn,
.intake-btn.ghost {
  background: #fff !important;
  color: var(--btl-blue, #1a739c) !important;
  border: 1px solid var(--btl-blue, #1a739c) !important;
}

/* --- ECA / Accounting leftover parents --- */
body.eca-shell .eca-hero-card,
body.eca-shell .eca-panel,
body.eca-shell .eca-summary-card,
body.eca-shell .eca-case-card,
body.acc-shell .acc-sheet,
body.acc-shell .acc-dossier {
  background: #fff;
  border: 1px solid var(--line, #dde5ea);
  border-radius: var(--radius-md, 8px);
  box-shadow: none;
  color: var(--text, #334955);
}
body.eca-shell .eca-hero-title h2,
body.eca-shell .eca-detail-title h2 {
  font: 700 22px var(--heading, inherit);
  color: var(--text-dark, #243842);
}
body.eca-shell .eca-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
body.eca-shell .eca-table,
body.acc-shell .acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: right;
}
body.eca-shell .eca-table th,
body.acc-shell .acc-table th {
  background: #f5f5f5;
  height: 44px;
  padding: 10px 12px;
  font-weight: 650;
  color: var(--text-dark, #243842);
}
body.eca-shell .eca-table td,
body.acc-shell .acc-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line, #dde5ea);
}
body.eca-shell .eca-table tr:hover,
body.acc-shell .acc-table tr:hover { background: #f5f5f5; }
body.eca-shell .eca-toolbar,
body.acc-shell .acc-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line, #dde5ea);
  border-radius: var(--radius-md, 8px);
  margin-bottom: 14px;
}
body.eca-shell .eca-search-input,
body.eca-shell .eca-select,
body.acc-shell .acc-select,
body.acc-shell .acc-search input {
  min-height: 34px;
  border: 1px solid var(--line, #dde5ea);
  border-radius: 8px;
  padding: 6px 10px;
  font: 13px inherit;
  background: #fff;
}
body.eca-shell .eca-status,
body.acc-shell .acc-status,
body.acc-shell .acc-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
body.acc-shell .acc-btn,
body.acc-shell .acc-btn-brass,
body.acc-shell .acc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--soft-radius-sm, 8px);
  font: 600 13px inherit;
  cursor: pointer;
  box-shadow: none !important;
}
body.acc-shell .acc-btn-primary,
body.acc-shell .acc-btn-brass {
  background: var(--btl-blue, #1a739c) !important;
  color: #fff !important;
  border: 1px solid var(--btl-blue, #1a739c) !important;
}
body.acc-shell .acc-btn {
  background: #fff !important;
  color: var(--btl-blue, #1a739c) !important;
  border: 1px solid var(--btl-blue, #1a739c) !important;
}
body.acc-shell,
body.acc-shell h1, body.acc-shell h2, body.acc-shell h3,
body.eca-shell,
body.intake-shell {
  font-family: var(--font, "Segoe UI Variable Text", "Segoe UI", Tahoma, Arial, sans-serif) !important;
}
body.acc-shell main.page-content {
  background: var(--bg-primary, #f0f3f4) !important;
}
body.acc-shell .kpi-card .acc-kpi-label,
body.acc-shell .kpi-card .kpi-title { font-size: 12px; color: var(--muted, #5f7380); }
body.acc-shell .kpi-card .acc-kpi-value,
body.acc-shell .kpi-card .kpi-value { display: block; margin-top: 8px; font: 700 22px var(--heading, inherit); color: var(--text-dark, #243842); }
body.acc-shell .acc-inline-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
body.acc-shell .acc-inline-stat {
  background: #fff;
  border: 1px solid var(--line, #dde5ea);
  border-radius: 8px;
  padding: 12px 14px;
}
body.acc-shell .acc-sheet { padding: 0; overflow: hidden; }
body.acc-shell .acc-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface-blue, #f1f7fa);
  border-bottom: 1px solid var(--line, #dde5ea);
}
body.eca-shell .panel,
body.acc-shell .panel,
body.intake-shell .panel,
.dfe-btl-page .panel {
  overflow: hidden;
  padding: 0;
}
body.eca-shell .panel > .panel-title,
body.eca-shell .panel > .eca-section-head,
body.eca-shell .panel > .eca-detail-head,
body.acc-shell .panel > .panel-title,
body.intake-shell .panel > .panel-title,
.dfe-btl-page .panel > .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  min-height: 38px;
  margin: 0;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--surface-blue, #f1f7fa), #fbfcfd);
  border-bottom: 1px solid var(--line, #dde5ea);
  box-sizing: border-box;
}
body.eca-shell .panel > .eca-section-head h3,
body.eca-shell .panel > .eca-detail-head h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
body.eca-shell .panel > .eca-section-head .eca-note,
body.eca-shell .panel > .eca-detail-head .eca-note {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted, #5f7380);
  font-size: 12px;
  line-height: 1.4;
}
body.eca-shell .panel > .table-container,
body.eca-shell .panel > .eca-list,
body.eca-shell .panel > .empty-state-block,
body.eca-shell .panel > .panel-content {
  padding: 0;
}
body.eca-shell .panel > .empty-state-block {
  padding: 16px 14px;
}
body.intake-shell .intake-hero { display: none !important; }
body.office-cu-mode #view-tasks.office-desk-host {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.filter-bar fluent-field,
.filter-panel-look fluent-field,
.eca-toolbar fluent-field,
body.eca-shell fluent-field.field {
  outline: none !important;
  box-shadow: none !important;
}
.filter-bar fluent-field:focus,
.filter-bar fluent-field:focus-visible,
.filter-bar fluent-field:focus-within,
.filter-panel-look fluent-field:focus-within,
body.eca-shell fluent-field.field:focus-within {
  outline: none !important;
  box-shadow: none !important;
}
.filter-bar input:focus,
.filter-bar input:focus-visible,
.eca-search-input:focus,
.eca-search-input:focus-visible,
.filter-panel-look input:focus,
.filter-panel-look input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--btl-blue, #1a739c);
}

#acc-modal-host .acc-modal-band,
#acc-modal-host .acc-modal-band h1,
#acc-modal-host .acc-modal-band h2,
#acc-modal-host .acc-modal-band h3,
#acc-modal-host .acc-modal-band h4,
#acc-modal-host .acc-modal-band h3 * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#acc-modal-host .acc-modal-kicker,
#acc-modal-host .acc-modal-kicker * {
  color: #f3e6c2 !important;
  -webkit-text-fill-color: #f3e6c2 !important;
}
#eca-desktop-sync-banner {
  display: none !important;
}
