/* Modern Clean CSS Reset & Theme */
*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #030712;
  color: #f3f4f6;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Utility classes compatible with HTML markup */
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-6 > :not([hidden]) ~ :not([hidden]) { margin-left: 1.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:w-auto { width: auto; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.w-4 { width: 1rem; height: 1rem; }
.w-8 { width: 2rem; height: 2rem; }
.w-10 { width: 2.5rem; height: 2.5rem; }
.w-14 { width: 3.5rem; height: 3.5rem; }

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

.bg-slate-950 { background-color: #030712; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-700 { background-color: #334155; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-600\/20 { background-color: rgba(79, 70, 229, 0.2); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-cyan-500\/10 { background-color: rgba(6, 182, 212, 0.1); }
.bg-amber-500\/10 { background-color: rgba(245, 158, 11, 0.1); }
.bg-purple-500\/10 { background-color: rgba(168, 85, 247, 0.1); }

.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-slate-800 { border-color: #1e293b; }
.border-slate-700 { border-color: #334155; }
.border-indigo-500 { border-color: #6366f1; }
.border-indigo-500\/30 { border-color: rgba(99, 102, 241, 0.3); }

.text-white { color: #ffffff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-indigo-400 { color: #818cf8; }
.text-emerald-400 { color: #34d399; }
.text-cyan-400 { color: #22d3ee; }
.text-amber-400 { color: #fbbf24; }
.text-purple-400 { color: #c084fc; }
.text-rose-400 { color: #fb7185; }

.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.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-2xl { font-size: 1.5rem; line-height: 2rem; }

.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight { letter-spacing: -0.025em; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.15s ease-in-out; }
.hidden { display: none !important; }

button {
  cursor: pointer;
  border: none;
}
button:hover:not(:disabled) {
  opacity: 0.9;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-trial { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-cancelled { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-service { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-paid { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.5); font-weight: 700; box-shadow: 0 0 8px rgba(16, 185, 129, 0.2); }
.badge-unpaid { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

/* Animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Pagination Button Styles */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.pagination-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.pagination-btn:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Light Theme Overrides */
html.light body {
  background-color: #f8fafc;
  color: #0f172a;
}
html.light .bg-slate-950 { background-color: #f8fafc; }
html.light .bg-slate-900 { background-color: #ffffff; }
html.light .bg-slate-900\/50, 
html.light .bg-slate-900\/60, 
html.light .bg-slate-900\/40 { 
  background-color: #ffffff; 
}
html.light .bg-slate-800 { background-color: #f1f5f9; }
html.light .bg-slate-800\/60 { background-color: #e2e8f0; }
html.light .bg-slate-800\/80 { background-color: #e2e8f0; }
html.light .bg-slate-700 { background-color: #cbd5e1; }

html.light .border-slate-800 { border-color: #e2e8f0; }
html.light .border-slate-700 { border-color: #cbd5e1; }
html.light .border-slate-700\/60 { border-color: #cbd5e1; }

html.light .text-white { color: #0f172a !important; }
html.light .text-slate-100 { color: #0f172a !important; }
html.light .text-slate-200 { color: #1e293b !important; }
html.light .text-slate-300 { color: #334155 !important; }
html.light .text-slate-400 { color: #64748b !important; }
html.light .text-slate-500 { color: #64748b !important; }

html.light input:not([type="checkbox"]):not([type="radio"]),
html.light select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html.light input::placeholder {
  color: #94a3b8 !important;
}

html.light thead {
  background-color: #f8fafc !important;
}
html.light tbody tr:hover {
  background-color: #f1f5f9 !important;
}
html.light tbody tr {
  border-color: #e2e8f0 !important;
}

html.light #login-modal, 
html.light #service-modal, 
html.light #credentials-modal,
html.light #service-detail-modal {
  background-color: rgba(15, 23, 42, 0.6) !important;
}
html.light #login-modal .bg-slate-900,
html.light #service-modal .bg-slate-900,
html.light #credentials-modal .bg-slate-900,
html.light #service-detail-modal .bg-slate-900 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

html.light .shadow-sm {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}
