/*
 * NUVIK HOST — Refino visual V13
 * Ajustes finos de contraste (WCAG AA), tamanho mínimo de texto,
 * ícone do carrossel e páginas legais. Sem mudanças de layout.
 * Reverter: remover o <link> deste arquivo (ou rodar RESTORE.sh do backup).
 */

/* ---------- 0. Fonte Inter hospedada no próprio site (antes não era carregada) ---------- */
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;
  src:url("/assets/fonts/inter-latin-var.woff2") format("woff2-variations"),url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
html{font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}

/* ---------- 1. Tokens de status e foco acessíveis ---------- */
:root{
  --nv-success:#15803d;   /* 5.0:1 sobre branco (antes 3.1:1) */
  --nv-warning:#a16207;   /* 4.9:1 (antes 3.0:1) */
  --nv-danger:#c0263a;    /* 5.6:1 (antes 4.1:1) */
  --nv-info:#1d5fd6;      /* 5.5:1 (antes 4.0:1) */
  --nv-text-min:12px;
}
/* Telas claras da Central/Admin: anel de foco visível em fundo claro e escuro */
:where(.client-surface,.whmcs-admin-surface,.admin-auth-surface) :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid #1d5fd6;
  outline-offset:2px;
  box-shadow:0 0 0 5px rgba(100,221,255,.45);
}

/* ---------- 2. Home: CTA do carrossel (texto branco 2,97:1 -> 5,1:1) ---------- */
html body:not(#_) .hero-carousel .premium-v4-cta{
  background:linear-gradient(108deg,#0b6fd8 0%,#1d4fe0 94%);
}
html body:not(#_) .hero-carousel .carousel-slide:hover .premium-v4-cta,
html body:not(#_) .hero-carousel .carousel-slide:focus-visible .premium-v4-cta{
  background:linear-gradient(108deg,#0a64c4 0%,#1a46cc 94%);
}

/* ---------- 3. Tamanho mínimo de texto (10–11px -> 12px) ---------- */
html body:not(#_) .premium-v4-eyebrow{font-size:clamp(12px,.92vw,21px)!important;letter-spacing:.12em}
html body:not(#_) .popular-badge{font-size:11.5px;letter-spacing:.06em}
html body:not(#_) .nh-vps-tag{font-size:12px}
html body:not(#_) .nh-vps-annual-price span,
html body:not(#_) .nh-vps-annual-price > :not(strong){font-size:12px}
html body:not(#_) .eyebrow{letter-spacing:.1em}

/* Preço: rótulos com opacidade baixa ficavam apagados */
html body:not(#_) .plan-price span{opacity:.82}
html body:not(#_) .plan-price small{opacity:.82}
html body:not(#_) .plan-annual{opacity:.85}

/* ---------- 4. Barra de confiança (NVMe / SSL / 24/7 / 99,9%) ---------- */
html body:not(#_) .trust-grid span{
  font-size:13.5px;
  color:#c3d0e0;              /* 9,6:1 sobre o navy */
  line-height:1.4;
}
@media(max-width:640px){
  html body:not(#_) .trust-grid span{font-size:13px}
}

/* ---------- 5. Header entre 981px e 1180px: botão "Área do Cliente" não corta ---------- */
@media(min-width:981px) and (max-width:1200px){
  html body:not(#_) .site-header .brand{width:220px!important}
  html body:not(#_) .site-header .brand img{max-height:52px!important}
  html body:not(#_) .header-actions{gap:8px}
  /* "Ver planos" duplica o link "Planos" do menu; some só nesta faixa */
  html body:not(#_) .site-header:has(.primary-nav) .header-actions .btn-primary{display:none}
}

/* ---------- 6. Botão pausar/retomar do carrossel: ícone SVG em vez de glifo "Ⅱ" ---------- */
@media(max-width:640px){
  html body:not(#_) .hero-carousel .carousel-toggle::before{
    content:"";
    width:16px;height:16px;display:block;
    background:currentColor;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4' height='14' rx='1.5'/%3E%3Crect x='14' y='5' width='4' height='14' rx='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4' height='14' rx='1.5'/%3E%3Crect x='14' y='5' width='4' height='14' rx='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  html body:not(#_) .hero-carousel .carousel-toggle[aria-pressed="true"]::before{
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.6v12.8a1 1 0 0 0 1.5.86l10.2-6.4a1 1 0 0 0 0-1.72L9.5 4.74A1 1 0 0 0 8 5.6z'/%3E%3C/svg%3E");
            mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.6v12.8a1 1 0 0 0 1.5.86l10.2-6.4a1 1 0 0 0 0-1.72L9.5 4.74A1 1 0 0 0 8 5.6z'/%3E%3C/svg%3E");
  }
}

/* ---------- 7. Páginas legais (Termos, Privacidade, Proposta) ---------- */
html body:not(#_) .legal-page p,
html body:not(#_) .legal-page li{
  font-size:16.5px;
  line-height:1.75;
  color:#c3d0e0;
  max-width:72ch;
}
html body:not(#_) .legal-page h2{letter-spacing:-.015em;color:#fff}
html body:not(#_) .legal-page a{color:#7fd8ff;text-underline-offset:3px}

/* ---------- 8. Ícone de check (substitui o caractere ✓) ---------- */
.nv-check{display:inline-block;width:1em;height:1em;vertical-align:-.14em;flex:none}

/* ---------- 9. Central do Cliente: rodapé, etiquetas e login ---------- */
/* Rodapé claro: texto 2,4–2,9:1 e 10px -> 6,2:1 e 12px */
html body.client-v3-surface:not(#_) :is(.client-v3-footer,.client-v3-footer span,.client-v3-footer strong,.client-v3-footer a,.nuvik-legal-contact,.nuvik-legal-contact a){
  color:#526176;font-size:12px;line-height:1.6;
}
html body.client-v3-surface:not(#_) .client-v3-footer a:hover{color:#1d5fd6}
/* Etiquetas (eyebrow) da Central: 10–11px -> 12px */
html body.client-v3-surface:not(#_) .eyebrow{font-size:12px!important;letter-spacing:.1em}
/* Divisor "ou entre/cadastre-se com e-mail": 4,2:1 -> 5,3:1 */
html body:not(#_) .social-google-divider span{color:#5b6b80}
/* Cabeçalho de tabela de preços de domínio */
html body.client-v3-surface:not(#_) th{color:#55677d!important}
/* Login da Central / Admin: textos de 9–11px */
html body:not(#_) .client-login-v3-heading span{font-size:12px!important;letter-spacing:.1em!important}
html body:not(#_) .client-login-v3-heading p{font-size:14px!important;line-height:1.55!important}
html body:not(#_) .client-login-v3-kicker{font-size:12px!important;letter-spacing:.12em!important}
html body:not(#_) .client-login-v3-badge{font-size:12px!important}

/* ---------- 10. Rodapé da home: logo branca (o style inline era bloqueado pela CSP) ---------- */
html body:not(#_) .footer-brand img{filter:brightness(0) invert(1);width:320px;max-width:100%;height:auto;max-height:none;object-fit:contain}

/* ---------- 11. Botão flutuante do WhatsApp ---------- */
.nv-wa{position:fixed;left:16px;bottom:16px;z-index:1080;display:flex;flex-direction:column;align-items:flex-start;gap:10px;font-family:var(--nv-font-sans)}
.nv-wa-toggle{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:10px 18px 10px 14px;border:0;border-radius:999px;background:#0f7a5c;color:#fff;font-size:15px;font-weight:700;line-height:1;cursor:pointer;box-shadow:0 12px 32px rgba(0,0,0,.35)}
.nv-wa-toggle:hover{background:#0c6a50}
.nv-wa-toggle svg{flex:none}
.nv-wa-popup{width:min(320px,calc(100vw - 32px));padding:18px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:#0d2340;color:#f8fafc;box-shadow:0 24px 60px rgba(0,0,0,.45)}
.nv-wa-popup[hidden]{display:none}
.nv-wa-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.nv-wa-head strong{font-size:16px;line-height:1.3}
.nv-wa-close{display:inline-grid;place-items:center;width:32px;height:32px;margin:-6px -6px 0 0;border:0;border-radius:8px;background:transparent;color:#c3d0e0;cursor:pointer}
.nv-wa-close:hover{background:rgba(255,255,255,.08);color:#fff}
.nv-wa-popup p{margin:0 0 14px;font-size:14px;line-height:1.55;color:#c3d0e0}
.nv-wa-cta{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:10px 16px;border-radius:10px;background:#0f7a5c;color:#fff;font-weight:700;font-size:15px;text-decoration:none}
.nv-wa-cta:hover{background:#0c6a50;color:#fff}
.nv-wa :focus-visible{outline:3px solid #64ddff;outline-offset:3px}
@media(max-width:640px){.nv-wa{left:12px;bottom:12px}.nv-wa-toggle{min-height:44px;padding:9px 14px 9px 12px;font-size:14px}}
@media(prefers-reduced-motion:no-preference){.nv-wa-popup{animation:nvWaIn .18s ease-out}@keyframes nvWaIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}}

/* ---------- 12. Estilos que estavam inline (bloqueados pela CSP) ---------- */
.nv-mt-14{margin-top:14px!important}.nv-mt-18{margin-top:18px!important}.nv-mt-25{margin-top:25px!important}.nv-mb-18{margin-bottom:18px!important}
.nv-pair-card{max-width:740px!important;margin:24px auto!important;padding:28px!important}
.nv-form-divider{margin-bottom:24px!important;padding-bottom:22px!important;border-bottom:1px solid #dce5ef!important}
.nv-panel-foot{padding:14px 20px;border-top:1px solid #e5ebf3}

/* ---------- 13. Área logada da Central: legibilidade ---------- */
/* Subtítulo das páginas: 12px e 3,6:1 -> 14px e 6,2:1 */
html body.client-v3-surface:not(#_) .page-subtitle{font-size:14px!important;color:#526176!important;line-height:1.55!important}
/* Dicas de formulário (ex.: tipos de anexo): 11px e 2,1:1 -> 12px e 5,3:1 */
html body.client-v3-surface:not(#_) .field small,html body.client-v3-surface:not(#_) form small{font-size:12px!important;color:#5b6b80!important}
/* Datas de comunicados e notificações */
html body.client-v3-surface:not(#_) .announcement-card-head time,html body.client-v3-surface:not(#_) small.muted{font-size:12px!important;color:#5b6b80!important}
/* Links de texto ("Abrir", "Detalhes", "Gerenciar"): 4,2:1 -> 5,5:1 */
html body.client-v3-surface:not(#_) a.text-link{color:#1d5fd6!important}
/* Etiquetas e textos da página de domínios */
html body.client-v3-surface:not(#_) .nvk-hdp-eyebrow{font-size:12px!important;color:#1d5fd6!important}
html body.client-v3-surface:not(#_) .nvk-domains-renew-note{color:#526176!important}
/* Faixa de comunicado no painel: rótulo de 8px e link de 11px */
html body.client-v3-surface:not(#_) .client-announcement-banner small{font-size:11px!important;letter-spacing:.1em}
html body.client-v3-surface:not(#_) .client-announcement-banner b{font-size:12.5px!important}

/* ---------- 14. Seção de certificado digital ---------- */
html body:not(#_) .cert-section{padding-top:24px}
html body:not(#_) .cert-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
html body:not(#_) .cert-section .plan-price small{font-size:14px;opacity:.82}
@media(max-width:980px){html body:not(#_) .cert-grid{grid-template-columns:1fr}}

/* ---------- 15. Módulo de certificado digital (Central do Cliente) ---------- */
.cert-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;align-items:stretch}
.cert-choice{position:relative;display:flex;flex-direction:column;gap:10px}
.cert-choice h2{margin:0;font-size:22px;letter-spacing:-.02em}
.cert-choice .clean-list{margin:4px 0 6px}
.cert-choice .price{margin-top:auto;font-size:28px;font-weight:800;letter-spacing:-.03em}
.cert-choice .price small{font-size:14px;font-weight:600;color:#5b6b80;margin-left:4px}
.cert-choice.is-featured{border-color:#1d5fd6;box-shadow:0 0 0 1px #1d5fd6,0 18px 40px rgba(29,95,214,.14)}
.cert-flag{position:absolute;top:16px;right:16px;padding:4px 10px;border-radius:999px;background:#e7efff;color:#1d4fb8;font-size:12px;font-weight:700}
.cert-checkout{align-items:start}
.cert-form{display:grid;gap:14px}
.cert-form .check{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.5;color:#334155}
.cert-form .check input{margin-top:3px;flex:none}
.cert-summary .summary-list{margin:16px 0}
.cert-summary .cert-total strong{font-size:22px}
.cert-steps{margin:0;padding-left:20px;display:grid;gap:6px;font-size:14px;line-height:1.5;color:#475569}
.cert-list{display:grid;gap:16px}
.cert-item h2{margin:0 0 4px;font-size:19px}
.cert-progress{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0;padding:0}
.cert-progress li{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#f3f6fb;color:#5b6b80;font-size:13px;font-weight:600}
.cert-progress li span{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:#dfe6f1;color:#334155;font-size:12px;flex:none}
.cert-progress li.is-done{background:#e8f6ee;color:#14633b}
.cert-progress li.is-done span{background:#15803d;color:#fff}
.cert-progress li.is-current{background:#e7efff;color:#1d4fb8}
.cert-progress li.is-current span{background:#1d5fd6;color:#fff}
.cert-details{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
@media(max-width:900px){.cert-choice-grid{grid-template-columns:1fr}.cert-progress{grid-template-columns:1fr 1fr}}
.cert-choice .clean-list li,.cert-summary .clean-list li{color:#475569}
.cert-form .check{display:grid;grid-template-columns:18px 1fr;gap:10px;align-items:start}
.cert-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px 20px}
.cert-details>div{display:flex;flex-direction:column;gap:2px;border:0;padding:0}
.cert-details dt{font-size:12px;color:#5b6b80;text-transform:uppercase;letter-spacing:.06em}
.cert-details dd{margin:0;font-weight:600;color:#0f172a;word-break:normal;overflow-wrap:anywhere}
/* Carrinho de certificado: barra de etapas e bloco de login */
.cert-cart-steps{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 20px;padding:0}
.cert-cart-steps li{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #e2e8f0;color:#5b6b80;font-size:13px;font-weight:600}
.cert-cart-steps li span{display:grid;place-items:center;width:24px;height:24px;border-radius:999px;background:#e2e8f0;color:#334155;font-size:12px;flex:none}
.cert-cart-steps li.is-done{color:#14633b;border-color:#bfe3cd;background:#f1faf4}
.cert-cart-steps li.is-done span{background:#15803d;color:#fff}
.cert-cart-steps li.is-current{color:#1d4fb8;border-color:#b9cdf6;background:#f1f5ff}
.cert-cart-steps li.is-current span{background:#1d5fd6;color:#fff}
.cert-auth{margin-top:20px;padding:20px;border-radius:14px;background:#f1f5ff;border:1px solid #d6e2fb}
.cert-auth h2{margin:4px 0 6px;font-size:19px}
.cert-confirm{margin-top:20px}
.cert-login-hint{margin:14px 0 0;font-size:13px}
@media(max-width:700px){.cert-cart-steps{grid-template-columns:1fr 1fr}}
.cert-choice .eyebrow{text-transform:uppercase;letter-spacing:.1em}
.cert-choice>.muted{margin:0}

/* 21. Fase 1 (22/11): titulos de cartao e rodape viram h2 sem mudar o visual; contador de certificados no admin */
html body:not(#_) .login-card h2.nv-card-title{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:24px;font-weight:700;line-height:38.4px;letter-spacing:-.72px;color:#172b46;margin:0 0 7px;text-align:center;max-width:none}
html body:not(#_) .signup-head h2.nv-card-title{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:29px;font-weight:780;line-height:33.35px;letter-spacing:-1.16px;color:#172b46;margin:7px 0 9px;text-align:left;max-width:none}
html body:not(#_) .footer-grid h2.nv-footer-title{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;font-weight:700;line-height:22.4px;letter-spacing:.56px;text-transform:uppercase;color:#e9f3ff;margin:0 0 16px;max-width:none}
html body:not(#_) .admin-v38-metrics .metric-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
@media(max-width:1050px){html body:not(#_) .admin-v38-metrics .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:620px){html body:not(#_) .admin-v38-metrics .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* 22. Contraste (22/11): correcoes da auditoria automatica WCAG AA */
/* Admin: "Atendimentos recentes" herdava o fundo escuro do .notice da Central; volta a ser lista clara como o resto do painel */
html:not(#_) body.whmcs-admin-surface .notice,html:not(#_) body .whmcs-admin-surface .notice{background:transparent!important;border:0!important;border-bottom:1px solid #edf0f2!important;border-radius:0!important;box-shadow:none!important}
html:not(#_) body.whmcs-admin-surface .notice span,html:not(#_) body .whmcs-admin-surface .notice span{color:#5f6b7a!important}
html:not(#_) body.whmcs-admin-surface .quick-action small,html:not(#_) body .whmcs-admin-surface .quick-action small{opacity:1!important;color:#5f6b7a!important}
/* Central: rotulo azul de topo um tom mais escuro (4,3:1 -> 6:1) */
html body:not(#_) .page-toolbar .eyebrow{color:#0f56cc}
/* VPS: botao do plano em destaque e hover (3,6:1 -> 5,3:1) */
html body:not(#_) .nh-vps-card.is-featured .nh-vps-button{background:linear-gradient(115deg,#1160c9,#0d6cc2)}
html body:not(#_) .nh-vps-card .nh-vps-button:hover{background:#0f63bf}
/* Paginas legais: rodape e botao "Area do Cliente" */
html body:not(#_):not(.premium-home) .footer-bottom{color:#8a9bb0}
html body:not(#_):not(.premium-home) .header-actions .btn-primary{background:linear-gradient(135deg,#1597d6,#2160e6 55%,#7c3aed);text-shadow:0 1px 1px rgba(0,0,0,.18)}
/* Central do cliente, painel inicial: rotulos azuis e textos cinza secundarios um tom mais escuros (3,9-4,3:1 -> 5,5:1+) */
html body.client-surface:not(#_) .eyebrow,html body:not(#_) .dashboard-v2-kicker{color:#0f56cc!important}
html body:not(#_) .dashboard-v2-priority-copy>p,html body:not(#_) .dashboard-v2-next-service>span,html body:not(#_) .dashboard-v2-service-main>span,html body:not(#_) .dashboard-v2-service-meta>span{color:#4f6479}
/* Botao "Criar conta" do topo (visitante) e avatar do admin: azul um tom mais escuro com texto branco (3,1-4,2:1 -> 5,4:1) */
html body:not(#_) .nav nav a.guest-cta{background:linear-gradient(135deg,#1560e0,#2f55e6)!important;color:#fff!important}
html body:not(#_) .nav nav a.guest-cta:hover{background:linear-gradient(135deg,#0f52c4,#2747cc)!important;color:#fff!important}
html:not(#_) body .whmcs-avatar{background:#1a62e0!important;color:#fff!important}
