* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f0f2f8 0, #f5f6fa 40%, #ffffff 100%);
  color: #323846;
}

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

.card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d6dbe7;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  padding: 24px 28px 24px;
  max-width: 640px;
  width: 100%;
}

.card-header {
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

h2 {
  margin: 10px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.subtext {
  margin: 0;
  font-size: 13px;
  color: #6b7384;
}

.form {
  margin-top: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 13px;
  font-weight: 500;
  color: #4a5160;
  margin-bottom: 6px;
}

.required {
  color: #c62828;
}

input[type="text"] {
  width: 100%;
  padding: 9px 11px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #d6dbe7;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  background-color: #fdfdff;
}

input[type="text"]:focus {
  border-color: #0056b3;
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.12);
  background-color: #ffffff;
}

.actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: linear-gradient(135deg, #0056b3, #003f82);
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease;
  box-shadow: 0 6px 14px rgba(0, 65, 130, 0.35);
}

.btn-primary:hover {
  opacity: 0.96;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 65, 130, 0.25);
}

.status {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7384;
  min-height: 18px;
}

.status.error {
  color: #c62828;
}

.ubo-result {
  margin-top: 18px;
  border-top: 1px solid #edf0f7;
  padding-top: 12px;
}

.hidden {
  display: none;
}

.result-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
}

.label {
  font-weight: 500;
  color: #4a5160;
}

.value {
  font-weight: 500;
  color: #1f2430;
  word-break: break-word;
}

/* Password overlay */
.password-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
}
.password-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15,23,42,0.28);
}
.password-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}
body.locked .page {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.hidden { display: none !important; }
