/* Basic admin-style layout */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f7;
  margin: 0;
  padding: 0;
}

/* Minimal Tailwind-style viewport height/layout shims used on login + main layout */
.h-screen {
  height: 100vh;
}

.min-h-screen {
  min-height: 100vh;
}

.justify-center {
  justify-content: center;
}

.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

h1, h2, h3 {
  margin-top: 0;
  color: #111827;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding:1rem 0.75rem;
}

tr:nth-child(even) td {
  background: #fbfbfd;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters form > div {
  display: inline-block;
  margin-right: 0.75rem;
}

input[type="text"], select, textarea {
  border-radius: 4px;
  border: 1px solid #d1d5db;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
}

input[type="submit"], button, .btn {
  display: inline-block;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  background-color: #5c6ac4; /* Shopify purple */
  color: #ffffff;
  text-decoration: none;
}

input[type="submit"]:hover,
button:hover,
.btn:hover {
 /* background-color: #4b55a1; darker Shopify purple */
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-info {
  background-color: #e0f2fe;
  color: #075985;
}

.images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.image-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem;
  background: #f9fafb;
}

.pagination {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

/* Minimal Tailwind-style border utility shims for Rails views */
.border-neutral-200 { border-color: #e5e7eb; }
.border-slate-200   { border-color: #e2e8f0; }
.border-blue-200    { border-color: #bfdbfe; }
.border-green-200   { border-color: #bbf7d0; }
.border-red-200     { border-color: #fecaca; }
.border-amber-200   { border-color: #fde68a; }
.border-violet-200  { border-color: #ddd6fe; }

/* Common Tailwind-style background color shims */
.bg-white       { background-color: #ffffff; }
.bg-neutral-50  { background-color: #f9fafb; }
.bg-neutral-100 { background-color: #f3f4f6; }
.bg-amber-50    { background-color: #fffbeb; }
.bg-amber-100   { background-color: #fef3c7; }
.bg-red-50      { background-color: #fef2f2; }
.bg-red-100     { background-color: #fee2e2; }
.bg-red-200     { background-color: #fecaca; }
.bg-green-50    { background-color: #ecfdf5; }
.bg-blue-50     { background-color: #eff6ff; }
.bg-blue-500    { background-color: #3b82f6; }
.bg-violet-50   { background-color: #f5f3ff; }

/* Common Tailwind-style text color shims */
.text-white      { color: #ffffff; }
.text-neutral-900 { color: #111827; }
.text-neutral-800 { color: #1f2937; }
.text-neutral-700 { color: #374151; }
.text-neutral-600 { color: #4b5563; }
.text-neutral-500 { color: #6b7280; }
.text-neutral-400 { color: #9ca3af; }
.text-blue-600    { color: #2563eb; }
.text-blue-700    { color: #1d4ed8; }
.text-amber-600   { color: #d97706; }
.text-amber-700   { color: #b45309; }
.text-amber-800   { color: #92400e; }
.text-red-600     { color: #dc2626; }
.text-red-700     { color: #b91c1c; }
.text-green-600   { color: #16a34a; }
.text-green-700   { color: #15803d; }
.text-violet-600  { color: #7c3aed; }
.text-violet-700  { color: #6d28d9; }

/* Slate text/background shims for sidebar nav */
.text-slate-900  { color: #0f172a; }
.text-slate-800  { color: #1e293b; }
.text-slate-700  { color: #334155; }
.text-slate-600  { color: #475569; }
.text-slate-500  { color: #64748b; }
.text-slate-400  { color: #94a3b8; }
.bg-slate-50     { background-color: #f8fafc; }

/* Hover helpers to mimic Tailwind hover: classes */
.hover\:bg-slate-50:hover {
  background-color: #f8fafc;
}

.hover\:text-slate-900:hover {
  color: #0f172a;
}

/* Common Tailwind-style radius + layout shims used in ERB */
.rounded-md   { border-radius: 0.375rem; }
.rounded-lg   { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
/* Utility to remove top border when combined with .border */
.border-t-0  { border-top-width: 0; }

/* Simple size shims for fixed-width/height elements */
.w-4  { width: 1rem; }
.w-8  { width: 2rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-48 { width: 12rem; }
.h-8  { height: 2rem; }

/* Simple min-width shim used in dropdowns */
.min-w-\[12rem\] { min-width: 12rem; }

/* Basic shadows */
.shadow {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12),
              0 1px 2px rgba(15, 23, 42, 0.08);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15),
              0 8px 10px -6px rgba(15, 23, 42, 0.12);
}

/* Transform transition shim (for rotating carets) */
.transition-transform {
  transition: transform 150ms ease-in-out;
}

/* Simple gradient + color stop shims for logo badge */
.bg-gradient-to-br {
  background-image: linear-gradient(135deg, var(--tw-gradient-from, #22c55e), var(--tw-gradient-to, #059669));
}

.from-green-500 {
  --tw-gradient-from: #22c55e;
}

.to-emerald-600 {
  --tw-gradient-to: #059669;
}

/* Basic font-size shims */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }

/* Ad‑hoc text size shims used in nav/icons */
.text-\[6px\]   { font-size: 6px;  line-height: 1; }
.text-\[10px\]  { font-size: 10px; line-height: 1; }
.text-\[18px\]  { font-size: 18px; line-height: 1; }

/* Font weight shim */
.font-bold { font-weight: 700; }

.flex           { display: flex; }
.inline-flex    { display: inline-flex; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-between{ justify-content: space-between; }
.justify-end    { justify-content: flex-end; }
.flex-wrap      { flex-wrap: wrap; }
.gap-1          { gap: 0.25rem; }
.gap-2          { gap: 0.5rem; }
.gap-2\.5       { gap: 0.625rem; }
.gap-3          { gap: 0.75rem; }
.gap-4          { gap: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden])  { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden])  { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden])  { margin-top: 0.75rem; }

/* Margin-top shim */
.mt-6 { margin-top: 1.5rem; }

.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }
.p-8  { padding: 2rem; }
.p-5  { padding: 1.25rem; }
.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-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; }

/* Ad-hoc padding shim for logo SVG */
.p-\[5px\] { padding: 5px; }

/* Grid layout shims used in ERB views */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }

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

@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\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Primary gradient button, matching prototype */
.btn-primary {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb 0%, #4338ca 100%);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus {
  outline: none;
}

.btn-primary:hover {
  box-shadow: 0 6px 10px rgba(37, 99, 235, 0.35);
}

/* Tiny dot icon size used in status pills */
.text-\[6px\] {
  font-size: 6px;
  line-height: 1;
}

/* Secondary amber button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* space-x-2 */
  padding: 8px 16px; /* match btn-primary padding */
  border-radius: 0.5rem; /* rounded-lg */
  border: 1px solid #fbbf24; /* approx amber-300 */
  background-color: #fffbeb; /* amber-50 */
  color: #b45309; /* amber-700 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.btn-secondary:hover {
  background-color: #fef3c7; /* amber-100 */
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Destructive/remove button, red variant */
.btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* space-x-2 */
  padding: 8px 16px; /* match primary/secondary padding */
  border-radius: 0.5rem;
  border: 1px solid #fca5a5; /* approx red-300 */
  background-color: #fef2f2; /* red-50 */
  color: #b91c1c; /* red-700 */
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.btn-remove:hover {
  background-color: #fecaca; /* red-200 */
  border-color: #f87171; /* red-400 */
  color: #7f1d1d; /* red-800 */
}

.btn-remove:disabled,
.btn-remove[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Positive/approve button, green variant */
.btn-approve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 8px 16px; /* match primary/secondary padding */
  border-radius: 0.5rem;
  border: 1px solid #6ee7b7; /* green-300-ish */
  background-color: #ecfdf5; /* green-50 */
  color: #166534; /* green-700 */
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.btn-approve:hover {
  background-color: #bbf7d0; /* green-200 */
  border-color: #22c55e; /* green-500 */
  color: #14532d; /* green-800 */
}

.btn-approve:disabled,
.btn-approve[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Neutral/reset button */
.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 8px 16px; /* match primary/secondary padding */
  border-radius: 0.5rem;
  border: 1px solid #d4d4d8; /* neutral-300 */
  background-color: #f5f5f5; /* neutral-100-ish */
  color: #374151; /* neutral-700 */
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.btn-reset:hover {
  background-color: #e5e7eb; /* neutral-200 */
  border-color: #a1a1aa; /* neutral-400 */
  color: #111827; /* neutral-900 */
}

.btn-reset:disabled,
.btn-reset[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
