/* ============ NSF TAB & ANIMATION ============ */
.nsf-tab {
  position: relative;
  color: var(--danger) !important;
}
.nsf-tab .nsf-tab-inner {
  display: inline-flex;
  align-items: center;
}
.nsf-tab.has-new {
  animation: nsfPulse 2s infinite;
}
.nsf-tab.has-new::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: nsfDotPulse 1.5s infinite;
}
@keyframes nsfPulse {
  0%, 100% { background: transparent; }
  50% { background: rgba(220, 38, 38, 0.08); }
}
@keyframes nsfDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.nsf-badge {
  background: var(--danger) !important;
  color: white !important;
}

/* NSF new item banner */
.nsf-new-banner {
  background: linear-gradient(90deg, var(--danger-bg), transparent);
  border-left: 4px solid var(--danger);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text);
  animation: nsfBannerSlide 0.4s ease-out;
}
.nsf-new-banner strong { color: var(--danger); }
@keyframes nsfBannerSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* NSF list styling */
.nsf-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.nsf-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.nsf-item:hover { background: var(--surface-alt); }
.nsf-item:last-child { border-bottom: none; }
.nsf-item.is-new {
  background: linear-gradient(90deg, rgba(220,38,38,0.05) 0%, transparent 70%);
  border-left: 3px solid var(--danger);
  padding-left: 13px;
}
.nsf-item-info { min-width: 0; }
.nsf-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nsf-new-pill {
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nsf-item-reason {
  font-size: 11px;
  color: var(--text-muted);
}
.nsf-item-amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  text-align: right;
  min-width: 80px;
}
.nsf-item-date {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  min-width: 90px;
}
.nsf-item-count {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* Quick Info NSF badge */
.quick-info-nsf {
  background: linear-gradient(135deg, rgba(220,38,38,0.08), rgba(220,38,38,0.02));
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.quick-info-nsf-icon {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}
.quick-info-nsf-body { flex: 1; }
.quick-info-nsf-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.quick-info-nsf-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}
.quick-info-nsf-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 700px) {
  .nsf-item {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .nsf-item-date { grid-column: 1; text-align: left; }
  .nsf-item-count { grid-column: 2; }
}

/* Version update banner */
.version-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #3B82F6, #2563EB);
  color: white;
  padding: 10px 20px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: versionSlideDown 0.3s ease-out;
}
@keyframes versionSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
#version-refresh-btn {
  background: white;
  color: #2563EB;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
#version-refresh-btn:hover {
  background: #F1F5F9;
  transform: scale(1.03);
}
body:has(.version-banner:not([hidden])) { padding-top: 42px; }

