﻿
.profit-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px 70px;
    color: #0f172a;
}

.profit-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 34px;
    border-radius: 28px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, .18), transparent 34%), linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    margin-bottom: 28px;
}

    .profit-hero h1 {
        margin: 8px 0 10px;
        font-size: clamp(2rem, 4vw, 3.25rem);
        line-height: 1.05;
        letter-spacing: -0.04em;
        font-weight: 800;
    }

    .profit-hero p {
        max-width: 660px;
        margin: 0;
        color: #cbd5e1;
        font-size: 1.05rem;
        line-height: 1.7;
    }

.profit-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profit-hero .profit-eyebrow {
    color: #dbeafe;
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .2);
}

.profit-hero-badge {
    min-width: 190px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(14px);
}

    .profit-hero-badge span {
        display: block;
        color: #cbd5e1;
        font-size: .82rem;
        margin-bottom: 6px;
    }

    .profit-hero-badge strong {
        display: block;
        font-size: 1.35rem;
    }

.profit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr);
    gap: 26px;
    align-items: start;
}

.profit-card,
.profit-result-card {
    background: rgba(255, 255, 255, .95);
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.profit-card-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 24px;
}

    .profit-card-header h2 {
        margin: 10px 0 0;
        font-size: 1.45rem;
        letter-spacing: -0.03em;
    }

    .profit-card-header p {
        margin: 12px 0 0;
        color: #64748b;
        font-size: .94rem;
        line-height: 1.5;
        max-width: 250px;
        text-align: right;
    }

.profit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profit-field label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: .92rem;
    font-weight: 800;
}

.profit-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 15px;
    background: #f8fafc;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

    .profit-input-wrap:focus-within {
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
    }

    .profit-input-wrap span {
        color: #64748b;
        font-weight: 800;
    }

    .profit-input-wrap input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 700;
        padding: 14px 0;
    }

        .profit-input-wrap input::placeholder {
            color: #94a3b8;
            font-weight: 500;
        }

.profit-validation {
    display: block;
    margin-top: 6px;
    color: #dc2626;
    font-size: .82rem;
    font-weight: 700;
}

.profit-button {
    width: 100%;
    margin-top: 26px;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .profit-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 36px rgba(37, 99, 235, .34);
    }

.profit-result-card {
    position: sticky;
    top: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.profit-sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 20px;
}

.profit-sidebar .profit-result-card {
    position: static;
}

.profit-kpi-main {
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #bbf7d0;
    margin-bottom: 16px;
}

    .profit-kpi-main span,
    .profit-result-item span {
        display: block;
        color: #64748b;
        font-size: .82rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .07em;
        margin-bottom: 8px;
    }

    .profit-kpi-main strong {
        color: #166534;
        font-size: 2.1rem;
        letter-spacing: -0.04em;
    }

.profit-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profit-result-item {
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

    .profit-result-item strong {
        color: #0f172a;
        font-size: 1.12rem;
        letter-spacing: -0.02em;
    }

.profit-result-item small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: .75rem;
    line-height: 1.4;
}

.profit-empty-state {
    text-align: center;
    padding: 38px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
}

.profit-empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 900;
}

.profit-empty-state h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.profit-empty-state p {
    margin: 0 auto;
    max-width: 280px;
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .profit-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .profit-layout {
        grid-template-columns: 1fr;
    }

    .profit-result-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .profit-shell {
        padding: 24px 14px 48px;
    }

    .profit-hero,
    .profit-card,
    .profit-result-card {
        padding: 22px;
        border-radius: 22px;
    }

    .profit-grid,
    .profit-result-grid {
        grid-template-columns: 1fr;
    }

    .profit-card-header {
        flex-direction: column;
    }

        .profit-card-header p {
            text-align: left;
            max-width: none;
        }
}
.profit-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #334155;
    font-size: .92rem;
    font-weight: 800;
}

.profit-info {
    position: relative;
    width: 18px;
    height: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

    .profit-info::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 50%;
        bottom: 135%;
        transform: translateX(-50%);
        width: 230px;
        padding: 10px 12px;
        border-radius: 12px;
        background: #0f172a;
        color: #fff;
        font-size: .78rem;
        font-weight: 600;
        line-height: 1.45;
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        box-shadow: 0 14px 30px rgba(15, 23, 42, .22);
        z-index: 20;
    }

    .profit-info::before {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 105%;
        transform: translateX(-50%);
        border: 7px solid transparent;
        border-top-color: #0f172a;
        opacity: 0;
        visibility: hidden;
        z-index: 21;
    }

    .profit-info:hover::after,
    .profit-info:hover::before,
    .profit-info:focus::after,
    .profit-info:focus::before {
        opacity: 1;
        visibility: visible;
    }
    .profit-info.is-open::after,
    .profit-info.is-open::before {
        opacity: 1;
        visibility: visible;
    }
.profit-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

    .profit-summary-header h2 {
        margin: 0;
        font-size: 1.45rem;
        letter-spacing: -0.03em;
    }

.profit-summary-text {
    color: #64748b;
    font-size: .95rem;
}

/* Profit calculator v2 */
.profit-form-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
}

.profit-form-section:last-of-type {
    margin-bottom: 0;
}

.profit-card-header > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.profit-step {
    display: inline-grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 900;
}

.profit-field small {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.35;
}

.profit-validation-summary:empty {
    display: none;
}

.profit-validation-summary {
    padding: 12px 14px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
    background: #fef2f2;
}

.profit-advanced {
    margin-top: 22px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #f8fafc;
}

.profit-advanced summary {
    padding: 15px 18px;
    color: #334155;
    cursor: pointer;
    font-weight: 800;
}

.profit-advanced[open] summary {
    border-bottom: 1px solid #e2e8f0;
}

.profit-advanced .profit-grid {
    padding: 18px;
}

.profit-projection {
    padding: 22px;
    border: 1px dashed #bfdbfe;
    border-radius: 18px;
    background: #f8fbff;
}

.profit-verdict {
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
}

.profit-verdict > span {
    display: block;
    color: #166534;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profit-verdict strong {
    display: block;
    margin: 6px 0;
    color: #166534;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.profit-verdict p {
    margin: 0;
    color: #3f6212;
    line-height: 1.5;
}

.profit-result-card.is-loss .profit-verdict {
    border-color: #fecaca;
    background: linear-gradient(145deg, #fff7ed, #fef2f2);
}

.profit-result-card.is-loss .profit-verdict > span,
.profit-result-card.is-loss .profit-verdict strong,
.profit-result-card.is-loss .profit-verdict p {
    color: #b91c1c;
}

.profit-projection-result {
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #f8fafc;
}

.profit-projection-result h3 {
    margin: 7px 0 14px;
}

.profit-projection-result dl {
    margin: 0;
}

.profit-projection-result dl > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    border-bottom: 1px solid #e2e8f0;
}

.profit-projection-result dl > div:last-child {
    border-bottom: 0;
}

.profit-projection-result dt {
    color: #64748b;
}

.profit-projection-result dd {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.profit-projection-result .profit-total {
    color: #166534;
    font-size: 1.05rem;
}

.profit-projection-result .profit-total dt,
.profit-projection-result .profit-total dd {
    color: inherit;
    font-weight: 900;
}

.profit-disclaimer {
    margin: 18px 2px 0;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.5;
}

.profit-formula-card {
    padding: 0;
    border: 1px solid #dbe3ee;
    border-radius: 24px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.profit-formula-disclosure summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

.profit-formula-disclosure summary::-webkit-details-marker {
    display: none;
}

.profit-formula-disclosure summary strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 1.25rem;
}

.profit-formula-toggle {
    position: relative;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eff6ff;
}

.profit-formula-toggle::before,
.profit-formula-toggle::after {
    position: absolute;
    top: 15px;
    left: 9px;
    width: 14px;
    height: 2px;
    content: "";
    background: #2563eb;
    transition: transform .2s ease;
}

.profit-formula-toggle::after {
    transform: rotate(90deg);
}

.profit-formula-disclosure[open] .profit-formula-toggle::after {
    transform: rotate(0);
}

.profit-formula-content {
    padding: 0 24px 22px;
}

.profit-formula-content > p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: .85rem;
    line-height: 1.5;
}

.profit-formula-list {
    margin: 0;
}

.profit-formula-list > div {
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
}

.profit-formula-list dt {
    margin-bottom: 4px;
    color: #334155;
    font-size: .82rem;
    font-weight: 900;
}

.profit-formula-list dd {
    margin: 0;
    color: #64748b;
    font-size: .8rem;
    line-height: 1.45;
}

.profit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profit-button span {
    font-size: 1.2rem;
}

@media (max-width: 640px) {
    .profit-projection {
        padding: 16px;
    }

    .profit-card-header > div:first-child {
        width: 100%;
    }

    .profit-result-card {
        position: static;
    }
}
