:root {
    --rz-primary:         #800020;
    --rz-primary-rgb:     128, 0, 32;
    --rz-primary-light:   #9d0028;
    --rz-primary-lighter: #f9e6e9;
    --rz-primary-dark:    #600018;
    --rz-primary-darker:  #46000f;
    /* Cores semânticas para ReferenciaFramework */
    --ref-blue:  #1d4ed8;
    --ref-teal:  #0f766e;
    --ref-amber: #d97706;
}

/* ── Header branco ── */
.rz-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rz-header .rz-button {
    color: #4b5563 !important;
}
.rz-header .rz-button:hover {
    color: var(--rz-primary) !important;
    background: rgba(128, 0, 32, 0.06) !important;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden !important;
}

/* ── Página de Documentação ─────────────────────────────────────────────── */
.doc-nav-item {
    padding: .55rem 1.2rem;
    cursor: pointer !important;
    font-size: .82rem;
    color: #999;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    transition: background .12s, color .12s;
    user-select: none;
}
.doc-nav-item:hover { background: rgba(96,0,24,.12) !important; color: #fff !important; cursor: pointer !important; }
.doc-nav-active    { border-left-color: #600018 !important; background: rgba(96,0,24,.2) !important; color: #fff !important; }

/* ── Markdown body ──────────────────────────────────────────────────────── */
.md-content { max-width: 900px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.7; color: #24292e; }
.md-content h1 { font-size: 1.9rem; font-weight: 700; color: #600018; margin: 0 0 1.5rem; padding-bottom: .6rem; border-bottom: 2px solid #f0e0e5; }
.md-content h2 { font-size: 1.3rem; font-weight: 600; color: #600018; margin: 2.5rem 0 .8rem; padding-bottom: .3rem; border-bottom: 1px solid #f0e0e5; }
.md-content h3 { font-size: 1.05rem; font-weight: 600; color: #333; margin: 1.75rem 0 .5rem; }
.md-content h4 { font-size: .95rem; font-weight: 600; color: #555; margin: 1.25rem 0 .4rem; }
.md-content p  { margin: 0 0 1rem; line-height: 1.75; }
.md-content ul, .md-content ol { margin: 0 0 1rem 1.5rem; line-height: 1.75; }
.md-content li { margin-bottom: .3rem; }
.md-content code { background: #f6f0f2; border-radius: 4px; padding: .15em .45em; font-size: .875em; color: #600018; font-family: 'Consolas', 'Cascadia Code', monospace; }
.md-content pre { background: #1e1e1e; border-radius: 8px; padding: 1rem 1.25rem; overflow-x: auto; margin: .75rem 0 1.5rem; border: 1px solid #333; }
.md-content pre code { background: transparent; color: #d4d4d4; padding: 0; font-size: .83rem; line-height: 1.6; white-space: pre; }
.md-content table { border-collapse: collapse !important; width: 100% !important; margin: .75rem 0 1.5rem !important; font-size: .875rem !important; border-radius: 6px; overflow: hidden; border: 1px solid #e8d0d5 !important; }
.md-content th { background: #600018 !important; color: #fff !important; padding: .55rem .85rem !important; text-align: left !important; font-weight: 600 !important; font-size: .82rem !important; letter-spacing: .02em !important; border: none !important; }
.md-content td { padding: .5rem .85rem !important; border-bottom: 1px solid #f0e8ea !important; color: #333 !important; vertical-align: top !important; border-left: none !important; border-right: none !important; border-top: none !important; }
.md-content tr:last-child td { border-bottom: none !important; }
.md-content tr:nth-child(even) td { background: #fdf7f8 !important; }
.md-content tr:nth-child(odd) td { background: #fff !important; }
.md-content blockquote { border-left: 4px solid #600018; background: #fdf5f7; margin: 1rem 0; padding: .75rem 1.1rem; border-radius: 0 6px 6px 0; }
.md-content blockquote p { margin: 0; color: #600018; font-size: .9rem; }
.md-content hr { border: none; border-top: 1px solid #eee; margin: 2.5rem 0; }
.md-content a { color: #600018; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.md-content a:hover { text-decoration-style: solid; }

/* Mermaid: placeholder antes da renderização e container após */
.md-content .mermaid-src {
    background: #fafafa;
    border: 1px solid #e8d0d5;
    border-radius: 8px;
    min-height: 80px;
    margin: 1rem 0 1.75rem;
}
.md-content .mermaid-src pre {
    margin: 0;
    padding: 1rem;
    font-size: .78rem;
    overflow-x: auto;
    white-space: pre;
    color: #555;
}
.md-content .mermaid {
    background: #fafafa;
    border: 1px solid #e8d0d5;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0 1.75rem;
    overflow-x: auto;
    text-align: center;
}
.md-content .mermaid svg { max-width: 100%; height: auto; }

.rz-layout {
    min-height: 100vh;
    overflow-x: hidden !important;
}

/* Corta o overflow causado pelos negative margins de .hero-section e .cta-section */
.rz-body,
.rz-content-container {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* reCAPTCHA v3 — badge oculto conforme permitido pelo Google.
   Atribuição obrigatória incluída no rodapé (MainLayout) e na Política de Privacidade. */
.grecaptcha-badge {
    display: none !important;
}

/* Auth form inputs */
.rz-textbox {
    border: 1px solid var(--rz-input-border-color, #ccc);
    border-radius: var(--rz-border-radius, 4px);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--rz-input-background-color, #fff);
    color: var(--rz-text-color, #333);
}
.rz-textbox:focus {
    outline: none;
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 2px rgba(var(--rz-primary-rgb, 50, 115, 220), 0.2);
}

/* ── Home page ── */

.hero-section {
    background: linear-gradient(135deg, var(--rz-primary) 0%, #46000f 100%);
    padding: 5rem 2rem;
    display: flex;
    justify-content: center;
    margin: -2rem -2rem 0 -2rem; /* bleed outside content padding */
    position: relative;
    overflow: hidden;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* faixas diagonais */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -55deg,
        transparent 0px,
        transparent 60px,
        rgba(255, 255, 255, 0.04) 60px,
        rgba(255, 255, 255, 0.04) 61px,
        transparent 61px,
        transparent 120px,
        rgba(255, 255, 255, 0.02) 120px,
        rgba(255, 255, 255, 0.02) 121px
    );
    pointer-events: none;
}

/* brilho radial no canto superior direito */
.hero-section::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.13) 0%, transparent 65%);
    pointer-events: none;
}

.avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.avatar-initials {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}
.avatar-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.section-container {
    padding: 3.5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.section-alt {
    background: var(--rz-base-background-color);
    max-width: 100%;
    padding-left: calc(50% - 550px + 2rem);
    padding-right: calc(50% - 550px + 2rem);
}

.service-card {
    height: 100%;
    transition: box-shadow 0.2s;
}
.service-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.service-icon {
    font-size: 2rem;
    color: var(--rz-primary);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.cta-section {
    background: linear-gradient(135deg, #46000f 0%, var(--rz-primary) 100%);
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    margin: 0 -2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--rz-border-radius, 4px);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.15s;
}
.social-link:hover { opacity: 0.8; }
.linkedin-link {
    background: #0A66C2;
    color: white;
}
.email-link {
    background: var(--rz-primary-dark);
    color: white;
}
.github-link {
    background: #24292e;
    color: white;
}

/* ── Contact page ── */

.contact-card {
    height: 100%;
}
.contact-icon {
    font-size: 2.5rem;
}
.contact-action-link {
    color: var(--rz-primary);
    font-weight: 500;
    word-break: break-all;
    text-decoration: none;
}
.contact-action-link:hover {
    text-decoration: underline;
}

/* ── Cookie Banner ── */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--rz-base-background-color, #fff);
    border-top: 2px solid var(--rz-primary);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* ── Legal pages (Privacy, Terms, Cookies) ── */

.legal-page {
    max-width: 860px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--rz-border-color, #e5e7eb);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-highlight {
    background: var(--rz-info-lighter, #eff6ff);
    border-left: 3px solid var(--rz-info, #3b82f6);
    padding: 0.75rem 1rem;
    border-radius: 0 var(--rz-border-radius, 4px) var(--rz-border-radius, 4px) 0;
    margin: 1rem 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.legal-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.legal-list li {
    margin-bottom: 0.4rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

.legal-table th {
    background: var(--rz-primary);
    color: #fff;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
}

.legal-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--rz-border-color, #e5e7eb);
    vertical-align: top;
    line-height: 1.5;
}

.legal-table tr:last-child td {
    border-bottom: none;
}

.legal-table tr:nth-child(even) td {
    background: var(--rz-base-background-color, #f9fafb);
}

.cookie-category-card {
    border: 1px solid var(--rz-border-color, #e5e7eb);
    border-radius: var(--rz-border-radius, 4px);
    padding: 1rem 1.25rem;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Blog ── */

.blog-card {
    background: var(--rz-card-background-color, #fff);
    border: 1.5px solid var(--rz-border-color, #e5e7eb);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.blog-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.09);
    border-color: var(--rz-primary);
}

.blog-article {
    font-size: 1rem;
    line-height: 1.8;
}
.blog-article h2,
.blog-article h3,
.blog-article h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--rz-text-color);
}
.blog-article p {
    margin-bottom: 1.1rem;
    color: var(--rz-text-color);
}
.blog-article blockquote {
    border-left: 4px solid var(--rz-primary);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--rz-primary-lighter, #f9e6e9);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--rz-text-color);
}

/* ── Pricing page ── */

.pricing-card {
    background: var(--rz-card-background-color, #fff);
    border: 1.5px solid var(--rz-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    height: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}
.pricing-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
.pricing-card--highlight {
    border-color: var(--rz-primary);
    box-shadow: 0 4px 20px rgba(128,0,32,0.13);
}
.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rz-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.pricing-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rz-border-color, #e5e7eb);
    margin-bottom: 1rem;
}
.pricing-pkg-icon {
    font-size: 2rem;
    color: var(--rz-primary);
}
.pricing-price {
    text-align: center;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
}
.pricing-prefix {
    width: 100%;
    font-size: 0.72rem;
    color: var(--rz-text-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: -0.25rem;
}
.pricing-currency {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-secondary-color);
    align-self: flex-start;
    margin-top: 6px;
}
.pricing-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--rz-text-color);
    line-height: 1;
}
.pricing-amount-consult {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rz-primary);
}
.pricing-period {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
    align-self: flex-end;
    margin-bottom: 4px;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}
.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: var(--rz-text-color);
    line-height: 1.5;
}
.pricing-feature--disabled {
    color: var(--rz-text-secondary-color) !important;
    text-decoration: line-through;
    opacity: 0.6;
}
.pricing-feature--disabled .rzi {
    color: var(--rz-text-secondary-color) !important;
}

.avulso-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.avulso-table th {
    background: var(--rz-primary);
    color: #fff;
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
}
.avulso-table td {
    padding: 0.7rem 0.875rem;
    border-bottom: 1px solid var(--rz-border-color, #e5e7eb);
    vertical-align: middle;
}
.avulso-table tr:last-child td {
    border-bottom: none;
}
.avulso-table tr:nth-child(even) td {
    background: var(--rz-base-background-color, #f9fafb);
}

/* ── Responsive ── */

/* ── WhatsApp floating button ── */

.wa-container {
    position: fixed;
    bottom: 7rem;
    right: 1.5rem;
    z-index: 9000;
}

/* FAB button */
.wa-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    position: relative;
    outline-offset: 3px;
}
.wa-fab:hover {
    transform: scale(1.09);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    background: #20c05e;
}
.wa-fab:active  { transform: scale(0.95); }
.wa-fab:focus-visible { outline: 3px solid #25D366; }
.wa-fab svg { width: 30px; height: 30px; flex-shrink: 0; }

/* Pulse — fires once on first load */
.wa-pulse { animation: wa-pulse-ring 2s ease-out 0.8s 1; }
@keyframes wa-pulse-ring {
    0%   { box-shadow: 0 0 0  0   rgba(37,211,102,.7); }
    70%  { box-shadow: 0 0 0 16px rgba(37,211,102, 0); }
    100% { box-shadow: 0 4px 12px rgba(37,211,102,.45); }
}

/* Notification badge */
.wa-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}

/* Backdrop — click outside to close */
.wa-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8990;
    background: transparent;
}

/* Popup card */
.wa-popup {
    position: absolute;
    bottom: calc(100% + 0.625rem);
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
    overflow: hidden;
    animation: wa-popup-in 0.18s ease-out;
    z-index: 1;
}
@keyframes wa-popup-in {
    from { opacity: 0; transform: translateY(6px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1);   }
}

.wa-popup-header {
    background: #075E54;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.wa-popup-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.wa-popup-brand svg { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }
.wa-popup-title { color: #fff; font-weight: 700; font-size: 0.9375rem; }
.wa-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.75);
    padding: 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.wa-close-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.wa-close-btn .rzi { font-size: 1.1rem; }

.wa-popup-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.wa-popup-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0 0 0.125rem;
}

/* Department button */
.wa-dept-btn {
    width: 100%;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    transition: background .15s, border-color .15s, transform .12s;
}
.wa-dept-btn:hover  { background: #f0fdf4; border-color: #25D366; }
.wa-dept-btn:active { transform: scale(.98); }

.wa-dept-info { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.wa-dept-name { font-weight: 600; font-size: 0.875rem; color: #111827; }
.wa-dept-desc { font-size: 0.72rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-dept-status { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; flex-shrink: 0; }
.wa-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.wa-dot-online  { background: #22c55e; }
.wa-dot-offline { background: #9ca3af; }
.wa-status-text { font-size: 0.62rem; color: #6b7280; white-space: nowrap; }

.wa-dept-btn.wa-dept-offline { opacity: .72; }
.wa-dept-btn.wa-dept-offline:hover { background: #f9fafb; border-color: #e5e7eb; }

.wa-popup-footer {
    padding: 0.55rem 1rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 0.72rem;
    color: #6b7280;
    text-align: center;
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .hero-section { padding: 3.5rem 1.25rem; }
    .section-container { padding: 2.5rem 1.25rem; }
    .section-alt {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .cta-section { padding: 3rem 1.25rem; margin: 0 -1.25rem; }
    .hero-section { margin: -2rem -1.25rem 0 -1.25rem; }

    .cookie-banner {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .legal-table {
        display: block;
        overflow-x: auto;
    }

    .wa-container { right: 1rem; bottom: 10rem; }
    .wa-popup { width: min(300px, calc(100vw - 2rem)); }
}

/* ── Notification Bell ── */
.notif-bell-container {
    position: relative;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
}

.notif-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 460px;
    overflow-y: auto;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--rz-border-color);
    font-size: .875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .75rem;
    color: var(--rz-primary);
    padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list { overflow-y: auto; }

.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--rz-text-secondary-color);
    font-size: .875rem;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--rz-border-color);
    transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--rz-base-300); }
.notif-item--unread { background: color-mix(in srgb, var(--rz-primary) 6%, transparent); }
.notif-item--unread:hover { background: color-mix(in srgb, var(--rz-primary) 10%, transparent); }

.notif-item-icon {
    font-size: 1.1rem;
    color: var(--rz-primary);
    margin-top: .1rem;
    flex-shrink: 0;
}

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--rz-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-msg {
    font-size: .75rem;
    color: var(--rz-text-secondary-color);
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-time {
    font-size: .7rem;
    color: var(--rz-text-secondary-color);
    margin-top: .25rem;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rz-primary);
    flex-shrink: 0;
    margin-top: .35rem;
}

.notif-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: transparent;
}

@media (max-width: 480px) {
    .notif-panel { width: calc(100vw - 2rem); right: -4rem; }
}

/* ══════════════════════════════════════════════════════════════════
   MODO ESCURO — [data-theme="dark"]
   Radzen usa CSS vars (--rz-*) que são sobrescritas aqui.
   Componentes com cores hardcoded recebem overrides explícitos.
   ══════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
    /* Paleta base Radzen */
    --rz-base-background-color:  #0f172a;
    --rz-base-100:               #1e293b;
    --rz-base-200:               #1e293b;
    --rz-base-300:               #334155;
    --rz-base-400:               #475569;
    --rz-text-color:             #f1f5f9;
    --rz-text-secondary-color:   #94a3b8;
    --rz-border-color:           #334155;
    --rz-card-background-color:  #1e293b;
    --rz-input-background-color: #1e293b;
    --rz-info-lighter:           rgba(59, 130, 246, 0.15);

    /* Headings Radzen: --rz-text-h*-color → --rz-text-title-color → --rz-base-900 (#28363c)
       Sobrescreve para que H1–H6 fiquem legíveis em fundo escuro */
    --rz-text-title-color: #f1f5f9;

    /* Primary ajustado — legível como texto E com contraste OK para botões com texto branco */
    --rz-primary:         #d94860;
    --rz-primary-rgb:     217, 72, 96;
    --rz-primary-light:   #e86070;
    --rz-primary-lighter: rgba(217, 72, 96, 0.2);
    --rz-primary-dark:    #b83050;
    --rz-primary-darker:  #9c2040;

    /* Cores semânticas para ReferenciaFramework */
    --ref-blue:  #60a5fa;
    --ref-teal:  #34d399;
    --ref-amber: #fbbf24;
}

/* Header (tem background hardcoded #ffffff) */
[data-theme="dark"] .rz-header {
    background: #1e293b !important;
    border-bottom-color: #334155;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
[data-theme="dark"] .rz-header .rz-button { color: #94a3b8 !important; }
[data-theme="dark"] .rz-header .rz-button:hover {
    color: var(--rz-primary) !important;
    background: rgba(128, 0, 32, 0.12) !important;
}

/* Markdown / Documentação */
[data-theme="dark"] .md-content                       { color: #e2e8f0; }
[data-theme="dark"] .md-content h1,
[data-theme="dark"] .md-content h2                    { color: #f87090; border-bottom-color: #334155; }
[data-theme="dark"] .md-content h3                    { color: #cbd5e1; }
[data-theme="dark"] .md-content h4                    { color: #94a3b8; }
[data-theme="dark"] .md-content blockquote            { border-left-color: #d94860; }
[data-theme="dark"] .md-content blockquote p          { color: #fda4af; }
[data-theme="dark"] .md-content code                  { background: rgba(128,0,32,0.2); color: #fca5a5; }
[data-theme="dark"] .md-content td                    { color: #e2e8f0 !important; border-bottom-color: #334155 !important; }
[data-theme="dark"] .md-content tr:nth-child(odd)  td { background: #0f172a !important; }
[data-theme="dark"] .md-content tr:nth-child(even) td { background: #1e293b !important; }
[data-theme="dark"] .md-content table                 { border-color: #334155 !important; }
[data-theme="dark"] .md-content blockquote            { background: rgba(217,72,96,0.12); }
[data-theme="dark"] .md-content .mermaid-src,
[data-theme="dark"] .md-content .mermaid              { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .md-content .mermaid-src pre      { color: #94a3b8; }
[data-theme="dark"] .md-content a                     { color: #f87171; }
[data-theme="dark"] .md-content hr                    { border-top-color: #334155; }

/* Navegação lateral de documentação */
[data-theme="dark"] .doc-nav-item { color: #64748b; }
[data-theme="dark"] .doc-nav-item:hover { background: rgba(96,0,24,.2) !important; }

/* WhatsApp popup (cores de marca mantidas; apenas fundos brancos trocados) */
[data-theme="dark"] .wa-popup                    { background: #1e293b; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
[data-theme="dark"] .wa-dept-btn                 { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .wa-dept-btn:hover           { background: #0d2b1d; border-color: #25D366; }
[data-theme="dark"] .wa-dept-name                { color: #f1f5f9; }
[data-theme="dark"] .wa-dept-desc,
[data-theme="dark"] .wa-popup-subtitle,
[data-theme="dark"] .wa-status-text              { color: #64748b; }
[data-theme="dark"] .wa-popup-footer             { background: #0f172a; border-top-color: #334155; color: #64748b; }

/* Inputs de autenticação */
[data-theme="dark"] .rz-textbox {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* Tabelas de preços / avulso / legais */
[data-theme="dark"] .avulso-table tr:nth-child(even) td { background: #1e293b; }
[data-theme="dark"] .legal-table  tr:nth-child(even) td { background: #1e293b; }
