/* assets/css/pages/profit-calculator.css */

:root {
    --pc-bg: #0f172a;
    --pc-card: rgba(30, 41, 59, 0.7);
    --pc-border: rgba(255, 255, 255, 0.08);
    --pc-primary: #8b5cf6;
    --pc-success: #10b981;
    --pc-danger: #ef4444;
    --pc-warning: #f59e0b;
    --pc-info: #3b82f6;
}

body {
    background-color: var(--pc-bg);
}

.profit-wrapper {
    padding: 120px 0 80px;
    min-height: 80vh;
    background-image: radial-gradient(circle at top left, rgba(139, 92, 246, 0.1), transparent 50%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.05), transparent 50%);
}

.profit-header {
    text-align: center;
    margin-bottom: 50px;
}

.badge-premium {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.profit-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.profit-title span {
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profit-desc {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.profit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .profit-grid {
        grid-template-columns: 1fr;
    }

    .profit-title {
        font-size: 2.4rem;
    }

    .profit-wrapper {
        padding: 90px 0 50px;
    }
}

.profit-card {
    background: var(--pc-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--pc-border);
    border-radius: 24px;
    padding: 35px;
    display: flex;
    flex-direction: column;
}

/* INPUTS */
.pc-group {
    margin-bottom: 22px;
}

.pc-label {
    display: block;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.pc-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: 0.3s;
    overflow: hidden;
}

.pc-input-wrap:focus-within {
    border-color: var(--pc-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.pc-prefix {
    padding: 14px 0 14px 18px;
    color: #64748b;
    font-weight: 600;
    font-size: 1.1rem;
}

.pc-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 14px 18px 14px 10px;
    font-weight: 700;
    font-size: 1.1rem;
    outline: none;
    -moz-appearance: textfield;
}

.pc-input::-webkit-outer-spin-button,
.pc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fs-7 {
    font-size: 0.9rem;
}

.fs-8 {
    font-size: 0.8rem;
}

/* RESULTS AND CHART */
.rc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.rc-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-profit {
    background: rgba(16, 185, 129, 0.15);
    color: var(--pc-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-loss {
    background: rgba(239, 68, 68, 0.15);
    color: var(--pc-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Stacked Bar */
.stacked-bar {
    display: flex;
    height: 16px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
    margin-bottom: 15px;
}

.sb-segment {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-cost {
    background: var(--pc-info);
}

.bg-expense {
    background: var(--pc-warning);
}

.bg-tax {
    background: #cbd5e1;
}

.bg-profit {
    background: var(--pc-success);
}

.bg-loss {
    background: var(--pc-danger);
}

.sb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.leg-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.rc-list {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.rc-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.rc-item:last-child {
    border: none;
}

.net-profit-box {
    margin-top: 30px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.4s;
}

.net-profit-box.is-loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
}

.np-title {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.np-margin {
    color: #94a3b8;
    font-size: 0.95rem;
}

.np-amount {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pc-success);
    letter-spacing: -1px;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.net-profit-box.is-loss .np-amount {
    color: var(--pc-danger);
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* CTA Block */
.profit-cta {
    background: linear-gradient(to right, rgba(139, 92, 246, 0.15), rgba(0, 0, 0, 0.4));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 35px 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    backdrop-filter: blur(10px);
}

.pcta-icon {
    font-size: 2.5rem;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.pcta-text h3 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pcta-text p {
    color: #94a3b8;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.pcta-btn {
    margin-left: auto;
    background: var(--pc-primary);
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.pcta-btn:hover {
    background: #7c3aed;
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .profit-cta {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
    }

    .pcta-btn {
        margin: 0 auto;
    }
}