* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1115;
  color: #e8e8ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #171a21;
  border: 1px solid #2a2e38;
  border-radius: 16px;
  padding: 28px 24px;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #8b8f9a;
  margin: 0 0 24px;
  font-size: 0.9rem;
}

.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #3a3f4c;
  border-radius: 12px;
  padding: 32px 16px;
  cursor: pointer;
  color: #b7bac2;
  transition: border-color 0.15s, background 0.15s;
  min-height: 96px;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #5b7fff;
  background: #1b2030;
}

.drop-zone small {
  color: #6d7280;
}

.field {
  margin-top: 20px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #b7bac2;
  margin-bottom: 6px;
}

select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #3a3f4c;
  background: #10131a;
  color: #e8e8ea;
  font-size: 0.9rem;
}

.hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #6d7280;
}

button {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: #5b7fff;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

button:disabled {
  background: #2a2e38;
  color: #6d7280;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  background: #4468e0;
}

.status {
  margin-top: 18px;
  font-size: 0.85rem;
  padding: 12px;
  border-radius: 8px;
  background: #10131a;
  border: 1px solid #2a2e38;
  white-space: pre-wrap;
  word-break: break-word;
}

.status.error {
  border-color: #6b2b2b;
  color: #ff8a8a;
}

.status.success {
  border-color: #2b6b3f;
  color: #7cf0a0;
}

/* ---- Access gate ---- */
.gate-backdrop {
  position: fixed;
  inset: 0;
  background: #0f1115;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.gate-backdrop[hidden] {
  display: none;
}

.gate-card {
  text-align: center;
}

.gate-card h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.gate-card p {
  font-size: 0.85rem;
  color: #8b8f9a;
  margin: 0 0 20px;
}

.gate-card input[type="password"] {
  width: 100%;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #3a3f4c;
  background: #10131a;
  color: #e8e8ea;
  margin-bottom: 12px;
}

.gate-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #8b8f9a;
  margin-bottom: 4px;
  cursor: pointer;
}

.gate-remember input {
  width: auto;
  margin: 0;
  accent-color: #5b7fff;
}

.gate-error {
  color: #ff8a8a;
  font-size: 0.8rem;
  min-height: 1.2em;
  margin-top: 10px;
}
