/* Reset & Base Tipográfica */
.calc-card-container,
.calc-card-container * {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

/* Contenedor Principal Glassmorphism */
.calc-card-container {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 35px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.calc-section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #9acd32;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Estilos de Entradas / Formulario */
.calc-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    display: block;
}

.calc-input-select,
.calc-input-number {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
}

.calc-input-select:hover,
.calc-input-number:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.calc-input-select:focus,
.calc-input-number:focus {
    border-color: #9acd32 !important;
    box-shadow: 0 0 14px rgba(154, 205, 50, 0.25) !important;
    background: rgba(0, 0, 0, 0.45) !important;
}

/* Agrupación de Input con Addon de Moneda */
.calc-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.calc-input-addon {
    background: rgba(154, 205, 50, 0.15);
    border: 1px solid rgba(154, 205, 50, 0.3);
    border-right: none;
    color: #9acd32;
    font-weight: 800;
    border-radius: 12px 0 0 12px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: 14px;
}

.calc-input-group .calc-input-number {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Toggle Segmented Cards para Tipo de Cálculo */
.calc-toggle-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.calc-toggle-card {
    position: relative;
}

.calc-toggle-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.calc-toggle-label {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    height: 100%;
}

.calc-toggle-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.calc-toggle-card input[type="radio"]:checked+.calc-toggle-label {
    background: rgba(154, 205, 50, 0.12);
    border-color: #9acd32;
    box-shadow: 0 6px 18px rgba(154, 205, 50, 0.15);
}

.calc-toggle-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.calc-toggle-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

/* Panel de Resultados Estilo Terminal/Dashboard */
.results-dashboard {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.result-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-item-row:last-child {
    border-bottom: none;
}

.result-item-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.result-item-value-group {
    text-align: right;
}

.result-item-value {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.result-item-subvalue {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    display: block;
}

.result-item-value.highlight-liquido {
    font-size: 22px;
    color: #9acd32;
    text-shadow: 0 0 12px rgba(154, 205, 50, 0.3);
}

.result-item-value.highlight-retencion {
    color: #f59e0b;
}

/* Note Banner */
.calc-info-note {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 12px;
    color: #bff8ff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* Promo Box */
.portfolio-promo-card {
    border: 1px solid rgba(154, 205, 50, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    margin-top: 25px;
}

.btn-copy-calc {
    color: #9acd32;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btn-copy-calc:hover {
    color: #a9dc3e;
    transform: scale(1.1);
}

/* Custom Custom Checkbox UI */
.calc-checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    margin-bottom: 10px;
}

.calc-checkbox-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.calc-checkbox-card input[type="checkbox"] {
    accent-color: #9acd32;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.calc-checkbox-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Output Terminal Area */
.lorem-textarea {
    width: 100%;
    height: 320px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: #e0e0e0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.25s ease;
}

.lorem-textarea:focus {
    border-color: rgba(154, 205, 50, 0.4);
}

/* Badges de Contadores */
.stat-badge {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.stat-badge span {
    color: #9acd32;
    font-weight: 700;
}

/* Botones de Acción */
.btn-action-main {
    width: 100%;
    padding: 12px;
    background: #9acd32;
    color: #000000;
    font-size: 14px;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(154, 205, 50, 0.2);
}

.btn-action-main:hover {
    background: #a9dc3e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(154, 205, 50, 0.35);
}

/* Drag & Drop Zone */
.dropzone-container {
    border: 2px dashed rgba(154, 205, 50, 0.4);
    background: rgba(154, 205, 50, 0.03);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.dropzone-container:hover,
.dropzone-container.dragover {
    border-color: #9acd32;
    background: rgba(154, 205, 50, 0.08);
    box-shadow: 0 0 20px rgba(154, 205, 50, 0.15);
}

.dropzone-icon {
    font-size: 32px;
    color: #9acd32;
    margin-bottom: 10px;
    display: block;
}

.dropzone-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    font-weight: 600;
}

.dropzone-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.dropzone-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Range Slider Styling */
.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calc-range-slider {
    flex: 1;
    accent-color: #9acd32;
    cursor: pointer;
}

.range-val-badge {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-weight: 700;
    color: #9acd32;
    background: rgba(154, 205, 50, 0.12);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(154, 205, 50, 0.3);
    font-size: 13px;
}

/* Results Area */
.converted-item-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.converted-item-info {
    flex: 1;
    min-width: 0;
}

.converted-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.converted-item-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    display: block;
}

.badge-saving {
    font-size: 11px;
    font-weight: 800;
    color: #9acd32;
    background: rgba(154, 205, 50, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 6px;
}

/* Action Buttons */
.btn-download-item {
    background: rgba(154, 205, 50, 0.15);
    color: #9acd32;
    border: 1px solid rgba(154, 205, 50, 0.3);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-download-item:hover {
    background: #9acd32;
    color: #000000;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .calc-card-container {
        padding: 20px;
    }

    .calc-toggle-group {
        grid-template-columns: 1fr;
    }

    .result-item-value.highlight-liquido {
        font-size: 19px;
    }
}