:root {
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --destructive: #dc2626;
  --ring: #a1a1aa;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.auth-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 6px;
  background: #18181b;
}

.brand-mark i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: #fafafa;
}

.brand-mark i:nth-child(1) {
  height: 5px;
}

.brand-mark i:nth-child(2) {
  height: 8px;
}

.brand-mark i:nth-child(3) {
  height: 12px;
}

.dot {
  color: var(--muted-foreground);
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}

.auth-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.auth-heading p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 20px 0;
  padding: 3px;
  border-radius: 6px;
  background: var(--muted);
}

.auth-tab {
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
}

.auth-tab:hover {
  color: var(--foreground);
}

.auth-tab.is-active {
  border-color: var(--border);
  background: var(--card);
  color: var(--foreground);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-field > span {
  font-size: 13px;
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-field input::placeholder {
  color: #a1a1aa;
}

.auth-field input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(161, 161, 170, 0.25);
}

.auth-field input:user-invalid {
  border-color: var(--destructive);
}

.auth-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 13px;
  font-weight: 500;
}

.auth-submit:hover:not(:disabled) {
  background: #27272a;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-foot {
  margin: 18px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: center;
}

.auth-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

.auth-link:hover {
  text-decoration-color: var(--foreground);
}

.auth-secure {
  margin: 14px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 420px) {
  .auth-card {
    padding: 20px;
  }
}
