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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.2em;
    font-weight: 300;
    text-align: center;
}

.section {
    background: #ffffff;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.section-header {
    background: #34495e;
    color: #ecf0f1;
    padding: 15px 25px;
    font-size: 1em;
    font-weight: 500;
}

.section-header2 {
    background: #34495e;
    color: #ecf0f1;
    padding: 15px 25px;
    font-size: 1em;
    font-weight: 500;
}

.section-content {
    padding: 25px;
    padding-bottom: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    padding: 12px;
    /* Mantener padding cómodo */
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    min-height: 50px;
    /* Asegurar altura suficiente para ver texto completo */
    line-height: 1.5;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.calculation-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.calculation-table th {
    background: #34495e;
    color: #ecf0f1;
    padding: 15px 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9em;
}

.calculation-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e6ed;
    font-size: 0.9em;
}

.calculation-table td input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    text-align: center;
    background: #f8f9fa;
}

.calculation-table .readonly {
    background: #f1f3f4;
    color: #5f6368;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-card h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card .value {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table th {
    background: #34495e;
    color: #ecf0f1;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e6ed;
}

.transactions-table tr:hover {
    background: #f8f9fa;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .calculation-table {
        font-size: 0.8em;
    }

    .calculation-table th,
    .calculation-table td {
        padding: 8px 5px;
    }
}