/* =========================================================
   Preventech API Docs - Modern override
   Carregar depois de postman.min.css e bootstrap-treeview.min.css
   ========================================================= */

:root {
    --pt-primary: #0066ff;
    --pt-primary-dark: #004ec4;
    --pt-bg: #f4f7fb;
    --pt-card: #ffffff;
    --pt-text: #1f2937;
    --pt-muted: #6b7280;
    --pt-border: #e5e7eb;
    --pt-sidebar: #0f172a;
    --pt-sidebar-soft: #172033;
    --pt-code: #111827;
    --pt-code-border: #243044;

    --pt-get: #16a34a;
    --pt-post: #f59e0b;
    --pt-put: #2563eb;
    --pt-delete: #dc2626;
}

/* Base */
html,
body {
    background: var(--pt-bg) !important;
    color: var(--pt-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-shadow: none !important;
    box-shadow: none !important;
}

.page-wrapper {
    background: var(--pt-bg);
}

/* Remove o split antigo branco/preto do postman.css */
body #doc-body:not(.is-loading) {
    background-image: none !important;
    background: transparent !important;
}

/* Sidebar */
.sidebar-wrapper {
    background: var(--pt-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-wrapper .sidebar-content {
    background: transparent !important;
}

.sidebar-wrapper .sidebar-brand {
    min-height: 76px;
    padding: 18px 18px !important;
    background: linear-gradient(135deg, #0f172a, #111827);
    color: #ffffff !important;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-wrapper .sidebar-brand img {
    width: 46px !important;
    margin-right: 14px !important;
    filter: brightness(0) invert(1) !important;
}

.sidebar-wrapper .sidebar-menu {
    padding: 12px 10px;
}

/* Treeview */
#tree,
#tree .list-group {
    background: transparent !important;
}

#tree .list-group-item {
    background: transparent !important;
    color: #cbd5e1 !important;
    border: 0 !important;
    border-radius: 10px !important;
    margin-bottom: 4px;
    padding: 0.48rem 0.75rem !important;
    font-size: 0.82rem;
    line-height: 1.35;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

#tree .list-group-item:hover,
#tree .list-group-item.node-selected {
    background: var(--pt-sidebar-soft) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

#tree .list-group-item:hover {
    transform: translateX(2px);
}

#tree span.icon {
    color: #94a3b8;
    width: 14px;
    margin-right: 8px;
}

#tree span.indent {
    margin-left: 8px;
    margin-right: 4px;
}

/* Top bar */
.page-content>.container-fluid>.row:first-child {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 64px;
    border-bottom: 1px solid var(--pt-border) !important;
}

#toggle-sidebar {
    background: #ffffff !important;
    color: var(--pt-text) !important;
    border: 1px solid var(--pt-border);
    border-radius: 12px !important;
    padding: 0.7rem 0.85rem !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

#toggle-sidebar:hover {
    background: var(--pt-primary) !important;
    color: #ffffff !important;
    border-color: var(--pt-primary);
}

/* Content width */
/* .page-content .container-fluid {
    padding-left: 24px;
    padding-right: 24px;
} */

.page-content .row.p-lg-4 {
    padding: 28px !important;
}

/* Primeira secção / título da coleção */
#doc-body>.row:first-child .api-information {
    background: linear-gradient(135deg, #ffffff, #eef5ff);
    border: 1px solid var(--pt-border);
    border-radius: 22px;
    padding: 34px 36px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.api-information .collection-name p {
    color: var(--pt-text) !important;
    padding-top: 0 !important;
    margin-bottom: 10px;
    font-weight: 800 !important;
    font-size: clamp(2rem, 4vw, 2.8rem) !important;
    line-height: 1.05;
}

.api-information .collection-description {
    color: var(--pt-muted) !important;
    font-size: 1rem;
    /* max-width: 820px; */
}

.api-information .collection-description h5 {
    color: var(--pt-primary);
    font-weight: 700;
}

/* Cada endpoint como card */
#doc-body>.row.row-no-padding.row-eq-height {
    margin-bottom: 22px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

#doc-body>.row.row-no-padding.row-eq-height:first-child {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

#doc-body .section {
    border-top: 0 !important;
    padding-top: 0 !important;
    background: #ffffff;
}

.api-information {
    padding: 28px 30px !important;
}

/* Título do endpoint */
.api-information .heading {
    margin: 0 0 18px 0 !important;
}

.api-information .heading .name {
    color: var(--pt-text) !important;
    font-size: 1.1rem !important;
    font-weight: 750 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-information .heading .name hr {
    display: none;
}

/* Descrição que no HTML está dentro do heading no endpoint Authentication */
.api-information .heading .name>div {
    flex-basis: 100%;
    margin-top: 12px;
    color: var(--pt-muted);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.7;
}

/* Método */
.method,
.api-information .heading .method {
    min-width: 58px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem !important;
    line-height: 1;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    color: #ffffff !important;
    margin-right: 0 !important;
}

.GET,
.get {
    background: var(--pt-get) !important;
}

.POST,
.post {
    background: var(--pt-post) !important;
}

.PUT,
.put {
    background: var(--pt-put) !important;
}

.DELETE,
.delete {
    background: var(--pt-delete) !important;
}

/* URL */
.api-information .url {
    background: #f8fafc !important;
    border: 1px solid var(--pt-border) !important;
    color: #334155 !important;
    border-radius: 12px !important;
    padding: 11px 14px !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem !important;
    line-height: 1.55;
}

/* Descrição markdown */
.api-information .description {
    color: var(--pt-text);
    font-size: 0.92rem !important;
    line-height: 1.7;
}

.api-information .description h2,
.api-information .description h3 {
    color: var(--pt-text);
    margin-top: 22px;
    margin-bottom: 12px;
    font-weight: 750;
}

.api-information .description h2 {
    font-size: 1.35rem;
}

.api-information .description h3 {
    font-size: 1rem;
}

.api-information .description blockquote {
    margin: 16px 0;
    padding: 14px 16px;
    border-left: 4px solid var(--pt-primary);
    background: #eff6ff;
    border-radius: 0 12px 12px 0;
    color: #334155;
}

/* Tabelas */
.api-information .description table {
    display: table !important;
    width: 100% !important;
    border: 1px solid var(--pt-border) !important;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.api-information .description table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 750;
}

.api-information .description table td,
.api-information .description table th {
    border: 1px solid var(--pt-border) !important;
    padding: 10px 12px !important;
    vertical-align: top;
}

/* HEADERS, PARAMS, BODY */
.api-information .request-body {
    padding-top: 20px !important;
}

.api-information .request-body .body-heading {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.api-information .request-body hr {
    margin: 8px 0 12px;
    border-top: 1px solid var(--pt-border);
}

.api-information .request-body .param {
    background: #f8fafc;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    margin: 8px 0 !important;
    padding: 10px 12px;
}

.api-information .request-body .param .name {
    color: var(--pt-text) !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    padding-right: 10px !important;
}

.api-information .request-body .param .value {
    color: #475569 !important;
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.api-information .request-body .param .description {
    color: var(--pt-muted) !important;
    font-size: 0.78rem !important;
    margin-top: 4px;
}

/* Coluna dos exemplos */
.examples {
    background: var(--pt-code);
    color: #e5e7eb;
    padding-top: 18px;
    padding-bottom: 18px;
}

.examples .heading {
    color: #cbd5e1 !important;
    opacity: 1 !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.examples .sample-request,
.examples .sample-response {
    padding: 0 22px !important;
}

.examples .responses-index {
    height: auto !important;
    border: 1px solid var(--pt-code-border) !important;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #0b1220;
}

.examples .responses-index .response-name {
    background: #0b1220 !important;
}

.examples .responses-index .response-name .responses-dropdown,
body #doc-body .btn.responses-dropdown {
    height: 38px !important;
    background: #0b1220 !important;
    color: #e5e7eb !important;
    border: 0 !important;
    font-size: 0.78rem !important;
    padding: 0 14px !important;
}

.examples .request {
    margin: 0 22px 16px 22px !important;
    border: 1px solid var(--pt-code-border) !important;
    border-top: 0 !important;
    border-radius: 0 0 12px 12px;
    background: #020617 !important;
    overflow: hidden;
}

.click-to-expand-wrapper.is-snippet-wrapper,
body pre[class*="language-"],
body :not(pre)>code[class*="language-"] {
    background: #020617 !important;
    color: #d1d5db !important;
}

.click-to-expand-wrapper.is-snippet-wrapper {
    max-height: 280px;
    padding: 18px !important;
    margin: 0 !important;
    font-size: 0.78rem;
    line-height: 1.65;
    border-radius: 0;
}

.click-to-expand-wrapper.is-expandable:before {
    background: var(--pt-primary) !important;
    color: #ffffff !important;
    content: "Ver mais";
    box-shadow: 0 10px 22px rgba(0, 102, 255, 0.25);
}

/* Modal de código */
body .modal.dark-background .modal-dialog {
    background: rgba(15, 23, 42, 0.96) !important;
}

body .modal .modal-dialog {
    padding: 28px !important;
}

body .modal .modal-dialog .modal-header .title {
    color: #ffffff !important;
}

body .modal .modal-dialog .modal-header .close div,
body .modal .modal-dialog .modal-header .close {
    color: #ffffff !important;
}

/* Responsivo */
@media (max-width: 991px) {
    .page-content .row.p-lg-4 {
        padding: 18px !important;
    }

    #doc-body>.row.row-no-padding.row-eq-height {
        border-radius: 18px;
    }

    .api-information {
        padding: 22px !important;
    }

    .examples {
        padding-top: 16px;
    }
}

@media (max-width: 767px) {
    .page-content .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-content .row.p-lg-4 {
        padding: 12px !important;
    }

    #doc-body>.row:first-child .api-information {
        padding: 24px;
        border-radius: 18px;
    }

    .api-information .collection-name p {
        font-size: 2rem !important;
    }

    #doc-body>.row.row-no-padding.row-eq-height {
        margin-bottom: 18px;
    }

    .examples .sample-request,
    .examples .sample-response {
        padding: 0 16px !important;
    }

    .examples .request {
        margin: 0 16px 16px 16px !important;
    }

    .api-information .heading .name {
        font-size: 1rem !important;
    }

    .method {
        min-width: 52px;
    }
}

/* =========================================================
   Preventech API Docs - Sidebar menu only
   Remove pastas + métodos como texto simples
   ========================================================= */

/* Fundo e estrutura do menu */
#sidebar.sidebar-wrapper {
    background: #0f172a !important;
}

#sidebar .sidebar-content,
#sidebar .sidebar-menu,
#sidebar #tree,
#sidebar #tree .list-group {
    background: transparent !important;
}

#sidebar .sidebar-menu {
    padding: 14px 12px !important;
}

/* Itens da tree */
#sidebar #tree .list-group-item {
    background: transparent !important;
    border: 0 !important;
    color: #e5e7eb !important;
    padding: 7px 10px !important;
    margin: 0 0 3px 0 !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

#sidebar #tree .list-group-item:hover,
#sidebar #tree .list-group-item.node-selected {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    transform: translateX(2px);
}

/* Setas/chevrons: manter visíveis */
#sidebar #tree .expand-icon,
#sidebar #tree .collapse-icon {
    display: inline-block !important;
    width: 13px !important;
    margin-right: 10px !important;
    color: #9fb3ca !important;
    font-size: 0.72rem !important;
    text-align: center;
}

/* Remover apenas os ícones de pasta */
#sidebar #tree .node-icon,
#sidebar #tree .fa-folder,
#sidebar #tree .far.fa-folder,
#sidebar #tree .fas.fa-folder {
    display: none !important;
}

/* Ajustar indentação depois de remover as pastas */
#sidebar #tree span.indent {
    margin-left: 11px !important;
    margin-right: 4px !important;
}

/* Método no menu: texto simples, sem badge/pill */
#sidebar #tree .method {
    display: inline-block !important;
    /* min-width: 34px !important; */
    min-width: 1px !important;
    margin-right: 8px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    line-height: inherit !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    text-align: left !important;
    text-transform: uppercase !important;
}

/* Cores dos métodos apenas no menu */
#sidebar #tree .method.GET,
#sidebar #tree .method.get,
#sidebar #tree .GET.method,
#sidebar #tree .get.method {
    color: #22c55e !important;
}

#sidebar #tree .method.POST,
#sidebar #tree .method.post,
#sidebar #tree .POST.method,
#sidebar #tree .post.method {
    color: #f59e0b !important;
}

#sidebar #tree .method.PUT,
#sidebar #tree .method.put,
#sidebar #tree .PUT.method,
#sidebar #tree .put.method {
    color: #3b82f6 !important;
}

#sidebar #tree .method.DELETE,
#sidebar #tree .method.delete,
#sidebar #tree .DELETE.method,
#sidebar #tree .delete.method {
    color: #ef4444 !important;
}

/* Texto dos grupos sem ícone de pasta */
#sidebar #tree .list-group-item:not(:has(.method)) {
    font-weight: 650 !important;
    color: #f8fafc !important;
}

/* Texto dos endpoints */
#sidebar #tree .list-group-item:has(.method) {
    font-weight: 500 !important;
    color: #dbeafe !important;
}

/* Remover qualquer estilo anterior tipo pill que venha do override moderno */
#sidebar #tree .method::before,
#sidebar #tree .method::after {
    display: none !important;
    content: none !important;
}

.language-javascript {
    color: #dbeafe !important;
}

/* Override específico para o bloco do título da documentação */
.col-md-6.col-xs-12:has(> .api-information > .collection-name) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}