/* ============================================================
   Fusion Clinic Online — Documentação
   CSS compartilhado entre todas as páginas
   ============================================================ */

:root {
    --primary: #00897B;
    --primary-dark: #00695C;
    --sidebar-width: 260px;
    --header-height: 56px;
}

body { background: #fff; font-family: 'Segoe UI', sans-serif; margin: 0; }

/* ── Header ── */
.docs-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--primary-dark); color: white;
    display: flex; align-items: center; padding: 0 1.5rem;
    z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.docs-header .brand { font-size: 1.05rem; font-weight: 600; color: white; text-decoration: none; }

/* ── Sidebar ── */
.docs-sidebar {
    position: fixed; left: 0; top: var(--header-height); bottom: 0;
    width: var(--sidebar-width); background: #fafafa;
    border-right: 1px solid #e0e0e0; overflow-y: auto; padding: 1.5rem 0;
}
.nav-section { margin-bottom: 0.75rem; }
.nav-section-title {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: #9e9e9e; padding: 0.5rem 1.5rem;
}
.nav-link-docs {
    display: block; padding: 0.4rem 1.5rem; color: #424242;
    text-decoration: none; font-size: 0.875rem; transition: background 0.15s;
}
.nav-link-docs:hover { background: #e8f5e9; color: var(--primary); }
.nav-link-docs.active {
    background: #e0f2f1; color: var(--primary-dark);
    font-weight: 600; border-right: 3px solid var(--primary);
}
.nav-sub-link {
    display: block; padding: 0.3rem 1.5rem 0.3rem 2.5rem; color: #616161;
    text-decoration: none; font-size: 0.82rem; transition: background 0.15s;
}
.nav-sub-link:hover { background: #f5f5f5; color: var(--primary); }
.nav-sub-link.active { color: var(--primary-dark); font-weight: 600; }

/* ── Content ── */
.docs-content {
    margin-left: var(--sidebar-width); margin-top: var(--header-height);
    padding: 2.5rem 3.5rem; max-width: 940px;
}

/* ── Typography ── */
h1 { font-size: 1.85rem; color: #212121; border-bottom: 2px solid #e0e0e0; padding-bottom: 0.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.2rem; color: var(--primary-dark); margin-top: 2.5rem; margin-bottom: 0.75rem; padding-bottom: 4px; border-bottom: 1px solid #e8f5e9; }
h3 { font-size: 0.97rem; color: #424242; margin-top: 1.25rem; margin-bottom: 0.5rem; font-weight: 600; }
p, li { color: #424242; line-height: 1.75; font-size: 0.93rem; }

/* ── Callouts ── */
.docs-tip {
    background: #e8f5e9; border-left: 4px solid var(--primary);
    padding: 0.8rem 1.1rem; border-radius: 0 6px 6px 0; margin: 1.25rem 0; font-size: 0.88rem; color: #1b5e20;
}
.docs-warning {
    background: #fff8e1; border-left: 4px solid #f9a825;
    padding: 0.8rem 1.1rem; border-radius: 0 6px 6px 0; margin: 1.25rem 0; font-size: 0.88rem; color: #4e3b00;
}
.docs-info {
    background: #e3f2fd; border-left: 4px solid #1976D2;
    padding: 0.8rem 1.1rem; border-radius: 0 6px 6px 0; margin: 1.25rem 0; font-size: 0.88rem; color: #0d47a1;
}

/* ── Screen prototype ── */
.screen-prototype {
    border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09); margin: 1.25rem 0 2rem;
}
.screen-prototype-bar {
    background: var(--primary-dark); color: white;
    padding: 0.45rem 1rem; font-size: 0.78rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.screen-prototype-bar .dots { display: flex; gap: 5px; margin-right: 6px; }
.screen-prototype-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.screen-prototype-body { background: #f4f6f8; padding: 1.1rem; }

/* ── Proto components ── */
.proto-header-box {
    background: white; border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); padding: 0.9rem; margin-bottom: 0.75rem;
}
.proto-icon-box {
    background: var(--primary-dark); color: white; width: 36px; height: 36px;
    border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.proto-table-head th { background: #00695C; color: white; padding: 7px 10px; font-size: 0.8rem; font-weight: 600; }
.proto-table td { padding: 7px 10px; font-size: 0.82rem; vertical-align: middle; border-bottom: 1px solid #f0f0f0; }
.proto-table tbody tr:hover { background: #f0faf9; }
.proto-btn {
    border: none; border-radius: 5px; padding: 3px 8px; font-size: 0.78rem;
    cursor: default; color: var(--primary-dark); background: #e0f2f1;
}
.proto-btn.danger { color: #c62828; background: #fdecea; }
.proto-btn.primary { color: white; background: var(--primary-dark); font-weight: 600; }
.proto-badge-ativo { background:#d4edda; color:#155724; padding:2px 9px; border-radius:12px; font-size:0.76rem; font-weight:600; }
.proto-badge-inativo { background:#f8d7da; color:#721c24; padding:2px 9px; border-radius:12px; font-size:0.76rem; font-weight:600; }
.proto-badge-pub { background:#e0f2f1; color:#00695c; padding:2px 7px; border-radius:4px; font-size:0.7rem; white-space:nowrap; }
.proto-badge-priv { background:#f3e5f5; color:#6a1b9a; padding:2px 7px; border-radius:4px; font-size:0.7rem; white-space:nowrap; }
.proto-form-box { background: white; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 1.25rem; }

/* ── Button reference inline ── */
.btn-ref {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 4px;
    padding: 2px 8px; font-size: 0.82rem; color: #424242; vertical-align: middle;
}
.btn-ref i { color: var(--primary); font-size: 0.76rem; }
.btn-ref.danger i { color: #c62828; }
.btn-ref.warn i { color: #e65100; }

/* ── Numbered steps ── */
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li {
    counter-increment: step; display: flex; align-items: flex-start;
    gap: 0.8rem; margin-bottom: 0.6rem; font-size: 0.92rem; color: #424242;
}
.step-list li::before {
    content: counter(step); background: var(--primary); color: white;
    width: 21px; height: 21px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0; margin-top: 3px;
}

/* ── Field/action tables ── */
.field-table { width: 100%; border-collapse: collapse; margin: 0.75rem 0 1.25rem; font-size: 0.87rem; }
.field-table th { background: #f5f5f5; color: #616161; font-size: 0.78rem; padding: 7px 11px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.field-table td { padding: 7px 11px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; color: #424242; }
.field-table tr:last-child td { border-bottom: none; }
.req-yes { color: var(--primary); font-weight: 700; }
.req-no  { color: #9e9e9e; }

/* ── Page nav ── */
.page-nav { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e0e0e0; }
.page-nav a { display: flex; align-items: center; gap: 6px; color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.88rem; }
.page-nav a:hover { color: var(--primary-dark); }

/* ── Module cards (index) ── */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.module-card {
    border: 1px solid #e0e0e0; border-radius: 10px; padding: 1.1rem;
    text-decoration: none; color: #212121; transition: box-shadow 0.2s, border-color 0.2s;
    display: flex; flex-direction: column; gap: 0.45rem;
}
.module-card:hover { box-shadow: 0 4px 16px rgba(0,137,123,0.15); border-color: var(--primary); color: #212121; }
.module-card .icon { font-size: 1.6rem; color: var(--primary); }
.module-card .title { font-weight: 600; font-size: 0.92rem; }
.module-card .desc { font-size: 0.8rem; color: #757575; }
.badge-novo { background: #e0f2f1; color: var(--primary-dark); font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.badge-ok   { background: #e8f5e9; color: #2e7d32; font-size: 0.68rem; padding: 2px 7px; border-radius: 10px; font-weight: 600; }

/* ── KPI card (painel) ── */
.proto-kpi {
    background: white; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 12px 14px; display: flex; align-items: center; gap: 10px;
}
.proto-kpi-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.proto-kpi-label { font-size: 0.68rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.proto-kpi-value { font-size: 1.5rem; font-weight: 800; color: #1e293b; line-height: 1.1; }
.proto-kpi-sub { font-size: 0.68rem; color: #94a3b8; }
