/* Immich Self-Hosted Dark Theme Styles */
:root {
  --surface: #0b0f19;
  --surface-card: rgba(17, 24, 39, 0.72);
  --border: rgba(55, 65, 81, 0.65);
  --primary: #4f46e5;
  --primary-hover: #6366f1;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background-color: var(--surface);
  color: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

button {
  font-family: inherit;
}

.glow-bg {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, rgba(6, 182, 212, 0.06) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

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

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-9 { width: 2.25rem; }
.h-9 { height: 2.25rem; }
.w-14 { width: 3.5rem; }
.h-14 { height: 3.5rem; }
.h-full { height: 100%; }

.p-2 { padding: 0.5rem; }
.p-3\.5 { padding: 0.875rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-6 { padding-top: 1.5rem; }
.pr-3 { padding-right: 0.75rem; }
.pr-10 { padding-right: 2.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-8 { margin-top: 2rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.inset-y-0 { top: 0; bottom: 0; }
.right-0 { right: 0; }
.z-10 { position: relative; z-index: 10; }

.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-indigo-400 { color: #818cf8; }
.text-red-200 { color: #fecaca; }
.text-red-400 { color: #f87171; }

.bg-surface { background-color: var(--surface); }
.bg-gray-900\/70 { background-color: rgba(17, 24, 39, 0.7); }
.bg-indigo-950 { background-color: #1e1b4b; }
.bg-red-950\/60 { background-color: rgba(69, 10, 10, 0.6); }
.bg-emerald-500 { background-color: #10b981; }
.bg-gradient-to-tr {
  background: linear-gradient(45deg, rgba(49, 46, 129, 0.6), rgba(88, 28, 135, 0.4));
}

.rounded { border-radius: 0.25rem; }
.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: #374151; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-gray-800\/80 { border-color: rgba(31, 41, 55, 0.8); }
.border-indigo-700\/40 { border-color: rgba(67, 56, 202, 0.4); }
.border-indigo-800\/60 { border-color: rgba(55, 48, 163, 0.6); }
.border-red-800\/80 { border-color: rgba(153, 27, 27, 0.8); }

.backdrop-blur-xl { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.drop-shadow { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.transition { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

.hover\:text-white:hover { color: #ffffff; }
.hover\:text-gray-200:hover { color: #e5e7eb; }
.hover\:text-gray-400:hover { color: #9ca3af; }
.hover\:text-indigo-300:hover { color: #a5b4fc; }

.auth-card {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background-color: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(75, 85, 99, 0.45);
  color: #ffffff;
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background-color: rgba(15, 23, 42, 0.95);
}

button[onclick="togglePassword()"] {
  background: transparent;
  border: none;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: #4f46e5;
}

.submit-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

.badge-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background-color: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.35);
  color: #d1d5db;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.badge-link:hover {
  background-color: rgba(55, 65, 81, 0.75);
  color: #ffffff;
  border-color: rgba(107, 114, 128, 0.55);
}

.spinner {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

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

@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
}
