/* Design System Variables - All colors in HSL */
:root {
  --background: 210 40% 98%;
  --foreground: 215 25% 15%;

  --card: 0 0% 100%;
  --card-foreground: 215 25% 15%;

  --popover: 0 0% 100%;
  --popover-foreground: 215 25% 15%;

  --primary: 233 55% 36%;
  --primary-foreground: 0 0% 100%;

  --secondary: 233 55% 92%;
  --secondary-foreground: 233 55% 25%;

  --muted: 210 30% 94%;
  --muted-foreground: 215 15% 50%;

  --accent: 160 70% 45%;
  --accent-foreground: 0 0% 100%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;

  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 233 55% 36%;

  --radius: 0.75rem;
  
  /* Location page specific tokens */
  --location-gradient: linear-gradient(135deg, hsl(233 55% 36%) 0%, hsl(233 55% 45%) 100%);
  --success-gradient: linear-gradient(135deg, hsl(160 70% 45%) 0%, hsl(160 60% 55%) 100%);
  --shadow-soft: 0 4px 20px -2px hsl(233 55% 36% / 0.15);
  --shadow-strong: 0 10px 40px -5px hsl(233 55% 36% / 0.25);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark {
  --background: 215 30% 10%;
  --foreground: 210 40% 98%;

  --card: 215 28% 13%;
  --card-foreground: 210 40% 98%;

  --popover: 215 28% 13%;
  --popover-foreground: 210 40% 98%;

  --primary: 233 55% 40%;
  --primary-foreground: 0 0% 100%;

  --secondary: 233 25% 20%;
  --secondary-foreground: 210 40% 98%;

  --muted: 215 25% 18%;
  --muted-foreground: 215 15% 60%;

  --accent: 160 70% 45%;
  --accent-foreground: 0 0% 100%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;

  --border: 215 25% 22%;
  --input: 215 25% 22%;
  --ring: 233 55% 40%;
  
  --location-gradient: linear-gradient(135deg, hsl(233 55% 40%) 0%, hsl(233 55% 50%) 100%);
  --success-gradient: linear-gradient(135deg, hsl(160 70% 45%) 0%, hsl(160 60% 55%) 100%);
  --shadow-soft: 0 4px 20px -2px hsl(233 55% 40% / 0.2);
  --shadow-strong: 0 10px 40px -5px hsl(233 55% 40% / 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
}

/* Utility Classes */
.flex {
  display: flex;
}

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

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

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

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

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

.space-y-6 > *:first-child {
  margin-top: 0;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.p-8 {
  padding: 2rem;
}

.card.p-8 {
  padding: 2rem 2rem 2rem 2rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

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

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

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

.mr-2 {
  margin-right: 0.5rem;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 0.75rem;
}

.w-full {
  width: 100%;
}

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

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 1.75rem;
  font-weight: 700;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

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

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

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

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

.leading-tight {
  line-height: 1.25;
}

.rounded {
  border-radius: calc(var(--radius) - 2px);
}

.rounded-md {
  border-radius: calc(var(--radius) - 2px);
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-full {
  border-radius: 9999px;
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: hsl(var(--border));
}

.border-0 {
  border-width: 0;
}

.bg-background {
  background-color: hsl(var(--background));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.text-foreground {
  color: hsl(var(--foreground));
}

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

.text-primary {
  color: hsl(var(--primary));
}

.text-accent {
  color: hsl(var(--accent));
}

.text-destructive {
  color: hsl(var(--destructive));
}

.text-primary-foreground {
  color: hsl(var(--primary-foreground));
}

.bg-primary {
  background-color: hsl(var(--primary));
}

.bg-primary\/20 {
  background-color: hsl(var(--primary) / 0.2);
}

.bg-primary\/90 {
  background-color: hsl(var(--primary) / 0.9);
}

.bg-primary\/80 {
  background-color: hsl(var(--primary) / 0.8);
}

.bg-secondary {
  background-color: hsl(var(--secondary));
}

.bg-accent\/10 {
  background-color: hsl(var(--accent) / 0.1);
}

.bg-destructive\/10 {
  background-color: hsl(var(--destructive) / 0.1);
}

.border-accent\/20 {
  border-color: hsl(var(--accent) / 0.2);
}

.border-destructive\/20 {
  border-color: hsl(var(--destructive) / 0.2);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-strong {
  box-shadow: var(--shadow-strong);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.hover\:shadow-strong:hover {
  box-shadow: var(--shadow-strong);
}

.hover\:bg-primary\/90:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-gradient:hover:not(:disabled) {
  background: linear-gradient(to right, hsl(var(--primary) / 0.9), hsl(var(--primary)));
}

.underline {
  text-decoration-line: underline;
}

.hover\:underline:hover {
  text-decoration-line: underline;
}

.hover\:text-primary\/90:hover {
  color: hsl(var(--primary) / 0.9);
}

.underline-offset-4 {
  text-underline-offset: 4px;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.blur-2xl {
  filter: blur(40px);
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.h-10 {
  height: 2.5rem;
}

.h-11 {
  height: 2.75rem;
}

.h-14 {
  height: 3.5rem;
}

.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

.w-10 {
  width: 2.5rem;
}

/* Card Component */
.card {
  border-radius: 1rem;
  border: none;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
  overflow: hidden;
}

/* GPS Card Component */
.gps-card {
  width: 100%;
  max-width: 28rem;
}

.gps-card .card {
  border-radius: 1rem;
  border: none;
  background-color: hsl(var(--card));
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  padding: 2rem;
  width: 100%;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 200ms, color 200ms;
  outline: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

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

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-lg {
  height: 3.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

.btn-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  user-select: none;
}

.btn-default:hover:not(:disabled) {
  background-color: hsl(var(--primary) / 0.9);
  text-decoration: none;
}

.btn-default:active {
  background-color: hsl(var(--primary) / 0.8);
  transform: scale(0.98);
}

.btn-outline {
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  font-weight: 500;
}

.btn-outline:hover:not(:disabled) {
  background-color: hsl(var(--muted));
  border-color: hsl(var(--border));
}

.btn-gradient {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 500;
  border: none;
}

.btn-gradient:hover:not(:disabled) {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Status Message Styles */
.status-message {
  padding: 1rem;
  border-radius: 0.75rem;
  transition: all 300ms;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  text-align: left;
  margin: 0;
}

.status-message-success {
  background-color: hsl(var(--accent) / 0.1);
  border: 1px solid hsl(var(--accent) / 0.2);
}

.status-message-error {
  background-color: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.2);
  border-radius: 0.75rem;
}

.status-message-loading {
  background-color: hsl(var(--secondary));
}

.status-text-success {
  color: hsl(var(--accent));
}

.status-text-error {
  color: hsl(var(--destructive));
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.status-text-loading {
  color: hsl(var(--foreground));
}

.error-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--destructive));
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: hsl(var(--destructive));
}

/* Icon Container */
.icon-container {
  display: flex;
  justify-content: center;
}

.icon-wrapper {
  position: relative;
}

.icon-glow {
  display: none;
}

.icon-box {
  position: relative;
  background-color: hsl(var(--secondary));
  padding: 1.25rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto;
}

.icon-box svg {
  width: 2rem;
  height: 2rem;
  color: hsl(var(--primary));
}

/* Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* SVG Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

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

.icon svg,
.icon-lg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-lg {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-block;
  flex-shrink: 0;
}

/* Code element */
code {
  background-color: hsl(var(--muted));
  padding: 0.25rem 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.875em;
}

/* Logo Styles */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.logo-img {
  width: 200px;
  height: auto;
  max-width: 100%;
}

.logo-img-small {
  width: 150px;
  height: auto;
  max-width: 100%;
}

/* Input Field Styles */
.input-field {
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 200ms, box-shadow 200ms;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.input-field:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

.input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: hsl(var(--muted));
}

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

.input-error {
  border-color: hsl(var(--destructive));
}

.input-error:focus {
  border-color: hsl(var(--destructive));
  box-shadow: 0 0 0 2px hsl(var(--destructive) / 0.2);
}

/* Hidden class */
.hidden {
  display: none;
}

