:root {
    --imv-red: #BF0008;
    --imv-red-hover: #a00007;
    --bg-color: #F8F9FA;
    --text-main: #1a1a1a;
    --text-muted: #6c757d;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.calculator-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.card-header-custom {
    background-color: #111827;
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.header-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.calc-row {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    background-color: #fff;
}

.calc-row.active {
    border: 2px solid var(--imv-red);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(191, 0, 8, 0.15);
    position: relative;
    z-index: 10;
}

.calc-row:not(.active) {
    border-color: #dee2e6;
    background-color: #fcfcfc;
}

.label-main {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.label-sub {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}
.calc-row.active .label-sub {
    color: var(--imv-red);
    font-weight: 700;
}

.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.calc-row.active .status-badge {
    background-color: var(--imv-red);
    color: white;
}
.calc-row.active .status-badge::after {
    content: "INPUT";
}

.calc-row:not(.active) .status-badge {
    background-color: #6c757d;
    color: white;
}
.calc-row:not(.active) .status-badge::after {
    content: "OUTPUT";
}

.custom-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
input:checked + .slider {
    background-color: var(--imv-red);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

.form-control-custom {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.calc-row.active .form-control-custom {
    border-color: #9ca3af;
    background-color: #fff;
}
.calc-row.active .form-control-custom:focus {
    border-color: var(--imv-red);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(191, 0, 8, 0.25);
}

.form-control-custom:disabled {
    background-color: #f3f4f6;
    color: #111827;
    font-weight: 700;
    border-color: #e5e7eb;
    opacity: 1;
    cursor: default;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

select.form-control-custom:disabled {
    font-weight: 500;
    color: #4b5563;
}

.btn-imv-primary {
    background-color: var(--imv-red);
    border-color: var(--imv-red);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(191, 0, 8, 0.2);
}
.btn-imv-primary:hover {
    background-color: var(--imv-red-hover);
    border-color: var(--imv-red-hover);
    color: white;
}
.btn-imv-secondary {
    background-color: white;
    border-color: #d1d5db;
    color: #374151;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}
.btn-imv-secondary:hover {
    background-color: #f3f4f6;
    color: #111827;
}

#notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    display: none;
}
.toast-body-success {
    background-color: white;
    border-left: 4px solid #10B981;
    color: #1f2937;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.toast-body-error {
    background-color: #111827;
    border-left: 4px solid var(--imv-red);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.guide-text {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.step-num {
    background-color: var(--imv-red);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}