* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f3f5f8;
    color: #1f2430
}

.shell {
    max-width: 1800px;
    margin: 0 auto;
    padding: 34px 40px 50px
}

.top {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px
}

h1 {
    margin: .25rem 0 0;
    font-size: 34px
}

.sub {
    color: #6b7280;
    max-width: 960px;
    line-height: 1.45
}

.summary,
.panel,
.side {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07)
}

.summary {
    min-width: 300px;
    padding: 16px
}

.summary div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    color: #6b7280;
    font-size: 13px
}

.summary strong {
    color: #1f2430
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
    align-items: start
}

.side {
    position: sticky;
    top: 20px
}

.head {
    padding: 22px 26px 15px;
    border-bottom: 1px solid #e8eaee
}

.title {
    font-size: 20px;
    font-weight: 750
}

.hint {
    font-size: 12.5px;
    color: #8b93a3;
    line-height: 1.45;
    margin-top: 5px
}

.body {
    padding: 24px 26px
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.span-all {
    grid-column: 1/-1
}

.section {
    border-top: 1px solid #e8eaee;
    padding-top: 18px
}

.section:first-child {
    border-top: 0;
    padding-top: 0
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px
}

.section-title {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7280
}

.secret-click-target {
    cursor: default;
    user-select: none
}

.field {
    position: relative
}

.field label {
    position: absolute;
    top: -7px;
    left: 10px;
    background: #fff;
    padding: 0 5px;
    font-size: 12px;
    color: #6b7280
}

.card .field label {
    background: #f7f8fa
}

.field textarea {
    resize: vertical;
    min-height: 220px;
    line-height: 1.4;
    font-family: Consolas, Monaco, "Courier New", monospace
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #d5d9e0;
    border-radius: 8px;
    background: transparent;
    padding: 11px 12px;
    font-size: 14px;
    outline: none
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #2e5bff;
    box-shadow: 0 0 0 1px #2e5bff
}

.field input:disabled {
    background: #eef0f4;
    color: #6b7280;
    cursor: not-allowed
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
    border-color: #d92d20;
    box-shadow: 0 0 0 1px #d92d20
}

.field-error,
.method-error {
    margin-top: 6px;
    color: #d92d20;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600
}

.btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.btn,
.primary,
.secondary,
.linkbtn {
    border-radius: 8px;
    font-weight: 650;
    cursor: pointer;
    font-family: inherit
}

.btn {
    border: 1px solid #d5d9e0;
    background: #fff;
    color: #1f2430;
    min-height: 78px;
    text-align: left;
    padding: 13px
}

.btn:hover {
    border-color: #2e5bff;
    color: #2e5bff;
    background: #f8faff
}

.btn:disabled {
    color: #9aa1ad;
    background: #f8f8f8;
    cursor: not-allowed;
    border-color: #e8eaee
}

.btn small {
    display: block;
    color: #8b93a3;
    margin-top: 4px;
    font-weight: 500;
    line-height: 1.35
}

.primary {
    border: 0;
    background: #2e5bff;
    color: #fff;
    padding: 10px 20px
}

.primary:hover {
    background: #1e4bef
}

.secondary,
.linkbtn {
    border: 1px solid #d5d9e0;
    background: #fff;
    color: #1f2430;
    padding: 10px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.secondary:hover,
.linkbtn:hover {
    border-color: #2e5bff;
    color: #2e5bff;
    background: #f8faff
}

.linkbtn.disabled {
    pointer-events: none;
    color: #9aa1ad;
    background: #f8f8f8
}

.remove {
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer
}

.remove:hover {
    color: #d92d20
}

.trash {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    padding: 0
}

.trash:hover {
    background: #fff1f0
}

.card {
    background: #f7f8fa;
    border: 1px solid #e8eaee;
    border-radius: 14px;
    padding: 18px
}

.card+.card {
    margin-top: 14px
}

.cardtop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 99px;
    padding: 5px 10px;
    background: #eef2ff;
    color: #2e5bff;
    border: 1px solid #dbe4ff;
    font-size: 12px;
    font-weight: 800
}

.empty {
    border: 1.5px dashed #d5d9e0;
    border-radius: 14px;
    background: #fbfcfe;
    text-align: center;
    color: #6b7280;
    padding: 22px
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px
}

.ports {
    display: flex;
    gap: 8px;
    align-items: flex-start
}

.port-type-field {
    width: 132px
}

.flex-one {
    flex: 1
}

.is-hidden {
    display: none
}

.range.row {
    flex: 1
}

.json {
    white-space: pre-wrap;
    background: #111827;
    color: #d1d5db;
    border-radius: 12px;
    padding: 14px;
    font-size: 12px;
    line-height: 1.45;
    min-height: 620px;
    max-height: 760px;
    overflow: auto
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    background: #111827;
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: .18s;
    z-index: 20
}

.toast.show {
    opacity: 1;
    transform: translateY(0)
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid #e8eaee;
    padding: 18px 26px 24px
}

.actions {
    display: flex;
    gap: 10px;
    margin-left: auto
}

.testing-mode-badge {
    display: none;
    position: fixed;
    left: 22px;
    bottom: 22px;
    background: #111827;
    color: #fff;
    border-radius: 99px;
    padding: 9px 13px;
    font-size: 12px;
    font-weight: 800;
    z-index: 19
}

body.testing-mode .testing-mode-badge {
    display: block
}

.test-tools {
    display: none;
    border: 1px dashed #9aa1ad;
    background: #fbfcfe;
    border-radius: 14px;
    padding: 18px
}

body.testing-mode .test-tools {
    display: block
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.test-grid textarea {
    min-height: 180px
}

.test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px
}

.test-output {
    white-space: pre-wrap;
    background: #0f172a;
    color: #d1d5db;
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.45;
    display: none;
    margin-top: 12px
}

.test-output.show {
    display: block
}

.mono {
    font-family: Consolas, Monaco, "Courier New", monospace
}

@media(max-width:960px) {
    .grid {
        grid-template-columns: 1fr
    }

    .side {
        position: static
    }

    .top {
        flex-direction: column
    }

    .summary {
        width: 100%
    }

    .test-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:740px) {

    .row,
    .btns {
        grid-template-columns: 1fr
    }

    .shell {
        padding: 24px 16px
    }

    .json {
        min-height: 360px
    }

    .footer {
        flex-direction: column
    }

    .actions {
        margin-left: 0;
        flex-wrap: wrap
    }
}

.legal-footer {
    margin-top: 28px;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
    padding: 22px 26px
}

.legal-footer-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 80px
}

.legal-item .section-title {
    display: block;
    margin-bottom: 10px
}

.legal-item .hint {
    margin-top: 0
}

.legal-notice-hint {
    line-height: 1.7
}

.legal-item .hint p {
    margin: 0 0 .725em
}

.legal-item .hint p:last-child {
    margin-bottom: 0
}

.legal-item a {
    color: #8b93a3;
    text-decoration: underline
}

.legal-item a:hover {
    color: #6b7280
}

@media(max-width:960px) {
    .legal-footer-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:740px) {
    .legal-footer {
        padding: 20px 18px
    }
}