* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0f1115;
  color: #e6e8eb;
  font-family: Arial, Helvetica, sans-serif;
}
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.box {
  background: #171a21;
  padding: 32px;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.box h2 { margin-top: 0; text-align: center; }
.box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #2a2f3a;
  background: #0f1115;
  color: #e6e8eb;
}
button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}
button:hover { background: #2563eb; }
button:disabled { background: #3a3f4a; cursor: not-allowed; }
.error { color: #ff6b6b; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.wrap h1 { font-size: 22px; }
.topbar { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #9aa4b2; text-decoration: none; }

textarea {
  width: 100%;
  min-height: 160px;
  background: #171a21;
  color: #e6e8eb;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.card {
  background: #171a21;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
}
.card.unmatched { opacity: .5; }
.card img { width: 100%; height: 210px; object-fit: cover; display: block; background: #232733; }
.card .info { padding: 8px; font-size: 13px; }
.card .name { font-weight: bold; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .status { color: #9aa4b2; font-size: 12px; }
.card label { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #10131a; }

.actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.log { margin-top: 16px; font-size: 13px; color: #9aa4b2; white-space: pre-wrap; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #3a3f4a; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
