/* ─── Dealflow Widget — Spinning Border (wrapper technique) ─── */
@keyframes dpRingSpin {
  to { transform: rotate(360deg); }
}

/* Outer wrapper — provides the 2px spinning border strip */
.dp-glow-ring {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  /* Padding creates the visible border gap: top + sides, not bottom */
  padding: 2px 2px 0;
}

/* The large rotating conic gradient — clipped by dp-glow-ring overflow:hidden */
.dp-glow-ring::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(
    from 0deg,
    transparent          0deg,
    transparent          50deg,
    rgba(72,192,191,0.35) 100deg,
    #48c0bf              162deg,
    rgba(255,255,255,0.92) 180deg,
    #48c0bf              198deg,
    rgba(72,192,191,0.35) 260deg,
    transparent          310deg,
    transparent          360deg
  );
  animation: dpRingSpin 3.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

/* Hero product sits above the spinning gradient; its own bg covers the interior */
.dp-glow-ring .hero__product {
  position: relative;
  z-index: 2;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 12px 12px 0 0;
}

/* ─── Page Skeleton Loader ─── */
@keyframes pskShimmer {
  0%   { background-position: -1200px 0; }
  100% { background-position: 1200px 0; }
}

#page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #051a24;
  overflow: hidden;
  transition: opacity 0.5s ease;
}
#page-skeleton.psk-hide {
  opacity: 0;
  pointer-events: none;
}

.psk-shimmer {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(227,225,226,0.04) 0%,
    rgba(72,192,191,0.09) 40%,
    rgba(227,225,226,0.04) 80%
  );
  background-size: 1200px 100%;
  animation: pskShimmer 1.8s infinite linear;
}

/* Nav */
.psk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 68px;
  border-bottom: 1px solid rgba(72,192,191,0.08);
  background: rgba(6,38,52,0.95);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.psk-logo  { width: 140px; height: 32px; }
.psk-nav-links { display: flex; align-items: center; gap: 24px; }
.psk-link  { width: 60px; height: 14px; border-radius: 6px; }
.psk-btn   { width: 90px; height: 36px; border-radius: 8px; }

/* Hero */
.psk-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 40px;
  max-width: 900px;
  margin: 0 auto;
  gap: 14px;
}
.psk-eyebrow { width: 220px; height: 13px; border-radius: 6px; }
.psk-h1      { height: 40px; border-radius: 8px; }
.psk-h1--1   { width: 70%; }
.psk-h1--2   { width: 85%; }
.psk-h1--3   { width: 55%; }
.psk-sub     { width: 60%; height: 16px; border-radius: 6px; margin-top: 4px; }
.psk-cta     { width: 120px; height: 44px; border-radius: 10px; margin-top: 8px; }

/* Pipeline widget skeleton */
.psk-widget {
  width: 100%;
  margin-top: 16px;
  background: rgba(4,26,36,0.8);
  border-radius: 12px;
  border: 1px solid rgba(72,192,191,0.1);
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.psk-widget-title { width: 160px; height: 22px; margin: 0 auto; }
.psk-widget-sub   { width: 260px; height: 13px; margin: 0 auto; border-radius: 6px; }
.psk-filterbar    { width: 100%; height: 52px; border-radius: 10px; margin-top: 4px; }
.psk-table        { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(72,192,191,0.08); }
.psk-thead        { width: 100%; height: 42px; border-radius: 0; }
.psk-trow         { width: 100%; height: 52px; border-radius: 0; }
.psk-pagination   { width: 100%; height: 44px; border-radius: 8px; }

/* ─── Deal Pipeline Demo Widget ─── */

/* Widen the hero product container */
.hero__product {
  max-width: 100% !important;
}

/* Body / main container */
.dp-body {
  background: linear-gradient(160deg, rgba(72,192,191,0.05) 0%, #062634 35%, #041a24 100%);
  padding: 28px 28px 20px;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 14px;
  color: #e3e1e2;
}
.dp-head { margin-bottom: 20px; text-align: center; }
.dp-head h3 {
  font-size: 24px; font-weight: 700; color: #e3e1e2;
  margin: 0 0 6px;
  font-family: var(--font-heading, 'Bomstad Display', system-ui, sans-serif);
}
.dp-head p { font-size: 13px; color: rgba(227,225,226,0.5); margin: 0; }

/* Filter bar */
.dp-filterbar {
  background: linear-gradient(160deg, rgba(227,225,226,0.04) 0%, #062634 45%);
  border: 1px solid rgba(72,192,191,0.12);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dp-filterbar__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-filter-label {
  font-size: 13px; font-weight: 600; color: #e3e1e2;
  display: flex; align-items: center; gap: 6px;
}
.dp-select {
  background: #062634;
  border: 1px solid rgba(227,225,226,0.12);
  border-radius: 8px;
  color: #e3e1e2;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e3e1e2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}
.dp-select:focus { outline: none; border-color: rgba(72,192,191,0.4); }
.dp-count { font-size: 13px; font-weight: 600; color: rgba(227,225,226,0.6); white-space: nowrap; }

/* Table */
.dp-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(72,192,191,0.12);
  background: linear-gradient(160deg, rgba(72,192,191,0.05) 0%, #062634 35%, #041a24 100%);
}
.dp-table-wrap::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #48c0bf 0%, rgba(72,192,191,0.35) 55%, transparent 100%);
}
.dp-table { width: 100%; border-collapse: collapse; }
.dp-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px; font-weight: 600;
  color: rgba(227,225,226,0.55);
  border-bottom: 1px solid rgba(227,225,226,0.06);
  white-space: nowrap;
}
.dp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(227,225,226,0.04);
  font-size: 13px;
  color: rgba(227,225,226,0.85);
  vertical-align: middle;
}
@keyframes dpRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dp-row {
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  animation: dpRowIn 0.22s ease both;
}
.dp-row:hover { background: linear-gradient(90deg, rgba(72,192,191,0.04) 0%, transparent 70%) !important; }

.dp-expand-btn {
  background: none; border: none; color: #e3e1e2;
  cursor: pointer; padding: 4px; display: flex;
  align-items: center; opacity: 0.6; transition: opacity 0.2s;
}
.dp-expand-btn:hover { opacity: 1; }
.dp-company-cell { display: flex; align-items: center; gap: 8px; }
.dp-badge-new {
  background: #48c0bf; color: #062634;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.dp-company-name { font-weight: 600; font-size: 13px; color: #e3e1e2; }
.dp-score { font-weight: 700; color: #48c0bf; font-size: 14px; }
.dp-status-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.dp-status--pending  { background: rgba(72,192,191,0.1);  color: #48c0bf;  border: 1px solid rgba(72,192,191,0.35); }
.dp-status--review   { background: rgba(227,225,226,0.08); color: #e3e1e2;  border: 1px solid rgba(227,225,226,0.2); }
.dp-status--qualified{ background: rgba(94,212,165,0.1);   color: #5ED4A5;  border: 1px solid rgba(94,212,165,0.3); }
.dp-status--contacted{ background: rgba(122,175,196,0.1);  color: #7aafc4;  border: 1px solid rgba(122,175,196,0.3); }
.dp-action-btn {
  background: rgba(227,225,226,0.06);
  border: 1px solid rgba(227,225,226,0.12);
  border-radius: 6px; color: #e3e1e2;
  cursor: pointer; padding: 5px 8px;
  display: flex; align-items: center;
  transition: background 0.15s; font-family: inherit;
}
.dp-action-btn:hover { background: rgba(72,192,191,0.12); border-color: rgba(72,192,191,0.25); }

/* Skeleton loading */
@keyframes dpShimmer {
  0%   { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}
.dp-skeleton-row td { padding: 0 !important; border-bottom: 1px solid rgba(227,225,226,0.04); }
.dp-skeleton {
  border-radius: 0;
  background: linear-gradient(90deg, rgba(227,225,226,0.04) 25%, rgba(72,192,191,0.07) 50%, rgba(227,225,226,0.04) 75%);
  background-size: 800px 100%;
  animation: dpShimmer 1.6s infinite linear;
}
.dp-skeleton--row {
  height: 52px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}
.dp-skeleton--row::before,
.dp-skeleton--row::after {
  content: '';
  display: block;
  border-radius: 6px;
  background: inherit;
  height: 14px;
  flex-shrink: 0;
}
.dp-skeleton--row::before { width: 40px; }
.dp-skeleton--row::after  { flex: 1; max-width: 260px; }

/* Expanded row */
.dp-expanded td { background: #041a24; padding: 16px 24px 20px !important; }
.dp-expanded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.dp-tile {
  background: linear-gradient(135deg, rgba(72,192,191,0.1) 0%, rgba(72,192,191,0.04) 20%, rgba(6,38,52,0.95) 55%, #041a24 100%);
  border-radius: 10px; padding: 14px;
  border: 1px solid rgba(72,192,191,0.12);
  position: relative; overflow: hidden;
}
.dp-tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #48c0bf 0%, rgba(72,192,191,0.35) 55%, transparent 100%);
}
.dp-tile h4 { font-size: 12px; font-weight: 600; color: #e3e1e2; margin: 0 0 10px; display: flex; align-items: center; gap: 5px; }
.dp-tile-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(227,225,226,0.05); }
.dp-tile-row:last-child { border-bottom: none; }
.dp-tile-label { font-size: 11px; color: rgba(227,225,226,0.4); }
.dp-tile-val   { font-size: 12px; color: #e3e1e2; font-weight: 500; text-align: right; }
.dp-tile-val--teal { color: #48c0bf; font-weight: 700; }
.dp-tile--coral {
  background: linear-gradient(135deg, rgba(232,107,104,0.1) 0%, rgba(232,107,104,0.04) 20%, rgba(6,38,52,0.95) 55%, #041a24 100%);
  border-color: rgba(232,107,104,0.12);
}
.dp-tile--coral::before { background: linear-gradient(90deg, #e86b68 0%, rgba(232,107,104,0.35) 55%, transparent 100%); }
.dp-tile--neutral {
  background: linear-gradient(135deg, rgba(227,225,226,0.07) 0%, rgba(227,225,226,0.03) 20%, rgba(6,38,52,0.95) 55%, #041a24 100%);
  border-color: rgba(227,225,226,0.08);
}
.dp-tile--neutral::before { background: linear-gradient(90deg, rgba(227,225,226,0.5) 0%, rgba(227,225,226,0.15) 55%, transparent 100%); }

/* Pagination */
.dp-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px 4px; gap: 12px;
}
.dp-page-btn {
  background: rgba(227,225,226,0.06);
  border: 1px solid rgba(227,225,226,0.12);
  border-radius: 8px; color: #e3e1e2;
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.dp-page-btn:hover:not(:disabled) { background: rgba(72,192,191,0.1); border-color: rgba(72,192,191,0.3); }
.dp-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.dp-page-center { display: flex; align-items: center; gap: 10px; }
.dp-page-text { font-size: 13px; color: rgba(227,225,226,0.55); white-space: nowrap; }
.dp-page-dots { display: flex; gap: 5px; }
.dp-page-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(227,225,226,0.18); cursor: pointer;
  transition: background 0.2s; border: none; padding: 0;
}
.dp-page-dot.dp-dot-active { background: #48c0bf; }

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .dp-body {
    padding: 16px 12px 12px;
  }
  .dp-head h3 { font-size: 18px; }
  .dp-head p { font-size: 12px; }
  .dp-filterbar {
    padding: 10px 12px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .dp-filterbar__left { gap: 8px; }
  .dp-select { font-size: 12px; padding: 6px 28px 6px 10px; }
  .dp-count { font-size: 12px; text-align: center; }
  /* Hide Sector + Date Added columns */
  .dp-table th:nth-child(3),
  .dp-table td:nth-child(3),
  .dp-table th:nth-child(6),
  .dp-table td:nth-child(6) { display: none; }
  .dp-table th { font-size: 10px; padding: 8px; white-space: normal; }
  .dp-table td { font-size: 11px; padding: 8px; }
  .dp-company-name { font-size: 11px; }
  .dp-badge-new { font-size: 8px; padding: 1px 5px; }
  .dp-score { font-size: 12px; }
  .dp-status-badge { font-size: 10px; padding: 3px 8px; }
  .dp-action-btn { padding: 4px 6px; }
  .dp-action-btn svg { width: 12px; height: 12px; }
  .dp-expanded td { padding: 10px 12px 14px !important; }
  .dp-expanded-grid { grid-template-columns: 1fr; gap: 10px; }
  .dp-pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 4px;
  }
  .dp-page-btn { padding: 6px 12px; font-size: 11px; }
  .dp-page-text { font-size: 11px; }
  /* Glow ring */
  .dp-glow-ring { margin: 0 -8px; border-radius: 10px 10px 0 0; }
  .dp-glow-ring .hero__product { border-radius: 8px 8px 0 0; }
  /* Skeleton */
  .psk-nav-links { display: none; }
  .psk-hero { padding: 40px 16px 24px; }
  .psk-h1 { height: 28px; }
}

@media (max-width: 480px) {
  /* Hide expand button + actions columns */
  .dp-table th:nth-child(1),
  .dp-table td:nth-child(1),
  .dp-table th:nth-child(8),
  .dp-table td:nth-child(8) { display: none; }
  .dp-table th { font-size: 9px; padding: 6px; }
  .dp-table td { font-size: 10px; padding: 6px; }
  .dp-row { border-left-width: 2px; }
}
