/* Estilo general */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    margin: 0;
    padding: 20px;
    color: #333;
}
.container {
    max-width: 1000px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
h1 {
    color: #2c3e50;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
    margin-top: 0;
}
h2 {
    color: #34495e;
    margin-top: 40px;
}
h3 {
    color: #3498db;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 5px;
    margin-top: 30px;
}
/* Formularios */
.form-container {
    max-width: 450px;
    margin: 20px auto;
}
form {
    display: flex;
    flex-direction: column;
}
label {
    margin-bottom: 8px;
    font-weight: 600;
}
input[type="text"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}
button, .button {
    background-color: #e74c3c;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}
button:hover, .button:hover {
    background-color: #c0392b;
}
button.danger-btn, button.danger {
    background-color: #95a5a6;
    font-size: 12px;
    padding: 5px 10px;
}
button.danger-btn:hover, button.danger:hover {
    background-color: #7f8c8d;
}
/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}
.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-info span {
    font-weight: bold;
    color: #e74c3c;
}
.logout-btn, .nav-link {
    text-decoration: none;
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}
.logout-btn:hover, .nav-link:hover {
    background-color: #2980b9;
}
/* Pestañas */
.tabs {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}
.tab-link {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    color: #34495e;
}
.tab-link:hover {
    background-color: #ddd;
}
.tab-link.active {
    background-color: #f1f1f1;
    border-bottom: 3px solid #e74c3c;
}
.tab-content {
    display: none;
    padding: 6px 12px;
    border-top: none;
    animation: fadeIn 0.5s;
}
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}
/* Layout de dos columnas */
.content-split {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.form-section {
    flex: 1;
    min-width: 300px;
}
.table-section {
    flex: 2;
    min-width: 400px;
    overflow-x: auto;
}
/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
td.actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
i {
    margin-right: 8px;
}
.input-group {
    display: flex;
    gap: 10px;
}
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.card {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
}
.card.profit-bg { border-left-color: #27ae60; }
.card.loss-bg { border-left-color: #e74c3c; }
.card h3 { margin-top: 0; font-size: 16px; }
.card .value { font-size: 24px; font-weight: bold; }
.dashboard-filter {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.filter-buttons {
    display: flex;
    gap: 10px;
}
.quick-date {
    background-color: #95a5a6;
    padding: 8px 12px;
    font-size: 14px;
}
.multiselect {
    position: relative;
}
.select-box {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 12px 15px;
    cursor: pointer;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dropdown-list {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    width: 100%;
}
.dropdown-list label {
    display: block;
    padding: 10px 15px;
}
.dropdown-list label:hover {
    background-color: #f1f1f1;
}
.dropdown-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}
/* Responsive */
@media screen and (max-width: 768px) {
    .header, .dashboard-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    .content-split {
        flex-direction: column;
    }
    .tabs {
        display: flex;
        flex-direction: column;
    }
    .tab-link {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }
    .tab-link.active {
        border-left: 3px solid #e74c3c;
        border-bottom: 1px solid #ddd;
    }
    td.actions {
        flex-direction: column;
    }
}