html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  height: 100%;
  --app-header-height: 57px;
  --app-subnav-height: 66px;
  --app-chrome-height: calc(var(--app-header-height) + var(--app-subnav-height));
}

body {
  margin-bottom: 60px;
  color: #25304f;
  background: #f7f7f8;
  min-height: 100%;
}

body > header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

body > header .navbar {
  margin-bottom: 0 !important;
}

.container {
  padding-top: 16px;
}

.app-version {
  color: #647086;
  font-size: 12px;
  font-weight: 600;
}

.navbar .nav-link.active {
  color: #163d78 !important;
  font-weight: 700;
}

.app-top-actions {
  display: flex;
  gap: 6px;
}

.app-subnav {
  position: sticky;
  top: var(--app-header-height);
  z-index: 999;
  min-height: 66px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  padding: 12px 8px;
}

.app-subnav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.app-top-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #ececec;
  color: #26325a;
  padding: 0 14px;
  text-decoration: none;
}

.app-top-action:hover {
  background: #dde4eb;
  color: #26325a;
}

.app-top-action.active {
  border: 3px solid #2f80d1;
  background: #fff;
  padding: 0 12px;
}

.purchase-workbench {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 8px 0 24px;
}

body:has(.dashboard-page),
body:has(.orders-page),
body:has(.crm-page),
body:has(.forecast-page),
body:has(.purchase-workbench) {
  margin-bottom: 0;
  overflow: hidden;
}

body:has(.dashboard-page) .footer,
body:has(.orders-page) .footer,
body:has(.crm-page) .footer,
body:has(.forecast-page) .footer,
body:has(.purchase-workbench) .footer {
  display: none;
}

.dashboard-page,
.orders-page,
.crm-page,
.forecast-page,
.purchase-workbench {
  height: calc(100vh - var(--app-chrome-height));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-board,
.purchase-kanban-board,
.crm-kanban-board,
.forecast-zone-board,
.orders-table-wrap,
.crm-table-wrap,
.purchase-order-edit-form {
  flex: 1 1 auto;
  min-height: 0;
}

.purchase-order-edit-form {
  padding: 14px 16px 20px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 24px rgba(23, 43, 85, .06);
  overflow: auto;
}

.po-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.po-topbar h1 {
  flex: 0 0 auto;
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 500;
  color: #26325a;
}

.po-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.po-menu-button,
.po-action {
  min-height: 50px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #ececec;
  color: #26325a;
  padding: 0 18px;
  font-size: 15px;
  line-height: 1.1;
}

.po-menu-button.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.po-menu-button.active {
  border: 4px solid #35d43f;
  background: #e9e9e9;
  padding-inline: 22px;
}

.po-menu-button.save,
.po-action.primary {
  border-color: #8298ad;
  background: #8aa1b8;
  color: #fff;
}

.po-menu-button:disabled,
.po-action:disabled {
  color: #2b3254;
  opacity: .75;
}

.delivery-actions .po-action:disabled {
  background: #eeeeee;
  color: #8b8f98;
  cursor: not-allowed;
  opacity: 1;
}

.po-header-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr) minmax(300px, .9fr);
  gap: 6px 42px;
  margin-bottom: 12px;
  max-width: 1510px;
}

.field-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.po-edit-panel {
  display: grid;
  grid-template-columns: minmax(430px, 520px) minmax(380px, 460px) minmax(430px, 560px);
  align-items: start;
  gap: 14px 26px;
  max-width: 1580px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #f6faff;
}

.po-edit-grid,
.po-edit-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.po-edit-grid .field-row,
.po-edit-column .field-row {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 8px;
  min-height: 34px;
}

.po-edit-grid .text-danger,
.po-edit-column .text-danger {
  grid-column: 2;
  font-size: 12px;
}

.po-edit-grid .po-control,
.po-edit-column .po-control {
  width: 100%;
  min-height: 32px;
  padding: 5px 9px;
}

.po-inline-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.po-small-add {
  width: 34px;
  min-height: 30px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #f1f2f4;
  color: #172b55;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.po-small-add:hover {
  border-color: #2f80d1;
  background: #fff;
}

.po-quick-modal .crm-related-dialog {
  width: min(920px, calc(100vw - 48px));
}

.po-quick-body {
  display: block;
  padding: 18px;
}

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

.po-quick-span {
  grid-column: 1 / -1;
}

.po-quick-fields textarea {
  min-height: 88px;
  resize: vertical;
}

.po-notes-address-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.po-customer-address {
  border: 1px solid #d9dee8;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  min-height: 88px;
}

.po-customer-address h2 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  color: #26325a;
}

.po-address-lines {
  color: #2f4266;
  line-height: 1.45;
  white-space: pre-wrap;
}

.po-notes-edit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 0;
}

.po-notes-edit label {
  margin: 0;
  color: #26325a;
  font-weight: 600;
}

.field-row label,
.field-row > span {
  margin: 0;
  text-align: right;
  color: #26325a;
}

.po-control,
.grid-control {
  border: 0;
  border-radius: 4px;
  background-color: #eef1f5;
  color: #2f4266;
  min-height: 42px;
}

.po-edit-panel .po-control {
  border: 1px solid transparent;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6ebf2;
}

.po-edit-panel .po-control:focus,
.grid-control:focus {
  outline: 0;
  border-color: #2f80d1;
  box-shadow: 0 0 0 3px rgba(47, 128, 209, .18);
}

.po-control[readonly] {
  color: #89909d;
}

.po-control.po-control-unlocked {
  border: 2px solid #2f80d1;
  background-color: #fff;
  color: #25304f;
}

.po-menu-button.edit-unlocked {
  border-color: #2f80d1;
  background: #dcecff;
  color: #163d78;
  opacity: 1;
}

.po-control.status-alert {
  background: #f8d7da;
  color: #8a1c24;
  font-weight: 700;
}

.notes-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 8px 0 14px;
  max-width: 530px;
  border: 2px solid #2f80d1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f7fbff;
}

.new-po-items-panel,
.order-items-panel {
  max-width: 1540px;
  margin: 10px 0;
  border: 2px solid #2f80d1;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  padding: 8px;
  box-shadow: 0 8px 20px rgba(47, 128, 209, .08);
}

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

.new-po-items-panel h2,
.order-items-panel h2 {
  margin: 0 0 10px;
  color: #26325a;
  font-size: 18px;
  font-weight: 700;
}

.new-po-items-header h2 {
  margin-bottom: 0;
}

.po-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.new-po-items-wrap,
.order-items-wrap {
  overflow-x: auto;
  background: #fff;
}

.new-po-items-table,
.order-items-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.new-po-items-table th,
.new-po-items-table td,
.order-items-table th,
.order-items-table td {
  border: 1px solid #d5d7dc;
  padding: 4px 6px;
  vertical-align: middle;
}

.new-po-items-table th,
.order-items-table th {
  background: #f4f4f4;
  color: #26325a;
  font-weight: 700;
}

.new-po-items-table .line-total,
.order-items-table td:nth-child(n+2) {
  text-align: right;
}

.new-po-items-table .select-column {
  width: 34px;
  text-align: center;
}

.new-po-items-table .item-number-column,
.new-po-items-table .item-number {
  width: 70px;
}

.new-po-items-table .product-column {
  width: 30%;
}

.new-po-items-table .quantity-column,
.new-po-items-table .price-column,
.new-po-items-table .total-column,
.new-po-items-table .missing-column,
.new-po-items-table .line-total,
.new-po-items-table .missing-schedule {
  width: 150px;
}

.missing-schedule {
  text-align: right;
  font-weight: 700;
}

.missing-schedule-alert {
  color: #9b1c24;
  background: #fff3cd;
}

.missing-schedule-complete {
  color: #176d32;
  background: #e3f7e8;
}

.order-items-panel {
  max-width: 640px;
}

.po-details-panel {
  max-width: 1180px;
  margin: 16px 0;
  border: 1px solid #d5d7dc;
  background: #fff;
  padding: 18px 22px;
}

.po-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px 72px;
}

.po-detail-field {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  color: #26325a;
}

.po-total-panel {
  display: grid;
  grid-template-columns: 170px minmax(160px, 230px);
  align-items: center;
  gap: 12px;
  max-width: 430px;
  margin: 8px 0 12px;
}

.po-total-panel label {
  margin: 0;
  font-weight: 700;
  color: #26325a;
  text-align: right;
}

.po-total-panel input {
  min-height: 38px;
  background: #e9ecef;
}

.po-detail-field span {
  color: #5c6578;
  font-weight: 700;
}

.po-detail-field strong {
  font-weight: 500;
}

.view-switcher,
.inline-menu-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.purchase-kanban-board {
  display: flex;
  gap: 14px;
  overflow: auto;
  padding-bottom: 18px;
}

.purchase-kanban-column {
  flex: 0 0 310px;
  border: 1px solid #b7c9e8;
  background: #fff;
}

.purchase-kanban-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  background: #d9e6f5;
  color: #122857;
  font-weight: 700;
}

.purchase-kanban-column header span {
  min-width: 28px;
  border-radius: 999px;
  background: #fff;
  text-align: center;
}

.purchase-kanban-cards {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.purchase-order-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #cfd8e8;
  border-radius: 4px;
  background: #fff;
  color: #26325a;
  text-decoration: none;
}

.purchase-order-card:hover {
  border-color: #2f80d1;
  color: #122857;
  text-decoration: none;
}

.notes-panel label {
  margin-top: 8px;
  text-align: right;
  color: #26325a;
}

.notes-control {
  width: 100%;
  min-height: 130px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #2f4266;
  padding: 10px 12px;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.po-check {
  width: 150px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #ececec;
  text-align: center;
  line-height: 1.05;
}

.po-check.closed {
  border-color: #37a64a;
  background: #dff3e4;
  color: #155d24;
  font-weight: 600;
}

.po-check.closed input {
  accent-color: #1f9d3a;
}

.po-check.open {
  border-color: #d9a91f;
  background: #fff3c4;
  color: #6c5200;
  font-weight: 600;
}

.po-check.open input {
  accent-color: #d9a91f;
}

.delivery-grid-panel {
  border: 2px solid #2f80d1;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  padding: 8px;
  box-shadow: 0 8px 20px rgba(47, 128, 209, .08);
}

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

.delivery-grid-panel h2 {
  margin: 0;
  font-size: 18px;
  color: #26325a;
}

.admin-lookup-page .orders-header {
  align-items: center;
}

.admin-lookup-editor {
  border: 2px solid #2f80d1;
  border-radius: 6px;
  background: #f6fbff;
  padding: 14px;
  margin: 0 0 16px;
}

.admin-lookup-editor h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.admin-lookup-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.admin-lookup-form label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  color: #26325a;
}

.admin-lookup-form input {
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 4px;
  padding: 6px 8px;
}

.admin-bulk-delete-form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -6px 0 10px;
}

.admin-bulk-delete-form span {
  color: #64708a;
  font-weight: 600;
}

.admin-lookup-page .select-column {
  width: 42px;
  text-align: center;
}

.admin-lookup-kanban .purchase-kanban-column {
  min-width: 260px;
}

.admin-lookup-card {
  cursor: grab;
}

.delivery-table-wrap {
  min-height: 190px;
  overflow: auto;
  background: #fff;
}

.delivery-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #31425f;
}

.delivery-table th,
.delivery-table td {
  border-right: 1px solid #d2d2d2;
  border-bottom: 1px solid #e4e4e4;
  padding: 0 8px;
  height: 38px;
  vertical-align: middle;
  white-space: nowrap;
}

.delivery-table th {
  background: #f4f4f4;
  font-weight: 500;
}

.delivery-table tbody tr:nth-child(even) {
  background: #e9e9e9;
}

.delivery-table .select-column,
.delivery-table .row-command {
  width: 44px;
  text-align: center;
}

.delivery-table .delivery-number {
  width: 130px;
  text-align: center;
  color: #126ec9;
}

.grid-control {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
}

.grid-control.numeric {
  text-align: right;
}

.schedule-validation {
  margin: 8px 0 12px;
  color: #8a1c24;
  font-weight: 700;
}

.schedule-validation ul {
  margin: 0;
}

.schedule-input-error {
  background: #f8d7da;
  color: #8a1c24;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: #d83b42;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.orders-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 24px;
}

.orders-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.orders-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  color: #26325a;
}

.orders-header span {
  color: #647086;
}

.orders-table-wrap {
  overflow: auto;
  border: 1px solid #d5d7dc;
  background: #fff;
  max-height: none;
}

.orders-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  color: #31425f;
}

.orders-table th,
.orders-table td {
  border-right: 1px solid #d2d2d2;
  border-bottom: 1px solid #e4e4e4;
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.orders-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f4f4;
  font-weight: 600;
}

.orders-filter-row th {
  top: 39px;
  background: #fafafa;
  padding: 5px 8px;
}

.orders-filter {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cfd4dc;
  border-radius: 3px;
  background: #fff;
  color: #25304f;
  padding: 3px 6px;
  font-size: 13px;
}

.orders-filter:focus {
  border-color: #2f80d1;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.orders-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.orders-table .numeric {
  text-align: right;
}

.orders-table tbody tr.order-row-complete,
.orders-table tbody tr.order-row-complete:nth-child(even) {
  background: #dff3e4;
  color: #155d24;
}

.orders-table tbody tr.order-row-unscheduled,
.orders-table tbody tr.order-row-unscheduled:nth-child(even) {
  background: #f8d7da;
  color: #8a1c24;
}

.orders-table .row-command {
  width: 84px;
  text-align: center;
}

.new-po-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 8px 0 24px;
}

.new-po-header h1 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 500;
  color: #26325a;
}

.new-po-form {
  max-width: 760px;
}

.new-po-grid {
  display: grid;
  gap: 8px;
}

.new-po-grid .field-row {
  grid-template-columns: 180px minmax(0, 1fr);
}

.new-po-grid .field-row .text-danger {
  grid-column: 2;
}

.new-po-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 18px;
}

.dashboard-page {
  width: calc(100vw - 16px);
  margin-left: calc(50% - 50vw + 8px);
  margin-right: calc(50% - 50vw + 8px);
  padding: 0 0 24px;
}

.dashboard-toolbar {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(360px, 720px) minmax(140px, 1fr);
  align-items: start;
  gap: 16px;
  padding: 10px 8px 0;
}

.dashboard-toolbar-spacer {
  min-width: 0;
}

.dashboard-search-combo {
  justify-self: center;
  width: min(720px, 100%);
}

.dashboard-search-box {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 42px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #c7d0df;
  border-radius: 6px;
  background: #fff;
  color: #25304f;
  box-shadow: 0 1px 1px rgba(24, 34, 58, .04);
}

.dashboard-search-box > span {
  color: #66728a;
  text-align: center;
  font-size: 19px;
}

.dashboard-search-input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #25304f;
  font-size: 18px;
}

.dashboard-search-input::placeholder {
  color: #9a9a9a;
}

.dashboard-search-clear,
.dashboard-search-toggle {
  min-width: 34px;
  min-height: 40px;
  border: 0;
  border-left: 1px solid #c7d0df;
  background: transparent;
  color: #25304f;
  font-weight: 700;
}

.dashboard-search-clear {
  min-width: 30px;
  border-left: 0;
  color: #647086;
}

.dashboard-search-box:focus-within {
  border-color: #2f80d1;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.dashboard-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.dashboard-product-filter {
  display: flex;
  justify-content: flex-end;
}

.dashboard-product-filter label {
  display: grid;
  gap: 4px;
  color: #26325a;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-product-filter select {
  min-width: 140px;
  min-height: 34px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 5px 8px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  min-height: 78px;
  padding: 0 32px;
  background: #8eabd8;
  color: #fff;
}

.dashboard-hero h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
}

.dashboard-hero span {
  justify-self: end;
  font-weight: 600;
}

.dashboard-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 14px;
  align-items: start;
  overflow: auto;
  padding: 10px 8px 18px;
}

.dashboard-column {
  border: 1px solid #a9bde4;
  background: #fff;
  min-height: 210px;
}

.dashboard-column header {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  background: #cfd9ec;
  color: #111;
  text-align: center;
}

.dashboard-column header strong {
  font-size: 13px;
}

.dashboard-column-header-link {
  width: 100%;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

.dashboard-column-header-link:hover {
  color: inherit;
  text-decoration: none;
}

.dashboard-column-header-link:hover strong {
  text-decoration: underline;
}

.dashboard-column-title {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-column-title:hover {
  color: inherit;
  text-decoration: underline;
}

.dashboard-column header small {
  color: #24314f;
}

.dashboard-column.current-period header {
  background: #4f8535;
  color: #fff;
}

.dashboard-column.current-period header small {
  color: #eef8ec;
}

.dashboard-column.missing-schedule header {
  background: #b63838;
  color: #fff;
}

.dashboard-column.missing-schedule header small {
  color: #ffe8e8;
}

.dashboard-column.delay header {
  background: #d6a13a;
  color: #111;
}

.dashboard-column.delay header small {
  color: #3d2d07;
}

.dashboard-column.drop-target {
  border-color: #2f80d1;
  box-shadow: 0 0 0 3px rgba(47, 128, 209, .22);
}

.dashboard-column-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #a9bde4;
  background: #e9eef9;
  padding: 6px 8px;
  font-size: 12px;
}

.dashboard-items {
  max-height: none;
  overflow-y: auto;
}

.dashboard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  border-bottom: 1px solid #b7c7ed;
  color: #13284f;
  padding: 6px 8px;
  text-decoration: none;
  font-size: 12px;
}

.dashboard-item:hover {
  background: #eef4ff;
  color: #13284f;
}

.dashboard-item.dragging {
  opacity: .55;
  border-color: #2f80d1;
}

.dashboard-item-date {
  grid-column: 1;
  color: #4d5974;
}

.dashboard-item-customer {
  grid-column: 1 / -1;
  display: block;
}

.dashboard-item-internal {
  grid-column: 1;
  display: block;
  font-weight: 800;
}

.dashboard-item strong,
.dashboard-item-customer,
.dashboard-item-internal {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-item-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-empty {
  padding: 16px 8px;
  color: #737b8d;
  text-align: center;
  font-size: 12px;
}

.forecast-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 28px;
}

.forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.forecast-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #26325a;
}

.forecast-header span {
  color: #647086;
}

.forecast-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.forecast-filter label {
  color: #26325a;
  font-weight: 600;
}

.forecast-filter select {
  min-width: 220px;
}

.forecast-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.forecast-kpis article {
  border: 1px solid #d5d7dc;
  border-left: 4px solid #2f80d1;
  border-radius: 4px;
  background: #fff;
  padding: 10px 12px;
}

.forecast-kpis span {
  display: block;
  color: #647086;
  font-size: 13px;
}

.forecast-kpis strong {
  display: block;
  color: #26325a;
  font-size: 22px;
  line-height: 1.2;
}

.forecast-zone-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(330px, 1fr));
  gap: 12px;
  overflow: auto;
}

.forecast-zone {
  border: 1px solid #cdd5e1;
  border-radius: 6px;
  background: #fff;
  min-width: 0;
}

.forecast-zone > header {
  border-bottom: 1px solid #cdd5e1;
  padding: 10px 12px;
}

.forecast-zone > header h2 {
  margin: 0;
  color: #172b55;
  font-size: 17px;
  font-weight: 700;
}

.forecast-zone > header span {
  display: block;
  margin-top: 2px;
  color: #51617c;
  font-size: 13px;
}

.forecast-zone > header div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.forecast-zone > header strong {
  border-radius: 12px;
  background: #fff;
  color: #26325a;
  padding: 3px 8px;
  font-size: 12px;
}

.forecast-zone.zone-early > header {
  background: #f8d7da;
}

.forecast-zone.zone-leads > header {
  background: #e6e8ec;
}

.forecast-zone.zone-active > header {
  background: #fff3c4;
}

.forecast-zone.zone-commit > header {
  background: #dff3e4;
}

.forecast-zone-filter {
  border-bottom: 1px solid #d9dee8;
  background: #f7f9fc;
  padding: 8px 10px;
}

.forecast-zone-search {
  width: 100%;
  min-height: 32px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 5px 8px;
  font-size: 13px;
}

.forecast-zone-search:focus {
  border-color: #2f80d1;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.forecast-zone-cards {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 265px);
  overflow-y: auto;
  padding: 10px;
}

.forecast-card {
  border: 1px solid #cdd5e1;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.forecast-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.forecast-card-link:hover {
  border-color: #2f80d1;
  color: inherit;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .16);
}

.forecast-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  background: #dfe9f6;
  border-bottom: 1px solid #c2d0e2;
  padding: 10px 12px;
}

.forecast-card h3 {
  margin: 0;
  color: #172b55;
  font-size: 17px;
  font-weight: 700;
}

.forecast-card header span {
  display: block;
  color: #51617c;
  font-size: 13px;
}

.forecast-card header > strong {
  flex: 0 0 auto;
  border-radius: 12px;
  background: #fff;
  color: #26325a;
  padding: 3px 8px;
  font-size: 12px;
}

.forecast-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #d5dce8;
}

.forecast-card-metrics span {
  background: #f7f9fc;
  padding: 7px 10px;
  color: #26325a;
  font-size: 13px;
  font-weight: 600;
}

.forecast-projects {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding: 10px;
}

.forecast-project {
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #fff;
  padding: 9px;
}

.forecast-project.commit-flag {
  border-color: #1f9d3a;
  box-shadow: inset 4px 0 0 #1f9d3a;
}

.forecast-project-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.forecast-project-title strong {
  color: #172b55;
}

.forecast-project-title span {
  border-radius: 10px;
  background: #26325a;
  color: #fff;
  min-width: 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.forecast-commit-badge {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #dff3e4;
  color: #155d24;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.forecast-project dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 82px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  color: #31425f;
  font-size: 13px;
}

.forecast-project dt {
  color: #647086;
  font-weight: 600;
}

.forecast-project dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.forecast-project p {
  margin: 8px 0 0;
  color: #31425f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.forecast-muted {
  color: #647086 !important;
}

.forecast-empty {
  grid-column: 1 / -1;
  border: 1px solid #d5d7dc;
  background: #fff;
  padding: 24px;
  text-align: center;
  color: #647086;
}

.forecast-zone-empty {
  border: 1px dashed #cdd5e1;
  border-radius: 4px;
  padding: 18px;
  color: #647086;
  text-align: center;
}

.crm-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 24px;
}

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

.crm-header h1 {
  margin: 0;
  color: #26325a;
  font-size: 24px;
  font-weight: 600;
}

.crm-header span {
  color: #647086;
}

.crm-view-toggle {
  display: flex;
  gap: 6px;
}

.crm-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #ececec;
  color: #26325a;
  padding: 0 14px;
}

.crm-view-button.active {
  border: 3px solid #2f80d1;
  background: #fff;
  padding: 0 12px;
}

.crm-view-button.disabled {
  color: #8a93a3;
  cursor: default;
  opacity: 0.65;
  pointer-events: none;
}

.crm-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
}

.crm-pager-status {
  color: #647086;
  font-weight: 600;
}

.crm-contact-panel {
  border: 2px solid #2f80d1;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 14px;
  padding: 12px;
}

.crm-contact-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.crm-contact-panel h2 {
  margin: 0;
  color: #26325a;
  font-size: 18px;
  font-weight: 700;
}

.crm-panel-close {
  width: 30px;
  height: 30px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #ececec;
  color: #26325a;
  font-weight: 700;
}

.crm-contact-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
}

.crm-contact-form label,
.crm-tag-picker > span {
  color: #26325a;
  font-size: 13px;
  font-weight: 700;
}

.crm-contact-form input,
.crm-contact-form select,
.crm-contact-form textarea {
  width: 100%;
  margin-top: 4px;
  min-height: 34px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 5px 8px;
  font-weight: 400;
}

.crm-contact-notes,
.crm-tag-picker {
  grid-column: span 2;
}

.crm-contact-notes textarea {
  min-height: 86px;
  resize: vertical;
}

.crm-tag-picker {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px 12px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #f7f9fc;
  padding: 8px;
}

.crm-tag-picker > span,
.crm-tag-picker p {
  flex: 0 0 100%;
  margin: 0;
}

.crm-tag-picker label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  background: #eef4ff;
  color: #163d78;
  padding: 4px 8px;
  font-size: 12px;
}

.crm-tag-picker input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.crm-tag-dropdown {
  position: relative;
  overflow: visible;
}

.crm-tag-dropdown details {
  position: relative;
  flex: 0 0 100%;
  min-width: 220px;
}

.crm-tag-dropdown summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 5px 9px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.crm-tag-dropdown summary::-webkit-details-marker {
  display: none;
}

.crm-tag-dropdown summary::after {
  content: "v";
  color: #26325a;
  font-size: 12px;
  font-weight: 800;
}

.crm-tag-dropdown details[open] summary {
  border-color: #2f80d1;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.crm-tag-dropdown details[open] summary::after {
  transform: rotate(180deg);
}

.crm-tag-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: min(360px, 100%);
  max-height: 260px;
  display: grid;
  gap: 3px;
  overflow-y: auto;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
  padding: 6px;
}

.crm-tag-picker .crm-tag-dropdown-menu label,
.crm-record-tag-editor .crm-tag-dropdown-menu label {
  width: 100%;
  justify-content: flex-start;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 600;
}

.crm-tag-picker .crm-tag-dropdown-menu label:hover,
.crm-record-tag-editor .crm-tag-dropdown-menu label:hover {
  background: #eef4ff;
}

.crm-contact-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.crm-table-wrap {
  overflow: auto;
  border: 1px solid #d5d7dc;
  background: #fff;
  max-height: none;
}

.crm-table {
  width: 100%;
  min-width: 1400px;
  border-collapse: collapse;
  color: #31425f;
}

.crm-table th,
.crm-table td {
  border-right: 1px solid #d2d2d2;
  border-bottom: 1px solid #e4e4e4;
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f4f4;
  font-weight: 600;
}

.crm-filter-row th {
  top: 39px;
  background: #fafafa;
  padding: 5px 8px;
}

.crm-filter {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cfd4dc;
  border-radius: 3px;
  background: #fff;
  color: #25304f;
  padding: 3px 6px;
  font-size: 13px;
}

.crm-filter:focus {
  border-color: #2f80d1;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.crm-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.crm-row-command {
  width: 82px;
  text-align: center;
}

.crm-view-link,
.crm-card-view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid #0d6efd;
  border-radius: 4px;
  background: #fff;
  color: #0d6efd;
  padding: 0 10px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.crm-view-link:hover,
.crm-card-view-link:hover {
  background: #eaf3ff;
  color: #0a58ca;
}

.crm-kanban-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
  margin-bottom: 0;
}

.crm-search-combo {
  position: relative;
  width: min(640px, 100%);
}

.crm-search-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd4dc;
  border-radius: 5px;
  background: #fff;
  color: #25304f;
  overflow: hidden;
}

.crm-search-box > span {
  color: #647086;
  text-align: center;
  font-size: 20px;
  line-height: 1;
}

.crm-kanban-search {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: #fff;
  color: #25304f;
  padding: 5px 8px 5px 0;
}

.crm-filter-toggle {
  width: 34px;
  height: 36px;
  border: 0;
  border-left: 1px solid #cfd4dc;
  background: #f7f9fc;
  color: #26325a;
  font-weight: 700;
}

.crm-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(190px, .8fr) auto;
  gap: 18px;
  width: min(760px, calc(100vw - 32px));
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  padding: 14px;
}

.crm-filter-panel[hidden] {
  display: none;
}

.crm-filter-panel h2 {
  margin: 0 0 8px;
  color: #26325a;
  font-size: 15px;
  font-weight: 700;
}

.crm-search-results-section {
  grid-column: 1 / -1;
  border-bottom: 1px solid #e1e5ec;
  padding-bottom: 12px;
}

.crm-search-results-section[hidden] {
  display: none;
}

.crm-search-results {
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}

.crm-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(90px, .45fr);
  gap: 2px 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.crm-search-result:hover,
.crm-search-result:focus {
  border-color: #2f80d1;
  background: #eef4ff;
  outline: 0;
}

.crm-search-result strong {
  overflow: hidden;
  color: #172b55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-search-result span {
  color: #31425f;
  text-align: right;
  font-weight: 700;
}

.crm-search-result small {
  grid-column: 1 / -1;
  color: #647086;
}

.crm-search-result-empty {
  border: 1px dashed #cfd4dc;
  border-radius: 4px;
  color: #647086;
  padding: 10px;
}

.crm-filter-panel section {
  display: grid;
  align-content: start;
  gap: 8px;
}

.crm-filter-panel label {
  display: grid;
  gap: 4px;
  color: #26325a;
  font-size: 13px;
  font-weight: 600;
}

.crm-filter-panel .crm-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  font-weight: 500;
}

.crm-filter-panel-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.crm-kanban-select {
  min-height: 34px;
  min-width: 100%;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #25304f;
  padding: 5px 8px;
}

.crm-kanban-button {
  min-height: 34px;
  border: 1px solid #2f80d1;
  border-radius: 4px;
  background: #2f80d1;
  color: #fff;
  padding: 0 12px;
  font-weight: 600;
}

.crm-kanban-button.secondary {
  border-color: #cfd4dc;
  background: #ececec;
  color: #26325a;
}

.crm-kanban-search:focus,
.crm-search-box:focus-within,
.crm-kanban-select:focus {
  border-color: #2f80d1;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
}

.crm-kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 310px;
  gap: 12px;
  overflow: auto;
  padding-bottom: 12px;
}

.crm-kanban-column {
  border: 1px solid #cdd5e1;
  border-radius: 6px;
  background: #fff;
  min-height: 260px;
}

.crm-kanban-column.drop-target {
  border-color: #2f80d1;
  box-shadow: 0 0 0 3px rgba(47, 128, 209, .18);
}

.crm-kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #cdd5e1;
  background: #dfe9f6;
  padding: 9px 10px;
}

.crm-kanban-column h2 {
  margin: 0;
  color: #172b55;
  font-size: 16px;
  font-weight: 700;
}

.crm-kanban-column header span {
  border-radius: 12px;
  background: #fff;
  color: #26325a;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.crm-kanban-cards {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow-y: auto;
  padding: 10px;
}

.crm-kanban-card {
  border: 1px solid #d9dee8;
  border-radius: 5px;
  background: #fff;
  padding: 9px;
  cursor: grab;
}

.crm-kanban-card:hover {
  border-color: #2f80d1;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .12);
}

.crm-kanban-card:active {
  cursor: grabbing;
}

.crm-kanban-card.dragging {
  opacity: .55;
  border-color: #2f80d1;
}

.crm-kanban-card h3 {
  margin: 0 0 6px;
  color: #172b55;
  font-size: 15px;
  font-weight: 700;
}

.crm-card-view-link {
  min-height: 24px;
  margin-bottom: 7px;
  padding: 0 8px;
  font-size: 12px;
}

.crm-record-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 28px;
  color: #25304f;
}

.crm-record-crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: #647086;
  font-size: 18px;
}

.crm-record-crumbs a {
  color: #008b8b;
  text-decoration: none;
}

.crm-record-crumbs strong {
  color: #647086;
  font-weight: 500;
}

.crm-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid #cfd4dc;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

button.crm-contact-card {
  width: 100%;
  border: 1px solid #d5d7dc;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.crm-contact-card:hover,
.crm-contact-list-table tr[data-contact-open]:hover {
  background: #eef4ff;
}

.crm-contact-list-table tr[data-contact-open] {
  cursor: pointer;
}

.crm-contact-detail-dialog {
  width: min(980px, calc(100vw - 48px));
}

.crm-contact-detail-body {
  padding: 18px 22px 8px;
}

.crm-contact-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px 18px;
}

.crm-contact-detail-grid label,
.crm-contact-detail-notes {
  display: grid;
  gap: 5px;
  color: #5e6678;
  font-weight: 700;
}

.crm-contact-detail-grid input,
.crm-contact-detail-notes textarea {
  min-height: 34px;
  border: 1px solid transparent;
  border-bottom-color: #cfd4dc;
  background: #fff;
  color: #172b55;
  padding: 6px 8px;
  font-weight: 500;
}

.crm-contact-detail-notes {
  margin-top: 14px;
}

.crm-contact-detail-notes textarea {
  min-height: 90px;
  resize: vertical;
}

.crm-contact-detail-body .crm-tag-combobox {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 12px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #f7f9fc;
  padding: 8px;
}

.crm-tag-combobox-control {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  color: #172b55;
  padding: 6px 8px;
  text-align: left;
}

.crm-tag-combobox-control:disabled {
  cursor: default;
  opacity: 1;
}

.crm-tag-combobox.editable .crm-tag-combobox-control {
  border-color: #2f80d1;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .18);
  cursor: pointer;
}

.crm-tag-combobox-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 5px;
}

.crm-tag-combobox-placeholder {
  flex: 1 1 auto;
  color: #7b8496;
  font-weight: 500;
}

.crm-tag-combobox-arrow {
  margin-left: auto;
  color: #0f6f78;
  font-size: 12px;
  font-weight: 800;
}

.crm-tag-chip,
.crm-tag-menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 14px;
  padding: 4px 8px;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 700;
}

.crm-tag-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 0 0 1px;
}

.crm-tag-chip button:disabled {
  display: none;
}

.crm-tag-combobox-menu {
  position: absolute;
  right: 8px;
  bottom: calc(100% - 8px);
  left: 8px;
  z-index: 50;
  max-height: 480px;
  display: grid;
  gap: 3px;
  overflow-y: auto;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
  padding: 6px;
}

.crm-tag-combobox-menu[hidden] {
  display: none;
}

.crm-tag-combobox-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
}

.crm-tag-combobox-menu label:hover {
  background: #eef4ff;
}

.crm-tag-combobox-menu input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.crm-record-sheet {
  border: 1px solid #d5d7dc;
  background: #fff;
}

.crm-record-main {
  position: relative;
  padding: 24px 42px 28px;
}

.crm-smart-buttons {
  position: absolute;
  top: 0;
  right: 42px;
  display: flex;
  border: 1px solid #d5d7dc;
  border-top: 0;
  background: #fff;
}

.crm-smart-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 140px;
  min-height: 42px;
  border-right: 1px solid #d5d7dc;
  color: #26325a;
  padding: 5px 12px;
  text-decoration: none;
}

.crm-smart-button:last-child {
  border-right: 0;
}

.crm-smart-button:hover {
  background: #eef4ff;
  color: #163d78;
}

.crm-smart-button strong {
  color: #6b4b67;
  font-size: 17px;
}

.crm-smart-button span {
  font-size: 13px;
  font-weight: 700;
}

.crm-record-type {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
  color: #111827;
  font-weight: 700;
}

.crm-record-type input {
  accent-color: #00a09d;
}

.crm-contact-type-editor {
  display: flex;
  gap: 14px;
  margin: -4px 0 12px;
  color: #111827;
  font-weight: 700;
}

.crm-contact-type-editor input {
  accent-color: #008b8b;
}

.crm-record-name-input {
  display: block;
  width: min(720px, 100%);
  margin: 0 0 34px;
  border: 0;
  border-bottom: 2px solid #5f6368;
  background: transparent;
  color: #111827;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  padding-bottom: 8px;
}

.crm-record-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 56px;
}

.crm-contact-card dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.crm-contact-card dt {
  color: #5f6678;
  font-weight: 700;
}

.crm-contact-card dd {
  margin: 0;
  color: #25304f;
  overflow-wrap: anywhere;
}

.crm-record-column {
  display: grid;
  align-content: start;
  gap: 9px;
}

.crm-record-column label {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: #5f6678;
  font-weight: 700;
}

.crm-record-column input,
.crm-record-column select {
  min-height: 30px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #25304f;
  padding: 3px 4px;
  font-weight: 400;
}

.crm-record-column input:disabled,
.crm-record-column select:disabled {
  opacity: 1;
  appearance: none;
}

.crm-record-name-input.crm-record-editable,
.crm-record-column input.crm-record-editable,
.crm-record-column select.crm-record-editable,
.crm-record-notes-tags textarea.crm-record-editable {
  border-bottom-color: #2f80d1;
  background: #fff;
  box-shadow: 0 2px 0 rgba(47, 128, 209, .12);
}

.crm-record-tabs {
  border-top: 1px solid #d5d7dc;
  border-bottom: 1px solid #d5d7dc;
  padding-left: 42px;
}

.crm-record-tab {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #b78aa8;
  border-bottom-color: #fff;
  background: #fff;
  color: #111827;
  margin-bottom: -1px;
  padding: 0 14px;
}

.crm-record-contacts {
  padding: 22px 42px 30px;
}

.crm-record-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.crm-contact-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-contact-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5f6678;
  font-weight: 700;
}

.crm-contact-toolbar select {
  min-width: 145px;
}

.crm-record-section-title > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.crm-record-section-title h2 {
  margin: 0;
  color: #26325a;
  font-size: 18px;
  font-weight: 700;
}

.crm-record-section-title span {
  color: #647086;
}

.crm-contact-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 420px));
  gap: 12px 18px;
}

.crm-contact-card {
  min-height: 126px;
  border: 1px solid #cfd4dc;
  background: #fff;
  padding: 14px;
}

.crm-contact-card-link {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.crm-contact-card-link:hover {
  border-color: #2f80d1;
  color: inherit;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .14);
}

.crm-contact-card h3 {
  margin: 0 0 8px;
  color: #26325a;
  font-size: 16px;
  font-weight: 700;
}

.crm-contact-avatar {
  width: 64px;
  height: 64px;
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  background: #eef4ff;
  color: #163d78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.crm-contact-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-contact-card-body span {
  color: #31425f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-contact-list-wrap {
  overflow: auto;
}

.crm-contact-list-table {
  min-width: 980px;
}

.crm-contact-card-tags {
  margin-top: 10px;
}

.crm-contact-card p {
  margin: 10px 0 0;
  color: #31425f;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.crm-related-contact-add,
.crm-related-list-add {
  min-height: 126px;
  border: 1px solid #cfd4dc;
  background: #fff;
  color: #006d6a;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.crm-related-contact-add {
  padding: 14px;
}

.crm-related-contact-add:hover,
.crm-related-list-add:hover {
  border-color: #2f80d1;
  box-shadow: 0 0 0 2px rgba(47, 128, 209, .14);
}

.crm-related-list-add {
  width: 100%;
  min-height: 44px;
}

.crm-modal-open {
  overflow: hidden;
}

.crm-related-modal[hidden] {
  display: none;
}

.crm-related-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.crm-related-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .45);
}

.crm-related-dialog {
  position: relative;
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #aeb4bf;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .28);
  overflow: hidden;
}

.crm-related-header,
.crm-related-footer {
  display: flex;
  align-items: center;
  border-color: #d5d7dc;
  background: #fff;
}

.crm-related-header {
  justify-content: space-between;
  border-bottom: 1px solid #d5d7dc;
  padding: 16px 18px;
}

.crm-related-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
}

.crm-related-close {
  border: 0;
  background: transparent;
  color: #5f6678;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.crm-related-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.crm-related-role-row {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid #eef0f3;
  padding: 14px 18px 8px;
  color: #111827;
  font-weight: 700;
}

.crm-related-role-row input {
  accent-color: #008b8b;
}

.crm-related-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  padding: 0 18px 22px;
  overflow: auto;
}

.crm-related-avatar {
  width: 100px;
  height: 100px;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5d7dc;
  border-radius: 4px;
  background: #f8fafc;
  color: #7690b4;
  font-size: 40px;
  font-weight: 400;
}

.crm-related-fields {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.crm-related-fields label,
.crm-related-address {
  display: grid;
  gap: 5px;
  color: #111827;
  font-weight: 700;
}

.crm-related-fields input,
.crm-related-fields textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #c9ced6;
  background: transparent;
  color: #111827;
  padding: 6px 4px;
  font-weight: 400;
}

.crm-related-fields input:focus,
.crm-related-fields textarea:focus {
  outline: 0;
  border-bottom-color: #2f80d1;
  box-shadow: 0 2px 0 rgba(47, 128, 209, .14);
}

.crm-related-name-row,
.crm-related-two,
.crm-related-three {
  display: grid;
  gap: 12px;
}

.crm-related-name-row,
.crm-related-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-related-three {
  grid-template-columns: 1fr 1fr 110px;
}

.crm-related-address strong {
  color: #111827;
}

.crm-related-gln {
  max-width: 320px;
}

.crm-related-notes textarea {
  min-height: 86px;
  resize: vertical;
  white-space: pre-wrap;
}

.crm-related-footer {
  gap: 8px;
  border-top: 1px solid #d5d7dc;
  padding: 14px 18px;
}

.crm-related-primary {
  min-height: 36px;
  border: 1px solid #704468;
  border-radius: 4px;
  background: #704468;
  color: #fff;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.crm-related-primary:hover {
  background: #5c3456;
}

.crm-contact-panel.compact {
  margin-bottom: 16px;
}

.crm-record-notes-tags {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.crm-record-notes-tags > label,
.crm-record-tag-editor > span {
  color: #5f6678;
  font-weight: 700;
}

.crm-record-notes-tags textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #25304f;
  padding: 8px;
  resize: vertical;
  white-space: pre-wrap;
}

.crm-record-tag-editor {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px 10px;
}

.crm-record-tag-editor.crm-tag-combobox {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #f7f9fc;
  padding: 8px;
}

.crm-record-tag-editor > span,
.crm-record-tag-editor p {
  flex: 0 0 100%;
  margin: 0;
}

.crm-record-tag-editor label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  background: #eef4ff;
  color: #163d78;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.crm-record-tag-editor input:disabled {
  opacity: .75;
}

.crm-import-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.4fr) minmax(300px, .8fr);
  gap: 16px;
  align-items: start;
}

.crm-import-card {
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(23, 43, 85, .04);
}

.crm-import-status {
  display: grid;
  gap: 6px;
  max-width: 760px;
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid #2d7fd3;
  border-radius: 4px;
  background: #f5faff;
  color: #22325a;
}

.crm-import-status progress {
  width: 100%;
  height: 12px;
}

.crm-import-card h2 {
  margin: 0 0 14px;
  color: #26325a;
  font-size: 20px;
  font-weight: 700;
}

.crm-import-card label {
  display: grid;
  gap: 6px;
  color: #26325a;
  font-weight: 700;
}

.crm-import-card p {
  color: #647086;
  margin: 10px 0 14px;
}

.crm-import-file-form {
  display: grid;
  grid-template-columns: minmax(260px, 460px) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}

.crm-import-file-form .form-control,
.crm-import-map .form-select {
  min-height: 38px;
  border: 1px solid #cfd6df;
  border-radius: 4px;
  background: #fff;
  color: #172b55;
  padding: 6px 10px;
  font-size: 15px;
}

.crm-import-mapping-form {
  border-top: 1px solid #e4e7eb;
  padding-top: 16px;
}

.crm-import-section-title h3 {
  margin: 0;
  color: #26325a;
  font-size: 17px;
  font-weight: 700;
}

.crm-import-section-title p {
  margin: 4px 0 14px;
}

.crm-import-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 14px;
  margin-bottom: 14px;
}

.crm-import-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.crm-import-empty {
  border: 1px dashed #cfd6df;
  border-radius: 6px;
  background: #f7f9fc;
  color: #647086;
  padding: 18px;
}

@media (max-width: 900px) {
  .crm-import-layout,
  .crm-import-file-form {
    grid-template-columns: 1fr;
  }
}

.crm-kanban-card > strong {
  display: inline-flex;
  border-radius: 10px;
  background: #eef4ff;
  color: #163d78;
  padding: 2px 7px;
  font-size: 12px;
  margin-bottom: 7px;
}

.crm-kanban-card dl {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 3px 12px;
  margin: 0;
  font-size: 13px;
}

.crm-kanban-card dt {
  color: #647086;
  font-weight: 600;
  white-space: nowrap;
}

.crm-kanban-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.crm-kanban-card p {
  margin: 7px 0 0;
  color: #31425f;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.crm-details-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 24px;
}

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

.crm-details-header h1 {
  margin: 0;
  color: #26325a;
  font-size: 24px;
  font-weight: 700;
}

.crm-details-header span {
  color: #647086;
}

.crm-details-card {
  border: 1px solid #d5d7dc;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 14px;
  padding: 14px;
}

.crm-details-card h2 {
  margin: 0 0 12px;
  color: #26325a;
  font-size: 18px;
  font-weight: 700;
}

.crm-details-grid {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 150px minmax(180px, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.crm-details-grid dt {
  color: #647086;
  font-weight: 700;
}

.crm-details-grid dd {
  margin: 0;
  color: #25304f;
  overflow-wrap: anywhere;
}

.crm-details-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.crm-details-section-header span,
.crm-details-empty {
  color: #647086;
}

.crm-details-table-wrap {
  overflow: auto;
}

.crm-details-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  color: #31425f;
}

.crm-details-table th,
.crm-details-table td {
  border-right: 1px solid #d2d2d2;
  border-bottom: 1px solid #e4e4e4;
  padding: 8px 10px;
  vertical-align: top;
}

.crm-details-table th {
  background: #f4f4f4;
  font-weight: 700;
  white-space: nowrap;
}

.crm-details-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.crm-detail-tag {
  display: inline-flex;
  margin: 0 4px 4px 0;
  border-radius: 12px;
  background: #eef4ff;
  color: #163d78;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
}

.forecast-edit-page {
  width: calc(100vw - 32px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: 0 0 28px;
}

.forecast-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.forecast-edit-header h1 {
  margin: 0;
  color: #26325a;
  font-size: 24px;
  font-weight: 700;
}

.forecast-edit-header span {
  color: #647086;
}

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

.forecast-edit-list {
  display: grid;
  gap: 14px;
}

.forecast-edit-card {
  border: 2px solid #2f80d1;
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.forecast-edit-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.forecast-edit-card h2 {
  margin: 0;
  color: #172b55;
  font-size: 18px;
}

.forecast-edit-card header span {
  color: #647086;
}

.forecast-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
}

.forecast-edit-grid label,
.forecast-score-grid label,
.forecast-notes-edit {
  color: #26325a;
  font-weight: 600;
}

.forecast-edit-grid input,
.forecast-edit-grid select,
.forecast-score-grid input,
.forecast-notes-edit textarea {
  margin-top: 4px;
  font-weight: 400;
}

.forecast-score-panel {
  margin-top: 12px;
  border: 1px solid #d9dee8;
  border-radius: 4px;
  background: #f7f9fc;
  padding: 8px 10px;
}

.forecast-score-panel summary {
  cursor: pointer;
  color: #26325a;
  font-weight: 700;
}

.forecast-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.forecast-notes-edit {
  display: block;
  margin-top: 12px;
}

.forecast-notes-edit textarea {
  min-height: 120px;
  white-space: pre-wrap;
}

.app-top-action,
.crm-view-button,
.po-menu-button,
.po-action,
.crm-kanban-button.secondary,
.crm-view-link,
.crm-card-view-link,
.crm-related-list-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #ececec;
  color: #26325a;
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.app-top-action:hover,
.crm-view-button:hover,
.po-menu-button:hover,
.po-action:hover,
.crm-kanban-button.secondary:hover,
.crm-view-link:hover,
.crm-card-view-link:hover,
.crm-related-list-add:hover {
  border-color: #c3c7ce;
  background: #dde4eb;
  color: #26325a;
}

.app-top-action.active,
.crm-view-button.active,
.po-menu-button.active {
  border: 3px solid #2f80d1;
  background: #fff;
  color: #172b55;
  padding: 0 12px;
  box-shadow: none;
}

.po-menu-button.save,
.po-action.primary,
.crm-kanban-button,
.crm-related-primary {
  min-height: 36px;
  border: 1px solid #2f80d1;
  border-radius: 4px;
  background: #2f80d1;
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
}

.po-menu-button.save:hover,
.po-action.primary:hover,
.crm-kanban-button:hover,
.crm-related-primary:hover {
  background: #1f6eb9;
  color: #fff;
}

.po-menu-button.danger {
  margin-left: auto;
  border-color: #d33d45;
  background: #d33d45;
  color: #fff;
}

.po-menu-button.danger:hover {
  border-color: #b72f36;
  background: #b72f36;
  color: #fff;
}

.po-quick-modal .crm-related-dialog {
  width: min(860px, calc(100vw - 48px));
}

.po-quick-modal .po-quick-body {
  display: block;
  padding: 22px 28px 28px;
}

.po-quick-modal .po-quick-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px 28px;
  max-width: 760px;
  padding-top: 0;
}

.po-quick-modal .po-company-quick-fields {
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, .8fr);
}

.po-quick-modal .po-quick-fields label,
.po-quick-modal .po-quick-fields .po-quick-span {
  min-width: 0;
  gap: 8px;
  font-size: 16px;
  line-height: 1.25;
}

.po-quick-modal .po-quick-wide,
.po-quick-modal .po-quick-span {
  grid-column: 1 / -1;
}

.po-quick-modal .po-quick-fields input,
.po-quick-modal .po-quick-fields textarea {
  min-height: 38px;
  padding: 7px 6px;
  font-size: 15px;
}

.po-quick-modal .crm-related-footer {
  padding: 14px 28px;
}

.po-search-button {
  font-size: 15px;
  font-weight: 700;
}

.po-lookup-picker .crm-related-dialog {
  width: min(1080px, calc(100vw - 48px));
}

.po-picker-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 22px 22px;
}

.po-picker-body.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.po-picker-column {
  min-width: 0;
  border: 1px solid #d6dde8;
  border-radius: 6px;
  background: #f8fbff;
  padding: 12px;
}

.po-picker-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.po-picker-title-row h3 {
  margin: 0;
  color: #22305c;
  font-size: 17px;
  line-height: 1.2;
}

.po-picker-title-row span {
  display: block;
  margin-top: 3px;
  color: #6b768d;
  font-size: 12px;
  font-weight: 700;
}

.po-picker-search {
  width: 100%;
  min-height: 38px;
  margin-bottom: 10px;
  border: 1px solid #cbd4e1;
  border-radius: 4px;
  padding: 7px 10px;
  color: #22305c;
  background: #fff;
}

.po-picker-search:focus {
  border-color: #2f80d1;
  box-shadow: 0 0 0 3px rgba(47, 128, 209, .16);
  outline: 0;
}

.po-picker-results {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.po-picker-result,
.po-picker-empty {
  border: 1px solid #d5dce8;
  border-radius: 6px;
  background: #fff;
  color: #22305c;
  padding: 10px 12px;
}

.po-picker-result {
  text-align: left;
  cursor: pointer;
}

.po-picker-result:hover,
.po-picker-result:focus {
  border-color: #2f80d1;
  box-shadow: 0 0 0 3px rgba(47, 128, 209, .15);
  outline: 0;
}

.po-picker-result strong {
  display: block;
  margin-bottom: 3px;
  color: #142856;
  font-size: 15px;
}

.po-picker-result span {
  display: block;
  color: #657188;
  font-size: 13px;
  line-height: 1.35;
}

.po-picker-empty {
  color: #657188;
  border-style: dashed;
}

@media (max-width: 900px) {
  .po-picker-body {
    grid-template-columns: 1fr;
  }
}

.nav-logout-form {
  margin: 0;
}

.nav-logout-button {
  border: 0;
  background: transparent;
}

.access-page {
  min-height: 55vh;
  display: grid;
  place-items: center;
}

.access-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #fff;
  padding: 24px;
}

.access-card h1 {
  margin: 0;
  color: #172b55;
  font-size: 28px;
}

.access-card label {
  display: grid;
  gap: 6px;
  color: #26325a;
  font-weight: 700;
}

.access-card input,
.user-edit-panel input {
  min-height: 38px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  padding: 6px 10px;
}

.user-edit-form {
  display: grid;
  gap: 18px;
}

.user-edit-panel {
  width: min(680px, 100%);
  display: grid;
  gap: 8px;
}

.user-check {
  width: 20px;
  min-height: 20px !important;
  accent-color: #2f80d1;
}

.user-permissions-panel {
  width: min(980px, 100%);
  border: 2px solid #2f80d1;
  border-radius: 4px;
  background: #f6fbff;
  padding: 16px;
}

.user-permissions-panel h2,
.user-permission-group h3 {
  color: #172b55;
  font-weight: 800;
}

.user-permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.user-permission-group {
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #fff;
  padding: 12px;
}

.user-permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: #172b55;
  font-weight: 700;
}

.user-permission-option input {
  accent-color: #2f80d1;
}

.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-actions form {
  margin: 0;
}

.danger-link {
  border-color: #d33d45 !important;
  color: #b72f36 !important;
}

.crm-kanban-button.secondary {
  border-color: #d6d8dc;
  background: #ececec;
  color: #26325a;
}

input.app-date-input::-webkit-calendar-picker-indicator,
input[data-large-date-picker]::-webkit-calendar-picker-indicator {
  display: none;
}

.large-date-picker {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(19, 29, 51, .22);
}

.large-date-picker[hidden] {
  display: none;
}

.large-date-picker__dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #cbd4e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 43, 85, .28);
  padding: 18px;
  color: #172b55;
}

.large-date-picker__header {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.large-date-picker__header strong {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}

.large-date-picker__nav,
.large-date-picker__button {
  min-height: 44px;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  background: #ececec;
  color: #172b55;
  font-weight: 800;
}

.large-date-picker__nav {
  font-size: 30px;
  line-height: 1;
}

.large-date-picker__weekdays,
.large-date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.large-date-picker__weekdays {
  margin-bottom: 8px;
}

.large-date-picker__weekdays span {
  text-align: center;
  color: #6c778b;
  font-weight: 800;
}

.large-date-picker__day {
  aspect-ratio: 1;
  min-height: 54px;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  background: #f8fbff;
  color: #172b55;
  font-size: 18px;
  font-weight: 800;
}

.large-date-picker__day.outside {
  color: #a3adbd;
  background: #f2f4f7;
}

.large-date-picker__day.today {
  border-color: #2f80d1;
}

.large-date-picker__day.selected {
  background: #2f80d1;
  border-color: #2f80d1;
  color: #fff;
}

.large-date-picker__day:hover,
.large-date-picker__nav:hover,
.large-date-picker__button:hover {
  border-color: #2f80d1;
}

.large-date-picker__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.large-date-picker__button {
  min-width: 110px;
  padding: 0 16px;
}

@media (max-width: 1200px) {
  .po-topbar {
    flex-direction: column;
  }

  .po-menu {
    justify-content: flex-start;
  }

  .po-header-grid {
    grid-template-columns: 1fr 1fr;
  }

  .po-edit-panel {
    grid-template-columns: 1fr;
    max-width: 980px;
  }
}

@media (max-width: 768px) {
  .purchase-workbench {
    width: 100%;
    margin: 0;
  }

  .po-header-grid {
    grid-template-columns: 1fr;
  }

  .po-edit-grid {
    grid-template-columns: 1fr;
  }

  .notes-panel {
    grid-template-columns: 1fr;
  }

  .notes-panel label {
    text-align: left;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .field-row label,
  .field-row > span {
    text-align: left;
  }

  .delivery-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    padding: 16px;
  }

  .dashboard-hero span {
    justify-self: center;
  }

  .forecast-header {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-kpis {
    grid-template-columns: 1fr;
  }

  .forecast-zone-board {
    grid-template-columns: 1fr;
  }

  .forecast-project dl {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .forecast-edit-header {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-edit-grid,
  .forecast-score-grid {
    grid-template-columns: 1fr;
  }
}
