*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none; }
.cursor-pointer { cursor: pointer; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.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)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }

.w-full { width: 100%; }
.min-w-full { min-width: 100%; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.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 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.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-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pl-3 { padding-left: 0.75rem; }
.pr-3 { padding-right: 0.75rem; }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.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; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.object-cover { object-fit: cover; }
.align-middle { vertical-align: middle; }

.border { border: 1px solid #e2e8f0; }
.border-0 { border: 0; }
.border-t { border-top: 1px solid #e2e8f0; }
.border-b { border-bottom: 1px solid #e2e8f0; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-indigo-600 { border-color: #4f46e5; }
.border-red-600 { border-color: #dc2626; }

.bg-white { background-color: #ffffff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-700 { background-color: #4338ca; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }
.bg-red-600 { background-color: #dc2626; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }

.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; }

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

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-slate-900 { color: #0f172a; }
.text-slate-700 { color: #334155; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.text-slate-400 { color: #94a3b8; }
.text-white { color: #ffffff; }
.text-indigo-600 { color: #4f46e5; }
.text-emerald-600 { color: #059669; }
.text-red-600 { color: #dc2626; }
.text-amber-700 { color: #b45309; }

.shadow { box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.08); }
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.shadow-md { box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12); }

.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }

.divide-y > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid #e2e8f0; }
.divide-slate-200 > :not([hidden]) ~ :not([hidden]) { border-top-color: #e2e8f0; }

.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-emerald-700:hover { background-color: #047857; }
.hover\:bg-red-600:hover { background-color: #dc2626; }

[data-theme="dark"] .hover\:bg-slate-50:hover { background-color: #111827; }
[data-theme="dark"] .hover\:bg-slate-100:hover { background-color: #1f2937; }
.hover\:text-slate-900:hover { color: #0f172a; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:border-slate-400:hover { border-color: #94a3b8; }
.hover\:border-indigo-600:hover { border-color: #4f46e5; }
.hover\:border-red-600:hover { border-color: #dc2626; }

.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4); }
.focus\:ring-indigo-500:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45); }

.disabled\:opacity-50:disabled { opacity: 0.5; }
.cursor-not-allowed { cursor: not-allowed; }

.input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #ffffff;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
  border-color: #6366f1;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.badge-emerald { background: #ecfdf5; color: #047857; }
.badge-amber { background: #fffbeb; color: #b45309; }
.badge-slate { background: #f1f5f9; color: #475569; }

.theme-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.theme-btn:hover {
  background: #f8fafc;
}

/* Theme */
:root {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background: #0b1120;
  color: #e2e8f0;
}

[data-theme="dark"] .bg-white { background-color: #0f172a; }
[data-theme="dark"] .bg-slate-50 { background-color: #0b1120; }
[data-theme="dark"] .bg-slate-100 { background-color: #0f172a; }
[data-theme="dark"] .bg-slate-200 { background-color: #111827; }
[data-theme="dark"] .bg-slate-700 { background-color: #1f2937; }
[data-theme="dark"] .bg-slate-800 { background-color: #0f172a; }
[data-theme="dark"] .bg-slate-900 { background-color: #020617; }

[data-theme="dark"] .text-slate-900 { color: #e2e8f0; }
[data-theme="dark"] .text-slate-700 { color: #cbd5e1; }
[data-theme="dark"] .text-slate-600 { color: #94a3b8; }
[data-theme="dark"] .text-slate-500 { color: #94a3b8; }
[data-theme="dark"] .text-slate-400 { color: #64748b; }

[data-theme="dark"] .border { border-color: #1f2937; }
[data-theme="dark"] .border-slate-200 { border-color: #1f2937; }
[data-theme="dark"] .border-slate-300 { border-color: #334155; }
[data-theme="dark"] .border-slate-700 { border-color: #334155; }

[data-theme="dark"] .shadow,
[data-theme="dark"] .shadow-sm,
[data-theme="dark"] .shadow-md { box-shadow: 0 1px 3px rgba(2, 6, 23, 0.4), 0 1px 2px rgba(2, 6, 23, 0.35); }

[data-theme="dark"] .badge-emerald { background: #064e3b; color: #a7f3d0; }
[data-theme="dark"] .badge-amber { background: #78350f; color: #fde68a; }
[data-theme="dark"] .badge-slate { background: #111827; color: #cbd5e1; }
[data-theme="dark"] .theme-btn {
  border-color: #334155;
  background: #1e293b;
  color: #ffffff;
}
[data-theme="dark"] .theme-btn:hover { background: #334155; }

[data-theme="dark"] .input {
  background: #0b1120;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .input::placeholder {
  color: #64748b;
}

[data-theme="dark"] .input:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
  border-color: #6366f1;
}

[data-theme="dark"] select.input option {
  background: #0b1120;
  color: #e2e8f0;
}

.md\:flex {}
.md\:hidden {}
.md\:grid-cols-2 {}
.md\:grid-cols-3 {}
.md\:items-center {}
.md\:justify-between {}
.md\:text-right {}
.md\:col-span-2 {}
.md\:col-span-3 {}
.md\:col-span-4 {}
.md\:gap-4 {}
.md\:gap-6 {}
.md\:mt-0 {}
.md\:flex-row {}
.md\:w-auto {}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:justify-between { justify-content: space-between; }
  .md\:text-right { text-align: right; }
  .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\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:gap-4 { gap: 1rem; }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:mt-0 { margin-top: 0; }
  .md\:w-auto { width: auto; }
}

.lg\:grid-cols-2 {}
.lg\:grid-cols-3 {}
.lg\:grid-cols-4 {}
.lg\:col-span-2 {}
.lg\:col-span-3 {}
.lg\:col-span-4 {}
.lg\:gap-6 {}
.lg\:flex-row {}

@media (min-width: 1024px) {
  .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\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:gap-6 { gap: 1.5rem; }
  .lg\:flex-row { flex-direction: row; }
}
