/* ===== RESET & BASE ===== */
.fpsc-wrap * {
    box-sizing: border-box;
}

.fpsc-wrap {
    max-width: 1180px;
    margin: 30px auto;
    color: #172033;
    background: #ffffff;
    border: 1px solid #e8ebf0;
    box-shadow: 0 18px 55px rgba(22, 32, 51, .08);
    border-radius: 14px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* ===== HEADER ===== */
.fpsc-head {
    background: linear-gradient(100deg, #ff8a00, #ff7200);
    color: #fff;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.fpsc-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fpsc-brand > span {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .2);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 19px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-brand strong {
    font-size: 23px;
    display: block;
    line-height: 1.2;
    font-weight: 700;
}

.fpsc-brand small {
    opacity: .9;
    font-size: 12px;
    font-weight: 400;
}

.fpsc-badge {
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, .45);
    padding: 8px 11px;
    border-radius: 30px;
}

/* ===== GRID LAYOUT ===== */
.fpsc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.fpsc-panel {
    padding: 31px 29px;
}

.fpsc-result-panel {
    background: #fcfcfd;
    border-left: 1px solid #eceef2;
}

.fpsc-section-title {
    font-size: 13px;
    letter-spacing: .7px;
    font-weight: 800;
    color: #7e8798;
    margin-bottom: 24px;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== FORM LABELS ===== */
.fpsc-form-panel label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    display: block;
    margin: 0 0 8px;
    color: #29344a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== CRITICAL: INPUT OVERRIDES ===== */
/* Force all inputs to use our styles */
.fpsc-wrap input,
.fpsc-wrap select,
.fpsc-wrap textarea,
.fpsc-wrap .fpsc-field,
.fpsc-wrap .fpsc-input-wrap input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    color: #1a2332 !important;
    background: #ffffff !important;
    border: 2px solid #e2e6ed !important;
    border-radius: 10px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
}

/* Input focus state */
.fpsc-wrap input:focus,
.fpsc-wrap select:focus,
.fpsc-wrap textarea:focus,
.fpsc-wrap .fpsc-field:focus,
.fpsc-wrap .fpsc-input-wrap input:focus {
    border-color: #ff7a00 !important;
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.08) !important;
    background: #ffffff !important;
}

/* Input hover state */
.fpsc-wrap input:hover,
.fpsc-wrap select:hover,
.fpsc-wrap .fpsc-field:hover {
    border-color: #c8ced9 !important;
}

/* Placeholder styling */
.fpsc-wrap input::placeholder,
.fpsc-wrap textarea::placeholder,
.fpsc-wrap .fpsc-field::placeholder {
    color: #b0b9cb !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== SELECT DROPDOWN ===== */
.fpsc-wrap select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a93' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;
    padding-right: 44px !important;
    cursor: pointer !important;
}

.fpsc-wrap select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 7l5-5 5 5' stroke='%23ff7a00' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.fpsc-wrap select option {
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: #ffffff !important;
    color: #1a2332 !important;
}

/* ===== MAIN INPUT FIELD CLASS ===== */
.fpsc-field {
    margin-bottom: 18px !important;
}

/* ===== INPUT WITH ICON WRAPPER ===== */
.fpsc-input-wrap {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 2px solid #e2e6ed !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: all 0.25s ease !important;
    margin-bottom: 18px !important;
    height: 48px !important;
}

.fpsc-input-wrap:focus-within {
    border-color: #ff7a00 !important;
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.08) !important;
}

.fpsc-input-wrap:hover {
    border-color: #c8ced9 !important;
}

.fpsc-input-wrap span {
    padding: 0 14px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #6b7a93 !important;
    background: #f5f7fa !important;
    height: 100% !important;
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-right: 1px solid #e2e6ed !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-input-wrap input {
    border: none !important;
    outline: none !important;
    height: 100% !important;
    width: 100% !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #1a2332 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.fpsc-input-wrap input:focus {
    box-shadow: none !important;
    border: none !important;
}

.fpsc-input-wrap input::placeholder {
    color: #b0b9cb !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* ===== TWO COLUMN ===== */
.fpsc-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.fpsc-two .fpsc-field {
    margin-bottom: 18px !important;
}

.optional {
    font-size: 10px;
    text-transform: none;
    color: #9aa2ae;
    font-weight: 400;
}

/* ===== NOTE ===== */
.fpsc-note {
    font-size: 12px;
    line-height: 1.6;
    padding: 12px 16px;
    background: #fff7ef;
    border-left: 4px solid #ff8500;
    color: #7a5a3a;
    border-radius: 6px;
    margin: -8px 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== WEIGHT DISPLAY ===== */
.fpsc-weight-result {
    height: 48px !important;
    box-sizing: border-box !important;
    border: 2px dashed #ffb16b !important;
    background: #fff8f0 !important;
    border-radius: 10px !important;
    padding: 0 16px !important;
    color: #e07000 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    margin-bottom: 18px !important;
    display: flex !important;
    align-items: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== TOGGLE ROW ===== */
.fpsc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px dashed #e2e5ea;
}

.fpsc-toggle-row b {
    display: block;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-toggle-row small {
    display: block;
    color: #9098a7;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== SWITCH TOGGLE ===== */
.fpsc-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.fpsc-switch input {
    display: none;
}

.fpsc-switch i {
    display: block;
    width: 48px;
    height: 26px;
    border-radius: 30px;
    background: #d6dbe3;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.fpsc-switch i:after {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
}

.fpsc-switch input:checked + i {
    background: #ff8500;
}

.fpsc-switch input:checked + i:after {
    left: 25px;
}

/* ===== DETAILS / ACCORDION ===== */
.fpsc-extra {
    margin-top: 18px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.fpsc-extra summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #ff7900;
    margin-bottom: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    outline: none;
    user-select: none;
    list-style: none;
}

.fpsc-extra summary::-webkit-details-marker {
    display: none;
}

.fpsc-extra summary:before {
    content: "▶ ";
    font-size: 12px;
    transition: 0.2s;
}

.fpsc-extra[open] summary:before {
    content: "▼ ";
}

/* ===== RESULT PANEL ===== */
.fpsc-price-card {
    background: #fff8f1;
    border-radius: 10px;
    padding: 17px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-price-card span {
    font-weight: 600;
    font-size: 15px;
    color: #1a2332;
}

.fpsc-price-card strong {
    font-size: 22px;
    color: #f47b00;
    font-weight: 800;
}

.fpsc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed #dfe3e9;
    color: #5a6a82;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-line b {
    color: #e53e3e;
    font-weight: 600;
}

.fpsc-line em {
    font-style: normal;
    font-weight: 600;
}

.fpsc-subtotal {
    font-weight: 700;
    color: #1a2332;
    border-bottom: 0;
    padding-top: 15px;
    font-size: 15px;
}

.fpsc-subtotal b {
    color: #c0392b;
    font-weight: 800;
    font-size: 16px;
}

.fpsc-profit-line {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    font-weight: 700;
    color: #1a2332;
    font-size: 16px;
    border-top: 2px solid #eef0f3;
    margin-top: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-profit-line strong {
    font-size: 22px;
}

/* ===== SETTLEMENT ===== */
.fpsc-settlement {
    margin-top: 10px;
    border: 1px solid #ffb86e;
    background: #fff7ec;
    border-radius: 12px;
    padding: 17px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-settlement span {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a2332;
}

.fpsc-settlement small {
    display: block;
    color: #a08061;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 400;
}

.fpsc-settlement strong {
    font-size: 26px;
    color: #f47800;
    font-weight: 800;
}

/* ===== SUGGESTION ===== */
.fpsc-suggestion {
    margin-top: 16px;
    border: 2px solid #ff9b32;
    background: #fff7ed;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-suggestion span {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a2332;
}

.fpsc-suggestion small {
    display: block;
    color: #98734e;
    font-size: 12px;
    margin-top: 3px;
    font-weight: 400;
}

.fpsc-suggestion strong {
    font-size: 26px;
    color: #ef7600;
    white-space: nowrap;
    font-weight: 800;
}

.fpsc-suggestion-meta {
    font-size: 12px;
    color: #7d8592;
    margin-top: 8px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== METRICS ===== */
.fpsc-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.fpsc-metrics div {
    background: #f8f9fb;
    border: 1px solid #eceff3;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-metrics span {
    font-size: 11px;
    color: #89919f;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fpsc-metrics b {
    font-size: 18px;
    display: block;
    margin-top: 4px;
    color: #1a2332;
}

/* ===== PROGRESS BAR ===== */
.fpsc-bar {
    height: 6px;
    background: #eef0f3;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 14px;
}

.fpsc-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff6b00, #ff8c00);
    border-radius: 10px;
    transition: 0.4s ease;
}

/* ===== ACTIONS ===== */
.fpsc-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.fpsc-actions button {
    border: 2px solid #d9dee6 !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 11px 22px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    transition: all 0.2s ease !important;
    color: #1a2332 !important;
    outline: none !important;
    box-shadow: none !important;
}

.fpsc-actions button:hover {
    background: #f5f7fa !important;
    border-color: #c8ced9 !important;
}

.fpsc-actions button:last-child {
    background: #ff8500 !important;
    border-color: #ff8500 !important;
    color: #ffffff !important;
}

.fpsc-actions button:last-child:hover {
    background: #e87800 !important;
    border-color: #e87800 !important;
    box-shadow: 0 4px 15px rgba(255, 133, 0, 0.3) !important;
}

/* ===== DISCLAIMER ===== */
.fpsc-disclaimer {
    font-size: 11px;
    line-height: 1.6;
    color: #9299a5;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.fpsc-disclaimer b {
    color: #6b7a93;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 780px) {
    .fpsc-wrap {
        margin: 15px 10px;
        border-radius: 12px;
    }
    
    .fpsc-head {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fpsc-brand strong {
        font-size: 18px;
    }
    
    .fpsc-brand small {
        display: none;
    }
    
    .fpsc-badge {
        display: none;
    }
    
    .fpsc-grid {
        grid-template-columns: 1fr;
    }
    
    .fpsc-result-panel {
        border-left: 0;
        border-top: 1px solid #eceef2;
    }
    
    .fpsc-panel {
        padding: 24px 18px;
    }
    
    .fpsc-two {
        gap: 10px;
    }
    
    .fpsc-settlement strong {
        font-size: 22px;
    }
    
    .fpsc-metrics {
        grid-template-columns: 1fr 1fr;
    }
    
    .fpsc-metrics div:last-child {
        grid-column: 1 / -1;
    }
    
    .fpsc-suggestion {
        flex-direction: column;
        text-align: center;
    }
    
    .fpsc-settlement {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .fpsc-price-card {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}

@media (max-width: 440px) {
    .fpsc-two {
        grid-template-columns: 1fr;
    }
    
    .fpsc-metrics {
        grid-template-columns: 1fr;
    }
    
    .fpsc-metrics div:last-child {
        grid-column: auto;
    }
    
    .fpsc-line {
        font-size: 13px;
    }
    
    .fpsc-profit-line strong {
        font-size: 18px;
    }
}

/* ===== PRINT ===== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .fpsc-wrap,
    .fpsc-wrap * {
        visibility: visible;
    }
    
    .fpsc-wrap {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .fpsc-form-panel {
        display: none !important;
    }
    
    .fpsc-grid {
        display: block;
    }
    
    .fpsc-result-panel {
        border: 0;
    }
    
    .fpsc-actions,
    .fpsc-disclaimer {
        display: none;
    }
}