*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f4f5;
  color: #18181b;
  min-height: 100dvh;
}

.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100dvh;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #52525b;
}

input[type="text"],
input[type="password"] {
  padding: 0.75rem;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  font-size: 1rem;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-large {
  padding: 1.25rem;
  font-size: 1.125rem;
  width: 100%;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-success {
  background: #16a34a;
  color: #fff;
}

.btn-link {
  background: none;
  border: none;
  color: #71717a;
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem;
  align-self: center;
}

.page-count {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.5rem 0 0;
  color: #3f3f46;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  min-height: 4rem;
}

.thumbnails img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  background: #fff;
}

.status {
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
}

.status.success {
  background: #dcfce7;
  color: #166534;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.status.loading {
  background: #e0e7ff;
  color: #3730a3;
}

.hidden {
  display: none !important;
}

.error {
  color: #dc2626;
  font-size: 0.875rem;
  margin: 0;
}
