* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    touch-action: manipulation;
}

body * {
    user-select: none;
}

input,
textarea,
select {
    user-select: auto !important;
}

.logo-container {
    margin-bottom: 30px;
}

.logo {
    max-width: 400px;
    height: auto;
    display: block;
}

.container {
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 15px 35px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 650px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
}

.form-box {
    margin-bottom: 20px;
}

.form-box h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--text-color);
}

form label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-color);
    transition: all 0.3s;
}

form input:focus {
    border-color: #F75934;
    outline: none;
}

button[type="submit"] {
    margin-top: 20px;
    padding: 16px 28px;
    border: none;
    background: linear-gradient(135deg, #F75934 0%, #FF8E2B 100%);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    width: 100%;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(247, 89, 52, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 89, 52, 0.4);
    background: linear-gradient(135deg, #e64a2a 0%, #F75934 100%);
}

.result-box {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.panel {
    flex: 1;
    background: var(--input-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    box-shadow: 0 4px 10px var(--shadow-color);
}

.panel h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.panel p {
    margin: 5px 0;
    color: #555;
    font-size: 0.95rem;
}

.comercial {
    color: #a855f7;
}

.real {
    color: #22c55e;
}

.value {
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #F75934 0%, #ffd200 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader-logo {
    width: 300px;
    height: auto;
}

.preloader-icon {
    width: 120px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.footer {
    width: 100%;
    text-align: center;
    padding: 15px 10px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    margin-top: 30px;
}

.mode-toggle {
    display: flex;
    background: var(--input-bg);
    padding: 6px;
    border-radius: 50px;
    margin-bottom: 25px;
    justify-content: space-between;
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--input-border);
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--footer-text);
    padding: 12px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
    font-size: 0.95rem;
    width: auto;
    /* Reset base button width */
}

.toggle-btn.active {
    background: var(--card-bg);
    color: #F75934;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.toggle-btn:hover:not(.active) {
    color: #F75934;
    background: rgba(247, 89, 52, 0.05);
    transform: none;
    /* Reset base button hover transform */
    box-shadow: none;
    /* Reset base button hover shadow */
}

.hidden {
    display: none !important;
}

select.input-select {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-color);
    cursor: pointer;
    appearance: none;
}

@media (max-width: 600px) {
    body {
        align-items: stretch;
        padding: 10px;
    }

    .logo {
        max-width: 220px;
        margin: 10px auto;
    }

    .container {
        padding: 20px;
        border-radius: 10px;
        box-shadow: none;
        width: 100%;
    }

    .result-box {
        flex-direction: column;
    }

    .footer {
        font-size: 11px;
    }
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #F75934 0%, #FF8E2B 100%);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(247, 89, 52, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(247, 89, 52, 0.3);
    color: #fff;
    cursor: pointer;
}