/* Estilos MVP - layout simples e responsivo */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

.header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary);
    text-decoration: none;
}

.nav { display: flex; gap: 1rem; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.nav a:hover { color: var(--primary); }
.nav-user { color: var(--muted); font-size: 0.875rem; }

.main { padding: 2rem 1rem; }

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card h2 { margin-bottom: 1rem; font-size: 1.25rem; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}
.form-group textarea { min-height: 80px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-google { background: #fff; color: var(--text); border: 1px solid var(--border); width: 100%; }
.btn-google:hover { background: #f1f5f9; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-warning { background: #fefce8; color: var(--warning); border: 1px solid #fef08a; }
.alert-info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

.login-card { max-width: 420px; margin: 2rem auto; }
.divider { text-align: center; margin: 1.25rem 0; color: var(--muted); font-size: 0.875rem; }

.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.foto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--border);
}

.foto-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.foto-meta p { margin-bottom: 0.25rem; }
.foto-comentario { margin-top: 0.5rem; font-size: 0.9rem; }

.link-copy {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.link-copy input { flex: 1; font-size: 0.85rem; }

.actions { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* Captura PWA */
.captura-page { max-width: 480px; margin: 0 auto; }

.camera-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.camera-preview video,
.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 0.9rem;
}

.status-bar {
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-online { background: #f0fdf4; color: var(--success); }
.status-offline { background: #fefce8; color: var(--warning); }
.status-syncing { background: #eff6ff; color: var(--primary); }
.status-local { background: #fef3c7; color: #92400e; }
.status-sent { background: #f0fdf4; color: var(--success); }

.geo-info {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: var(--radius);
}

.pending-list { margin-top: 1.5rem; }
.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-local { background: #fef3c7; color: #92400e; }
.badge-syncing { background: #dbeafe; color: var(--primary); }
.badge-sent { background: #dcfce7; color: var(--success); }
.badge-error { background: #fef2f2; color: var(--danger); }

@media (max-width: 600px) {
    .main { padding: 1rem 0.75rem; }
    .foto-grid { grid-template-columns: 1fr; }
    .admin-table { font-size: 0.8rem; }
    .admin-form-inline { flex-direction: column; align-items: stretch; }
}

/* Admin */
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table th,
.admin-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.admin-table th { font-weight: 600; background: #f1f5f9; }
.admin-form-inline {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
}
.admin-form-inline select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.badge-nivel-1 { background: #ede9fe; color: #6d28d9; }
.badge-nivel-2 { background: #dbeafe; color: #1d4ed8; }
.badge-nivel-3 { background: #f1f5f9; color: #475569; }
.badge-status-aprovado { background: #dcfce7; color: #16a34a; }
.badge-status-pendente { background: #fef3c7; color: #92400e; }
.badge-status-bloqueado { background: #fef2f2; color: #dc2626; }

/* Página inicial — site de apresentação */
.body-landing {
    background: #f8fafc;
}

html:has(.body-landing) {
    scroll-behavior: smooth;
}

.body-landing #acesso,
.body-landing #recursos,
.body-landing #como-funciona {
    scroll-margin-top: 5rem;
}

.body-landing .landing-main {
    max-width: none;
    padding: 0;
}

.header-landing {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.nav-landing {
    gap: 1.5rem;
}

.nav-landing a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

.nav-landing a:hover {
    color: var(--primary);
}

.nav-landing .nav-cta {
    background: var(--primary);
    color: #fff !important;
    padding: 0.45rem 1rem;
    border-radius: 999px;
}

.nav-landing .nav-cta:hover {
    background: var(--primary-dark);
    color: #fff !important;
}

/* Hero */
.site-hero {
    position: relative;
    overflow: hidden;
    background: #f8fafc;
}

.site-hero-wrap {
    display: grid;
    grid-template-columns: minmax(260px, 44%) minmax(0, 56%);
    max-width: 1400px;
    margin: 0 auto;
    min-height: 560px;
}

.site-hero-media {
    position: relative;
    margin: 0;
    min-height: 280px;
    overflow: hidden;
}

.site-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: left center;
}

.site-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 55%, rgba(248, 250, 252, 0.92) 88%, #f8fafc 100%);
    pointer-events: none;
}

.site-hero-side {
    display: flex;
    align-items: center;
    padding: 2.5rem 1.25rem 3rem 0.5rem;
}

.site-hero-bg {
    display: none;
}

.site-hero-grid {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

.site-hero-copy {
    padding-top: 0.5rem;
}

.landing-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1e40af;
    background: rgba(219, 234, 254, 0.9);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(147, 197, 253, 0.5);
}

.landing-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.landing-lead {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 1.75rem;
    max-width: 560px;
    line-height: 1.7;
}

.site-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.btn-ghost:hover {
    background: #eff6ff;
}

.site-hero-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-hero-highlights li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: #64748b;
}

.site-highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.site-highlight-icon svg {
    display: block;
}

/* Login panel */
.landing-login {
    position: sticky;
    top: 5rem;
}

.login-panel {
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 0;
}

.login-panel-header h2 {
    margin-bottom: 0.25rem;
    font-size: 1.35rem;
}

.login-panel-sub {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.login-panel-note {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.55;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.login-detail {
    font-size: 0.8rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-google-icon {
    flex-shrink: 0;
}

/* Stats strip */
.site-strip {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
}

.site-strip-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.site-strip-item strong {
    display: block;
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

.site-strip-item span {
    font-size: 0.82rem;
    color: var(--muted);
}

/* Sections */
.site-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

.site-section-alt {
    background: #fff;
    max-width: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.site-section-alt > .site-section-head,
.site-section-alt > .site-steps {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.site-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.site-section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.site-section-head h2 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    color: #0f172a;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-section-desc {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Feature cards */
.site-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.site-feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.site-feature-card:hover {
    box-shadow: 0 8px 30px -8px rgba(15, 23, 42, 0.1);
    border-color: #cbd5e1;
}

.site-feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.site-feature-icon svg {
    display: block;
}

.site-feature-icon-blue { background: #dbeafe; color: #2563eb; }
.site-feature-icon-green { background: #dcfce7; color: #16a34a; }
.site-feature-icon-purple { background: #ede9fe; color: #7c3aed; }
.site-feature-icon-amber { background: #fef3c7; color: #d97706; }
.site-feature-icon-teal { background: #ccfbf1; color: #0d9488; }
.site-feature-icon-indigo { background: #e0e7ff; color: #4f46e5; }

.site-feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.site-feature-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

/* Steps */
.site-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    counter-reset: none;
}

.site-step-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.site-step-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: #0f172a;
}

.site-step-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

/* Pillars */
.site-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.site-pillar {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.site-pillar h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
}

.site-pillar p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

/* CTA band */
.site-cta {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #4f46e5 100%);
    padding: 3rem 1.25rem;
}

.site-cta-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-cta h2 {
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    margin-bottom: 0.4rem;
}

.site-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0;
}

.btn-light {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.btn-light:hover {
    background: #eff6ff;
}

/* Footer landing */
.footer-landing {
    background: #0f172a;
    color: #94a3b8;
    border-top: none;
    padding: 0;
    text-align: left;
}

.footer-landing-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    padding: 3rem 1rem 2rem;
}

.footer-brand strong {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links strong {
    color: #e2e8f0;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links span {
    font-size: 0.875rem;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.25rem 1rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    margin: 0;
}

/* Legacy landing classes (dashboard pending) */
.landing-features {
    list-style: none;
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.landing-features li {
    padding-left: 1rem;
    border-left: 3px solid var(--primary);
}

.landing-features strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.landing-features span {
    font-size: 0.875rem;
    color: var(--muted);
}

.landing-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.landing-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
}

.landing-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .site-hero-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .site-hero-media {
        max-height: 280px;
    }

    .site-hero-media::after {
        background: linear-gradient(180deg, transparent 40%, rgba(248, 250, 252, 0.95) 100%);
    }

    .site-hero-side {
        padding: 0 1.25rem 2.5rem;
    }

    .site-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-login {
        position: static;
        order: -1;
    }

    .landing-lead {
        max-width: none;
    }
}

@media (max-width: 960px) {
    .site-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-steps {
        grid-template-columns: 1fr;
    }

    .site-pillars {
        grid-template-columns: 1fr;
    }

    .footer-landing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .site-hero-media {
        max-height: 220px;
    }

    .site-hero-side {
        padding: 0 1rem 2rem;
    }

    .nav-landing {
        gap: 0.75rem;
    }

    .nav-landing a:not(.nav-cta) {
        display: none;
    }

    .site-strip-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .site-features-grid {
        grid-template-columns: 1fr;
    }

    .site-section {
        padding: 2.5rem 1rem;
    }

    .site-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .site-cta .btn-light {
        width: 100%;
    }
}

/* Banners de status (aprovação / boas-vindas) */
.status-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.status-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.9;
}

.status-banner-icon svg {
    display: block;
}

.status-banner strong {
    display: block;
    margin-bottom: 0.25rem;
}

.status-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.status-banner-pending {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.status-banner-welcome {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.coming-soon-box {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.coming-soon-box h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.coming-soon-box ul {
    margin: 0 0 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.coming-soon-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
    font-style: italic;
}
