/* --- 1. Base Reset --- */
*,::before,::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: inherit; }
button, input, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; padding: 0; color: inherit; background: transparent; }
button { cursor: pointer; text-transform: none; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
textarea { resize: vertical; }

/* --- 2. Layout & Display --- */
.flex { display: flex; }
.inline-block { display: inline-block; }
.block { display: block; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0%; }
.overflow-x-auto { overflow-x: auto; }

/* --- 3. Position --- */
.relative { position: relative; }
.absolute { position: absolute; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }

/* --- 4. Sizing (Width & Height) --- */
.w-full { width: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.min-w-full { min-width: 100%; }
.max-w-xs { max-width: 20rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-px { width: 1px; }

/* --- 5. Spacing (Padding & Margin) --- */
.p-0 { padding: 0; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.pt-20 { padding-top: 5rem; }
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; } .ml-6 { margin-left: 1.5rem; } .mr-3 { margin-right: 0.75rem; }

/* Space Utilities */
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }

/* --- 6. Typography --- */
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; } .font-extrabold { font-weight: 800; }
.uppercase { text-transform: uppercase; }
.leading-tight { line-height: 1.25; } .leading-relaxed { line-height: 1.625; }
.underline { text-decoration: underline; } .decoration-dashed { text-decoration-style: dashed; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 7. Colors --- */
/* Text Colors */
.text-white { color: #fff; }
.text-gray-400 { color: #9ca3af; } .text-gray-500 { color: #6b7280; } .text-gray-700 { color: #374151; } .text-gray-800 { color: #1f2937; } .text-gray-900 { color: #111827; }
.text-red-500 { color: #ef4444; } .text-red-600 { color: #dc2626; } .text-red-700 { color: #b91c1c; } .text-red-800 { color: #991b1b; }
.text-blue-500 { color: #3b82f6; } .text-blue-600 { color: #2563eb; } .text-blue-800 { color: #1e40af; }
.text-green-800 { color: #166534; }

/* Background Colors */
.bg-transparent { background-color: transparent; } .bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; } .bg-gray-100 { background-color: #f3f4f6; } .bg-gray-300 { background-color: #d1d5db; } .bg-gray-400 { background-color: #9ca3af; }
.bg-red-50 { background-color: #fef2f2; } .bg-red-100 { background-color: #fee2e2; }
.bg-blue-50 { background-color: #eff6ff; } .bg-blue-600 { background-color: #2563eb; }
.bg-green-100 { background-color: #dcfce3; } .bg-green-600 { background-color: #16a34a; }

/* Border Colors */
.border-transparent { border-color: transparent; }
.border-gray-200 { border-color: #e5e7eb; } .border-gray-300 { border-color: #d1d5db; } .border-gray-400 { border-color: #9ca3af; }
.border-red-400 { border-color: #f87171; } .border-red-600 { border-color: #dc2626; }
.border-blue-200 { border-color: #bfdbfe; } .border-blue-600 { border-color: #2563eb; }
.border-green-400 { border-color: #4ade80; }

/* --- 8. Borders & Radius --- */
.border { border-width: 1px; } .border-none { border-style: none; }
.border-b { border-bottom-width: 1px; } .border-b-2 { border-bottom-width: 2px; }
.rounded { border-radius: 0.25rem; } .rounded-lg { border-radius: 0.5rem; } .rounded-xl { border-radius: 0.75rem; } .rounded-full { border-radius: 9999px; }

/* --- 9. Effects & Utilities --- */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.opacity-60 { opacity: 0.6; }
.appearance-none { -webkit-appearance: none; appearance: none; }
.cursor-pointer { cursor: pointer; } .cursor-not-allowed { cursor: not-allowed; }

/* --- 10. Transitions & Hover States --- */
.transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

/* Hover */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:text-blue-500:hover { color: #3b82f6; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:text-red-800:hover { color: #991b1b; }

/* Focus */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:shadow-outline:focus { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); }

/* --- 11. Form Checkbox 特殊样式 --- */
.form-checkbox {
    -webkit-appearance: none; appearance: none;
    -webkit-print-color-adjust: exact; color-adjust: exact;
    display: inline-block; vertical-align: middle;
    background-origin: border-box; user-select: none;
    flex-shrink: 0; color: #2563eb; background-color: #fff;
    border-color: #d1d5db; border-width: 1px; border-radius: 0.25rem;
}
.form-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    border-color: transparent; background-color: currentColor;
    background-size: 100% 100%; background-position: center; background-repeat: no-repeat;
}