:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 160 100% 24%;
  --primary-foreground: 151 81% 96%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --destructive: 0 84.2% 60.2%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 160 100% 24%;
  --radius: 0.5rem;
}

.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 5.9%;
  --card-foreground: 0 0% 98%;
  --primary: 160 100% 19%;
  --primary-foreground: 151 81% 96%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --destructive: 0 62.8% 70.6%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 160 100% 19%;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.brand {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card {
  width: 100%;
  max-width: 26rem;
  margin: 4rem auto;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

input {
  width: 100%;
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background: transparent;
  color: inherit;
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  outline: none;
}

input:focus {
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

button {
  font: inherit;
  cursor: pointer;
}

button.primary,
button.ghost,
button.link {
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  padding: 0 1rem;
  width: 100%;
}

button.primary {
  border: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  margin-top: 0.5rem;
}

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.ghost {
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  width: auto;
}

button.link {
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}

.muted {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.error {
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-list a {
  display: block;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  color: inherit;
  text-decoration: none;
}

.app-list a:hover {
  background: hsl(var(--secondary));
}
