/* ============================================================
   Self-hosted utility CSS — replaces the Tailwind CDN <script>.
   Covers every utility class actually used across this project's
   templates. Loading this as a normal local stylesheet means the
   layout can never break because an external CDN script failed to
   load, loaded slowly, or was blocked by a network/firewall — a
   real risk on some mobile networks and locked-down hosts.
   ============================================================ */

/* ---------- Display ---------- */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex > * { min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hidden { display: none !important; }

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

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

/* ---------- Gap ---------- */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: .25rem; }

/* ---------- Spacing scale (padding / margin) ---------- */
.p-2 { padding: .5rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.pl-1 { padding-left: .25rem; }
.pr-3 { padding-right: .75rem; }
.pr-4 { padding-right: 1rem; }
.pr-0 { padding-right: 0; }
.pb-2 { padding-bottom: .5rem; }
.pb-4 { padding-bottom: 1rem; }
.pt-1 { padding-top: .25rem; }
.pt-2 { padding-top: .5rem; }
.pt-3 { padding-top: .75rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0\.5 { margin-top: .125rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.space-y-1 > * + * { margin-top: .25rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }

/* ---------- Sizing ---------- */
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.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-40 { width: 10rem; } .h-40 { height: 10rem; }
.w-64 { width: 16rem; }
.h-2\.5 { height: .625rem; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.min-w-max { min-width: max-content; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-h-96 { max-height: 24rem; }
.min-h-screen { min-height: 100vh; }

/* ---------- Typography ---------- */
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-400 { font-weight: 400; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.underline { text-decoration: underline; }
.text-black { color: #000; }
.text-white { color: #fff; }
.list-none { list-style: none; }

/* ---------- Borders / radius ---------- */
.border-0 { border-width: 0; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.rounded-lg { border-radius: .5rem; }
.rounded-xl { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.ring-2 { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Gradients (used for the logo badge / avatars) ---------- */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-amber-400 { --tw-gradient-from: #fbbf24; --tw-gradient-to: rgb(251 191 36 / 0); }
.from-violet-400 { --tw-gradient-from: #a78bfa; --tw-gradient-to: rgb(167 139 250 / 0); }
.to-orange-600 { --tw-gradient-to: #ea580c; }
.to-indigo-600 { --tw-gradient-to: #4f46e5; }

/* ---------- Position ---------- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.-top-10 { top: -2.5rem; }
.-right-10 { right: -2.5rem; }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }

/* ---------- Misc ---------- */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.opacity-50 { opacity: .5; }
.opacity-60 { opacity: .6; }
.object-cover { object-fit: cover; }
.backdrop-blur { backdrop-filter: blur(8px); }

/* ============================================================
   Responsive breakpoints — matches Tailwind's default scale
   ============================================================ */
@media (min-width: 640px) {
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none !important; }
  .md\:flex-row { flex-direction: row; }
  .md\:flex-col { flex-direction: column; }
  .md\:items-center { align-items: center; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:p-7 { padding: 1.75rem; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .md\:pr-0 { padding-right: 0; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:shrink { flex-shrink: 1; }
  .md\:ml-\[240px\] { margin-left: 240px; }
}

@media (min-width: 1024px) {
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
