@font-face {
  font-family: Roboto;
  src: url('/roboto.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  font-family: Roboto, 'Segoe UI', Arial, sans-serif;
  color: #20384e;
  background: #f4f7fa;
  font-size: 14px;
  --navy: #12304d;
  --cyan: #00a7c4;
  --line: #dce5ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  background: var(--navy);
  color: white;
  padding: 16px 3%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
header strong {
  font-size: 27px;
  letter-spacing: -1px;
}
header b {
  color: #48d3e8;
}
header span {
  display: block;
  font-size: 12px;
  color: #c4d7e7;
}
header p {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.6px;
  margin: 8px 0;
}
h2 {
  font-size: 20px;
  margin: 8px 0 16px;
}
h3 {
  font-size: 18px;
}
h4 {
  font-size: 13px;
  margin: 10px 0;
}
p {
  line-height: 1.55;
  color: #526b7e;
}
small {
  display: block;
  color: #647b8f;
  font-size: 12px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--cyan);
  color: #062e42;
  padding: 10px 15px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}
button:hover {
  filter: brightness(0.95);
}
button.secondary {
  border-color: var(--line);
  background: white;
  color: #214760;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #f2c252;
  outline-offset: 3px;
}
input,
select {
  padding: 10px 12px;
  border: 1px solid #b9cbd9;
  border-radius: 6px;
  max-width: 100%;
  min-width: 0;
  background: white;
  color: #20384e;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: #008ba7;
  flex-shrink: 0;
}
#initialOperationalSetup {
  display: grid;
  width: 100%;
}
#initialOperationalSetup[hidden] {
  display: none;
}
#initialOperationalSetup fieldset {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  border: 1px solid #b9cbd9;
  border-radius: 6px;
}
#initialOperationalSetup label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
}
#initialOperationalSetup input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #008ba7;
}
label {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
}
form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 18px;
}
form > p,
form > .permissionGrid,
form > details {
  width: 100%;
}
form > label {
  flex: 1;
  min-width: 180px;
}
form .toolbar {
  width: 100%;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.toolbar h2 {
  margin-right: auto;
}
.contextBar {
  position: sticky;
  top: 0;
  background: #f4f7fa;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contextBar > div:first-child {
  margin-right: auto;
}
.contextBar h2 {
  margin: 2px 0;
  font-size: 21px;
}
.companyPicker {
  position: relative;
}
.companyButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  position: absolute;
  right: 0;
  top: 30px;
  background: white;
  box-shadow: 0 8px 30px #16344d22;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: min(360px, 85vw);
}
.companyButtons button {
  width: 100%;
  text-align: left;
  background: #f1f6f9;
}
.companyLine {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  flex-wrap: wrap;
}
.companyLine span {
  flex: 1;
  min-width: 180px;
}
nav {
  display: flex;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
nav button {
  background: transparent;
  color: #51697e;
}
nav button[aria-current='page'] {
  background: #dff3f7;
  color: #00677d;
}
.pageHeading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 0 8px;
}
.pageHeading p {
  margin: 8px 0;
}
.pageHeading small {
  letter-spacing: 1.3px;
  font-size: 11px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin: 18px 0;
}
.card > .toolbar {
  align-items: center;
  margin-bottom: 20px;
}
#loginPanel {
  max-width: 720px;
  margin: 60px auto;
}
#members .member,
.memberHead {
  display: grid;
  grid-template-columns: 1.05fr 1.4fr 1fr 0.65fr 0.8fr 0.8fr 1.5fr;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.memberHead {
  font-size: 12px;
  font-weight: 600;
  color: #637b8e;
  background: #f7f9fb;
  padding: 12px 0;
}
#members .member > span {
  overflow-wrap: anywhere;
  font-size: 13px;
}
#members .member > span:first-child {
  font-weight: 600;
}
.rowActions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rowActions button {
  font-size: 12px;
  padding: 7px 9px;
}
.statusCell {
  color: #226451;
}
.invitation {
  padding: 15px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
  line-height: 2;
}
.invitation button {
  margin-left: 10px;
  padding: 7px 10px;
  font-size: 12px;
}
.notice {
  background: #fff7dc;
  border-left: 4px solid #ecc254;
  padding: 18px;
  overflow-wrap: anywhere;
}
.error,
.success {
  border-radius: 6px;
  padding: 12px 16px;
}
.error {
  background: #fff0ed;
  color: #8b372f;
}
.success {
  background: #eaf5f0;
  color: #22634a;
}
#message:empty {
  display: none;
}
dialog {
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  box-shadow: 0 24px 80px #082f4f33;
}
dialog::backdrop {
  background: #102e4c88;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.dialogHeading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 16px;
}
.dialogHeading h2 {
  margin: 6px 0;
}
.dialogHeading p {
  margin: 4px 0;
}
.dialogMessage:not(:empty) {
  padding: 12px;
  background: #fff0ed;
  color: #8b372f;
}
.formFooter {
  position: sticky;
  bottom: -26px;
  background: white;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  z-index: 1;
}
.permissionGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
.permissionGrid fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 14px;
}
.permissionGrid legend {
  font-weight: 600;
  color: var(--navy);
  padding: 0 5px;
}
.permissionResource + .permissionResource {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 4px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  min-width: 0;
  font-size: 13px;
}
.check input {
  margin: 0;
}
.scopeRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 54px;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  min-height: 32px;
}
.scopeRow input {
  justify-self: center;
}
.scopeHeader {
  color: #667b8a;
  font-size: 10px;
}
.scopeHeader span:not(:first-child) {
  text-align: center;
}
#scopes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.permissionTabs button[aria-pressed='true'] {
  background: #dbf2f6;
  border-color: #5cb7c8;
}
.permissionTabs button[aria-pressed='false'] {
  background: white;
  border-color: var(--line);
}
summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
}
details form {
  margin-top: 18px;
}
.historyEntry {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
a {
  color: #007991;
}
footer {
  text-align: center;
  padding: 28px;
  color: #738594;
  font-size: 12px;
}
.resourceList .member {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.resourceList .member span {
  flex: 1;
  overflow-wrap: anywhere;
  min-width: 180px;
}
.resourceForm {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#bridge {
  margin-top: 18px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .permissionGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #scopes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .memberHead {
    display: none;
  }
  #members .member {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #members .member > span:before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: #6c8293;
    margin-bottom: 4px;
  }
  .rowActions {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  header {
    padding: 14px 18px;
  }
  header p {
    max-width: 58%;
    font-size: 11px;
  }
  main {
    padding: 0 16px;
  }
  .contextBar {
    gap: 8px;
    padding: 12px 0;
  }
  .contextBar h2 {
    font-size: 18px;
  }
  .contextBar .toolbar {
    gap: 6px;
  }
  .contextBar button {
    font-size: 11px;
    padding: 7px;
  }
  h1 {
    font-size: 24px;
  }
  .card {
    padding: 16px;
  }
  .pageHeading {
    padding-top: 22px;
  }
  nav {
    gap: 4px;
  }
  nav button {
    font-size: 12px;
    padding: 9px;
  }
  #members .member {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .permissionGrid,
  #scopes {
    grid-template-columns: 1fr;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }
  .formFooter {
    bottom: -16px;
  }
  .dialogHeading h2 {
    font-size: 18px;
  }
  form > label {
    width: 100%;
    flex: auto;
    min-width: 0;
  }
  .companyLine span {
    width: 100%;
    flex: auto;
  }
  .toolbar label {
    max-width: 100%;
  }
  .dialogHeading button {
    font-size: 12px;
  }
  .resourceDetails {
    overflow-wrap: anywhere;
  }
}

header p {
  color: #d5e3ef;
}
/* Administration shell: company context stays visible; business screens share a compact canvas. */
#workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
}
#workspace > .contextBar {
  grid-column: 1/-1;
}
#workspace > #navigation {
  grid-column: 1;
  grid-row: 2/8;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: sticky;
  top: 92px;
  border: 0;
  padding: 24px 0;
  gap: 6px;
}
#navigation button {
  text-align: left;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 7px;
}
.navLabel {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.3px;
  padding: 0 14px;
  margin: 12px 0 6px;
}
#workspace > #admin,
#workspace > #modelsSection,
#workspace > #companyAdmin,
#workspace > #resourceArea,
#workspace > #modules {
  grid-column: 2;
  min-width: 0;
}
#modules:empty {
  display: none;
}
.pageHeading {
  padding: 22px 0 6px;
  gap: 12px;
}
.pageHeading h1 {
  font-size: 26px;
}
.pageHeading p {
  max-width: 650px;
  font-size: 13px;
}
.card {
  padding: 20px;
  margin: 14px 0;
  border-color: #e3eaf0;
  box-shadow: 0 2px 4px #16344d03;
}
.card > .toolbar {
  margin-bottom: 14px;
}
.card > .toolbar h2 {
  font-size: 17px;
}
#members .member,
.memberHead {
  gap: 12px;
  padding: 14px 0;
  grid-template-columns: 1.05fr 1.3fr 1fr 0.65fr 0.8fr 0.85fr 1.4fr;
}
#members .member > span {
  font-size: 12px;
}
.memberHead {
  font-size: 11px;
  padding: 10px 0;
}
.rowActions {
  gap: 4px;
}
.rowActions button {
  padding: 6px 8px;
  font-size: 11px;
}
.countBadge {
  display: inline-block;
  background: #e7f1f6;
  color: #49677e;
  font-size: 11px;
  border-radius: 12px;
  padding: 3px 8px;
  vertical-align: middle;
  margin-left: 4px;
}
#admin > .card {
  container-type: inline-size;
}
.modelCards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.modelCard {
  padding: 20px !important;
  text-align: left;
  display: grid;
  gap: 10px;
  border-color: #dce8ee !important;
  box-shadow: inset 3px 0 #00a7c4;
}
.modelCard strong {
  font-size: 15px;
}
.modelCard span {
  font-size: 12px;
  font-weight: 400;
  color: #607a8c;
}
.permissionFocus {
  display: flex;
  width: 100%;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}
.permissionFocus label {
  min-width: 220px;
}
.permissionGrid.focusedModule,
#scopes.focusedModule {
  display: block;
}
.permissionGrid.focusedModule fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.permissionGrid.focusedModule .permissionResource {
  margin: 0;
  padding: 0;
  border-top: 0;
}
.permissionGrid.focusedModule legend {
  font-size: 15px;
  padding: 0 8px 0 0;
}
#editDialog {
  max-width: 1100px;
}
.dialogHeading {
  margin-bottom: 16px;
  padding-bottom: 12px;
}
.dialogHeading h2 {
  font-size: 21px;
}
#edit > p {
  margin: 0;
  font-size: 13px;
}
@container (max-width:940px) {
  .memberHead {
    display: none;
  }
  #members .member {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #members .member > span:before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: #6c8293;
    margin-bottom: 3px;
  }
  .rowActions {
    grid-column: 1/-1;
  }
}
@media (max-width: 1000px) {
  #workspace {
    grid-template-columns: 155px minmax(0, 1fr);
    column-gap: 18px;
  }
  #navigation button {
    font-size: 12px;
    padding: 10px;
  }
  .navLabel {
    font-size: 9px;
    padding: 0 10px;
  }
  .pageHeading h1 {
    font-size: 23px;
  }
  .permissionGrid.focusedModule fieldset {
    gap: 12px;
  }
  .modelCards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  #workspace {
    display: block;
  }
  #workspace > #navigation {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 4px;
    border-bottom: 1px solid var(--line);
  }
  .navLabel {
    display: none;
  }
  #navigation button {
    padding: 8px;
  }
  .pageHeading {
    padding-top: 20px;
  }
  .card {
    padding: 16px;
  }
  .permissionGrid.focusedModule fieldset {
    grid-template-columns: 1fr;
  }
  .permissionFocus label {
    min-width: 0;
    width: 100%;
  }
  .modelCards {
    grid-template-columns: 1fr;
  }
  #members .member {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card > .toolbar label {
    flex: 1;
    min-width: 120px;
  }
  .dialogHeading h2 {
    font-size: 18px;
  }
}

/* NOW Hub account working surface; local module tokens, no authorization changes. */
.bankModule {
  --navy: #063154;
  --cyan: #025f67;
  --line: #bcc5cc;
  color: #063154;
  background: #f7f6f2;
  padding: 20px;
  margin-top: 16px;
  border-radius: 8px;
  font-size: 12px;
  container-type: inline-size;
}
.bankHeading {
  border-top: 2px solid #2f9d94;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.bankHeading h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.bankHeading p {
  margin: 0 0 8px;
  font-size: 12px;
}
.bankHeading small {
  font-size: 12px;
  font-weight: 600;
}
.bankModule button {
  background: #025f67;
  color: white;
  font:
    500 12px Roboto,
    sans-serif;
  border: 1px solid #025f67;
  padding: 8px 12px;
  border-radius: 5px;
}
.bankModule button.secondary,
.bankModule .resourceFilters button {
  background: transparent;
  color: #025f67;
}
.bankModule input,
.bankModule select {
  font:
    400 12px Roboto,
    sans-serif;
  min-width: 0;
  padding: 8px;
  border-color: #bcc5cc;
}
.bankModule .resourceFilters {
  margin: 20px 0 12px;
  gap: 8px;
}
.bankList {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  table-layout: fixed;
  font-size: 12px;
}
.bankList th {
  background: #063154;
  color: #fff;
  font-weight: 500;
  text-align: left;
  padding: 12px 8px;
}
.bankList td {
  padding: 12px 8px;
  border-bottom: 1px solid #bcc5cc;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.bankList th:nth-child(1),
.bankList th:nth-child(2) {
  width: 17%;
}
.bankList th:last-child {
  width: 56px;
}
.bankList tbody tr:nth-child(even) {
  background: #fff;
}
.bankBadge {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 11px;
}
.bankBadge.active {
  background: #e0eeeb;
  color: #025f67;
}
.bankBadge.inactive {
  background: #e6e9ec;
  color: #063154;
}
.bankBadge.primary {
  background: #025f67;
  color: white;
}
.bankActions {
  position: relative;
}
.bankActions summary {
  cursor: pointer;
  color: #025f67;
  padding: 6px;
  list-style: none;
  text-align: center;
}
.bankActions summary::-webkit-details-marker {
  display: none;
}
.bankActions[open] {
  z-index: 2;
}
.bankActionMenu {
  position: absolute;
  right: 0;
  top: 100%;
  width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid #bcc5cc;
  border-radius: 6px;
  box-shadow: 0 3px 10px #06315415;
  display: grid;
  gap: 4px;
}
.bankActions .bankActionMenu button {
  text-align: left;
  background: white;
  color: #025f67;
  border: 0;
  width: 100%;
}
.bankActions .bankActionMenu button:hover {
  background: #e0eeeb;
}
.bankForm {
  background: #fff;
  padding: 20px;
  border: 1px solid #bcc5cc;
  border-radius: 8px;
  margin: 16px 0;
}
.bankForm > h3,
.bankForm > p {
  width: 100%;
  margin: 4px 0 12px;
}
.bankForm fieldset {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  border-top: 1px solid #bcc5cc;
  padding: 14px 0;
}
.bankForm legend {
  font-size: 12px;
  font-weight: 600;
  color: #025f67;
  padding: 0 8px 0 0;
}
.bankForm fieldset p {
  grid-column: 1/-1;
  margin: 0;
}
.bankForm label {
  min-width: 0;
}
.bankDetail {
  overflow-wrap: anywhere;
  font-size: 12px;
  border-color: #bcc5cc;
}
@container (max-width:850px) {
  .bankList thead {
    display: none;
  }
  .bankList,
  .bankList tbody {
    display: block;
  }
  .bankList .bankRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid #bcc5cc;
    padding: 8px 0;
  }
  .bankList td {
    border: 0;
    padding: 6px;
  }
  .bankList td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: #025f67;
    margin-bottom: 3px;
  }
  .bankActions summary {
    text-align: left;
  }
  .bankActionMenu {
    right: auto;
    left: 0;
  }
}
@media (max-width: 600px) {
  .bankModule {
    padding: 12px;
  }
  .bankHeading {
    align-items: start;
    flex-wrap: wrap;
  }
  .bankForm fieldset {
    grid-template-columns: 1fr;
  }
  .bankList .bankRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bankList td:last-child {
    grid-column: 1/-1;
  }
}

/* Movimentações — homologação */
.movement-filters,
.movement-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.movement-form h3 {
  grid-column: 1/-1;
}
.movement-area label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.movement-table-scroll {
  overflow: auto;
}
.movement-area table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.movement-area th,
.movement-area td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #bcc5cc;
}
.movement-area th {
  background: #063154;
  color: white;
}
.movement-area .money {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.movement-area td button {
  font-size: 12px;
  padding: 4px 7px;
  margin: 2px;
}
.movement-area h4 {
  color: #025f67;
  border-bottom: 1px solid #bcc5cc;
  padding-bottom: 6px;
}
.movement-area section {
  margin-top: 20px;
}
.movement-area button {
  background: #025f67;
  color: #fff;
}
.movement-area input,
.movement-area select {
  max-width: 100%;
  min-width: 0;
}
@media (max-width: 800px) {
  .movement-filters,
  .movement-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .movement-area {
    min-width: 0;
  }
  .movement-table-scroll {
    max-width: 100%;
  }
}

.movement-badge {
  display: inline-block;
  border: 1px solid #bcc5cc;
  background: #f7f6f2;
  color: #063154;
  border-radius: 4px;
  padding: 3px 5px;
}
.movement-area td button {
  min-height: 24px;
}
.movement-area td {
  vertical-align: middle;
}
.movement-area table {
  line-height: 1.35;
}

/* NOW Hub — global visual contract. No module-specific palette overrides. */
:root {
  --off-white: #f7f6f2;
  --azure: #bcc5cc;
  --cyan: #2f9d94;
  --teal: #025f67;
  --navy: #063154;
  --line: #bcc5cc;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  font-family: Roboto, Arial, sans-serif;
  font-size: 13px;
  color: var(--navy);
  background: var(--off-white);
}
body {
  background: var(--off-white);
  color: var(--navy);
}
header {
  height: 64px;
  padding: 8px 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  border-bottom: 3px solid var(--cyan);
}
.headerBrand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brandMark {
  position: relative;
  display: inline-block;
  width: 180px;
  height: 44px;
  overflow: hidden;
  flex: none;
}
.brandMark img {
  position: absolute;
  width: 180px;
  height: 180px;
  max-width: none;
  left: 0;
  top: -69px;
}
.environmentTag {
  color: var(--azure);
  border-left: 1px solid var(--azure);
  padding-left: 16px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
header .userMenu {
  position: relative;
  color: white;
  max-width: 45%;
}
header .userMenu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 400;
  padding: 8px;
  list-style: none;
}
header .userMenu summary span {
  font-size: 12px;
  color: inherit;
  overflow-wrap: anywhere;
}
header .userMenu svg {
  flex: none;
}
.userMenuPanel {
  position: absolute;
  right: 0;
  top: 100%;
  width: 200px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 24px #06315418;
}
.userMenuPanel button {
  text-align: left;
}
main {
  max-width: 1680px;
  padding: 0 24px;
}
h1,
.pageHeading h1 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 8px 0;
}
h2,
.card > .toolbar h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 16px;
}
h3 {
  font-size: 14px;
}
h4 {
  font-size: 13px;
}
p,
small {
  color: var(--navy);
}
small {
  font-size: 11px;
  line-height: 1.5;
}
.pageHeading {
  padding: 16px 0 8px;
}
.pageHeading p {
  font-size: 13px;
  margin: 4px 0 8px;
}
#workspace {
  grid-template-columns: 188px minmax(0, 1fr);
  column-gap: 24px;
}
#workspace > .contextBar {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--off-white);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
  padding: 12px 0;
  gap: 16px;
  min-height: 72px;
}
.contextBar h2 {
  font-size: 16px;
  color: var(--navy);
}
.contextBar small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contextBar .companyPicker summary {
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--teal);
}
.companyButtons {
  top: 40px;
  padding: 8px;
  z-index: 35;
  border-color: var(--line);
  box-shadow: 0 8px 24px #06315418;
}
.companyButtons button {
  background: var(--off-white);
  color: var(--navy);
}
#workspace > #navigation {
  top: 152px;
  padding: 16px 0;
  gap: 4px;
  background: var(--off-white);
  max-height: calc(100dvh - 152px);
  overflow-y: auto;
}
#navigation button {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: var(--navy);
  border: 1px solid transparent;
  min-height: 40px;
}
#navigation button svg {
  flex: none;
}
#navigation button:hover {
  background: #bcc5cc30;
}
#navigation button[aria-current='page'] {
  color: var(--teal);
  background: #2f9d9418;
  border-left: 3px solid var(--teal);
  padding-left: 10px;
  font-weight: 650;
}
.navLabel {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--teal);
  padding: 0 12px;
  margin: 16px 0 4px;
}
#workspace > #movementArea {
  grid-column: 2;
  min-width: 0;
}
#menuToggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
#workspace.navCollapsed {
  grid-template-columns: minmax(0, 1fr);
}
#workspace.navCollapsed > #navigation {
  display: none;
}
#workspace.navCollapsed > #admin,
#workspace.navCollapsed > #modelsSection,
#workspace.navCollapsed > #companyAdmin,
#workspace.navCollapsed > #resourceArea,
#workspace.navCollapsed > #movementArea,
#workspace.navCollapsed > #modules {
  grid-column: 1;
}
button,
.bankModule button,
.movement-area button {
  min-height: 32px;
  padding: 8px 12px;
  line-height: 1.25;
  font:
    600 12px Roboto,
    Arial,
    sans-serif;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: var(--cyan);
  color: #05253d;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover,
.bankModule button:hover,
.movement-area button:hover {
  filter: none;
  background: #2f9d9426;
  border-color: var(--teal);
  color: var(--navy);
}
button.secondary,
.bankModule button.secondary,
.resourceFilters button,
.movement-filters button {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
button.secondary:hover,
.resourceFilters button:hover {
  background: #bcc5cc26;
  border-color: var(--teal);
}
button:disabled,
.bankModule button:disabled,
.movement-area button:disabled {
  opacity: 1;
  background: #bcc5cc44;
  color: #52616d;
  border-color: #bcc5cc80;
  cursor: not-allowed;
}
button[aria-busy='true'] {
  cursor: wait;
}
button.danger {
  background: #fff4f2;
  color: #9d2929;
  border-color: #d5a5a0;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
header :focus-visible {
  outline-color: var(--cyan);
}
input,
select,
textarea,
.bankModule input,
.bankModule select {
  font:
    400 13px Roboto,
    Arial,
    sans-serif;
  padding: 8px 12px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--navy);
  max-width: 100%;
}
label,
.bankForm label {
  font-size: 12px;
  gap: 8px;
  color: var(--navy);
}
input[type='checkbox'],
input[type='radio'] {
  min-height: 16px;
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
  background: #bcc5cc24;
  color: #52616d;
  cursor: not-allowed;
}
label:has(input[required])::before {
  content: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
}
.card,
.bankForm,
.resourceDetails,
.bankDetail {
  background: white;
  border: 1px solid #bcc5cc90;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 2px 8px #06315404;
}
.bankModule {
  --navy: #063154;
  --cyan: #2f9d94;
  --line: #bcc5cc;
  background: transparent;
  padding: 0;
  font-size: 13px;
}
.bankHeading {
  border: 0;
  padding-top: 8px;
}
.resourceForm,
.movement-form {
  gap: 16px;
}
.bankForm fieldset {
  gap: 16px;
  padding: 16px 0;
}
.bankForm legend {
  font-size: 12px;
}
.toolbar,
.resourceFilters {
  gap: 8px;
}
.resourceFilters {
  padding: 12px 0;
}
.modelCards {
  gap: 16px;
}
.modelCard {
  border-color: var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
  background: white;
}
#loginPanel {
  max-width: 440px;
  margin: 64px auto;
  padding: 32px;
  border-top: 3px solid var(--teal);
  box-shadow: 0 12px 32px #06315408;
}
#loginPanel h1 {
  margin-top: 24px;
}
#loginPanel form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
#loginPanel .loginLogo {
  display: block;
  width: 180px;
  height: 44px;
}
#loginPanel button {
  min-height: 40px;
}
#acceptPanel {
  max-width: 560px;
  margin: 32px auto;
}
.bankList,
.movement-area table {
  font-size: 12px;
  line-height: 1.4;
  margin: 12px 0;
  width: 100%;
}
.bankList th,
.movement-area th,
.memberHead {
  background: #bcc5cc30;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.bankList td,
.movement-area td {
  padding: 8px;
  vertical-align: middle;
  border-bottom: 1px solid #bcc5cc70;
}
.bankList tbody tr:nth-child(even) {
  background: transparent;
}
.bankList tbody tr:hover,
.movement-area tr:has(td):hover,
.resourceList .member:hover,
#members .member:hover {
  background: #2f9d9408;
}
.movement-area .money {
  text-align: right;
}
.movement-area td:last-child {
  width: 60px;
}
.movement-area th:last-child {
  width: 60px;
}
.resourceList .member {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #bcc5cc70;
  border-radius: 0;
  padding: 12px 8px;
  background: transparent;
  margin: 0;
}
.resourceList .member > span {
  flex: 1;
  font-size: 13px;
  min-width: 0;
}
.resourceList {
  border: 1px solid #bcc5cc70;
  border-radius: 6px;
}
.resourceList > p {
  padding: 16px;
}
.rowMenu,
.bankActions {
  position: relative;
  display: block;
}
.rowMenu > summary,
.bankActions > summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  padding: 4px 8px;
  min-height: 32px;
  min-width: 32px;
  color: var(--teal);
  border: 1px solid transparent;
  border-radius: 6px;
}
.rowMenu > summary:hover,
.bankActions > summary:hover {
  background: #2f9d9418;
  border-color: var(--line);
}
.rowMenu > summary::-webkit-details-marker {
  display: none;
}
.rowMenu[open],
.bankActions[open] {
  z-index: 20;
}
.rowMenu > .rowActions {
  display: none;
}
.rowMenu[open] > .rowActions,
.bankActionMenu {
  display: grid;
  position: absolute;
  right: 0;
  top: 100%;
  width: 188px;
  padding: 8px;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px #06315418;
}
.rowActions button,
.bankActions .bankActionMenu button,
.movement-area .rowActions button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--navy);
  border-color: transparent;
  font-size: 12px;
  padding: 8px;
  margin: 0;
}
.rowActions button:hover,
.bankActions .bankActionMenu button:hover {
  background: #2f9d9418;
}
.movement-table-scroll {
  padding-bottom: 160px;
  margin-bottom: -144px;
}
#members .member {
  padding: 12px 8px;
  gap: 12px;
}
.statusCell,
.bankBadge,
.movement-badge,
.countBadge {
  font-size: 11px;
  font-weight: 500;
  color: var(--teal);
  background: #2f9d9414;
  border: 1px solid #2f9d9444;
  border-radius: 4px;
  padding: 4px 8px;
}
.statusCell {
  justify-self: start;
}
.bankBadge.inactive {
  color: var(--navy);
  background: #bcc5cc30;
  border-color: var(--line);
}
.bankBadge.primary {
  background: var(--teal);
  color: white;
}
.countBadge {
  display: inline-block;
}
.permissionTabs button[aria-pressed='true'] {
  color: var(--teal);
  background: #2f9d9418;
  border-color: var(--teal);
}
dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border-color: var(--line);
  border-radius: 12px;
  color: var(--navy);
  box-shadow: 0 24px 64px #06315433;
}
dialog::backdrop {
  background: #06315488;
}
.dialogHeading {
  padding-bottom: 16px;
  gap: 16px;
}
.dialogHeading h2 {
  font-size: 18px;
}
.permissionGrid {
  gap: 16px;
}
.permissionGrid fieldset {
  padding: 16px;
  border-color: var(--line);
  border-radius: 6px;
}
.check {
  font-size: 12px;
  gap: 8px;
}
.historyEntry {
  padding: 12px 0;
  border-color: var(--line);
}
.notice {
  background: #bcc5cc20;
  border-color: var(--teal);
  color: var(--navy);
}
#message.success {
  background: #2f9d9418;
  color: var(--teal);
  border: 1px solid #2f9d9444;
}
#message.error {
  background: #fff4f2;
  color: #9d2929;
  border: 1px solid #d5a5a0;
}
#message {
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  margin: 12px 0;
}
footer {
  color: var(--navy);
  font-size: 11px;
  padding: 24px;
}
@media (max-width: 1100px) {
  main {
    padding: 0 16px;
  }
  #workspace {
    grid-template-columns: 164px minmax(0, 1fr);
    gap: 16px;
  }
  #navigation button {
    font-size: 12px;
    padding: 8px;
  }
  .pageHeading h1 {
    font-size: 20px;
  }
  .movement-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #members {
    overflow-x: auto;
  }
  #members .member,
  .memberHead {
    min-width: 700px;
  }
}
@media (max-width: 800px) {
  #workspace {
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 12px;
  }
  #navigation button {
    gap: 8px;
    font-size: 11px;
  }
  .navLabel {
    letter-spacing: 0.04em;
    padding: 0 8px;
  }
  .environmentTag {
    display: none;
  }
  header {
    padding: 8px 16px;
  }
  .movement-filters,
  .movement-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bankForm fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 12px;
  }
  header {
    padding: 8px 12px;
  }
  .headerBrand .brandMark {
    width: 132px;
    height: 36px;
  }
  .headerBrand .brandMark img {
    width: 132px;
    height: 132px;
    top: -49px;
  }
  header .userMenu {
    max-width: 52%;
  }
  header .userMenu summary span {
    font-size: 11px;
  }
  #workspace {
    display: block;
  }
  #workspace > .contextBar {
    top: 64px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    min-height: 80px;
  }
  .contextBar > div:first-child {
    flex: 1 1 100%;
    margin: 0;
  }
  .contextBar h2 {
    font-size: 15px;
  }
  #workspace > #navigation {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px 0;
    max-height: none;
    gap: 4px;
  }
  #navigation .navLabel {
    grid-column: 1/-1;
    display: block;
    margin: 8px 0 0;
  }
  #workspace.navCollapsed > #navigation {
    display: none;
  }
  .pageHeading {
    padding-top: 12px;
  }
  .card {
    padding: 12px;
    margin: 12px 0;
  }
  #loginPanel {
    margin: 32px auto;
    padding: 24px;
  }
  #members .member {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }
  #members .member > div:last-child {
    grid-column: 2;
    justify-self: end;
  }
  .memberHead {
    display: none;
  }
  .bankForm fieldset {
    grid-template-columns: 1fr;
  }
  .movement-area table {
    min-width: 800px;
  }
  .movement-table-scroll {
    max-width: 100%;
  }
  dialog {
    padding: 16px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .userMenuPanel {
    max-width: calc(100vw - 24px);
  }
}
.headerSession {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  max-width: 60%;
}
header .headerSession .userMenu {
  max-width: none;
  min-width: 0;
}
header button.headerLogout {
  flex: none;
  color: white;
  background: transparent;
  border-color: var(--azure);
}
header button.headerLogout:hover {
  color: var(--navy);
  background: var(--azure);
}
@media (max-width: 600px) {
  .headerSession {
    max-width: 60%;
    gap: 4px;
  }
  header .headerSession .userMenu summary {
    padding: 4px;
  }
  .headerSession .userMenu summary span {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  header button.headerLogout {
    padding: 8px;
    min-width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.dashboardArea {
  grid-column: 2;
  min-width: 0;
}
.dashboardGrid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.dashboardCalendar,
.dashboardPayments {
  min-height: 260px;
}
.dashboardEmpty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  border: 1px dashed #b8c6cf;
  border-radius: 8px;
  margin-top: 16px;
  padding: 20px;
  text-align: center;
}
.dashboardCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.dashboardCards strong {
  display: block;
  font-size: 26px;
  margin-top: 14px;
  color: var(--navy);
}
@media (max-width: 800px) {
  .dashboardGrid,
  .dashboardCards {
    grid-template-columns: 1fr;
  }
}
.dashboardCalendarHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dashboardCalendarHead h2 {
  margin: 0;
}
.dashboardCalendarHead select {
  max-width: 190px;
}
.dashboardMonth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 8px;
  font-size: 18px;
}
.dashboardMonth button {
  font-size: 24px;
  line-height: 1;
  padding: 4px 12px;
}
.dashboardWeek,
.dashboardCalendarGrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.dashboardWeek {
  color: #60758a;
  font-size: 11px;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dashboardCalendarGrid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.dashboardDay {
  min-height: 68px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.dashboardDay small {
  color: var(--teal);
  font-size: 10px;
}
.dashboardSelectAll {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eef8f6;
  padding: 12px;
  margin: 16px -16px 0;
}
.dashboardSelectAll label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.dashboardSelectAll button {
  padding: 7px 14px;
}
.dashboardPaymentList {
  max-height: 340px;
  overflow: auto;
}
.dashboardPaymentRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.dashboardPaymentRow strong,
.dashboardPaymentRow small {
  display: block;
}
.dashboardPaymentRow small {
  margin-top: 4px;
  color: #60758a;
}
.dashboardPaymentRow b {
  font-size: 16px;
  white-space: nowrap;
}
.dashboardCards .card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dashboardCards small {
  color: #60758a;
}
/* Portal cards reuse the existing typography, brand colors and button system. */
.applicationGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin: 28px 0;
}
.applicationCard {
  padding: 24px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f4f8ff);
  box-shadow: 0 8px 26px #14356908;
}
.applicationCard h2 {
  margin: 0 0 24px;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
.applicationCard button {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: left;
}
.portalAdminLink {
  display: inline-block;
  margin: 12px 0;
  color: #195bbb;
  font-weight: 500;
  text-underline-offset: 4px;
}
