/* --- PAGE LAYOUT (centers everything) --- */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  background: #f1f5f9;
  font-family: system-ui, sans-serif;
}

/* --- Main container card --- */
.container {
  width: 100%;
  max-width: 480px;

  margin-top: 40px;
  padding: 28px;

  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);

  text-align: center; /* centers header + title */
}

/* Top credit text */
.top-credit {
  display: block;
  width: 100%;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Title */
h1 {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 22px;
  color: #0f172a;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: #e2e8f0;
  color: #334155;
  cursor: pointer;
}

.tab.active {
  background: #0ea5e9;
  color: white;
}

.tab-content {
  display: none;
  text-align: left; /* aligns form fields */
}

.tab-content.active {
  display: block;
}

/* --- FORM ALIGNMENT FIX (IMPORTANT!) --- */
.tab-content label {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 0;
}

.tab-content input[type="number"],
.tab-content input[type="text"],
.tab-content select {
  width: 100%;
  box-sizing: border-box; /* ensures equal left/right spacing */
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
  outline: none;
}

/* Checkboxes */
.checkboxes label {
  margin: 6px 0;
  font-weight: 400;
  color: #334155;
}

/* Password row */
.password-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.password-row input {
  flex: 1;
}

/* Buttons */
button {
  margin-top: 18px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #0ea5e9;
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover:not(:disabled) {
  background: #0284c7;
}

button:active:not(:disabled) {
  transform: scale(0.97);
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Strength label */
#strengthLabel {
  margin-top: 14px;
  font-weight: 500;
  color: #1e293b;
}

/* Strength bar */
#strengthBar {
  height: 10px;
  width: 100%;
  background: #475569;
  border-radius: 6px;
  margin-top: 6px;
  transition: background 0.3s ease;
}

/* Error + info text */
.error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 4px;
}

.info {
  color: #0ea5e9;
  font-size: 14px;
  margin-top: 4px;
}

/* --- User ID Generator Styles --- */
.userid-section {
  margin-top: 1rem;
  padding: 1.5rem;
  background: #1e293b;
  border-radius: 8px;
}

.userid-section h2 {
  margin-bottom: 1rem;
  color: #38bdf8;
}

.userid-section label {
  display: block;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

#uidResults {
  margin-top: 1.5rem;
}

.uid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.uid-row span {
  font-family: monospace;
  font-size: 1rem;
  color: #e2e8f0;
}

.uid-row button {
  padding: 0.25rem 0.75rem;
  background: #38bdf8;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #0f172a;
  font-weight: bold;
}

.uid-row button:hover {
  background: #7dd3fc;
}
