body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

#app-side-nav-outer-toolbar {
    flex-direction: column;
    display: flex; 
    height: 100%;
    width: 100%;
}

.layout-header {
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
    z-index: 1505;
}

.header-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.main-logo {
    display: block;
    height: 28px;
    width: auto;
}

.header-dev-version {
    color: #d32f2f;
    font-weight: 600;
}

.dx-toolbar .dx-toolbar-item.menu-button {
    width: 60px;
    text-align: center;
    padding: 0;
}

.auth-panel {
    align-items: center;
    display: flex;
    gap: 12px;
    height: 100%;
    position: absolute;
    right: 20px;
    top: 0;
    z-index: 1;
}

.auth-user {
    color: rgba(0,0,0,.7);
    font-size: 14px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-status-indicator {
    align-items: center;
    background: #e8f1fb;
    border: 1px solid #8db9e8;
    border-radius: 999px;
    color: #164f86;
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    max-width: 520px;
    padding: 4px 10px;
}

.sync-status-indicator[hidden] {
    display: none;
}

.sync-status-indicator__spinner {
    animation: sync-status-spin 0.9s linear infinite;
    border: 2px solid rgba(22, 79, 134, 0.25);
    border-radius: 50%;
    border-top-color: #164f86;
    height: 12px;
    width: 12px;
}

.sync-status-indicator--active {
    animation: sync-status-indicator-pulse 2s ease-in-out infinite;
}

.sync-status-indicator__detail {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-status-indicator__cancel-form {
    margin: 0;
}

.sync-status-indicator__cancel {
    background: transparent;
    border: 0;
    border-left: 1px solid #8db9e8;
    color: #8a2f2f;
    cursor: pointer;
    font-size: 12px;
    margin-left: 2px;
    padding: 0 0 0 8px;
}

.sync-status-indicator__cancel:hover {
    text-decoration: underline;
}

@keyframes sync-status-indicator-pulse {
    0%,
    100% {
        border-color: #8db9e8;
        box-shadow: none;
    }

    50% {
        border-color: #4a90d9;
        box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
    }
}

@keyframes sync-status-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-form {
    margin: 0;
}

.auth-link {
    background: none;
    border: 0;
    color: #3C6B95;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.dx-card {
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    border-radius: 4px;
    background-color: #fff;
    margin: 2px 2px 3px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

.invoice-doc-link {
    color: #3C6B95;
    cursor: pointer;
    text-decoration: underline;
}

.purchase-order-doc-link {
    color: #3C6B95;
    cursor: pointer;
    text-decoration: underline;
}

.purchase-order-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.purchase-order-detail-last-sync {
    color: #666;
    font-size: 0.9rem;
}

.quickbooks-manual-sync-secondary-form {
    margin-top: 0.75rem;
}

/* Hide markup-based dxPopup hosts until the widget initializes (avoids "Line Items" FOUC under grids). */
#estimateDetailPopup:not(.dx-popup),
#purchaseOrderDetailPopup:not(.dx-popup),
#invoiceDetailPopup:not(.dx-popup),
#customerDetailPopup:not(.dx-popup) {
    display: none;
}

.invoice-detail-section-title,
.purchase-order-detail-section-title {
    margin: 16px 0 8px;
}

.invoice-detail-content,
.purchase-order-detail-content,
.customer-qb-detail-content,
.vendor-qb-detail-content {
    padding: 8px 4px 4px;
    min-height: 200px;
}

.customer-qb-detail-toolbar,
.vendor-qb-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.customer-qb-detail-last-sync,
.vendor-qb-detail-last-sync {
    color: #666;
    font-size: 0.9rem;
}

.customer-display-name-link,
.vendor-display-name-link,
.vendor-transaction-no-link,
.vendor-transaction-action-link {
    cursor: pointer;
    color: #3C6B95;
    text-decoration: underline;
}

.customer-ship-same-as-billing,
.vendor-ship-same-as-billing {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.customer-ship-same-as-billing-hint,
.vendor-ship-same-as-billing-hint {
    color: #666;
    font-size: 0.9rem;
}

.detail-popup-content .detail-memo-input {
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    box-sizing: border-box;
    color: inherit;
    display: block;
    font-family: inherit;
    font-size: inherit;
    height: 120px;
    line-height: 1.35715;
    margin: 0;
    min-height: 120px;
    overflow: auto;
    padding: 7px 9px 8px;
    resize: none;
    width: 100%;
}

.detail-popup-content .detail-memo-input:focus {
    outline: none;
}

.detail-popup-content .detail-stacked-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
}

.detail-popup-content .detail-stacked-field-label {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    padding-bottom: 4px;
}

.detail-popup-content .detail-stacked-field-value {
    min-height: 26px;
}

.detail-popup-content .detail-cf-unresolved,
.detail-popup-content .dx-selectbox.detail-cf-unresolved .dx-texteditor-input {
    color: #b45309;
}

.sales-order-doc-link {
    color: #3C6B95;
    cursor: pointer;
    text-decoration: underline;
}

.customer-detail-panel,
.customer-detail-root,
.vendor-detail-root {
    padding: 16px 12px 8px;
    background: #fafafa;
}

.customer-detail-header,
.vendor-detail-header {
    margin-bottom: 12px;
}

.customer-detail-title,
.vendor-detail-title {
    font-size: 20px;
    line-height: 28px;
    margin: 0;
}

.customer-detail-subtitle,
.vendor-detail-subtitle {
    color: rgba(0, 0, 0, 0.55);
    margin: 4px 0 0;
}

.customer-detail-kpis {
    margin-bottom: 16px;
}

.customer-detail-cashflow {
    margin-bottom: 16px;
}

.customer-cashflow-summary {
    background: #fff8e6;
    border: 1px solid #986231;
    border-radius: 4px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.customer-cashflow-summary .customer-detail-section-title {
    margin: 0 0 10px;
}

.customer-cashflow-dl {
    display: grid;
    grid-template-columns: max-content 1fr max-content 1fr max-content 1fr;
    gap: 8px 20px;
    margin: 0 0 10px;
}

.customer-cashflow-dl dt {
    font-weight: 600;
}

.customer-cashflow-dl__highlight {
    color: #986231;
    font-weight: 700;
}

.customer-cashflow-summary-note {
    color: rgba(0, 0, 0, 0.65);
    font-size: 12px;
    margin: 0 0 10px;
}

@media (max-width: 768px) {
    .customer-cashflow-dl {
        grid-template-columns: max-content 1fr;
    }
}

.customer-detail-profile {
    margin-bottom: 16px;
    background: #fff;
    border-radius: 4px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.customer-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px 24px;
    align-items: start;
}

.customer-profile-fields {
    min-width: 0;
}

.customer-profile-addresses {
    min-width: 0;
}

.customer-profile-addresses .customer-detail-section-title {
    margin-top: 0;
}

@media (max-width: 768px) {
    .customer-profile-grid {
        grid-template-columns: 1fr;
    }
}

.customer-detail-tabs,
.customer-detail-tabs-host {
    margin-top: 8px;
    min-height: 320px;
}

.customer-detail-loading,
.customer-detail-error,
.customer-orders-notice,
.customer-payments-empty,
.customer-payments-intro {
    color: rgba(0, 0, 0, 0.65);
    margin: 8px 0;
}

.customer-detail-error {
    color: #c9302c;
}

.kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.kpi-card {
    background: #fff;
    border-radius: 4px;
    border-left: 4px solid #5c6bc0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 12px 14px;
}

.kpi-card__label {
    color: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kpi-card__value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.kpi-card__hint {
    color: rgba(0, 0, 0, 0.45);
    font-size: 11px;
    margin: 6px 0 0;
}

.kpi-card--danger {
    border-left-color: #d9534f;
}

.kpi-card--danger .kpi-card__value {
    color: #c9302c;
}

.kpi-card--warning {
    border-left-color: #986231;
}

.kpi-card--warning .kpi-card__value {
    color: #986231;
}

.kpi-card--success {
    border-left-color: #5cb85c;
}

.kpi-card--info {
    border-left-color: #98B7CB;
}

.kpi-card--accent {
    border-left-color: #3C6B95;
}

.kpi-card--neutral {
    border-left-color: #D6E0E9;
}

.customer-profile-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 20px;
    margin: 0;
}

.customer-profile-activity {
    display: grid;
    grid-template-columns: max-content 1fr max-content 1fr;
    gap: 6px 20px;
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.customer-profile-activity dt {
    font-weight: 600;
}

.customer-profile-dl dt {
    font-weight: 600;
}

.customer-address-list {
    margin: 0;
    padding-left: 18px;
}

.customer-notes {
    margin: 0;
    white-space: pre-wrap;
}

.customer-invoices-grid .dx-row {
    cursor: pointer;
}

.customer-invoices-grid tr.invoice-row--paid > td {
    background-color: rgba(92, 184, 92, 0.08);
}

.customer-invoices-grid tr.invoice-row--due > td {
    background-color: rgba(240, 173, 78, 0.1);
}

.customer-invoices-grid tr.invoice-row--overdue > td {
    background-color: rgba(217, 83, 79, 0.1);
}

.customer-orders-grid .dx-row {
    cursor: pointer;
}

.dx-datagrid .dx-datagrid-header-panel .dx-toolbar-after {
    justify-content: space-between;
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    gap: 8px;
}

.dx-datagrid .dx-datagrid-header-panel .dx-datagrid-search-panel {
    margin-left: 0;
}

.techo-data-grid.dx-datagrid .dx-row > td,
.techo-data-grid.dx-datagrid .dx-row > tr > td,
.techo-data-grid .dx-datagrid-headers .dx-datagrid-table .dx-row > td,
.techo-data-grid .dx-datagrid-rowsview .dx-datagrid-table .dx-row > td,
.techo-data-grid .dx-datagrid-filter-row .dx-editor-cell {
    border-right: 1px solid rgba(0, 0, 0, 0.12);
    vertical-align: middle;
}

/* Header + data rows — same compact cell height (filter row keeps theme default) */
.techo-data-grid .dx-datagrid-rowsview .dx-data-row > td {
    line-height: 0.25;
    padding: 2px 8px;
    height: 32px;
}

.techo-data-grid .dx-datagrid-headers .dx-header-row > td{
    line-height: 1.2;
    padding: 2px 8px;
    height: 32px;
}

.techo-data-grid.dx-datagrid .dx-row > td.dx-command-expand,
.techo-data-grid.dx-datagrid .dx-row > td.dx-command-select,
.techo-data-grid.dx-datagrid .dx-row > td.dx-command-adaptive,
.techo-data-grid.dx-datagrid .dx-row > td.dx-command-edit,
.techo-data-grid.dx-datagrid .dx-row > td.dx-command-drag,
.techo-data-grid .dx-datagrid-filter-row .dx-editor-cell {
    padding-left: 0;
    padding-right: 0;
}

.techo-data-grid .dx-datagrid-headers .dx-datagrid-table .dx-row > td:last-child,
.techo-data-grid .dx-datagrid-rowsview .dx-datagrid-table .dx-row > td:last-child,
.techo-data-grid .dx-datagrid-filter-row .dx-editor-cell:last-child {
    border-right: none;
}

.techo-data-grid .dx-datagrid-rowsview .dx-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.techo-data-grid .dx-datagrid-rowsview .dx-datagrid-text-content {
    padding-left: 8px;
    padding-right: 8px;
}

.techo-data-grid .dx-datagrid-headers .dx-datagrid-text-content {

    padding-left: 0px;
    padding-right: 8px;

}

.techo-data-grid .payment-status-badge,
.techo-data-grid .estimate-stage-badge {
    padding-top: 2px;
    padding-bottom: 2px;
}

.payment-status-badge {
    border-radius: 12px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 5px 10px;
    text-transform: uppercase;
}

.payment-status-badge[data-status="Paid"] {
    background: #dff0d8;
    color: #3c763d;
}

.payment-status-badge[data-status="Due"] {
    background: #fcf8e3;
    color: #8a6d3b;
}

.payment-status-badge[data-status="Overdue"] {
    background: #f2dede;
    color: #a94442;
}

.customer-orders-grid-host tr.estimate-row--quote > td {
    background-color: rgba(91, 192, 222, 0.08);
}

.customer-orders-grid-host tr.estimate-row--order > td {
    background-color: rgba(92, 184, 92, 0.1);
}

.customer-orders-grid-host tr.estimate-row--rejected > td {
    background-color: rgba(217, 83, 79, 0.08);
}

.estimate-stage-badge {
    border-radius: 12px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 3px 10px;
    text-transform: uppercase;
}

.estimate-stage-badge[data-stage="Quote"] {
    background: #d9edf7;
    color: #31708f;
}

.estimate-stage-badge[data-stage="Order"] {
    background: #dff0d8;
    color: #3c763d;
}

.estimate-stage-badge[data-stage="Rejected"] {
    background: #f2dede;
    color: #a94442;
}

.estimate-stage-badge[data-stage="Closed"] {
    background: #eee;
    color: #555;
}

.customer-payments-table {
    border-collapse: collapse;
    width: 100%;
}

.customer-payments-table th,
.customer-payments-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 10px;
    text-align: left;
}

.customer-payments-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

.customer-payments-table .text-right {
    text-align: right;
}

.customer-payments-summary {
    margin-bottom: 12px;
}

.customer-payments-total {
    font-size: 16px;
    margin: 0 0 4px;
}

.customer-cashflow-disbalance {
    background: #fff8e6;
    border: 1px solid #986231;
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.customer-cashflow-disbalance p {
    margin: 0 0 6px;
}

.customer-cashflow-disbalance-note {
    color: rgba(0, 0, 0, 0.65);
    font-size: 12px;
    margin-bottom: 10px !important;
}

.customer-adjustments-table {
    border-collapse: collapse;
    margin-top: 8px;
    width: 100%;
}

.customer-adjustments-table th,
.customer-adjustments-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 6px 10px;
    text-align: left;
}

.customer-adjustments-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
}

.customer-adjustments-table .text-right {
    text-align: right;
}

.with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content {
    height: 100%;
}

.with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content > .dx-scrollview-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.layout-body {
    background-color: #f2f2f2;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.layout-body .menu-container {
    height: 100%;
    width: 250px;
    background-color: #fff;
}

.layout-body .content {
    flex-grow: 1;
    height: 100%;
    line-height: 1.5;
    margin: 20px 40px;
}

.layout-body .content h2 {
    font-size: 32px;
    line-height: 40px;
}

.layout-body .content-block {
    margin: 0 0 20px;
}

.home-landing {
    align-items: center;
    display: flex;
    justify-content: center;
    margin: -20px -40px;
    min-height: calc(100dvh - 56px - 120px);
    width: calc(100% + 80px);
}

.home-landing__logo {
    display: block;
    height: auto;
    max-width: min(90vw, 560px);
    width: auto;
}

.layout-body .content-footer {
    display: block;
    color: rgba(0,0,0,.609);
    border-top: 1px solid rgba(0,0,0,.1);
    padding-top: 20px;
    padding-bottom: 24px;
    margin: 0 40px;
}

.layout-body .responsive-paddings {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-control {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 10px;
}

.text-danger {
    color: #d9534f;
}

.user-administration-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-administration-header h2 {
    margin: 0;
}

.user-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.user-details-header h3 {
    margin: 0;
}

.user-create-hint {
    margin: 12px 0 0;
    color: #666;
    font-size: 0.9rem;
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.quickbooks-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.quickbooks-actions form {
    margin: 0;
}

.quickbooks-status {
    background: #fff;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 16px 20px;
}

.quickbooks-status dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 20px;
    margin: 0;
}

.quickbooks-status dt {
    font-weight: 700;
}

.quickbooks-sync-section {
    background: #fff;
    border-radius: 4px;
    margin: 20px 0;
    padding: 16px 20px;
}

.quickbooks-section-separator {
    align-items: center;
    border-top: 2px solid #d6dbe3;
    color: #596574;
    display: flex;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 2.5rem 0 1rem;
    padding-top: 0.75rem;
    text-transform: uppercase;
}

.quickbooks-settings-form {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.quickbooks-settings-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quickbooks-settings-form input[type="number"],
.quickbooks-settings-form select {
    min-height: 34px;
    min-width: 145px;
}

.quickbooks-setting-checkbox {
    align-items: center !important;
    flex-direction: row !important;
}

.quickbooks-sync-progress {
    background: #f5f8ff;
    border: 1px solid #c5cae9;
    border-radius: 4px;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

.quickbooks-sync-progress--active {
    animation: quickbooks-sync-progress-pulse 2s ease-in-out infinite;
}

.quickbooks-sync-progress-hint,
.quickbooks-sync-progress-elapsed {
    color: #5c6b7a;
    font-size: 0.875rem;
    line-height: 1.4;
}

.quickbooks-sync-progress-hint {
    margin-top: 0.5rem;
}

.quickbooks-sync-progress-elapsed {
    margin-top: 0.25rem;
}

.quickbooks-sync-progress progress {
    display: block;
    margin-top: 0.75rem;
    width: min(100%, 640px);
}

@keyframes quickbooks-sync-progress-pulse {
    0%,
    100% {
        border-color: #c5cae9;
        box-shadow: none;
    }

    50% {
        border-color: #7986cb;
        box-shadow: 0 0 0 2px rgba(121, 134, 203, 0.2);
    }
}

.quickbooks-advanced-sync {
    background: #fff;
    border: 1px solid #d6dbe3;
    border-radius: 4px;
    margin: 20px 0;
    padding: 12px 16px;
}

.quickbooks-advanced-sync summary {
    cursor: pointer;
    font-weight: 700;
}

.quickbooks-full-rebuild-section {
    border-left: 5px solid #d9822b;
}

.quickbooks-cutover-section {
    margin-top: 3.5rem;
    padding: 0 0 0.5rem;
}

.quickbooks-cutover-separator {
    align-items: center;
    border-top: 4px solid #b71c1c;
    display: flex;
    margin-bottom: 1.75rem;
    padding-top: 1.75rem;
    position: relative;
}

.quickbooks-cutover-separator::before,
.quickbooks-cutover-separator::after {
    background: linear-gradient(90deg, transparent, #e57373 20%, #e57373 80%, transparent);
    content: "";
    flex: 1;
    height: 1px;
}

.quickbooks-cutover-separator__label {
    background: #fff5f5;
    border: 2px solid #c62828;
    border-radius: 999px;
    color: #b71c1c;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0 1rem;
    padding: 0.35rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.quickbooks-danger-zone {
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
    border: 2px solid #ef9a9a;
    border-left: 6px solid #c62828;
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(198, 40, 40, 0.08),
        0 8px 28px rgba(183, 28, 28, 0.14);
    padding: 1.5rem 1.75rem;
}

.quickbooks-danger-zone__title {
    color: #b71c1c;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.quickbooks-danger-zone__text {
    color: #5d4037;
    margin: 0 0 1.25rem;
    max-width: 52rem;
}

.quickbooks-danger-zone form {
    margin: 0;
}

.quickbooks-purge-result {
    border-radius: 6px;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
}

.quickbooks-purge-result--success {
    background: #f1f8e9;
    border: 1px solid #aed581;
}

.quickbooks-purge-result--failed {
    background: #ffebee;
    border: 1px solid #ef9a9a;
}

.quickbooks-csv-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.quickbooks-enhanced-custom-fields-section {
    background: #fff;
    border-radius: 4px;
    margin: 20px 0 2rem;
    padding: 16px 20px;
}

.quickbooks-enhanced-custom-fields-pending {
    background: #f5f8ff;
    border: 1px solid #c5cae9;
    border-radius: 4px;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

.quickbooks-enhanced-custom-fields-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    margin-top: 1rem;
}

.quickbooks-custom-field-lookups-heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}

.quickbooks-enhanced-custom-fields-form {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
    max-width: 100%;
    width: auto;
}

.quickbooks-csv-import-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.quickbooks-csv-import-form {
    display: inline-flex;
    margin: 0;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
}

.quickbooks-csv-result {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.quickbooks-csv-result--success {
    background-color: #f0f9f0;
    border-color: #c8e6c9;
}

.quickbooks-csv-result--failed {
    background-color: #fff5f5;
    border-color: #ffcdd2;
}

.quickbooks-csv-result__title {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.quickbooks-purge-result__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.layout-body-hidden {
    visibility: hidden;
}

#layout-drawer.dx-drawer-shrink .dx-drawer-panel-content {
    box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 2px 0px;
}

@media screen and (max-width: 600px) {
    .layout-body .content {
        margin: 20px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

.menu-container .dx-widget {
    font-weight: 700;
    font-size: 14px;
    font-family: Roboto,RobotoFallback,Helvetica,Arial,sans-serif;
    line-height: 24px;
}

.menu-container .dx-treeview {
    white-space: nowrap;
}

.menu-container .dx-treeview .dx-treeview-item {
    padding-left: 0;
    flex-direction: row-reverse;
    border-radius: 0;
}

.menu-container .dx-treeview .dx-treeview-item .dx-icon {
    width: 60px !important;
    margin: 0 !important;
}

.menu-container .dx-treeview .dx-treeview-node {
    padding: 0 0 !important;
}

.menu-container .dx-treeview .dx-treeview-toggle-item-visibility {
    right: 10px;
    left: auto;
}

.menu-container .dx-treeview .dx-rtl .dx-treeview-toggle-item-visibility {
    left: 10px;
    right: auto;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="1"] {
    font-weight: bold;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
    font-weight: normal;
    padding: 0 60px;
}

.menu-container .dx-treeview-item.menu-item-admin .dx-icon,
.menu-container .dx-treeview-item.menu-item-admin .dx-treeview-item-content {
    color: #986231 !important;
}

/* Auth pages (login, etc.) */
.auth-page {
    margin: 0;
    min-height: 100dvh;
    font-family: Roboto, RobotoFallback, Helvetica, Arial, sans-serif;
    color: #1f2937;
}

.auth-page__backdrop {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(59, 130, 246, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(14, 165, 233, 0.25), transparent 50%),
        linear-gradient(145deg, #0f172a 0%, #1e3a5f 45%, #0c4a6e 100%);
    inset: 0;
    position: fixed;
    z-index: 0;
}

.auth-page__shell {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 24px 16px 16px;
    position: relative;
    z-index: 1;
}

.auth-page__main {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    width: 100%;
}

.auth-page__footer {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.02em;
    margin-top: 24px;
    text-align: center;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    max-width: 420px;
    padding: 40px 36px 36px;
    width: 100%;
}

.auth-card__logo {
    display: block;
    height: auto;
    margin: 0 auto 28px;
    max-width: 220px;
    width: 100%;
}

.auth-card__header {
    margin-bottom: 28px;
    text-align: center;
}

.auth-card__title {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 8px;
}

.auth-card__subtitle {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.auth-form__summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px 14px;
}

.auth-form__summary:empty {
    display: none;
}

.auth-form__field {
    margin-bottom: 18px;
}

.auth-form__label {
    color: #374151;
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-form__input {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    color: #111827;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
    padding: 11px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    width: 100%;
}

.auth-form__input::placeholder {
    color: #9ca3af;
}

.auth-form__input:hover {
    border-color: #9ca3af;
}

.auth-form__input:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.auth-form__error {
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.auth-form__remember {
    margin-bottom: 22px;
}

.auth-form__checkbox-label {
    align-items: center;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
    user-select: none;
}

.auth-form__checkbox {
    accent-color: #2563eb;
    height: 16px;
    margin: 0;
    width: 16px;
}

.auth-form__submit {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 13px 16px;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    width: 100%;
}

.auth-form__submit:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.auth-form__submit:active {
    transform: translateY(1px);
}

.auth-form__submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
    outline: none;
}

.auth-form__links {
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    text-align: center;
}

.auth-form__links a {
    color: #2563eb;
    font-size: 14px;
    text-decoration: none;
}

.auth-form__links a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 480px) {
    .auth-card {
        border-radius: 12px;
        padding: 28px 22px 24px;
    }

    .auth-card__title {
        font-size: 22px;
    }
}

.financial-dashboard-toolbar {
    margin-bottom: 16px;
    padding: 16px 18px;
}

.financial-dashboard-toolbar__intro {
    margin-bottom: 14px;
}

.financial-dashboard-toolbar__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
}

.financial-dashboard-toolbar__hint {
    color: rgba(0, 0, 0, 0.55);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    max-width: 640px;
}

.financial-dashboard-toolbar__controls {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.financial-dashboard-toolbar__range {
    flex: 1 1 320px;
    max-width: 520px;
    min-width: 280px;
}

.financial-dashboard-toolbar__range .dx-daterangebox,
.financial-dashboard-toolbar__range .financial-date-range {
    width: 100%;
}

.financial-dashboard-toolbar__range .dx-daterangebox {
    align-items: flex-end;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

.financial-dashboard-toolbar__range .dx-daterangebox .dx-datebox,
.financial-dashboard-toolbar__range .dx-daterangebox .dx-texteditor {
    flex: 1 1 0;
    min-width: 0;
}

.financial-dashboard-toolbar__range .dx-daterangebox-separator {
    align-self: flex-end;
    color: rgba(0, 0, 0, 0.35);
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 36px;
    margin: 0 0 22px;
    padding: 0;
}

.financial-dashboard-toolbar__range .dx-texteditor-label {
    color: rgba(0, 0, 0, 0.55);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.financial-dashboard-toolbar__apply {
    flex: 0 0 auto;
    margin-bottom: 2px;
}

.financial-dashboard-toolbar__apply .dx-button {
    min-width: 96px;
}

.financial-dashboard-kpis {
    margin-bottom: 20px;
}

.financial-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.financial-hypothetical-card {
    box-shadow: 0 2px 8px rgba(51, 122, 183, 0.2);
}

.financial-dashboard-charts {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.financial-dashboard-chart-card {
    min-height: 360px;
    padding: 12px 14px 8px;
}

.financial-dashboard-chart-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.financial-dashboard-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.financial-dashboard-section-note {
    color: rgba(0, 0, 0, 0.6);
    margin: 6px 0 12px;
    max-width: 720px;
}

.financial-dashboard-simulator-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.financial-dashboard-simulator-header .financial-dashboard-section-title,
.financial-dashboard-simulator-header .financial-dashboard-section-note {
    flex: 1 1 100%;
}

.financial-hypothetical-breakdown {
    color: rgba(0, 0, 0, 0.55);
    font-size: 13px;
    margin: 0 0 14px;
}

.financial-dashboard-simulator-grids {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.financial-dashboard-simulator-grid {
    padding: 12px 14px;
}

.financial-dashboard-grid-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
}

.financial-dashboard-error {
    color: #c9302c;
}

@media screen and (max-width: 960px) {
    .financial-dashboard-charts,
    .financial-dashboard-simulator-grids {
        grid-template-columns: 1fr;
    }
}

.settings-page {
    max-width: 720px;
}

.settings-status {
    margin-bottom: 16px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    padding: 24px;
}

.settings-section-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
}

.settings-section-description {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}

.settings-field-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.settings-field-hint {
    color: #5f6368;
    font-size: 13px;
    line-height: 1.45;
}

.settings-actions {
    display: flex;
    justify-content: flex-start;
}
