/* ===== CARDS ===== */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}
.card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-image {
  width: 100%; height: 180px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 16px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--text-primary);
}
.card-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }
.card-body { color: var(--text-secondary); font-size: 0.9rem; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9rem;
  border: none; cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-secondary {
  background: var(--glass); color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: var(--glass-hover); border-color: var(--glass-border-hover); }
.btn-danger { background: rgba(255,107,107,0.15); color: var(--coral); border: 1px solid rgba(255,107,107,0.2); }
.btn-danger:hover { background: rgba(255,107,107,0.25); }
.btn-success { background: rgba(0,212,170,0.15); color: var(--teal); border: 1px solid rgba(0,212,170,0.2); }
.btn-success:hover { background: rgba(0,212,170,0.25); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--glass); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ===== INPUTS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.95rem;
  transition: var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { color: var(--coral); font-size: 0.8rem; margin-top: 4px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-secondary); color: var(--text-primary); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 500;
}
.badge-accent { background: rgba(108,99,255,0.15); color: var(--accent); }
.badge-teal { background: rgba(0,212,170,0.15); color: var(--teal); }
.badge-coral { background: rgba(255,107,107,0.15); color: var(--coral); }
.badge-gold { background: rgba(255,217,61,0.15); color: var(--gold); }
.badge-sky { background: rgba(77,201,246,0.15); color: var(--sky); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: fadeIn 0.2s ease;
  opacity: 0; pointer-events: none;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 500px;
  max-height: 80vh; overflow-y: auto;
  animation: scaleIn 0.3s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.5rem; padding: 4px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-text { font-size: 0.9rem; margin-bottom: 24px; }

/* ===== LOADING ===== */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ===== STATS ===== */
.stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 20px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--glass-border); margin-bottom: 24px; }
.tab {
  padding: 10px 20px; font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== SEARCH BAR ===== */
.search-bar {
  position: relative; margin-bottom: 24px;
}
.search-bar input {
  width: 100%; padding: 14px 20px 14px 48px;
  background: var(--bg-tertiary); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); color: var(--text-primary);
  font-size: 1rem; outline: none; transition: var(--transition);
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-bar .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 1.1rem;
}

/* ===== CHECKBOX ===== */
.checkbox-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.checkbox-item:hover { border-color: var(--glass-border-hover); }
.checkbox-item.checked { opacity: 0.6; }
.checkbox-item.checked .checkbox-label { text-decoration: line-through; }
.checkbox-input {
  width: 20px; height: 20px; accent-color: var(--teal);
  cursor: pointer;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%; height: 8px; background: var(--bg-tertiary);
  border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--gradient-hero);
  border-radius: 4px; transition: width 0.5s ease;
}

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--glass-border); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 0.9rem; }
th { background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { border-top: 1px solid var(--glass-border); color: var(--text-primary); }
tr:hover td { background: var(--glass); }

@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .modal { margin: 16px; max-height: 90vh; }
}
