.pushpull-admin {
    --pushpull-border: #d0d7de;
    --pushpull-panel: #ffffff;
    --pushpull-ink: #17222d;
    --pushpull-muted: #556371;
    --pushpull-accent: #0d5c63;
    --pushpull-accent-soft: #edf7f8;
}

.pushpull-admin .pushpull-intro {
    max-width: 72rem;
    color: var(--pushpull-muted);
}

.pushpull-page-nav-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 20px;
    flex-wrap: wrap;
}

.pushpull-page-nav {
    margin: 0;
    flex: 1 1 auto;
}

.pushpull-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.pushpull-top-actions form {
    margin: 0;
}

.pushpull-top-actions .button {
    margin: 0;
}

.pushpull-managed-set-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pushpull-tab-separator {
    margin: 0 4px 0 10px;
    padding-left: 12px;
    border-left: 1px solid var(--pushpull-border);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--pushpull-muted);
    text-transform: uppercase;
}

.pushpull-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
    margin-top: 20px;
}

.pushpull-panel,
.pushpull-status-card,
.pushpull-main form {
    background: var(--pushpull-panel);
    border: 1px solid var(--pushpull-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgb(23 34 45 / 0.06);
}

.pushpull-main form {
    padding: 16px 20px 4px;
}

.pushpull-sidebar,
.pushpull-main {
    min-width: 0;
}

.pushpull-panel {
    padding: 16px;
    margin-bottom: 16px;
}

.pushpull-panel h2,
.pushpull-status-card h2 {
    margin-top: 0;
    color: var(--pushpull-ink);
}

.pushpull-domain-section {
    margin-top: 20px;
}

.pushpull-domain-section-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pushpull-muted);
    text-transform: uppercase;
}

.pushpull-domain-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
    vertical-align: middle;
}

.pushpull-domain-badge-overlay {
    background: #f4eefc;
    color: #6a3fb0;
}

.pushpull-domain-badge-primary {
    background: #edf7f8;
    color: #0d5c63;
}

.pushpull-domain-badge-config {
    background: #f3f0e8;
    color: #7a5d12;
}

.pushpull-tree-browser.pushpull-overlay-domain {
    background: #fcfaff;
    border-color: #ddd1f5;
}

.pushpull-tree-browser.pushpull-config-domain {
    background: #fffdf7;
    border-color: #e7d9aa;
}

.pushpull-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.pushpull-action-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pushpull-action-control form {
    margin: 0;
}

.pushpull-action-control .button {
    margin: 0;
}

.pushpull-action-control--attention .button {
    border-color: #dba617;
    box-shadow: 0 0 0 1px rgba(219, 166, 23, 0.12);
}

.pushpull-action-control--attention .button:hover,
.pushpull-action-control--attention .button:focus {
    border-color: #b58500;
}

.pushpull-disabled-action {
    cursor: help;
}

.pushpull-action-control__label {
    display: inline-flex;
    align-items: center;
}

.pushpull-action-popover {
    position: absolute;
    z-index: 1000;
    max-width: 320px;
    padding: 12px 14px;
    border: 1px solid var(--pushpull-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.pushpull-action-popover__title {
    display: block;
    margin-bottom: 6px;
    color: var(--pushpull-ink);
}

.pushpull-action-popover__description,
.pushpull-action-popover__notice {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.pushpull-action-popover__description + .pushpull-action-popover__notice {
    margin-top: 8px;
}

.pushpull-action-popover__notice {
    color: #8a4b00;
}

.pushpull-summary {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 12px;
    margin: 0;
}

.pushpull-summary dt {
    font-weight: 600;
    color: var(--pushpull-ink);
}

.pushpull-summary dd {
    margin: 0;
    color: var(--pushpull-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pushpull-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.pushpull-status-card {
    padding: 16px;
    background:
        linear-gradient(180deg, var(--pushpull-accent-soft) 0, #fff 90px);
}

.pushpull-status-card p {
    margin-bottom: 0;
    color: var(--pushpull-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pushpull-export-list {
    margin: 10px 0 0;
}

.pushpull-export-list li {
    margin-bottom: 6px;
}

.pushpull-diff-item details {
    border: 1px solid var(--pushpull-border);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.pushpull-tree-browser {
    margin-top: 16px;
    border: 1px solid var(--pushpull-border);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.pushpull-tree-browser > summary {
    cursor: pointer;
    font-weight: 600;
}

.pushpull-diff-item summary {
    cursor: pointer;
    list-style: none;
}

.pushpull-diff-item summary::-webkit-details-marker {
    display: none;
}

.pushpull-diff-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
}

.pushpull-diff-badge-added {
    background: #e8f7ee;
    color: #106b36;
}

.pushpull-diff-badge-deleted {
    background: #fbebe9;
    color: #a13a2b;
}

.pushpull-diff-badge-modified {
    background: #eef3fb;
    color: #245f93;
}

.pushpull-diff-badge-unchanged {
    background: #eef1f4;
    color: #556371;
}

.pushpull-diff-badge-muted {
    background: #f6f8fa;
    color: #7a8694;
}

.pushpull-inline-diff {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pushpull-border);
}

.pushpull-inline-diff-pane h4 {
    margin: 0 0 8px;
}

.pushpull-tree {
    border: 1px solid var(--pushpull-border);
    border-radius: 8px;
    background: #f6f8fa;
    padding: 10px 12px;
}

.pushpull-tree-list {
    list-style: none;
    margin: 0;
    padding-left: 18px;
}

.pushpull-tree-list > li {
    margin: 4px 0;
}

.pushpull-tree-dir > summary {
    cursor: pointer;
}

.pushpull-tree-name {
    font-weight: 600;
    color: var(--pushpull-ink);
}

.pushpull-tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}

.pushpull-operations-table td {
    vertical-align: top;
}

.pushpull-operation-details summary {
    cursor: pointer;
}

.pushpull-operation-detail-row td {
    padding: 0 !important;
    background: #f8fafc;
}

.pushpull-operation-details {
    padding: 20px;
}

.pushpull-operation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.pushpull-operation-grid pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    margin: 0;
    border-radius: 8px;
    overflow: auto;
}

.pushpull-inline-diff-code {
    min-height: 220px;
    font-size: 12px;
    border: 1px solid var(--pushpull-border);
    border-radius: 8px;
    overflow: hidden;
    background: #f6f8fa;
}

.pushpull-inline-diff-line {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    border-left: 4px solid transparent;
}

.pushpull-inline-diff-line code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 4px 10px;
    background: transparent;
}

.pushpull-inline-diff-line-number {
    display: block;
    padding: 4px 8px;
    color: #7a8694;
    text-align: right;
    border-right: 1px solid var(--pushpull-border);
    user-select: none;
}

.pushpull-inline-diff-line-added {
    background: #e6ffec;
    border-left-color: #2da44e;
}

.pushpull-inline-diff-line-removed {
    background: #ffebe9;
    border-left-color: #cf222e;
}

.pushpull-inline-diff-line-unchanged {
    background: #f6f8fa;
}

.pushpull-inline-diff-line-empty {
    background: #f6f8fa;
    opacity: 0.55;
}

.pushpull-admin .form-table th {
    width: 220px;
}

.pushpull-admin .button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.pushpull-modal-open {
    overflow: hidden;
}

.pushpull-async-modal[hidden] {
    display: none;
}

.pushpull-async-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.pushpull-async-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pushpull-async-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    margin: 12vh auto 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    padding: 24px;
}

.pushpull-async-modal__dialog h2 {
    margin-top: 0;
}

.pushpull-async-modal__message {
    margin-bottom: 18px;
}

.pushpull-async-modal__progress {
    margin-bottom: 18px;
}

.pushpull-async-modal__progress-bar {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.pushpull-async-modal__progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #2271b1;
    transition: width 120ms linear;
}

.pushpull-async-modal__progress-bar.is-indeterminate .pushpull-async-modal__progress-fill {
    width: 40%;
    animation: pushpull-progress-indeterminate 1.2s ease-in-out infinite;
}

.pushpull-async-modal__progress-label {
    margin: 8px 0 0;
    color: #475569;
    font-size: 12px;
}

.pushpull-async-modal__close {
    margin-top: 18px;
}

@keyframes pushpull-progress-indeterminate {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(280%);
    }
}

@media (max-width: 960px) {
    .pushpull-page-nav-row {
        align-items: stretch;
    }

    .pushpull-top-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

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

    .pushpull-inline-diff {
        grid-template-columns: 1fr;
    }

    .pushpull-operation-grid {
        grid-template-columns: 1fr;
    }
}

.pushpull-domain-source-grid {
    display: grid;
    gap: 20px;
}

.pushpull-domain-source-panel {
    display: grid;
    gap: 18px;
}

.pushpull-domain-group {
    padding: 16px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.pushpull-domain-group > summary {
    display: block;
    cursor: pointer;
    margin: -16px -16px 0;
    padding: 16px 16px 0;
    list-style: none;
}

.pushpull-domain-group > summary::-webkit-details-marker {
    display: none;
}

.pushpull-domain-group--disabled {
    background: #f8fafc;
    border-style: dashed;
}

.pushpull-domain-group h3,
.pushpull-domain-role-section h4 {
    margin: 0 0 8px;
}

.pushpull-domain-role-section + .pushpull-domain-role-section {
    margin-top: 12px;
}

.pushpull-domain-list {
    display: grid;
    gap: 8px;
}

.pushpull-domain-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.pushpull-domain-row.is-disabled {
    background: #f6f7f7;
    color: #646970;
}

.pushpull-domain-row__body {
    display: grid;
    gap: 2px;
}

.pushpull-domain-row__label {
    font-weight: 600;
}

.pushpull-domain-row__meta,
.pushpull-domain-placeholder {
    color: #646970;
    font-size: 12px;
}

.pushpull-domain-placeholder.is-disabled {
    opacity: 0.8;
}
