/* Epaithros Stats — local phpFlat admin CSS.
   Compact utility layer for the Tailwind-style classes used by this app. */

:root { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; font-feature-settings: "cv05" 1, "ss01" 1; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
table { border-collapse: collapse; }

.h-full { height: 100%; }
.min-h-\[60vh\] { min-height: 60vh; }
.h-1\.5 { height: .375rem; }
.h-2 { height: .5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-14 { height: 3.5rem; }
.h-60 { height: 15rem; }
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-40 { width: 10rem; }
.w-px { width: 1px; }
.w-52 { width: 13rem; }
.w-64 { width: 16rem; }
.w-80 { width: 20rem; }
.w-96 { width: 24rem; }
.max-w-sm { max-width: 24rem; }
.max-w-xs { max-width: 20rem; }
.max-w-\[calc\(100vw-2rem\)\] { max-width: calc(100vw - 2rem); }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }

.fixed { position: fixed; }
.sticky { position: sticky; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.right-4 { right: 1rem; }
.bottom-4 { bottom: 1rem; }
.top-0 { top: 0; }
.top-4 { top: 1rem; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.m-0 { margin: 0; }
.mx-1 { margin-left: .25rem; margin-right: .25rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-1 { margin-left: .25rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: .5rem; }
.mr-auto { margin-right: auto; }
.mt-0\.5 { margin-top: .125rem; }
.mt-1 { margin-top: .25rem; }
.mt-1\.5 { margin-top: .375rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-px { margin-top: 1px; }
.p-1 { padding: .25rem; }
.p-1\.5 { padding: .375rem; }
.p-2\.5 { padding: .625rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-1\.5 { padding-left: .375rem; padding-right: .375rem; }
.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-3\.5 { padding-left: .875rem; padding-right: .875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.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-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pb-1\.5 { padding-bottom: .375rem; }
.pb-3 { padding-bottom: .75rem; }
.pt-1 { padding-top: .25rem; }
.pt-3 { padding-top: .75rem; }
.pt-4 { padding-top: 1rem; }

.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1\.5 { gap: .375rem; }
.gap-2 { gap: .5rem; }
.gap-2\.5 { gap: .625rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-2\.5 > * + * { margin-top: .625rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { overflow-wrap: break-word; word-break: break-word; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }
.cursor-pointer { cursor: pointer; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.rounded { border-radius: .25rem; }
.rounded-md { border-radius: .375rem; }
.rounded-lg { border-radius: .5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t { border-top-left-radius: .25rem; border-top-right-radius: .25rem; }
.border { border: 1px solid; }
.border-b { border-bottom: 1px solid; }
.border-l { border-left: 1px solid; }
.border-r { border-right: 1px solid; }
.border-t { border-top: 1px solid; }
.border-dashed { border-style: dashed; }
.divide-y > * + * { border-top: 1px solid; }
.divide-slate-50 > * + * { border-color: #f8fafc; }

.border-slate-50 { border-color: #f8fafc; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-red-200 { border-color: #fecaca; }
.border-blue-200 { border-color: #bfdbfe; }
.bg-white { background-color: #fff; }
.bg-white\/90 { background-color: rgba(255,255,255,.9); }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/40 { background-color: rgba(15,23,42,.4); }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-red-50 { background-color: #fef2f2; }

.font-sans { font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-\[10px\] { font-size: 10px; line-height: 1rem; }
.text-\[11px\] { font-size: 11px; line-height: 1rem; }
.text-\[15px\] { font-size: 15px; line-height: 1.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: 0; }
.tracking-wide { letter-spacing: .025em; }
.tracking-wider { letter-spacing: .05em; }
.leading-tight { line-height: 1.25; }

.text-white { color: #fff; }
.text-white\/80 { color: rgba(255,255,255,.8); }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-amber-700 { color: #b45309; }
.text-emerald-700 { color: #047857; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-current\/60 { color: color-mix(in srgb, currentColor 60%, transparent); }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(15,23,42,.1), 0 4px 6px -4px rgba(15,23,42,.1); }
.ring-1 { box-shadow: 0 0 0 1px var(--tw-ring-color, rgba(0,0,0,.05)) inset; }
.ring-inset { }
.ring-blue-200 { --tw-ring-color: #bfdbfe; }
.ring-amber-200 { --tw-ring-color: #fde68a; }
.ring-emerald-200 { --tw-ring-color: #a7f3d0; }
.ring-slate-200 { --tw-ring-color: #e2e8f0; }
.backdrop-blur { backdrop-filter: blur(8px); }
.transition-transform { transition-property: transform; }
.duration-200 { transition-duration: .2s; }
.-translate-x-full { transform: translateX(-100%); }
.translate-x-full { transform: translateX(100%); }
.animate-spin { animation: spin 1s linear infinite; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:text-slate-900:hover { color: #0f172a; }
.group:hover .group-hover\:text-slate-600 { color: #475569; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-blue-500:focus { border-color: #3b82f6; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color, rgba(59,130,246,.2)); }
.focus\:ring-blue-500\/20:focus { --tw-ring-color: rgba(59,130,246,.2); }
.focus\:ring-blue-500\/40:focus { --tw-ring-color: rgba(59,130,246,.4); }

@media (min-width: 640px) {
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none !important; }
}
@media (min-width: 1024px) {
  .lg\:static { position: static; }
  .lg\:hidden { display: none !important; }
  .lg\:translate-x-0 { transform: translateX(0); }
  .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)); }
  .lg\:p-6 { padding: 1.5rem; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xl\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Thin, unobtrusive scrollbars for data-dense panes */
.scroll-thin { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }

/* Off-canvas + modal transition primitives (toggled by data attributes via admin.js) */
[data-offcanvas] { transition: transform .25s ease; }
[data-offcanvas][hidden] { display: block; transform: translateX(100%); }
[data-offcanvas-backdrop][hidden],
[data-modal][hidden] { display: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===========================================================================
   DARK MODE
   Centralized overrides keyed on a `.dark` class on <html> (toggled + persisted
   by admin.js). Markup stays identical — these rules remap the slate/white
   utility palette used across every template. In a production Tailwind build
   you'd express the same intent with `dark:` variants; this layer keeps the
   static prototype DRY across all files.
   =========================================================================== */
html.dark { color-scheme: dark; }

/* Page vs surfaces */
html.dark body.bg-slate-100 { background-color: #0b1120; }
.dark .bg-white { background-color: #0f172a; }
.dark .bg-white\/90 { background-color: rgba(15, 23, 42, .9); }
.dark .bg-white\/95 { background-color: rgba(15, 23, 42, .95); }
.dark .bg-slate-50,
.dark .bg-slate-50\/50,
.dark .bg-slate-50\/30 { background-color: #131c2e; }
.dark .bg-slate-100 { background-color: #1e293b; }      /* chips, icon tiles, inline code */
.dark .bg-slate-200 { background-color: #1f2a3d; }      /* dividers, progress tracks */
.dark .bg-slate-900 { background-color: #334155; }      /* brand, avatar, active nav, code block */

/* Hover backgrounds */
.dark .hover\:bg-slate-50:hover { background-color: #18223a; }
.dark .hover\:bg-slate-100:hover { background-color: #1e293b; }
.dark .hover\:bg-red-50:hover { background-color: rgba(248, 113, 113, .15); }
.dark .hover\:bg-blue-50:hover { background-color: rgba(96, 165, 250, .15); }
.dark .hover\:bg-amber-50:hover { background-color: rgba(245, 158, 11, .15); }

/* Borders */
.dark .border-slate-200 { border-color: #1f2a3d; }
.dark .border-slate-300 { border-color: #2b3a52; }
.dark .border-slate-100 { border-color: #1a2335; }
.dark .border-slate-50 { border-color: #161e2e; }
.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: #1a2335; }
.dark .divide-slate-50 > :not([hidden]) ~ :not([hidden]) { border-color: #161e2e; }

/* Text */
.dark .text-slate-900 { color: #f1f5f9; }
.dark .text-slate-800 { color: #e2e8f0; }
.dark .text-slate-700 { color: #cbd5e1; }
.dark .text-slate-600 { color: #a3b2c7; }
.dark .text-slate-500 { color: #94a3b8; }
.dark .text-slate-400 { color: #6b7a90; }
.dark .text-slate-300 { color: #475569; }
.dark .placeholder\:text-slate-400::placeholder { color: #6b7a90; }

/* Hover-variant text colors — base remaps above don't cover `hover:text-*`,
   so nav links/icons turned dark-on-dark on hover. Remap the hover variants too. */
.dark .hover\:text-slate-900:hover { color: #f1f5f9; }
.dark .hover\:text-slate-800:hover { color: #e2e8f0; }
.dark .hover\:text-slate-700:hover { color: #cbd5e1; }
.dark .hover\:text-slate-600:hover { color: #a3b2c7; }
.dark .group:hover .group-hover\:text-slate-600 { color: #a3b2c7; }
.dark .group:hover .group-hover\:text-slate-700 { color: #cbd5e1; }

/* Tinted status panels & badges — translucent colored fills read as proper
   colored chips in dark mode (the earlier solid dark fills looked muddy). */
.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, .15); }
.dark .bg-amber-50 { background-color: rgba(245, 158, 11, .15); }
.dark .bg-red-50 { background-color: rgba(248, 113, 113, .15); }
.dark .bg-violet-50 { background-color: rgba(167, 139, 250, .15); }
.dark .bg-blue-50,
.dark .bg-blue-50\/40,
.dark .bg-blue-50\/50,
.dark .bg-blue-50\/30 { background-color: rgba(96, 165, 250, .15); }
.dark .bg-amber-100 { background-color: rgba(245, 158, 11, .22); }
.dark .bg-blue-100 { background-color: rgba(96, 165, 250, .22); }

/* Progress-meter fill (sidebar storage bar) — lighter than the track in dark */
.dark .rounded-full.bg-slate-200 > .bg-slate-900 { background-color: #94a3b8; }

/* Form controls — dark blue fill in dark mode so fields read distinctly from cards.
   Excludes checkboxes/radios/range (they keep their accent color). */
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.dark select,
.dark textarea {
  background-color: #0e1c38;
  border-color: #2a3b57;
  color: #e2e8f0;
}
.dark input:not([type="checkbox"]):not([type="radio"])::placeholder,
.dark textarea::placeholder { color: #6b7a90; }

/* Neutral ring on chips */
.dark .ring-slate-200 { --tw-ring-color: rgba(51, 65, 85, .7); }

/* Colored text — lighten on dark so it stays readable on darkened *-50/*-100 fills
   (badges, status panels, metric deltas, danger zones, links). */
.dark .text-emerald-700,
.dark .text-emerald-800,
.dark .text-emerald-600 { color: #34d399; }
.dark .text-blue-700,
.dark .text-blue-800,
.dark .text-blue-600 { color: #60a5fa; }
.dark .text-amber-700,
.dark .text-amber-600,
.dark .text-amber-800 { color: #fbbf24; }
.dark .text-red-700,
.dark .text-red-800,
.dark .text-red-600,
.dark .text-red-500 { color: #f87171; }
.dark .text-violet-700,
.dark .text-violet-600 { color: #a78bfa; }

/* Colored rings on tinted badges/cards — brighten so the outline reads on dark */
.dark .ring-emerald-200 { --tw-ring-color: rgba(16, 185, 129, .4); }
.dark .ring-amber-200 { --tw-ring-color: rgba(245, 158, 11, .4); }
.dark .ring-red-200 { --tw-ring-color: rgba(248, 113, 113, .4); }
.dark .ring-violet-200 { --tw-ring-color: rgba(167, 139, 250, .4); }
.dark .ring-blue-200 { --tw-ring-color: rgba(96, 165, 250, .4); }

/* Colored borders on tinted cards/inputs (danger zone, validation, dashed add) */
.dark .border-emerald-200 { border-color: rgba(16, 185, 129, .35); }
.dark .border-amber-200 { border-color: rgba(245, 158, 11, .35); }
.dark .border-red-200 { border-color: rgba(248, 113, 113, .35); }
.dark .border-blue-200 { border-color: rgba(96, 165, 250, .35); }
.dark .border-blue-300 { border-color: rgba(96, 165, 250, .5); }

/* Active tab / selected accents stay vivid in dark */
.dark .border-blue-600 { border-color: #60a5fa; }

/* Dark scrollbars */
.dark .scroll-thin { scrollbar-color: #334155 transparent; }
.dark .scroll-thin::-webkit-scrollbar-thumb { background: #334155; }
