.sync-details-page {
    background: #101319;
    box-sizing: border-box;
    height: 100%;
    min-height: 100%;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    width: 100%;
}

.accounting-sync-panel {
    background: #101319;
    box-sizing: border-box;
    color: #f4f7f9;
    min-height: 100%;
    min-width: 0;
    padding: 1rem clamp(.75rem, 2vw, 2rem) 2rem;
    width: 100%;
}

.accounting-sync-task-picker {
    border: 0;
    margin: 0 0 1.25rem;
    min-width: 0;
    padding: 0;
}

.accounting-sync-task-picker legend {
    color: #b9c7d8;
    font-size: .95rem;
    margin-bottom: .85rem;
}

.accounting-sync-task-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.accounting-sync-task-card {
    align-items: flex-start;
    background: #191c21;
    border: 1px solid #45515f;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: .85rem;
    margin: 0;
    min-width: 0;
    padding: 1.1rem;
}

.accounting-sync-task-card:hover {
    border-color: #8aa5b9;
}

.accounting-sync-task-grid .e-btn.accounting-sync-task-card {
    background: #191c21;
    border: 1px solid #45515f;
    border-radius: 8px;
    height: auto;
    padding: 1.1rem;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

.accounting-sync-task-grid .e-btn.accounting-sync-task-card:hover {
    border-color: #8aa5b9;
}

.accounting-sync-task-card:has(input:checked) {
    background: #15312e;
    border-color: #62d29b;
    box-shadow: inset 0 0 0 1px #62d29b;
}

.accounting-sync-task-card:focus-within {
    outline: 3px solid #8bcfff;
    outline-offset: 3px;
}

.accounting-sync-task-card input {
    accent-color: #62d29b;
    flex: 0 0 auto;
    height: 1.1rem;
    margin: .2rem 0 0;
    width: 1.1rem;
}

.accounting-sync-task-card-copy {
    display: grid;
    gap: .4rem;
    overflow-wrap: anywhere;
}

.accounting-sync-task-card-copy strong {
    color: #f4f7f9;
    font-size: 1rem;
}

.accounting-sync-task-card-copy > span {
    color: #b9c7d8;
    font-size: .875rem;
    line-height: 1.5;
}

.accounting-sync-task-picker:disabled .accounting-sync-task-card {
    cursor: not-allowed;
    opacity: .6;
}

.accounting-sync-setup-sequence {
    margin-bottom: 1.25rem;
}

.accounting-sync-sequence-list {
    display: grid;
    gap: .65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.accounting-sync-sequence-item {
    align-items: center;
    background: #171b21;
    border: 1px solid #3f4a57;
    border-radius: 8px;
    display: grid;
    gap: .85rem;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-width: 0;
    padding: .85rem 1rem;
}

.accounting-sync-sequence-current {
    background: #15312e;
    border-color: #62d29b;
    box-shadow: inset 3px 0 0 #62d29b;
}

.accounting-sync-sequence-upcoming {
    opacity: .72;
}

.accounting-sync-sequence-number {
    align-items: center;
    background: #27313b;
    border: 1px solid #586676;
    border-radius: 50%;
    color: #f4f7f9;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 700;
    height: 1.9rem;
    justify-content: center;
    width: 1.9rem;
}

.accounting-sync-sequence-complete .accounting-sync-sequence-number {
    background: #24523e;
    border-color: #62d29b;
}

.accounting-sync-sequence-copy {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.accounting-sync-sequence-copy strong {
    color: #f4f7f9;
}

.accounting-sync-sequence-copy > span {
    color: #b9c7d8;
    font-size: .85rem;
    line-height: 1.4;
}

.accounting-sync-sequence-state {
    border: 1px solid #526171;
    border-radius: 999px;
    color: #c9d5df;
    font-size: .75rem;
    padding: .25rem .55rem;
    white-space: nowrap;
}

.accounting-sync-sequence-current .accounting-sync-sequence-state,
.accounting-sync-sequence-complete .accounting-sync-sequence-state {
    border-color: #4fae82;
    color: #8de0b5;
}

@media (max-width: 680px) {
    .accounting-sync-sequence-item {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .accounting-sync-sequence-state,
    .accounting-sync-sequence-action {
        grid-column: 2;
        justify-self: start;
    }
}

.accounting-sync-advisor-copy {
    color: #b9c7d8;
    margin: 0 0 .7rem;
}

.accounting-sync-list-pause-banner {
    align-items: center;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    color: #664d03;
    display: flex;
    gap: .55rem;
    line-height: 1.35;
    margin: .5rem 0 .75rem;
    padding: .55rem .75rem;
    width: 100%;
}

.accounting-sync-list-pause-banner i {
    flex: 0 0 auto;
}

.accounting-sync-header,
.accounting-sync-brand,
.accounting-sync-title-row,
.accounting-sync-banner,
.accounting-sync-context-action,
.accounting-sync-header-actions,
.accounting-sync-review-actions,
.accounting-sync-manage-actions,
.accounting-sync-sync-now-card,
.accounting-sync-section-heading {
    display: flex;
}

.accounting-sync-header {
    align-items: center;
    background: #191c21;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 5px;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto 1.25rem;
    max-width: 1120px;
    padding: .7rem .8rem;
}

.accounting-sync-brand {
    align-items: flex-start;
    gap: .85rem;
    min-width: 0;
}

.accounting-sync-mark {
    align-items: center;
    background: #2ca86f;
    border: 1px solid #62d29b;
    border-radius: 4px;
    color: #081b12;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: .75rem;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    letter-spacing: -.04em;
    text-transform: uppercase;
}

.accounting-sync-eyebrow,
.accounting-sync-section-kicker,
.accounting-sync-status-label {
    color: #79d6a8;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.accounting-sync-title-row {
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
}

.accounting-sync-title-row h1 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: .15rem 0 0;
}

.accounting-sync-environment {
    border: 1px solid;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    padding: .2rem .55rem;
    text-transform: uppercase;
}

.accounting-sync-environment-sandbox {
    background: #3d3118;
    border-color: #9f7e37;
    color: #f1cf78;
}

.accounting-sync-environment-production {
    background: #143d2b;
    border-color: #3ba875;
    color: #8de0b5;
}

.accounting-sync-subtitle {
    color: #aab5bf;
    font-size: .85rem;
    line-height: 1.5;
    margin: .22rem 0 0;
}

.accounting-sync-stale {
    background: #57341e;
    border-radius: 2px;
    color: #ffd09a;
    display: inline-block;
    margin-left: .4rem;
    padding: .1rem .35rem;
}

.accounting-sync-refresh {
    flex: 0 0 auto;
    min-height: 44px;
}

.accounting-sync-header-actions,
.accounting-sync-review-actions {
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.accounting-sync-header-actions .e-btn,
.accounting-sync-review-actions .e-btn {
    min-height: 44px;
}

.accounting-sync-announcer {
    margin: 0 auto;
    max-width: 1120px;
}

.accounting-sync-mode-heading {
    margin: 0 auto .85rem;
    max-width: 1120px;
    min-height: 3.35rem;
}

.accounting-sync-mode-heading h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    letter-spacing: -.025em;
    line-height: 1.15;
}

.accounting-sync-mode-heading h2:focus-visible {
    outline: 3px solid #76c7ff;
    outline-offset: 3px;
}

.accounting-sync-command-feedback {
    align-items: flex-start;
    background: #20282e;
    border-left: 3px solid #63b7e6;
    color: #cfdae2;
    display: flex;
    gap: .7rem;
    margin-bottom: .7rem;
    padding: .65rem .8rem;
}

.accounting-sync-command-feedback-busy {
    cursor: wait;
}

.accounting-sync-command-copy {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.accounting-sync-command-copy strong {
    font-weight: 650;
}

.accounting-sync-command-copy small {
    color: #b6c8d4;
    line-height: 1.4;
}

.accounting-sync-command-spinner {
    flex: 0 0 auto;
    height: 1.1rem;
    margin-top: .1rem;
    width: 1.1rem;
}

.accounting-ai-run-phase:has(.accounting-ai-review-spinner) {
    align-items: center;
    display: inline-flex;
    gap: .5rem;
}

.accounting-sync-loading {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    min-height: 22rem;
    position: relative;
}

.accounting-sync-loading > span {
    color: #b6c0c9;
}

.e-spinner-pane.accounting-sync-save-spinner,
.e-spinner-pane.e-spin-overlay.accounting-sync-save-spinner {
    background-color: rgb(22 25 29 / 78%) !important;
    cursor: wait !important;
    height: 100vh !important;
    inset: 0 !important;
    min-height: 100vh !important;
    pointer-events: all !important;
    position: fixed !important;
    width: 100vw !important;
    z-index: 100001 !important;
}

.accounting-sync-save-spinner .e-spin-label {
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 700;
}

.accounting-sync-activation-message {
    align-items: center;
    background: linear-gradient(145deg, #1d272b, #151c20);
    border: 1px solid #4b6a74;
    border-top: 4px solid #58cfa1;
    box-shadow: 0 24px 70px rgb(0 0 0 / 50%);
    color: #f3f7f8;
    display: flex;
    gap: 1rem;
    left: 50%;
    max-width: min(36rem, calc(100vw - 2rem));
    padding: 1.4rem;
    pointer-events: none;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 100002;
}

.accounting-sync-activation-message .accounting-sync-command-spinner {
    height: 2rem;
    width: 2rem;
}

.accounting-sync-activation-message h2 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin: .2rem 0 .45rem;
}

.accounting-sync-activation-message p {
    color: #c7d3d7;
    line-height: 1.5;
    margin: 0 0 .5rem;
}

.accounting-sync-activation-message small {
    color: #8fd9b8;
    display: block;
    font-weight: 650;
}

.accounting-sync-error-state {
    background: linear-gradient(145deg, #282125, #211c20);
    border: 1px solid #67434b;
    border-top: 3px solid #ef7882;
    margin: 2rem auto;
    max-width: 760px;
    padding: clamp(1rem, 3vw, 2rem);
}

.accounting-sync-error-state h2 {
    font-size: 1.5rem;
    margin: .45rem 0 .65rem;
}

.accounting-sync-error-state p {
    color: #d2c9cc;
    line-height: 1.6;
}

.accounting-sync-recovery {
    border-left: 3px solid #ef7882;
    padding-left: .8rem;
}

.accounting-sync-setup-mode,
.accounting-sync-operations-mode {
    margin: 0 auto;
    max-width: 1120px;
    min-width: 0;
}

.accounting-sync-setup-mode {
    max-width: 1120px;
}

.accounting-sync-banner {
    align-items: center;
    border: 1px solid;
    border-left-width: 4px;
    gap: .85rem;
    justify-content: flex-start;
    margin-bottom: .75rem;
    padding: .6rem .8rem;
}

.accounting-sync-panel > .accounting-sync-banner-error {
    box-sizing: border-box;
    margin-inline: auto;
    max-width: 1120px;
    width: 100%;
}

.accounting-sync-banner > div:not(.accounting-sync-context-action) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.accounting-sync-banner strong {
    color: #f5f8fa;
}

.accounting-sync-banner span:not(.accounting-sync-status-dot) {
    color: #c8d1d8;
}

.accounting-sync-banner-error {
    background: #3d2228;
    border-color: #8d4b55;
}

.accounting-sync-banner-warning {
    background: #3b321e;
    border-color: #8d743c;
}

.accounting-sync-banner-info {
    background: #183747;
    border-color: #3e7d9c;
}

.accounting-sync-banner-success {
    background: #17392a;
    border-color: #328b61;
}

.accounting-sync-status-dot {
    background: currentColor;
    border: 3px solid rgb(255 255 255 / 22%);
    border-radius: 50%;
    flex: 0 0 .85rem;
    height: .85rem;
    width: .85rem;
}

.accounting-sync-banner-error .accounting-sync-status-dot { color: #ff8791; }
.accounting-sync-banner-warning .accounting-sync-status-dot { color: #f0c86d; }
.accounting-sync-banner-info .accounting-sync-status-dot { color: #78cfff; }
.accounting-sync-banner-success .accounting-sync-status-dot { color: #70d6a3; }

.accounting-sync-context-action {
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.accounting-sync-primary-link {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
}

.accounting-sync-primary-link:hover,
.accounting-sync-primary-link:focus-visible {
    color: #fff;
}

.accounting-sync-summary {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 1rem;
}

.accounting-sync-status-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-sync-next-action-card {
    border-left: 3px solid #76c7ff;
    grid-column: span 2;
}

.accounting-sync-card {
    background: #22282e;
    border: 1px solid #39434d;
    border-top: 2px solid #4d5b67;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-height: 7rem;
    padding: .9rem 1rem;
}

.accounting-sync-card > span,
.accounting-sync-card small {
    color: #aab6c0;
}

.accounting-sync-card > span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.accounting-sync-card strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.accounting-sync-setup-review-summary {
    background: linear-gradient(145deg, #20282e, #1a2025);
    border: 1px solid #3d4d56;
    border-left: 4px solid #58cfa1;
    display: grid;
    gap: .85rem;
    margin: 0 0 1rem;
    padding: .9rem 1rem;
}

.accounting-sync-setup-review-summary h3 {
    font-size: 1.05rem;
    margin: .2rem 0 .35rem;
}

.accounting-sync-setup-review-summary p {
    color: #c3d0d6;
    line-height: 1.5;
    margin: 0;
}

.accounting-sync-manual-checklist {
    display: grid;
    gap: .45rem .8rem;
    grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
    margin: 0;
}

.accounting-sync-manual-checklist dt {
    color: #9fb0b8;
    font-weight: 700;
}

.accounting-sync-manual-checklist dd {
    color: #edf5f2;
    margin: 0;
}

.accounting-sync-setup-review-counts {
    margin: 0;
}

.accounting-sync-initial-import {
    background: linear-gradient(135deg, #1d2930, #1b2228);
    border: 1px solid #3b5664;
    border-left: 4px solid #58cfa1;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    margin: 0 0 1rem;
    padding: .9rem 1rem;
}

.accounting-sync-initial-import-heading {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.accounting-sync-initial-import-heading h3 {
    font-size: 1.05rem;
    margin: .2rem 0 0;
}

.accounting-sync-initial-import-percent {
    color: #75e1b8;
    font-size: 1.35rem;
}

.accounting-sync-progress-track {
    background: #10161a;
    border: 1px solid #40505a;
    border-radius: 999px;
    height: .8rem;
    overflow: hidden;
}

.accounting-sync-progress-track > span {
    background: linear-gradient(90deg, #46b986, #75e1b8);
    display: block;
    height: 100%;
    min-width: 0;
    transition: width .35s ease;
}

.accounting-sync-progress-track-indeterminate > span {
    animation: accounting-sync-progress-sweep 1.35s ease-in-out infinite;
    width: 38%;
}

@keyframes accounting-sync-progress-sweep {
    from {
        transform: translateX(-110%);
    }

    to {
        transform: translateX(275%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .accounting-sync-progress-track > span {
        transition: none;
    }

    .accounting-sync-progress-track-indeterminate > span {
        animation: none;
        opacity: .65;
        transform: none;
        width: 100%;
    }
}

.accounting-sync-initial-import-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .9rem;
}

.accounting-sync-initial-import-counts span,
.accounting-sync-initial-import > small {
    color: #b8c6ce;
}

.accounting-sync-initial-import-counts strong {
    color: #edf5f2;
}

.accounting-sync-initial-import-counts .accounting-sync-initial-import-issues,
.accounting-sync-initial-import-counts .accounting-sync-initial-import-issues strong {
    color: #f0c86d;
}

.accounting-sync-sync-now-card {
    align-items: flex-start;
    background: #17272d;
    border: 1px solid #2f6170;
    border-left: 4px solid #63b7e6;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0 1.25rem;
    padding: .9rem;
}

.accounting-sync-sync-now-card h3 {
    margin: .1rem 0 .35rem;
}

.accounting-sync-sync-now-card p {
    color: #c5d4dc;
    margin: 0 0 .7rem;
}

.accounting-sync-sync-now-button {
    flex: 0 0 auto;
    min-height: 44px;
}

.accounting-sync-sync-now-facts {
    display: grid;
    gap: .35rem .75rem;
    grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr);
    margin: 0;
}

.accounting-sync-sync-now-facts dt {
    color: #92aebb;
}

.accounting-sync-sync-now-facts dd {
    color: #edf5f2;
    margin: 0;
    overflow-wrap: anywhere;
}

.accounting-sync-now-dialog-content {
    color: #edf2f5;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    line-height: 1.55;
}

.accounting-sync-now-options {
    margin: 0;
}

.accounting-sync-tab {
    min-width: 0;
    padding: 1.25rem .15rem .5rem;
}

.accounting-sync-section-heading h2,
.accounting-sync-section-heading h3 {
    margin: .2rem 0 0;
}

.accounting-sync-tab h3 {
    margin: .25rem 0 1rem;
}

.accounting-sync-section-heading {
    align-items: flex-end;
    gap: 1rem;
    justify-content: space-between;
}

.accounting-sync-state-list,
.accounting-sync-detail-list {
    display: grid;
    gap: .6rem 1rem;
    grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
}

.accounting-sync-state-list dt,
.accounting-sync-detail-list dt {
    color: #9eabb6;
}

.accounting-sync-state-list dd,
.accounting-sync-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.accounting-sync-blocker-list {
    margin-top: 1.25rem;
}

.accounting-sync-blocker {
    background: #342f23;
    border-left: 3px solid #e1b852;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-bottom: .5rem;
    padding: .7rem .85rem;
}

.accounting-sync-blocker span,
.accounting-sync-empty {
    color: #bdc7cf;
}

.accounting-sync-grid-secondary {
    color: #9eabb6;
    display: block;
    margin-top: .2rem;
}

.accounting-sync-row-actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.accounting-sync-empty {
    background: #22292f;
    border: 1px dashed #46525d;
    margin: 1rem 0;
    padding: .9rem 1rem;
}

.accounting-sync-advanced {
    display: block;
    margin: 1rem auto 0;
    max-width: 1120px;
}

.accounting-sync-manage-connection {
    margin-left: 0;
    max-width: none;
}

.accounting-sync-advanced-content {
    color: #d4dce2;
    padding: .25rem;
}

.accounting-sync-technical-blockers {
    border-top: 1px solid #3c4650;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.accounting-sync-technical-blockers span {
    color: #b9c4cc;
}

.accounting-sync-manage-actions,
.accounting-sync-review-actions {
    flex-wrap: wrap;
    gap: .55rem;
    margin: 1rem 0;
}

.accounting-sync-reset-status,
.accounting-sync-reset-inline-state,
.accounting-sync-danger-zone,
.accounting-sync-reset-checkbox {
    display: flex;
}

.accounting-sync-reset-status {
    align-items: center;
    background: #3b321e;
    border: 1px solid #8d743c;
    border-left: 4px solid #f0c86d;
    gap: .85rem;
    justify-content: space-between;
    margin: 0 auto .75rem;
    max-width: 1120px;
    padding: .7rem .85rem;
}

.accounting-sync-reset-status > div,
.accounting-sync-reset-inline-state {
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.accounting-sync-reset-status span,
.accounting-sync-reset-inline-state span {
    color: #d9d0b7;
}

.accounting-sync-reset-title {
    align-items: center;
    display: inline-flex;
    gap: .5rem;
}

.accounting-sync-reset-title .accounting-sync-command-spinner {
    border-color: rgb(240 200 109 / 30%);
    border-top-color: #f0c86d;
    margin-top: 0;
}

.accounting-sync-reset-status-action,
.accounting-sync-reset-danger-button,
.accounting-sync-reset-dialog .e-btn {
    min-height: 44px;
}

.accounting-sync-reset-inline-state {
    background: #332d22;
    border: 1px solid #76613a;
    margin: 1rem 0;
    padding: .8rem;
}

.accounting-sync-reset-inline-state .e-btn {
    align-self: flex-start;
    margin-top: .35rem;
    min-height: 44px;
}

.accounting-sync-danger-zone {
    align-items: center;
    background: #2a2024;
    border: 1px solid #67434b;
    border-left: 4px solid #a65e68;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0;
    padding: .85rem;
}

.accounting-sync-danger-zone h3,
.accounting-sync-reset-counts h3 {
    font-size: .95rem;
    margin: 0 0 .25rem;
}

.accounting-sync-danger-zone p {
    color: #d8c8cc;
    margin: 0;
}

.accounting-sync-danger-action {
    border-color: #a65e68;
    color: #ffb1b8;
}

.accounting-sync-reset-dialog-content {
    color: #edf2f5;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    line-height: 1.42;
}

.accounting-sync-reset-dialog .e-dlg-header-content,
.accounting-sync-reset-dialog .e-footer-content {
    background: #1e1d21;
}

.accounting-sync-reset-dialog .e-dlg-content {
    background: #282828;
}

.accounting-sync-reset-dialog .e-footer-content .e-primary {
    background: #9f2d38;
    border-color: #c94a56;
    color: #fff;
}

.accounting-sync-reset-dialog .e-footer-content .e-primary:disabled,
.accounting-sync-reset-dialog .e-footer-content .e-primary.e-disabled {
    background: #563137;
    border-color: #654148;
    color: #b99da2;
}

.accounting-sync-reset-status-region {
    background: #20282e;
    border-left: 3px solid #63b7e6;
    color: #cfdae2;
    font-size: .88rem;
    padding: .5rem .65rem;
}

.accounting-sync-reset-loading {
    min-height: 8rem;
}

.accounting-sync-reset-preview-list {
    background: #20262c;
    border: 1px solid #3a444e;
    display: grid;
    gap: .45rem .85rem;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    margin: 0;
    padding: .75rem;
}

.accounting-sync-reset-context {
    align-items: center;
    background: #20262c;
    border: 1px solid #3a444e;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .7rem .75rem;
}

.accounting-sync-reset-context > span:first-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.accounting-sync-reset-context strong {
    overflow-wrap: anywhere;
}

.accounting-sync-reset-context small,
.accounting-sync-reset-effects p {
    color: #b9c4cc;
}

.accounting-sync-reset-effects {
    background: #211f23;
    border: 1px solid #3d3b42;
    display: grid;
    gap: .35rem;
    padding: .7rem .75rem;
}

.accounting-sync-reset-effects p {
    margin: 0;
}

.accounting-sync-reset-preview-list dt {
    color: #9eabb6;
}

.accounting-sync-reset-preview-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.accounting-sync-reset-counts {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-sync-reset-dialog-details .accounting-sync-reset-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-sync-reset-counts h3 {
    grid-column: 1 / -1;
}

.accounting-sync-reset-counts div {
    align-items: center;
    background: #22292f;
    border: 1px solid #3b4650;
    display: flex;
    justify-content: space-between;
    min-height: 38px;
    padding: .45rem .55rem;
}

.accounting-sync-reset-counts span {
    color: #aab6c0;
}

.accounting-sync-reset-blockers {
    background: #342f23;
    border-left: 3px solid #e1b852;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .75rem;
}

.accounting-sync-reset-checkbox {
    align-items: flex-start;
    display: flex;
    gap: .65rem;
}

.accounting-sync-reset-checkbox input {
    flex: 0 0 auto;
    height: 22px;
    margin-top: .15rem;
    width: 22px;
}

.accounting-sync-reset-confirmation-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.accounting-sync-reset-confirmation-field input {
    background: #11161b;
    border: 1px solid #53616d;
    color: #f4f7f9;
    min-height: 44px;
    padding: .55rem .65rem;
    text-transform: none;
    width: 100%;
}

.accounting-sync-reset-confirmation-field input:focus-visible,
.accounting-sync-reset-checkbox input:focus-visible {
    outline: 3px solid #76c7ff;
    outline-offset: 2px;
}

.accounting-sync-advanced.e-accordion,
.accounting-sync-advanced .e-acrdn-item,
.accounting-sync-advanced .e-acrdn-header,
.accounting-sync-advanced .e-acrdn-panel {
    background: #20262c;
    border-color: #3a444e;
    color: #edf2f5;
}

#accountingSyncTabs.e-tab {
    background: transparent;
    height: auto !important;
    min-width: 0;
}

#accountingSyncTabs.e-tab > .e-content {
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
}

#accountingSyncTabs .e-tab-header {
    background: #20262c;
    border: 1px solid #36414b;
}

#accountingSyncTabs .e-tab-text {
    color: #c5cfd7;
}

#accountingSyncTabs .e-active .e-tab-text {
    color: #83dcb0;
}

.accounting-sync-policy-card {
    background: #22292f;
    border: 1px solid #3b4650;
    color: #f3f6f8;
    margin: .75rem 0;
}

.accounting-sync-visually-hidden {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.accounting-sync-visually-hidden:focus {
    clip: auto;
    clip-path: none;
    height: auto;
    margin: 0;
    overflow: visible;
    padding: .5rem;
    position: static;
    width: auto;
    white-space: normal;
}

.accounting-sync-panel .e-btn:focus-visible,
.accounting-sync-primary-link:focus-visible,
#accountingSyncTabs .e-toolbar-item:focus-visible {
    outline: 3px solid #76c7ff;
    outline-offset: 2px;
}

@media (max-width: 960px) {
    .accounting-sync-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-sync-card:last-child {
        grid-column: 1 / -1;
    }

    .accounting-sync-status-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .accounting-sync-panel {
        max-width: 100%;
        padding: .75rem .65rem 1.5rem;
    }

    .accounting-sync-header {
        align-items: stretch;
        flex-direction: column;
    }

    .accounting-sync-brand {
        gap: .65rem;
    }

    .accounting-sync-mark {
        flex-basis: 40px;
        height: 40px;
    }

    .accounting-sync-subtitle > span[aria-hidden="true"] {
        display: none;
    }

    .accounting-sync-subtitle {
        display: flex;
        flex-direction: column;
        gap: .15rem;
    }

    .accounting-sync-header-actions {
        align-items: stretch;
        width: 100%;
    }

    .accounting-sync-header-actions .e-btn {
        flex: 1 1 12rem;
        min-height: 44px;
    }

    .accounting-sync-banner {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: .8rem;
    }

    .accounting-sync-context-action {
        margin-left: 1.7rem;
        width: calc(100% - 1.7rem);
    }

    .accounting-sync-context-action .e-btn,
    .accounting-sync-primary-link {
        min-height: 44px;
        width: 100%;
    }

    .accounting-sync-summary {
        grid-template-columns: 1fr;
    }

    .accounting-sync-status-overview,
    .accounting-ai-proposal-group article.accounting-ai-proposal-decision,
    .accounting-ai-before-after {
        grid-template-columns: 1fr;
    }

    .accounting-sync-next-action-card {
        grid-column: auto;
    }

    .accounting-ai-edit-choice,
    .accounting-ai-revision-dialog .e-btn {
        width: 100%;
    }

    .accounting-sync-initial-import-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
    }

    .accounting-sync-card:last-child {
        grid-column: auto;
    }

    .accounting-sync-state-list,
    .accounting-sync-detail-list,
    .accounting-sync-manual-checklist {
        grid-template-columns: 1fr;
    }

    .accounting-sync-state-list dt,
    .accounting-sync-detail-list dt {
        margin-top: .3rem;
    }

    .accounting-sync-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .accounting-sync-manage-actions {
        flex-direction: column;
    }

    .accounting-sync-reset-status,
    .accounting-sync-danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .accounting-sync-reset-status-action,
    .accounting-sync-reset-danger-button,
    .accounting-sync-reset-inline-state .e-btn {
        width: 100%;
    }

    .accounting-sync-reset-preview-list,
    .accounting-sync-reset-counts {
        grid-template-columns: 1fr;
    }

    .accounting-sync-manage-actions .e-btn {
        min-height: 44px;
        width: 100%;
    }

    #accountingSyncTabs .e-tab-header {
        max-width: 100%;
    }
}

.accounting-sync-grid-technical {
    color: #8fa0a7;
    font-size: .72rem;
    margin-top: .25rem;
}

.accounting-sync-grid-technical summary {
    cursor: pointer;
}

.accounting-sync-grid-technical code {
    display: block;
    margin-top: .2rem;
    overflow-wrap: anywhere;
}

.accounting-ai-approach,
.accounting-ai-run,
.accounting-ai-proposal {
    background: linear-gradient(145deg, #202a2d, #1a2025);
    border: 1px solid #3f5158;
    border-top: 3px solid #58cfa1;
    color: #edf6f2;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.accounting-ai-approach-heading h3,
.accounting-ai-run h3,
.accounting-ai-proposal h3 {
    margin: .25rem 0 .4rem;
}

.accounting-ai-approach-heading p,
.accounting-ai-run > p,
.accounting-ai-proposal > p {
    color: #bbc9ce;
    line-height: 1.55;
    margin: 0;
}

.accounting-ai-approach-fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.accounting-ai-approach-fieldset > legend {
    color: #f4f7f9;
    font-size: 1rem;
    font-weight: 750;
    padding: 0;
}

.accounting-ai-approach-options {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.25rem 0;
}

.accounting-ai-approach-single .accounting-ai-approach-options {
    grid-template-columns: minmax(0, 1fr);
}

.accounting-ai-approach-option {
    align-items: flex-start;
    background: #171d21;
    border: 1px solid #43525a;
    color: #edf6f2;
    cursor: pointer;
    display: grid;
    gap: .5rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 13rem;
    padding: 1.05rem;
    position: relative;
    text-align: left;
}

.accounting-ai-approach-option > input {
    accent-color: #58cfa1;
    height: 1.15rem;
    margin: .15rem 0 0;
    width: 1.15rem;
}

.accounting-ai-approach-copy {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
}

.accounting-ai-approach-copy > em {
    color: #8de0b5;
    font-size: .72rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.accounting-ai-approach-option:hover,
.accounting-ai-approach-option:focus-visible,
.accounting-ai-approach-selected {
    background: #1c302a;
    border-color: #68d5a5;
    box-shadow: inset 0 0 0 1px #68d5a5;
}

.accounting-ai-approach-option:focus-within {
    outline: 3px solid #76c7ff;
    outline-offset: 2px;
}

.accounting-ai-approach-copy > i {
    color: #75e1b8;
    font-size: 1.4rem;
}

.accounting-ai-approach-copy > strong {
    font-size: 1.05rem;
}

.accounting-ai-approach-copy > span:not(.accounting-ai-approach-badge),
.accounting-ai-approach-copy > small {
    color: #b7c5ca;
    line-height: 1.45;
}

.accounting-ai-approach-badge {
    background: #58cfa1;
    color: #10251d;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: .2rem .45rem;
    position: absolute;
    right: .7rem;
    text-transform: uppercase;
    top: .7rem;
}

.accounting-ai-approach-action,
.accounting-ai-run-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.accounting-ai-approach-action > span {
    color: #a9b7bc;
    font-size: .85rem;
}

.accounting-ai-approach-compact {
    border-top-width: 1px;
    margin: 0 0 1rem;
    padding: .85rem;
}

.accounting-ai-approach-compact .accounting-ai-approach-options {
    margin: .65rem 0;
}

.accounting-ai-approach-compact .accounting-ai-approach-option {
    min-height: 0;
    padding: .8rem;
}

.accounting-ai-approach-compact .accounting-ai-approach-copy > span:not(.accounting-ai-approach-badge) {
    font-size: .88rem;
}

.accounting-ai-approach-status {
    align-items: center;
    color: #b7c5ca;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .65rem;
    justify-content: space-between;
}

.accounting-ai-approach-status > span {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
}

.accounting-ai-approach-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: .76;
}

.accounting-ai-run > header,
.accounting-ai-proposal > header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.accounting-ai-run-phase,
.accounting-ai-proposal-state {
    background: #17392a;
    border: 1px solid #328b61;
    color: #8de0b5;
    font-size: .72rem;
    font-weight: 750;
    padding: .3rem .55rem;
    white-space: nowrap;
}

.accounting-ai-proposal-stale {
    background: #3b321e;
    border-color: #8d743c;
    color: #f0c86d;
}

.accounting-ai-progress {
    background: #0e1518;
    border: 1px solid #40535a;
    height: .75rem;
    margin: 1rem 0 .35rem;
    overflow: hidden;
}

.accounting-ai-progress > span {
    background: linear-gradient(90deg, #3eb982, #78dfb4);
    display: block;
    height: 100%;
    transition: width .3s ease;
}

.accounting-ai-run > small,
.accounting-ai-expiry {
    color: #9fb0b6;
}

.accounting-ai-run-warning,
.accounting-ai-exclusions {
    background: #342f23;
    border-left: 3px solid #e1b852;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: 1rem 0;
    padding: .7rem .85rem;
}

.accounting-ai-proposal {
    border-top-width: 1px;
    margin: 1.1rem 0;
    padding: 1rem;
}

.accounting-ai-proposal-counts {
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1rem 0;
}

.accounting-ai-proposal-counts > div {
    background: #151c20;
    border: 1px solid #38484f;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .7rem;
}

.accounting-ai-proposal-counts strong {
    color: #75e1b8;
    font-size: 1.2rem;
}

.accounting-ai-proposal-counts span,
.accounting-ai-proposal-group article span,
.accounting-ai-retained article span {
    color: #b8c5ca;
}

.accounting-ai-proposal-group,
.accounting-ai-retained {
    border-top: 1px solid #3a484e;
    margin-top: 1rem;
    padding-top: .8rem;
}

.accounting-ai-proposal-group h4 {
    font-size: .95rem;
    margin: 0 0 .55rem;
}

.accounting-ai-proposal-group article,
.accounting-ai-retained article {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    margin: .45rem 0;
}

.accounting-ai-proposal-group article.accounting-ai-proposal-decision {
    align-items: start;
    display: grid;
    gap: .7rem;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr) auto;
}

.accounting-ai-before-after {
    background: #171d22;
    border: 1px solid #324047;
    display: grid;
    gap: .35rem .65rem;
    grid-template-columns: minmax(7.5rem, auto) minmax(0, 1fr);
    margin: 0;
    padding: .55rem .65rem;
}

.accounting-ai-before-after dt {
    color: #92a2ad;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.accounting-ai-before-after dd {
    color: #eef5f3;
    margin: 0;
    overflow-wrap: anywhere;
}

.accounting-ai-edit-choice {
    align-self: start;
    white-space: nowrap;
}

.accounting-ai-revision-dialog.e-dialog {
    background: #282828;
    border: 1px solid #485057;
    border-radius: 10px;
    max-height: min(88vh, 760px);
    overflow: hidden;
}

.accounting-ai-revision-dialog .e-dlg-header-content {
    background: #1e1d21;
    border-bottom: 1px solid #41484f;
    padding: .85rem 1rem;
}

.accounting-ai-revision-dialog .e-dlg-header {
    color: #f5f6f8;
    font-size: .95rem;
    font-weight: 700;
}

.accounting-ai-revision-dialog .e-dlg-content {
    background: #282828;
    color: #edf6f2;
    max-height: calc(88vh - 145px);
    padding: 1rem;
}

.accounting-ai-revision-dialog .e-footer-content {
    background: #242424;
    border-top: 1px solid #41484f;
    padding: .75rem 1rem;
}

.accounting-ai-revision-dialog .e-footer-content .e-primary {
    background: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.accounting-ai-revision-dialog .e-footer-content .e-primary:focus-visible,
.accounting-ai-revision-dialog .e-footer-content .e-btn:focus-visible {
    outline: 3px solid rgb(118 199 255 / 48%);
    outline-offset: 2px;
}

.accounting-ai-revision-body,
.accounting-ai-revision-summary,
.accounting-ai-revision-field {
    display: grid;
    gap: .85rem;
}

.accounting-ai-revision-body {
    color: #edf6f2;
}

.accounting-ai-revision-summary h3 {
    color: #f5f6f8;
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0;
}

.accounting-ai-revision-summary p,
.accounting-ai-revision-field small {
    color: #b8c7ce;
    line-height: 1.45;
    margin: 0;
}

.accounting-ai-revision-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: space-between;
}

.accounting-ai-revision-current-chip {
    background: #173428;
    border: 1px solid #3b765d;
    border-radius: 999px;
    color: #d7f5e7;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    padding: .38rem .55rem;
    white-space: nowrap;
}

.accounting-ai-revision-choice-list {
    border: 0;
    display: grid;
    gap: .65rem;
    margin: 0;
    padding: 0;
}

.accounting-ai-revision-choice-list legend {
    color: #eef5f3;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .1rem;
}

.accounting-ai-revision-radio-card {
    align-items: flex-start;
    background: #1f2328;
    border: 1px solid #4d565f;
    border-radius: 9px;
    color: #f3f7f6;
    cursor: pointer;
    display: flex;
    gap: .7rem;
    min-height: 64px;
    padding: .8rem;
    transition: background-color .12s ease, border-color .12s ease;
}

.accounting-ai-revision-radio-card.is-selected {
    background: #173428;
    border-color: #4fa57c;
}

.accounting-ai-revision-radio-card:hover {
    border-color: #7ac29c;
}

.accounting-ai-revision-radio-card:has(input:focus-visible) {
    outline: 3px solid rgb(118 199 255 / 42%);
    outline-offset: 2px;
}

.accounting-ai-revision-radio-card input {
    accent-color: #31a66a;
    flex: 0 0 auto;
    margin-top: .2rem;
}

.accounting-ai-revision-radio-card > span {
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.accounting-ai-revision-radio-card small {
    color: #b8c7ce;
    font-size: .76rem;
    line-height: 1.35;
}

.accounting-ai-revision-field > span {
    color: #dbe6ea;
    font-weight: 700;
}

.accounting-ai-revision-picker {
    border: 0;
    display: grid;
    gap: .65rem;
    margin: .85rem 0 0;
    padding: 0;
}

.accounting-ai-revision-picker legend {
    color: #eef5f3;
    font-weight: 700;
}

.accounting-ai-setting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.25rem 0;
    width: 100%;
}

.accounting-ai-setting-actions .e-btn {
    background: #252e33;
    border: 1px solid #84949f;
    border-radius: 6px;
    color: #f4f7f9;
    min-height: 44px;
    padding: .7rem 1.25rem;
    font-weight: 600;
    text-transform: none;
    white-space: normal;
}

.accounting-ai-setting-actions .e-btn.e-primary {
    background: #62d29b;
    border-color: #62d29b;
    color: #10251d;
}

.accounting-ai-setting-actions .e-btn:hover:not(:disabled) {
    background: #34454a;
    border-color: #d4e8df;
}

.accounting-ai-setting-actions .e-btn.e-primary:hover:not(:disabled) {
    background: #83e2b3;
    color: #10251d;
}

.accounting-ai-setting-actions .e-btn:focus-visible {
    outline: 3px solid #8bcfff;
    outline-offset: 3px;
}

.accounting-ai-setting-actions .e-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .accounting-ai-setting-actions .accounting-ai-change-choice {
        flex-basis: 100%;
    }

    .accounting-ai-setting-actions .accounting-ai-details,
    .accounting-ai-setting-actions .accounting-ai-review-back {
        flex: 1;
    }
}

.accounting-ai-revision-help {
    color: #b8c7ce;
    margin: 0;
}

.accounting-ai-revision-options {
    display: grid;
    gap: .65rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.accounting-ai-revision-card {
    padding: .85rem;
}

.accounting-ai-raw-value code {
    color: #f2d892;
    white-space: pre-wrap;
}

.accounting-sync-product-workspace {
    background: #151a1f;
    border: 1px solid #38444c;
    border-radius: 6px;
    display: grid;
    gap: .75rem;
    margin: .9rem 0 1rem;
    padding: .85rem;
}

.accounting-ai-retained summary {
    color: #8fd9b8;
    cursor: pointer;
    font-weight: 700;
}

.accounting-ai-run-actions {
    margin-top: 1rem;
}

.accounting-ai-apply {
    background: #d9a435 !important;
    border-color: #efc15f !important;
    color: #17140d !important;
}

@media (prefers-reduced-motion: reduce) {
    .accounting-ai-progress > span {
        transition: none;
    }
}

@media (max-width: 700px) {
    .accounting-ai-approach-options,
    .accounting-ai-proposal-counts {
        grid-template-columns: 1fr;
    }

    .accounting-ai-approach-option {
        min-height: 0;
    }

    .accounting-ai-run > header,
    .accounting-ai-proposal > header {
        flex-direction: column;
    }

    .accounting-ai-approach-status,
    .accounting-ai-approach-action {
        align-items: stretch;
        flex-direction: column;
    }

    .accounting-ai-approach-status .e-btn,
    .accounting-ai-approach-action .e-btn {
        width: 100%;
    }

    .accounting-ai-run-phase,
    .accounting-ai-proposal-state {
        white-space: normal;
    }
}
