:root {
    --bg: #f7fafc;
    --white: #ffffff;

    --panel: #f8fbfe;
    --panel-blue: #f1f8ff;

    --border: #cbdfee;
    --border-soft: #e4edf4;

    --navy: #082746;
    --text: #17324a;
    --muted: #6f8497;

    --blue: #0867e8;
    --blue-dark: #0058ca;
    --blue-soft: #eaf4ff;

    --green: #18a765;
    --green-soft: #e9faf1;

    --orange: #e29a22;
    --orange-soft: #fff5df;

    --red: #de5260;

    --console: #1e2022;
    --console-text: #edf3f7;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #fff 0,
            #f7fafc 160px
        );

    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


button,
input,
select {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
}


code,
pre {
    font-family:
        Consolas,
        "SFMono-Regular",
        monospace;
}


.topbar {
    height: 60px;

    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;

    z-index: 50;

    border-bottom:
        1px solid
        var(--border-soft);

    background:
        rgba(255,255,255,.94);

    backdrop-filter: blur(14px);
}


.brand {
    display: flex;
    align-items: center;

    gap: 9px;

    color: var(--navy);

    text-decoration: none;
}


.logo {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #0871f4,
            #00a3ff
        );

    font-weight: 900;
}


.brand strong {
    display: block;

    font-size: 12px;
}


.brand small {
    display: block;

    color: var(--muted);

    font-size: 8px;
}


.toplinks {
    display: flex;

    gap: 5px;
}


.toplinks button,
.toplinks a {
    padding: 7px 10px;

    border: 0;
    border-radius: 7px;

    color: var(--muted);

    background: transparent;

    text-decoration: none;

    font-size: 9px;
    font-weight: 700;
}


.toplinks button:hover,
.toplinks a:hover,
.toplinks .active {
    color: var(--blue);

    background: var(--blue-soft);
}


.page {
    width:
        min(
            1450px,
            calc(100% - 28px)
        );

    margin: 0 auto;

    padding:
        24px 0 60px;
}


.dashboardTop {
    display: grid;

    grid-template-columns:
        180px
        minmax(0, 1fr)
        180px;

    gap: 24px;

    align-items: center;

    margin-bottom: 22px;
}


.statsColumn {
    display: grid;

    gap: 7px;
}


.statCard {
    min-height: 57px;

    padding: 10px 12px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: white;
}


.statCard span {
    display: block;

    color: var(--muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .08em;
}


.statCard strong {
    display: block;

    margin-top: 4px;

    color: var(--navy);

    font-size: 19px;
}


.statCard strong.green {
    color: var(--green);
}


.hero {
    padding: 12px 20px;

    text-align: center;
}


.heroBadge {
    display: inline-flex;

    padding: 4px 8px;

    border-radius: 999px;

    color: var(--blue);

    background: var(--blue-soft);

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .1em;
}


.hero h1 {
    margin:
        10px 0 7px;

    color: var(--navy);

    font-size:
        clamp(
            30px,
            4vw,
            49px
        );

    line-height: 1;

    letter-spacing: -.055em;
}


.hero p {
    max-width: 650px;

    margin: auto;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.6;
}


.actionsColumn {
    display: grid;

    gap: 7px;
}


.topAction {
    min-height: 42px;

    padding: 9px 11px;

    display: grid;
    place-items: center;

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    color: var(--navy);

    background: white;

    text-decoration: none;

    font-size: 9px;
    font-weight: 800;
}


.topAction.primary {
    border-color: var(--blue);

    color: white;

    background: var(--blue);
}


.disclaimer {
    margin-bottom: 16px;

    padding: 11px 13px;

    display: flex;

    gap: 10px;

    border:
        1px solid #ead69e;

    border-radius: 9px;

    background: #fffaf0;
}


.disclaimerIcon {
    width: 24px;
    height: 24px;

    flex: 0 0 auto;

    display: grid;
    place-items: center;

    border-radius: 7px;

    background: #ffebaf;

    color: #805300;

    font-weight: 900;
}


.disclaimer strong {
    color: #735619;

    font-size: 9px;
}


.disclaimer p {
    margin:
        3px 0 0;

    color: #8e7749;

    font-size: 8px;
}


.appShell {
    min-height: 660px;

    display: grid;

    grid-template-columns:
        220px
        minmax(0, 1fr);

    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;

    box-shadow:
        0 12px 35px
        rgba(25,66,100,.06);
}


.sidebar {
    padding: 14px 11px;

    border-right:
        1px solid
        var(--border);

    background: #f8fbfe;
}


.sidebarHeader {
    padding:
        2px 4px 10px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}


.sidebarEyebrow {
    color: var(--blue);

    font-size: 7px;
    font-weight: 900;
}


.sidebarHeader h2 {
    margin:
        3px 0 0;

    color: var(--navy);

    font-size: 16px;
}


.counter {
    min-width: 23px;
    height: 23px;

    padding: 0 6px;

    display: inline-grid;
    place-items: center;

    border:
        1px solid
        var(--border);

    border-radius: 999px;

    background: white;

    color: var(--muted);

    font-size: 8px;
    font-weight: 800;
}


.providerSearch {
    width: 100%;

    padding: 8px 9px;

    margin-bottom: 9px;

    border:
        1px solid
        var(--border);

    border-radius: 7px;

    outline: none;

    background: white;

    font-size: 9px;
}


.providerList {
    display: grid;

    gap: 5px;
}


.provider {
    width: 100%;

    padding: 9px;

    display: grid;

    grid-template-columns:
        31px
        minmax(0, 1fr)
        7px;

    align-items: center;

    gap: 8px;

    border:
        1px solid transparent;

    border-radius: 8px;

    background: transparent;

    text-align: left;
}


.provider:hover {
    border-color: var(--border);

    background: white;
}


.provider.active {
    border-color: #a7d0f4;

    background: var(--blue-soft);
}


.providerLogo {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    border:
        1px solid
        var(--border);

    border-radius: 7px;

    background: white;

    color: var(--blue);

    font-size: 8px;
    font-weight: 900;
}


.providerLogoImage {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    border-radius: 6px;
}


.provider strong {
    display: block;

    overflow: hidden;

    color: var(--navy);

    font-size: 9px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.provider small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 7px;
}


.dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #aaa;
}


.dot.online {
    background: var(--green);

    box-shadow:
        0 0 0 3px
        var(--green-soft);
}


.workspace {
    min-width: 0;

    padding: 17px;
}


.emptyState {
    min-height: 500px;

    display: grid;
    place-items: center;

    color: var(--muted);
}


.providerHeader {
    padding:
        3px 3px 15px;

    border-bottom:
        1px solid
        var(--border-soft);
}


.providerBadge {
    display: inline-flex;

    padding: 4px 7px;

    border-radius: 999px;

    color: var(--blue);

    background: var(--blue-soft);

    font-size: 7px;
    font-weight: 900;
}


.providerHeader h2 {
    margin:
        8px 0 4px;

    color: var(--navy);

    font-size: 26px;
}


.providerTitleRow {
    display: flex;

    align-items: center;

    gap: 9px;
}


.providerTitleRow h2 {
    min-width: 0;

    margin: 8px 0 4px;
}


.providerHeaderLogo {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: grid;
    place-items: center;

    margin-top: 4px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: white;

    color: var(--blue);

    font-size: 10px;
    font-weight: 900;
}


.providerHeaderLogoImage {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    border-radius: 8px;
}


.providerHeader p {
    margin: 0;

    color: var(--muted);

    font-size: 9px;
}


.providerMeta {
    margin-top: 10px;

    display: flex;

    gap: 5px;
}


.chip {
    padding: 4px 7px;

    border:
        1px solid
        var(--border);

    border-radius: 999px;

    background: var(--panel);

    color: var(--muted);

    font-size: 7px;
    font-weight: 800;
}


.chip.online {
    border-color: #b9e4cf;

    color: var(--green);

    background: var(--green-soft);
}


.docsGrid {
    margin-top: 14px;

    display: grid;

    grid-template-columns:
        minmax(245px, .85fr)
        minmax(370px, 1.35fr);

    gap: 14px;
}


.panelTitle {
    margin-bottom: 8px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.panelTitle h3 {
    margin: 0;

    color: var(--navy);

    font-size: 11px;
}


.panelTitle small {
    color: var(--muted);

    font-size: 7px;
}


.endpointList {
    display: grid;

    gap: 6px;
}


.endpointCard {
    width: 100%;

    padding: 9px;

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    background: var(--panel);

    text-align: left;
}


.endpointCard:hover,
.endpointCard.active {
    border-color: #79baf0;

    background: #ecf7ff;
}


.endpointTop {
    display: flex;

    gap: 8px;

    align-items: center;
}


.method {
    min-width: 32px;

    padding: 3px 5px;

    border-radius: 5px;

    color: var(--blue);

    background: #e1f0ff;

    font-size: 7px;
    font-weight: 900;

    text-align: center;
}


.endpointCard code {
    overflow: hidden;

    color: var(--navy);

    font-size: 8px;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.endpointCard p {
    margin:
        6px 0 0;

    color: var(--muted);

    font-size: 7px;
}


.runner {
    padding: 10px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: white;
}


.runnerGrid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 8px;
}


.field {
    margin-bottom: 8px;
}


.field label {
    display: block;

    margin-bottom: 4px;

    color: #48657e;

    font-size: 7px;
    font-weight: 900;
}


.field input,
.field select {
    width: 100%;

    min-height: 35px;

    padding: 7px 8px;

    border:
        1px solid
        var(--border);

    border-radius: 7px;

    outline: none;

    background: white;

    font-size: 8px;
}


.apiKeyArea {
    margin-bottom: 8px;

    color: var(--muted);

    font-size: 8px;
}


.apiKeyArea .field {
    margin-top: 8px;
}


.actions {
    margin-bottom: 8px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 6px;
}


.send,
.copy {
    min-height: 34px;

    border-radius: 7px;

    font-size: 8px;
    font-weight: 900;
}


.send {
    border:
        1px solid
        var(--blue);

    color: white;

    background: var(--blue);
}


.copy {
    border:
        1px solid
        var(--border);

    color: var(--navy);

    background: white;
}


.urlBox {
    margin-bottom: 8px;

    padding: 8px;

    border:
        1px solid
        var(--border);

    border-radius: 7px;

    background: var(--panel);
}


.urlBox small {
    display: block;

    margin-bottom: 4px;

    color: var(--muted);

    font-size: 6px;
    font-weight: 900;
}


.urlBox code {
    display: block;

    overflow-x: auto;

    color: var(--blue);

    font-size: 7px;

    white-space: nowrap;
}


.response {
    overflow: hidden;

    border-radius: 8px;

    background: var(--console);
}


.responseHeader {
    height: 30px;

    padding: 0 9px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255,255,255,.06);

    color: #a9b5bf;

    font-size: 6px;
    font-weight: 900;
}


.response pre {
    min-height: 230px;
    max-height: 430px;

    margin: 0;

    padding: 10px;

    overflow: auto;

    color: var(--console-text);

    font-size: 7px;

    line-height: 1.55;

    white-space: pre-wrap;
}


dialog {
    width: min(420px, 90%);

    padding: 20px;

    border:
        1px solid
        var(--border);

    border-radius: 12px;
}


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


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

    .statsColumn {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .actionsColumn {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .appShell {
        display: block;
    }

    .sidebar {
        border-right: 0;

        border-bottom:
            1px solid
            var(--border);
    }

    .providerList {
        display: flex;

        overflow-x: auto;
    }

    .provider {
        min-width: 180px;
    }
}


@media (
    max-width: 520px
) {
    .statsColumn,
    .actionsColumn,
    .runnerGrid,
    .actions {
        grid-template-columns: 1fr;
    }
}


@media (
    max-width: 520px
) {
    html,
    body {
        overflow-x: hidden;
    }

    .topbar {
        height: auto;
        min-height: 60px;
        padding: 10px 14px;
        gap: 8px;
    }

    .brand {
        min-width: 0;
    }

    .brand strong {
        font-size: 13px;
    }

    .brand small {
        font-size: 8.5px;
    }

    .toplinks {
        flex-shrink: 1;
        gap: 3px;
    }

    .toplinks button,
    .toplinks a {
        padding: 8px 8px;
        font-size: 9.5px;
    }

    .page {
        width: calc(100% - 20px);
        padding: 16px 0 40px;
    }

    .dashboardTop {
        gap: 14px;
        margin-bottom: 16px;
    }

    .hero h1 {
        font-size: clamp(28px, 9vw, 34px);
        line-height: 1.05;
    }

    .hero p {
        font-size: 11px;
        line-height: 1.45;
    }

    .appShell {
        min-height: 0;
        border-radius: 9px;
    }

    .sidebar {
        padding: 12px 10px;
    }

    .workspace {
        padding: 14px 12px;
    }

    .providerHeader h2 {
        font-size: 23px;
    }

    .providerHeader p {
        font-size: 11px;
        line-height: 1.45;
    }

    .docsGrid {
        gap: 18px;
    }

    .endpointCard {
        padding: 12px;
    }

    .endpointCard code {
        font-size: 10px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .endpointCard p {
        font-size: 10px;
        line-height: 1.4;
    }

    .panelTitle h3 {
        font-size: 13px;
    }

    .panelTitle small {
        font-size: 9px;
    }

    .field label {
        font-size: 10px;
    }

    .field input,
    .field select {
        min-height: 44px;
        padding: 10px 11px;
        font-size: 16px;
    }

    .apiKeyArea {
        font-size: 11px;
    }

    .send,
    .copy {
        min-height: 44px;
        font-size: 11px;
    }

    .urlBox small {
        font-size: 8px;
    }

    .urlBox code {
        font-size: 10px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .responseHeader {
        height: 34px;
        font-size: 8px;
    }

    .response pre {
        min-height: 220px;
        max-height: 360px;
        padding: 12px;
        font-size: 11px;
        line-height: 1.5;
    }
}
