*, :after, :before { box-sizing: border-box; border: 0 solid }
:root { color-scheme: dark }
body { margin: 0; line-height: inherit; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }

:root {
  --background: #000000;
  --foreground: #ffffff;
  --card: #0a0a0a;
  --card-foreground: #ffffff;
  --popover: #0a0a0a;
  --popover-foreground: #ffffff;
  --primary: #ff0033;
  --primary-foreground: #000000;
  --secondary: #1a1a1a;
  --secondary-foreground: #ffffff;
  --muted: #333333;
  --muted-foreground: #999999;
  --accent: #ff0033;
  --accent-foreground: #ffffff;
  --destructive: #ff0033;
  --border: #1a1a1a;
  --input: #0a0a0a;
  --ring: #ff0033;
  --radius: 0.25rem;
}

.font-mono { font-family: "Red Hat Mono", "Courier New", monospace }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
.bg-background { background: var(--background) }
.bg-card { background: var(--card) }
.bg-muted { background: var(--muted) }
.bg-primary { background: var(--primary) }
.bg-primary\/20 { background: color-mix(in srgb, var(--primary) 20%, transparent) }
.text-foreground { color: var(--foreground) }
.text-muted-foreground { color: var(--muted-foreground) }
.text-primary { color: var(--primary) }
.text-primary-foreground { color: var(--primary-foreground) }
.text-red-500 { color: #ef4444 }
.text-green-500 { color: #22c55e }
.border-border { border-color: var(--border) }
.border-primary { border-color: var(--primary) }
.placeholder-muted-foreground::placeholder { color: var(--muted-foreground) }

.border { border-width: 1px }
.border-b { border-bottom-width: 1px }
.border-t { border-top-width: 1px }
.border-r { border-right-width: 1px }

.block { display: block }
.flex { display: flex }
.inline-block { display: inline-block }
.inline { display: inline }
.hidden { display: none }

.flex-1 { flex: 1 1 0% }
.flex-col { flex-direction: column }
.flex-wrap { flex-wrap: wrap }
.items-center { align-items: center }
.items-end { align-items: flex-end }
.justify-between { justify-content: space-between }
.justify-center { justify-content: center }
.gap-1 { gap: 0.25rem }
.gap-2 { gap: 0.5rem }
.gap-3 { gap: 0.75rem }
.gap-4 { gap: 1rem }

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

.w-full { width: 100% }
.w-4 { width: 1rem }
.w-24 { width: 6rem }
.h-1 { height: 0.25rem }
.h-2 { height: 0.5rem }
.h-4 { height: 1rem }
.h-8 { height: 2rem }
.h-full { height: 100% }
.min-h-screen { min-height: 100vh }
.max-h-48 { max-height: 12rem }
.max-h-64 { max-height: 16rem }
.max-h-96 { max-height: 24rem }
.max-w-sm { max-width: 24rem }
.max-w-lg { max-width: 32rem }
.min-w-0 { min-width: 0 }
.flex-shrink-0 { flex-shrink: 0 }

.p-2 { padding: 0.5rem }
.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 }
.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 }
.pt-2 { padding-top: 0.5rem }
.pt-4 { padding-top: 1rem }
.pt-6 { padding-top: 1.5rem }
.pt-8 { padding-top: 2rem }
.pb-1 { padding-bottom: 0.25rem }
.pb-2 { padding-bottom: 0.5rem }
.pb-3 { padding-bottom: 0.75rem }
.pb-6 { padding-bottom: 1.5rem }
.pb-8 { padding-bottom: 2rem }

.m-0 { margin: 0 }
.mb-1 { margin-bottom: 0.25rem }
.mb-2 { margin-bottom: 0.5rem }
.mb-3 { margin-bottom: 0.75rem }
.mb-4 { margin-bottom: 1rem }
.mb-8 { margin-bottom: 2rem }
.mt-1 { margin-top: 0.25rem }
.mt-2 { margin-top: 0.5rem }
.mt-4 { margin-top: 1rem }
.mt-6 { margin-top: 1.5rem }
.mt-8 { margin-top: 2rem }
.mt-12 { margin-top: 3rem }

.space-y-1 > * + * { margin-top: 0.25rem }
.space-y-2 > * + * { margin-top: 0.5rem }
.space-y-3 > * + * { margin-top: 0.75rem }
.space-y-4 > * + * { margin-top: 1rem }
.space-y-6 > * + * { margin-top: 1.5rem }

.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-bold { font-weight: 700 }
.text-center { text-align: center }
.text-right { text-align: right }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.whitespace-nowrap { white-space: nowrap }
.whitespace-pre-wrap { white-space: pre-wrap }
.select-all { user-select: all }

.overflow-x-auto { overflow-x: auto }
.overflow-y-auto { overflow-y: auto }

.fixed { position: fixed }
.sticky { position: sticky }
.top-0 { top: 0 }

.cursor-pointer { cursor: pointer }

.transition-colors { transition: color 0.15s, background-color 0.15s, border-color 0.15s }
.transition-opacity { transition: opacity 0.15s }

.hover\:bg-muted:hover { background: var(--muted) }
.hover\:border-primary:hover { border-color: var(--primary) }
.hover\:opacity-90:hover { opacity: 0.9 }

.focus\:outline-none:focus { outline: none }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--ring) }
.focus\:border-primary:focus { border-color: var(--primary) }

.disabled\:opacity-50:disabled { opacity: 0.5 }

.opacity-50 { opacity: 0.5 }

.z-30 { z-index: 30 }
.z-40 { z-index: 40 }
.z-50 { z-index: 50 }

.rounded { border-radius: var(--radius) }
.rounded-sm { border-radius: 0.125rem }

.sidebar {
  width: 224px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 100vh;
}
.sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border) }
.sidebar-nav { flex: 1; padding: 1rem 1rem 0; display: flex; flex-direction: column; gap: 0.25rem }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border) }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--foreground);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--muted); border-color: var(--primary) }
.nav-item.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary) }
.nav-item.active .icon { color: var(--primary-foreground) }
.nav-item .icon { width: 14px; height: 14px; flex-shrink: 0 }
.nav-section-label {
  font-size: 0.625rem;
  letter-spacing: 1px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  padding: 0.75rem 0.75rem 0.25rem;
  margin-top: 0.25rem;
}

.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border) }
.mobile-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem }
.menu-btn { padding: 0.5rem; background: var(--card); border: 1px solid var(--border); color: var(--foreground); cursor: pointer }
.menu-btn .icon { width: 16px; height: 16px }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 30 }

.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0 1rem }
.login-box { width: 100%; max-width: 24rem }

.flash-error, .flash-success {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 999;
  padding: 0.5rem 1.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px
}
.flash-error { background: var(--card); border: 1px solid var(--primary); color: var(--primary) }
.flash-success { background: var(--card); border: 1px solid #00cc00; color: #00cc00 }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 700;
  font-family: "Red Hat Mono", "Courier New", monospace;
  border-width: 1px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover { opacity: 0.9 }
.btn-secondary {
  background: var(--card);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: var(--primary-foreground) }
.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
}
.btn-link {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
  font-family: "Red Hat Mono", "Courier New", monospace;
}
.btn-link:hover { opacity: 0.8 }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="date"], input[type="color"], textarea, select {
  font-family: "Red Hat Mono", "Courier New", monospace;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="url"]:focus, input[type="date"]:focus, input[type="color"]:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--ring);
  border-color: var(--primary);
}
input[disabled] { background: var(--muted); color: var(--muted-foreground); cursor: not-allowed }
input[type="checkbox"] { accent-color: var(--primary); cursor: pointer }

input[type="file"] {
  font-family: "Red Hat Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--foreground);
}
input[type="file"]::file-selector-button {
  padding: 0.375rem 0.75rem;
  margin-right: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: "Red Hat Mono", "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--primary);
}

button { font-family: "Red Hat Mono", "Courier New", monospace; cursor: pointer }

details summary { cursor: pointer }
details summary::-webkit-details-marker { display: none }

::-webkit-scrollbar { width: 6px; height: 6px }
::-webkit-scrollbar-track { background: var(--background) }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px }
::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground) }

@media (max-width: 767px) {
  .mobile-header { display: block }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
    transform: translateX(-100%); transition: transform 0.2s
  }
  .sidebar.open { transform: translateX(0) }
  .mobile-overlay.open { display: block }
}
@media (min-width: 768px) {
  .sidebar { transform: none }
  .md\:block { display: block }
  .md\:hidden { display: none }
  .md\:p-8 { padding: 2rem }
  .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)) }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) }
  .md\:flex-row { flex-direction: row }
  .md\:items-center { align-items: center }
  .md\:justify-between { justify-content: space-between }
  .md\:ml-0 { margin-left: 0 }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
}
