/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--gradient-green);
  color: #000;
  box-shadow: 0 2px 12px rgba(34,197,94,0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(34,197,94,0.35);
}

.btn-secondary {
  background: var(--panel);
  border: 1px solid var(--border-light);
  color: var(--text);
  backdrop-filter: blur(8px);
}

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

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-ghost:hover { border-color: var(--green); color: var(--green); }

.btn-sm { padding: 7px 14px; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 0.92rem; }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.badge-amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.15); }
.badge-red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }
.badge-blue { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,0.15); }
.badge-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(167,139,250,0.15); }
.badge-muted { background: rgba(100,116,139,0.1); color: var(--muted); border: 1px solid rgba(100,116,139,0.15); }

/* ---- STATUS DOT ---- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green { background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.status-dot.yellow { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,0.4); }
.status-dot.red { background: var(--red); box-shadow: 0 0 8px rgba(239,68,68,0.4); }

/* ---- CARDS ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--panel-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 { font-size: 1.05rem; font-weight: 700; }

.modal-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.modal-close:hover { border-color: var(--red); color: var(--red); }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.modal-footer .hint { font-size: 0.7rem; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; }

/* ---- CHIP / FILTER ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.chip:hover { border-color: var(--border-light); color: var(--text); }
.chip.active { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.3); font-weight: 600; }
.chip .remove { font-size: 0.9rem; line-height: 1; }

/* ---- ACCORDION ---- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.accordion + .accordion { margin-top: 8px; }

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
}

.accordion-header:hover { background: rgba(255,255,255,0.02); }
.accordion-header .arrow { transition: transform 0.3s; font-size: 0.8rem; color: var(--muted); }
.accordion.open .accordion-header .arrow { transform: rotate(180deg); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: transparent;
}

.accordion.open .accordion-body { max-height: 800px; }

.accordion-content {
  padding: 0 22px 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: 12px 18px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ---- GRID LAYOUTS ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

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

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