:root {
  --cp-primary: #007bff;
  --cp-primary-hover: #0056cc;
  --cp-primary-active: #003d99;
  --cp-dark: #212529;
  --cp-sidebar: #1f2d3d;
  --cp-sidebar-deep: #182430;
  --cp-sidebar-text: #c2c7d0;
  --cp-sidebar-text-strong: #ffffff;
  --cp-info: #17a2b8;
  --cp-success: #28a745;
  --cp-warning: #ffc107;
  --cp-danger: #dc3545;
  --cp-danger-alt: #e74c3c;
  --cp-bg: #f8f9fa;
  --cp-surface: #ffffff;
  --cp-surface-muted: #f5f5f5;
  --cp-border-light: #e9ecef;
  --cp-border: #d0d4db;
  --cp-input-border: #ced4e2;
  --cp-text: #212529;
  --cp-text-secondary: #343a40;
  --cp-muted: #6c757d;
  --cp-shadow-card: rgba(0, 0, 0, 0.125) 0 0 1px 0, rgba(0, 0, 0, 0.2) 0 1px 3px 0;
  --cp-shadow-dropdown: rgba(0, 0, 0, 0.176) 0 8px 16px 0;
  --cp-radius: 4px;
  --cp-radius-sm: 3.2px;
  --cp-radius-chat: 8px;
  --app-bg: var(--cp-bg);
  --surface: var(--cp-surface);
  --surface-muted: var(--cp-surface-muted);
  --surface-border: var(--cp-border-light);
  --text-main: var(--cp-text);
  --text-muted: var(--cp-muted);
  --brand-900: var(--cp-primary-active);
  --brand-800: var(--cp-primary);
  --brand-700: var(--cp-primary-hover);
  --brand-100: #e7f1ff;
  --brand-050: #f8f9fa;
  --shadow-soft: var(--cp-shadow-card);
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0;
}

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

a:hover,
a:focus {
  color: var(--cp-primary-hover);
}

.h1,
h1 {
  font-size: 28.8px;
  line-height: 34.56px;
  font-weight: 500;
  letter-spacing: 0;
}

.h2,
h2 {
  font-size: 24px;
  line-height: 28.8px;
  font-weight: 500;
  letter-spacing: 0;
}

.h3,
.h4,
.h5,
.h6,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  letter-spacing: 0;
}

.small,
small {
  font-size: 12.8px;
  line-height: 19.2px;
}

.text-muted {
  color: var(--cp-muted) !important;
}

.app-frame {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--cp-bg);
}

.app-sidebar {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px;
  background: var(--cp-sidebar);
  color: var(--cp-sidebar-text);
  box-shadow: none;
  position: sticky;
  top: 0;
  min-height: 100vh;
  z-index: 1030;
}

.sidebar-mobile-toggle,
.sidebar-backdrop {
  display: none !important;
}

.sidebar-brand {
  min-height: 57px;
  display: flex;
  align-items: center;
  padding: 8px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  text-decoration: none;
}

.sidebar-brand img {
  display: block;
  width: 100%;
  max-width: 196px;
  height: auto;
  filter: brightness(1.08);
}

.sidebar-section-title {
  margin: 8px 8px;
  padding: 0;
  color: #8e9aa7;
  font-size: 12.8px;
  line-height: 19.2px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--cp-radius);
  background: transparent;
  color: var(--cp-sidebar-text);
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cp-sidebar-text-strong);
  transform: none;
}

.sidebar-link.is-active {
  background: var(--cp-primary);
  color: var(--cp-sidebar-text-strong);
  box-shadow: none;
}

.sidebar-link-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.95;
}

.sidebar-link-label {
  color: inherit;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}

.sidebar-link-body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.app-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  background: var(--cp-surface);
  color: var(--cp-sidebar);
  border-bottom: 1px solid var(--cp-border-light);
  box-shadow: rgba(0, 0, 0, 0.1) 0 2px 4px 0;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-heading h1 {
  margin: 0;
  color: var(--cp-text);
  font-size: 20px;
  line-height: 24px;
  font-weight: 500;
}

.topbar-heading p {
  margin: 0;
  color: var(--cp-muted);
  font-size: 12.8px;
  line-height: 19.2px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-user-menu .dropdown-toggle::after,
.action-menu-toggle::after {
  display: none;
}

.topbar-user-trigger {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-surface);
  color: var(--cp-text-secondary);
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
}

.topbar-user-trigger:hover,
.topbar-user-trigger:focus {
  background: var(--cp-bg);
  border-color: var(--cp-border);
  color: var(--cp-text);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cp-border-light);
  color: var(--cp-muted);
  font-size: 14px;
  box-shadow: none;
}

.topbar-user-copy {
  display: grid;
  text-align: left;
  line-height: 1.15;
}

.topbar-user-copy strong {
  color: var(--cp-text);
  font-size: 14px;
  font-weight: 500;
}

.topbar-user-copy small {
  margin-top: 0;
  color: var(--cp-muted);
  font-size: 12.8px;
  font-weight: 400;
}

.topbar-user-chevron {
  color: var(--cp-muted);
  font-size: 12.8px;
}

.dropdown-menu,
.topbar-user-dropdown,
.action-dropdown,
.payee-table .dropdown-menu {
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow-dropdown);
  padding: 4px;
}

.dropdown-item,
.dropdown-item-text,
button.dropdown-item,
.topbar-user-dropdown .dropdown-item,
.topbar-user-dropdown .dropdown-item-text,
.action-dropdown .dropdown-item,
.action-dropdown .dropdown-item-text,
.action-dropdown button.dropdown-item {
  border-radius: var(--cp-radius);
  padding: 8px 12px;
  color: var(--cp-text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
}

.dropdown-item:hover,
.dropdown-item:focus,
.topbar-user-dropdown .dropdown-item:hover,
.topbar-user-dropdown .dropdown-item:focus,
.action-dropdown .dropdown-item:hover,
.action-dropdown button.dropdown-item:hover {
  background: var(--cp-bg);
  color: var(--cp-text);
}

.dropdown-divider {
  border-top-color: var(--cp-border-light);
}

.app-shell {
  width: 100%;
  max-width: none;
  padding: 20px 24px 24px;
}

.auth-shell {
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
}

.card,
.paper-card,
.surface-card,
.dashboard-summary-card,
.documents-panel,
.section-card,
.sheet-card,
.login-layout,
.login-stat,
.login-logo-card,
.login-support {
  border: 0 solid transparent;
  border-radius: var(--cp-radius);
  background: var(--cp-surface);
  box-shadow: var(--cp-shadow-card);
}

.card-header,
.section-card .card-header {
  padding: 12px 20px;
  background: transparent;
  border-bottom: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius) var(--cp-radius) 0 0;
}

.card-body,
.section-card .card-body {
  padding: 16px 20px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--cp-radius);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0;
  box-shadow: none !important;
}

.btn-sm {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 21px;
}

.btn-primary,
.btn-success,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: var(--cp-primary);
  background-color: var(--cp-primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: var(--cp-primary-hover);
  background-color: var(--cp-primary-hover);
  color: #ffffff;
}

.btn-primary:active,
.btn-success:active {
  border-color: var(--cp-primary-active) !important;
  background-color: var(--cp-primary-active) !important;
}

.btn-outline-primary,
.btn-outline-success {
  border-color: var(--cp-primary);
  color: var(--cp-primary);
  background: var(--cp-surface);
}

.btn-outline-secondary,
.btn-light {
  border-color: #e8e8e8;
  background: #f5f5f5;
  color: var(--cp-text-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-light:hover,
.btn-light:focus {
  border-color: var(--cp-border);
  background: var(--cp-border-light);
  color: var(--cp-text);
}

.btn-outline-danger {
  border-color: var(--cp-danger);
  color: var(--cp-danger);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-danger {
  border-color: var(--cp-danger);
  background: var(--cp-danger);
  color: #ffffff;
}

.icon-btn,
.bulk-compact-btn {
  width: 46px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 0;
}

.icon-btn-lg {
  width: 48px;
  height: 48px;
}

.form-label {
  margin-bottom: 8px;
  color: var(--cp-text);
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 38px;
  border: 1px solid var(--cp-input-border);
  border-radius: var(--cp-radius);
  background-color: var(--cp-surface);
  color: #495057;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  box-shadow: none;
}

.form-control::placeholder {
  color: var(--cp-muted);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--cp-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cp-input-border);
  border-radius: var(--cp-radius-sm);
  accent-color: var(--cp-primary);
}

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

.alert {
  border: 0;
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow-card);
}

.badge,
.status-chip,
.section-summary-pill,
.filter-chip,
.view-tab-count,
.dashboard-tab-count,
.page-meta-pill,
.draft-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--cp-radius-sm);
  padding: 4px 8px;
  background: var(--cp-border-light);
  color: var(--cp-muted);
  font-size: 12px;
  line-height: 12px;
  font-weight: 500;
}

.text-bg-success,
.status-chip.is-finalized,
.section-summary-pill.is-finalized-link,
.history-shell .d-flex.gap-2.flex-wrap.mb-3 .section-summary-pill[href*="?status=finalized"],
.draft-status.is-saved {
  background: #d4edda !important;
  color: var(--cp-success) !important;
}

.text-bg-warning,
.status-chip.is-draft,
.section-summary-pill.is-draft-link,
.history-shell .d-flex.gap-2.flex-wrap.mb-3 .section-summary-pill[href*="?status=draft"],
.draft-status.is-dirty {
  background: #fff3cd !important;
  color: #856404 !important;
}

.text-bg-danger,
.alert-danger {
  background: #f8d7da !important;
  color: var(--cp-danger) !important;
}

.table {
  color: var(--cp-text);
  font-size: 14px;
  line-height: 21px;
}

.table thead th,
.compact-table thead th,
.payee-table thead th {
  padding: 12px;
  border-bottom: 1px solid var(--cp-border-light);
  background: var(--cp-bg);
  color: var(--cp-text-secondary);
  font-size: 12.8px;
  line-height: 19.2px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.table tbody td,
.compact-table tbody td,
.payee-table td {
  padding: 12px;
  vertical-align: middle;
}

.table-hover > tbody > tr:hover > *,
.recent-documents-table tbody tr:hover,
.payee-table tbody tr:hover,
.certificate-row:hover {
  background: #f2f6fa;
}

.table-sort-link,
.sortable-header-link,
.certificate-primary-link {
  color: var(--cp-primary);
  text-decoration: none;
}

.table-sort-link:hover,
.table-sort-link:focus,
.sortable-header-link:hover,
.sortable-header-link:focus,
.certificate-primary-link:hover,
.certificate-primary-link:focus {
  color: var(--cp-primary-hover);
}

.dashboard-summary-card {
  padding: 0;
}

.dashboard-summary-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--cp-border-light);
}

.dashboard-summary-kicker {
  display: none;
}

.dashboard-summary-title {
  margin: 0;
  color: var(--cp-text);
  font-size: 24px;
  line-height: 28.8px;
  font-weight: 500;
}

.dashboard-summary-text {
  margin: 4px 0 0;
  color: var(--cp-muted);
  font-size: 14px;
  line-height: 21px;
}

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

.dashboard-summary-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 16px 20px;
}

.dashboard-stat-box {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 0;
  border-radius: var(--cp-radius);
  background: var(--cp-info);
  color: #ffffff;
  box-shadow: rgba(0, 0, 0, 0.2) 0 1px 3px 0;
}

.dashboard-stat-box:nth-child(2) {
  background: var(--cp-success);
}

.dashboard-stat-box:nth-child(3) {
  background: var(--cp-warning);
  color: var(--cp-text);
}

.dashboard-stat-box:nth-child(4) {
  background: var(--cp-danger);
}

.dashboard-stat-label {
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.92;
}

.dashboard-stat-value {
  color: inherit;
  font-size: 28.8px;
  line-height: 34.56px;
  font-weight: 500;
}

.dashboard-table-card .card-body {
  padding: 16px 20px;
}

.dashboard-tabs,
.view-switcher,
.tab-rail .nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.dashboard-tab-link,
.view-tab,
.tab-rail .nav-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--cp-muted);
  text-decoration: none;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.dashboard-tab-link:hover,
.dashboard-tab-link:focus,
.view-tab:hover,
.view-tab:focus,
.tab-rail .nav-link:hover,
.tab-rail .nav-link:focus {
  background: var(--cp-bg);
  color: var(--cp-text);
}

.dashboard-tab-link.is-active,
.view-tab.is-active,
.tab-rail .nav-link.active,
.quick-date-link.is-active,
.dashboard-pagination-links .btn.is-active {
  border-color: var(--cp-primary);
  background: var(--cp-border-light);
  color: var(--cp-primary);
  box-shadow: inset 3px 0 0 var(--cp-primary) !important;
}

.dashboard-tab-link.is-active .dashboard-tab-count,
.view-tab.is-active .view-tab-count {
  background: var(--cp-primary);
  color: #ffffff;
}

.dashboard-table-controls,
.action-bar,
.tab-rail {
  padding: 8px 12px;
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-bg);
  box-shadow: none;
}

.dashboard-table-controls-title,
.documents-panel-title {
  color: var(--cp-text-secondary);
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.dashboard-table-controls label {
  color: var(--cp-text);
  font-size: 14px;
  line-height: 21px;
  font-weight: 700;
}

.payee-table-wrap,
.table-responsive.border,
.empty-results-card {
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-surface);
  overflow: hidden;
}

.payee-action-stack .btn-group {
  overflow: hidden;
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-surface);
  box-shadow: none;
}

.dashboard-payee-tools,
.dashboard-payee-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-payee-search .form-control {
  width: 260px;
}

.payee-controls-compact {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
}

.payee-controls-compact .dashboard-table-controls-title {
  flex: 0 0 auto;
}

.payee-controls-compact .dashboard-table-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.payee-controls-compact label {
  margin: 0;
}

.payee-controls-compact .form-select {
  width: 180px;
  min-width: 0;
}

.payee-action-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.payee-action-primary {
  border: 0;
  border-radius: var(--cp-radius);
  background: var(--cp-primary);
  color: #ffffff;
}

.payee-action-primary:hover,
.payee-action-primary:focus {
  background: var(--cp-primary-hover);
  color: #ffffff;
}

.payee-action-toggle {
  border: 0;
  border-left: 1px solid var(--cp-border-light);
  border-radius: 0;
  background: var(--cp-surface-muted);
  color: var(--cp-text-secondary);
}

.documents-panel {
  padding: 16px 20px;
}

.view-switcher {
  border-bottom: 1px solid var(--cp-border-light);
}

.view-tab {
  margin-bottom: -1px;
  border-bottom: 0;
}

.documents-panel-note,
.create-item-description,
.create-modal-item-description,
.field-note,
.shortcut-hint,
.compact-note {
  color: var(--cp-muted);
}

.create-item,
.create-modal-item,
.inline-summary-box,
.summary-metric {
  padding: 12px;
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-bg);
  box-shadow: none;
}

.create-item-title,
.create-modal-item-title {
  color: var(--cp-text);
  font-weight: 500;
}

.certificate-row.is-selected,
.income-row.is-selected {
  background: #e7f1ff;
  box-shadow: inset 3px 0 0 var(--cp-primary);
}

.selection-pill.is-active {
  background: #d4edda;
  color: var(--cp-success);
}

.bulk-primary-actions {
  padding: 4px;
  border: 1px solid var(--cp-border-light);
  border-radius: var(--cp-radius);
  background: var(--cp-bg);
}

.bulk-recommended {
  border-color: var(--cp-warning) !important;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.28) !important;
}

.bulk-recommended.dropdown-item {
  background: #fff3cd;
  color: #856404;
  font-weight: 700;
}

.form-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.page-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-compact-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-compact-title h1 {
  margin: 0;
}

.tab-rail {
  position: sticky;
  top: 73px;
  z-index: 4;
}

.summary-card,
.action-bar {
  position: sticky;
  top: 73px;
}

.inline-summary-grid,
.dashboard-summary-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.inline-summary-box .label {
  color: var(--cp-muted);
  font-size: 12.8px;
  line-height: 19.2px;
}

.inline-summary-box .value {
  margin-top: 4px;
  color: var(--cp-text);
  font-size: 16px;
  font-weight: 500;
}

.collapse-toggle {
  color: var(--cp-primary);
  font-weight: 500;
}

.draft-banner {
  border: 1px solid #ffe08a;
  border-radius: var(--cp-radius);
  background: #fff3cd;
  color: #856404;
}

.draft-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.field-error {
  margin-top: 4px;
  color: var(--cp-danger);
  font-size: 12.8px;
  line-height: 19.2px;
}

.login-layout {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  overflow: hidden;
}

.login-brand-panel {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  background:
    linear-gradient(90deg, rgba(10, 32, 38, 0.86) 0%, rgba(16, 54, 57, 0.66) 58%, rgba(16, 54, 57, 0.42) 100%),
    url("../branding/login-chemical-warehouse.jpg") center / cover no-repeat;
  color: #ffffff;
}

.login-brand-panel::before {
  display: none;
}

.login-brand-copy h1 {
  color: inherit;
  font-size: 44px;
  line-height: 52px;
  letter-spacing: 0;
  font-weight: 700;
}

.login-form-header h2 {
  color: inherit;
  font-size: 28.8px;
  line-height: 34.56px;
  letter-spacing: 0;
  font-weight: 500;
}

.login-brand-copy p,
.login-form-header p {
  color: inherit;
  font-size: 14px;
  line-height: 21px;
  opacity: 0.82;
}

.login-logo-card {
  width: min(300px, 72vw);
  padding: 12px;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(10, 32, 38, 0.22);
}

.login-feature-chip,
.login-stat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--cp-radius);
  background: rgba(8, 26, 31, 0.42);
  color: var(--cp-sidebar-text-strong);
  box-shadow: none;
}

.login-feature-chip i,
.login-support i {
  color: #17a2b8;
}

.login-stat span,
.login-stat strong {
  color: var(--cp-sidebar-text-strong);
}

.login-form-panel {
  display: flex;
  align-items: center;
  padding: 44px;
  background: var(--cp-surface);
  border-left: 1px solid var(--cp-border-light);
}

.login-form-card {
  width: 100%;
}

.login-form-header {
  color: var(--cp-text);
}

.login-form .form-control {
  height: 40px;
  border-radius: var(--cp-radius);
  padding-left: 44px;
}

.login-field-icon {
  color: var(--cp-muted);
}

.login-submit {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  border-radius: var(--cp-radius);
}

.login-support {
  color: var(--cp-muted);
}

@media (min-width: 992px) {
  .form-shell {
    grid-template-columns: minmax(0, 1.9fr) 360px;
    align-items: start;
  }
}

@media (min-width: 1440px) {
  .form-shell {
    grid-template-columns: minmax(0, 2fr) 390px;
  }
}

@media (max-width: 992px) {
  .app-frame {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0) !important;
    box-shadow: var(--cp-shadow-dropdown);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1025;
    border: 0;
    background: rgba(0, 0, 0, 0.36);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block !important;
  }

  .sidebar-mobile-toggle {
    width: 46px;
    min-width: 46px;
    display: inline-flex !important;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.5);
  }

  .sidebar-mobile-toggle:hover,
  .sidebar-mobile-toggle:focus {
    background: rgba(0, 0, 0, 0.05);
    color: var(--cp-text);
  }

  .app-main {
    min-height: 100vh;
  }

  .app-topbar {
    position: sticky;
    top: 0;
    align-items: center;
  }

  .topbar-tools {
    width: auto;
    justify-content: flex-start;
  }

  .topbar-heading {
    min-width: 0;
    flex: 1 1 auto;
  }

  .tab-rail,
  .summary-card,
  .action-bar {
    position: static;
  }
}

@media (max-width: 768px) {
  .app-shell,
  .auth-shell {
    padding: 12px;
  }

  .app-topbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .topbar-user-trigger {
    width: auto;
    justify-content: space-between;
  }

  .topbar-heading p,
  .topbar-user-copy small {
    display: none;
  }

  .dashboard-summary-main,
  .dashboard-table-toolbar,
  .page-compact-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-summary-actions,
  .dashboard-action-bar,
  .dashboard-pagination-links,
  .filter-action-group,
  .compact-filter-actions {
    width: 100%;
  }

  .dashboard-summary-actions .btn,
  .filter-action-group .btn,
  .compact-filter-actions .btn,
  .login-submit {
    width: 100%;
  }

  .dashboard-payee-tools,
  .dashboard-payee-search,
  .payee-controls-compact,
  .payee-controls-compact .dashboard-table-controls-group,
  .payee-action-stack {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .dashboard-payee-search .form-control,
  .payee-controls-compact .form-select,
  .payee-action-stack .btn,
  .payee-action-stack .form-select {
    width: 100%;
  }

  .view-switcher {
    border-bottom: 0;
  }

  .view-tab,
  .dashboard-tab-link {
    width: 100%;
    justify-content: space-between;
    border: 1px solid var(--cp-border-light);
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 24px;
  }

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

  .login-form-panel {
    padding: 24px;
    border-left: 0;
    border-top: 1px solid var(--cp-border-light);
  }
}
