* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #16a34a;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
}

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

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

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

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

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

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--gray-700);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

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

.table th {
  text-align: left;
  padding: 0.75rem;
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 2px solid var(--gray-200);
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
}

.table tr:hover {
  background: var(--gray-50);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-nav-btn {
  background: transparent;
  color: #6b7280;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 1rem;
}

.form-nav-btn:hover {
  background: transparent;
  color: #111827;
  border-bottom-color: #d1d5db;
}

.form-nav-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: transparent;
}

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

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

.badge-gray {
  background: var(--gray-200);
  color: var(--gray-700);
}

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
}

.nav-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
}

.nav-item:hover {
  color: var(--gray-900);
}

.nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.option-card {
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.option-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.option-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.option-card.disabled:hover {
  border-color: var(--gray-200);
  box-shadow: none;
}

.option-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.option-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.option-capacity {
  font-size: 0.8125rem;
  color: var(--gray-600);
}

.progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
}

.progress-step.active {
  background: var(--primary);
}

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

.text-muted {
  color: var(--gray-600);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-gap {
  gap: 0.5rem;
}

.hidden {
  display: none !important;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.token-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .token-columns {
    grid-template-columns: 1fr;
  }
}

.token-column {
  min-width: 0;
}

.token-details-row {
  transition: all 0.3s ease;
}

.token-details-content {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toggle-details {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
}

.toggle-details:hover {
  transform: translateY(-1px);
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.75rem;
}

.loading-message {
  color: var(--gray-600);
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--gray-600);
  font-size: 1rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-icon:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  transform: scale(1.1);
}

.btn-icon .toggle-icon {
  font-size: 0.875rem;
}

.stats-option {
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: 6px;
  transition: background 0.2s;
}

.stats-option:hover {
  background: var(--gray-100);
}

.progress-bar-container {
  width: 100%;
  height: 24px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.progress-bar-success {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.progress-bar-warning {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.progress-bar-danger {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}
