/* Base Styles */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #eff6ff;
    --primary-shadow: rgba(59, 130, 246, 0.2);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --success: #10b981;
    --success-light: #ecfdf5;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    overflow-x: hidden;
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-around { justify-content: space-around; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-4 { padding-top: 1rem; }
.pt-12 { padding-top: 3rem; }
.pb-20 { padding-bottom: 5rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-16 { margin-top: 4rem; }
.mr-6 { margin-right: 1.5rem; }
.-ml-1 { margin-left: -0.25rem; }
.mb-1 { margin-top: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-14 { width: 3.5rem; }
.h-14 { height: 3.5rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-px { width: 1px; }

.bg-white { background-color: white; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-blue-50 { background-color: var(--primary-light); }
.bg-blue-600 { background-color: var(--primary); }
.bg-green-50 { background-color: var(--success-light); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }

.text-white { color: white; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-700); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-blue-100 { color: #dbeafe; }
.text-blue-600 { color: var(--primary); }
.text-green-600 { color: var(--success); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.625rem; }
.rounded-2xl { border-radius: 1rem; }
.border { border: 1px solid var(--gray-200); }
.border-t { border-top: 1px solid var(--gray-200); }
.border-b { border-bottom: 1px solid var(--gray-200); }
.border-2 { border-width: 2px; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3); }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-blue-200 { box-shadow: 0 10px 15px -3px var(--primary-shadow); }

.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-24 { bottom: 6rem; }
.right-6 { right: 1.5rem; }
.bottom-10 { bottom: -2.5rem; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.transition-all { transition: all 0.2s; }
.transition-transform { transition: transform 0.1s; }
.active\:scale-95:active { transform: scale(0.95); }

/* Specific components */
#allmap { width: 100%; height: calc(100% - 64px); }
.nav-active { color: var(--primary); }

nav a { text-decoration: none; color: var(--gray-500); transition: color 0.2s; }
nav a:hover { color: var(--primary); }

input, textarea {
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    outline: none;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-shadow);
}

button { border: none; cursor: pointer; }
