@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    background: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 20px 0;
}

.container {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    max-width: 720px;
    width: 100%;
    padding: 44px 48px;
    position: relative;
}

.logo-wrap {
    text-align: center;
    margin-bottom: 12px;
    padding-top: 12px;
}

.logo {
    height: 52px;
    width: auto;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 36px;
    font-size: 0.9em;
}

.step {
    background: #fafafa;
    border-left: 3px solid #111;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.step-number {
    display: inline-block;
    background: #111;
    color: #fff;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 26px;
    margin-right: 10px;
    font-weight: 700;
    font-size: 13px;
}

.step h3 {
    display: inline-block;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.input-group {
    margin-top: 4px;
}

/* Botão de upload */
.btn-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #5d5858;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    justify-content: center;
    margin-bottom: 14px;
}

.btn-upload:hover   { background: #3e3b3b; }
.btn-upload:disabled { background: #aaa; cursor: default; }

/* Info do arquivo */
.file-info {
    padding: 14px 16px;
    background: #f5f5f5;
    border-left: 3px solid #ccc;
    font-size: 13px;
    color: #222;
    line-height: 2;
}

.file-info-row   { display: flex; gap: 8px; }
.file-info-label { color: #999; min-width: 90px; flex-shrink: 0; font-size: 12px; }
.file-info-value { font-weight: 600; color: #111; }

.link-alterar {
    font-size: 11px;
    color: #555;
    font-weight: 400;
    text-decoration: underline;
    margin-left: 6px;
}
.link-alterar:hover { color: #111; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.open { display: flex; }

.modal {
    background: #fff;
    padding: 32px;
    width: 380px;
    max-width: 95vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.modal h2 {
    color: #111;
    margin-bottom: 6px;
    font-size: 1.1em;
    font-weight: 700;
}

.modal .modal-sub {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 20px;
}

.year-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.year-nav button {
    background: none;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    transition: border-color 0.15s;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
}

.year-nav button:hover    { border-color: #111; }
.year-nav button:disabled { color: #ccc; border-color: #eee; cursor: default; }

.year-label {
    font-weight: 700;
    font-size: 1.05em;
    color: #111;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.month-btn {
    padding: 8px 4px 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    cursor: pointer;
    color: #333;
    transition: all 0.12s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}

.month-btn .month-name  { font-weight: 600; }
.month-btn .month-count { font-size: 10px; color: #aaa; }

.month-btn:hover:not(:disabled) { border-color: #111; color: #111; }
.month-btn:hover:not(:disabled) .month-count { color: #555; }

.month-btn.selected {
    background: #111;
    color: #fff;
    border-color: #111;
}
.month-btn.selected .month-count { color: rgba(255,255,255,0.6); }

.month-btn:disabled { color: #ccc; border-color: #f0f0f0; cursor: default; }
.month-btn:disabled .month-count { color: #ddd; }

/* Custo no modal */
#modalCusto {
    background: #f5f5f5;
    border-left: 3px solid #ccc;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.modal-custo-label   { font-size: 11px; color: #aaa; margin-bottom: 2px; }
.modal-custo-valor   { font-size: 1.5em; font-weight: 800; color: #111; }
.modal-custo-detalhe { font-size: 11px; color: #aaa; margin-top: 2px; }

.modal-select-all {
    font-size: 12px;
    color: #555;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-bottom: 12px;
    display: block;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
}
.modal-select-all:hover { color: #111; }

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    cursor: pointer;
    border: none;
}

.btn-cancel          { background: #eee; color: #555; font-family: 'Google Sans', 'Segoe UI', sans-serif; font-size: 13px; font-weight: 600; border: none; cursor: pointer; padding: 9px 20px; }
.btn-cancel:hover    { background: #ddd; }
.btn-confirm         { background: #5d5858; color: #fff; font-family: 'Google Sans', 'Segoe UI', sans-serif; font-size: 13px; font-weight: 600; border: none; cursor: pointer; padding: 9px 20px; }
.btn-confirm:hover   { background: #3e3b3b; }
.btn-confirm:disabled { background: #ccc; cursor: default; }

/* Botão principal */
.button {
    background: #00A859;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background 0.15s;
    letter-spacing: 0.2px;
}

.button:hover    { background: #008f4b; }
.button:active   { background: #00763e; }
.button:disabled { background: #bbb; cursor: not-allowed; }

/* Progresso */
.progress {
    display: none;
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #111;
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0;
}

.progress-label {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* Log */
.log {
    display: none;
    margin-top: 20px;
    background: #f8f8f8;
    padding: 14px;
    max-height: 280px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-left: 3px solid #ddd;
}

.log-item {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.log-item:last-child { border-bottom: none; }

.success { color: #2e7d32; font-weight: 700; }
.error   { color: #c62828; }
.info    { color: #555; }

/* Alertas */
.alert {
    padding: 14px 16px;
    margin-top: 20px;
    display: none;
    font-size: 14px;
    border-left: 3px solid;
}

.alert-success { background: #f1f8f2; color: #2e7d32; border-color: #2e7d32; }
.alert-error   { background: #fdf3f3; color: #c62828; border-color: #c62828; }
.alert-info    { background: #f3f7fd; color: #1565c0; border-color: #1565c0; }

.cost-estimate { display: none; }

/* Download */
.download-link {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.download-link a {
    display: inline-block;
    background: #5d5858;
    color: #fff;
    padding: 13px 32px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.15s;
}

.download-link a:hover { background: #3e3b3b; }

/* Spinner */
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    display: none;
    border: 3px solid #eee;
    border-top: 3px solid #111;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

/* Modal de pagamento */
.pag-valor {
    text-align: center;
    font-size: 2em;
    font-weight: 800;
    color: #111;
    margin: 12px 0 4px;
}

.pag-sub {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 16px;
}

.pag-qr {
    display: block;
    margin: 0 auto 12px;
    width: 180px;
    height: 180px;
}

.pag-copia {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 11px;
    font-family: monospace;
    color: #333;
    resize: none;
    background: #f9f9f9;
    margin-bottom: 8px;
}

.btn-copiar {
    width: 100%;
    padding: 10px;
    border: 1px solid #5d5858;
    background: #fff;
    color: #5d5858;
    font-weight: 600;
    font-size: 13px;
    font-family: 'Google Sans', 'Segoe UI', sans-serif;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.15s, color 0.15s;
}

.btn-copiar:hover { background: #5d5858; color: #fff; }

.pag-aguard {
    text-align: center;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pag-aguard .dot-spin {
    width: 10px;
    height: 10px;
    border: 2px solid #111;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.pag-exp {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin-top: 8px;
}

.demo-aviso {
    background: #f5f5f5;
    border-left: 3px solid #ccc;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #555;
}


.lang-bar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
}

.lang-selector {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1px solid #ddd;
    padding: 5px 10px;
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.lang-current:hover { background: #f5f5f5; }

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 90px;
    flex-direction: column;
}

.lang-menu.open { display: flex; }

.lang-menu button {
    background: none;
    border: none;
    padding: 9px 14px;
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-menu button:hover { background: #f5f5f5; }

.lang-current img, .lang-menu img {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #eee;
}

.site-footer {
    width: 100%;
    max-width: 720px;
    margin-top: auto;
    padding: 12px 20px;
    border-top: 1px solid #e8e8e8;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.site-footer-mid {
    text-align: center;
}

.site-footer-install {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #00A859;
    cursor: pointer;
    text-decoration: none;
}

.site-footer-install svg {
    stroke: #00A859;
}

.site-footer-install:hover {
    color: #008f4b;
}

.site-footer-mid {
    font-size: 11px;
    color: #bbb;
    text-align: right;
}

.site-footer-mid a {
    color: #aaa;
    text-decoration: underline;
}

.site-footer-mid a:hover { color: #555; }

.modal-terms {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin-top: 12px;
}

.modal-terms a {
    color: #aaa;
    text-decoration: underline;
}

.modal-terms a:hover {
    color: #666;
}

/* Botão demo */
.demo-link-wrap {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 28px;
}

.btn-demo {
    background: none;
    border: none;
    color: #00A859;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.15s;
}

.btn-demo:hover { background: #f0faf5; }
.btn-demo:disabled { opacity: 0.5; cursor: not-allowed; }

/* Toggle incluir mídia */
.media-toggle-wrap {
    margin: 0 0 14px 0;
    display: flex;
    justify-content: center;
}

.media-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.media-toggle-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #00A859;
    cursor: pointer;
}

/* Botão download PDF */
.btn-pdf {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #00A859;
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-pdf:hover { background: #008f4b; }

/* Botão enviar por e-mail */
.btn-email {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 11px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-email:hover { background: #ebebeb; }
.btn-email:disabled { opacity: 0.6; cursor: not-allowed; }

/* Status do e-mail */
.email-status {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 600px) {
    body { padding: 0; align-items: flex-start; }
    .container { padding: 28px 20px; box-shadow: none; }
    h1 { font-size: 1.3em; }
    .step { padding: 14px 16px; }
    .button { padding: 14px; font-size: 14px; }
    .pag-valor { font-size: 1.6em; }
    .pag-qr { width: 150px; height: 150px; }
    .modal { padding: 24px 18px; }
    .months-grid { gap: 5px; }
    .month-btn { font-size: 11px; padding: 6px 2px 4px; }
}
