* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Tu degradado original */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 25px;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.input-wrapper input {
    padding-left: 30px;
}

input:focus, select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.resultado-detalle {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    align-items: center;
}

.resultado-item .label {
    color: #718096;
    font-weight: 500;
}

.resultado-item .valor {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1em;
}

.negativo {
    color: #e53e3e !important;
}

.small-text {
    font-size: 0.9em;
}

.divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0;
}

.destacado-suave {
    background: #ebf4ff;
    padding: 10px;
    border-radius: 8px;
    margin: 5px 0;
}

.destacado .label {
    color: #c05621;
}

.destacado .valor {
    color: #c05621;
}

.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #cbd5e0;
}

.total .label {
    color: #2d3748;
    font-size: 1.2em;
    font-weight: 800;
}

.total .valor {
    color: #667eea;
    font-size: 1.5em;
    font-weight: 800;
}

.nota {
    margin-top: 15px;
    font-size: 0.8em;
    color: #a0aec0;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9em;
}

.config-link {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
}
.config-link:hover { color: white; }

/* --- ESTILOS DEL MODAL (Panel de Admin) --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal h2 {
    color: #2d3748;
    margin-bottom: 5px;
}

.modal-info {
    font-size: 0.9em;
    color: #e53e3e;
    margin-bottom: 20px;
    background: #fff5f5;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #e53e3e;
}

.config-group {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.config-group h3 {
    font-size: 1em;
    color: #4a5568;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.config-group input {
    padding: 8px;
    margin-bottom: 5px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save { background: #667eea; color: white; }
.btn-save:hover { background: #5a67d8; }

.btn-reset { background: #edf2f7; color: #4a5568; }
.btn-reset:hover { background: #e2e8f0; color: #e53e3e; }