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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: #1a1a2e;
  background: #f4f6fb;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

header {
  padding: 1rem 0;
  border-bottom: 1px solid #dde3ef;
  margin-bottom: 1.5rem;
}

.header-actions {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.header-actions a {
  color: #2563eb;
  text-decoration: none;
}

.locale-switcher {
  display: inline-flex;
  gap: 0.35rem;
  margin-right: 0.75rem;
}

.locale-switcher a {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.8rem;
}

.locale-switcher a.active {
  background: #e0e7ff;
  color: #2563eb;
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
}

header a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
}

h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

label {
  display: block;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.password-toggle:hover,
.password-toggle:focus {
  background: #f1f5f9;
  color: #2563eb;
  outline: none;
}

.password-toggle::before {
  content: "👁";
  font-size: 1rem;
}

.password-toggle.is-visible::before {
  content: "🙈";
}

.command-list {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.9rem;
}

.command-list ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.command-list li {
  margin-bottom: 0.35rem;
}

.command-list code {
  background: #e2e8f0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.setup-steps {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.setup-steps li {
  margin-bottom: 0.4rem;
}

.wrap-code {
  display: block;
  margin-top: 0.35rem;
  padding: 0.5rem;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 0.8rem;
  word-break: break-all;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary {
  background: #64748b;
}

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

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

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

.btn-disabled,
.btn:disabled,
a.btn-disabled {
  background: #cbd5e1;
  color: #64748b;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.error {
  color: #dc2626;
  font-size: 0.9rem;
}

.success {
  color: #16a34a;
}

.portal-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.portal-item label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: normal;
  cursor: pointer;
}

.legal-content {
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.legal-content ul {
  padding-left: 1.25rem;
}

.wizard-progress {
  position: relative;
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.wizard-progress-bar {
  background: #2563eb;
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.wizard-progress-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
  text-align: center;
}

.checkbox-label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: normal;
  margin-top: 1rem;
  cursor: pointer;
}

.checkbox-label input {
  margin-top: 0.2rem;
}

.hint {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.75rem;
}

.hint-center {
  text-align: center;
}

.watcher-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.watcher-item {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e8ecf4;
}

.watcher-body {
  margin-bottom: 0.5rem;
}

.watcher-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.watcher-inline-form {
  margin: 0;
  display: inline;
}

.watcher-interval {
  margin-top: 0.15rem;
}

input[type="url"],
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.full-width-form input,
.full-width-form select {
  width: 100%;
}

.watcher-url {
  word-break: break-all;
  font-size: 0.85rem;
}

.watcher-form {
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.muted {
  color: #64748b;
}

footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

footer a {
  color: #64748b;
}
