/* Visual da Via Vale Sistemas — mesmas cores e fonte do agenda-vvs (cores extraídas do logo). */

:root {
    --slate: #2C3A49;
    --slate-dark: #212C38;
    --green: #35D159;
    --green-dark: #1E9E3F;
    --green-light: #E7F9EC;
    --blue: #496AE2;
    --blue-dark: #354FB8;
    --blue-light: #ECEFFC;
    --amber-light: #FEF3C7;
    --amber-dark: #92400E;
    --red: #DC2626;
    --red-light: #FEE2E2;

    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;

    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    font-family: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-100);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--blue-dark);
}

h1, h2, h3 {
    line-height: 1.25;
    color: var(--slate);
    margin: 0;
}

.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

/* ---------- Cabeçalho ---------- */

.topo {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--slate);
    border-bottom: 4px solid var(--green);
}

.topo .container {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topo-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.topo-logo img {
    height: 3rem;
    width: auto;
}

.topo-nav {
    display: none;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.topo-nav a {
    color: var(--gray-300);
    text-decoration: none;
}

.topo-nav a:hover {
    color: #fff;
}

@media (min-width: 768px) {
    .topo-nav { display: flex; }
}

/* ---------- Botões ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-verde {
    background: var(--green);
    color: var(--slate-dark);
}

.btn-verde:hover {
    background: var(--green-dark);
    color: #fff;
}

.btn-azul {
    background: var(--blue);
    color: #fff;
}

.btn-azul:hover {
    background: var(--blue-dark);
}

.btn-contorno {
    border-color: var(--slate);
    color: var(--slate);
    background: #fff;
}

.btn-contorno:hover {
    background: var(--slate);
    color: #fff;
}

.btn-contorno-claro {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.btn-contorno-claro:hover {
    background: #fff;
    color: var(--slate);
}

.btn:focus-visible,
.topo-nav a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* ---------- Seções ---------- */

.secao {
    padding: 3.5rem 0;
}

.secao-branca {
    background: #fff;
}

.secao-titulo {
    font-size: 1.75rem;
    font-weight: 600;
}

.secao-sub {
    margin: 0.5rem 0 0;
    color: var(--gray-600);
    max-width: 40rem;
}

.etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ---------- Destaque (hero) ---------- */

.hero {
    padding: 3rem 0 3.5rem;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}

.hero .container {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    margin-top: 1rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hero h1 span {
    color: var(--blue);
}

.hero-texto {
    margin: 1rem 0 0;
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 34rem;
}

.hero-acoes {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-nota {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.hero-imagem {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.25rem;
}

.celular {
    width: 15rem;
    padding: 0.5rem;
    border-radius: 2rem;
    background: var(--slate-dark);
    box-shadow: 0 20px 40px rgba(33, 44, 56, 0.25);
}

.celular img {
    border-radius: 1.5rem;
}

.qr-card {
    display: none;
    width: 10rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.qr-card img {
    margin: 0 auto 0.5rem;
}

@media (min-width: 640px) {
    .qr-card { display: block; }
}

@media (min-width: 900px) {
    .hero { padding: 4.5rem 0; }
    .hero .container { grid-template-columns: 1.1fr 1fr; }
    .hero h1 { font-size: 2.75rem; }
}

/* ---------- Recursos ---------- */

.grade-recursos {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .grade-recursos { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grade-recursos { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.recurso {
    border-left: 4px solid var(--green);
}

.recurso:nth-child(even) {
    border-left-color: var(--blue);
}

.recurso-icone {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--green-light);
    color: var(--green-dark);
}

.recurso:nth-child(even) .recurso-icone {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.recurso-icone svg {
    width: 1.5rem;
    height: 1.5rem;
}

.recurso h3 {
    margin-top: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

.recurso p {
    margin: 0.375rem 0 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

/* ---------- Galeria de telas ---------- */

.galeria {
    margin-top: 2rem;
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.25rem 1.25rem;
}

.galeria figure {
    margin: 0;
    flex: 0 0 13rem;
    scroll-snap-align: start;
}

.galeria img {
    border-radius: 1.25rem;
    border: 6px solid var(--slate-dark);
    box-shadow: var(--shadow);
}

@media (min-width: 1100px) {
    .galeria { overflow-x: visible; justify-content: space-between; }
    .galeria figure { flex: 1 1 0; }
}

/* ---------- Histórico de atualizações ---------- */

.linha-tempo {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
    max-width: 48rem;
}

.versao {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-300);
}

.versao-atual {
    border-left-color: var(--green);
}

.versao summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.versao summary::-webkit-details-marker {
    display: none;
}

.versao summary:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: -3px;
    border-radius: var(--radius-lg);
}

.versao-nome {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--slate);
}

.versao-nome .etiqueta {
    margin-left: 0.5rem;
    vertical-align: 0.1em;
}

.versao-codigo {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 400;
}

.versao-seta {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-500);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.versao[open] .versao-seta {
    transform: rotate(180deg);
}

.versao-corpo {
    padding: 0 1.5rem 1.5rem;
    display: grid;
    gap: 1rem;
}

.grupo-titulo {
    display: inline-block;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.grupo-novidades .grupo-titulo { background: var(--green-light); color: var(--green-dark); }
.grupo-correcoes .grupo-titulo { background: var(--amber-light); color: var(--amber-dark); }
.grupo-melhorias .grupo-titulo { background: var(--blue-light); color: var(--blue-dark); }

.grupo ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--gray-700);
}

.grupo li + li {
    margin-top: 0.25rem;
}

.vazio {
    margin-top: 2rem;
    color: var(--gray-500);
}

/* ---------- Chamada final para download ---------- */

.cta {
    background: var(--slate);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    display: grid;
    gap: 2rem;
    align-items: center;
    border-bottom: 4px solid var(--green);
}

.cta h2 {
    color: #fff;
    font-size: 1.75rem;
}

.cta p {
    margin: 0.5rem 0 0;
    color: var(--gray-300);
}

.cta .hero-acoes {
    margin-top: 1.5rem;
}

.cta-qr {
    justify-self: center;
    background: #fff;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
    .cta { grid-template-columns: 1fr auto; padding: 2.5rem 3rem; }
}

/* ---------- Rodapé ---------- */

.rodape {
    background: var(--slate-dark);
    color: var(--gray-300);
    font-size: 0.875rem;
    padding: 1.5rem 0;
    margin-top: 3.5rem;
}

.rodape .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
}

.rodape a {
    color: var(--gray-300);
}

/* ---------- Painel administrativo ---------- */

.admin-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.admin-main h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-main > p {
    margin: 0.25rem 0 0;
    color: var(--gray-600);
}

.form {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.25rem;
}

.form-linha {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .form-linha { grid-template-columns: 1fr 1fr; }
}

.campo label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.campo small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.campo input[type="text"],
.campo input[type="password"],
.campo input[type="number"],
.campo textarea {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

.campo textarea {
    resize: vertical;
    min-height: 6rem;
}

.campo input:focus,
.campo textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-light);
}

.campo input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.75rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-50);
    font: inherit;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.alerta {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    border-left: 4px solid;
}

.alerta-sucesso { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }
.alerta-erro { background: var(--red-light); color: #991B1B; border-color: var(--red); }

.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.tabela th,
.tabela td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.tabela th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    font-weight: 600;
}

.tabela tr:last-child td {
    border-bottom: 0;
}

.tabela-rolagem {
    overflow-x: auto;
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem 1rem;
}

.login-caixa {
    width: 100%;
    max-width: 24rem;
}

.login-caixa .topo-logo {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-caixa .topo-logo img {
    height: 5rem;
}

.login-caixa .card {
    border-top: 4px solid var(--green);
}

.login-caixa h1 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.login-caixa .btn {
    width: 100%;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
