:root {
    --primary-blue: #004ba0;
    --light-blue: #e3f2fd;
    --bg-gray: #f4f7fa;
    --text-dark: #333333;
    --text-muted: #666666;
    --input-bg: #f8f9fa;
    --white: #ffffff;
}

/* Scoped styles for calculator to avoid header/footer conflict */
.main-wrapper {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
}

.main-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.main-header {
    text-align: center;
    margin-bottom: 2rem;
}

.top-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #007bff;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    font-style: italic;
    color: var(--primary-blue);
    letter-spacing: -1px;
}

.calc-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    background: #edf2f7;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.tab.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.main-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    align-items: start;
}

.card {
    background: var(--white);
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.inner-group {
    margin-bottom: 2rem;
}

.inner-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Radio Pill Group */
.radio-pill-group {
    display: flex;
    gap: 1rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.radio-item:hover {
    background: #f0f4f8;
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
}

.radio-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Custom Select for logic compatibility */
.custom-select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: var(--input-bg);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Amount Input Box */
.amount-input-box {
    background: var(--input-bg);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-pre {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

#cuantia {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1.5rem;
    font-weight: 600;
    color: #d0d0d0;
    /* Match placeholder style in image */
    outline: none;
}

#cuantia:focus {
    color: var(--text-dark);
}

/* Arbitrator Selector V2 (Toggles) */
.arbitrator-selector-v2 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.switch-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.switch-item:has(input:checked) {
    background: #e1f5fe;
    border-color: #2ecc71;
}

.switch-container {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2ecc71;
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.hidden-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
}

/* Results Card Styling */
.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.res-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
}

.res-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.res-group {
    margin-bottom: 2rem;
}

.main-item {
    margin-bottom: 0.2rem;
}

.text-blue {
    color: var(--primary-blue);
    font-size: 0.85rem;
}

.bold {
    font-size: 1.3rem;
    font-weight: 700;
}

.res-sub {
    font-size: 0.65rem;
    color: #ccc;
    font-weight: 600;
}

.res-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 1.5rem 0;
}

.total-item .res-label {
    color: var(--text-dark);
    font-size: 1rem;
}

.total-item .res-value {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.grand-total-box {
    background: var(--primary-blue);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.total-value {
    color: white;
    font-weight: 700;
    font-size: 2.2rem;
}

@media (max-width: 850px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

/* Conversion Summary Styles */
.conversion-summary {
    background: #fcfdfe;
    border: 1px solid #f0f4f8;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.summary-table-container {
    overflow-x: auto;
}

.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.summary-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f1f1f1;
}

.summary-table td {
    padding-top: 1rem;
    font-size: 0.95rem;
    vertical-align: middle;
}

.summary-table .bold {
    font-weight: 700;
}

.summary-table .text-blue {
    color: var(--primary-blue);
}