/* ========================================
   Calculator v1 - Complete CSS
   Strict PDF compliance redesign
   ======================================== */

/* Hide number input spinners globally */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- Layout & Wizard --- */
.calculator-page {
    padding-top: 100px;
    min-height: 100vh;
}

.calculator-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
}

.wizard-card {
    padding: 40px 48px;
    border-radius: 18px;
    margin-bottom: 30px;
}

.step {
    display: none;
    animation: fadeIn .3s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Progress Bar --- */
.progress-container {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
    margin: 40px 0 60px;
    /* More space for nodes */
    overflow: visible;
    /* Changed to visible for nodes */
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold, #EBB13A), #F5D67A);
    border-radius: 2px;
    width: 0;
    transition: width .4s ease;
    position: relative;
    z-index: 1;
}

/* Step Nodes Overlay */
.steps-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    /* Container is passthru */
    z-index: 2;
}

.step-node {
    width: 28px;
    height: 28px;
    background: #1a1d2e;
    border: 2px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #8a8e9a;
    pointer-events: auto;
    /* Buttons are clickable */
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 0 0 4px #1a1d2e;
}

.step-node:hover {
    border-color: var(--accent-gold, #EBB13A);
    color: #fff;
    transform: scale(1.1);
}

.step-node.active {
    background: var(--accent-gold, #EBB13A);
    border-color: var(--accent-gold, #EBB13A);
    color: #1a1d2e;
    box-shadow: 0 0 15px rgba(235, 177, 58, .4), 0 0 0 4px #1a1d2e;
}

.step-node.completed {
    border-color: var(--accent-gold, #EBB13A);
    color: var(--accent-gold, #EBB13A);
}

/* --- Typography --- */
.step h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--accent-gold, #EBB13A);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.step-description {
    color: #b0b4c0;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: .95rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--accent-gold, #EBB13A);
    margin: 24px 0 12px;
    font-weight: 600;
}

.note-text {
    color: #8a8e9a;
    font-size: .85rem;
    margin-top: 16px;
    line-height: 1.5;
}

.note-text a {
    color: var(--accent-gold, #EBB13A);
    text-decoration: underline;
}

.table-note {
    color: #8a8e9a;
    font-size: .8rem;
    margin-top: 8px;
}

.field-help {
    color: #9a9eb0;
    font-size: .87rem;
    margin-bottom: 8px;
}

.field-alert {
    color: #e0a030;
    font-size: .87rem;
    margin-bottom: 8px;
    font-style: italic;
}

.field-hint {
    color: #78809a;
    font-size: .82rem;
    margin-top: 6px;
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.4;
}

/* --- Help Tooltips --- */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(235, 177, 58, .2);
    color: var(--accent-gold, #EBB13A);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: background .2s;
}

.help-icon:hover {
    background: rgba(235, 177, 58, .4);
}

.modal-body-content {
    color: #c0c4d0;
    font-size: .95rem;
    line-height: 1.6;
}

.modal-body-content a {
    color: var(--accent-gold, #EBB13A);
    text-decoration: underline;
    font-weight: 600;
}

/* Tooltip removal (migrated to modal) */

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .93rem;
    color: #d0d4e0;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    color: #e0e4f0;
    font-size: .95rem;
    transition: border-color .2s;
    box-sizing: border-box;
}

/* Limit numeric input widths for better proportions */
.form-group input[type="number"] {
    max-width: 280px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-gold, #EBB13A);
    outline: none;
}

/* Fix dropdown options: dark bg + light text for all selects */
select,
.data-table td select {
    background-color: #1a1d2e !important;
    color: #e0e4f0 !important;
}

select option {
    background-color: #1a1d2e;
    color: #e0e4f0;
}

.input-error {
    border-color: #e13a5e !important;
    box-shadow: 0 0 0 2px rgba(225, 58, 94, .2) !important;
}

/* --- Radio Cards --- */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-group-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.radio-card {
    cursor: pointer;
    flex: 1;
    min-width: 140px;
}

.radio-card input {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    transition: all .2s;
    text-align: center;
    font-size: .9rem;
}

.radio-card input:checked+.radio-content {
    border-color: var(--accent-gold, #EBB13A);
    background: rgba(235, 177, 58, .12);
    box-shadow: 0 0 16px rgba(235, 177, 58, .25), 0 0 0 1px rgba(235, 177, 58, .3);
}

.radio-content .icon {
    font-size: 1.8rem;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: .9rem;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent-gold, #EBB13A);
}

/* --- Data Tables --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.data-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: .78rem;
    letter-spacing: .03em;
    color: #8a8e9a;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-weight: 600;
}

.data-table td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    vertical-align: middle;
}

.data-table td input,
.data-table td select {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: #e0e4f0;
    font-size: .88rem;
    box-sizing: border-box;
}

/* Numeric inputs right-aligned globally */
.data-table td input[type="number"],
.data-table td input[readonly] {
    text-align: right;
}

/* Prevent select text cutoff and overlap */
.data-table td select {
    min-width: 110px;
    max-width: 160px;
}

.data-table td input:focus,
.data-table td select:focus {
    border-color: var(--accent-gold, #EBB13A);
    outline: none;
}

.data-table td input[readonly] {
    background: rgba(235, 177, 58, .06);
    color: var(--accent-gold, #EBB13A);
    font-weight: 600;
    border-color: transparent;
}

/* UN-REF inline */
.td-unref {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-unref {
    background: rgba(235, 177, 58, .15);
    border: 1px solid rgba(235, 177, 58, .3);
    border-radius: 8px;
    color: var(--accent-gold, #EBB13A);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background .2s;
}

.btn-unref:hover {
    background: rgba(235, 177, 58, .3);
}

/* Add / Remove buttons */
.add-row-btn {
    background: rgba(235, 177, 58, .1);
    border: 1px dashed rgba(235, 177, 58, .4);
    border-radius: 10px;
    color: var(--accent-gold, #EBB13A);
    padding: 10px 20px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    width: 100%;
    transition: background .2s;
}

.add-row-btn:hover {
    background: rgba(235, 177, 58, .2);
}

.btn-remove {
    background: none;
    border: none;
    color: #e13a5e;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .2s;
}

.btn-remove:hover {
    background: rgba(225, 58, 94, .1);
}

/* --- Navigation --- */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.btn {
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

.btn-gold {
    background: linear-gradient(135deg, #EBB13A, #F5D67A);
    color: #1a1d2e;
}

.btn-gold:hover {
    box-shadow: 0 4px 16px rgba(235, 177, 58, .4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .15);
    color: #d0d4e0;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, .3);
}

.btn-outline:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.btn-text,
.btn-text:hover {
    background: none;
    border: none;
    color: #8a8e9a;
    cursor: pointer;
    font-size: .88rem;
    text-decoration: underline;
}

/* Save Draft button override */
#saveDraftBtn {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    padding: 8px 16px;
    color: #b0b4c0;
    text-decoration: none;
    transition: all .2s;
}

#saveDraftBtn:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(235, 177, 58, .3);
    color: #d0d4e0;
}

.btn-sm {
    padding: 6px 16px;
    font-size: .82rem;
    border-radius: 8px;
}

.nav-secondary {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* --- Modal Overlay (UN-REF) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn .2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 16px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #8a8e9a;
    font-size: 1.6rem;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.modal-box h3 {
    color: var(--accent-gold, #EBB13A);
    margin-bottom: 20px;
    font-size: 1.15rem;
}

.modal-result {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold, #EBB13A);
    padding: 12px 0;
}

/* --- Dashboard View --- */
.dashboard-view {
    animation: fadeIn .3s ease;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h2 {
    color: var(--accent-gold, #EBB13A);
    margin: 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all .2s;
}

.project-card:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(235, 177, 58, .3);
    transform: translateY(-2px);
}

.project-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #e0e4f0;
}

.project-card .updated-at {
    font-size: .82rem;
    color: #8a8e9a;
    margin-bottom: 20px;
}

.project-card .card-actions {
    display: flex;
    gap: 12px;
}

.btn-danger-action {
    color: #e13a5e;
    border-color: rgba(225, 58, 94, .3);
}

.btn-danger-action:hover {
    background: rgba(225, 58, 94, .1);
    border-color: #e13a5e;
    color: #ff4d6d;
}

.empty-dashboard {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, .02);
    border: 1px dashed rgba(255, 255, 255, .1);
    border-radius: 16px;
    color: #8a8e9a;
}

/* --- Tier Alert / CTA --- */
.tier-cta {
    margin-top: 20px;
}

.tier-alert {
    padding: 16px 20px;
    background: rgba(235, 177, 58, .08);
    border: 1px solid rgba(235, 177, 58, .2);
    border-radius: 12px;
    color: #d0d4e0;
    font-size: .9rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Dashboard & Results --- */
.dashboard {
    margin-top: 24px;
}

.dashboard-block {
    margin-bottom: 28px;
    padding: 24px;
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .06);
    scroll-margin-top: 100px;
    /* Fix: scroll-margin for Step 10 navigation */
    animation: fadeIn .4s ease both;
}

.dashboard-block:nth-child(2) {
    animation-delay: .05s;
}

.dashboard-block:nth-child(3) {
    animation-delay: .10s;
}

.dashboard-block:nth-child(4) {
    animation-delay: .15s;
}

.dashboard-block:nth-child(5) {
    animation-delay: .20s;
}

.dashboard-block:nth-child(6) {
    animation-delay: .25s;
}

.dashboard-block:nth-child(7) {
    animation-delay: .30s;
}

.cost-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cost-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    font-size: .93rem;
    color: #c0c4d0;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.cost-label {
    min-width: 0;
}

.cost-pct {
    text-align: right;
    font-size: .82rem;
    color: rgba(235, 177, 58, 0.7);
    min-width: 48px;
}

.cost-value {
    text-align: right;
    min-width: 100px;
}

.cost-line.total {
    border-top: 2px solid rgba(235, 177, 58, .3);
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
}

.cost-line.total strong {
    color: var(--accent-gold, #EBB13A);
}

.cost-line.total .cost-pct strong {
    color: var(--accent-gold, #EBB13A);
    font-size: .85rem;
}

.chart-wrapper {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px;
    background: rgba(255, 255, 255, .02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .05);
}

.result-box {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, .03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
}

.unit-cost-breakdown {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.unit-cost-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 16px;
    font-size: .85rem;
    color: #a0a4b0;
}

.unit-cost-line+.unit-cost-line {
    border-top: 1px solid rgba(255, 255, 255, .03);
}

.sensitivity-current {
    background: rgba(235, 177, 58, 0.08);
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.result-card {
    padding: 20px;
    background: rgba(255, 255, 255, .04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    text-align: center;
}

.result-card.highlight {
    border-color: rgba(235, 177, 58, .3);
    background: rgba(235, 177, 58, .06);
}

.result-card h4 {
    font-size: .85rem;
    color: #8a8e9a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.big-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-gold, #EBB13A);
    margin: 8px 0;
}

.result-label {
    font-size: .82rem;
    color: #8a8e9a;
}

.insight-text {
    color: #b0b4c0;
    font-size: .88rem;
    margin-top: 6px;
}

.insight-card {
    padding: 14px 18px;
    background: rgba(64, 196, 224, .05);
    border-left: 3px solid rgba(64, 196, 224, .4);
    border-radius: 0 10px 10px 0;
    margin-bottom: 10px;
}

.insight-card p {
    color: #c0c4d0;
    font-size: .9rem;
    line-height: 1.5;
}

.paywall-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.paywall-content {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    padding: 20px;
    transition: filter 0.3s ease;
}

.paywall-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 28, 0.4);
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none !important;
}

.paywall-overlay:hover {
    background: rgba(15, 17, 28, 0.6);
}

.paywall-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.paywall-text {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.paywall-cta {
    color: #fff;
    font-size: 0.85rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.paywall-overlay:hover .paywall-cta {
    background: var(--accent-gold);
    color: var(--bg-dark);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 180, 41, 0.3);
}

.blurred-block {
    display: none;
    /* Deprecated in favor of paywall-wrapper */
}

/* --- Results Dashboard Redesign --- */
.results-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-title-icon {
    font-size: 1.3em;
}

.results-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* .dashboard-block — unified definition at line ~697 */

.block-icon {
    margin-right: 4px;
}

/* Hero card (Block 1 – Preço Final) */
.res-hero-block {
    background: linear-gradient(135deg, rgba(235, 177, 58, .08) 0%, rgba(235, 177, 58, .02) 100%);
    border: 1px solid rgba(235, 177, 58, .25);
    position: relative;
    overflow: hidden;
}

.res-hero-block::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(235, 177, 58, .12) 0%, transparent 70%);
    pointer-events: none;
}

.res-hero-card {
    text-align: center;
    padding: 24px 16px 16px;
    position: relative;
}

.res-hero-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-gold, #EBB13A);
    margin: 8px 0 4px;
    letter-spacing: -.02em;
    text-shadow: 0 0 30px rgba(235, 177, 58, .2);
}

.res-hero-label {
    font-size: 1rem;
    color: #a0a4b0;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

.res-hero-meta {
    font-size: .88rem;
    color: #787c8a;
}

.res-hero-meta strong {
    color: #c0c4d0;
}

/* Composition table (Block 2) */
.comp-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comp-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr 56px 100px;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: .88rem;
    color: #c0c4d0;
}

.comp-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comp-bar-wrap {
    height: 10px;
    background: rgba(255, 255, 255, .05);
    border-radius: 6px;
    overflow: hidden;
}

.comp-bar {
    height: 100%;
    border-radius: 6px;
    transition: width .5s ease;
    min-width: 2px;
}

.comp-pct {
    text-align: right;
    font-size: .82rem;
    color: rgba(235, 177, 58, .7);
}

.comp-val {
    text-align: right;
    font-size: .85rem;
}

.comp-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0 4px;
    margin-top: 10px;
    border-top: 2px solid rgba(235, 177, 58, .3);
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-gold, #EBB13A);
}

/* Action buttons */
.res-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 12px 0 4px;
}

.res-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
    font-family: inherit;
}

.res-btn-pdf {
    background: rgba(255, 255, 255, .06);
    color: #c0c4d0;
    border: 1px solid rgba(255, 255, 255, .12);
}

.res-btn-pdf:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(235, 177, 58, .3);
    color: #fff;
}

.res-btn-conclude {
    background: linear-gradient(135deg, #EBB13A 0%, #d49a20 100%);
    color: #0f111c;
}

.res-btn-conclude:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(235, 177, 58, .3);
}

@media print {

    .wizard-nav,
    .progress-container,
    .res-actions,
    header,
    footer {
        display: none !important;
    }

    .step {
        box-shadow: none !important;
        border: none !important;
    }

    .results-dashboard {
        gap: 16px;
    }
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-container input[type="range"] {
    flex: 1;
    accent-color: var(--accent-gold, #EBB13A);
    height: 6px;
}

.slider-value {
    font-weight: 700;
    color: var(--accent-gold, #EBB13A);
    font-size: 1.1rem;
    min-width: 50px;
    background: rgba(235, 177, 58, .12);
    padding: 4px 12px;
    border-radius: 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Disclaimer */
.disclaimer-box {
    padding: 14px 18px;
    background: rgba(225, 58, 94, .06);
    border: 1px solid rgba(225, 58, 94, .2);
    border-radius: 10px;
    color: #e0a0a0;
    font-size: .87rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .06);
    margin: 20px 0;
}

/* --- Hidden utility --- */
.hidden {
    display: none !important;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .calculator-page {
        padding-top: 70px;
    }

    .wizard-card {
        padding: 20px 16px;
    }

    .calculator-container {
        padding: 10px;
    }

    .step h2 {
        font-size: 1.2rem;
    }

    .step-description {
        font-size: .88rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-group-3 {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    /* --- Card-based table layout for mobile --- */
    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: rgba(255, 255, 255, .03);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 12px;
        position: relative;
    }

    .data-table td {
        padding: 6px 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .data-table td::before {
        content: attr(data-label);
        font-size: .75rem;
        font-weight: 600;
        color: #8a8e9a;
        min-width: 110px;
        flex-shrink: 0;
    }

    .data-table td input,
    .data-table td select {
        flex: 1;
        min-width: 0;
    }

    .data-table td select {
        min-width: 0;
    }

    /* Remove button on mobile cards */
    .data-table td:last-child {
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 0;
        width: auto;
    }

    .data-table td:last-child::before {
        display: none;
    }

    /* UN-REF inline layout on mobile */
    .td-unref {
        flex-wrap: wrap;
    }

    .td-unref input {
        flex: 1;
        min-width: 0;
    }

    /* Navigation */
    .wizard-navigation {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .wizard-navigation .btn {
        min-width: 120px;
        text-align: center;
    }

    /* Tooltips */
    .help-icon:hover::after {
        width: 200px;
        left: auto;
        right: 0;
        transform: none;
    }

    .slider-container {
        flex-direction: column;
        align-items: stretch;
    }

    /* Dashboard blocks */
    .dashboard-block {
        padding: 14px 16px;
    }

    .chart-container {
        max-width: 280px;
    }

    .big-number {
        font-size: 1.4rem;
    }

    .modal-box {
        padding: 20px;
        width: 95%;
    }
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 360px;
    padding: 16px 20px;
    background: rgba(26, 29, 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e4f0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.2, 1, 0.3, 1), toastFadeOut 0.4s 2.6s forwards;
    position: relative;
    overflow: hidden;
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-gold, #EBB13A);
    width: 100%;
    animation: toastProgress 3s linear forwards;
}

.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-error {
    border-left: 4px solid #F44336;
}

.toast-info {
    border-left: 4px solid var(--accent-gold, #EBB13A);
}

.toast-success .toast-icon::before {
    content: '✅';
}

.toast-error .toast-icon::before {
    content: '❌';
}

.toast-info .toast-icon::before {
    content: '💡';
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    to {
        transform: translateY(-10px);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* --- Step 6 Remodeling (Refined) --- */
.step6-group-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

.step6-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.step6-group-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-gold, #EBB13A);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.tax-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: flex-start;
    /* Align with top labels */
}

.tax-input-field {
    transition: opacity 0.3s ease;
}

.tax-input-field.hidden {
    display: none;
}

.tax-data-input.hidden {
    display: none;
}

.tax-toggle-col {
    grid-column: 3;
    justify-self: end;
    padding-bottom: 0;
    padding-top: 2px;
    /* Slight adjustment to align text baseline with labels */
}

.tax-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tax-toggle-wrapper label {
    margin: 0;
    font-weight: 500;
    font-size: 0.85rem;
    color: #8a8e9a;
}

.step6-section-body {
    transition: all 0.3s ease;
}

.step6-section-body.hidden {
    display: none;
}

.form-group-incidental {
    margin-top: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {

    .form-grid,
    .form-row-inline,
    .tax-row-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step6-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tax-toggle-col {
        grid-column: 1;
        /* Reset grid column for mobile */
        justify-self: start;
        padding-bottom: 0;
    }

    /* #7 — Simplified step nodes on mobile */
    .step-node {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .step-node:not(.active):not(.completed) {
        font-size: 0;
        width: 10px;
        height: 10px;
        border-width: 1px;
    }

    /* Anchor nav on mobile */
    .res-anchor-nav {
        gap: 4px;
    }

    .res-anchor-btn {
        font-size: .7rem;
        padding: 5px 8px;
    }

    .comp-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .comp-bar-wrap {
        display: none;
    }
}

/* --- #4: Project name input width --- */
#projectName {
    max-width: 480px;
}

/* --- #2: Step 7 consolidation two-column layout --- */
@media (min-width: 920px) {
    .consolidation-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    .consolidation-grid .chart-wrapper {
        max-width: 100%;
    }
}

/* --- #3: Table column improvements --- */
.data-table {
    table-layout: fixed;
}

.data-table th:first-child,
.data-table td:first-child {
    width: 30%;
}

.data-table th:last-child,
.data-table td:last-child {
    width: 48px;
}

/* --- #1: Step 10 anchor navigation --- */
.res-anchor-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    position: sticky;
    top: 90px;
    z-index: 100;
    background: rgba(15, 17, 28, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.res-anchor-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    color: #a0a4b0;
    font-size: .78rem;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-decoration: none;
}

.res-anchor-btn:hover {
    background: rgba(235, 177, 58, .1);
    border-color: rgba(235, 177, 58, .3);
    color: var(--accent-gold, #EBB13A);
}

/* --- Sticky action buttons on Step 10 --- */
.res-actions-sticky {
    position: sticky;
    bottom: 0;
    background: linear-gradient(transparent, rgba(15, 17, 28, .95) 30%);
    padding: 24px 0 12px;
    z-index: 10;
}