/* Bifrost Ledger Excel Add-in Styles */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #323130;
  background-color: #faf9f8;
}

/* Brand bar. Office already prints the add-in name above the pane, so this
   is a quiet one-line strip: small mark, name, and the build badge on
   non-prod builds. The active-company chip sits directly below it. */
.ms-welcome__header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background-color: #ffffff;
  border-bottom: 1px solid #edebe9;
  color: #1b4965;
}

/* The mark cropped to its artwork (see scripts/render-icons.mjs). Sourced at
   80px so it stays sharp on retina. Root-relative on purpose: assets are
   copied to the site root, and a relative URL here would be resolved as a
   bundled module instead. */
.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: url(assets/mark-80.png) center / contain no-repeat;
}

.ms-welcome__header h1.brand-name {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}

.brand-env:not(:empty) {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff4ce;
  color: #8a5a00;
}

.ms-welcome__main {
  padding: 12px 20px 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Navigation */
.nav-bar {
  display: none;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Five tabs on one row at 320px. Tabs size to their label rather than
   splitting the row evenly, so "Dashboard" gets the room it needs and the
   short labels give it up. Never wraps: a second row of tabs reads as a
   second navigation. */
.nav-btn {
  background: none;
  border: none;
  padding: 11px 4px;
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  color: #323130;
  border-bottom: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-btn:hover {
  background: #edebe9;
  color: #0078d4;
}

.nav-btn.active {
  color: #0078d4;
  border-bottom-color: #0078d4;
  background: white;
}

/* Sub-brand accents, matching the Portal's --color-entries-700 / journal-700.
   Only the active tab is tinted: colouring all three at rest would read as
   three selections. The Ledger tab keeps the default blue, which is already
   the Bifrost Ledger accent. */
.nav-btn--entries.active {
  color: #0e838d;
  border-bottom-color: #13adb9;
}

.nav-btn--journal.active {
  color: #7441ec;
  border-bottom-color: #7441ec;
}

/* Inline line icons (src/ui/icons.ts and the SVGs in taskpane.html). */
.icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -2px;
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Authentication Forms */
.auth-form {
  background: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.auth-form h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #323130;
}

.auth-description {
  margin-bottom: 20px;
  color: #605e5c;
  font-size: 14px;
}

.auth-help {
  margin-top: 24px;
  color: #605e5c;
  font-size: 12px;
  line-height: 1.5;
}

.auth-help-link {
  color: #0078d4;
  overflow-wrap: anywhere;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #323130;
}

.input-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out;
}

.input-group input:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

/* Buttons */
/* One secondary style for every button that is not the primary action:
   outlined, neutral, 32px. `ms-Button--subtle` and `ms-Button--default` are
   the same button. */
.ms-Button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #c8c6c4;
  border-radius: 4px;
  background-color: white;
  color: #323130;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
  margin-right: 8px;
  margin-bottom: 8px;
}

.ms-Button:hover:not(:disabled) {
  background-color: #f3f2f1;
  border-color: #8a8886;
}

.ms-Button:disabled {
  background-color: #f3f2f1;
  border-color: #c8c6c4;
  color: #a19f9d;
  cursor: not-allowed;
}

.ms-Button--primary {
  background-color: #0078d4;
  border-color: #0078d4;
  color: white;
  font-weight: 600;
}

.ms-Button--primary:hover:not(:disabled) {
  background-color: #106ebe;
  border-color: #106ebe;
}

.ms-Button-label {
  display: inline-block;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #605e5c;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #edebe9;
}

.auth-divider span {
  padding: 0 12px;
}

/* SSO Button */
.sso-button {
  width: 100%;
  gap: 8px;
}

.sso-button .ms-Button-label {
  font-weight: 600;
}

/* Messages */
.error-message {
  color: #a4262c;
  background-color: #fde7e9;
  border: 1px solid #a4262c;
  border-radius: 2px;
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 14px;
}

.loading-message {
  color: #0078d4;
  background-color: #deecf9;
  border: 1px solid #0078d4;
  border-radius: 2px;
  padding: 8px 12px;
  margin-top: 12px;
  font-size: 14px;
}

/* Shown only when startup itself failed, so it must not depend on anything. */
.startup-error {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 4px;
  background: #fdf3f4;
  border-left: 3px solid #a4262c;
  font-size: 12px;
  line-height: 1.45;
  color: #323130;
}

.startup-error p {
  margin: 0 0 8px;
}

.startup-error p:last-child {
  margin-bottom: 0;
}

/* Authenticated view — one session card instead of four sparse ones. */
.session-card {
  background: white;
  padding: 14px 16px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}

.session-identity {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.session-email {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #323130;
  overflow-wrap: anywhere;
}

.session-role {
  flex: 0 0 auto;
  font-size: 12px;
  color: #605e5c;
}

/* Key/value facts. The grid keeps the values aligned, which is most of what
   made the old two-line "Status: / License:" block look unfinished. */
.session-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #f3f2f1;
  border-bottom: 1px solid #f3f2f1;
  padding-bottom: 12px;
  font-size: 12px;
  /* Colour is inherited rather than set on dd, so the .status-* classes the
     JS assigns keep winning on specificity. */
  color: #323130;
}

.session-facts dt {
  color: #605e5c;
}

.session-facts dd {
  margin: 0;
  font-weight: 600;
}

.session-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.session-link {
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #0078d4;
  cursor: pointer;
}

.session-link:hover {
  text-decoration: underline;
}

.session-link-sep {
  color: #c8c6c4;
  font-size: 12px;
}

.status-connected {
  color: #107c10;
  font-weight: 600;
}

.status-disconnected {
  color: #a4262c;
  font-weight: 600;
}

.status-active {
  color: #107c10;
  font-weight: 600;
}

.status-expired {
  color: #a4262c;
  font-weight: 600;
}

/* Help Section */
#help-section {
  background: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#help-section h3 {
  margin-top: 0;
  color: #0078d4;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  margin: 0;
}

.formulas-header .ms-Button,
.entries-header .ms-Button,
.aliases-header .ms-Button,
.connection-header .ms-Button {
  margin: 0;
}

#help-section ul {
  margin: 12px 0;
  padding-left: 20px;
}

#help-section li {
  margin: 8px 0;
}

#help-section code {
  background-color: #f8f8f8;
  border: 1px solid #e1dfdd;
  border-radius: 2px;
  padding: 2px 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #0078d4;
}

/* Settings View */
.settings-container {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.settings-container h2 {
  margin: 0;
  padding: 20px;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
  font-size: 18px;
  font-weight: 600;
  color: #323130;
}

.settings-section {
  padding: 20px;
  border-bottom: 1px solid #f3f2f1;
}

.settings-section:last-of-type {
  border-bottom: none;
}

.settings-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #323130;
}

.setting-item {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-item label {
  font-weight: 500;
  color: #323130;
  margin-bottom: 0;
  flex: 1;
}

.setting-item input[type="number"],
.setting-item select {
  width: 120px;
  padding: 6px 8px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 14px;
}

.setting-item input[type="number"]:focus,
.setting-item select:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

/* Toggle Switch */
.toggle-label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 40px;
  height: 20px;
  background: #c8c6c4;
  border-radius: 10px;
  margin-right: 12px;
  transition: background 0.2s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 8px;
  transition: left 0.2s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: #0078d4;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
  left: 22px;
}

.settings-actions {
  padding: 20px;
  background: #f3f2f1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Help View */
.help-container {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.help-container h2 {
  margin: 0;
  padding: 20px;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
  font-size: 18px;
  font-weight: 600;
  color: #323130;
}

.help-section {
  padding: 20px;
  border-bottom: 1px solid #f3f2f1;
}

.help-section:last-child {
  border-bottom: none;
}

.help-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #323130;
}

.help-section h4 {
  margin: 16px 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #0078d4;
}

.help-section p {
  margin: 8px 0;
  color: #605e5c;
  line-height: 1.5;
}

.help-section ul {
  margin: 8px 0;
  padding-left: 20px;
}

.help-section li {
  margin: 4px 0;
  color: #605e5c;
  line-height: 1.5;
}

.help-section code {
  background: #f3f2f1;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #323130;
}

.formula-help {
  background: #f8f8f8;
  padding: 16px;
  border-radius: 4px;
  margin: 12px 0;
}

/* Aliases View */
.aliases-container {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aliases-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
}

.aliases-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #323130;
}

.aliases-description {
  margin: 0;
  padding: 12px 20px;
  font-size: 13px;
  color: #605e5c;
  border-bottom: 1px solid #f3f2f1;
}

.aliases-search-container {
  padding: 12px 20px;
  border-bottom: 1px solid #f3f2f1;
}

.aliases-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 14px;
}

.aliases-search-input:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

.aliases-list {
  padding: 12px 20px 20px;
}

.alias-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid #edebe9;
  border-radius: 4px;
  margin-bottom: 8px;
}

.alias-item:last-child {
  margin-bottom: 0;
}

.alias-name {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #0078d4;
  min-width: 80px;
}

.alias-arrow {
  display: inline-flex;
  color: #a19f9d;
  flex-shrink: 0;
}

.alias-code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  color: #323130;
}

/* Connection — the bottom of the dashboard. */
.connection-section {
  background: white;
  padding: 14px 16px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.connection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.connection-header h3 {
  margin: 0;
  color: #323130;
  font-size: 15px;
  font-weight: 600;
}

.connection-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  margin: 0;
  font-size: 12px;
  color: #323130;
}

.connection-facts dt {
  color: #605e5c;
}

.connection-facts dd {
  margin: 0;
  font-weight: 600;
}

.connection-checking {
  margin: 0;
  font-size: 12px;
  color: #605e5c;
}

.connection-ok {
  color: #107c10;
}

.connection-bad {
  margin: 0;
  font-size: 12px;
  color: #a4262c;
}

.connection-latency {
  font-weight: 400;
  color: #605e5c;
}

.status-build-info {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #f3f2f1;
  font-size: 11px;
  color: #605e5c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f3f2f1;
  border-top: 3px solid #0078d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.notification-success {
  background: #92c353;
}

.notification-error {
  background: #d13438;
}

.notification-warning {
  background: #f7630c;
}

.notification-info {
  background: #0078d4;
}

/* Responsive Design */
@media (max-width: 480px) {
  .nav-btn {
    font-size: 12px;
    padding: 10px 4px;
  }
  
  .settings-actions {
    flex-direction: column;
  }
  
  .settings-actions .ms-Button {
    margin-right: 0;
    width: 100%;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .setting-item input[type="number"],
  .setting-item select {
    width: 100%;
  }
}

/* Accessibility Features */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #0078d4;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
  transition: top 0.3s ease;
}

/* :focus-visible, not :focus: Office focuses the pane when it opens from the
   ribbon, which showed the link over the header for mouse users. */
.skip-link:focus-visible {
  top: 6px;
}

/* Focus indicators */
:root.focus-indicators *:focus {
  outline: 2px solid #0078d4 !important;
  outline-offset: 2px !important;
}

.keyboard-focus {
  outline: 2px solid #0078d4 !important;
  outline-offset: 2px !important;
}

/* High contrast mode */
:root.high-contrast {
  --primary-bg: #000000;
  --primary-text: #ffffff;
  --secondary-bg: #ffffff;
  --secondary-text: #000000;
  --border-color: #ffffff;
  --button-bg: #000080;
  --button-text: #ffffff;
  --error-color: #ff0000;
  --success-color: #00ff00;
}

:root.high-contrast body {
  background: var(--primary-bg);
  color: var(--primary-text);
}

:root.high-contrast .ms-Button {
  background: var(--button-bg);
  color: var(--button-text);
  border-color: var(--border-color);
}

:root.high-contrast .nav-btn:hover,
:root.high-contrast .nav-btn.active {
  background: var(--button-bg);
  color: var(--button-text);
}

:root.high-contrast input,
:root.high-contrast select,
:root.high-contrast textarea {
  background: var(--secondary-bg);
  color: var(--secondary-text);
  border-color: var(--border-color);
}

/* Reduced motion */
:root.reduced-motion *,
:root.reduced-motion *::before,
:root.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Font scaling */
:root[data-font-size="small"] {
  font-size: 12px;
}

:root[data-font-size="large"] {
  font-size: 16px;
}

:root[data-font-size="extra-large"] {
  font-size: 18px;
}

/* Improved button accessibility */
button {
  position: relative;
  min-height: 44px;
  min-width: 44px;
}

button[aria-expanded="true"]::after {
  content: " (expanded)";
  position: absolute;
  left: -9999px;
}

button[aria-expanded="false"]::after {
  content: " (collapsed)";
  position: absolute;
  left: -9999px;
}

/* Enhanced toggle accessibility */
.toggle-label {
  min-height: 44px;
  position: relative;
}

.toggle-label::after {
  content: attr(data-state);
  position: absolute;
  left: -9999px;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider + *::after {
  content: "on";
}

.toggle-label input[type="checkbox"]:not(:checked) + .toggle-slider + *::after {
  content: "off";
}

/* Loading indicator accessibility */
.spinner {
  position: relative;
}

.spinner::after {
  content: "Loading";
  position: absolute;
  left: -9999px;
}

/* Form validation accessibility */
.input-group.error input {
  border-color: #d13438;
  background-color: #fdf2f2;
}

.input-group.error::after {
  content: "Error: " attr(data-error);
  color: #d13438;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

/* Tab navigation improvements */
.nav-btn[aria-selected="true"] {
  font-weight: 600;
}

.nav-btn[aria-selected="true"]::after {
  content: " (current tab)";
  position: absolute;
  left: -9999px;
}

/* Progress bar accessibility */
.progress-bar {
  background: #f3f2f1;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar::after {
  content: attr(aria-valuenow) "% complete";
  position: absolute;
  left: -9999px;
}

.progress-fill {
  background: #0078d4;
  height: 100%;
  width: var(--progress-width, 0%);
  transition: width 0.3s ease;
}

:root.reduced-motion .progress-fill {
  transition: none;
}

/* Enhanced keyboard navigation for settings */
.setting-item:focus-within {
  background: rgba(0, 120, 212, 0.1);
  border-radius: 4px;
  padding: 8px;
  margin: -8px;
}

/* Responsive adjustments */
@media (max-width: 320px) {
  .ms-welcome__main {
    padding: 0 12px 12px;
  }
  
  .auth-form,
  .session-card,
  #help-section {
    padding: 12px;
  }

  /* Maintain minimum touch targets on mobile */
  button, .nav-btn {
    min-height: 48px;
    min-width: 48px;
  }

  /* Five tabs share 320px; a 48px floor each is fine, more is not. */
  .nav-btn {
    min-width: 0;
  }

  /* Text links inside the session card are not touch targets to enlarge. */
  .session-link {
    min-height: 0;
    min-width: 0;
  }
}

/* Print accessibility */
@media print {
  .nav-bar,
  .notification,
  .spinner {
    display: none;
  }

  .sr-only {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    white-space: normal !important;
    font-weight: bold;
  }
}

/* Formula List Styles */
.formulas-list {
  margin-top: 12px;
}

.formulas-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.formula-item {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f3f2f1;
  border-radius: 6px;
  border-left: 3px solid #0078d4;
}

.formula-code {
  display: block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  color: #0078d4;
  word-break: break-all;
  cursor: pointer;
}

.formula-code:hover {
  background: #e1dfdd;
}

.formula-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: #605e5c;
}

.formula-rows-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #797775;
  padding-left: 4px;
}

.formula-rows-hint code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 10px;
  background: #edebe9;
  padding: 1px 4px;
  border-radius: 2px;
  color: #605e5c;
}

.no-formulas {
  color: #605e5c;
  font-style: italic;
  margin: 8px 0;
}

.hint-text {
  color: #797775;
  font-size: 12px;
  margin: 4px 0;
}

.error-text {
  color: #a4262c;
  font-size: 12px;
}

.loading-formulas {
  color: #605e5c;
  font-style: italic;
  padding: 8px 0;
}

/* Setting descriptions */
.setting-description {
  margin: 6px 0 0 28px;
  font-size: 12px;
  color: #605e5c;
  line-height: 1.4;
}

/* Button group */
.button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button-group .ms-Button {
  margin: 0;
}

#sync-formulas-btn {
  padding: 4px 12px;
  font-size: 12px;
}

/* Sync result styles */
.sync-result {
  padding: 16px;
  border-radius: 6px;
  margin-top: 12px;
  line-height: 1.6;
}

.sync-result code {
  display: block;
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 8px 0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  word-break: break-all;
}

.sync-result ol {
  margin: 8px 0;
  padding-left: 20px;
}

.sync-result li {
  margin: 4px 0;
}

.sync-result em {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #605e5c;
}

.sync-success {
  background: #f3f9f1;
  border: 1px solid #92c353;
  color: #107c10;
}

.sync-success code {
  color: #0078d4;
  border: 1px solid #e1dfdd;
}

.sync-error {
  background: #fde7e9;
  border: 1px solid #a4262c;
  color: #a4262c;
}

.sync-info {
  background: #deecf9;
  border: 1px solid #0078d4;
  color: #0078d4;
}

/* Loading Progress Container */
.loading-progress-container {
  background: linear-gradient(135deg, #deecf9 0%, #f0f7ff 100%);
  border: 1px solid #0078d4;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 120, 212, 0.15); }
  50% { box-shadow: 0 4px 16px rgba(0, 120, 212, 0.25); }
}

:root.reduced-motion .loading-progress-container {
  animation: none;
}

.loading-progress-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.loading-progress-icon {
  display: inline-flex;
  color: #0078d4;
  animation: spin 1.5s linear infinite;
}

:root.reduced-motion .loading-progress-icon {
  animation: none;
}

#loading-progress-title {
  font-weight: 600;
  color: #0078d4;
  font-size: 14px;
}

.loading-progress-container .progress-bar {
  background: rgba(255, 255, 255, 0.8);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-progress-container .progress-fill {
  background: linear-gradient(90deg, #0078d4 0%, #106ebe 50%, #0078d4 100%);
  background-size: 200% 100%;
  animation: progressShimmer 1.5s ease-in-out infinite;
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}

@keyframes progressShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

:root.reduced-motion .loading-progress-container .progress-fill {
  animation: none;
  background: #0078d4;
}

.loading-progress-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #605e5c;
}

#loading-progress-status {
  flex: 1;
}

#loading-progress-percent {
  font-weight: 600;
  color: #0078d4;
  min-width: 40px;
  text-align: right;
}

/* Only rendered when the company switcher chip isn't there to name the
   active company — otherwise it's the same word twice. */
.single-company-name {
  display: none;
  margin: 6px 0 0;
  font-size: 12px;
  color: #605e5c;
}

/* Grouped formula list */
.formula-company-group {
  margin-bottom: 16px;
}

.formula-company-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px 6px 0 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.formula-company-header {
  background: #faf9f8;
  border: 1px solid #edebe9;
}

/* The company's short name is identity, not status: a quiet neutral chip. */
.company-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
  background: #f3f2f1;
  color: #605e5c;
}

.company-collapse-icon {
  display: inline-flex;
  margin-left: auto;
  color: #605e5c;
  transition: transform 0.15s ease;
}

.formula-company-header[aria-expanded="true"] .company-collapse-icon {
  transform: rotate(90deg);
}

.company-header-name {
  font-size: 13px;
  font-weight: 600;
  color: #323130;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-formula-count {
  font-size: 11px;
  color: #605e5c;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Marks the group whose formulas run without a prefix: the session's company. */
.company-active-tag {
  font-size: 11px;
  font-weight: 600;
  color: #107c10;
  border: 1px solid #107c10;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.company-prefix-hint {
  font-size: 11px;
  color: #605e5c;
  padding: 6px 10px;
  background: #faf9f8;
  margin-bottom: 4px;
}

.company-prefix-hint code {
  font-weight: 600;
  color: #323130;
  background: #f3f2f1;
  padding: 1px 4px;
  border-radius: 2px;
}

.company-no-shortname-warning {
  font-size: 11px;
  color: #a4262c;
  padding: 6px 10px;
  background: #fde7e9;
  border-left: 3px solid #a4262c;
  margin-bottom: 4px;
}

.formula-card-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Formula search */
.formulas-search-container {
  padding: 0 0 8px 0;
}

.formulas-search-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #8a8886;
  border-radius: 4px;
  background: white;
  color: #323130;
  box-sizing: border-box;
}

.formulas-search-input:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

/* Builder company banner */
.builder-company-banner {
  background: #faf9f8;
  color: #323130;
  padding: 8px 12px;
  margin: 0 0 12px 0;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #edebe9;
}


/* Dashboard Action Grid */
.dashboard-actions {
  background: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.dashboard-actions h3 {
  margin: 0 0 12px 0;
  color: #323130;
  font-size: 15px;
  font-weight: 600;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1px solid #c8c6c4;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  min-width: 0;
}

.action-btn:hover {
  background: #f3f2f1;
  border-color: #8a8886;
}

.action-btn:active {
  background: #edebe9;
}

.action-icon {
  display: inline-flex;
  color: #605e5c;
}

.action-label {
  font-size: 12px;
  color: #323130;
  text-align: center;
}

/* Secondary, destructive, and only present when it applies — not a peer of
   the actions people use every day. */
.action-link {
  display: block;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #a4262c;
  text-decoration: underline;
  cursor: pointer;
}

.action-link:hover {
  color: #751d21;
}

.action-result:not(:empty) {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  background: #f3f9f1;
  border-left: 3px solid #107c10;
  color: #323130;
}

.action-result--error:not(:empty) {
  background: #fdf3f4;
  border-left-color: #a4262c;
}

/* Hardcode scope picker */
.hardcode-scope {
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.hardcode-legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
}

.hardcode-scope label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 13px;
  color: #323130;
  cursor: pointer;
}

.hardcode-all {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #605e5c;
  cursor: pointer;
}

.hardcode-all input {
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.hardcode-preview {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
}

/* Formulas Container */
.formulas-container {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.formulas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
}

.formulas-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #323130;
}

.formulas-browse {
  padding: 12px 20px 20px;
}

.formulas-build {
  padding: 12px 20px 20px;
}

/* Formula Cards */
.formula-card {
  padding: 12px;
  margin-bottom: 10px;
  background: #faf9f8;
  border: 1px solid #edebe9;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.formula-card:hover {
  border-color: #0078d4;
  box-shadow: 0 2px 6px rgba(0, 120, 212, 0.15);
}

.formula-card:focus {
  outline: 2px solid #0078d4;
  outline-offset: 1px;
}

.formula-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.formula-card-name {
  font-weight: 600;
  color: #323130;
  font-size: 14px;
}

.formula-card-fn {
  display: block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: #0078d4;
  margin-bottom: 4px;
}

.formula-card-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #605e5c;
}

.formula-card-reference {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  color: #0078d4;
  text-decoration: underline;
  cursor: pointer;
}

/* Formula Type Badges */
.formula-type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.badge-ledger {
  background: #deecf9;
  color: #0078d4;
}

.badge-budget {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-ar {
  background: #fff3e0;
  color: #e65100;
}

.badge-ap {
  background: #fce4ec;
  color: #c62828;
}

/* Formula Builder */
.builder-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #0078d4;
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 32px;
}

.builder-back-btn:hover {
  text-decoration: underline;
}

.builder-header {
  margin-bottom: 16px;
}

.builder-title {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #323130;
}

.builder-fn-name {
  display: inline-block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  color: #0078d4;
  background: #f3f2f1;
  padding: 2px 6px;
  border-radius: 3px;
}

.builder-desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: #605e5c;
}

.builder-params {
  margin-bottom: 16px;
}

.builder-param-group {
  margin-bottom: 12px;
}

.builder-param-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 4px;
}

.builder-input-wrapper {
  display: flex;
  align-items: stretch;
  position: relative;
}

.builder-arg-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 4px;
  border: 1px solid #c8c6c4;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #f3f2f1;
  color: #605e5c;
  font-size: 11px;
  font-weight: 600;
}

.builder-arg-pos + .builder-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.builder-input-wrapper .builder-input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.builder-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #8a8886;
  border-radius: 3px;
  font-size: 14px;
  box-sizing: border-box;
}

.builder-input:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 1px #0078d4;
}

.builder-input.picking {
  border-color: #0078d4;
  background: #f0f6ff;
}

.builder-input.has-ref {
  background: #f0f6ff;
  font-family: 'Consolas', 'Monaco', monospace;
  color: #0078d4;
  font-weight: 600;
}

.builder-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  border: 1px solid #8a8886;
  border-left: none;
  border-right: none;
  background: #f3f2f1;
  color: #605e5c;
  cursor: pointer;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  flex-shrink: 0;
}

.builder-mode-btn:hover {
  background: #e1dfdd;
  color: #323130;
}

.builder-mode-btn.is-ref {
  background: #f0f6ff;
  color: #0078d4;
}

.builder-ref-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  border: 1px solid #8a8886;
  border-left: none;
  border-radius: 0 3px 3px 0;
  background: #f3f2f1;
  color: #605e5c;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
}

.builder-ref-btn:hover {
  background: #e1dfdd;
  color: #323130;
}

.builder-ref-btn.picking {
  background: #0078d4;
  border-color: #0078d4;
  color: #fff;
}

.builder-date-row {
  display: flex;
  gap: 8px;
}

.builder-date-row .builder-input-wrapper {
  flex: 1;
}

.builder-date-input {
  flex: 1;
}

/* ---- Entries views (customer and vendor formulas) ---- */
.builder-views {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #edebe9;
  border-radius: 4px;
  background: #faf9f8;
}

.evp-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}

.evp-label {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
}

.evp-row .evp-label {
  margin: 0;
}

.evp-value {
  color: #323130;
}

.evp-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  font-size: 13px;
  background: #fff;
}

.evp-new {
  margin-top: 10px;
}

.evp-new summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #0078d4;
}

.evp-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}

.evp-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #605e5c;
}

.evp-new .ms-Button {
  margin-top: 10px;
}

.builder-preview-section {
  margin-bottom: 16px;
}

.builder-preview-slot.is-empty {
  color: #8a8886;
  font-style: italic;
}

.builder-preview-slot.is-active {
  background: #deecf9;
  border-radius: 2px;
  color: #0078d4;
}

.builder-preview {
  display: block;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  background: #f3f2f1;
  padding: 10px 12px;
  border-radius: 4px;
  color: #0078d4;
  word-break: break-all;
  border: 1px solid #edebe9;
}

.builder-actions {
  display: flex;
  gap: 8px;
}

.builder-actions .ms-Button {
  flex: 1;
  margin: 0;
}

/* Inline Confirm Dialog */
.confirm-inline {
  background: #fff8f0;
  border: 1px solid #f7630c;
  border-radius: 6px;
  padding: 16px;
}

.confirm-message {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #323130;
}

.confirm-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.confirm-actions .ms-Button {
  flex: 1;
  margin: 0;
  min-width: 0;
  text-align: center;
}

@media (max-width: 320px) {
  .builder-date-row {
    flex-direction: column;
  }

  .builder-actions {
    flex-direction: column;
  }
}
/* ---- Company Switcher ---- */
.company-switcher {
  position: relative;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 12px;
}

.company-switcher-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #1f2937;
}

.company-switcher-trigger:hover {
  background: #f9fafb;
}

.cs-label {
  font-size: 12px;
  color: #605e5c;
}

.company-switcher-trigger .cs-current {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-trigger .cs-chevron {
  display: inline-flex;
  color: #605e5c;
  transition: transform 0.15s ease;
}

.company-switcher-trigger[aria-expanded="true"] .cs-chevron {
  transform: rotate(180deg);
}

.company-switcher-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
  max-height: 240px;
  overflow-y: auto;
}

.cs-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
}

.cs-item:hover {
  background: #f3f4f6;
}

.cs-item.cs-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.cs-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* "You" and "Client" are context, so they stay quiet. "Demo" keeps its amber:
   it is the warning that formulas run against sample data. */
.cs-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  color: #605e5c;
}

.cs-badge-demo {
  padding: 0 5px;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
}

/* Short-name badge that sits inline with the type badge in the company switcher.
   Distinct from .cs-badge: shortname is identity, type badge is status. */
.cs-erp {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border: 1px solid #c8c6c4;
  border-radius: 3px;
  font-size: 11px;
  color: #323130;
  white-space: nowrap;
}

.cs-shortname {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  background: #f3f2f1;
  color: #605e5c;
  margin-right: 4px;
}

/* Static-mode switcher (single-company users) — visible read-only chip so
   the active company is always in the user's peripheral vision, not just
   when they open a picker. */
.company-switcher--static .cs-static {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
}

/* When the company switcher is the demo type, the chevron and label get
   a subtle yellow tint to reinforce "you are in a sample environment". */
.company-switcher--type-demo .company-switcher-trigger {
  background: linear-gradient(to right, #fffbeb, transparent 40%);
}

.company-switcher--type-demo.company-switcher--static .cs-static {
  background: linear-gradient(to right, #fffbeb, transparent 40%);
}

/* ---- Workbook company (which company this workbook's cells belong to) ---- */
.workbook-company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 6px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 12px;
}

.workbook-company .wc-label {
  color: #605e5c;
}

/* A cell tied the workbook to the company the add-in was on; the line under it says how to change that. */
.workbook-company .wc-note {
  flex-basis: 100%;
  color: #605e5c;
}

.workbook-company .wc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #323130;
}

/* Its cells show an error until the user chooses, so this reads as an error, not a hint. */
.workbook-company--mismatch {
  display: block;
  padding: 10px 12px 4px;
  background: #fde7e9;
  border-bottom: 2px solid #a4262c;
  color: #a4262c;
}

.workbook-company--mismatch .wc-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.workbook-company--mismatch .wc-text {
  color: #323130;
  margin-bottom: 8px;
}

.workbook-company--mismatch .wc-btn {
  font-size: 12px;
}

/* ---- Demo banner (bifrost-demo-banner) ---- */
.bifrost-demo-banner {
  background: #fef3c7;
  color: #92400e;
  padding: 10px 14px;
  font-size: 12px;
  border-bottom: 2px solid #f59e0b;
}

.bifrost-demo-banner__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.bifrost-demo-banner__tip {
  font-size: 11px;
  color: #78350f;
  font-weight: 400;
}

.bifrost-demo-banner__tip code {
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-weight: 600;
}

.bifrost-demo-banner__sample-btn {
  display: block;
  margin: 8px auto;
  min-height: 32px;
  padding: 0 12px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.bifrost-demo-banner__sample-btn:hover {
  background: #d97706;
}

/* Industry tint on the demo banner. The five industries match the
   defaultFormulaService.ts industry templates. */
.bifrost-demo-banner.industry-consulting { background: #eff6ff; color: #1e40af; border-bottom-color: #3b82f6; }
.bifrost-demo-banner.industry-consulting .bifrost-demo-banner__tip { color: #1e3a8a; }
.bifrost-demo-banner.industry-consulting .bifrost-demo-banner__tip code { background: rgba(59, 130, 246, 0.15); }
.bifrost-demo-banner.industry-consulting .bifrost-demo-banner__sample-btn { background: #3b82f6; }
.bifrost-demo-banner.industry-consulting .bifrost-demo-banner__sample-btn:hover { background: #2563eb; }

.bifrost-demo-banner.industry-healthcare { background: #f0fdfa; color: #0f766e; border-bottom-color: #14b8a6; }
.bifrost-demo-banner.industry-healthcare .bifrost-demo-banner__tip { color: #134e4a; }
.bifrost-demo-banner.industry-healthcare .bifrost-demo-banner__tip code { background: rgba(20, 184, 166, 0.15); }
.bifrost-demo-banner.industry-healthcare .bifrost-demo-banner__sample-btn { background: #14b8a6; }
.bifrost-demo-banner.industry-healthcare .bifrost-demo-banner__sample-btn:hover { background: #0d9488; }

.bifrost-demo-banner.industry-manufacturing { background: #f8fafc; color: #334155; border-bottom-color: #64748b; }
.bifrost-demo-banner.industry-manufacturing .bifrost-demo-banner__tip { color: #1e293b; }
.bifrost-demo-banner.industry-manufacturing .bifrost-demo-banner__tip code { background: rgba(100, 116, 139, 0.15); }
.bifrost-demo-banner.industry-manufacturing .bifrost-demo-banner__sample-btn { background: #64748b; }
.bifrost-demo-banner.industry-manufacturing .bifrost-demo-banner__sample-btn:hover { background: #475569; }

.bifrost-demo-banner.industry-retail { background: #faf5ff; color: #6b21a8; border-bottom-color: #a855f7; }
.bifrost-demo-banner.industry-retail .bifrost-demo-banner__tip { color: #581c87; }
.bifrost-demo-banner.industry-retail .bifrost-demo-banner__tip code { background: rgba(168, 85, 247, 0.15); }
.bifrost-demo-banner.industry-retail .bifrost-demo-banner__sample-btn { background: #a855f7; }
.bifrost-demo-banner.industry-retail .bifrost-demo-banner__sample-btn:hover { background: #9333ea; }

/* insurance keeps the default amber */

/* ---- Formula tab: demo company group + copy button ---- */

/* The header row carries the same modifier class; only the chip is tinted. */
.company-badge.company-badge-demo {
  background: #fef3c7;
  color: #92400e;
}

/* Per formula, because a demo session lists demo formulas under the home
   company's own group, where the group header says nothing about it. */
.formula-multi-company {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  font-size: 11px;
  color: #605e5c;
}

.formula-demo-badge {
  font-size: 10px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
}

/* Per-card Copy button — small, unobtrusive, inline with the formula name. */
.formula-card-copy {
  margin-left: auto;
  padding: 2px 8px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.formula-card-copy:hover:not(:disabled) {
  background: #e5e7eb;
  color: #111827;
}

.formula-card-copy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Prefix explainer — collapsible, sits inside the prefix hint block. */
.company-prefix-explainer {
  margin-top: 6px;
  font-size: 11px;
}

.company-prefix-explainer summary {
  cursor: pointer;
  color: #4b5563;
  font-weight: 600;
  user-select: none;
}

.company-prefix-explainer summary:hover {
  color: #1f2937;
}

.company-prefix-explainer p {
  margin: 6px 0 0;
  color: #4b5563;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   Bifrost Entries — drill from the cell holding the number.
   Follows the aliases panel's card/header/description structure so the pane
   does not gain a fourth layout for a third list-ish view.
   --------------------------------------------------------------------------- */

.entries-container {
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.entries-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f3f2f1;
  border-bottom: 1px solid #edebe9;
}

.entries-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #323130;
}

.entries-description {
  margin: 0;
  padding: 12px 20px;
  font-size: 13px;
  color: #605e5c;
  border-bottom: 1px solid #f3f2f1;
}

.entries-empty {
  padding: 24px 20px;
  font-size: 13px;
  color: #a19f9d;
  text-align: center;
}

.entries-detail {
  padding: 16px 20px 20px;
}

.entries-source {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.entries-source-label {
  font-size: 12px;
  color: #605e5c;
}

/* Formulas wrap rather than scroll: a truncated call hides exactly the
   arguments the user is checking before they click. */
.entries-formula {
  display: block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-all;
  background: #f8f8f7;
  border: 1px solid #edebe9;
  border-radius: 3px;
  padding: 6px 8px;
  color: #323130;
}

.entries-formula--target {
  background: #effcfd;
  border-color: #13adb9;
  color: #0e838d;
}

.entries-arrow {
  display: flex;
  justify-content: center;
  color: #13adb9;
  margin: 6px 0;
}

.entries-target-label {
  display: block;
  margin: 16px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
}

.entries-target-select {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.entries-insert-btn {
  width: 100%;
  margin-top: 12px;
}

.entries-result {
  margin: 12px 0 0;
  font-size: 12px;
  color: #0e838d;
}

.entries-result--error {
  color: #a4262c;
}

/* Bifrost Entries catalogue — the tab's resting state. */
.entries-catalogue {
  padding: 0 20px 20px;
}

.entries-catalogue-hint {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #605e5c;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entries-item {
  display: block;
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid #edebe9;
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.entries-item:hover {
  background: #effcfd;
}

.entries-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #323130;
}

/* Wraps rather than truncates: the argument list is the useful part. */
.entries-item-call {
  display: block;
  margin-top: 2px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #0e838d;
  word-break: break-all;
}


/*# sourceMappingURL=taskpane.css.map*/