:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #34495e;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { display: flex; background-color: #f4f7f6; min-height: 100vh; color: var(--dark); }

/* SIDEBAR */
.sidebar { width: 260px; background: var(--primary); color: white; padding: 20px; position: fixed; height: 100vh; z-index: 1000; transition: 0.3s; }
.sidebar h2 { margin-bottom: 30px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
.sidebar ul { list-style: none; }
.sidebar button { width: 100%; padding: 12px; background: none; border: none; color: white; text-align: left; cursor: pointer; border-radius: 8px; margin-bottom: 5px; transition: 0.3s; }
.sidebar button:hover { background: rgba(255,255,255,0.1); }

/* CONTENIDO */
.content { margin-left: 260px; padding: 30px; width: 100%; }
section { display: none; }
section.active { display: block; }

/* DASHBOARD GRID */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-column { background: #eef2f3; padding: 15px; border-radius: 12px; }
.dash-column h3 { margin-bottom: 15px; color: var(--primary); text-align: center; border-bottom: 1px solid #ccc; }

.cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.card { background: white; padding: 15px; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 10px; }
.card-ingreso { border-left: 5px solid var(--success); }
.card-gasto { border-left: 5px solid var(--danger); }
.card-resaltada { background: var(--primary); color: white; }

/* TABLAS Y FORMULARIOS */
.table-wrapper { background: white; border-radius: 10px; overflow-x: auto; box-shadow: var(--shadow); margin-top: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
form { background: white; padding: 20px; border-radius: 10px; display: flex; flex-wrap: wrap; gap: 10px; box-shadow: var(--shadow); margin-bottom: 20px; }
input, select { padding: 10px; border: 1px solid #ddd; border-radius: 5px; flex: 1; min-width: 120px; }

/* BOTONES */
.btn-main { padding: 10px 20px; border-radius: 5px; border: none; cursor: pointer; font-weight: bold; background: var(--accent); color: white; }
.btn-danger { background: var(--danger); color: white; padding: 5px 10px; border-radius: 4px; border: none; }

.floating-inventory { position: fixed; bottom: 0; left: 260px; right: 0; background: var(--primary); color: white; padding: 10px 30px; display: flex; justify-content: space-around; font-size: 14px; }

/* MOBILE */
.menu-toggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 1100; padding: 10px; }
@media (max-width: 768px) {
    .sidebar { left: -100%; width: 80%; }
    .sidebar.active { left: 0; }
    .content { margin-left: 0; padding-top: 60px; }
    .menu-toggle { display: block; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .floating-inventory { left: 0; }
}
.compra-item.marcado { text-decoration: line-through; opacity: 0.6; color: gray; }
.sugerencia-item { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; transition: 0.2s; }
.sugerencia-item:hover { background: #f0f7ff; }

