/* ========================================================================
   ZoomDH Documentation — tema claro, inspirado em identidade premium
   ======================================================================== */

:root {
    --bg-page:          #f5f6fa;
    --bg-card:          #ffffff;
    --bg-code:          #0f1226;
    --bg-code-inline:   #f0f3f8;

    --text-primary:     #0a2540;
    --text-body:        #1a1a2e;
    --text-secondary:   #344767;
    --text-muted:       #6b7a99;

    --border:           #e4e9f2;
    --border-strong:    #cfd8e6;
    --accent:           #4a63d8;   /* azul Zoom — identidade ZoomDH */
    --accent-soft:      #e8ecfb;   /* tint claro do mesmo tom pra fundos */
    --accent-text:      #3a51c0;   /* um pouco mais escuro pra texto em fundo claro */

    --color-success:    #0d8a53;
    --color-success-bg: #e3f8ed;
    --color-danger:     #c21e1e;
    --color-danger-bg:  #fde8e8;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-card: 0 1px 4px rgba(10, 37, 64, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg-page);
    color: var(--text-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Layout ---------- */
.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ---------- Header ---------- */
.doc-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
}
.doc-logo {
    height: 110px;
    object-fit: contain;
    flex-shrink: 0;
}
.doc-header-text {
    flex: 1;
    min-width: 0;
}
.doc-header-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}
.doc-header-text .meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}
.doc-header-text .meta span {
    display: inline-block;
    margin-right: 14px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-text);
    margin-left: 6px;
    vertical-align: middle;
}
.badge-ok {
    background: var(--color-success-bg);
    color: var(--color-success);
    margin: 0;
}
.badge-no {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    margin: 0;
}

/* ---------- Language switch ---------- */
.lang-switch {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.lang-btn {
    display: inline-block;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.lang-btn:hover {
    background: var(--accent-soft);
    color: var(--accent-text);
    border-color: var(--accent);
    text-decoration: none;
}
.lang-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ---------- TOC ---------- */
.toc {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 16px 20px;
    margin-bottom: 20px;
}
.toc-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}
.toc ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.toc a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 20px;
}

h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-soft);
}
h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 18px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

p, ul, ol { margin-bottom: 12px; color: var(--text-body); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { color: var(--text-primary); font-weight: 600; }
em { color: var(--text-secondary); font-style: italic; }

code {
    background: var(--bg-code-inline);
    color: var(--text-primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
}

pre {
    background: var(--bg-code);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 12px 0;
    border: 1px solid #1a1e3a;
}
pre code {
    background: transparent;
    padding: 0;
    color: #e4e9f2;
    font-size: 12.5px;
    line-height: 1.6;
}

ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

blockquote {
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    padding: 12px 16px;
    margin: 14px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-size: 13.5px;
}
blockquote strong { color: var(--text-primary); }

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}
th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th {
    background: var(--accent-soft);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
td { color: var(--text-body); }
tr:last-child td { border-bottom: none; }

/* ---------- UI gallery (screenshots da web view) ---------- */
.ui-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 18px 0 22px;
}
.ui-grid figure {
    background: transparent;
    text-align: center;
}
.ui-grid img {
    width: auto;
    max-width: 100%;
    max-height: 680px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(10, 37, 64, 0.22);
}
.ui-grid figcaption {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

.ui-fields th:first-child,
.ui-fields td:first-child {
    width: 180px;
    white-space: nowrap;
}

/* Figure dentro de uma lista/parágrafo (ex: passo de instalação) */
.inline-figure {
    margin: 14px 0 10px;
    text-align: center;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}
.inline-figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.10);
    display: block;
    margin: 0 auto;
}
.inline-figure figcaption {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
    text-align: center;
}
li small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

@media (max-width: 680px) {
    .ui-grid {
        grid-template-columns: 1fr;
    }
    .ui-grid img { max-height: 540px; }
    .ui-fields th:first-child,
    .ui-fields td:first-child {
        width: auto;
        white-space: normal;
    }
}

/* ---------- Footer ---------- */
.doc-footer {
    text-align: center;
    padding: 20px 0 0;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.doc-footer a { color: var(--text-muted); }
.doc-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
    .page { padding: 16px 14px 40px; }
    .doc-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .doc-logo { height: 40px; }
    .doc-header-text h1 { font-size: 18px; }
    .doc-header-text .meta span { display: block; margin: 2px 0; }
    .lang-switch { align-self: flex-end; }
    .card { padding: 18px; }
    h2 { font-size: 15px; }
    table, th, td { font-size: 12.5px; }
    th, td { padding: 8px 10px; }
}
