
/* ==========================================================
   KATYUSHASEC — OPENSEC API DOCUMENTATION
   Compatível com templates/bibliotecas/opensec.html
   ========================================================== */

.os-docs {
    --os-bg: #0b0f14;
    --os-panel: #0e141c;
    --os-panel-hover: #131d2a;
    --os-border: #253141;
    --os-text: #eaf1fb;
    --os-muted: #aab9cb;
    --os-blue: #73a9f5;
    --os-blue-dark: #2868c7;
    --os-radius: 12px;

    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
    background: var(--os-bg);
    color: var(--os-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color-scheme: dark;
}

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

.os-docs a {
    color: inherit;
}

.os-docs button,
.os-docs input,
.os-docs textarea,
.os-docs select {
    font: inherit;
}

.os-docs img {
    max-width: 100%;
    height: auto;
}

.os-docs .os-container {
    width: min(1180px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

/* HERO */

.os-docs .os-hero {
    position: relative;
    padding: 48px 0 64px;
    border-bottom: 1px solid #202a37;
    background:
        radial-gradient(
            ellipse at 80% 15%,
            rgba(40, 104, 199, 0.17),
            transparent 48%
        ),
        #0b0f14;
}

.os-docs .os-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 38px;
    color: #aab9cb;
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.os-docs .os-back:hover {
    color: var(--os-blue);
}

.os-docs .os-eyebrow,
.os-docs .os-kicker,
.os-docs .os-sidebar-title {
    display: block;
    color: var(--os-blue);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-transform: uppercase;
}

.os-docs .os-hero h1 {
    margin: 14px 0 18px;
    color: #f4f7fb;
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.os-docs .os-hero h1 span {
    color: var(--os-blue);
}

.os-docs .os-lead {
    max-width: 740px;
    margin: 0;
    color: var(--os-muted);
    font-size: 1.08rem;
    line-height: 1.85;
}

.os-docs .os-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.os-docs .os-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #263343;
    border-radius: 8px;
    background: rgba(14, 20, 28, 0.7);
    color: #c2cede;
    font-size: 0.84rem;
}

.os-docs .os-meta i {
    color: var(--os-blue);
}

.os-docs .os-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

/* BOTÕES */

.os-docs .os-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #344256;
    border-radius: 8px;
    background: transparent;
    color: #eaf1fb;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.os-docs .os-button:hover {
    transform: translateY(-1px);
}

.os-docs .os-button-primary {
    border-color: var(--os-blue-dark);
    background: var(--os-blue-dark);
    color: #fff;
}

.os-docs .os-button-primary:hover {
    border-color: #3478dc;
    background: #3478dc;
}

.os-docs .os-button-outline:hover {
    border-color: var(--os-blue);
    background: #131c29;
}

/* LAYOUT PRINCIPAL */

.os-docs .os-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    align-items: start;
    gap: 36px;
    padding-top: 38px;
    padding-bottom: 80px;
}

.os-docs .os-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 17px 12px;
    border: 1px solid #202a37;
    border-radius: var(--os-radius);
    background: var(--os-panel);
    scrollbar-width: thin;
    scrollbar-color: #344256 transparent;
}

.os-docs .os-sidebar-title {
    margin: 0 8px 12px;
    font-size: 0.67rem;
}

.os-docs .os-sidebar a {
    display: block;
    padding: 9px 8px;
    border-radius: 6px;
    color: var(--os-muted);
    font-size: 0.84rem;
    line-height: 1.5;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.os-docs .os-sidebar a:hover,
.os-docs .os-sidebar a:focus-visible {
    outline: none;
    background: #151f2c;
    color: var(--os-blue);
}

.os-docs .os-content {
    min-width: 0;
    width: 100%;
}

/* SECÇÕES */

.os-docs .os-section {
    min-width: 0;
    margin: 0 0 42px;
    padding: 0 0 42px;
    border-bottom: 1px solid #202a37;
    scroll-margin-top: 24px;
}

.os-docs .os-section:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.os-docs .os-section h2 {
    margin: 10px 0 16px;
    color: #f0f5fc;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.os-docs .os-section h3 {
    margin: 34px 0 16px;
    color: #e5edf8;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.4;
    scroll-margin-top: 24px;
}

.os-docs .os-section h4 {
    margin: 0 0 14px;
    color: #edf4fd;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.os-docs .os-section p,
.os-docs .os-section li {
    color: #afbdce;
    line-height: 1.85;
}

.os-docs .os-section p {
    margin: 12px 0;
}

.os-docs .os-section strong {
    color: #dce7f5;
    font-weight: 700;
}

.os-docs .os-section ul {
    margin: 16px 0;
}

.os-docs .os-section a:not(.os-button) {
    color: var(--os-blue);
}

/* CÓDIGO INLINE */

.os-docs .os-section code {
    padding: 2px 5px;
    border: 1px solid #283548;
    border-radius: 4px;
    background: #111a26;
    color: #a9ccff;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono",
        monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}

/* BLOCOS DE CÓDIGO */

.os-docs .os-section pre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 16px 0 10px;
    padding: 18px;
    border: 1px solid #263343;
    border-radius: 10px;
    background: #080c11;
    color: #d7e4f5;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono",
        monospace;
    font-size: 0.83rem;
    line-height: 1.8;
    tab-size: 4;
    white-space: pre;
    scrollbar-width: thin;
    scrollbar-color: #344256 #080c11;
}

.os-docs .os-section pre code {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d7e4f5;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
    overflow-wrap: normal;
}

.os-docs .os-code-label {
    margin-top: 20px;
    color: #8fa4bd;
    font-size: 0.8rem;
    font-weight: 700;
}

/* CARTÕES DE MÉTODOS */

.os-docs .os-method {
    min-width: 0;
    margin: 18px 0 24px;
    padding: 22px;
    border: 1px solid #253141;
    border-radius: var(--os-radius);
    background: var(--os-panel);
    scroll-margin-top: 24px;
    transition: border-color 0.2s ease;
}

.os-docs .os-method:hover {
    border-color: #34465d;
}

.os-docs .os-method h4 code {
    color: #8fbdff;
    font-size: 1em;
    font-weight: 700;
}

.os-docs .os-method p:last-child {
    margin-bottom: 0;
}

/* TABELAS DE PARÂMETROS */

.os-docs .os-table {
    width: 100%;
    max-width: 100%;
    margin: 18px 0;
    border: 1px solid #293648;
    border-collapse: collapse;
    background: #0c121a;
    font-size: 0.88rem;
    table-layout: auto;
}

.os-docs .os-table th,
.os-docs .os-table td {
    padding: 12px;
    border: 1px solid #293648;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.os-docs .os-table th {
    background: #141d29;
    color: #dbe8f8;
    font-weight: 650;
}

.os-docs .os-table td {
    color: #afbdce;
}

.os-docs .os-table th code,
.os-docs .os-table td code {
    white-space: normal;
}

/* BOTÕES DE CÓPIA */

.os-docs .os-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 4px 0 12px;
    padding: 8px 12px;
    border: 1px solid #344256;
    border-radius: 7px;
    background: #141d29;
    color: #dce9fa;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.os-docs .os-copy:hover {
    border-color: var(--os-blue);
    background: #19283b;
}

.os-docs .os-copy:focus-visible,
.os-docs .os-button:focus-visible {
    outline: 2px solid var(--os-blue);
    outline-offset: 3px;
}

/* AVISOS */

.os-docs .os-note {
    margin: 18px 0;
    padding: 15px 17px;
    border-left: 3px solid #d49b4b;
    border-radius: 0 8px 8px 0;
    background: #1a1711;
    color: #e4d4b8;
    font-size: 0.9rem;
    line-height: 1.8;
}

.os-docs .os-note strong {
    color: #f4dfb7;
}

.os-docs .os-note code {
    border-color: #49402e;
    background: #252016;
    color: #f4dfb7;
}

.os-docs .os-muted {
    color: #8292a6 !important;
    font-size: 0.86rem;
}

/* LISTA DE SEGURANÇA */

.os-docs .os-checklist {
    margin: 18px 0;
    padding-left: 24px;
}

.os-docs .os-checklist li {
    padding: 5px 0;
}

.os-docs .os-checklist li::marker {
    color: var(--os-blue);
}

/* SELEÇÃO DE TEXTO */

.os-docs ::selection {
    background: rgba(40, 104, 199, 0.45);
    color: #fff;
}

/* RESPONSIVIDADE — TABLETS */

@media (max-width: 1000px) {
    .os-docs .os-layout {
        grid-template-columns: 205px minmax(0, 1fr);
        gap: 24px;
    }

    .os-docs .os-method {
        padding: 18px;
    }

    .os-docs .os-table {
        font-size: 0.84rem;
    }

    .os-docs .os-table th,
    .os-docs .os-table td {
        padding: 10px;
    }
}

/* RESPONSIVIDADE — MOBILE */

@media (max-width: 850px) {
    .os-docs .os-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding-top: 28px;
        padding-bottom: 55px;
    }

    .os-docs .os-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
    }

    .os-docs .os-sidebar-title {
        grid-column: 1 / -1;
    }

    .os-docs .os-content {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .os-docs .os-container {
        width: calc(100% - 28px);
    }

    .os-docs .os-hero {
        padding: 30px 0 40px;
    }

    .os-docs .os-back {
        margin-bottom: 28px;
    }

    .os-docs .os-hero h1 {
        font-size: clamp(2.6rem, 12vw, 3.8rem);
    }

    .os-docs .os-lead {
        font-size: 0.96rem;
    }

    .os-docs .os-meta {
        gap: 8px;
    }

    .os-docs .os-meta span {
        font-size: 0.78rem;
    }

    .os-docs .os-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .os-docs .os-button {
        width: 100%;
    }

    .os-docs .os-sidebar {
        grid-template-columns: minmax(0, 1fr);
        padding: 13px 10px;
    }

    .os-docs .os-sidebar-title {
        grid-column: auto;
    }

    .os-docs .os-section {
        margin-bottom: 32px;
        padding-bottom: 32px;
    }

    .os-docs .os-section h2 {
        font-size: 1.65rem;
    }

    .os-docs .os-section h3 {
        font-size: 1.1rem;
    }

    .os-docs .os-method {
        margin: 15px 0 20px;
        padding: 14px;
        border-radius: 9px;
    }

    .os-docs .os-section pre {
        padding: 13px;
        font-size: 0.76rem;
    }

    .os-docs .os-table {
        display: block;
        overflow-x: auto;
        font-size: 0.8rem;
    }

    .os-docs .os-table th,
    .os-docs .os-table td {
        min-width: 100px;
        padding: 8px;
    }

    .os-docs .os-note {
        padding: 12px;
        font-size: 0.84rem;
    }
}

/* ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {
    .os-docs *,
    .os-docs *::before,
    .os-docs *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================
   KATYUSHASEC — CORREÇÃO DE PRIORIDADE DOS ESTILOS OPENSEC
   ========================================================== */

main:has(> .os-docs) {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #0b0f14;
}

main:has(> .os-docs) > .os-docs {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #0b0f14 !important;
    color: #eaf1fb !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color-scheme: dark;
}

main:has(> .os-docs) > .os-docs .os-hero {
    display: block;
    position: relative;
    width: 100%;
    min-height: 300px;
    margin: 0;
    padding: 48px 0 64px;
    border: 0;
    border-bottom: 1px solid #202a37;
    background:
        radial-gradient(
            ellipse at 80% 15%,
            rgba(40, 104, 199, 0.20),
            transparent 48%
        ),
        #0b0f14 !important;
    color: #eaf1fb;
}

main:has(> .os-docs) > .os-docs .os-hero h1 {
    margin: 14px 0 18px;
    color: #f4f7fb;
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.08;
}

main:has(> .os-docs) > .os-docs .os-hero h1 span {
    color: #73a9f5;
}

main:has(> .os-docs) > .os-docs .os-container {
    width: min(1180px, calc(100% - 40px));
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
}

main:has(> .os-docs) > .os-docs .os-layout {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    align-items: start;
    gap: 36px;
    padding-top: 38px;
    padding-bottom: 80px;
}

main:has(> .os-docs) > .os-docs .os-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 17px 12px;
    border: 1px solid #253141;
    border-radius: 12px;
    background: #0e141c;
}

main:has(> .os-docs) > .os-docs .os-content {
    display: block;
    min-width: 0;
    width: 100%;
    color: #eaf1fb;
}

main:has(> .os-docs) > .os-docs .os-section {
    display: block;
    min-width: 0;
    margin: 0 0 42px;
    padding: 0 0 42px;
    border-bottom: 1px solid #202a37;
}

main:has(> .os-docs) > .os-docs .os-section h2 {
    margin: 10px 0 16px;
    color: #f0f5fc;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 750;
    line-height: 1.25;
}

main:has(> .os-docs) > .os-docs .os-section h3 {
    margin: 34px 0 16px;
    color: #e5edf8;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.4;
}

main:has(> .os-docs) > .os-docs .os-section p,
main:has(> .os-docs) > .os-docs .os-section li {
    color: #afbdce;
    line-height: 1.85;
}

main:has(> .os-docs) > .os-docs .os-method {
    margin: 18px 0 24px;
    padding: 22px;
    border: 1px solid #253141;
    border-radius: 12px;
    background: #0e141c;
}

main:has(> .os-docs) > .os-docs .os-section pre {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 16px 0 10px;
    padding: 18px;
    border: 1px solid #263343;
    border-radius: 10px;
    background: #080c11;
    color: #d7e4f5;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.83rem;
    line-height: 1.8;
    white-space: pre;
}

main:has(> .os-docs) > .os-docs .os-section pre code {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

main:has(> .os-docs) > .os-docs .os-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: #0c121a;
}

main:has(> .os-docs) > .os-docs .os-table th,
main:has(> .os-docs) > .os-docs .os-table td {
    padding: 12px;
    border: 1px solid #293648;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

main:has(> .os-docs) > .os-docs .os-table th {
    background: #141d29;
    color: #dbe8f8;
}

main:has(> .os-docs) > .os-docs .os-note {
    margin: 18px 0;
    padding: 15px 17px;
    border-left: 3px solid #d49b4b;
    border-radius: 0 8px 8px 0;
    background: #1a1711;
    color: #e4d4b8;
}

main:has(> .os-docs) > .os-docs .os-button-primary {
    border-color: #2868c7;
    background: #2868c7;
    color: #fff;
}

@media (max-width: 850px) {
    main:has(> .os-docs) > .os-docs .os-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    main:has(> .os-docs) > .os-docs .os-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        overflow: visible;
    }

    main:has(> .os-docs) > .os-docs .os-sidebar-title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    main:has(> .os-docs) > .os-docs .os-container {
        width: calc(100% - 28px);
    }

    main:has(> .os-docs) > .os-docs .os-hero {
        padding: 30px 0 40px;
    }

    main:has(> .os-docs) > .os-docs .os-hero h1 {
        font-size: clamp(2.6rem, 12vw, 3.8rem);
    }

    main:has(> .os-docs) > .os-docs .os-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    main:has(> .os-docs) > .os-docs .os-method {
        padding: 14px;
    }

    main:has(> .os-docs) > .os-docs .os-section pre {
        padding: 13px;
        font-size: 0.76rem;
    }

    main:has(> .os-docs) > .os-docs .os-table {
        display: block;
        overflow-x: auto;
    }
}
