/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--olive-600); color: white; }
.btn-primary:hover { background: var(--olive-700); color: white; }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-700); }
.btn-danger { background: var(--wine-600); color: white; }
.btn-danger:hover { background: var(--wine-700); color: white; }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-outline-primary { background: transparent; color: var(--olive-600); border: 1px solid var(--olive-400); }
.btn-outline-primary:hover { background: var(--olive-50); }
.btn-outline-danger { background: transparent; color: var(--wine-500); border: 1px solid var(--wine-300); }
.btn-outline-danger:hover { background: var(--wine-50); }

/* === BADGES === */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-approved { background: var(--olive-100); color: var(--olive-700); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-quarantine { background: var(--wine-100); color: var(--wine-800); }
.badge-clean { background: #dbeafe; color: #1e40af; }
.badge-rejected { background: var(--wine-200); color: var(--wine-900); }
.badge-draft { background: var(--gray-200); color: var(--gray-600); }

.badge-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-html { background: #fef3c7; color: #92400e; }
.badge-zip { background: #dbeafe; color: #1e40af; }

/* === CARDS === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; margin: 0; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* === STAT CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card.accent { border-left: 3px solid var(--olive-500); }
.stat-card.wine { border-left: 3px solid var(--wine-500); }
.stat-card.warn { border-left: 3px solid var(--warning); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* === TABLES === */
.table-vtp { width: 100%; border-collapse: collapse; }
.table-vtp th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  padding: 10px 12px;
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
}
.table-vtp td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  vertical-align: middle;
}
.table-vtp tr:hover td { background: var(--gray-50); }

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-family);
  background: white;
  transition: border-color .15s;
  color: var(--gray-800);
}
.form-control:focus {
  outline: none;
  border-color: var(--olive-400);
  box-shadow: 0 0 0 3px rgba(122, 138, 62, .15);
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* === ALERTS === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: var(--olive-50); color: var(--olive-700); border: 1px solid var(--olive-200); }
.alert-danger,
.alert-error { background: var(--wine-50); color: var(--wine-700); border: 1px solid var(--wine-200); }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.alert .btn-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  opacity: .5;
  padding: 0;
  line-height: 1;
}
.alert .btn-close:hover { opacity: 1; }

/* === ARTIFACT GRID === */
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.artifact-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
}
.artifact-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--olive-300);
  text-decoration: none;
  color: inherit;
}

/* Artifact card icon */
.artifact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.artifact-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.artifact-card-icon.type-html {
  background: #fef3c7;
  color: #92400e;
}
.artifact-card-icon.type-zip {
  background: #dbeafe;
  color: #1e40af;
}

.artifact-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.artifact-card-meta {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.artifact-card-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.artifact-card-desc {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.artifact-card-footer {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* === SCAN FINDINGS === */
.scan-finding {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.scan-finding.critical { background: var(--wine-50); border: 1px solid var(--wine-200); }
.scan-finding.warning { background: #fffbeb; border: 1px solid #fde68a; }
.scan-finding.info { background: #eff6ff; border: 1px solid #bfdbfe; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

/* === UTILITIES === */
.text-muted { color: var(--gray-500) !important; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.ms-auto { margin-left: auto; }
