/* ════════════════════════════════════════════════════════════
   TABS
   Multi-variant: default (underline) | pills | bordered
═════════════════════════════════════════════════════════════ */
 
.tabs {
  margin: 32px 0;
}
 
/* Tab navigation bar */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 32px;
  position: relative;
}
 
.tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.25s, border-color 0.25s;
  position: relative;
  outline: none;
}
 
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
 
.tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
 
/* Optional badge on a tab (e.g. count) */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: var(--gold-light);
  border-radius: 100px;
}
 
/* ── Variant: default (underline) ──────────────────────── */
.tabs-default .tabs-nav {
  border-bottom: 1px solid var(--line);
  gap: 0;
}
 
.tabs-default .tab {
  position: relative;
  margin-bottom: -1px;
}
 
.tabs-default .tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
  transform-origin: center;
}
 
.tabs-default .tab:hover::after,
.tabs-default .tab.active::after {
  transform: scaleX(1);
}
 
/* ── Variant: pills ─────────────────────────────────────── */
.tabs-pills .tabs-nav {
  gap: 6px;
}
 
.tabs-pills .tab {
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface);
  height: 36px;
  padding: 0 18px;
}
 
[data-theme="dark"] .tabs-pills .tab {
  background: var(--glass-bg);
}
 
.tabs-pills .tab:hover {
  border-color: var(--gold);
  color: var(--text);
}
 
.tabs-pills .tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #18181d;
}
 
.tabs-pills .tab.active .tab-badge {
  background: rgba(24, 24, 29, 0.18);
  color: #18181d;
}
 
/* ── Variant: bordered ─────────────────────────────────── */
.tabs-bordered .tabs-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 4px;
  gap: 2px;
}
 
[data-theme="dark"] .tabs-bordered .tabs-nav {
  background: var(--glass-bg);
}
 
.tabs-bordered .tab {
  border-radius: 4px;
  padding: 9px 16px;
}
 
.tabs-bordered .tab:hover {
  background: rgba(201, 164, 100, 0.08);
}
 
.tabs-bordered .tab.active {
  background: var(--gold);
  color: #18181d;
}
 
/* ── Panels ─────────────────────────────────────────────── */
.tabs-panels {
  position: relative;
}
 
.tab-panel {
  display: none;
}
 
.tab-panel.active {
  display: block;
  animation: tabPanelIn 0.35s var(--ease-out);
}
 
@keyframes tabPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ── Loader (during AJAX fetch) ────────────────────────── */
.tab-panel-loading {
  min-height: 80px;
  position: relative;
}
 
.tab-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}
 
.tab-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
  animation: tabLoaderBounce 1.2s ease-in-out infinite;
}
 
.tab-loader span:nth-child(2) { animation-delay: 0.15s; }
.tab-loader span:nth-child(3) { animation-delay: 0.30s; }
 
@keyframes tabLoaderBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%           { transform: scale(1.1); opacity: 1; }
}
 
/* ── Error state ─────────────────────────────────────────── */
.tab-error {
  padding: 24px 28px;
  background: rgba(197, 64, 42, 0.05);
  border: 1px solid rgba(197, 64, 42, 0.20);
  border-radius: var(--r-card);
  color: #c5402a;
  font-size: 13px;
  text-align: center;
}
 
/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .tabs-nav::-webkit-scrollbar { height: 2px; }
  .tabs-nav::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 1px; }
  .tab { font-size: 10px; padding: 10px 14px; }
  .tabs-pills .tab { height: 32px; padding: 0 14px; }
}