/* ==========================================================================
   Operação Au Amazônia Legal — estilos do site e do fluxo de contratação
   ========================================================================== */

body {
    background-color: #0D0F12;
    color: #E2E8F0;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.gold-gradient-text {
    background: linear-gradient(135deg, #FFF0B2 0%, #DFA837 50%, #9E721D 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-border-glow {
    border: 1px solid rgba(223, 168, 55, 0.35);
    box-shadow: 0 0 20px rgba(223, 168, 55, 0.08);
}

.glass-card {
    background: rgba(22, 25, 32, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(35, 41, 54, 0.8);
}

.glass-card:hover {
    border-color: rgba(223, 168, 55, 0.4);
    transition: all 0.3s ease;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0D0F12; }
::-webkit-scrollbar-thumb { background: #232936; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #DFA837; }

/* ---------- Slider ---------- */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #232936;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #DFA837;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(223, 168, 55, 0.8);
}
input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: none;
    border-radius: 50%;
    background: #DFA837;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(223, 168, 55, 0.8);
}

/* ---------- Botões ---------- */
.btn-gold,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.btn-gold {
    background: linear-gradient(135deg, #F3C65F 0%, #DFA837 55%, #C08F26 100%);
    color: #0D0F12;
    box-shadow: 0 6px 18px rgba(223, 168, 55, 0.22);
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(223, 168, 55, 0.32);
}

.btn-gold:active { transform: translateY(0); }

.btn-gold:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: rgba(22, 25, 32, 0.9);
    border-color: #232936;
    color: #CBD5E1;
}

.btn-ghost:hover {
    border-color: rgba(223, 168, 55, 0.45);
    color: #F3C65F;
}

/* ---------- Modais ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.aberto { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 9, 0.82);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.18s ease-out;
}

.modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 94vh;
    background: #11141A;
    border: 1px solid rgba(223, 168, 55, 0.28);
    border-radius: 1.25rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    animation: subir 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.modal-panel-lg { max-width: 900px; }
.modal-panel-xl { max-width: 1000px; }

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #232936;
    background: linear-gradient(180deg, rgba(223, 168, 55, 0.06), rgba(223, 168, 55, 0));
}

.modal-eyebrow {
    display: block;
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #DFA837;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.modal-header h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.25;
}

.modal-sub {
    font-size: 0.6875rem;
    color: #94A3B8;
    margin-top: 0.2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.modal-close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    border: 1px solid #232936;
    background: #161920;
    color: #94A3B8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #F3C65F;
    border-color: rgba(223, 168, 55, 0.5);
}

.modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-body-flush { padding: 0; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.5rem;
    border-top: 1px solid #232936;
    background: #0F1217;
}

.modal-footer-info {
    font-size: 0.6875rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- Resumo automático ---------- */
.resumo-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid #232936;
    background: rgba(13, 15, 18, 0.8);
    margin-bottom: 1.15rem;
}

.resumo-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    border-left: 2px solid #232936;
}

.resumo-item:first-child { border-left: none; }

.resumo-item span {
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748B;
    font-weight: 700;
}

.resumo-item strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    color: #E2E8F0;
}

.resumo-item.destaque strong { color: #F3C65F; }

/* ---------- Formulário ---------- */
.form-bloco {
    border: 1px solid #232936;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem 1.15rem;
    margin-bottom: 1rem;
    background: rgba(22, 25, 32, 0.55);
}

.form-bloco legend {
    padding: 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #DFA837;
}

.form-bloco legend i { margin-right: 0.35rem; }

.form-bloco legend .opcional {
    margin-left: 0.4rem;
    padding: 0.05rem 0.32rem;
    border: 1px solid #2B3240;
    border-radius: 0.35rem;
    font-size: 0.5rem;
    letter-spacing: 0.07em;
    color: #64748B;
    vertical-align: middle;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
}

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.campo-largo { grid-column: span 2 / span 2; }

.field label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94A3B8;
    letter-spacing: 0.01em;
}

.field .req { color: #DFA837; }

.field input,
.field select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #2B3240;
    background: #0D0F12;
    color: #F1F5F9;
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder { color: #475569; }

.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(223, 168, 55, 0.7);
    box-shadow: 0 0 0 3px rgba(223, 168, 55, 0.13);
}

.field input.invalido,
.field select.invalido {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Campo fixo do modelo (somente leitura) */
.field input[readonly] {
    background: #0A0D11;
    border-color: #1E2532;
    color: #94A3B8;
    cursor: default;
}

.field input[readonly]:focus {
    border-color: #1E2532;
    box-shadow: none;
}

.tag-fixo {
    margin-left: 0.4rem;
    padding: 0.02rem 0.3rem;
    border: 1px solid #2B3240;
    border-radius: 0.3rem;
    font-size: 0.5rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748B;
    vertical-align: middle;
    font-weight: 700;
}

.field-hint {
    font-size: 0.625rem;
    color: #52607A;
    line-height: 1.35;
}

.field-error {
    font-size: 0.625rem;
    color: #F87171;
    min-height: 0;
    line-height: 1.3;
}

.field-error:empty { display: none; }

/* ---------- Cards de cálculo ---------- */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.calc-card {
    padding: 0.6rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid #232936;
    background: #0D0F12;
}

.calc-card span {
    display: block;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.calc-card strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875rem;
    color: #E2E8F0;
}

.calc-card.destaque {
    border-color: rgba(223, 168, 55, 0.4);
    background: rgba(223, 168, 55, 0.07);
}

.calc-card.destaque strong { color: #F3C65F; }

/* ---------- Alerta do formulário ---------- */
.form-alerta {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #FCA5A5;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* ---------- Pré-visualização ---------- */
.preview-wrap {
    position: relative;
    background: #3A3F46;
    min-height: 60vh;
    max-height: 74vh;
    overflow: auto;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.preview-wrap iframe {
    width: 794px;
    min-width: 794px;
    height: 1000px;
    border: none;
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transform-origin: top center;
    transition: transform 0.2s ease;
}

.preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #CBD5E1;
    font-size: 0.8125rem;
    background: rgba(58, 63, 70, 0.96);
    z-index: 2;
}

.preview-loading[hidden] { display: none; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 1.75rem;
    transform: translate(-50%, 130%);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    border-radius: 0.75rem;
    background: #161920;
    border: 1px solid rgba(223, 168, 55, 0.35);
    color: #F1F5F9;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 1000;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
    max-width: min(90vw, 520px);
}

.toast.visivel { transform: translate(-50%, 0); opacity: 1; }
.toast.erro { border-color: rgba(239, 68, 68, 0.5); }
.toast.erro i { color: #F87171; }
.toast i { color: #34D399; }

/* ---------- Base de preço ---------- */
.preco-bloco {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed #232936;
}

.preco-titulo {
    display: block;
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748B;
    margin-bottom: 0.5rem;
}

.preco-modos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.pill-preco {
    position: relative;
    display: block;
    cursor: pointer;
}

.pill-preco input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pill-txt {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.6rem;
    border: 1px solid #2B3240;
    background: #0D0F12;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pill-txt strong {
    font-size: 0.75rem;
    color: #E2E8F0;
    font-weight: 700;
}

.pill-txt small {
    font-size: 0.5625rem;
    color: #64748B;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.pill-preco:hover .pill-txt { border-color: rgba(223, 168, 55, 0.4); }

.pill-preco input:checked + .pill-txt {
    border-color: rgba(223, 168, 55, 0.75);
    background: rgba(223, 168, 55, 0.1);
    box-shadow: 0 0 0 1px rgba(223, 168, 55, 0.25) inset;
}

.pill-preco input:checked + .pill-txt strong { color: #F3C65F; }

.pill-preco input:focus-visible + .pill-txt {
    outline: 2px solid rgba(223, 168, 55, 0.55);
    outline-offset: 1px;
}

.preco-painel { margin-top: 0.6rem; }

.preco-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #2B3240;
    background: #0D0F12;
    font-size: 0.75rem;
    color: #CBD5E1;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.preco-status.ok { border-color: rgba(52, 211, 153, 0.4); color: #6EE7B7; }
.preco-status.erro { border-color: rgba(239, 68, 68, 0.45); color: #FCA5A5; }
.preco-status i { flex: 0 0 auto; }

.preco-acoes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.btn-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.45rem;
    border: 1px solid #2B3240;
    background: #161920;
    color: #CBD5E1;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-mini:hover { border-color: rgba(223, 168, 55, 0.45); color: #F3C65F; }
.btn-mini:disabled { opacity: 0.55; cursor: not-allowed; }

.preco-fonte {
    font-size: 0.5625rem;
    color: #64748B;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: right;
    line-height: 1.3;
}

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
    .preco-modos { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .campo-largo { grid-column: span 1 / span 1; }
    .resumo-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modal { padding: 0; }
    .modal-panel { max-height: 100vh; border-radius: 0; height: 100vh; }
    .modal-body { padding: 1rem; }
    .modal-header, .modal-footer { padding: 0.9rem 1rem; }
    .modal-footer { flex-direction: column; align-items: stretch; }
    .modal-footer .btn-gold, .modal-footer .btn-ghost { justify-content: center; }
    .preview-wrap { padding: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-panel, .modal-backdrop, .toast { animation: none; transition: none; }
}
