:root {
  --tl-primary: #1f4e79;
  --tl-accent: #f58220;
  --tl-bg: #0f172a;
  --tl-surface: #ffffff;
  --tl-border: #e2e8f0;
  --tl-text: #0f172a;
  --tl-muted: #64748b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at top, #1e293b 0%, #0b1220 70%) fixed;
  color: var(--tl-text);
  min-height: 100dvh;
  line-height: 1.5;
}

.tl-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  min-height: 100dvh;
}

.tl-header {
  text-align: center;
  color: #fff;
  margin-bottom: 22px;
}
.tl-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: #fff;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.tl-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.tl-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.tl-sub {
  margin: 4px 0 0;
  font-size: 0.92rem;
  opacity: 0.78;
}

.tl-alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.86rem;
  margin-bottom: 14px;
  line-height: 1.4;
}
.tl-alert code {
  background: rgba(0,0,0,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
}
.tl-alert-warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.tl-card {
  background: var(--tl-surface);
  border-radius: 20px;
  padding: 22px 22px 24px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.45);
}
.tl-card h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--tl-primary);
  font-weight: 800;
}
.tl-hint {
  margin: 0 0 16px;
  color: var(--tl-muted);
  font-size: 0.88rem;
}

.tl-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tl-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.tl-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--tl-border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--tl-text);
  font-family: inherit;
  margin-bottom: 14px;
}
.tl-input:focus {
  outline: none;
  border-color: var(--tl-primary);
  box-shadow: 0 0 0 3px rgba(31,78,121,0.18);
}
.tl-input-code {
  letter-spacing: 0.5em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 1.4rem;
  text-align: center;
}

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  text-decoration: none;
  transition: filter 0.12s;
}
.tl-btn:disabled { opacity: 0.6; cursor: progress; }
.tl-btn:hover:not(:disabled) { filter: brightness(1.05); }
.tl-btn-primary {
  background: var(--tl-primary);
  color: #fff;
  width: 100%;
}
.tl-btn-link {
  background: transparent;
  border: 0;
  color: var(--tl-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 6px;
}
.tl-btn-link:hover { color: var(--tl-text); }

.tl-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tl-actions .tl-btn-primary { width: auto; flex: 1 1 auto; }

.tl-feedback {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2em;
}
.tl-feedback-loading { color: var(--tl-muted); }
.tl-feedback-ok { color: #047857; }
.tl-feedback-error { color: #b91c1c; }

.tl-footer {
  margin-top: 20px;
  text-align: center;
}
.tl-footer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.86rem;
}
.tl-footer a:hover { color: #fff; }
