/* compat.css — Minimal Tailwind-compatible utility classes for templates not yet migrated.
   This file provides the most common utilities used in account sub-templates, forms,
   settings, and auth views so they remain functional during the Musubi migration. */

/* Display */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline { display: inline; }
.hidden { display: none; }

/* Flex */
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.self-center { align-self: center; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-x-8 { column-gap: 32px; }
.gap-y-4 { row-gap: 16px; }

/* Spacing */
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-6 > * + * { margin-left: 24px; }

/* Padding */
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.p-12 { padding: 48px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-2\.5 { padding-left: 10px; padding-right: 10px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.pl-8 { padding-left: 32px; }
.pr-2 { padding-right: 8px; }
.pt-2 { padding-top: 8px; }
.pt-4 { padding-top: 16px; }
.pb-3 { padding-bottom: 12px; }

/* Margin */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-1\.5 { margin-top: 6px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.ml-1 { margin-left: 4px; }
.mr-1 { margin-right: 4px; }

/* Width / Height */
.w-full { width: 100%; }
.w-2 { width: 8px; }
.w-3 { width: 12px; }
.w-3\.5 { width: 14px; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-7 { width: 28px; }
.w-8 { width: 32px; }
.w-10 { width: 40px; }
.w-12 { width: 48px; }
.w-16 { width: 64px; }
.h-full { height: 100%; }
.h-2 { height: 8px; }
.h-3 { height: 12px; }
.h-3\.5 { height: 14px; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-7 { height: 28px; }
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-12 { height: 48px; }
.h-16 { height: 64px; }
.min-w-0 { min-width: 0; }
.max-w-sm { max-width: 384px; }

/* Typography */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.\text-\[10px\] { font-size: 10px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.select-none { user-select: none; }
.whitespace-nowrap { white-space: nowrap; }
.antialiased { -webkit-font-smoothing: antialiased; }

/* Colors */
.text-white { color: #fff; }
.text-gray-300 { color: var(--grey-500); }
.text-gray-400 { color: var(--grey-725); }
.text-gray-500 { color: var(--text-subtle); }
.text-gray-600 { color: var(--grey-750); }
.text-gray-700 { color: var(--grey-800); }
.text-gray-900 { color: var(--text); }
.text-indigo-600 { color: var(--link); }
.text-indigo-700 { color: var(--purple-700); }
.text-indigo-800 { color: var(--purple-800); }
.text-emerald-500 { color: var(--success-500); }
.text-emerald-600 { color: var(--success-500); }
.text-emerald-800 { color: #065f46; }
.text-amber-600 { color: var(--warning-text); }
.text-amber-800 { color: #92400e; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: var(--error-500); }
.text-red-700 { color: #b91c1c; }
.text-blue-600 { color: var(--info-500); }
.text-blue-700 { color: #1d4ed8; }
.text-purple-800 { color: var(--purple-800); }

.bg-white { background: var(--surface); }
.bg-gray-50 { background: var(--surface-low); }
.bg-gray-100 { background: var(--neutral-surface); }
.bg-gray-200 { background: var(--grey-200); }
.bg-indigo-50 { background: var(--purple-utility-surface); }
.bg-indigo-100 { background: var(--purple-utility-surface); }
.bg-indigo-500 { background: var(--brand-primary); }
.bg-indigo-600 { background: var(--brand-primary); }
.bg-emerald-50 { background: var(--success-surface); }
.bg-emerald-100 { background: var(--success-surface); }
.bg-emerald-400 { background: var(--success-500); }
.bg-red-50 { background: var(--error-surface); }
.bg-red-100 { background: var(--error-surface); }
.bg-red-400 { background: var(--error-500); }
.bg-amber-100 { background: var(--warning-surface); }
.bg-amber-400 { background: var(--warning-500); }
.bg-blue-100 { background: var(--info-surface); }
.bg-blue-400 { background: var(--info-500); }
.bg-purple-100 { background: var(--purple-utility-surface); }
.bg-purple-400 { background: var(--purple-500); }
.bg-black\/20 { background: rgba(0,0,0,0.2); }

/* Borders */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l { border-left: 1px solid var(--border); }
.border-gray-100 { border-color: var(--grey-200); }
.border-gray-200 { border-color: var(--border); }
.border-gray-300 { border-color: var(--border); }
.border-emerald-200 { border-color: var(--success-surface); }
.border-red-200 { border-color: var(--error-surface); }
.border-indigo-200 { border-color: var(--purple-utility-border); }
.border-transparent { border-color: transparent; }

.rounded { border-radius: var(--radius-4); }
.rounded-md { border-radius: var(--radius-6); }
.rounded-lg { border-radius: var(--radius-8); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-2xl { box-shadow: var(--shadow-dialog); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-5 { bottom: 20px; }
.right-5 { right: 20px; }

/* Z-index */
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Transform */
.translate-x-full { transform: translateX(100%); }
.-translate-y-1\/2 { transform: translateY(-50%); }

/* Transition */
.transition-colors { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.transition-all { transition: all 150ms ease; }
.transition-transform { transition: transform 200ms ease-out; }
.duration-200 { transition-duration: 200ms; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Table */
.min-w-full { min-width: 100%; }
.divide-y > * + * { border-top: 1px solid var(--border); }
.divide-gray-100 > * + * { border-color: var(--grey-200); }
.divide-gray-200 > * + * { border-color: var(--border); }

/* Ring (simplified) */
.ring-1 { box-shadow: 0 0 0 1px var(--purple-utility-border); }
.ring-2 { box-shadow: 0 0 0 2px var(--purple-utility-border); }

/* Focus ring (simplified) */
.focus\:border-indigo-500:focus { border-color: var(--brand-primary); }
.focus\:ring-indigo-500:focus { box-shadow: 0 0 0 1px var(--brand-primary); }

/* Hover */
.hover\:text-gray-600:hover { color: var(--grey-750); }
.hover\:text-gray-700:hover { color: var(--grey-800); }
.hover\:text-indigo-600:hover { color: var(--link); }
.hover\:text-indigo-800:hover { color: var(--purple-800); }
.hover\:text-red-500:hover { color: var(--error-500); }
.hover\:text-white\/70:hover { color: rgba(255,255,255,0.7); }
.hover\:bg-gray-50:hover { background: var(--surface-low); }
.hover\:bg-gray-100:hover { background: var(--neutral-surface); }
.hover\:bg-gray-200:hover { background: var(--grey-200); }
.hover\:bg-indigo-100:hover { background: var(--purple-utility-surface-hover); }
.hover\:bg-indigo-700:hover { background: var(--brand-primary-hover); }
.hover\:bg-red-100:hover { background: var(--error-surface-hover); }
.hover\:border-gray-300:hover { border-color: var(--border); }

/* Responsive (simplified: treat sm+ as default) */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Misc */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
