* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #14161a;
  color: #e8eaed;
}
a { color: inherit; text-decoration: none; }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login {
  background: #1e2127;
  padding: 32px;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.login h1 { margin: 0 0 8px; font-size: 20px; }
.login input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #333842;
  background: #14161a;
  color: #e8eaed;
  font-size: 15px;
}
button {
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
button:hover { background: #2f6fe0; }
.error { color: #ff6b6b; margin: 0; font-size: 14px; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #1e2127;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { margin: 0; font-size: 18px; }
.count {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 13px;
  margin-left: 6px;
  vertical-align: middle;
}

main { padding: 24px; }
section { margin-bottom: 32px; }
section h2 { font-size: 15px; color: #aeb4bf; font-weight: 600; }
.empty { color: #aeb4bf; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.cell {
  background: #1e2127;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s;
}
.cell:hover { transform: translateY(-2px); }
.cell .thumb { display: block; }
.cell img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0d0f12;
  display: block;
}
.cell .id {
  font-size: 11px;
  color: #7a818d;
  padding: 6px 8px 0;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell .del { margin: 0; padding: 6px 8px 8px; }
.cell .del button {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  background: #3a2226;
  color: #ff8a8a;
}
.cell .del button:hover { background: #5a2a30; color: #ffb0b0; }
