/* ============================================================
   SIMULADOR — ESTILOS PRINCIPALES
   Premium Dark Theme | Glass Morphism | Animated Accents
   Mobile-First | Inter Font
   ============================================================ */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
    /* Background Palette - Deep space */
    --color-bg:             #06080f;
    --color-bg-elevated:    rgba(13, 17, 28, 0.85);
    --color-bg-card:        rgba(16, 21, 35, 0.9);
    --color-bg-input:       rgba(20, 26, 44, 0.95);
    --color-bg-glass:       rgba(15, 19, 32, 0.65);
    --color-border:         rgba(255, 255, 255, 0.06);
    --color-border-subtle:  rgba(255, 255, 255, 0.03);
    --color-border-focus:   rgba(99, 179, 237, 0.6);

    /* Text */
    --color-text-primary:    #edf2f7;
    --color-text-secondary:  #a0aec0;
    --color-text-muted:      #5a6782;

    /* Blue spectrum */
    --color-blue:           #63b3ed;
    --color-blue-deep:      #4299e1;
    --color-blue-glow:      rgba(99, 179, 237, 0.15);
    --color-blue-subtle:    rgba(99, 179, 237, 0.06);

    /* Emerald */
    --color-emerald:        #68d391;
    --color-emerald-deep:   #48bb78;
    --color-emerald-glow:   rgba(104, 211, 145, 0.15);
    --color-emerald-subtle: rgba(104, 211, 145, 0.06);

    /* Gold */
    --color-gold:           #ecc94b;
    --color-gold-deep:      #d69e2e;
    --color-gold-glow:      rgba(236, 201, 75, 0.15);
    --color-gold-subtle:    rgba(236, 201, 75, 0.06);

    /* Rose / Danger */
    --color-rose:           #fc8181;
    --color-rose-glow:      rgba(252, 129, 129, 0.15);

    /* Gradients */
    --gradient-primary:     linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-btn:         linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-blue:        linear-gradient(135deg, #4299e1, #63b3ed);
    --gradient-emerald:     linear-gradient(135deg, #38a169, #68d391);
    --gradient-gold:        linear-gradient(135deg, #d69e2e, #ecc94b);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs:   0.6875rem;
    --font-size-sm:   0.8125rem;
    --font-size-base: 0.9375rem;
    --font-size-md:   1.0625rem;
    --font-size-lg:   1.25rem;
    --font-size-xl:   1.625rem;
    --font-size-2xl:  2.25rem;
    --font-size-3xl:  3rem;

    /* Spacing */
    --space-2xs:  0.125rem;
    --space-xs:   0.25rem;
    --space-sm:   0.5rem;
    --space-md:   0.75rem;
    --space-lg:   1rem;
    --space-xl:   1.5rem;
    --space-2xl:  2rem;
    --space-3xl:  3rem;
    --space-4xl:  4rem;

    /* Borders & Radius */
    --radius-sm:   0.5rem;
    --radius-md:   0.75rem;
    --radius-lg:   1rem;
    --radius-xl:   1.25rem;
    --radius-2xl:  1.5rem;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:    0 10px 40px rgba(0,0,0,0.5);
    --shadow-xl:    0 20px 60px rgba(0,0,0,0.6);
    --shadow-inner: inset 0 1px 0 rgba(255,255,255,0.04);

    /* Transitions */
    --transition-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:  250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:  500ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
}


/* ---- Animated Background Orbs ---- */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -200px;
    left: -100px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.bg-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.08), transparent 70%);
    top: 40%;
    left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(80px, 50px) scale(1.1); }
    66%      { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-60px, -40px) scale(1.05); }
    66%      { transform: translate(40px, -60px) scale(0.9); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    50%      { transform: translate(-50%, -60px) scale(1.15); }
}


/* ---- Header ---- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 8, 15, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.header-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #a0aec0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-badge {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-blue);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid rgba(99, 179, 237, 0.2);
    border-radius: var(--radius-sm);
    background: var(--color-blue-subtle);
}


/* ---- Main Layout ---- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}


/* ---- Section Styles ---- */
.form-section {
    background: var(--color-bg-elevated);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-lg), var(--shadow-inner);
    animation: fadeSlideUp 0.6s var(--transition-slow) both;
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.section-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--color-blue-glow);
    border: 1px solid rgba(99, 179, 237, 0.15);
    color: var(--color-blue);
    flex-shrink: 0;
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.section-title svg {
    color: var(--color-blue);
    flex-shrink: 0;
}

.section-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-2xs);
}


/* ---- Form Grid ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}


/* ---- Input Groups ---- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix,
.input-suffix {
    position: absolute;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
    z-index: 2;
}

.input-prefix {
    left: var(--space-lg);
}

.input-suffix {
    right: var(--space-lg);
}

.input-field {
    width: 100%;
    padding: var(--space-lg);
    background: var(--color-bg-input);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all var(--transition-base);
    outline: none;
    min-height: 60px;
    box-shadow: var(--shadow-inner);
}

.input-field::placeholder {
    color: var(--color-text-muted);
}

.input-field:hover {
    border-color: rgba(99, 179, 237, 0.2);
    background: rgba(20, 26, 44, 0.98);
}

.input-field:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px var(--color-blue-glow), var(--shadow-inner);
    background: rgba(20, 26, 44, 1);
}

/* Input with prefix padding */
.input-wrapper .input-field {
    padding-left: 2.5rem;
}

/* Input with suffix */
.input-wrapper:has(.input-suffix) .input-field {
    padding-right: 2.5rem;
    padding-left: var(--space-lg);
}

/* Both prefix and suffix */
.input-wrapper:has(.input-prefix):has(.input-suffix) .input-field {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

/* Only suffix - no prefix */
.input-wrapper > .input-field:first-child {
    padding-left: var(--space-lg);
}

.input-wrapper:has(.input-field:focus) .input-prefix,
.input-wrapper:has(.input-field:focus) .input-suffix {
    color: var(--color-blue);
}

.input-field-small {
    width: 80px;
    text-align: center;
    min-height: 44px;
}

/* Error States */
.input-error {
    font-size: var(--font-size-xs);
    color: var(--color-rose);
    opacity: 0;
    transform: translateY(-4px);
    transition: all var(--transition-fast);
    pointer-events: none;
}

.input-group.has-error .input-field {
    border-color: var(--color-rose);
    box-shadow: 0 0 0 3px var(--color-rose-glow), var(--shadow-inner);
}

.input-group.has-error .input-error {
    opacity: 1;
    transform: translateY(0);
}

/* Remove number input spinners */
.input-field::-webkit-outer-spin-button,
.input-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-field[type=number] {
    -moz-appearance: textfield;
}


/* ---- Slider Styles ---- */
.slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.input-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    border-radius: 3px;
    background: rgba(20, 26, 44, 0.95);
    outline: none;
    cursor: pointer;
}

.input-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    border: 2px solid rgba(255,255,255,0.15);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.input-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.6);
}

.input-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    border: 2px solid rgba(255,255,255,0.15);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.slider-value-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.slider-unit {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: -0.25rem;
    padding: 0 2px;
}


/* ---- Primary Button ---- */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-lg) var(--space-2xl);
    min-height: 54px;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: #fff;
    background: var(--gradient-btn);
    background-size: 200% 200%;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25), var(--shadow-inner);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
    border-radius: inherit;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4), 0 0 60px rgba(99, 102, 241, 0.15);
    background-position: 100% 0;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Ripple */
.btn-primary .ripple {
    position: absolute;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.25);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}


/* ---- Secondary Button ---- */
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
    background: var(--color-bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    min-height: 54px;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    color: var(--color-text-primary);
    border-color: rgba(99, 179, 237, 0.3);
    background: var(--color-blue-subtle);
    box-shadow: 0 2px 10px rgba(99, 179, 237, 0.1);
}


/* ---- Results Section ---- */
.results-section {
    animation: fadeSlideUp 0.5s var(--transition-slow) both;
}

.results-section.hidden {
    display: none;
}


/* ---- Main Result Card ---- */
.resultado-destacado {
    background: #111827; /* Gris oscuro para contraste */
    border: 2px solid #1D4ED8; /* Azul marino destacado */
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    text-align: center;
    margin-bottom: var(--space-2xl);
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.2);
}

.resultado-label {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.resultado-valor {
    font-size: 3rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: var(--space-xl);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#btn-toggle-detalle {
    margin: 0 auto;
    width: auto;
}


/* ---- Table Section ---- */
.table-section {
    background: var(--color-bg-elevated);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg), var(--shadow-inner);
    position: relative;
    overflow: hidden;
}

.table-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: var(--font-size-sm);
    font-variant-numeric: tabular-nums;
}

.amortization-table thead th {
    background: rgba(15, 19, 32, 0.95);
    padding: var(--space-md) var(--space-lg);
    text-align: right;
    font-weight: 700;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 2;
}

.amortization-table thead th:first-child {
    text-align: center;
    border-radius: var(--radius-sm) 0 0 0;
}

.amortization-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.amortization-table tbody tr {
    transition: background var(--transition-fast);
}

.amortization-table tbody tr:hover {
    background: rgba(99, 179, 237, 0.04);
}

.amortization-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.amortization-table tbody tr:nth-child(even):hover {
    background: rgba(99, 179, 237, 0.04);
}

.amortization-table tbody td {
    padding: var(--space-md) var(--space-lg);
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    color: var(--color-text-primary);
    white-space: nowrap;
}

.amortization-table tbody td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--color-text-muted);
}

.amortization-table tbody tr:last-child td {
    border-bottom: none;
}

/* Fecha column */
.amortization-table tbody td:nth-child(2) {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
}

/* Saldo Capital column - last */
.amortization-table tbody td:last-child {
    font-weight: 600;
}

/* Fila inicial (fila 0): saldo de arranque */
.amortization-table tbody tr.row-inicial {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #6366f1;
}

.amortization-table tbody tr.row-inicial td {
    font-weight: 600;
    color: var(--color-blue);
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.amortization-table tbody tr.row-inicial td:last-child {
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: var(--font-size-base);
}


/* ---- Footer ---- */
.footer {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-3xl);
    position: relative;
    z-index: 1;
}


/* ---- Animations ---- */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Row animation */
.amortization-table tbody tr {
    animation: fadeIn 0.25s ease both;
}

/* Summary card stagger */
.summary-card:nth-child(1) { animation: fadeSlideUp 0.5s ease 0.05s both; }
.summary-card:nth-child(2) { animation: fadeSlideUp 0.5s ease 0.15s both; }
.summary-card:nth-child(3) { animation: fadeSlideUp 0.5s ease 0.25s both; }


/* ---- Responsive Design ---- */

/* Tablet */
@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-group-full {
        grid-column: 1 / -1;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-primary {
        max-width: 380px;
        margin: 0 auto;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .main-content {
        padding: var(--space-3xl) var(--space-2xl);
    }

    .form-section {
        padding: var(--space-3xl);
    }

    .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl) var(--space-2xl);
    }

    .input-group-full {
        grid-column: 1 / -1;
    }

    .summary-card-value {
        font-size: var(--font-size-2xl);
    }

    .header-title {
        font-size: var(--font-size-xl);
    }
}


/* ---- Print Styles ---- */
@media print {
    @page {
        margin: 0mm; /* Elimina URL/fecha del navegador forzando margen 0 */
        /* Eliminamos 'size: portrait' para permitir elegir orientación libremente */
    }

    .no-print, .hide-print {
        display: none !important;
    }
    
    .print-only {
        display: inline !important;
    }

    body {
        margin: 15mm !important; /* Margen general de la hoja */
        background: #fff;
        color: #000;
        font-size: 10pt;
    }

    .bg-orbs {
        display: none;
    }

    .main-content {
        max-width: 100%;
        padding: 0;
    }

    .results-section {
        display: block !important;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

    .summary-card {
        border: 1px solid #000 !important;
        border-radius: 6px;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .summary-card-content {
        background: transparent !important;
        padding: 8px;
        border: none !important;
    }

    .summary-card-content::before {
        display: none;
    }

    .summary-card-glow {
        display: none;
    }

    .summary-card-value {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        background: none !important;
        font-size: 14pt;
    }

    .summary-card-label {
        color: #000 !important;
    }

    .summary-card-icon {
        display: none;
    }

    .table-section {
        background: transparent;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
        backdrop-filter: none;
    }

    .table-section::before {
        display: none;
    }

    .table-container {
        overflow: visible;
        border: none !important;
    }

    .amortization-table {
        width: 100%;
        min-width: unset;
        border-collapse: collapse;
        font-size: 7.5pt;
        border: 1px solid #000 !important;
    }

    .amortization-table thead th {
        background: #eee !important;
        color: #000 !important;
        padding: 4px 5px;
        border: 1px solid #000 !important; /* Fuerza borde negro absoluto */
        position: static;
        font-size: 7pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .amortization-table tbody td {
        padding: 3px 5px;
        border: 1px solid #000 !important; /* Fuerza borde negro absoluto para que no se quiebren las líneas */
        color: #000 !important;
        background: transparent !important;
    }

    .amortization-table tbody tr {
        background: transparent !important;
        border: none !important;
    }

    .amortization-table tbody tr:nth-child(even) {
        background: transparent !important; /* Elimina cualquier fondo para que no solape líneas */
    }

    /* Arreglo para Fila Inicial en impresión */
    .amortization-table tbody tr.row-inicial,
    .amortization-table tbody tr.row-inicial td {
        background: transparent !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }
    
    .amortization-table tbody tr.row-inicial td:last-child {
        font-weight: 600;
    }

    .footer { display: none; }

    .amortization-table tbody tr {
        page-break-inside: avoid;
    }

    .results-section::before {
        content: 'Plan de Pagos Vigente';
        display: block;
        font-size: 16pt;
        font-weight: 700;
        margin-bottom: 12px;
        text-align: center;
        color: #111;
    }
}


/* ---- Scrollbar ---- */
.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(20, 26, 44, 0.5);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(99, 179, 237, 0.2);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 179, 237, 0.35);
}


/* ---- Utility ---- */
.hidden {
    display: none !important;
}
