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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #0f172a;
  background: #eef2f7;
}

.hidden {
  display: none !important;
}

.muted {
  color: #64748b;
}

.error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 12px;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card,
.import-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgb(15 23 42 / 8%);
}

.login-card h1,
.import-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.login-card label,
.file-field {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="url"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
}

.file-field input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 400;
}

.file-summary {
  margin: 12px 0 0;
  font-size: 13px;
}

.admin-screen {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #0f2744;
  color: #fff;
}

.brand {
  font-weight: 700;
  font-size: 16px;
}

.main {
  display: flex;
  justify-content: center;
  padding: 32px 16px 64px;
}

.main-wide {
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.main-wide .import-card,
.main-wide .lots-card {
  max-width: 960px;
}

.lots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lots-head h2 {
  margin: 0;
}

.btn-secondary {
  margin-top: 0;
  background: #e2e8f0;
  color: #0f172a;
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-sm {
  margin-top: 0;
  padding: 6px 10px;
  font-size: 12px;
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #991b1b;
}

.btn-warn {
  background: #b45309;
  color: #fff;
}

.btn-warn:hover:not(:disabled) {
  background: #92400e;
}

.btn-ok {
  background: #15803d;
  color: #fff;
}

.btn-ok:hover:not(:disabled) {
  background: #166534;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.lots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lots-table th,
.lots-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.lots-table th {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.lots-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-on {
  background: #dcfce7;
  color: #166534;
}

.badge-off {
  background: #fee2e2;
  color: #991b1b;
}

.slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #475569;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  background: #0b6bcb;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #0958a8;
}

.btn-lg {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
}

.btn-ghost {
  margin-top: 0;
  background: transparent;
  color: #cbd5e1;
}

.btn-ghost:hover {
  color: #fff;
}

.log {
  margin-top: 20px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
  z-index: 50;
}

.toast.is-ok {
  background: #166534;
}

.toast.is-error {
  background: #991b1b;
}
