/* Auth page styles with Tailwind CSS variables and custom components */

:root {
  /* Color variables matching the Vue app theme */
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-gray-950: #030712;
  --color-red-500: #ef4444;
  --color-red-900: #7f1d1d;
  --color-green-500: #22c55e;
  --color-blue-500: #3b82f6;

  /* Theme variables */
  --background: var(--color-white);
  --foreground: var(--color-gray-950);
  --card: var(--color-white);
  --card-foreground: var(--color-gray-950);
  --popover: var(--color-white);
  --popover-foreground: var(--color-gray-950);
  --primary: var(--color-gray-900);
  --primary-foreground: var(--color-gray-50);
  --secondary: var(--color-gray-100);
  --secondary-foreground: var(--color-gray-900);
  --muted: var(--color-gray-100);
  --muted-foreground: var(--color-gray-500);
  --accent: var(--color-gray-100);
  --accent-foreground: var(--color-gray-900);
  --destructive: var(--color-red-500);
  --destructive-foreground: var(--color-gray-50);
  --border: var(--color-gray-200);
  --input: var(--color-gray-200);
  --ring: var(--color-gray-950);
  --radius: 0.5rem;
}

[data-theme="dark"] {
  --background: var(--color-gray-950);
  --foreground: var(--color-gray-50);
  --card: var(--color-gray-950);
  --card-foreground: var(--color-gray-50);
  --popover: var(--color-gray-950);
  --popover-foreground: var(--color-gray-50);
  --primary: var(--color-gray-50);
  --primary-foreground: var(--color-gray-900);
  --secondary: var(--color-gray-800);
  --secondary-foreground: var(--color-gray-50);
  --muted: var(--color-gray-800);
  --muted-foreground: var(--color-gray-400);
  --accent: var(--color-gray-800);
  --accent-foreground: var(--color-gray-50);
  --destructive: var(--color-red-900);
  --destructive-foreground: var(--color-gray-50);
  --border: var(--color-gray-800);
  --input: var(--color-gray-800);
  --ring: var(--color-gray-300);
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* Container and layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.space-y-4>*+* {
  margin-top: 1rem;
}

.space-y-6>*+* {
  margin-top: 1.5rem;
}

/* Card component */
.card {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-header {
  padding: 1.5rem;
  padding-bottom: 1rem;
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

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

/* Button component */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  text-decoration: none;
  height: 2.5rem;
  padding: 0 1rem;
  gap: 0.5rem;
}

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

.button:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.button-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.button-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.button-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.button-secondary:hover:not(:disabled) {
  opacity: 0.8;
}

.button-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.button-destructive:hover:not(:disabled) {
  opacity: 0.9;
}

.button-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
}

.button-outline:hover:not(:disabled) {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.button-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.button-ghost:hover:not(:disabled) {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.button-lg {
  height: 2.75rem;
  border-radius: var(--radius);
  padding: 0 2rem;
}

.button-sm {
  height: 2.25rem;
  border-radius: calc(var(--radius) - 2px);
  padding: 0 0.75rem;
}

/* Input component */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--background);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
}

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

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

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

/* Label component */
.label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--foreground);
}

/* Alert component */
.alert {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.alert-destructive {
  border-color: var(--destructive);
  color: var(--destructive);
  background-color: color-mix(in srgb, var(--destructive) 10%, transparent);
}

.alert-info {
  border-color: var(--color-blue-500);
  color: var(--color-blue-500);
  background-color: color-mix(in srgb, var(--color-blue-500) 10%, transparent);
}

.alert-success {
  border-color: var(--color-green-500);
  color: var(--color-green-500);
  background-color: color-mix(in srgb, var(--color-green-500) 10%, transparent);
}

.alert-title {
  margin-bottom: 0.25rem;
  font-weight: 500;
  line-height: 1.25;
  font-size: 0.875rem;
}

.alert-description {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Form group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Link styles */
.link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease-in-out;
}

.link:hover {
  opacity: 0.8;
}

/* Loading spinner */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility classes */
.w-full {
  width: 100%;
}

.max-w-sm {
  max-width: 24rem;
}

.max-w-md {
  max-width: 28rem;
}

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

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

.inline-flex {
  display: inline-flex;
}

/* Icon styles */
.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }

  .card {
    margin: 1rem;
  }

  .card-header,
  .card-content {
    padding: 1rem;
  }
}