/* Minimal utility compatibility layer for legacy views */

/* Layout */
.block { display: block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.w-full { width: 100%; }
.w-56 { width: 14rem; }
.w-64 { width: 16rem; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-none { max-width: none; }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-24 { top: 6rem; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }

/* 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)); }
.col-span-2 { grid-column: span 2 / span 2; }

/* Spacing */
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-0\.5 > :not(:last-child) { margin-bottom: 0.125rem; }
.space-y-1\.5 > :not(:last-child) { margin-bottom: 0.375rem; }
.space-y-2 > :not(:last-child) { margin-bottom: 0.5rem; }
.space-y-3 > :not(:last-child) { margin-bottom: 0.75rem; }
.space-y-4 > :not(:last-child) { margin-bottom: 1rem; }
.space-y-6 > :not(:last-child) { margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.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; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.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-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-6 { padding-bottom: 1.5rem; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }

/* Colors */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-green-100 { background-color: #dcfce7; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-\[\#111111\] { background-color: #111111; }
.bg-\[\#EEEEEE\] { background-color: #eeeeee; }
.bg-\[\#FD4621\] { background-color: #fd4621; }
.bg-\[\#FD4621\]\/10 { background-color: rgba(253, 70, 33, 0.1); }
.bg-\[\#fff8f7\] { background-color: #fff8f7; }

.text-white { color: #ffffff; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-yellow-400 { color: #facc15; }
.text-\[\#111111\] { color: #111111; }
.text-\[\#FD4621\] { color: #fd4621; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.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-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-\[0\.65rem\] { font-size: 0.65rem; }
.text-\[0\.6rem\] { font-size: 0.6rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Border & radius */
.border { border: 1px solid #e5e7eb; }
.border-2 { border: 2px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-r { border-right: 1px solid #e5e7eb; }
.border-dashed { border-style: dashed; }
.border-\[\#EEEEEE\] { border-color: #eeeeee; }
.border-\[\#DDDDDD\] { border-color: #dddddd; }
.border-\[\#FD4621\]\/40 { border-color: rgba(253, 70, 33, 0.4); }
.border-red-200 { border-color: #fecaca; }

.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

/* Effects */
.shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.transition { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }

/* Misc */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Responsive */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .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\:flex-row { flex-direction: row; }
  .sm\:col-span-2 { grid-column: span 2 / span 2; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:flex { display: flex; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:w-1\/2 { width: 50%; }
  .lg\:w-80 { width: 20rem; }
  .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\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Sidebar logout button */
.togo-dashboard-nav-menu form.nav-logout-form { display: contents; }
.togo-dashboard-nav-menu button.nav-logout {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 16px; font-weight: 500; display: block; transition: none;
  color: var(--togo-common-black); margin-top: 20px; width: 100%; text-align: left;
}
.togo-dashboard-nav-menu button.nav-logout:hover { color: var(--togo-theme-primary); }
.togo-dashboard-nav-menu button.nav-logout .togo-svg-icon { width: 24px; margin-right: 4px; display: inline-block; }

/* ── RTL (Arabic) Support ──────────────────────────────────────── */
[dir="rtl"] body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
[dir="rtl"] .togo-header-right-menu { flex-direction: row-reverse; }
[dir="rtl"] .togo-header-menu ul { padding-right: 0; }
[dir="rtl"] .togo-dashboard-sidebar { border-right: none; border-left: 1px solid rgba(238,238,238,.93); }
[dir="rtl"] .togo-dashboard-nav-menu a,
[dir="rtl"] .togo-dashboard-nav-menu button.nav-logout { text-align: right; }
[dir="rtl"] .togo-dashboard-nav-menu .togo-svg-icon { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .togo-dashboard-table-row { direction: rtl; }
[dir="rtl"] .togo-dashboard-wrap { direction: rtl; }
[dir="rtl"] .flex { flex-direction: row-reverse; }
[dir="rtl"] .items-center.gap-3 { flex-direction: row-reverse; }
[dir="rtl"] .ml-20 { margin-left: 0; margin-right: 20px; }
[dir="rtl"] .mr-5 { margin-right: 0; margin-left: 5px; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .togo-flash-message { right: auto; left: 24px; }
