/* The developer portal is a deliberately scoped, dark-only surface. The
   dashboard vendor stylesheet is loaded before this file and is not allowed
   to decide documentation typography or contrast. */
:root {
    --docs-ink: #eef5ff;
    --docs-body: #c4d0e0;
    --docs-muted: #91a1b8;
    --docs-soft: #17263c;
    --docs-border: #2b3d56;
    --docs-primary: #75a8ff;
    --docs-primary-soft: #1b3865;
    --docs-code: #091321;
    --docs-code-muted: #9fb2ce;
    --docs-warning: #f3c66e;
}

.ipay-docs-body {
    min-height: 100vh;
    margin: 0;
    color: var(--docs-body);
    background: #0d1728;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ipay-docs-body *,
.ipay-docs-body *::before,
.ipay-docs-body *::after { box-sizing: border-box; }

.ipay-docs-body a { color: var(--docs-primary); text-decoration: none; }
.ipay-docs-body a:hover { text-decoration: underline; }
.ipay-docs-body h1,
.ipay-docs-body h2,
.ipay-docs-body h3,
.ipay-docs-body h4,
.ipay-docs-body h5,
.ipay-docs-body h6,
.ipay-docs-body .h1,
.ipay-docs-body .h2,
.ipay-docs-body .h3,
.ipay-docs-body .h4,
.ipay-docs-body .h5,
.ipay-docs-body .h6 { color: var(--docs-ink); }

.docs-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 34px;
    border-bottom: 1px solid var(--docs-border);
    background: #101d31;
}

.docs-brand { display: flex; align-items: center; gap: 9px; color: var(--docs-ink) !important; font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.docs-brand:hover { text-decoration: none !important; }
.docs-brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #246bfd, #5e9bff); color: #fff; font-size: 20px; font-weight: 800; }
.docs-brand small { margin-left: 8px; color: var(--docs-muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.docs-top-actions { display: flex; align-items: center; gap: 24px; font-size: 13px; font-weight: 600; }
.docs-top-actions a { color: #c6d4e8; }
.docs-top-actions a:hover { color: var(--docs-primary); text-decoration: none; }
.docs-dashboard-link { padding: 8px 11px; border: 1px solid var(--docs-border); border-radius: 8px; }
.docs-dashboard-link:hover { border-color: var(--docs-primary); }
.docs-menu-toggle { display: none; padding: 8px 11px; border: 1px solid var(--docs-border); border-radius: 8px; background: var(--docs-soft); color: var(--docs-ink); font-weight: 600; }

.docs-shell { display: flex; min-height: calc(100vh - 72px); }
.docs-sidebar { display: flex; flex: 0 0 286px; flex-direction: column; width: 286px; padding: 25px 18px 22px; border-right: 1px solid var(--docs-border); background: #111f33; }
.docs-search-wrap { padding: 0 8px 21px; }
.docs-search-wrap label { display: block; margin-bottom: 8px; color: var(--docs-muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.docs-search-wrap input { width: 100%; padding: 10px 12px; border: 1px solid #3a4e6b; border-radius: 8px; outline: none; background: #17263c; color: var(--docs-ink); font-size: 13px; }
.docs-search-wrap input::placeholder { color: #8293ab; }
.docs-search-wrap input:focus { border-color: #75a8ff; box-shadow: 0 0 0 3px rgba(117,168,255,.18); }
.docs-nav { overflow: auto; }
.docs-nav-group { margin: 0 0 20px; }
.docs-nav-label { padding: 0 9px 8px; color: #8ea1bb; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.docs-nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; color: #c0cee0 !important; font-size: 13px; line-height: 1.25; }
.docs-nav-link:hover, .docs-nav-link.is-active { background: var(--docs-primary-soft); color: #a8c8ff !important; text-decoration: none !important; }
.docs-nav-dot { color: #48d39a; font-size: 8px; }
.docs-sidebar-footer { display: grid; gap: 5px; margin-top: auto; padding: 17px 9px 0; border-top: 1px solid var(--docs-border); color: var(--docs-muted); font-size: 11px; line-height: 1.5; }
.docs-sidebar-footer strong { color: var(--docs-ink); }
.docs-sidebar-footer a { font-size: 11px; }

.docs-main { flex: 1; min-width: 0; }
.docs-main-inner { width: min(1050px, calc(100% - 72px)); margin: 0 auto; padding: 35px 0 50px; }
.docs-breadcrumb { display: flex; gap: 9px; margin-bottom: 30px; color: #8fa0b8; font-size: 12px; }
.docs-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 27px; border-bottom: 1px solid var(--docs-border); }
.docs-eyebrow { margin-bottom: 10px; color: var(--docs-primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ipay-docs-body .docs-heading h1 { margin: 0 0 10px; color: var(--docs-ink); font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; line-height: 1.1; }
.docs-heading p { max-width: 650px; margin: 0; color: var(--docs-muted); font-size: 16px; line-height: 1.6; }
.docs-download { padding: 9px 12px; border: 1px solid #3a4f6e; border-radius: 7px; color: #c8d8ed !important; font-size: 12px; font-weight: 700; white-space: nowrap; }
.docs-download:hover { border-color: #75a8ff; text-decoration: none !important; }
.docs-content { max-width: 850px; padding: 32px 0; }
.docs-section { margin: 0 0 37px; scroll-margin-top: 95px; }
.ipay-docs-body .docs-section h2 { margin: 0 0 13px; color: var(--docs-ink); font-size: 23px; letter-spacing: -.025em; }
.ipay-docs-body .docs-section h3 { margin: 24px 0 9px; color: var(--docs-ink); font-size: 16px; }
.docs-section p, .docs-section li { color: var(--docs-body); font-size: 14px; line-height: 1.75; }
.docs-section p { margin: 0 0 14px; }
.docs-section ul, .docs-section ol { margin: 10px 0 18px; padding-left: 21px; }
.docs-section li { padding: 2px 0; }
.docs-section strong { color: var(--docs-ink); }
.docs-section code, .docs-inline-code { padding: 2px 5px; border-radius: 4px; background: #1a3152; color: #a9c9ff; font-size: .92em; }
.docs-callout { margin: 18px 0; padding: 15px 17px; border: 1px solid #31547d; border-left: 3px solid var(--docs-primary); border-radius: 7px; background: #142a48; }
.docs-callout p { margin: 0; }
.docs-callout.warning { border-color: #765a27; border-left-color: var(--docs-warning); background: #342d1a; }
.docs-callout.success { border-color: #28684f; border-left-color: #48d39a; background: #143329; }

.docs-table-wrap { overflow-x: auto; margin: 15px 0 22px; border: 1px solid var(--docs-border); border-radius: 8px; }
.docs-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; }
.ipay-docs-body .docs-table th { color: #dbe7f7; text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: #1a2b44; }
.docs-table th, .docs-table td { padding: 12px 13px; border-bottom: 1px solid var(--docs-border); vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td { color: var(--docs-body); }
.docs-table td strong { color: var(--docs-ink); }

.docs-code { overflow: hidden; margin: 16px 0 22px; border-radius: 9px; background: var(--docs-code); box-shadow: 0 9px 24px rgba(0,0,0,.18); }
.docs-code-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--docs-code-muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.docs-code-copy { padding: 5px 8px; border: 0; border-radius: 5px; background: rgba(255,255,255,.1); color: #d8e2f4; cursor: pointer; font-size: 10px; }
.docs-code-copy:hover { background: rgba(255,255,255,.18); }
.docs-code pre { overflow-x: auto; margin: 0; padding: 16px; color: #d9e4f6; font: 12px/1.7 "SFMono-Regular", Consolas, "Liberation Mono", monospace; tab-size: 2; }
.docs-code code { padding: 0; background: transparent; color: inherit; font-size: inherit; }

.docs-grid { display: grid; gap: 13px; }
.docs-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.docs-card { display: block; padding: 17px; border: 1px solid var(--docs-border); border-radius: 9px; color: var(--docs-ink) !important; transition: border-color .15s, transform .15s; }
.docs-card:hover { border-color: #75a8ff; text-decoration: none !important; transform: translateY(-1px); }
.docs-card-kicker { color: var(--docs-primary); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.ipay-docs-body .docs-card h3 { margin: 7px 0 4px; color: var(--docs-ink); font-size: 15px; }
.docs-card p { margin: 0; font-size: 12px; line-height: 1.5; }
.docs-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.docs-status.live { color: #8ce6bb; background: #174b38; }.docs-status.disabled { color: #f5d37e; background: #51401d; }.docs-status.planned { color: #bac6d8; background: #2a3749; }
.docs-private-banner { margin-bottom: 28px; padding: 13px 15px; border: 1px solid #765a27; border-radius: 8px; background: #342d1a; color: #f3d98f; font-size: 13px; }
.docs-private-banner span { margin-right: 6px; font-weight: 800; }
.docs-footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 19px; border-top: 1px solid var(--docs-border); color: #8fa0b8; font-size: 11px; }
.docs-footer strong { color: var(--docs-ink); }.docs-footer a { color: #a9c9ff; }
.docs-drawer-backdrop { display: none; }

@media (prefers-reduced-motion: reduce) { .ipay-docs-body *, .ipay-docs-body *::before, .ipay-docs-body *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (max-width: 900px) {
    .docs-topbar { padding: 0 20px; }
    .docs-menu-toggle { display: block; }
    .docs-top-actions { gap: 14px; }
    .docs-top-actions > a:not(.docs-support-link):not(.docs-dashboard-link) { display: none; }
    .docs-sidebar { position: fixed; top: 72px; bottom: 0; left: 0; z-index: 15; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.28); }
    .docs-sidebar.is-open { transform: translateX(0); }
    .docs-drawer-backdrop:not([hidden]) { position: fixed; inset: 72px 0 0; z-index: 14; display: block; background: rgba(4,10,20,.65); }
    .docs-main-inner { width: min(100% - 40px, 850px); }
}
@media (max-width: 600px) {
    .docs-topbar { height: 64px; }
    .docs-shell { min-height: calc(100vh - 64px); }
    .docs-sidebar { top: 64px; }
    .docs-drawer-backdrop:not([hidden]) { inset: 64px 0 0; }
    .docs-brand small { display: none; }
    .docs-top-actions .docs-support-link { display: none; }
    .docs-main-inner { width: calc(100% - 32px); padding-top: 24px; }
    .docs-heading { display: block; }
    .docs-download { display: inline-block; margin-top: 18px; }
    .docs-content { padding-top: 25px; }
    .docs-grid-2 { grid-template-columns: 1fr; }
    .docs-footer { display: block; line-height: 1.8; }
    .docs-footer div + div { margin-top: 5px; }
}
