/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #10b981;
  --secondary-hover: #059669;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --background: #f3f4f6;
  --surface: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border: #d1d5db;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 0.5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--background);
}

/* Layout Classes */
.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-2 {
  gap: 0.5rem;
}

.gap-8 {
  gap: 2rem;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-7xl {
  max-width: 80rem;
}

/* Card Styles */
.card {
  background-color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.card-lg {
  padding: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: var(--surface);
  color: var(--text-primary);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-danger {
  background-color: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  color: var(--danger-hover);
}

.btn-block {
  width: 100%;
}

/* Typography */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-danger {
  color: var(--danger);
}

/* Navigation */
.navbar {
  background-color: var(--surface);
  box-shadow: var(--shadow);
  padding: 0;
}

.navbar-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.text-decoration-none {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s;
  color: var(--text-primary);
  font-weight: 500;
}

.text-decoration-none:hover {
  background-color: var(--background);
  color: var(--primary);
}

.text-white {
  color: var(--text-primary);
}

.text-white.font-bold {
  color: var(--primary);
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 24rem;
  overflow-y: auto;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #f9fafb;
  border-radius: var(--radius);
}

.list-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

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

.badge-assigned {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Code/Output */
.code-output {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #1f2937;
  color: #34d399;
  font-size: 0.875rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

.error-output {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 0.875rem;
  border-radius: var(--radius);
}

/* Responsive */
@media (min-width: 1024px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Utilities */
.hidden {
  display: none;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.w-full {
  width: 100%;
}

.flex-1 {
  flex: 1;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.rounded {
  border-radius: var(--radius);
}

.shadow-md {
  box-shadow: var(--shadow-lg);
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-white {
  background-color: var(--surface);
}

.bg-gray-100 {
  background-color: var(--background);
}

.text-gray-500 {
  color: var(--text-secondary);
}

.text-gray-700 {
  color: var(--text-primary);
}

.text-gray-900 {
  color: var(--text-primary);
}

.text-red-600 {
  color: var(--danger);
}

.text-red-800 {
  color: var(--danger-hover);
}

.hover\:text-red-800:hover {
  color: var(--danger-hover);
}

.border {
  border: 1px solid var(--border);
}

.border-gray-300 {
  border-color: var(--border);
}

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

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

.items-start {
  align-items: flex-start;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
