:root {
  --afs-navy: #08203a;
  --afs-navy-hover: #21354b;
  --afs-sidebar-expanded: 250px;
  --afs-sidebar-collapsed: 85px;
  --afs-toolbar-height: 70px;
}

html 
{ 
    min-height: 100%; 
    font-size: 16px; 
}
body.system-layout 
{ 
    min-height: 100vh; 
    margin: 0; 
    background: #f5f5f5; 
    color: #292f36; 
    font-family: "Inter", sans-serif; 
}
a {
    text-decoration: none;
}
.content-container { min-height: 100vh; padding-top: var(--afs-toolbar-height); }
.material-symbols-rounded {
    color: rgb(170, 174, 203);
    max-height: fit-content;
    height: 24px;
    transition: 0.6s;
    align-self: center;
}
.nav-bar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040; display: flex;
  width: var(--afs-sidebar-expanded); padding: 15px; flex-direction: column; overflow: hidden;
  background: var(--afs-navy); border-radius: 0 15px 15px 0;
  box-shadow: 8px 0 28px rgba(8, 32, 58, 0); transition: width .6s ease, box-shadow .25s ease;
}
.nav-bar.mini { width: var(--afs-sidebar-collapsed); }
.nav-bar.hover-expanded { box-shadow: 12px 0 34px rgba(8, 32, 58, .2); }
.nav-header { display: flex; width: 210px; min-height: 90px; align-items: center; gap: 10px; overflow: hidden; }
.logo-div {
  display: flex; width: 54px; min-width: 54px; height: 54px; align-items: center;
  justify-content: center; overflow: hidden; border-radius: 12px;
}
.logo-div img { width: 54px; height: 54px; object-fit: cover; }
.hide-text {
  display: flex; align-items: baseline; color: #f0f6fc; font-size: 18px;
  text-decoration: none; white-space: nowrap; opacity: 1; transition: opacity .25s ease;
}
.hide-text strong { font-weight: 600; }
.hide-text span { color: #9fc5ed; font-weight: 400; }
.hide-text.mini { opacity: 0; pointer-events: none; }
.nav-links {
  display: flex; width: 100%; padding: 5px; flex-wrap: wrap; 
  align-content: center; overflow: hidden;
}
.nav-links:not(.nav-footer) { flex: 1; }
.nav-footer { padding-bottom: 5px; }
.nav-footer form { margin: 0; }

.nav-link {
  display: flex; width: 100%; height: 45px; margin-bottom: 3px; padding: 0;
  align-items: center; overflow: hidden; color: aliceblue; background: transparent;
  border: 0; border-radius: 6px; text-decoration: none; cursor: pointer;
  transition: width .6s ease;
}
.nav-bar.mini .nav-links { width: 55px; }
.nav-bar.mini .nav-link { width: 45px; }
.nav-link:hover, .nav-link:focus-visible { color: #fff; background: var(--afs-navy-hover); }
.nav-link.active { color: #fff; background-image: linear-gradient(to bottom right, #30679a, #9ebfdd); }
.nav-link-icon {
  display: flex; width: 45px; min-width: 45px; align-items: center;
  justify-content: center; color: #aaaecb;
}
.nav-link:hover .nav-link-icon, .nav-link.active .nav-link-icon span { color: aliceblue; }
.nav-link-icon .material-symbols-rounded {
    font-size: 26px;
    font-weight: 300;
    color: #aaaecb;
}
.nav-link-text {
  display: block; overflow: hidden; font-size: 14px; font-weight: 400;
  white-space: nowrap; opacity: 1; transition: opacity .25s ease;
}
.nav-link-text.mini { opacity: 0; }
.nav-bar:not(.mini) .hide-text.mini,
.nav-bar:not(.mini) .nav-link-text.mini { opacity: 1; pointer-events: auto; }

.top-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 1030; display: flex;
  height: var(--afs-toolbar-height); padding: 0 20px 0 calc(var(--afs-sidebar-expanded) + 10px);
  align-items: center; justify-content: space-between; background: #fff;
  box-shadow: rgba(33, 37, 41, .1) 0 0 32px; transition: padding-left .6s ease;
}
.top-nav.mini { padding-left: calc(var(--afs-sidebar-collapsed) + 10px); }
.top-nav-left, .top-nav-right { display: flex; align-items: center; }
.square, .account-menu-trigger {
  display: flex; width: 45px; height: 45px; padding: 0; align-items: center;
  justify-content: center; color: #333; background: transparent; border: 0;
  border-radius: 50%; cursor: pointer;
}
.square:hover, .account-menu-trigger:hover { background: #f3f5f7; }
.top-nav-product { margin-left: 6px; color: #5e6670; font-size: 14px; font-weight: 500; }
.user-name-display,
.entity-name-display {
  overflow: hidden; color: #333; font-size: 14px; font-weight: 400;
  text-overflow: ellipsis; white-space: nowrap;
}
.user-name-display { max-width: min(25vw, 240px); }
.entity-name-display { max-width: min(35vw, 320px); }
.top-nav-separator {
  width: 1px; height: 22px; margin: 0 14px; flex: 0 0 1px; background: #ccc;
}
.account-menu { position: relative; margin-left: 7px; }
.account-menu-trigger .material-symbols-rounded { font-size: 28px; }
.account-menu-items {
  position: absolute; top: 48px; right: 0; display: none; width: 180px; padding: 10px;
  background: #fff; border: 1px solid rgba(0, 0, 0, .14); border-radius: 8px;
  box-shadow: rgba(33, 37, 41, .12) 0 10px 28px;
}
.account-menu-items.show { display: block; }
.account-menu-items form, .account-menu-items a, .account-menu-items button { width: 100%; margin: 0; }
.account-menu-items a, .account-menu-items button {
  display: block;
  padding: 9px 10px; color: #222; background: transparent; border: 0;
  border-radius: 6px; font-size: 13px; line-height: normal; text-align: left;
  text-decoration: none; cursor: pointer;
}
.account-menu-items a:hover, .account-menu-items button:hover { color: #222; background: #f0f0f0; }

.main-content {
  min-height: calc(100vh - var(--afs-toolbar-height) - 95px);
  padding: 18px 65px 18px calc(var(--afs-sidebar-expanded) + 65px);
  transition: padding-left .6s ease;
}
.main-content.mini { padding-left: calc(var(--afs-sidebar-collapsed) + 65px); }
.main-div-footer {
  padding: 35px 65px 35px calc(var(--afs-sidebar-expanded) + 65px); color: #666;
  border-top: 1px solid #ddd; font-size: 13px; font-weight: 300; text-align: center;
  transition: padding-left .6s ease;
}
.main-div-footer.mini { padding-left: calc(var(--afs-sidebar-collapsed) + 65px); }

/* Apply the saved navigation preference before site.js initializes the layout. */
.afs-nav-collapsed-loading .nav-bar { width: var(--afs-sidebar-collapsed); }
.afs-nav-collapsed-loading .hide-text,
.afs-nav-collapsed-loading .nav-link-text { opacity: 0; pointer-events: none; }
.afs-nav-collapsed-loading .nav-links { width: 55px; }
.afs-nav-collapsed-loading .nav-link { width: 45px; }
.afs-nav-collapsed-loading .top-nav { padding-left: calc(var(--afs-sidebar-collapsed) + 10px); }
.afs-nav-collapsed-loading .main-content { padding-left: calc(var(--afs-sidebar-collapsed) + 65px); }
.afs-nav-collapsed-loading .main-div-footer { padding-left: calc(var(--afs-sidebar-collapsed) + 65px); }

.loader-container {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center;
  justify-content: center; background: rgba(255, 255, 255, .68);
}
.loader {
  width: 50px; aspect-ratio: 1; border: 8px solid #062349; border-radius: 50%;
  animation: loader-shape .8s infinite linear alternate, loader-spin 1.6s infinite linear;
}
@keyframes loader-shape {
  0% { clip-path: polygon(50% 50%, 0 0, 50% 0, 50% 0, 50% 0, 50% 0, 50% 0); }
  25% { clip-path: polygon(50% 50%, 0 0, 50% 0, 100% 0, 100% 100%, 100% 100%, 100% 100%); }
  50% { clip-path: polygon(50% 50%, 0 0, 50% 0, 100% 0, 100% 100%, 50% 100%, 0 100%); }
  75% { clip-path: polygon(50% 50%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 50% 100%, 0 100%); }
  100% { clip-path: polygon(50% 50%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%, 0 100%); }
}
@keyframes loader-spin {
  0% { transform: scaleY(1) rotate(0); }
  49.99% { transform: scaleY(1) rotate(135deg); }
  50% { transform: scaleY(-1) rotate(0); }
  100% { transform: scaleY(-1) rotate(-135deg); }
}

@media (max-width: 767.98px) {
  .nav-bar.mini { width: 0; padding-right: 0; padding-left: 0; border-radius: 0; }
  .afs-nav-collapsed-loading .nav-bar { width: 0; padding-right: 0; padding-left: 0; border-radius: 0; }
  .top-nav, .top-nav.mini { padding-left: 8px; }
  .afs-nav-collapsed-loading .top-nav { padding-left: 8px; }
  .main-content, .main-content.mini { padding: 18px; }
  .afs-nav-collapsed-loading .main-content { padding: 18px; }
  .main-div-footer, .main-div-footer.mini { padding: 25px 18px; }
  .afs-nav-collapsed-loading .main-div-footer { padding: 25px 18px; }
  .top-nav-product { display: none; }
  .user-name-display { max-width: 25vw; }
  .entity-name-display { max-width: 32vw; }
  .top-nav-separator { margin: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-bar, .top-nav, .main-content, .main-div-footer, .nav-link-text, .hide-text { transition: none; }
}

/* Imports */
.imports-page-header .page-header > div {
    display: block;
    height: auto;
    margin: 0;
    color: inherit;
}

.imports-page-header .page-header h5 {
    height: auto;
    margin-bottom: 4px;
}

.imports-page-header .page-header p,
.imports-section-heading p,
.card-header-group p {
    margin: 0;
    color: #777b82;
    font-size: 12px;
    font-weight: 400;
}

.imports-page-actions {
    gap: 8px;
}

.imports-page-actions .ms-button-light,
.import-view-button {
    gap: 6px;
}

.import-upload-card {
    margin-bottom: 30px;
}

.import-upload-card .card-header-group {
    display: block;
    border: 0;
}

.import-upload-card .card-header-group h5 {
    margin-bottom: 4px;
}

.import-card-icon {
    color: var(--afs-navy);
    font-size: 28px;
}

.import-notice {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 14px;
    align-items: center;
    gap: 9px;
    color: #385776;
    background: #eef5fb;
    border: 1px solid #d8e8f5;
    border-radius: 10px;
    font-size: 12px;
}

.import-notice .material-symbols-rounded {
    color: #4b769f;
    font-size: 20px;
}

.import-form,
.import-validation-summary {
    width: 100%;
}

.import-validation-summary:empty {
    display: none;
}

.import-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 22px 28px;
}

.import-form-field {
    min-width: 0;
}

.import-form-field > label,
.imports-filter-field > label {
    display: block;
    margin-bottom: 7px;
    color: #555b62;
    font-size: 12px;
    font-weight: 600;
}

.import-form-field .custom-select {
    height: 42px;
}

.custom-select.is-disabled {
    background: #f4f5f6;
    opacity: .7;
    pointer-events: none;
}

.import-field-help {
    min-height: 18px;
    margin: 7px 0 0;
    color: #777b82;
    font-size: 11px;
    line-height: 1.45;
}

.import-template-prompt {
    display: flex;
    min-height: 42px;
    padding: 10px 12px;
    align-items: center;
    gap: 8px;
    color: #4e555c;
    background: #f7f8f9;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    font-size: 12px;
}

.import-template-prompt .material-symbols-rounded {
    color: #71869c;
    font-size: 20px;
}

.import-template-prompt a {
    color: #245f96;
    font-weight: 600;
}

.import-file-field {
    grid-column: 1 / -1;
}

.import-file-control {
    padding: 5px;
    border: 1px dashed #b8c2cc;
    border-radius: 12px;
    background: #fafbfc;
}

.import-file-input {
    width: 100%;
    padding: 8px;
    color: #555b62;
    background: #fff;
    border: 0;
    border-radius: 8px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
}

.import-file-input::file-selector-button {
    margin-right: 12px;
    padding: 7px 14px;
    color: #fff;
    background: var(--afs-navy);
    border: 0;
    border-radius: 16px;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.import-form-actions {
    display: flex;
    width: 100%;
    margin-top: 22px;
    justify-content: flex-end;
}

.ms-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.imports-section-heading {
    margin: 0 0 14px;
}

.imports-section-heading h2 {
    margin: 0 0 3px;
    color: #292f36;
    font-size: 18px;
    font-weight: 500;
}

.imports-filter-panel {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    padding: 18px 20px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    background: #fff;
    border-radius: 20px;
    box-shadow: rgba(0, 16, 24, .1) 1px 1px 10px 0;
}

.imports-filter-heading {
    display: flex;
    min-width: 130px;
    padding-bottom: 5px;
    align-items: center;
    gap: 9px;
}

.imports-filter-heading > .material-symbols-rounded {
    color: var(--afs-navy);
}

.imports-filter-heading h6,
.imports-filter-heading p {
    margin: 0;
}

.imports-filter-heading h6 {
    color: var(--afs-navy);
    font-size: 13px;
    font-weight: 600;
}

.imports-filter-heading p {
    margin-top: 3px;
    color: #777b82;
    font-size: 11px;
}

.imports-filter-controls {
    display: flex;
    flex: 1;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.imports-filter-field {
    margin: 0;
}

.imports-filter-field > label {
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 500;
}

.compact-select {
    width: 150px;
    height: 34px;
    border-radius: 9px;
}

.compact-select .selectSearchInput {
    padding: 6px 5px 6px 10px;
    border-radius: 9px;
    font-size: 12px;
}

.compact-select .optionsList {
    top: 36px;
}

.imports-date-filter {
    width: 142px;
    height: 34px;
    padding: 0 9px;
    color: #42474d;
    background: #fff;
    border: 1px solid #d5dbe1;
    border-radius: 9px;
    font-family: "Inter", sans-serif;
    font-size: 11px;
}

.imports-date-filter:focus {
    border-color: #71869c;
    box-shadow: 0 0 0 2px rgba(8, 32, 58, .08);
}

.imports-clear-filters {
    display: inline-flex;
    height: 34px;
    padding: 0 12px;
    align-items: center;
    gap: 5px;
    color: #4e555c;
    background: #fff;
    border: 1px solid #ccd3da;
    border-radius: 17px;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.imports-clear-filters .material-symbols-rounded {
    height: auto;
    color: inherit;
    font-size: 17px;
}

.imports-clear-filters:not(:disabled):hover {
    color: var(--afs-navy);
    border-color: var(--afs-navy);
    cursor: pointer;
}

.imports-clear-filters:disabled {
    opacity: .45;
}

.imports-history-card .card-body,
.imports-history-card .table-responsive,
.dataTables_wrapper {
    width: 100%;
}

.imports-history-card table.dataTable {
    width: 100% !important;
    margin-top: 10px !important;
    border-collapse: collapse !important;
}

.imports-history-card table.dataTable thead th {
    padding: 12px 10px;
    color: #59616a;
    border-bottom: 1px solid #d9dee3;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.imports-history-card table.dataTable tbody td {
    padding: 12px 10px;
    color: #343a40;
    border-bottom: 1px solid #edf0f2;
    font-size: 12px;
    vertical-align: middle;
}

.imports-history-card table.dataTable.no-footer {
    border-bottom: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #666d74;
    font-family: "Inter", sans-serif;
    font-size: 11px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    height: 34px;
    margin: 0 0 12px 6px;
    padding: 0 11px;
    color: #30343a;
    background: #fff;
    border: 1px solid #d5dbe1;
    border-radius: 17px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_filter input {
    width: 220px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    min-width: 32px;
    height: 32px;
    padding: 7px 10px !important;
    border: 0 !important;
    border-radius: 16px;
    background: transparent !important;
    color: #525960 !important;
    font-size: 11px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eef1f4 !important;
    color: var(--afs-navy) !important;
}

.import-file-name {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-status-badge,
.import-issue-count {
    display: inline-flex;
    min-width: 28px;
    padding: 4px 9px;
    align-items: center;
    justify-content: center;
    color: #40556a;
    background: #edf2f6;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.import-issue-count.has-issues {
    color: #8a4c17;
    background: #fff1df;
}

.import-row-action {
    text-align: right;
}

.import-view-button {
    display: inline-flex;
    min-width: 68px;
    height: 30px;
    padding: 0 10px;
    border-radius: 15px;
}

.import-view-button .material-symbols-rounded {
    margin: 0;
    font-size: 15px;
}

@media (max-width: 1200px) {
    .imports-filter-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .imports-filter-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .import-form-grid {
        grid-template-columns: 1fr;
    }

    .import-file-field {
        grid-column: auto;
    }

    .imports-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .imports-filter-field,
    .compact-select,
    .imports-date-filter {
        width: 100%;
    }

    .imports-filter-controls {
        display: grid;
        grid-template-columns: 1fr;
    }
}
body {
  margin-bottom: 60px;
}

.entity-context .badge {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.button-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    padding-right: 0px;
    padding-bottom: 18px;
    box-sizing: border-box;
    min-height: 82px;
    user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    flex-wrap: wrap;
}
.page-header {
    display: flex;
    align-items: center;
    max-width: max-content;
}

    .page-header h5 {
        font-family: "Inter", sans-serif;
        font-size: clamp(23px, 1.8vw, 25px);
        font-weight: 500;
        margin: 0;
        height: 28px;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .page-header div {
        display: flex;
        height: 23px;
        margin-left: 10px;
        font-size: clamp(12.5px, 1.1vw, 14px);
        align-items: end;
        font-weight: 500;
        color: #9b9b9b;
    }

    .page-header .page-pre-header {
        color: #818181;
        font-size: 20px;
        margin: 0px;
        margin-right: 7px;
        margin-top: 8px;
    }
.buttons-div-right {
    display: flex;
    flex: 1;
    justify-content: right;
    align-items: center;
    min-width: fit-content;
    flex-wrap: wrap;
}
.ms-button {
    display: flex;
    border: none;
    border-radius: 20px;
    background-color: #08203a;
    align-content: center;
    color: rgb(255, 255, 255);
    padding-left: 12px;
    padding-right: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none;
    min-width: 100px;
    height: 36px;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 10px;
}

.ms-button-light {
    display: flex;
    border: 2px solid #efefef;
    border-radius: 8px;
    background-color: white;
    align-content: center;
    color: #777777;
    padding-left: 12px;
    padding-right: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none;
    min-width: 70px;
    height: 35px;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.ms-button.danger {
    background-color: #d56868;
}

.ms-button a {
    display: flex;
    justify-content: center;
    width: 100%;
    color: white;
    align-items: center;
}

.ms-button-light a {
    display: flex;
    justify-content: center;
    width: 100%;
    color: #555660;
    font-weight: 600;
    align-items: center;
}

.ms-button span,
.ms-button-light span {
    margin-right: 6px;
}

.ms-button-light span {
    margin-right: 6px;
    color: #dcdcdc;
    font-size: 18px;
    font-weight: 900;
}

.ms-button a div {
    height: fit-content;
}

.ms-button-dropdown {
    display: flex;
    border: none;
    align-content: center;
    color: rgb(255, 255, 255);
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none;
    padding: 0px;
    position: relative;
    margin-left: 10px;
    height: 36px;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 10px;
}

.ms-button:hover {
    cursor: pointer;
}
.settings-info-div {
    font-size: 13px;
    font-style: italic;
    font-weight: 400;
    color: #3a3a3a;
    margin-bottom: 40px;
}
.table-div,
.card-div {
    display: flex;
    box-sizing: border-box;
    height: max-content !important;
    width: 100% !important;
    background-color: white;
    border-radius: 20px;
    box-shadow: rgba(0, 16, 24, 0.1) 1px 1px 10px 0px;
    font-size: clamp(12px, 0.9vw, 13px);
    flex-wrap: wrap;
    padding: 20px;
}

.card-div {
    margin-bottom: 20px;
}

    .card-div.modal-card {
        box-shadow: none;
        padding: 0;
        margin-top: 10px;
    }
.card-body.settings {
    align-content: start;
    justify-content: space-between;
}

.card-div.settings {
    min-height: 510px;
}
.card-body {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.card-heading {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 10px;
    justify-content: space-between;
    border-bottom: 1px solid rgb(225, 225, 225);
}
    .card-heading h5 {
        display: flex;
        font-size: 17px;
        font-weight: 500;
        margin: 0;
        align-content: center;
        height: max-content;
        align-self: center;
    }
.card-header-group {
    display: flex;
    flex-wrap: wrap;
}
.card-navbar {
    width: 180px;
    border-right: 1px solid rgb(225, 225, 225);
    min-height: 470px;
}

.card-navbar-link {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    width: max-content;
    padding: 10px;
    border-radius: 24px;
    padding-right: 14px;
    padding-left: 14px;
    cursor: pointer;
    color: #9c9c9c;
}

    .card-navbar-link.active {
        background-color: #e1e5f2;
        color: #242c53;
    }

.card-navbar-body {
    display: flex;
    flex: 1;
    padding-left: 30px;
    padding-top: 7px;
    display: none;
    flex-wrap: wrap;
    align-content: start;
}

.card-navbar-header {
    font-size: 20px;
    font-weight: 500;
    display: flex;
    width: 100%;
    margin-bottom: 8px;
}

.card-navbar-subheader {
    font-size: 13px;
    font-weight: 400;
    display: flex;
    width: 100%;
    padding-bottom: 10px;
    color: #8b8b8b;
}
.form-group {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    min-width: 100%;
    margin-bottom: 15px;
}
.card-detail-heading {
    margin: 0;
    display: flex;
    width: fit-content;
    font-size: 14px;
    font-weight: 400;
    align-items: center;
    min-height: 30px;
    max-height: 37.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 335px;
}
.card-detail,
.modal-select {
    display: flex;
    width: 50%;
    min-width: 50%;
    max-width: 50%;
    box-sizing: border-box;
    border: 0.5px rgb(202, 202, 202) solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 400;
    height: 38px;
    min-height: 38px;
    max-height: max-content;
    align-items: center;
    padding-left: 10px;
    padding-right: 7px;
    padding-top: 8px;
    padding-bottom: 8px;
    color: #424242;
    font-family: "Inter", sans-serif;
    margin: 0;
    background-color: transparent;
    justify-content: space-between;
    user-select: text;
}
    .card-detail:focus {
        border: 0.5px solid #5a97d7;
        box-shadow: rgba(33, 37, 41, 0.05) 0px 0px 14px 0px;
    }

    .card-detail:has(input:focus) {
        border: 0.5px solid #5a97d7;
        box-shadow: rgba(33, 37, 41, 0.05) 0px 0px 14px 0px;
        transition: 0.6s;
    }

    .card-detail.readonly:focus {
        border: 0.5px rgb(202, 202, 202) solid;
    }

.readonly {
    color: #7a7a7a;
    background-color: #f7f7f7;
}

.card-detail-button {
    display: flex;
    flex-grow: 1;
    border: 0.5px rgb(154, 154, 154) solid;
    border-radius: 8px !important;
    font-size: 16px;
    font-weight: 100;
    min-height: 34px !important;
    max-height: max-content;
    align-items: center;
    padding-left: 10px;
    padding-right: 7px;
    padding-top: 5px;
    padding-bottom: 5px;
    margin: 0 !important;
}
.custom-select {
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    border: none;
    border: 0.5px rgb(202, 202, 202) solid;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 400;
    height: 38px;
    max-height: max-content;
    align-items: center;
    padding-right: 7px;
}
.half-width {
    width: 50%;
}
.drop-down-menu a {
    color: black;
}
.drop-down-menu.focus {
    border: 0.5px solid #5a97d7;
    box-shadow: rgba(33, 37, 41, 0.05) 0px 0px 14px 0px;
}
.drop-down-menu {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

    .drop-down-menu input::placeholder {
        color: #828282;
    }

    .drop-down-menu span {
        color: #5f5f5f;
        cursor: pointer;
    }

    .drop-down-menu input {
        height: 100%;
        border: none;
    }
.optionsList {
    display: none;
    position: absolute;
    list-style-type: none;
    background-color: white;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    padding: 8px;
    flex-wrap: wrap;
    z-index: 5;
    top: 40px;
    max-height: 200px;
    overflow-y: scroll;
}

    .optionsList li {
        background-color: white;
        border-radius: 8px;
        padding: 8px;
        width: 100%;
        cursor: pointer;
        font-size: 12px;
        font-family: "Inter", sans-serif;
        font-weight: 400;
    }

        .optionsList li:hover {
            background-color: #f0f0f0;
        }

    .optionsList::-webkit-scrollbar {
        width: 8px;
    }

    .optionsList::-webkit-scrollbar-thumb {
        background-color: #d2d2d2;
        border-radius: 6px;
    }
.selectSearchInput {
    padding-top: 8px;
    padding-bottom: 8px;
    box-sizing: border-box;
    padding-left: 10px;
    width: 100%;
    border: none;
    border-radius: 12px;
    height: 100%;
    font-size: 13px;
    color: #424242;
    font-family: "Inter", sans-serif;
    font-weight: 400;
}

    .selectSearchInput:hover {
        cursor: pointer;
    }

input:focus {
    outline: none;
    transition: 0.6s;
}
.check-box-group,
.radio-box-group {
    display: flex;
    flex-wrap: wrap;
    padding-top: 5px;
}
.radio-box-select {
    display: flex;
    width: 100%;
    margin-bottom: 6px;
}
.check-box,
.radio-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 25px;
    width: 25px;
    border: 0.5px rgb(202, 202, 202) solid;
    background-color: #ffffff;
    margin-right: 10px;
    border-radius: 8px;
}
    .check-box.readonly,
    .radio-box.readonly {
        border: 0.5px rgb(197, 197, 197) solid;
        background-color: #eeeeee;
    }

    .check-box.ticked.readonly,
    .radio-box.ticked.readonly {
        border: 0.5px rgb(197, 197, 197) solid;
        background-color: #eeeeee;
    }

    .check-box.readonly span,
    .radio-box.readonly span {
        color: #eeeeee;
    }

    .check-box.ticked.readonly span,
    .radio-box.ticked.readonly span {
        color: #b1b1b1;
    }

    .check-box span,
    .radio-box span {
        display: flex;
        color: white;
    }

    .check-box:hover,
    .radio-box:hover {
        cursor: pointer;
    }

    .check-box.readonly:hover,
    .radio-box.readonly:hover {
        cursor: default;
    }

    .check-box.ticked,
    .radio-box.ticked {
        background-color: #08203A;
    }

.check-box-label,
.radio-box-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 400;
}
.card-buttons {
    display: flex;
    width: 100%;
}
.card-button-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: left;
}
.small-card-div {
    display: flex;
    box-sizing: border-box;
    width: 32%;
    max-width: 390px;
    background-color: white;
    border: 1px solid transparent;
    border-radius: 20px;
    box-shadow: rgba(0, 16, 24, 0.1) 1px 1px 10px 0px;
    font-size: small;
    flex-wrap: wrap;
    margin-bottom: 25px;
    margin-right: 25px;
    cursor: pointer;
    overflow: hidden;
    transform: translateY(0);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.small-card-div > a,
.small-card-div > .setup-card-content {
    display: block;
    padding: 20px;
    width: 100%;
    height: 100%;
    color: #333333;
    text-decoration: none;
}
.card-button-icon {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    margin-bottom: 10px;
    align-items: center;
    justify-content: center;
    color: #1455a6;
    background: #eaf3fe;
    border-radius: 11px;
    box-shadow: 0 5px 12px rgba(36, 97, 184, .13);
    font-size: 24px;
    font-weight: 300;
    transition: background-color .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.card-button-link {
    color: #10192a;
    width: 100%;
    margin: 18px 0 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    transition: color .2s ease;
}

.small-card-div:hover,
.small-card-div:focus-within {
    border-color: rgba(36, 97, 184, .12);
    box-shadow: 0 15px 34px rgba(8, 32, 58, .11);
    transform: translateY(-3px);
}

.small-card-div:hover .card-button-icon,
.small-card-div:focus-within .card-button-icon {
    color: #0f4d98;
    background: #e2effe;
    box-shadow: 0 7px 16px rgba(36, 97, 184, .18);
    transform: translateY(-1px);
}

.small-card-div:hover .card-button-link,
.small-card-div:focus-within .card-button-link {
    color: #0f4d98;
}

.small-card-div a:focus-visible {
    outline: 3px solid rgba(36, 97, 184, .28);
    outline-offset: -3px;
    border-radius: 22px;
}

@media (max-width: 1100px) {
    .card-button-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .card-button-container {
        grid-template-columns: 1fr;
    }

    .small-card-div {
        min-height: 132px;
        border-radius: 18px;
    }

    .small-card-div > a,
    .small-card-div > .setup-card-content {
        padding: 18px;
    }

    .small-card-div .card-body {
        min-height: 94px;
    }
}

/* Keep Imports component sizing after the legacy component definitions above. */
.imports-filter-field .compact-select {
    width: 150px;
    height: 34px;
    border-radius: 9px;
}

.imports-history-card .import-view-button {
    display: inline-flex;
    min-width: 68px;
    height: 30px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 15px;
}

@media (max-width: 767.98px) {
    .imports-filter-field .compact-select {
        width: 100%;
    }
}

/* Import details */
.import-detail-action-form {
    margin: 0;
}

.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.import-summary-card {
    display: flex;
    min-height: 105px;
    padding: 20px;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-radius: 18px;
    box-shadow: rgba(0, 16, 24, .1) 1px 1px 10px 0;
}

.import-summary-card > .material-symbols-rounded {
    display: flex;
    width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    color: #42698e;
    background: #edf3f8;
    border-radius: 13px;
    font-size: 23px;
}

.import-summary-card.has-issues > .material-symbols-rounded {
    color: #9a5b20;
    background: #fff1df;
}

.import-summary-card p {
    margin: 0 0 5px;
    color: #777b82;
    font-size: 11px;
    font-weight: 500;
}

.import-summary-card strong {
    color: #292f36;
    font-size: 20px;
    font-weight: 600;
}

.import-summary-card strong small {
    color: #777b82;
    font-size: 12px;
    font-weight: 400;
}

.import-detail-card .card-header-group,
.import-template-card .card-header-group,
.import-issues-card .card-header-group {
    display: block;
    border: 0;
}

.import-detail-card .card-header-group h5,
.import-template-card .card-header-group h5,
.import-issues-card .card-header-group h5 {
    margin-bottom: 4px;
}

.import-audit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    gap: 0;
    border: 1px solid #e4e8eb;
    border-radius: 12px;
    overflow: hidden;
}

.import-audit-grid > div {
    min-width: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

.import-audit-grid > div:nth-child(odd) {
    border-right: 1px solid #e9ecef;
}

.import-audit-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.import-audit-grid dt {
    margin-bottom: 5px;
    color: #7a8087;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.import-audit-grid dd {
    margin: 0;
    color: #30363c;
    font-size: 12px;
}

.import-audit-file dd,
.import-audit-file a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.import-audit-file a {
    color: #245f96;
    font-weight: 600;
}

.import-audit-file a .material-symbols-rounded {
    color: inherit;
    font-size: 17px;
}

.import-audit-file small {
    margin-left: 4px;
    color: #83888e;
}

.import-audit-hash code {
    display: block;
    overflow: hidden;
    color: #4f5963;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-history-timeline {
    width: 100%;
    margin: 0;
    padding: 2px 0 0;
    list-style: none;
}

.import-history-timeline li {
    position: relative;
    display: flex;
    min-height: 66px;
    padding: 0 0 18px 32px;
}

.import-history-timeline li:not(:last-child)::before {
    position: absolute;
    top: 13px;
    bottom: -1px;
    left: 7px;
    width: 1px;
    background: #d9e0e6;
    content: "";
}

.import-history-marker {
    position: absolute;
    top: 4px;
    left: 0;
    width: 15px;
    height: 15px;
    background: #fff;
    border: 4px solid #718da7;
    border-radius: 50%;
}

.import-history-timeline strong,
.import-history-timeline time {
    display: inline-block;
}

.import-history-timeline strong {
    margin-right: 10px;
    color: #30363c;
    font-size: 12px;
    font-weight: 600;
}

.import-history-timeline time {
    color: #858b91;
    font-size: 10px;
}

.import-history-timeline p {
    margin: 5px 0 0;
    color: #656c73;
    font-size: 11px;
}

.import-issue-code {
    display: inline-flex;
    padding: 4px 8px;
    color: #755027;
    background: #fff2e3;
    border-radius: 10px;
    font-family: monospace;
    font-size: 10px;
}

.import-table-note {
    width: 100%;
    padding-top: 12px;
    color: #777b82;
    border-top: 1px solid #edf0f2;
    font-size: 11px;
}

/* Import templates */
.import-success-notice {
    color: #3d6a50;
    background: #edf8f1;
    border-color: #d5eadc;
}

.import-success-notice .material-symbols-rounded {
    color: #4e8b65;
}

.import-template-card {
    margin-bottom: 30px;
}

.import-template-card form {
    width: 100%;
}

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

.template-form-grid .import-form-field:nth-child(1),
.template-form-grid .import-form-field:nth-child(2) {
    grid-column: span 3;
}

.template-form-grid .import-form-field:nth-child(3),
.template-form-grid .import-form-field:nth-child(4) {
    grid-column: span 2;
}

.template-form-grid .import-form-field:nth-child(5),
.template-form-grid .import-form-field:nth-child(6) {
    grid-column: span 1;
}

.template-text-input {
    width: 100%;
    height: 42px;
    padding: 8px 11px;
    color: #42474d;
    background: #fff;
    border: 1px solid #cacaca;
    border-radius: 12px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
}

.template-text-input:focus {
    border-color: #5a97d7;
    box-shadow: rgba(33, 37, 41, .05) 0 0 14px 0;
}

.mapping-section-heading {
    margin: 28px 0 14px;
}

.mapping-section-heading h3 {
    margin: 0 0 5px;
    color: #30363c;
    font-size: 15px;
    font-weight: 600;
}

.mapping-section-heading p {
    max-width: 960px;
    margin: 0;
    color: #777b82;
    font-size: 11px;
    line-height: 1.5;
}

.mapping-table-wrap {
    margin-top: 10px;
    overflow: visible;
}

.mapping-table {
    min-width: 900px;
}

.mapping-table thead th {
    padding: 10px;
    color: #666d74;
    border-bottom: 1px solid #d9dee3;
    font-size: 10px;
    font-weight: 600;
}

.mapping-table tbody td {
    padding: 9px 8px;
    border-bottom: 1px solid #edf0f2;
    vertical-align: top;
}

.mapping-table th:nth-child(1),
.mapping-table td:nth-child(1) {
    width: 25%;
}

.mapping-table th:nth-child(2),
.mapping-table td:nth-child(2) {
    width: 32%;
}

.mapping-table th:nth-child(3),
.mapping-table td:nth-child(3) {
    width: 20%;
}

.mapping-table .template-text-input,
.mapping-dropdown {
    height: 38px;
}

.mapping-dropdown .selectSearchInput {
    font-size: 11px;
}

.mapping-required-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 9px;
    accent-color: var(--afs-navy);
    cursor: pointer;
}

.mapping-remove-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    margin-top: 2px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #a04c4c;
    background: #fff;
    border: 1px solid #e8caca;
    border-radius: 50%;
}

.mapping-remove-button:hover {
    color: #fff;
    background: #b65b5b;
    border-color: #b65b5b;
    cursor: pointer;
}

.mapping-remove-button .material-symbols-rounded {
    height: auto;
    color: inherit;
    font-size: 17px;
}

.optionsList .li-readonly {
    color: #a7aaad;
    background: #f6f6f6;
    cursor: not-allowed;
}

.template-form-actions {
    display: flex;
    margin-top: 18px;
    justify-content: flex-end;
    gap: 8px;
}

.template-form-actions .ms-button,
.template-form-actions .ms-button-light {
    gap: 6px;
}

.template-list-card .template-name-cell {
    color: #30363c;
    font-weight: 600;
}

.template-status-badge {
    display: inline-flex;
    padding: 4px 9px;
    color: #72777c;
    background: #f0f1f2;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.template-status-badge.is-active {
    color: #36704b;
    background: #e8f5ed;
}

.template-deactivate-button {
    display: inline-flex;
    height: 30px;
    padding: 0 10px;
    align-items: center;
    gap: 4px;
    color: #9b4c4c;
    background: #fff;
    border: 1px solid #e5c6c6;
    border-radius: 15px;
    font-family: "Inter", sans-serif;
    font-size: 10px;
    font-weight: 500;
}

.template-deactivate-button:hover {
    color: #fff;
    background: #ad5555;
    border-color: #ad5555;
    cursor: pointer;
}

.template-deactivate-button .material-symbols-rounded {
    height: auto;
    color: inherit;
    font-size: 15px;
}

@media (max-width: 1000px) {
    .template-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .template-form-grid .import-form-field:nth-child(n) {
        grid-column: span 1;
    }

    .mapping-table-wrap {
        overflow-x: auto;
        overflow-y: visible;
    }
}

@media (max-width: 767.98px) {
    .import-summary-grid,
    .import-audit-grid,
    .template-form-grid {
        grid-template-columns: 1fr;
    }

    .template-form-grid .import-form-field:nth-child(n) {
        grid-column: auto;
    }

    .import-audit-grid > div,
    .import-audit-grid > div:nth-child(odd),
    .import-audit-grid > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #e9ecef;
    }

    .import-audit-grid > div:last-child {
        border-bottom: 0;
    }
}

/* DataTables loads page-specific CSS after site.css, so keep these control shapes explicit. */
.imports-history-card .dataTables_wrapper .dataTables_length select {
    border-radius: 18px !important;
    padding-right: 8px;
}

.imports-history-card .dataTables_wrapper .dataTables_filter input {
    border-radius: 18px !important;
    padding-left: 13px;
}

/* Setups workspace */
.setup-workspace {
    width: 100%;
}

.setup-tabs {
    display: grid;
    width: 100%;
    margin-bottom: 24px;
    padding: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    background: #ebeef1;
    border: 1px solid rgba(8, 32, 58, .04);
    border-radius: 16px;
}

.setup-tab {
    display: inline-flex;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #667180;
    background: transparent;
    border: 0;
    border-radius: 11px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.setup-tab .material-symbols-rounded {
    height: auto;
    color: currentColor;
    font-size: 20px;
    font-weight: 300;
}

.setup-tab:hover {
    color: #244f7a;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
}

.setup-tab.is-active {
    color: #0b4388;
    background: #fff;
    box-shadow: 0 5px 15px rgba(8, 32, 58, .09);
}

.setup-tab:focus-visible {
    outline: 3px solid rgba(36, 97, 184, .25);
    outline-offset: 1px;
}

.setup-tab-panel {
    animation: setup-panel-enter .18s ease-out;
}

.setup-tab-panel[hidden] {
    display: none;
}

@keyframes setup-panel-enter {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.setup-panel-heading {
    margin-bottom: 18px;
}

.setup-panel-heading h2 {
    margin: 0 0 4px;
    color: #08203a;
    font-size: 19px;
    font-weight: 500;
}

.setup-panel-heading p {
    margin: 0;
    color: #707985;
    font-size: 12px;
}

@media (max-width: 700px) {
    .setup-tabs {
        grid-template-columns: 1fr;
    }

    .setup-tab {
        justify-content: flex-start;
    }
}

/* Organisational structure */
.organisation-summary {
    display: flex;
    margin-bottom: 20px;
    gap: 12px;
}

.organisation-summary-item {
    display: flex;
    min-width: 190px;
    padding: 16px 18px;
    align-items: center;
    gap: 13px;
    background: #fff;
    border: 1px solid rgba(8, 32, 58, .05);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(8, 32, 58, .06);
}

.organisation-summary-item > .material-symbols-rounded {
    display: inline-flex;
    width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    color: #1455a6;
    background: #eaf3fe;
    border-radius: 11px;
    font-size: 22px;
}

.organisation-summary-item div {
    display: flex;
    flex-direction: column;
}

.organisation-summary-item strong {
    color: #08203a;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.1;
}

.organisation-summary-item span:not(.material-symbols-rounded) {
    margin-top: 3px;
    color: #707985;
    font-size: 11px;
}

.organisation-filter-panel .imports-filter-controls {
    align-items: flex-end;
}

.organisation-filter-select {
    width: 220px;
}

.organisation-structure-card {
    margin-top: 20px;
}

.organisation-code {
    display: inline-flex;
    padding: 3px 8px;
    color: #26384b;
    background: #f4f5f7;
    border: 1px solid #dfe4e8;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
}

@media (max-width: 700px) {
    .organisation-summary {
        flex-direction: column;
    }

    .organisation-summary-item,
    .organisation-filter-select {
        width: 100%;
    }
}

/* Entity accounts */
.entity-account-filter-select {
    width: 190px;
}

.entity-accounts-card {
    margin-top: 20px;
}

@media (min-width: 901px) {
    .entity-accounts-card .table-responsive {
        overflow: visible;
    }
}

.entity-link-cell,
.entity-account-action-cell {
    width: 120px;
    text-align: center;
}

.entity-account-action-cell {
    width: 58px;
}

.entity-link-status {
    position: relative;
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.entity-link-status > .material-symbols-rounded {
    font-size: 18px;
    font-weight: 500;
}

.entity-link-status.is-linked {
    color: #1b7a50;
    background: #e8f7ef;
    cursor: help;
}

.entity-link-status.is-unlinked {
    color: #a44d4d;
    background: #fbeeee;
}

.entity-link-status:focus-visible {
    outline: 3px solid rgba(36, 97, 184, .24);
    outline-offset: 2px;
}

.entity-link-tooltip {
    position: absolute;
    z-index: 100;
    bottom: calc(100% + 9px);
    left: 50%;
    display: flex;
    width: max-content;
    max-width: 260px;
    padding: 9px 11px;
    flex-direction: column;
    gap: 2px;
    color: #fff;
    background: #08203a;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(8, 32, 58, .22);
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease;
}

.entity-link-tooltip::after {
    position: absolute;
    top: 100%;
    left: 50%;
    border: 5px solid transparent;
    border-top-color: #08203a;
    content: "";
    transform: translateX(-50%);
}

.entity-link-tooltip strong {
    font-weight: 600;
}

.entity-link-tooltip span {
    color: #dce5ee;
}

.entity-link-status:hover .entity-link-tooltip,
.entity-link-status:focus .entity-link-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.entity-account-action {
    display: inline-flex;
}

.entity-account-action-toggle {
    display: inline-flex;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #596574;
    background: #f2f4f6;
    border: 1px solid #e2e6ea;
    border-radius: 9px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.entity-account-action-toggle:hover,
.entity-account-action-toggle[aria-expanded="true"] {
    color: #1455a6;
    background: #eaf3fe;
    border-color: #cfe0f4;
}

.entity-account-action-toggle:focus-visible {
    outline: 3px solid rgba(36, 97, 184, .24);
    outline-offset: 2px;
}

.entity-account-action-toggle .material-symbols-rounded {
    font-size: 20px;
}

.entity-account-action-menu {
    position: fixed;
    z-index: 1100;
    width: 206px;
    padding: 5px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 11px;
    box-shadow: 0 12px 30px rgba(8, 32, 58, .16);
}

.entity-account-action-menu[hidden] {
    display: none;
}

.entity-account-action-menu button {
    display: flex;
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    align-items: center;
    gap: 8px;
    color: #26384d;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.entity-account-action-menu button:hover,
.entity-account-action-menu button:focus-visible {
    color: #1455a6;
    background: #eef5fc;
    outline: none;
}

.entity-account-action-menu .material-symbols-rounded {
    font-size: 18px;
}

@media (max-width: 700px) {
    .entity-account-filter-select {
        width: 100%;
    }
}

/* Chart of accounts tree */
.chart-account-toolbar {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.chart-account-search-wrap {
    position: relative;
    display: flex;
    width: min(430px, 100%);
    align-items: center;
}

.chart-account-search-wrap > .material-symbols-rounded {
    position: absolute;
    left: 13px;
    color: #77818d;
    font-size: 19px;
    pointer-events: none;
}

.chart-account-search-wrap input {
    width: 100%;
    height: 40px;
    padding: 0 15px 0 40px;
    color: #273547;
    background: #fff;
    border: 1px solid #dce1e6;
    border-radius: 20px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.chart-account-search-wrap input:focus {
    border-color: #8eb4df;
    box-shadow: 0 0 0 3px rgba(36, 97, 184, .12);
}

.chart-account-toolbar-actions {
    display: flex;
    gap: 8px;
}

.chart-account-result-bar {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    color: #707985;
    font-size: 11px;
}

.chart-account-result-bar > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-account-result-bar .material-symbols-rounded {
    color: #1455a6;
    font-size: 17px;
}

.chart-accounts-card {
    width: 100%;
    min-height: 0;
}

.chart-accounts-card .card-body,
.chart-accounts-card .table-responsive {
    width: 100%;
}

.chart-accounts-card table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.chart-accounts-card thead th {
    padding: 12px 14px;
    color: #59616a;
    background: #f8f9fa;
    border-bottom: 1px solid #d9dee3;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.chart-account-row td {
    padding: 11px 14px;
    color: #343a40;
    border-bottom: 1px solid #edf0f2;
    font-size: 12px;
    vertical-align: middle;
}

.chart-account-row:last-child td {
    border-bottom: 0;
}

.financial-summary-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.financial-summary-table .financial-summary-account-column {
    width: 38%;
}

.financial-summary-table .financial-summary-value-column {
    width: auto;
}

.financial-summary-table th:not(:first-child),
.financial-summary-value {
    width: auto;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.financial-summary-table th {
    overflow-wrap: anywhere;
}

.financial-summary-card .table-responsive {
    overflow-x: visible;
}

.financial-summary-unallocated td {
    padding: 11px 14px;
    color: #343a40;
    background: #fff8e7;
    border-bottom: 1px solid #ead9a7;
    font-size: 12px;
    vertical-align: middle;
}

.financial-summary-unallocated .chart-account-description {
    color: #765619;
    font-weight: 600;
}

.financial-summary-vote-row td {
    padding: 9px 14px;
    color: #596675;
    background: #fbfcfd;
    border-bottom: 1px solid #edf0f2;
    font-size: 11px;
    vertical-align: middle;
}

.financial-summary-vote-number {
    color: #315a83;
    font-weight: 600;
    white-space: nowrap;
}

.financial-summary-vote-description {
    color: #596675;
}

.financial-summary-column-dialog {
    max-width: 760px;
}

.financial-summary-department-dialog {
    max-width: 680px;
}

.financial-summary-column-dialog .modal-header {
    align-items: flex-start;
}

.financial-summary-column-dialog .modal-header p {
    margin: 4px 0 0;
    color: #6d7884;
    font-size: 12px;
}

.financial-summary-department-dialog .modal-header {
    align-items: flex-start;
}

.financial-summary-department-dialog .modal-header p {
    margin: 4px 0 0;
    color: #6d7884;
    font-size: 12px;
}

.financial-summary-column-picker {
    display: grid;
    gap: 12px;
}

.financial-summary-column-picker fieldset {
    display: grid;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e1e7ec;
    border-radius: 8px;
}

.financial-summary-column-picker legend {
    grid-column: 1 / -1;
    width: auto;
    margin: 0;
    color: #33475d;
    font-size: 12px;
    font-weight: 700;
}

.financial-summary-column-picker label {
    display: block;
    margin-bottom: 5px;
    color: #596675;
    font-size: 11px;
    font-weight: 600;
}

.financial-summary-column-picker .financial-summary-ms-dropdown {
    min-width: 0;
    background: #fff;
}

.financial-summary-department-picker {
    display: grid;
    gap: 14px;
}

.financial-summary-department-picker label {
    display: block;
    margin-bottom: 5px;
    color: #596675;
    font-size: 11px;
    font-weight: 600;
}

.financial-summary-department-picker .financial-summary-ms-dropdown {
    min-width: 0;
    background: #fff;
}

.financial-summary-column-picker .financial-summary-ms-dropdown.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

.financial-summary-department-picker .financial-summary-ms-dropdown.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

.financial-summary-column-picker .financial-summary-ms-dropdown .optionsList {
    z-index: 1065;
}

.financial-summary-department-picker .financial-summary-ms-dropdown .optionsList {
    z-index: 1065;
}

.financial-summary-filter-error {
    margin-bottom: 10px;
    font-size: 11px;
}

.financial-summary-department-headings th:not(:first-child) {
    text-align: center;
    border-left: 1px solid #e1e7ec;
}

.financial-summary-table.has-department-columns .financial-summary-department-headings + tr th:nth-child(3n + 1),
.financial-summary-table.has-department-columns tbody td:nth-child(3n + 2) {
    border-left: 1px solid #e1e7ec;
}

.financial-summary-column-note {
    margin: 12px 0 0;
    color: #78828d;
    font-size: 10px;
}

.financial-summary-column-errors:empty {
    display: none;
}

.financial-summary-no-years {
    display: flex;
    margin-bottom: 12px;
    padding: 12px;
    align-items: center;
    gap: 10px;
    color: #765619;
    background: #fff8e7;
    border: 1px solid #ead9a7;
    border-radius: 8px;
}

.financial-summary-no-years div {
    display: flex;
    flex-direction: column;
    font-size: 11px;
}

.financial-summary-awaiting-selection {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #8a96a3;
}

.financial-summary-awaiting-selection .material-symbols-rounded {
    font-size: 38px;
}

@media (max-width: 650px) {
    .financial-summary-column-picker fieldset {
        grid-template-columns: 1fr;
    }

    .financial-summary-column-picker legend {
        grid-column: 1;
    }
}

/* System audit trail */
.audit-trail-card {
    width: 100%;
}

.audit-trail-card table {
    min-width: 1180px;
}

.audit-trail-date,
.audit-object-name {
    white-space: nowrap;
}

.audit-operation {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
}

.audit-operation-insert {
    color: #237245;
    background: #e7f6ed;
}

.audit-operation-update {
    color: #8a5a13;
    background: #fff3d8;
}

.audit-operation-delete {
    color: #9c3535;
    background: #fdeaea;
}

.audit-record-key {
    display: block;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-entry-details {
    position: relative;
}

.audit-entry-details summary {
    color: #1455a6;
    cursor: pointer;
    white-space: nowrap;
}

.audit-entry-details[open] {
    min-width: 440px;
}

.audit-entry-details dl {
    display: grid;
    margin: 12px 0;
    gap: 6px;
}

.audit-entry-details dl > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
}

.audit-entry-details dt,
.audit-json-block strong {
    color: #4d5e70;
    font-weight: 600;
}

.audit-entry-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.audit-json-block {
    margin-top: 10px;
}

.audit-json-block pre {
    max-width: 680px;
    max-height: 260px;
    margin: 5px 0 0;
    padding: 10px;
    overflow: auto;
    color: #33475d;
    background: #f5f7f9;
    border: 1px solid #e2e7eb;
    border-radius: 6px;
    font-size: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chart-account-row.has-children {
    cursor: pointer;
}

.chart-account-row:hover td {
    background: #f8fbfe;
}

.chart-account-identity {
    display: flex;
    padding-left: calc(var(--tree-depth) * 24px);
    align-items: center;
    gap: 8px;
}

.chart-account-description {
    color: #26384b;
    font-weight: 500;
}

.chart-account-toggle,
.chart-account-toggle-spacer {
    display: inline-flex;
    width: 28px;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
}

.chart-account-toggle {
    padding: 0;
    color: #48627d;
    background: #eef3f8;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

.chart-account-toggle:hover,
.chart-account-toggle:focus-visible {
    color: #1455a6;
    background: #dfeefd;
    outline: none;
}

.chart-account-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(36, 97, 184, .18);
}

.chart-account-toggle .material-symbols-rounded {
    font-size: 19px;
}

.chart-account-action-cell {
    width: 58px;
}

.chart-account-action-menu button[data-account-action="delete"] {
    color: #a44d4d;
}

.chart-account-action-menu button[data-account-action="delete"]:hover,
.chart-account-action-menu button[data-account-action="delete"]:focus-visible {
    color: #913f3f;
    background: #fbeeee;
}

.chart-account-empty {
    display: flex;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #78828d;
    text-align: center;
}

.chart-account-empty[hidden] {
    display: none;
}

.chart-account-empty .material-symbols-rounded {
    margin-bottom: 8px;
    color: #9ba8b5;
    font-size: 34px;
}

.chart-account-empty strong {
    margin-bottom: 3px;
    color: #33475d;
    font-size: 14px;
    font-weight: 600;
}

.chart-account-empty span:last-child {
    font-size: 11px;
}

@media (max-width: 700px) {
    .chart-account-toolbar,
    .chart-account-result-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .chart-account-toolbar-actions {
        width: 100%;
    }

    .chart-account-toolbar-actions .ms-button-light {
        flex: 1;
    }

    .chart-account-help {
        display: none;
    }

    .chart-account-identity {
        padding-left: calc(var(--tree-depth) * 18px);
    }
}
/* Journals */
.journal-status { display: inline-flex; padding: .25rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.journal-status-draft { color: #8a5a00; background: #fff3cd; }
.journal-status-posted { color: #146c43; background: #d1e7dd; }
.journal-actions { white-space: nowrap; }
.journal-actions a, .journal-remove-line { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #355a8a; padding: .3rem; }
.journal-actions a:hover, .journal-remove-line:hover { color: #173c69; }
.journal-lock-notice { display: flex; align-items: center; gap: .5rem; }
.journal-form-grid { display: grid; grid-template-columns: minmax(12rem, .7fr) minmax(18rem, 1.3fr); gap: 1rem; align-items: end; }
.journal-form-grid .form-check { grid-column: 1 / -1; }
.journal-editor-card { margin-bottom: 1rem; }
.journal-editor-card .card-heading { align-items: center; }
.journal-legs-table tfoot, #journal-lines-table tfoot { border-top: 2px solid #d8dee8; }
.journal-balance-message { margin-top: .75rem; color: #a04436; font-weight: 600; }
.journal-balance-message.is-balanced { color: #146c43; }
@media (max-width: 768px) { .journal-form-grid { grid-template-columns: 1fr; } }
