:root {
    --default-spacing: 0.5rem;
    --main-color: rgba(55,136,192,1);
    --secondary-color: rgba(255,255,255,1);
    --light-accent-color: rgba(55,136,192,.1);
    --main-background-color: rgba(255,255,255,.1);
    --color-primary: #2196f3;
    --color-error: #D32F2F;
    --color-warning: #FBC02D;
    --color-success: #689F38;
    --color-success-light: rgba(104, 159, 56, .1);
    --color-info: #2196f3; 
}

body {
    margin: 0;
    padding: var(--default-spacing);
    background-color: var(--main-background-color);
}

.grid-auto {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, 30rem);
    gap: var(--default-spacing);
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-content: center;
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.grid-two-firstexpanded {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
}

.grid-three-secondexpanded {
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 1rem;
}

.navigation-panel {
    width: 100%;
    padding: var(--default-spacing);
}

.bottom-margin {
    margin-bottom: var(--default-spacing);
}

.top-margin {
    margin-top: var(--default-spacing);
}

.header-panel-logo {
    height: 3rem;
}

.right-justify {
    justify-self: right;
}

.right-margin {
    margin-right: var(--default-spacing) !important;
}

.left-margin {
    margin-left: var(--default-spacing) !important;
}

.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid var(--main-color);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

body .no-shadow {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

body .ui-widget-overlay {
    background-color: var(--main-color);
    opacity: .4;
}

.kpi-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 8px 0 12px 0;
}
.kpi-title{
  font-size: 18px;
  font-weight: 600;
}
.kpi-add-btn{
  border-radius: 10px;
}

.kpi-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.kpi-card{
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 14px;
}

.kpi-card-hd{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-card-hd i{
  font-size: 18px;
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  background: #eef4ff;
}
.kpi-card-title{
  font-weight: 600;
}

.kpi-rows{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.kpi-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border: 1px solid #edf1f6;
  border-radius: 10px;
  text-decoration:none;
  color: inherit;
  background: #fff;
}
.kpi-row:hover{
  background: #f7faff;
  border-color: #dfe9ff;
}

.kpi-row-label{
  font-size: 13px;
  opacity: 0.9;
}

.kpi-row-count{
  font-weight: 700;
  min-width: 28px;
  text-align: right;
}

#ajax-status-window_content {
    background-image: none;
    background-color: rgba(0,0,0,0);
    overflow: hidden;
}


.no-outline {
    border: none !important;
    box-shadow: none !important;
}

.clientGrid {
  width: 100%;
}

.clientGrid .ui-panelgrid-cell {
  width: 50%;
}

.w-100,
.width-100 {
  width: 100%;
  box-sizing: border-box;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-fill {
    flex: 1;
    /* a flex item's automatic minimum size is its content, which stops it from
       shrinking below a tall child and defeats "fill the space left over" */
    min-width: 0;
    min-height: 0;
}

.page-grid {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "header header     header"
        "nav    second-nav body";
    overflow: hidden;
}

.page-grid-header {
    grid-area: header;
    min-width: 0;
    border-bottom: 1px solid var(--divider-color, rgba(0, 0, 0, 0.12));
}

.page-grid-nav {
    grid-area: nav;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    border-right: 1px solid var(--divider-color, rgba(0, 0, 0, 0.12));
}

.page-grid-second-nav {
    grid-area: second-nav;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    border-right: 1px solid var(--divider-color, rgba(0, 0, 0, 0.12));
}

.page-grid-body {
    grid-area: body;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--default-spacing);
}

.sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
}

.sidebar .toggle-button {
    position: absolute;
    top: 0;
    right: 0;
}

.sidebar.collapsed .toggle-button.toggle-collapse,
.sidebar:not(.collapsed) .toggle-button.toggle-expand,
.sidebar.collapsed .side-item .ui-button-text,
.sidebar.collapsed .hide-when-collapsed {
    display: none !important;
}

.sidebar.collapsed .side-item {
    width: 2.357rem;
    height: 2.357rem;
}

.side-item .ui-button-text {
    text-align: left;
}

.all-module-items {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #6b7280;
  width: 100%;
}

.all-module-items:hover {
    color: #374151; 
}

.bottom-link{
  margin-top: auto;
}

.borderless-panel {
    border: none !important;
    box-shadow: none !important;     
}

.ui-inputtext.client-search-input {
    margin-top: 30px !important;
}

.client-search-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ui-float-label.client-search-panel {
    margin-top: 10px;
}

.lg-advanced-search-btn {
    width: 45px;
    height: 45px;
}

.lg-advanced-search-btn .ui-button-icon {
    font-size: 30px !important;
}

.client-result-label,
.bold {
    font-weight: bold;
}

.client-result {
    padding: 5px 5px;
    display: block;
    width: 100%;
}

.client-result:hover {
    background-color: #f0f4ff;
    cursor: pointer;
}

.client-name {
    font-size: large;
    font-weight: bold;
}

.client-summary-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-text-color {
    color: #6C757D;
}


.text-primary {
    color: #0D0C0C; 
}

.text-bold {
    font-weight: bold;
}

.client-summary-container {
    border: 1px solid;
    padding: 8px 14px;
}

.whitespace-preformatted {
    white-space: pre-wrap;
}

.details-container {
    display: flex;
    gap: 1rem; 
}

.details-col {
    flex: 1;
    display: flex;
}

.details-col > * {
    flex: 1;
}


.client-summary-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.client-details-panel {
    flex: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.block {
    display: block;
}

.error {
    color: var(--color-error);
}

.warning {
    color: var(--color-warning);
}

.success {
    color: var(--color-success);
}

.field-level-error {
    color: var(--color-error);
    float: right;
}

.field-level-warning {
    color: var(--color-warning);
    float: right;
}

.ui-selectonemenu.ui-state-warning,
.ui-inputfield.ui-state-warning,
.ui-selectbooleancheckbox.ui-state-warning > .ui-chkbox-box {
    border-color: var(--color-warning) !important;
}

.ui-selectonemenu.ui-state-error,
.ui-inputfield.ui-state-error,
.ui-selectbooleancheckbox.ui-state-error > .ui-chkbox-box {
    border-color: var(--color-error) !important;
}

/* Spacing fix for PrimeFaces p:messages component */
.ui-messages > div {
    margin: 0 !important;
    padding: 10px 10px 10px 10px !important;
}

.p-datepicker.width-100 {
    display: flex;
}

.p-datepicker.width-100 > .ui-inputfield {
    flex: 1;
}

.flex-center {
    display: flex;
    align-items: center;
}

.grid-centered > .ui-grid > .ui-g {
    align-items: center;
}

.dialog-container {
    height: 90vh;
    height: calc(100vh - (var(--default-spacing) * 2));
    display: flex;
    flex-direction: column;
}

.dialog-container > .dialog-content {
    flex: 1;
    overflow: auto;
}

.dialog-container > .dialog-footer {
    padding-top: var(--default-spacing);
}

.col1 {
    width: 33%;
}

.col2 {
    width: 67%;
}

.client-result.selected-client {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: bold;
}

.client-result a {
    display: block;
    text-decoration: none;
}

.light-bold {
    font-weight: 500; 
}

.about-label {
    font-size: small;
    color: #999999;
}

body .ui-widget .label {
    font-size: 0.9em;
    color: #888888;
}

.label-content > .label {
  margin-bottom: var(--default-spacing);
}

.client-tabs-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.client-tabs-left {
    flex: 1;
    min-width: 0;
}

.client-tabs-right {
    white-space: nowrap;
    margin-left: 16px;
    margin-right: 100px;
    margin-top: 2%;
    padding-top: 12px;
    font-weight: 600;
    color: #444;
}



.total-assets-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 13px;
    border: 1px solid #cfd4dc;
    border-radius: 4px;
    background: #ffffff;
    white-space: nowrap;
}

.total-assets-label {
    font-weight: 600;
    color: #5f6b7a;
}

.total-assets-value {
    font-weight: 700;
    color: #28a745;
}



/* Summary Page */

.summary-page {
    padding: 1rem;
}

/* OUTER WRAP */
.summary-cards-wrap {
    font-size: 0;
    white-space: nowrap;
}

.summary-left-card,
.summary-right-card {
    display: inline-block;
    vertical-align: top;
    background: #ffffff;
    border: 1px solid #d9dee5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    font-size: 1rem;
    white-space: normal;
}

.summary-left-card {
    width: 32%;
    margin-right: 1.5%;
}

.summary-right-card {
    width: 66.5%;
}

.summary-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e7eaee;
}

.summary-section:last-child {
    border-bottom: none;
}

.section-title {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-grid {
    width: 100%;
}

.info-grid .ui-panelgrid-content,
.info-grid .ui-panelgrid-content tr,
.info-grid tbody,
.info-grid .ui-panelgrid-cell {
    border: none !important;
    background: transparent !important;
}

.info-grid .ui-panelgrid-cell {
    padding: 0.18rem 0 !important;
    vertical-align: top;
}

.label-col {
    width: 38%;
}

.value-col {
    width: 62%;
    text-align: right;
}

.info-label {
    color: #6b7280;
    font-size: 0.95rem;
}

.info-value {
    color: #2f3540;
    font-size: 0.95rem;
    font-weight: 500;
}

.link-value {
    color: #2563eb;
}

.address-right {
    line-height: 1.45;
}

.plans-table {
    border: none;
}

.plans-table .ui-datatable-header {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.plans-table .ui-datatable-tablewrapper {
    margin-top: 0 !important;
}

.plans-table .ui-datatable-data {
    margin-top: 0 !important;
}
.plans-header {
    position: relative;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.plans-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2f3540;
}

.plans-count {
    position: absolute;
    right: 1.25rem;
    top: 0.75rem;
    min-width: 2.1rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 600;
    display: inline-block;
}



.plans-table .ui-datatable-data > tr > td {
    border-width: 0 0 1px 0;
    border-color: #e7eaee;
    padding: 0.85rem 0.75rem;
    background: #ffffff;
    vertical-align: middle;
}

.toggle-col {
    width: 3.75rem;
    text-align: center;
}

.account-main-col {
    width: auto;
}

.amount-col {
    width: 9rem;
    text-align: right;
}

.account-amount {
    font-size: 1rem;
    font-weight: 500;
    color: #2f3540;
}

.expansion-box {
    padding: 1rem 1.25rem;
    background: #fafbfc;
}

.fund-value-pill {
    display: inline-block;
    min-width: 5.5rem;
    text-align: center;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: #d9f2df;
    border: 1px solid #b7e4c2;
    color: #198754;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.plans-table thead th {
    padding: 0 !important;
}

.client-plans-table thead {
    padding: 0 !important;
}


.client-search-panel .ui-selectonemenu {
    min-width: 0 !important;
    width: 230px !important;
}

.client-search-panel .ui-selectonemenu-label {
    width: 100%;
}

.client-search-panel,
.client-search-input-field,
.client-search-status {
    width: 100%;
}

.client-search-status.ui-selectonemenu {
    width: 100% !important;
}

.client-search-status .ui-selectonemenu-label {
    width: 100% !important;
}

.ui-datatable.headerless > .ui-datatable-tablewrapper > table > thead {
    display: none;
}

.client-summary-status-PROSPECT {
    color: var(--color-info);
}

.client-summary-status-ACTIVE {
    color: var(--color-success);
}

body .ui-panelgrid .ui-panelgrid-cell {
    padding: 0.5rem;
}

.note {
    color: #888;
    font-style: italic;
    font-size: 0.8rem;
}

.small-text {
    font-size: 12px;
}

.compact-table .ui-datatable-data > tr > td {
    padding: 6px 8px !important;   
    font-size: 12px;                             
}

.client-plans-table .plain-plan-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: block;
    width: 100%;
}

.client-plans-table .plain-plan-link:hover {
    text-decoration: none;
}

.client-plans-table .selected-row td {
    background: #e8f2ff !important;
}

.full-width-grid {
    width: 100%;
}

.col-30 {
    width: 35%;
    vertical-align: top;
}

.col-70 {
    width: 65%;
    vertical-align: top;
}

.client-plans-table thead {
    display: none !important;
}

.fund-accounts-table thead {
    display: none !important;
}

.gic-accounts-table thead {
    display: none !important;
}

.etf-account-table thead {
    display: none !important;
}

.info-message {
    font-size: 12px;
    font-style: italic;
    color: gray;
}

.accounts-tab {
    min-height: 300px;
}

.plan-list {
    min-height: 200px;
}

.fund-accounts-table .plain-plan-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.fund-accounts-table tbody tr {
    cursor: pointer;
}

.fund-accounts-table tbody tr {
    position: relative;
    cursor: pointer;
}

.row-link {
    position: absolute;
    inset: 0;      
    z-index: 1;
    opacity: 0; 
}

.no-padding,
body .ui-panelgrid .ui-panelgrid-cell.no-padding,
body .ui-dialog.no-padding .ui-dialog-content {
    padding: 0;
}



/* chart */
.chart-card {
    width: 380px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    padding: 18px 20px 12px;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}


.chart-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-icon {
    color: #334155;
    font-size: 15px;
    margin-left: 10px;
}

.chart-content {
    height: 225px;
}

.ui-datatable-striped .ui-datatable-odd > td {
    background: #f5f7fa;
}

.ui-state-highlight > td {
    background: #d0e7ff !important;
}

.chart-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header-style {
    padding: 0.18rem 0.55rem !important;
    min-width: 30px;
    height: 20px;
    font-size: 0.72rem;
}

.compact-table.ui-datatable table thead tr th {
    font-size: 11px !important;
}

.info-label-color {
    color: #6C757D;
    font-size: 0.9rem !important;
}


.compact-table-trades.ui-datatable table thead tr th {
    font-size: 13px !important;
}

.trade-search-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.trade-search-panel .ui-selectonemenu {
    width: 100%;
}

.trade-search-panel .ui-selectonemenu-label {
    width: 100%;
}

.trade-search-panel,
.trade-search-input-field,
.trade-search-status {
    width: 100%;
}

.trade-search-status.ui-selectonemenu {
    width: 100% !important;
}

.trade-search-status .ui-selectonemenu-label {
    width: 100% !important;
}

.trade-summary-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.compact-table-trades .ui-datatable-data > tr > td {
    padding: 3px 6px !important;
    line-height: 2;
}

.investment-summary-label {
    font-size: 10px;
}

.investment-summary-value {
    font-weight: bold;
}

.clientHomeworkClientStatus > .pi {
    margin-right: 0.5rem;
}

.clientHomeworkClientStatusApproved {
    color: var(--color-success);
}

.clientHomeworkClientStatusDenied {
    color: var(--color-error);
}

.clientHomeworkClientStatusWaiting {
    color: var(--color-info);
}

.button-bar > .ui-button:not(:first-child) {
    margin-left: var(--default-spacing);
}

.icon-circle-aum {
    width: 35px;
    height: 35px;
    background-color: #dff3e6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-aum .pi {
    color: #28a745;
    font-size: 1.25rem;
}

.icon-circle-client {
    width: 35px;
    height: 35px;
    background-color: #E8D5C4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-client .pi {
    color: #8B5E3C;
    font-size: 1.25rem;
}

.icon-circle-account {
    width: 35px;
    height: 35px;
    background-color: #E9DDF7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-account .pi {
    color: #7E57C2;
    font-size: 1.25rem;
}


.icon-circle-account-size {
    width: 35px;
    height: 35px;
    background-color: #DDEEFF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-account-size .pi {
    color: #4285F4;
    font-size: 1.25rem;
}

.dashboard-header-label {
    font-weight: bold;
    font-size: large;
}


.no-panel-header .ui-panel-titlebar {
    padding: 0rem 0rem !important;
}

.ui-button.ui-state-disabled {
    pointer-events: auto;
    cursor: not-allowed !important;
}

.dashboard-overview{
    display:flex;
    justify-content:center;
    gap:3rem;
    align-items: center;
    margin-top: 10px
}

.file-drop-zone {
    text-align: center;
}

.file-drop-zone .ui-panel-content {
    padding: 2em !important;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.file-drop-zone.ui-state-drag {
    color: green;
}

.file-drop-zone.ui-state-drag .ui-panel-content {
    border-color: var(--color-success);
    background-color: var(--color-success-light);
}

.file-drop-zone.ui-state-drag .file-drop-zone-icon {
    color: var(--color-success);
}
.file-drop-zone .file-drop-zone-icon {
    font-size: 3em;
    transition: color 0.3s ease;
}

.ui-icon-badge {
    background: var(--color-primary);
    padding: 0.5em;
    border-radius: 100%;
    color: white;
}

.ui-icon-badge.error {
    background: var(--color-error);
}

.ui-icon-badge.warning {
    background: var(--color-warning);
}

.ui-icon-badge.success {
    background: var(--color-success);
}

.ui-icon-badge.info {
    background: var(--color-info);
}

.ui-panelgrid.full-height-grid,
.ui-panelgrid.full-height-grid > .ui-panelgrid-content,
.ui-panelgrid.full-height-grid > .ui-panelgrid-content > .ui-g {
    height: 100%;
}

.ui-button-card {
    height: 100%;
}

.ui-button-card > .ui-card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ui-button-card > .ui-card-body > .ui-card-content {
    flex: 1;
}

.bold-text {
    font-weight: bold;
}

.chart-container {
    position: relative;
    margin: 0 auto;
    width: min(100%, calc(var(--section-height) - 150px));
    height: min(100%, calc(var(--section-height) - 150px));
    max-width: calc(var(--section-height) - 150px);
    max-height: calc(var(--section-height) - 150px);
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.right-column {
    text-align: right;
}
