* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, "Microsoft YaHei", sans-serif; background: #f0f2f5; display: flex; min-height: 100vh; }

.sidebar {
  width: 60px; background: #1e2a3a; display: flex; flex-direction: column;
  align-items: center; padding: 15px 0; gap: 12px;
  position: fixed; top: 0; left: 0; bottom: 0;
}
.sidebar .logo {
  width: 40px; height: 40px; border-radius: 8px; background: #222;
  display: flex; align-items: center; justify-content: center;
  color: #4caf50; font-size: 22px; margin-bottom: 10px;
}
.nav-btn {
  width: 40px; height: 40px; border-radius: 8px; background: #2c3e50;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: bold;
  cursor: pointer; transition: 0.2s; text-decoration: none;
}
.nav-btn:hover { background: #34495e; transform: scale(1.05); }
.nav-btn.active { background: #1976d2; }
.nav-btn.add { background: #27ae60; font-size: 22px; margin-top: auto; }
.nav-btn.add:hover { background: #2ecc71; }

.main { margin-left: 60px; flex: 1; padding: 20px; }

.filter { background: white; padding: 20px; border-radius: 8px; margin-bottom: 15px; }
.filter-row { margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { color: #333; font-size: 14px; min-width: 60px; }
.filter-row label { font-size: 14px; color: #555; cursor: pointer; margin-right: 14px; }
input[type="text"], input[type="date"], input[type="number"], select {
  padding: 5px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px;
}
.btn {
  padding: 6px 18px; border: none; border-radius: 4px; cursor: pointer;
  background: #1976d2; color: white; font-size: 14px;
}
.btn:hover { background: #1565c0; }
.btn-sort {
  padding: 5px 14px; border: 1px solid #ddd; background: white;
  border-radius: 4px; cursor: pointer; font-size: 13px;
}
.btn-sort.active { background: #1976d2; color: white; border-color: #1976d2; }

.item {
  background: white; padding: 18px 20px; margin-bottom: 10px; border-radius: 8px;
  display: grid; grid-template-columns: 110px 1fr 100px 120px;
  gap: 20px; align-items: start;
}
.col-date { color: #333; font-size: 14px; }
.col-main { min-width: 0; }
.col-star { text-align: center; color: #bbb; font-size: 20px; cursor: pointer; user-select: none; transition: 0.2s; }
.col-star:hover { color: #f39c12; transform: scale(1.2); }
.col-star.starred { color: #f39c12; }
.col-price { text-align: right; font-weight: bold; color: #333; font-size: 15px; }

.category { font-weight: bold; font-size: 16px; color: #333; margin-bottom: 8px; }
.link { color: #1976d2; font-size: 13px; text-decoration: none; word-break: break-all; }
.link:hover { text-decoration: underline; }
.stats { color: #666; font-size: 13px; margin-top: 8px; }

.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-left: 8px; }
.tag-green { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tag-red   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.tag-blue  { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

.expire { color: #666; font-size: 13px; text-align: right; margin-top: 6px; }

.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; margin-top: 15px; padding: 15px; background: white;
  border-radius: 8px; font-size: 13px;
}
.pagination a, .pagination span {
  padding: 5px 11px; border: 1px solid #ddd; border-radius: 4px;
  text-decoration: none; color: #333; background: white;
}
.pagination a:hover { background: #f5f5f5; }
.pagination .current { background: #1976d2; color: white; border-color: #1976d2; }
.pagination .info { color: #888; margin-left: 10px; border: none; background: transparent; }