/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-align: center;
  font-family: var(--font-primary);
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(100, 100, 255, 0.5);
  color: var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(100, 100, 255, 0.1);
}

.btn-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* CARDS */
.card {
  background: rgba(30, 30, 50, 0.9);
  border: 1px solid rgba(100, 100, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(100, 100, 255, 0.5);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid rgba(100, 100, 255, 0.2);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: #888;
  font-size: 0.875rem;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-info {
  background: rgba(0, 212, 255, 0.2);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.badge-danger {
  background: rgba(245, 87, 108, 0.2);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.badge-warning {
  background: rgba(255, 193, 7, 0.2);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}

.badge-success {
  background: rgba(0, 242, 254, 0.2);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

/* FORMS */
input[type="email"],
input[type="password"],
input[type="text"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(100, 100, 255, 0.3);
  background: rgba(17, 24, 39, 0.5);
  color: white;
  font-family: var(--font-primary);
  transition: all var(--transition-base);
}

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

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: #e0e0e0;
}

/* PROGRESS BAR */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  transition: width var(--transition-base);
}

.progress-bar-success {
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

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

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

/* SPINNER */
.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(100, 100, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

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

.table th {
  text-align: left;
  padding: var(--space-md);
  border-bottom: 2px solid rgba(100, 100, 255, 0.3);
  font-weight: 700;
  color: var(--color-primary);
}

.table td {
  padding: var(--space-md);
  border-bottom: 1px solid rgba(100, 100, 255, 0.1);
}

.table tr:hover {
  background: rgba(100, 100, 255, 0.05);
}

/* NAV LINK */
.nav-link {
  color: #9ca3af;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.nav-link:hover,
.nav-link.router-link-active {
  color: var(--color-primary);
  background: rgba(0, 212, 255, 0.1);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  max-width: 48rem;
  width: 100%;
  margin: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* ALERT */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.alert-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.alert-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  color: #4ade80;
}