/* MEI Portal Design System - Institucional, confiável e limpo */

:root {
    /* Background and layout - Fundo branco */
    --background: 0 0% 100%;
    --foreground: 220 100% 15%;
    /* Azul muito escuro para textos */

    /* Card components */
    --card: 0 0% 100%;
    --card-foreground: 220 100% 15%;

    /* Popovers */
    --popover: 0 0% 100%;
    --popover-foreground: 220 100% 15%;

    /* Primary - Azul gov mais forte */
    --primary: 88 55% 38%;
    --primary-foreground: 0 0% 100%;
    --primary-hover: 88 55% 32%;

    /* Secondary - Azul mais claro */
    --secondary: 88 40% 95%;
    --secondary-foreground: 220 100% 15%;

    /* Muted tones */
    --muted: 210 20% 96%;
    --muted-foreground: 220 100% 15%;

    /* Accent colors */
    --accent: 88 40% 95%;
    --accent-foreground: 220 100% 15%;

    /* Status colors - Verde apenas para PAGOS */
    --success: 142 76% 36%;
    --success-foreground: 0 0% 100%;
    --success-light: 142 60% 95%;

    /* Verde padrão dos botões (cor #7CB342) */
    --button-green: 88 43% 46%;
    --button-green-foreground: 0 0% 100%;

    /* Warning agora é azul para a faixa */
    --warning: 88 50% 40%;
    --warning-foreground: 0 0% 100%;
    --warning-light: 88 45% 94%;

    /* Destructive neutro para EM ABERTO */
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 84% 60%;
    --destructive-light: 0 0% 100%;

    /* Form elements */
    --border: 142 30% 80%;
    --input: 142 30% 80%;
    --ring: 88 55% 38%;

    --radius: 0.5rem;
}

/* Tailwind CSS Variables Support */
.bg-background {
    background-color: hsl(var(--background));
}

.text-foreground {
    color: hsl(var(--foreground));
}

.bg-card {
    background-color: hsl(var(--card));
}

.text-card-foreground {
    color: hsl(var(--card-foreground));
}

.text-primary {
    color: hsl(var(--primary));
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.bg-muted {
    background-color: hsl(var(--muted));
}

.text-destructive {
    color: hsl(var(--destructive));
}

.bg-destructive\/10 {
    background-color: hsl(var(--destructive) / 0.1);
}

.text-success {
    color: hsl(var(--success));
}

.bg-success {
    background-color: hsl(var(--success));
}

.bg-success\/10 {
    background-color: hsl(var(--success) / 0.1);
}

.border-success\/20 {
    border-color: hsl(var(--success) / 0.2);
}

.border-destructive\/20 {
    border-color: hsl(var(--destructive) / 0.2);
}

.border-border {
    border-color: hsl(var(--border));
}

.bg-muted\/30 {
    background-color: hsl(var(--muted) / 0.3);
}

.bg-muted\/50 {
    background-color: hsl(var(--muted) / 0.5);
}

.border-border\/50 {
    border-color: hsl(var(--border) / 0.5);
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}


/* Card notificação / débitos */
.infraction-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.infraction-body {
    padding: 1rem;
}

.card-title-gov {
    font-size: 14px;
    color: #2E7D32;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.card-title-gov i {
    color: #2E7D32;
    font-size: 1em;
    flex-shrink: 0;
}

.card-title-gov.subtitle {
    font-size: 11px;
    color: #666666;
    font-weight: 500;
    margin-top: -8px;
    margin-bottom: 12px;
}

.card-title-gov.subtitle i {
    color: #666666;
}

/* Espaçamento entre blocos */
.quiz-debitos-stack > * {
    margin-bottom: 12px;
}

.quiz-debitos-stack > *:last-child {
    margin-bottom: 0;
}

.notif-head {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px;
    border-left: 4px solid #DC2626;
}

.notif-head p {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* Dados do CNPJ (formato vehicle-card / quiz-1) */
.vehicle-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vehicle-card-body {
    padding: 16px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.vehicle-grid .field {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee;
    font-size: 12px;
}

.vehicle-grid .field:nth-child(odd) {
    border-right: 1px solid #eeeeee;
}

.vehicle-grid .field .f-label {
    color: #666;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.vehicle-grid .field .f-value {
    color: #1B4332;
    font-weight: 600;
    font-size: 13px;
    word-break: break-word;
}

.vehicle-grid .field .f-value.red {
    color: #d93025;
}

.vehicle-grid .field.full {
    grid-column: 1 / -1;
    border-right: none;
}

/* Linhas de débitos: label à esquerda, valor à direita */
.infraction-body .i-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eeeeee;
    font-size: 12px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.infraction-body .i-row:last-child {
    border-bottom: none;
}

.infraction-body .i-row .i-label {
    color: #666666;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 8px;
}

.infraction-body .i-row .i-value {
    color: #1B4332;
    font-weight: 600;
    text-align: right;
    flex: 0 0 auto;
    max-width: 45%;
    word-break: break-word;
}

.infraction-body .i-row .i-value.red {
    color: #d93025;
}

/* Linha TOTAL (estilo quiz-1 débitos pendentes) */
.infraction-body .i-row.i-row-total {
    background: #fff5f5;
    margin: 0 -16px;
    padding: 12px 16px;
    border-bottom: none;
}

.infraction-body .i-row.i-row-total .i-label {
    font-weight: 700;
    color: #374151;
    font-size: 14px;
}

.infraction-body .i-row.i-row-total .i-value {
    font-size: 16px;
    font-weight: 800;
    color: #d93025;
}

/* Consequências / benefícios (formato quiz-1) */
.consequences {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.consequences-body {
    padding: 16px;
}

.consequences-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.consequences-body li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #744210;
    padding: 8px 0;
    border-bottom: 1px solid #fff5e6;
    line-height: 1.5;
}

.consequences-body li:last-child {
    border-bottom: none;
}

.consequences-body li i {
    color: #dd6b20;
    font-size: 10px;
    margin-top: 4px;
    flex-shrink: 0;
}

.consequences-li-text {
    flex: 1;
    min-width: 0;
}

/* Título alinhado ao .info-adicional h4 (sem borda/sombra extra) */
h4.card-title-gov.consequences {
    font-size: 14px;
    color: #2E7D32;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    width: auto;
    max-width: none;
}

h4.card-title-gov.consequences i {
    color: #2E7D32;
}

/* Informações adicionais */
.info-adicional {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px;
}

.info-adicional h4 {
    font-size: 14px;
    color: #2E7D32;
    font-weight: 700;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-adicional ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-adicional ul li {
    font-size: 12px;
    color: #666;
    padding: 6px 0;
    border-bottom: 1px solid #eeeeee;
    line-height: 1.5;
}

.info-adicional ul li:last-child {
    border-bottom: none;
}

/* CTA (quiz-1) */
.cta-section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 16px;
    text-align: center;
}

.cta-section .cta-text {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.cta-section .cta-text strong {
    color: #2E7D32;
}

.btn-regularizar {
    width: 100%;
    min-height: 44px;
    padding: 0 20px;
    background: #7CB342;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 1em;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(46, 100, 227, 0.25);
}

.btn-regularizar:hover {
    background: #5F8F2A;
    box-shadow: 0 4px 12px rgba(46, 100, 227, 0.35);
}

.btn-regularizar:active {
    transform: scale(0.98);
}

.cta-disclaimer {
    font-size: 12px;
    color: #666;
    margin: 12px 0 0 0;
    text-align: center;
    line-height: 1.5;
}

/* Chrome do site (header + footer + modal legal) */

.site-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    overflow: visible;
}

.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 16px;
    overflow: visible;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    max-width: 100%;
    overflow: visible;
}

.site-brand-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: min(420px, 88vw);
    object-fit: contain;
    object-position: left center;
}

.site-main {
    flex: 1 1 auto;
}

.site-footer {
    margin-top: auto;
    background: #14532D;
    color: #d1d5db;
    padding: 28px 16px;
}

.site-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.site-footer-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: #f9fafb;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer-link:hover {
    color: #86EFAC;
}

.site-footer-sep {
    color: #6b7280;
}

.site-footer-note {
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Modal legal (na mesma página) */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.legal-modal {
    width: min(680px, 100%);
    max-height: min(84vh, 820px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.legal-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.legal-modal-close {
    appearance: none;
    border: 0;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #374151;
}

.legal-modal-close:hover {
    background: #e5e7eb;
}

.legal-modal-body {
    padding: 16px 18px 8px;
    overflow: auto;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.55;
}

.legal-modal-body h3 {
    margin: 18px 0 8px;
    font-size: 0.98rem;
    color: #111827;
}

.legal-modal-body p,
.legal-modal-body li {
    margin: 0 0 10px;
}

.legal-modal-body ul {
    margin: 0 0 10px;
    padding-left: 1.2rem;
}

.legal-meta {
    color: #6b7280 !important;
    font-size: 0.85rem !important;
    margin-bottom: 14px !important;
}

.legal-modal-footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

.legal-modal-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: #111827;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.legal-modal-btn:hover {
    background: #1f2937;
}

@media screen and (max-width: 640px) {
    .site-header-inner {
        padding: 12px 14px;
    }

    .site-brand-logo {
        height: 46px;
        max-width: 92vw;
    }

    .site-footer {
        padding: 24px 14px;
    }

    .legal-modal {
        max-height: 90vh;
        border-radius: 12px;
    }
}


.text-blue { color: #2E7D32; }
