.wlf-standalone {
  background: #f4f7fb;
  margin: 0;
}

.wlf-standalone > .wp-site-blocks {
  padding: 0;
}

.wlf-modal,
.wlf-modal * {
  box-sizing: border-box;
}

.wlf-modal form {
  color: #172033;
  font-family: Arial, sans-serif;
}

.wlf-form-grid > label {
  min-width: 0;
}

.wlf-form-grid input,
.wlf-form-grid select,
.wlf-form-grid textarea {
  max-width: 100%;
  min-width: 0;
}

.wlf-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.wlf-shell th {
  text-align: left;
  background: #f4f7fb;
  color: #778295;
  padding: 10px 12px;
  white-space: nowrap;
}

.wlf-shell td {
  padding: 11px 12px;
  border-top: 1px solid #edf0f4;
  vertical-align: top;
}

.wlf-shell td b,
.wlf-shell td small {
  display: block;
}

.wlf-shell td small {
  color: #8993a2;
  font-size: 8px;
  margin-top: 3px;
}

.wlf-warning {
  background: #fff4df;
  border: 1px solid #f0d49d;
  border-radius: 9px;
  color: #805517;
  font-size: 11px;
  margin-bottom: 14px;
  padding: 11px 13px;
}

.wlf-audit {
  margin-top: 14px;
}

.wlf-audit .wlf-section-head {
  padding: 17px 19px 0;
}

/* Portal layout: keep the private application independent from theme styles. */
html {
  margin-top: 0 !important;
}

body.wlf-standalone {
  overflow-x: hidden;
}

body.wlf-standalone #wpadminbar {
  display: none !important;
}

.wlf-shell {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr) !important;
  margin: 0 !important;
  min-height: 100vh;
  width: 100%;
}

.wlf-sidebar {
  background: linear-gradient(180deg, #102846 0%, #173a61 100%) !important;
  display: flex !important;
  height: 100vh;
  min-height: 100vh;
  position: sticky;
  top: 0;
  visibility: visible !important;
  width: 250px;
}

.wlf-sidebar nav button {
  border-left: 3px solid transparent;
  font-size: 12px;
  padding: 13px 15px;
}

.wlf-sidebar nav button.active {
  background: linear-gradient(90deg, #245587, #20456d) !important;
  border-left-color: #f26735;
  box-shadow: inset 0 0 0 1px #ffffff0d;
}

.wlf-content {
  background:
    radial-gradient(circle at 100% 0, #eaf2ff 0, transparent 30%),
    #f5f8fc;
  margin: 0;
  max-width: none;
  min-width: 0;
  padding: 24px 28px 48px;
  width: 100%;
}

.wlf-top {
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  box-shadow: 0 8px 26px #173a6110;
  margin-bottom: 18px;
  padding: 15px 18px;
}

.wlf-top h1 {
  color: #102846;
  font-family: Arial, sans-serif;
  font-size: 27px !important;
  font-weight: 800;
  line-height: 1.15;
}

.wlf-eyebrow {
  color: #527097;
}

.wlf-user {
  background: #edf4ff;
  border-radius: 20px;
  color: #245587;
  font-weight: 700;
  padding: 7px 10px;
}

.wlf-primary {
  background: linear-gradient(135deg, #f4773e, #ef5731) !important;
  border-color: #ef5731 !important;
  box-shadow: 0 5px 14px #ef573124;
}

.wlf-primary:hover {
  filter: brightness(.97);
  transform: translateY(-1px);
}

.wlf-ghost,
.wlf-logout {
  border-color: #d8e2ee;
  box-shadow: 0 2px 8px #173a6108;
}

.wlf-cards {
  align-items: stretch;
  gap: 14px;
}

.wlf-cards article {
  border: 1px solid #dfe7f1;
  box-shadow: 0 8px 22px #173a610a;
  min-height: 132px;
  padding: 18px 19px;
}

.wlf-cards article:nth-child(1) {
  background: linear-gradient(145deg, #ffffff, #eef5ff);
}

.wlf-cards article:nth-child(2) {
  background: linear-gradient(145deg, #ffffff, #eefaf6);
}

.wlf-cards article:nth-child(3) {
  background: linear-gradient(145deg, #ffffff, #fff7e9);
}

.wlf-cards article:nth-child(4) {
  background: linear-gradient(145deg, #ffffff, #f4f1ff);
}

.wlf-cards strong {
  color: #102846;
}

.wlf-grid2 {
  align-items: stretch;
  gap: 14px;
}

.wlf-panel,
.wlf-table-panel {
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  box-shadow: 0 8px 24px #173a610a;
}

.wlf-panel {
  min-height: 100%;
  padding: 20px;
}

.wlf-panel h2,
.wlf-section-head h2 {
  color: #102846;
  font-family: Arial, sans-serif;
  font-size: 18px !important;
  font-weight: 800;
  line-height: 1.25;
}

.wlf-allocation div {
  border: 1px solid #e5ebf4;
}

.wlf-formula {
  border-left: 4px solid #f26735;
}

.wlf-tab > .wlf-section-head {
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  box-shadow: 0 8px 22px #173a6108;
  padding: 17px 19px;
}

.wlf-table-panel > .wlf-section-head {
  background: linear-gradient(90deg, #ffffff, #f3f7fd);
  border-bottom: 1px solid #e2e9f2;
  margin: 0;
  padding: 18px 20px;
}

.wlf-table-panel > .wlf-section-head p {
  margin-bottom: 0;
}

.wlf-shell th {
  background: #edf3fa;
  border-bottom: 1px solid #dce5f0;
  color: #516a8c;
  font-size: 9px;
  letter-spacing: .05em;
  padding: 12px 14px;
  text-transform: uppercase;
}

.wlf-shell td {
  background: #ffffff;
  padding: 13px 14px;
}

.wlf-shell tbody tr:hover td {
  background: #f8fbff;
}

.wlf-account-cards {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.wlf-account-cards article {
  position: relative;
}

.wlf-card-actions {
  display: flex;
  gap: 7px;
  margin-top: 14px;
}

.wlf-card-actions button {
  background: #edf4ff;
  border: 1px solid #d5e4f7;
  border-radius: 7px;
  color: #245587;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  padding: 6px 10px;
}

.wlf-card-actions button.danger {
  background: #fff1ef;
  border-color: #ffd8d2;
  color: #ad4038;
}

/* Enhanced transaction-type menu with one information control per type. */
.wlf-type-field {
  position: relative;
}

.wlf-native-type-select {
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
  position: absolute !important;
  width: 1px !important;
}

.wlf-type-picker {
  margin-top: 5px;
  position: relative;
  width: 100%;
}

.wlf-type-trigger {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  color: #25354d;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: space-between;
  min-height: 38px;
  padding: 9px 11px;
  text-align: left;
  width: 100%;
}

.wlf-type-trigger[aria-expanded="true"] {
  border-color: #3978c5;
  box-shadow: 0 0 0 3px #3978c51a;
}

.wlf-type-chevron {
  color: #5d7290;
  font-size: 15px;
}

.wlf-mini-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
  margin-top: 13px;
}

.wlf-mini-grid > div {
  background: #f6f9fd;
  border: 1px solid #e3eaf3;
  border-radius: 9px;
  padding: 12px;
}

.wlf-mini-grid span,
.wlf-mini-grid b {
  display: block;
}

.wlf-mini-grid span {
  color: #758096;
  font-size: 9px;
  margin-bottom: 5px;
}

.wlf-project-list {
  display: grid;
  gap: 14px;
}

.wlf-project-card {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-left: 4px solid #3978c5;
  border-radius: 14px;
  box-shadow: 0 8px 24px #173a610a;
  padding: 18px;
}

.wlf-project-card.completed {
  border-left-color: #24a475;
}

.wlf-project-card.cancelled {
  border-left-color: #c94d4d;
}

.wlf-project-card > header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.wlf-project-card h3 {
  color: #102846;
  font-size: 16px;
  margin: 8px 0 3px;
}

.wlf-project-card header p {
  color: #7d8999;
  font-size: 9px;
  margin: 0;
}

.wlf-status.completed {
  background: #e9f8f1;
  color: #17694e;
}

.wlf-status.cancelled {
  background: #fff0ef;
  color: #9e352e;
}

.wlf-project-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.wlf-project-columns > section {
  background: #f7f9fc;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  padding: 13px;
}

.wlf-project-columns h4 {
  color: #294a71;
  font-size: 10px;
  letter-spacing: .05em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.wlf-project-columns section > div:not(.wlf-progress):not(.wlf-readiness) {
  align-items: center;
  border-bottom: 1px solid #e7ecf3;
  display: flex;
  font-size: 9px;
  gap: 10px;
  justify-content: space-between;
  padding: 7px 0;
}

.wlf-project-columns section > div span {
  color: #778295;
}

.wlf-project-columns section > small {
  color: #778295;
  display: block;
  font-size: 8px;
  margin-top: 6px;
}

.wlf-progress {
  background: #dfe8f3;
  border-radius: 20px;
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
}

.wlf-progress i {
  background: #3978c5;
  display: block;
  height: 100%;
}

.wlf-progress.supplier i {
  background: #f08a3e;
}

.wlf-readiness {
  background: #fff4df;
  border-radius: 7px;
  color: #805517;
  font-size: 8px;
  font-weight: 700;
  margin-top: 10px;
  padding: 8px;
}

.wlf-readiness.ready {
  background: #e9f8f1;
  color: #17694e;
}

.wlf-cancel-note {
  background: #fff2f1;
  border: 1px solid #ffd6d2;
  border-radius: 8px;
  color: #8f3933;
  display: flex;
  font-size: 9px;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 11px;
}

.wlf-spaced {
  margin-top: 14px;
}

.wlf-budget-form {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
}

.wlf-budget-form label {
  min-width: 0;
}

.wlf-panel select,
.wlf-budget-form input,
.wlf-budget-form select {
  background: #fff;
  border: 1px solid #dbe1e8;
  border-radius: 7px;
  display: block;
  margin: 7px 0 0;
  max-width: 100%;
  padding: 9px;
  width: 100%;
}

.wlf-attribution {
  color: #7c8798;
  display: block;
  font-size: 8px;
  line-height: 1.5;
  margin-top: 9px;
}

.wlf-attribution a,
.wlf-live-field a {
  color: #3978c5;
}

.wlf-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wlf-small-danger {
  background: #fff0ef;
  border: 1px solid #ffd6d2;
  border-radius: 6px;
  color: #9e352e;
  cursor: pointer;
  font-size: 8px;
  padding: 5px 7px;
}

.wlf-form-divider {
  background: #edf4fc;
  border-left: 3px solid #3978c5;
  border-radius: 5px;
  color: #294a71;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.wlf-live-field {
  align-self: end;
}

.wlf-live-field > span {
  display: block;
  margin-bottom: 5px;
}

.wlf-modal[data-modal="project"] form {
  width: min(900px, 100%);
}

.wlf-modal[data-modal="transaction"] form {
  width: min(820px, 100%);
}

@media (max-width: 1100px) {
  .wlf-project-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .wlf-mini-grid,
  .wlf-budget-form {
    grid-template-columns: 1fr;
  }

  .wlf-project-card > header {
    display: block;
  }

  .wlf-project-card .wlf-card-actions {
    flex-wrap: wrap;
  }
}

.wlf-type-menu {
  background: #ffffff;
  border: 1px solid #d7e1ed;
  border-radius: 10px;
  box-shadow: 0 16px 38px #1028462b;
  left: 0;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 100002;
}

.wlf-type-menu[hidden] {
  display: none;
}

.wlf-type-option {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 26px;
  padding: 3px;
}

.wlf-type-option:last-child {
  border-bottom: 0;
}

.wlf-type-option.selected {
  background: #f0f6ff;
  border-radius: 7px;
}

.wlf-type-choice {
  background: transparent;
  border: 0;
  color: #25354d;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  padding: 8px;
  text-align: left;
}

.wlf-info-button {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #cfe0f7;
  border-radius: 50%;
  color: #2865ad;
  cursor: pointer;
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 22px;
}

.wlf-info-button:hover,
.wlf-info-button[aria-expanded="true"] {
  background: #2865ad;
  color: #ffffff;
}

.wlf-type-tip {
  background: #fff8ed;
  border: 1px solid #f6d6a6;
  border-radius: 7px;
  color: #744c1c;
  font-size: 9px;
  font-weight: 400;
  grid-column: 1 / -1;
  line-height: 1.45;
  margin: 0 4px 6px;
  padding: 8px 9px;
}

.wlf-type-tip[hidden] {
  display: none;
}

@media (max-width: 1000px) {
  .wlf-shell {
    grid-template-columns: 210px minmax(0, 1fr) !important;
  }

  .wlf-sidebar {
    width: 210px;
  }

  .wlf-content {
    padding: 20px 18px 40px;
  }

  .wlf-account-cards {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .wlf-shell {
    display: block !important;
  }

  .wlf-sidebar {
    height: auto;
    min-height: auto;
    position: relative;
    width: 100%;
  }

  .wlf-content {
    padding: 14px 10px 35px;
  }

  .wlf-top {
    padding: 13px;
  }

  .wlf-top h1 {
    font-size: 22px !important;
  }

  .wlf-account-cards {
    grid-template-columns: 1fr;
  }
}
