* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(ellipse at 20% 10%, #d1fae5 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, #dbeafe 0%, transparent 50%),
        #f0fdf4;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #1f2937;
}

.calc-wrap { width: 100%; max-width: 460px; }

.calc-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 25px 60px -15px rgba(14, 122, 95, 0.25), 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.calc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.calc-logo {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #0e7a5f, #10b981);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 26px;
    box-shadow: 0 8px 20px rgba(14,122,95,.3);
}
.calc-header h1 {
    font-size: 1.4rem;
    color: #065f46;
    letter-spacing: .3px;
}
.calc-header p {
    font-size: .85rem;
    color: #6b7280;
}

.field { margin-bottom: 22px; }
.field-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.field-top label {
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.field-top em {
    font-style: normal;
    color: #0e7a5f;
    font-weight: 700;
}
.field-top .value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #065f46;
}

/* === SLIDERS === */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #0e7a5f var(--fill,50%), #e5e7eb var(--fill,50%));
    outline: none;
    cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 7px solid #0e7a5f;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    cursor: grab;
    transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type=range]::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.2); }
input[type=range]::-moz-range-thumb {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 7px solid #0e7a5f;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    cursor: grab;
}

/* === TERM BUTTONS === */
.terms {
    display: flex;
    gap: 10px;
    margin: 26px 0;
}
.term {
    flex: 1;
    padding: 12px 0;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    font-weight: 700;
    font-size: .95rem;
    color: #6b7280;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.term:hover { border-color: #0e7a5f; color: #0e7a5f; transform: translateY(-2px); }
.term.active {
    background: linear-gradient(135deg, #0e7a5f, #10b981);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(14,122,95,.35);
}

/* === RESULT === */
.result {
    background: linear-gradient(135deg, #065f46, #0e7a5f);
    border-radius: 20px;
    padding: 22px;
    text-align: center;
    color: #fff;
    box-shadow: inset 0 2px 10px rgba(255,255,255,.15), 0 10px 25px rgba(6,95,70,.3);
}
.result-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .85;
}
.result-value {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 6px 0 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.result-value.pulse { animation: pulse .35s ease; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.result-sub { font-size: .8rem; opacity: .75; }

/* === BREAKDOWN === */
.breakdown { margin-top: 24px; }
.bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e7eb;
}
.bar span { transition: width .5s ease; }
#barPrincipal { background: linear-gradient(90deg, #10b981, #34d399); }
#barInterest { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.legend {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: .88rem;
    color: #4b5563;
}
.legend div { display: flex; align-items: center; gap: 8px; }
.legend b { margin-left: auto; color: #111827; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.p { background: #10b981; }
.dot.i { background: #f59e0b; }
.dot.t { background: #065f46; }

@media (max-width: 480px) {
    .calc-card { padding: 24px 18px; }
    .result-value { font-size: 2.2rem; }
}

/* === DEMO BANNER (not included in purchased version) === */
.demo-banner{
    position:fixed;
    bottom:18px;
    left:50%;
    transform:translateX(-50%);
    background:linear-gradient(135deg,#065f46 0%,#10b981 100%);
    color:#fff;
    padding:14px 28px;
    border-radius:60px;
    font-weight:700;
    font-size:15px;
    text-decoration:none;
    z-index:9999;
    box-shadow:0 10px 30px rgba(14,122,95,.45);
    white-space:nowrap;
    transition:all .25s ease;
    letter-spacing:.3px;
    animation:demoBannerPulse 2.5s ease-in-out infinite;
}
.demo-banner:hover{
    transform:translateX(-50%) translateY(-3px) scale(1.03);
    box-shadow:0 15px 40px rgba(14,122,95,.6);
}
@keyframes demoBannerPulse{
    0%,100%{box-shadow:0 10px 30px rgba(14,122,95,.45)}
    50%{box-shadow:0 10px 30px rgba(14,122,95,.65), 0 0 25px rgba(16,185,129,.35)}
}
@media (max-width:480px){
    .demo-banner{font-size:13px;padding:12px 22px;bottom:12px}
}