*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

html, body {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  color: var(--text-inverse);
  background-color: var(--body-bg, rgb(255, 255, 255)); 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Theme variables for critical styles */
:root {
  --bg-primary: rgb(255, 255, 255);
  --body-bg: rgb(255, 255, 255);
  --text-primary: rgb(17, 24, 39);
  --text-inverse: rgb(255, 255, 255);
  --border-primary: rgb(229, 231, 235);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --gradient-start: #f5f5f5;
  --gradient-end: #fafafa;
}

.dark {
  --bg-primary: rgb(17, 24, 39);
  --body-bg: rgb(17, 24, 39);
  --text-primary: rgb(243, 244, 246);
  --text-inverse: rgb(17, 24, 39);
  --border-primary: rgb(75, 85, 99);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --gradient-start: #374151;
  --gradient-end: #4b5563;
}

/* Critical layout utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-12 { height: 3rem; }
.fixed { position: fixed; }
.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.text-center { text-align: center; }
.grid-flow-col { grid-auto-flow: column; }
.gap-10 { gap: 2.5rem; }
.top-14 { top: 3.5rem; }
.z-50 { z-index: 50; }

/* Critical colors */
.text-gray-900 { color: var(--text-primary); }
.text-primary { color: var(--text-inverse); }
.bg-primary { background-color: var(--bg-primary); }

/* Critical spacing */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Critical borders and shadows */
.border-b { border-bottom-width: 1px; border-color: var(--border-primary); }
.shadow-md {
  box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
}

/* Essential gradient background */
.gradient-background {
  background: #f8f9fa;
}

/* Critical form styles */
input {
  color: black;
  border-bottom-width: 2px;
  padding: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
}

input:focus {
  border-bottom-color: #00796b;
  outline: none;
  border-color: #00796b;
}

/* Critical button styles */
button {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 0.9;
}

/* Critical visibility */
.hidden { display: none; }

/* Essential backdrop */
::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

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

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