/* Digital Invoicing WorkBench — restrained application UI */
:root {
  --ui-bg: #f4f3ef;
  --ui-surface: #ffffff;
  --ui-surface-muted: #f8f7f4;
  --ui-ink: #242824;
  --ui-muted: #6c716b;
  --ui-border: #d9d8d2;
  --ui-border-strong: #c6c7c0;
  --ui-header: #222a25;
  --ui-header-border: #39423c;
  --ui-primary: #356348;
  --ui-primary-hover: #294f39;
  --ui-primary-soft: #edf4ef;
  --ui-danger: #a63d3d;
  --ui-warning: #8a6118;
  --ui-success: #2f6a46;
  --ui-info: #52635a;
  --ui-radius: 8px;
  --ui-focus: 0 0 0 3px rgba(53, 99, 72, 0.18);
  --bs-primary: #356348;
  --bs-primary-rgb: 53, 99, 72;
  --bs-link-color: #315c43;
  --bs-link-hover-color: #234632;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ui-bg);
}

body,
button,
input,
select,
textarea {
  font-family: "Outfit", sans-serif;
}

body.app-shell,
.app-shell.bg-light {
  min-height: 100vh;
  margin: 0;
  color: var(--ui-ink);
  background: var(--ui-bg) !important;
}

a {
  color: var(--ui-primary);
}

a:hover {
  color: var(--ui-primary-hover);
}

/* Application header */
.enterprise-header {
  background: var(--ui-header);
  border-bottom: 1px solid var(--ui-header-border);
}

.enterprise-header .navbar {
  min-height: 64px;
  padding: 0;
}

.enterprise-header .navbar > .container-fluid,
.app-shell .app-main > .container-fluid,
footer.app-footer > .container-fluid {
  width: 100%;
  max-width: 1440px;
  margin-right: auto;
  margin-left: auto;
}

.enterprise-header .navbar > .container-fluid {
  gap: 16px;
}

.enterprise-brand {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  margin-right: 18px;
  color: #fff;
  line-height: 1.15;
  text-decoration: none;
}

.enterprise-brand:hover,
.enterprise-brand:focus {
  color: #fff;
}

.enterprise-brand strong {
  font-size: 0.94rem;
  font-weight: 650;
  white-space: nowrap;
}

.enterprise-brand span {
  margin-top: 3px;
  color: #aeb7b0;
  font-size: 0.7rem;
  font-weight: 400;
}

.enterprise-header .navbar-collapse {
  align-items: stretch;
  min-width: 0;
}

.enterprise-header .navbar-nav {
  gap: 2px;
  align-items: stretch;
}

.enterprise-header .nav-item {
  display: flex;
}

.enterprise-header .nav-link {
  display: flex;
  align-items: center;
  padding: 0 12px !important;
  border-bottom: 2px solid transparent;
  color: #c9d0cb !important;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

.enterprise-header .nav-link:hover,
.enterprise-header .nav-link:focus {
  color: #fff !important;
}

.enterprise-header .nav-link.active {
  border-bottom-color: #8faf99;
  color: #fff !important;
}

.enterprise-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-user-under {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8ddd9;
  font-size: 0.78rem;
  white-space: nowrap;
}

.nav-user-under form,
.enterprise-header form {
  margin: 0;
}

.nav-user-name {
  max-width: 190px;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
}

.nav-account-link {
  color: inherit;
  text-decoration: none;
}

.nav-account-link:hover,
.nav-account-link:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-user-under .btn {
  padding: 4px 9px;
  border-color: #657169;
  border-radius: 6px;
  color: #eef1ef;
  font-size: 0.75rem;
}

.nav-user-under .btn:hover,
.nav-user-under .btn:focus {
  border-color: #eef1ef;
  background: #eef1ef;
  color: var(--ui-header);
}

.enterprise-header .navbar-toggler {
  padding: 5px 8px;
  border-color: #59645d;
  border-radius: 6px;
  box-shadow: none;
}

/* Page structure */
.app-main {
  min-height: calc(100vh - 122px);
  padding-bottom: 28px;
}

.app-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--ui-border);
}

.app-page-header h1,
.app-page-header .app-page-title {
  margin: 0;
  color: var(--ui-ink);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.app-page-subtitle {
  margin: 5px 0 0;
  color: var(--ui-muted);
  font-size: 0.9rem;
}

.app-page-subtitle strong {
  color: #444a45;
  font-weight: 600;
}

.app-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.app-page-header + .alert,
.app-page-header + .alert + .alert,
.app-page-header + form,
.app-page-header + section,
.app-page-header + .row {
  margin-top: 18px;
}

/* Buttons */
.btn {
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 7px;
  font-weight: 550;
  line-height: 1.35;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-sm {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.btn-primary {
  --bs-btn-bg: var(--ui-primary);
  --bs-btn-border-color: var(--ui-primary);
  --bs-btn-hover-bg: var(--ui-primary-hover);
  --bs-btn-hover-border-color: var(--ui-primary-hover);
  --bs-btn-active-bg: var(--ui-primary-hover);
  --bs-btn-active-border-color: var(--ui-primary-hover);
  --bs-btn-disabled-bg: #789080;
  --bs-btn-disabled-border-color: #789080;
}

.btn-outline-primary {
  --bs-btn-color: var(--ui-primary);
  --bs-btn-border-color: #789080;
  --bs-btn-hover-bg: var(--ui-primary);
  --bs-btn-hover-border-color: var(--ui-primary);
  --bs-btn-active-bg: var(--ui-primary-hover);
  --bs-btn-active-border-color: var(--ui-primary-hover);
}

.btn-outline-secondary {
  --bs-btn-color: #4f554f;
  --bs-btn-border-color: #aeb1aa;
  --bs-btn-hover-bg: #ecece8;
  --bs-btn-hover-border-color: #8c918b;
  --bs-btn-hover-color: #292d29;
  --bs-btn-active-bg: #e2e2dd;
  --bs-btn-active-border-color: #8c918b;
  --bs-btn-active-color: #292d29;
}

.btn-outline-danger {
  --bs-btn-color: var(--ui-danger);
  --bs-btn-border-color: #c88989;
  --bs-btn-hover-bg: var(--ui-danger);
  --bs-btn-hover-border-color: var(--ui-danger);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
a:focus-visible {
  border-color: var(--ui-primary);
  box-shadow: var(--ui-focus);
  outline: 0;
}

/* Cards and sections */
.app-card {
  overflow: hidden;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: 0 2px 6px rgba(31, 36, 32, 0.04);
}

.app-card .app-card-header,
.app-card .card-header {
  min-height: 48px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
  color: #343934;
  font-size: 0.92rem;
  font-weight: 600;
}

.app-card .app-card-body,
.app-card .card-body {
  padding: 18px;
}

.app-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
}

.filter-card {
  margin-bottom: 14px;
  box-shadow: none;
}

.filter-card .app-card-body {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Dashboard and detail summaries */
.summary-strip,
.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
  overflow: hidden;
  margin-top: 18px;
  margin-bottom: 20px !important;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
}

.account-grid {
  margin-top: 18px;
}

.summary-strip > div,
.detail-summary > div {
  width: auto;
  padding: 0;
}

.app-kpi {
  display: block;
  height: 100%;
  min-height: 116px;
  padding: 17px 18px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  color: inherit;
  text-decoration: none;
}

.summary-strip .app-kpi,
.detail-summary .app-kpi {
  border: 0;
  border-right: 1px solid var(--ui-border);
  border-radius: 0;
}

.summary-strip > div:last-child .app-kpi,
.detail-summary > div:last-child .app-kpi {
  border-right: 0;
}

a.app-kpi:hover,
a.app-kpi:focus {
  background: #fafbf9;
  color: inherit;
}

.app-kpi .kpi-label {
  margin-bottom: 7px;
  color: var(--ui-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.app-kpi .kpi-value {
  color: #282d29;
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.app-kpi .kpi-hint {
  margin-top: 7px;
  color: #858983;
  font-size: 0.76rem;
}

.app-kpi.tone-warning .kpi-value { color: var(--ui-warning); }
.app-kpi.tone-danger .kpi-value { color: var(--ui-danger); }
.app-kpi.tone-success .kpi-value { color: var(--ui-success); }
.app-kpi.tone-info .kpi-value { color: var(--ui-info); }
.app-kpi.tone-primary .kpi-value { color: var(--ui-primary); }

.kpi-value-money {
  font-size: clamp(1.15rem, 2vw, 1.5rem) !important;
  overflow-wrap: anywhere;
}

.detail-value {
  color: #282d29;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.detail-code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

/* Dashboard command center */
.dashboard-main {
  background: var(--ui-bg);
}

.dashboard-page-header {
  padding-top: 34px;
  border-bottom-color: var(--ui-border-strong);
}

.dashboard-page-header h1 {
  max-width: 780px;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.page-eyebrow,
.section-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--ui-primary);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px !important;
  padding: 14px 18px !important;
}

.dashboard-section-header h2 {
  margin: 0;
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.dashboard-section-header .section-kicker {
  margin-bottom: 3px;
  font-size: 0.62rem;
}

.text-link {
  flex: 0 0 auto;
  color: var(--ui-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workflow-list,
.control-list {
  display: grid;
}

.workflow-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 84px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-ink);
  text-decoration: none;
}

.workflow-row:last-child,
.control-row:last-child {
  border-bottom: 0;
}

.workflow-row:hover,
.workflow-row:focus,
.control-row:hover,
.control-row:focus,
.pipeline-grid a:hover,
.pipeline-grid a:focus {
  background: #f7f8f5;
  color: var(--ui-ink);
}

.workflow-index {
  color: #989c96;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
}

.workflow-copy,
.control-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.workflow-copy strong,
.control-row strong {
  color: #303530;
  font-size: 0.9rem;
  font-weight: 600;
}

.workflow-copy small,
.control-row small {
  color: var(--ui-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.workflow-action {
  color: var(--ui-primary);
  font-size: 0.77rem;
  font-weight: 600;
}

.control-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-ink);
  text-decoration: none;
}

.control-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d5ded7;
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

.control-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.control-arrow {
  color: #939790;
  font-size: 1rem;
}

.pipeline-card {
  margin-bottom: 18px;
}

.section-note {
  color: var(--ui-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pipeline-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 14px 18px;
  border-right: 1px solid var(--ui-border);
  color: var(--ui-ink);
  text-decoration: none;
}

.pipeline-grid a:last-child {
  border-right: 0;
}

.pipeline-grid strong {
  color: #2b302c;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.pipeline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-muted);
  font-size: 0.8rem;
}

.pipeline-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ui-info);
}

.pipeline-dot.is-warning { background: var(--ui-warning); }
.pipeline-dot.is-info { background: var(--ui-info); }
.pipeline-dot.is-success { background: var(--ui-success); }
.pipeline-dot.is-danger { background: var(--ui-danger); }

.recent-invoices-card {
  margin-bottom: 20px;
}

/* Forms */
.form-label {
  margin-bottom: 5px;
  color: #454a45;
  font-size: 0.84rem;
  font-weight: 550;
}

.form-control,
.form-select {
  min-height: 42px;
  border-color: var(--ui-border-strong);
  border-radius: 7px;
  background-color: #fff;
  color: var(--ui-ink);
  font-size: 0.92rem;
}

.form-control::placeholder {
  color: #9a9d98;
}

.form-control[readonly],
.company-form .form-control[readonly] {
  border-color: #dedfd9;
  background: #f1f1ed;
  color: #5d625d;
}

.form-text {
  margin-top: 5px;
  color: #7a7e79;
  font-size: 0.76rem;
}

.form-check-input:checked {
  border-color: var(--ui-primary);
  background-color: var(--ui-primary);
}

.token-status {
  font-weight: 500;
}

.invoice-item {
  padding: 16px;
  border: 1px solid var(--ui-border);
  border-radius: 7px;
  background: #fbfbf9;
}

.invoice-item + .invoice-item {
  margin-top: 14px;
}

.invoice-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6e6e1;
  color: #343934;
}

/* Tables */
.app-table-wrap,
.table-responsive {
  overflow-x: auto;
}

.app-table {
  margin-bottom: 0;
  vertical-align: middle;
}

.app-table thead th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--ui-border-strong);
  background: #f1f1ed;
  color: #565b55;
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.app-table tbody td {
  padding: 12px 14px;
  border-color: #e8e8e3;
  color: #373c37;
  font-size: 0.88rem;
}

.app-table tbody tr:hover > * {
  background: #fafaf7;
}

.app-table .amount {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table-note {
  max-width: 220px;
  margin-top: 3px;
  color: #7b807a;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.company-actions,
.fbr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.company-actions form,
.fbr-actions form {
  margin: 0;
}

.app-empty-state {
  padding: 38px 20px !important;
  color: var(--ui-muted) !important;
  text-align: center;
}

/* Functional statuses */
.badge,
.app-status-badge {
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0;
}

.text-bg-success {
  border-color: #b8d1bf !important;
  background: #eaf3ec !important;
  color: #245338 !important;
}

.text-bg-warning {
  border-color: #dfcb9e !important;
  background: #f8f0dc !important;
  color: #765115 !important;
}

.text-bg-danger {
  border-color: #e1baba !important;
  background: #f8eaea !important;
  color: #873434 !important;
}

.text-bg-info,
.text-bg-secondary {
  border-color: #c7cec9 !important;
  background: #edf0ed !important;
  color: #46544b !important;
}

.text-bg-light {
  border-color: #d9dad5 !important;
  background: #f5f5f2 !important;
  color: #5e625d !important;
}

.alert {
  padding: 11px 14px;
  border-width: 1px;
  border-radius: 7px;
  font-size: 0.88rem;
}

.alert-success {
  border-color: #b8d1bf;
  background: #edf5ef;
  color: #28583c;
}

.alert-warning {
  border-color: #dfcb9e;
  background: #faf3e2;
  color: #74521a;
}

.alert-danger {
  border-color: #e1baba;
  background: #faeeee;
  color: #853838;
}

.alert-info {
  border-color: #c7d0ca;
  background: #eff2f0;
  color: #405248;
}

.app-alert-compliance {
  border-left-width: 3px;
}

/* Technical response panels */
.json-panel {
  max-height: 31rem;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #39413c;
  border-radius: 6px;
  background: #1e2521;
  color: #dce5df;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

code {
  color: #3b5544;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78em;
  overflow-wrap: anywhere;
}

dl dt {
  color: var(--ui-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

dl dd {
  margin: 2px 0 14px;
  color: var(--ui-ink);
  font-weight: 550;
}

/* Footer */
footer.app-footer {
  margin-top: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--ui-border);
  background: var(--ui-bg);
  color: #777b76;
  font-size: 0.78rem;
}

/* Login */
.login-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #f4f3ef;
  color: var(--ui-ink);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
  min-height: 100vh;
  min-width: 0;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 72px);
  border-right: 1px solid #3d4740;
  background: var(--ui-header);
  color: #fff;
}

.login-brand-inner {
  min-width: 0;
  max-width: 420px;
}

.login-logo {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 0 28px;
  border: 1px solid #dfe2dc;
  background: #fff;
  object-fit: contain;
}

.login-product {
  max-width: 390px;
  margin: 0 0 10px;
  color: #f4f6f4;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.login-tagline {
  max-width: 330px;
  margin: 0;
  color: #b9c2bc;
  font-size: 1rem;
}

.login-brand-foot {
  margin: 34px 0 0;
  color: #929d96;
  font-size: 0.82rem;
}

.login-panel {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: clamp(32px, 7vw, 96px);
  background: #f4f3ef;
}

.login-panel-inner {
  width: 100%;
  min-width: 0;
  max-width: 420px;
}

.login-heading {
  margin: 0 0 6px;
  color: var(--ui-ink);
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.login-lead {
  margin: 0 0 26px;
  color: var(--ui-muted);
  font-size: 0.92rem;
}

.login-alert {
  margin-bottom: 18px;
}

.login-form .form-label {
  color: #3f443f;
}

.login-form .form-control {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border-color: #bfc2bb;
  background: #fff;
  font-size: 1rem;
}

.btn-login {
  min-height: 46px;
  border: 1px solid var(--ui-primary);
  border-radius: 7px;
  background: var(--ui-primary);
  color: #fff;
  font-weight: 600;
}

.btn-login:hover,
.btn-login:focus {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
  color: #fff;
}

.login-hint {
  color: #737873;
  font-size: 0.78rem;
}

.login-footer {
  display: grid;
  gap: 3px;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--ui-border);
  color: #5c615c;
  font-size: 0.8rem;
}

.login-footer-muted {
  color: #8a8e89;
}

/* Responsive layout */
@media (max-width: 1199.98px) {
  .enterprise-header .navbar {
    min-height: 58px;
    padding: 9px 0;
  }

  .enterprise-brand {
    max-width: calc(100% - 56px);
    margin-right: 0;
  }

  .enterprise-brand strong {
    white-space: normal;
  }

  .enterprise-header .navbar-collapse {
    margin-top: 9px;
    padding: 8px 0 3px;
    border-top: 1px solid var(--ui-header-border);
  }

  .enterprise-header .navbar-nav {
    align-items: stretch;
  }

  .enterprise-header .nav-item {
    display: block;
  }

  .enterprise-header .nav-link {
    padding: 9px 5px !important;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .enterprise-header .nav-link.active {
    border-left-color: #8faf99;
  }

  .enterprise-actions {
    margin: 7px 0 0;
    padding: 10px 5px 2px;
    border-top: 1px solid var(--ui-header-border);
  }

  .nav-user-under {
    flex-wrap: wrap;
  }
}

@media (max-width: 991.98px) {
  .dashboard-workspace-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-grid a:nth-child(2) {
    border-right: 0;
  }

  .pipeline-grid a:nth-child(-n+2) {
    border-bottom: 1px solid var(--ui-border);
  }

  .summary-strip,
  .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip > div:nth-child(2) .app-kpi,
  .detail-summary > div:nth-child(2) .app-kpi {
    border-right: 0;
  }

  .summary-strip > div:nth-child(-n+2) .app-kpi,
  .detail-summary > div:nth-child(-n+2) .app-kpi {
    border-bottom: 1px solid var(--ui-border);
  }

  .login-shell {
    grid-template-columns: minmax(260px, 0.75fr) minmax(380px, 1.25fr);
  }

  .login-brand,
  .login-panel {
    padding: 40px;
  }
}

@media (max-width: 767.98px) {
  .app-page-header {
    flex-direction: column;
    align-items: stretch;
    padding-top: 22px;
  }

  .app-page-actions {
    width: 100%;
  }

  .app-page-actions .btn {
    flex: 1 1 auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .login-brand {
    display: block;
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid #3d4740;
  }

  .login-brand-inner {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    max-width: none;
  }

  .login-logo {
    grid-row: 1 / 3;
    width: 72px;
    height: 72px;
    margin: 0;
  }

  .login-product {
    align-self: end;
    margin: 0 0 4px;
    font-size: 1.25rem;
  }

  .login-tagline {
    align-self: start;
    font-size: 0.84rem;
  }

  .login-brand-foot {
    display: none;
  }

  .login-panel {
    align-items: flex-start;
    padding: 34px 24px 44px;
  }

  .login-panel-inner {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .dashboard-page-header h1 {
    font-size: 1.55rem;
  }

  .dashboard-section-header {
    align-items: flex-start;
  }

  .dashboard-section-header .text-link,
  .section-note {
    display: none;
  }

  .workflow-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .workflow-action {
    display: none;
  }

  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-grid a,
  .pipeline-grid a:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--ui-border);
  }

  .pipeline-grid a:last-child {
    border-bottom: 0;
  }

  .summary-strip,
  .detail-summary {
    grid-template-columns: 1fr;
  }

  .summary-strip .app-kpi,
  .detail-summary .app-kpi,
  .summary-strip > div:nth-child(2) .app-kpi,
  .detail-summary > div:nth-child(2) .app-kpi {
    min-height: 104px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-border);
  }

  .summary-strip > div:last-child .app-kpi,
  .detail-summary > div:last-child .app-kpi {
    border-bottom: 0;
  }

  .app-card .app-card-body,
  .app-card .card-body {
    padding: 15px;
  }

  .app-form-actions {
    flex-direction: column-reverse;
  }

  .app-form-actions .btn {
    width: 100%;
  }

  footer.app-footer > .container-fluid {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
