:root {
    color-scheme: light;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f7fa;
    color: #172033;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button {
    border: 0;
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    font: inherit;
    font-weight: 650;
    background: #2563eb;
    color: white;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
}

.subtitle {
    max-width: 650px;
    margin-bottom: 0;
    color: #667085;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card,
.connection-card,
.empty-state {
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.summary-card {
    padding: 1.25rem;
}

.summary-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #667085;
    font-size: 0.9rem;
}

.summary-card strong {
    font-size: 1.6rem;
}

.section-heading {
    margin-bottom: 1rem;
}

.connection-list {
    display: grid;
    gap: 1rem;
}

.connection-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem;
}

.connection-card h3 {
    margin-bottom: 0.25rem;
}

.connection-card p {
    margin-bottom: 0;
    color: #667085;
}

.connection-status {
    display: grid;
    justify-items: end;
    gap: 0.4rem;
    text-align: right;
}

.status-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-ok {
    background: #dcfae6;
    color: #067647;
}

.status-disabled {
    background: #f2f4f7;
    color: #475467;
}

.connection-status small {
    color: #667085;
}

.empty-state {
    padding: 2rem;
    text-align: center;
}

.empty-state p {
    margin: 0 auto;
    max-width: 550px;
    color: #667085;
}

@media (max-width: 650px) {
    .page-header,
    .connection-card {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .connection-status {
        justify-items: start;
        text-align: left;
    }
}

.primary-button,
.secondary-button,
.back-link {
    text-decoration: none;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    background: #2563eb;
    color: white;
    font-weight: 650;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #475467;
}

.form-card {
    max-width: 650px;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 2rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

form {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}

label {
    display: grid;
    gap: 0.5rem;
    font-weight: 650;
}

input,
select {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 0.75rem;
    padding: 0.8rem;
    background: white;
    color: inherit;
    font: inherit;
}

input:focus,
select:focus {
    border-color: #2563eb;
    outline: 3px solid rgb(37 99 235 / 15%);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #344054;
}

.error-message {
    margin: 0;
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    background: #fef3f2;
    color: #b42318;
    font-size: 0.9rem;
}

.remove-link {
    color: #b42318;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.remove-link:hover {
    text-decoration: underline;
}

.danger-card {
    border-color: #fecdca;
}

.danger-eyebrow {
    color: #b42318;
}

.danger-button {
    background: #d92d20;
}

.danger-button:hover {
    background: #b42318;
}

.affected-accounts {
    margin-top: 2rem;
}

.affected-accounts h2 {
    font-size: 1.1rem;
}

.account-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
}

.account-list li div {
    display: grid;
    gap: 0.2rem;
}

.account-list span,
.account-list small,
.muted {
    color: #667085;
}

.connection-details {
    min-width: 0;
    flex: 1;
}

.connection-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.connection-error {
    margin-top: 0.6rem;
    margin-bottom: 0;
    color: #b42318;
    font-size: 0.9rem;
}

.empty-state-button {
    margin-top: 1.25rem;
}

@media (max-width: 650px) {
    .connection-actions {
        justify-content: flex-start;
    }
}

.connection-panel {
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.connection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem;
}

.connection-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.connection-title-row h3 {
    margin-bottom: 0;
}

.connection-consent {
    display: grid;
    flex-shrink: 0;
    justify-items: end;
    gap: 0.25rem;
    color: #667085;
    font-size: 0.85rem;
    text-align: right;
}

.connection-consent strong {
    color: #344054;
}

.warning-text {
    color: #b54708;
    font-weight: 650;
}

.connection-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid #e4e7ec;
    border-bottom: 1px solid #e4e7ec;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
}

.menu-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: white;
    color: #344054;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.menu-action:hover {
    border-color: #98a2b3;
    background: #f9fafb;
}

.menu-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.menu-action-danger {
    margin-left: auto;
    border-color: #fecdca;
    color: #b42318;
}

.menu-action-danger:hover {
    border-color: #f97066;
    background: #fef3f2;
}

.account-section {
    padding: 1.25rem;
}

.account-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-section-heading h4 {
    margin: 0;
    font-size: 1rem;
}

.account-section-heading span {
    color: #667085;
    font-size: 0.85rem;
}

.account-table-wrapper {
    overflow-x: auto;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
}

.account-table th,
.account-table td {
    border-bottom: 1px solid #eaecf0;
    padding: 0.85rem 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.account-table th {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.account-table td {
    font-size: 0.9rem;
}

.account-table tbody tr:last-child td {
    border-bottom: 0;
}

.account-name {
    display: grid;
    gap: 0.2rem;
}

.account-name span {
    color: #667085;
    font-size: 0.8rem;
}

.metric-value {
    font-weight: 700;
}

.account-empty-state {
    border: 1px dashed #d0d5dd;
    border-radius: 0.75rem;
    padding: 1rem;
    color: #667085;
    text-align: center;
}

@media (max-width: 750px) {
    .connection-header {
        flex-direction: column;
    }

    .connection-consent {
        justify-items: start;
        text-align: left;
    }

    .menu-action-danger {
        margin-left: 0;
    }
}
.sync-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.sync-form .menu-action {
    margin: 0;
    cursor: pointer;
}

.sync-days-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 650;
}

.sync-days-input {
    width: 5rem;
    height: 2.3rem;
    border-radius: 0.6rem;
    padding: 0.35rem 0.5rem;
}

.transactions-container {
    width: min(1150px, calc(100% - 2rem));
}

.transactions-page-header {
    margin-bottom: 2rem;
}

.transaction-account-list {
    display: grid;
    gap: 1.5rem;
}

.transaction-account-card {
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.transaction-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 1.5rem;
}

.transaction-account-header h2 {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
}

.transaction-account-header p {
    margin: 0;
    color: #667085;
    font-size: 0.85rem;
}

.transaction-account-header p span {
    margin-left: 0.5rem;
}

.transaction-account-summary {
    display: grid;
    flex-shrink: 0;
    justify-items: end;
}

.transaction-account-summary strong {
    color: #172033;
    font-size: 1.2rem;
}

.transaction-account-summary span {
    color: #667085;
    font-size: 0.8rem;
}

.transaction-table-wrapper {
    overflow-x: auto;
    border-top: 1px solid #eaecf0;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th,
.transaction-table td {
    border-bottom: 1px solid #eaecf0;
    padding: 0.9rem 1.5rem;
    text-align: left;
    vertical-align: middle;
}

.transaction-table th {
    background: #f9fafb;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.transaction-table td {
    font-size: 0.9rem;
}

.transaction-table tbody tr:last-child td {
    border-bottom: 0;
}

.transaction-table tbody tr:hover {
    background: #f9fafb;
}

.transaction-date {
    width: 110px;
    color: #667085;
    white-space: nowrap;
}

.transaction-main {
    display: grid;
    gap: 0.2rem;
}

.transaction-main strong {
    color: #172033;
    font-weight: 650;
}

.transaction-main span {
    color: #667085;
    font-size: 0.82rem;
}

.transaction-main small {
    color: #98a2b3;
    font-size: 0.75rem;
}

.amount-column {
    width: 160px;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.transaction-positive {
    color: #067647 !important;
}

.transaction-negative {
    color: #b42318 !important;
}

.transaction-account-empty {
    border-top: 1px solid #eaecf0;
    padding: 1.5rem;
    color: #667085;
    text-align: center;
}

@media (max-width: 650px) {
    .transaction-account-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .transaction-account-summary {
        justify-items: start;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 0.75rem;
    }

    .transaction-date {
        width: auto;
    }

    .amount-column {
        width: auto;
    }
}

.transactions-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.account-selector-form {
    display: grid;
    min-width: 280px;
    gap: 0.4rem;
    margin: 0;
}

.account-selector-form label {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 700;
}

.account-selector-form select {
    min-height: 2.7rem;
}

@media (max-width: 650px) {
    .transactions-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .account-selector-form {
        min-width: 0;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-button {
    border: 1px solid #d0d5dd;
    border-radius: 0.75rem;
    background: white;
}

.known-accounts-header {
    margin-bottom: 2rem;
}

.known-accounts-error {
    margin-bottom: 1rem;
}

.known-account-add-card {
    margin-bottom: 2rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.known-account-add-card h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.known-account-add-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto;
    align-items: end;
    gap: 1rem;
    margin: 0;
}

.known-account-list-section {
    margin-top: 2rem;
}

.known-account-list {
    display: grid;
    gap: 0.75rem;
}

.known-account-row {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1rem;
    background: white;
    box-shadow: 0 4px 16px rgb(16 24 40 / 4%);
}

.known-account-edit-form {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) auto auto;
    align-items: end;
    gap: 0.75rem;
    margin: 0;
}

.known-account-edit-form label span {
    color: #667085;
    font-size: 0.75rem;
}

.known-account-source {
    display: flex;
    align-items: center;
    min-height: 2.7rem;
}

.secondary-save-button {
    border: 1px solid #d0d5dd;
    background: white;
    color: #344054;
}

.known-account-delete-form {
    display: block;
    margin: 0;
}

.known-account-delete-button {
    border: 1px solid #fecdca;
    background: white;
    color: #b42318;
}

.known-account-delete-button:hover {
    background: #fef3f2;
}

@media (max-width: 850px) {
    .known-account-add-form,
    .known-account-edit-form {
        grid-template-columns: 1fr;
    }

    .known-account-row {
        align-items: stretch;
        flex-direction: column;
    }

    .known-account-source {
        min-height: 0;
    }

    .known-account-delete-button {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .header-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.transaction-account-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.delete-transactions-form {
    display: inline-flex;
    margin: 0;
}

.delete-transactions-button {
    border: 1px solid #fecdca;
    padding: 0.55rem 0.75rem;
    background: white;
    color: #b42318;
    font-size: 0.82rem;
}

.delete-transactions-button:hover {
    border-color: #f97066;
    background: #fef3f2;
}

@media (max-width: 650px) {
    .transaction-account-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

.transaction-main .transaction-ynab-payee {
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 650;
}

.account-sync-error {
    margin-top: 0.35rem;
    max-width: 420px;
    color: #b42318;
    font-size: 0.78rem;
    white-space: normal;
}

.schedule-add-form {
    display: grid;
    grid-template-columns:
        minmax(160px, 1fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr)
        130px
        minmax(190px, 1fr)
        auto
        auto;
    align-items: end;
    gap: 1rem;
    margin: 0;
}

.schedule-edit-form {
    display: grid;
    flex: 1;
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(160px, 1fr)
        minmax(170px, 1fr)
        110px
        minmax(180px, 1fr)
        auto
        auto;
    align-items: end;
    gap: 0.75rem;
    margin: 0;
}

.schedule-edit-form label span {
    color: #667085;
    font-size: 0.75rem;
}

.schedule-enabled-label {
    display: inline-flex;
    align-items: center;
    align-self: center;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    white-space: nowrap;
}

.schedule-enabled-label input {
    width: auto;
}

@media (max-width: 1100px) {
    .schedule-add-form,
    .schedule-edit-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .schedule-add-form,
    .schedule-edit-form {
        grid-template-columns: 1fr;
    }
}

.global-sync-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.global-sync-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.global-sync-card p {
    margin: 0.45rem 0 0;
    color: #667085;
    font-size: 0.9rem;
}

.global-sync-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.global-sync-form {
    display: block;
    flex-shrink: 0;
    margin: 0;
}

.toggle-control {
    display: inline-flex;
    cursor: pointer;
}

.toggle-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle-track {
    display: flex;
    align-items: center;
    width: 3rem;
    height: 1.65rem;
    border-radius: 999px;
    padding: 0.2rem;
    background: #d0d5dd;
    transition: background 150ms ease;
}

.toggle-thumb {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgb(16 24 40 / 25%);
    transition: transform 150ms ease;
}

.toggle-control input:checked + .toggle-track {
    background: #12b76a;
}

.toggle-control input:checked + .toggle-track .toggle-thumb {
    transform: translateX(1.35rem);
}

.toggle-control input:focus-visible + .toggle-track {
    outline: 3px solid rgb(37 99 235 / 20%);
}

@media (max-width: 650px) {
    .global-sync-card {
        align-items: flex-start;
    }
}

.schedule-toggle-field {
    display: grid;
    align-self: end;
    justify-items: center;
    gap: 0.45rem;
}

.schedule-toggle-field > span {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 650;
}

.schedule-interval-field[hidden],
.schedule-specific-times-field[hidden] {
    display: none;
}

.schedule-run-status {
    display: grid;
    min-width: 175px;
    gap: 0.2rem;
    color: #667085;
    font-size: 0.75rem;
}

.schedule-run-status strong {
    max-width: 250px;
    color: #b42318;
    font-weight: 650;
}

.schedule-days-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-days-control input {
    min-width: 80px;
}

.schedule-days-control span {
    color: #667085;
    font-size: 0.85rem;
}

.schedule-status-panel {
    display: grid;
    flex-basis: 100%;
    gap: 0.75rem;
    border-top: 1px solid #eaecf0;
    padding-top: 1rem;
}

.schedule-status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.schedule-status-summary div {
    display: grid;
    gap: 0.15rem;
}

.schedule-status-summary span {
    color: #667085;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.schedule-status-summary strong {
    font-size: 0.85rem;
}

.schedule-last-error {
    margin: 0;
    color: #b42318;
    font-size: 0.82rem;
}

.schedule-log-details summary {
    cursor: pointer;
    color: #344054;
    font-size: 0.85rem;
    font-weight: 650;
}

.schedule-log-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.schedule-log-entry {
    border: 1px solid #eaecf0;
    border-radius: 0.65rem;
    padding: 0.75rem;
    background: #f9fafb;
}

.schedule-log-entry > div {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.schedule-log-entry p {
    margin: 0.4rem 0 0;
    color: #667085;
    font-size: 0.78rem;
}

.schedule-log-entry small {
    display: block;
    margin-top: 0.35rem;
    color: #b42318;
}

.schedule-log-status {
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.schedule-log-status-success {
    background: #dcfae6;
    color: #067647;
}

.schedule-log-status-partial {
    background: #fef0c7;
    color: #b54708;
}

.schedule-log-status-failed {
    background: #fef3f2;
    color: #b42318;
}

.schedule-log-status-running {
    background: #eff8ff;
    color: #175cd3;
}

/* =========================================================
   YNAB integration
   Dashboard card and budget setup page
   ========================================================= */

/* Dashboard integration card */

.ynab-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.ynab-card-main {
    min-width: 0;
    flex: 1;
}

.ynab-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ynab-card-eyebrow {
    margin: 0 0 0.35rem;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ynab-card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ynab-card-title-row h2 {
    margin: 0;
    color: #172033;
    font-size: 1.1rem;
}

.ynab-budget-name {
    margin: 0.7rem 0 0;
    overflow: hidden;
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ynab-card-description {
    margin: 0.3rem 0 0;
    max-width: 620px;
    color: #667085;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ynab-card .connection-error {
    margin-top: 0.65rem;
}

.ynab-card-side {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 1.5rem;
}

.ynab-card-stats {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.ynab-card-stat {
    display: grid;
    min-width: 95px;
    gap: 0.15rem;
}

.ynab-card-stat strong {
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
}

.ynab-card-stat span {
    color: #667085;
    font-size: 0.75rem;
}

.ynab-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    min-height: 2.5rem;
    border-radius: 0.65rem;
    text-decoration: none;
}


/* YNAB budget setup page */

.ynab-setup-page {
    width: min(760px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0;
}

.ynab-setup-header {
    margin-bottom: 1.5rem;
}

.ynab-setup-header h1 {
    margin-bottom: 0.5rem;
}

.ynab-setup-card {
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.ynab-setup-card form {
    display: grid;
    gap: 1.25rem;
    margin: 0;
}

.ynab-budget-field {
    display: grid;
    gap: 0.5rem;
}

.ynab-budget-field > span {
    color: #344054;
    font-size: 0.9rem;
    font-weight: 650;
}

.ynab-budget-field select {
    width: 100%;
    min-height: 2.8rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: white;
    color: #172033;
    font: inherit;
}

.ynab-budget-field select:focus {
    border-color: #2563eb;
    outline: 3px solid rgb(37 99 235 / 15%);
}

.ynab-setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.ynab-setup-actions .secondary-button {
    border: 1px solid #d0d5dd;
    border-radius: 0.75rem;
    background: white;
}

.ynab-setup-empty {
    border: 1px dashed #d0d5dd;
    border-radius: 1rem;
    padding: 2rem;
    background: white;
    color: #667085;
    text-align: center;
}

.ynab-setup-empty h3 {
    margin-bottom: 0.5rem;
    color: #172033;
}

.ynab-setup-empty p {
    margin: 0;
}


/* Responsive layout */

@media (max-width: 750px) {
    .ynab-card {
        align-items: stretch;
        flex-direction: column;
        gap: 1.25rem;
    }

    .ynab-card-side {
        justify-content: space-between;
    }
}

@media (max-width: 550px) {
    .ynab-card-side {
        align-items: stretch;
        flex-direction: column;
    }

    .ynab-card-stats {
        justify-content: space-between;
    }

    .ynab-card-button {
        width: 100%;
    }

    .ynab-setup-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .ynab-setup-actions a,
    .ynab-setup-actions button {
        width: 100%;
        justify-content: center;
    }
}

.ynab-link-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 320px;
    margin: 0;
}

.ynab-link-form select {
    min-width: 220px;
    height: 2.3rem;
    border-radius: 0.6rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
}

.ynab-link-form .menu-action {
    flex-shrink: 0;
    cursor: pointer;
}

@media (max-width: 750px) {
    .ynab-link-form {
        min-width: 260px;
    }

    .ynab-link-form select {
        min-width: 170px;
    }
}

.ynab-send-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.ynab-send-form .menu-action {
    cursor: pointer;
    white-space: nowrap;
}

/* =========================================================
   Scheduler overview and compact run status
   ========================================================= */

.scheduler-overview {
    display: grid;
    grid-template-columns:
        minmax(180px, 0.7fr)
        minmax(240px, 1.3fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.scheduler-overview-state,
.scheduler-next-run {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.scheduler-overview-state > div,
.scheduler-next-run {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.scheduler-next-run {
    padding-left: 1rem;
    border-left: 1px solid #e4e7ec;
}

.scheduler-overview-label {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.scheduler-next-run strong,
.scheduler-overview-state strong {
    color: #172033;
}

.scheduler-next-run > span:last-child {
    overflow: hidden;
    max-width: 100%;
    color: #667085;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheduler-state-dot {
    width: 0.7rem;
    height: 0.7rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #98a2b3;
}

.scheduler-state-waiting {
    background: #12b76a;
}

.scheduler-state-syncing {
    background: #2e90fa;
    box-shadow: 0 0 0 0.3rem rgb(46 144 250 / 15%);
    animation: scheduler-pulse 1.4s ease-in-out infinite;
}

.scheduler-state-paused {
    background: #f79009;
}

.scheduler-state-idle {
    background: #98a2b3;
}

@keyframes scheduler-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0.2rem rgb(46 144 250 / 12%);
    }

    50% {
        box-shadow: 0 0 0 0.45rem rgb(46 144 250 / 5%);
    }
}

/* Let the edit form use the first row and the status use full width. */

.known-account-row {
    flex-wrap: wrap;
}

.schedule-edit-form {
    min-width: 0;
}

.schedule-summary {
    width: 100%;
    flex-basis: 100%;
    margin-top: 0.25rem;
    border-top: 1px solid #eaecf0;
    padding-top: 1rem;
}

.schedule-summary-row {
    display: grid;
    grid-template-columns:
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        auto;
    align-items: center;
    gap: 1rem;
}

.schedule-summary-time {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.schedule-summary-time span {
    color: #667085;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.schedule-summary-time strong {
    overflow: hidden;
    color: #344054;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-summary-result {
    justify-self: end;
}

.schedule-latest-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.schedule-latest-counts span {
    border-radius: 999px;
    padding: 0.28rem 0.52rem;
    background: #f2f4f7;
    color: #667085;
    font-size: 0.71rem;
}

.schedule-latest-counts strong {
    color: #344054;
}

.schedule-compact-error {
    margin: 0.75rem 0 0;
    border-radius: 0.6rem;
    padding: 0.65rem 0.75rem;
    background: #fef3f2;
    color: #b42318;
    font-size: 0.8rem;
}

.schedule-history-compact {
    margin-top: 0.75rem;
}

.schedule-history-compact summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 650;
    list-style: none;
}

.schedule-history-compact summary::-webkit-details-marker {
    display: none;
}

.schedule-history-compact summary::before {
    content: "â€º";
    font-size: 1rem;
    transition: transform 150ms ease;
}

.schedule-history-compact[open] summary::before {
    transform: rotate(90deg);
}

.schedule-history-compact summary span {
    display: inline-grid;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.3rem;
    place-items: center;
    border-radius: 999px;
    background: #eaecf0;
    color: #475467;
    font-size: 0.67rem;
}

.schedule-history-list {
    display: grid;
    gap: 0;
    margin-top: 0.6rem;
    border-top: 1px solid #eaecf0;
}

.schedule-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eaecf0;
}

.schedule-history-row > div {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.schedule-history-row strong {
    color: #344054;
    font-size: 0.8rem;
}

.schedule-history-row div span {
    overflow: hidden;
    color: #667085;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-history-error {
    margin: 0;
    border-bottom: 1px solid #eaecf0;
    padding: 0 0 0.7rem;
    color: #b42318;
    font-size: 0.75rem;
}

.run-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: #f2f4f7;
    color: #475467;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.run-status-success {
    background: #dcfae6;
    color: #067647;
}

.run-status-partial {
    background: #fef0c7;
    color: #b54708;
}

.run-status-failed {
    background: #fef3f2;
    color: #b42318;
}

.run-status-running {
    background: #eff8ff;
    color: #175cd3;
}

@media (max-width: 850px) {
    .schedule-summary-row {
        grid-template-columns: 1fr 1fr;
    }

    .schedule-summary-result {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

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

    .scheduler-next-run {
        padding-top: 0.85rem;
        padding-left: 0;
        border-top: 1px solid #e4e7ec;
        border-left: 0;
    }

    .scheduler-next-run > span:last-child {
        white-space: normal;
    }
}

@media (max-width: 500px) {
    .schedule-summary-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .schedule-summary-result {
        grid-column: auto;
    }

    .schedule-summary-time strong,
    .schedule-history-row div span {
        white-space: normal;
    }

    .schedule-history-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
}

.schedule-run-now-form {
    display: block;
    margin: 0;
}

.schedule-run-now-button {
    border: 1px solid #b2ddff;
    background: #eff8ff;
    color: #175cd3;
    white-space: nowrap;
}

.schedule-run-now-button:hover {
    border-color: #84caff;
    background: #d1e9ff;
}

@media (max-width: 850px) {
    .schedule-run-now-form,
    .schedule-run-now-button {
        width: 100%;
    }
}

/* =========================================================
   Application navigation and dashboard status overview
   ========================================================= */

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.app-brand {
    min-width: 0;
}

.app-navigation {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e4e7ec;
}

.app-navigation-link {
    position: relative;
    padding: 0.8rem 0.9rem;
    color: #667085;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.app-navigation-link:hover {
    color: #344054;
}

.app-navigation-link.active {
    color: #175cd3;
}

.app-navigation-link.active::after {
    position: absolute;
    right: 0.75rem;
    bottom: -1px;
    left: 0.75rem;
    height: 2px;
    background: #2563eb;
    content: "";
}

.dashboard-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-card {
    display: grid;
    align-content: start;
    min-height: 145px;
    gap: 0.55rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.15rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.status-card-primary {
    border-color: #b2ddff;
    background: linear-gradient(145deg, #f5fbff, #ffffff);
}

.status-card-warning {
    border-color: #fedf89;
    background: #fffcf5;
}

.status-card-label {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-card-value,
.status-card-value-row strong {
    color: #172033;
    font-size: 1.65rem;
    line-height: 1.15;
}

.status-card-value-text {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-card-value-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.status-card-detail {
    color: #667085;
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-overview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.dashboard-overview-main {
    min-width: 0;
    flex: 1;
}

.dashboard-overview-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    margin-top: 1rem;
}

.dashboard-overview-metrics > div {
    display: grid;
    gap: 0.1rem;
}

.dashboard-overview-metrics strong {
    color: #172033;
    font-size: 1rem;
}

.dashboard-overview-metrics span {
    color: #667085;
    font-size: 0.75rem;
}

.dashboard-overview-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.75rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.settings-card,
.logs-card {
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.settings-card h2,
.logs-card h2 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.settings-card-description {
    margin-bottom: 1.25rem;
    color: #667085;
    font-size: 0.88rem;
}

.settings-link-list {
    display: grid;
    gap: 0.6rem;
}

.settings-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #eaecf0;
    border-radius: 0.75rem;
    padding: 0.8rem 0.9rem;
    color: #344054;
    font-size: 0.88rem;
    font-weight: 650;
    text-decoration: none;
}

.settings-link::after {
    content: "›";
    color: #98a2b3;
    font-size: 1.1rem;
}

.log-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    align-items: end;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.log-table-wrapper {
    overflow-x: auto;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
}

.log-table th,
.log-table td {
    border-bottom: 1px solid #eaecf0;
    padding: 0.85rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.log-table th {
    color: #667085;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.log-message {
    max-width: 460px;
    color: #667085;
    font-size: 0.82rem;
    white-space: normal;
}

/* Repair the incorrectly encoded history chevron. */
.schedule-history-compact summary::before {
    content: "›";
}

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

@media (max-width: 750px) {
    .app-header,
    .dashboard-overview-card {
        align-items: stretch;
        flex-direction: column;
    }

    .app-navigation {
        overflow-x: auto;
    }

    .dashboard-overview-actions {
        justify-content: space-between;
    }

    .settings-grid,
    .log-filter-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dashboard-status-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-overview-actions {
        align-items: stretch;
        flex-direction: column;
    }
}


/* =========================================================
   MQTT settings
   ========================================================= */

.settings-section-title-row,
.mqtt-form-heading,
.mqtt-inline-toggle,
.mqtt-setting-row,
.mqtt-form-actions {
    display: flex;
    align-items: center;
}

.settings-section-title-row {
    gap: 0.75rem;
}

.settings-section-title-row h2,
.mqtt-form-heading h3,
.mqtt-status-card h3 {
    margin: 0;
}

.mqtt-overview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.status-partial {
    background: #fef0c7;
    color: #b54708;
}

.settings-message {
    margin: 1rem 0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    font-weight: 650;
}

.settings-message-success {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.settings-message-error {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.mqtt-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: start;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.settings-form-card {
    border: 1px solid #e4e7ec;
    border-radius: 1rem;
    padding: 1.5rem;
    background: white;
    box-shadow: 0 8px 24px rgb(16 24 40 / 5%);
}

.mqtt-settings-form {
    display: grid;
    gap: 1.5rem;
    margin: 0;
}

.mqtt-form-section {
    display: grid;
    gap: 1rem;
}

.mqtt-form-section + .mqtt-form-section {
    border-top: 1px solid #e4e7ec;
    padding-top: 1.5rem;
}

.mqtt-form-heading {
    justify-content: space-between;
    gap: 1rem;
}

.mqtt-inline-toggle {
    grid-template-columns: none;
    gap: 0.75rem;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 650;
}

.mqtt-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.mqtt-field {
    display: grid;
    gap: 0.45rem;
}

.mqtt-field > span {
    color: #344054;
    font-size: 0.85rem;
    font-weight: 650;
}

.mqtt-field-wide {
    grid-column: 1 / -1;
}

.mqtt-field input {
    width: 100%;
}

.mqtt-setting-row {
    grid-template-columns: none;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.85rem 0;
}

.mqtt-setting-row > span:first-child {
    display: grid;
    gap: 0.2rem;
}

.mqtt-setting-row strong {
    color: #344054;
    font-size: 0.9rem;
}

.mqtt-setting-row small,
.mqtt-status-help {
    color: #667085;
}

.mqtt-checkbox-row {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 0.65rem;
    color: #475467;
    font-size: 0.9rem;
    font-weight: 500;
}

.mqtt-checkbox-row input {
    width: auto;
}

.mqtt-input-unit {
    display: flex;
    align-items: center;
}

.mqtt-input-unit input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.mqtt-input-unit span {
    align-self: stretch;
    display: flex;
    align-items: center;
    border: 1px solid #d0d5dd;
    border-left: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 0 0.8rem;
    background: #f9fafb;
    color: #667085;
    font-size: 0.85rem;
    white-space: nowrap;
}

.mqtt-form-actions {
    justify-content: flex-end;
}

.mqtt-status-card {
    position: sticky;
    top: 1rem;
}

.mqtt-status-list {
    display: grid;
    gap: 0;
    margin: 1.25rem 0;
}

.mqtt-status-list > div {
    display: grid;
    gap: 0.25rem;
    border-bottom: 1px solid #e4e7ec;
    padding: 0.8rem 0;
}

.mqtt-status-list dt {
    color: #667085;
    font-size: 0.8rem;
}

.mqtt-status-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #344054;
    font-weight: 650;
}

.mqtt-test-button {
    width: 100%;
    justify-content: center;
    border: 1px solid #d0d5dd;
    background: white;
    color: #344054;
}

.mqtt-test-button:hover:not(:disabled) {
    border-color: #98a2b3;
    background: #f9fafb;
}

.mqtt-status-help {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
}

@media (max-width: 800px) {
    .mqtt-overview-card {
        align-items: flex-start;
    }

    .mqtt-settings-layout {
        grid-template-columns: 1fr;
    }

    .mqtt-status-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .mqtt-overview-card {
        flex-direction: column;
        gap: 1rem;
    }

    .mqtt-form-grid {
        grid-template-columns: 1fr;
    }

    .mqtt-field-wide {
        grid-column: auto;
    }

    .mqtt-setting-row {
        align-items: flex-start;
        gap: 1rem;
    }
}

.app-top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.environment-card {
    display: grid;
    flex-shrink: 0;
    gap: 0.15rem;
    border: 1px solid #fdb022;
    border-radius: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: #fffaeb;
    color: #93370d;
    box-shadow: 0 4px 12px rgb(181 71 8 / 8%);
}

.environment-card strong {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.environment-card span {
    color: #b54708;
    font-size: 0.72rem;
}

@media (max-width: 650px) {
    .app-top-bar {
        flex-direction: column-reverse;
    }

    .environment-card {
        width: 100%;
    }
}

.bank-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.bank-settings-header .primary-button {
    flex-shrink: 0;
    margin-left: auto;
}

.transaction-connection-tabs {
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.account-selector-form.transaction-account-selector {
    width: min(360px, 100%);
    min-width: 0;
    margin: 0 0 1.5rem;
}

.general-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.general-settings-grid .settings-section-card {
    min-height: 190px;
}

.general-settings-grid .settings-section-card:first-child {
    grid-column: 1 / -1;
}

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

    .general-settings-grid .settings-section-card:first-child {
        grid-column: auto;
    }
}

.automatic-sync-settings-card {
    grid-column: 1 / -1;
}

.settings-section-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;

    padding: 1.5rem;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;

    box-shadow:
        0 1px 2px rgba(16, 24, 40, 0.04),
        0 2px 8px rgba(16, 24, 40, 0.04);
}

.settings-section-card > div {
    min-width: 0;
}

.settings-inline-action,
.global-sync-form {
    flex-shrink: 0;
    margin-left: auto;
}

.dashboard-warning-panel {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #f1c27d;
    border-radius: 16px;
}

.dashboard-warning-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-warning-header h2 {
    margin: 0;
}

.dashboard-warning-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-warning-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    background: #fffaf3;
    border: 1px solid #f5d7a7;
    border-radius: 12px;
}

.dashboard-warning-item strong {
    color: #344054;
}

.dashboard-warning-item span {
    color: #667085;
    overflow-wrap: anywhere;
}

.dashboard-warning-content {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.dashboard-warning-content strong {
    color: #344054;
}

.dashboard-warning-content span {
    color: #667085;
    overflow-wrap: anywhere;
}

.dashboard-warning-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.dashboard-warning-actions form {
    margin: 0;
}

.warning-dismiss-button {
    padding: 0.55rem 0.8rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b54708;
    cursor: pointer;
    background: transparent;
    border: 1px solid #f1c27d;
    border-radius: 8px;
}

.warning-dismiss-button:hover {
    background: #fff4e5;
}