body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: 
      /* Main center-top glow */
      radial-gradient(
        circle at 50% 0%,
        rgba(140, 82, 255, 0.20) 0%,
        rgba(140, 82, 255, 0.10) 25%,
        transparent 60%
      ),
      /* Left-side subtle glow */
      radial-gradient(
        600px 800px at 0% 30%,
        rgba(140, 82, 255, 0.15) 0%,
        transparent 30%
      ),
      radial-gradient(
        600px 800px at 100% 20%,
        rgba(140, 82, 255, 0.12) 0%,
        transparent 40%
      ),
      #ffffff;
    color: #111;
    overflow-x: hidden;
    justify-content: center;
    min-height: 100vh;

  }
  
  .container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1100;
    width: 100%;
    justify-content: center;

  }
  
  /* sidebar */
  .sidebar {
    width: 350px;
    height: 100vh;
    padding: 2rem 1.5rem;
    background-color: #f7f8fa;
    border-right: 1px solid #eee;
    font-family: 'Inter', sans-serif;
  }
  
  .logo {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
  }
  
  .highlight {
    color: #0066ff;
  }
  
  .nav-section .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .nav-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    margin-bottom: 1px;
  }

  .nav-list li a {
    text-decoration: none;
    color: black !important
  }
  
  .nav-list li span {
    margin-left: 0.75rem;
    flex: 1;
  }
  
  .nav-list li i {
    width: 20px;
    color: #888;
  }
  
  .count {
    font-size: 0.85rem;
    color: #999;
  }
  
  .divider {
    height: 1px;
    background-color: #eee;
    margin: 1.5rem 0;
  }
  
  .category-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
  }
  
  .active {
    background-color: #e9e9e9;
    border-radius: 6px;
  }
  
  .see-all {
    font-weight: 500;
  }
  
  
  
  /* Main */
  .main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
  }
  
  /* Header box */
  .header-box {
    background: #f7f8fa;
    border: none;
    border-radius: 0;
    padding: 48px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
    width: 100%;
    max-width: none;
    margin-top: 100px !important;
  }
  
  .header-text h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
  }
  
  .header-text p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
    max-width: 350px;
  }
  
  .hero-img {
    width: 340px;
    height: auto;
    display: block;
  }
  
  /* connections */
  .connections-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    justify-content: center;
    margin-left: 120px !important;
  }
  
  .connections-heading {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
  }
  
  .connections-subheading {
    color: #555;
    margin-bottom: 20px;
  }
  
  .collections-hr {
    border: none;
    border-top: 1px solid #ddd;
    margin-bottom: 30px;
  }
  
  .connections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces 3 per row */
    gap: 24px;
    justify-content: center;
    padding-top: 20px;
  }
  
  .connection-card {
    flex: 1 1 calc(33.333% - 24px);
    background: white;
    border: 1px solid #e5e7eb;
    /* border-radius: 12px; */
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-width: 280px;
    max-width: 320px;
    text-align: left;
  }
  
  .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .connection-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: -13px !important;
  }
  
  .connection-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .card-header h3 {
    margin: 0;
    line-height: 1.2;
  }
  
  .connection-card img {
    width: 32px;
    height: auto;
    margin-bottom: 16px;
  }
  
  .connection-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
  }
  
  .connection-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
  }
  
  .connection-card button {
    padding: 10px 20px;
    border: 1px solid black;
    background: white;
    cursor: pointer;
    /* border-radius: 6px; */
    font-weight: 500;
  }

  /* topnav */
  .top-navbar {
    height: 60px;
    width: 100vw;
    background-color: #f8f8f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Inter', sans-serif;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .top-navbar .left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .logo-icon {
    height: 24px;
  }
  
  .brand {
    font-size: 1.25rem;
    font-weight: 600;
  }
  
  .brand-accent {
    color: #0066ff;
  }
  
  .top-navbar .right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    color: #333;
  }
  
  .profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }
  


  /* modal */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  
    /* FIX vertical alignment on tall content */
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
  }
  
  
  .modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    text-align: center;
  }
  
  
  .close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
  }
  
  .api-input {
    width: 100%;
    padding: 12px 16px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
  }
  
  .drop-zone {
    border: 2px dashed #ccc;
    padding: 40px;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #444;
  }
  
  .drop-zone .icon {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .connect-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background-color: transparent;
    color: black;
    font-weight: 600;
    border: 1px solid lightgray !important;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
  }

  /* Dropdown label */
.dropdown-label {
  font-weight: 600;
  font-size: 14px;
  margin: 12px 0 6px;
  color: #333;
  display: block;
}

/* Styled select dropdown */
.styled-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20,50 70,100 120,50' stroke='%23666' stroke-width='15' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  transition: border 0.2s ease-in-out;
  cursor: pointer;
}

.styled-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
  outline: none;
}

/* Optional: spacing below select */
.styled-select + .connect-btn {
  margin-top: 16px;
}



/* status.html */

.status-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 2rem;
  position: relative;
}

.status-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.status-header .subtext {
  color: #666;
  margin-bottom: 1rem;
}

.status-header .status-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  padding: 0.5rem 1rem;
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.back-link {
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.table-container {
  padding: 2rem;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
}

.status-table th, .status-table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.status-table th {
  background-color: #f4f4f4;
  font-weight: bold;
}

.status-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.status-table tr:hover {
  background-color: #f1f1f1;
}



/* chat playground */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1100px;
  /* margin: 0 auto; */
  margin-left: 200px;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* INITIAL CENTER STATE */
.chat-wrapper.initial {
  justify-content: center;
  padding-bottom: 300px;
}

.chat-wrapper.initial .chat-box {
  display: none;
}

.chat-wrapper.initial .sticky-input {
  position: relative;
  margin-top: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* CHAT MODE (after message) */
.chat-wrapper:not(.initial) {
  justify-content: flex-start;
}

.chat-wrapper:not(.initial) .chat-box {
  display: flex;
  flex: 1;
  overflow-y: auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 10px 0 20px;
}

.chat-wrapper:not(.initial) .sticky-input {
  position: sticky;
  bottom: 0;
  background: white;
  border-radius: 28px;
  z-index: 10;
  margin-top: 0;
  margin-bottom: 200px;
}

/* agent select dropdown for chat playground */
.agent-select-wrapper {
  max-width: 260px;             
}

.agent-select {
  width: 100%;
  font-size: 15px;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20,50 70,100 120,50' stroke='%23666' stroke-width='15' fill='none'/%3E%3C/svg%3E") no-repeat right
    14px center/12px;
  cursor: pointer;
}

.agent-select:focus {
  outline: none;
  border-color: #0000ff;
  box-shadow: 0 0 0 2px rgba(0, 0, 255, 0.15);
}



/* LOGO */
.contentiq-logo {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  font-family: 'Inter', sans-serif;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.brand-black { color: #1a1a1a; }
.brand-blue { color: #0000ff; }

/* MESSAGE BUBBLES */
.chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
  word-break: break-word;
}

.chat-message.user {
  align-self: flex-end;
  background: #0000ff;
  color: white;
}

.chat-message.agent {
  align-self: flex-start;
  background: #f3f4f6;
  color: #111827;
}

/* INPUT */
.input-row {
  display: flex;
  align-items: center;
  border: 1px solid #eee;
  background: white;
  padding: 14px 20px;
  border-radius: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin: 0 auto;
  max-width: 800px;
  min-width: 800px;
}

.search-input {
  flex-grow: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  font-family: 'Inter', sans-serif;
}

.voice-btn {
  background: black;
  color: white;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  font-weight: 500;
}



/* go button for status page */
.go-chat-btn {
  display: inline-block;
  padding: 12px 24px;
  background: black;
  color: white;
  font-size: 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.go-chat-btn:hover {
  background: #333;
}


/* chat bubble typing */

.chat-message.typing {
  font-style: italic;
  color: #9ca3af;
  position: relative;
}

.chat-message.typing::after {
  content: '';
  display: inline-block;
  width: 1em;
  text-align: left;
  animation: dots 1s steps(3, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  33%  { content: '.'; }
  66%  { content: '..'; }
  100% { content: '...'; }
}


/* file tree */

.file-tree {
  list-style-type: none;
  padding-left: 0;
  font-family: 'Inter', sans-serif;
}

.file-tree li {
  margin: 4px 0;
}

.folder-toggle {
  cursor: pointer;
  font-weight: 500;
}

.nested {
  padding-left: 20px;
}

.hidden {
  display: none;
}



/* web wizard */

/* Centered wizard card */
.modern-step {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 300px;
}

.modern-card {
  background-color: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* Progress bar */
.progress-bar {
  height: 6px;
  background-color: #e4e4e7;
  border-radius: 3px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background-color: rgb(0, 0, 239); /* Indigo */
  transition: width 0.3s ease;
}

/* Buttons */
.button-group {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.modern-btn {
  padding: 12px 24px;
  font-size: 14px;
  background-color: rgb(0, 0, 239);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modern-btn:hover {
  background-color: #4f46e5;
}

/* Rounded input */
.modern-input {
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 12px 16px;
  width: 100%;
  font-size: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Shared Modern Layout */
.modern-radio-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0;
}

/* Radio Style */
.modern-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.modern-radio input[type="radio"] {
  accent-color: rgb(0, 0, 239);
  width: 18px;
  height: 18px;
}

/* Button variations */
.modern-btn.outlined {
  background-color: white;
  border: 1px solid #6366f1;
  color: #6366f1;
}

.modern-btn.outlined:hover {
  background-color: #f4f4ff;
}



/* document uploader ui */
.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 700px;
  margin: 2rem auto;
}

.title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 1.5rem;
}


.file-input {
  display: block;
  margin: 1rem auto;
}


/* onedrive connector */
.clean-file-tree {
  list-style: none;
  margin: 0;
  padding-left: 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.clean-file-tree .tree-node {
  position: relative;
  padding-left: calc(var(--depth, 0) * 16px + 20px);
  margin: 4px 0;
}

.clean-file-tree .tree-node::before {
  content: '';
  position: absolute;
  left: calc(var(--depth, 0) * 16px + 9px);
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #eee;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  padding: 4px 0;
}

.tree-row:hover {
  background-color: #f9f9f9;
}

.chevron {
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 1.5px solid #555;
  border-bottom: 1.5px solid #555;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-top: 2px;
}

.tree-row.open .chevron {
  transform: rotate(45deg);
}

.nested {
  margin-left: 16px;
}

.hidden {
  display: none;
}

.file-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.file-label input[type='checkbox'] {
  transform: scale(1.1);
}




/* for boxes for connectors */
/* Step heading layout */
.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  text-align: left;
}

.step-left h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.step-left p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.step-right .step-counter {
  font-size: 14px;
  font-weight: 500;
  color: rgb(0, 0, 239);;
}

.step-right .step-total {
  color: #aaa;
}

/* Clean progress bar */
.step-progress-bar {
  height: 6px;
  background-color: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0 24px;
}

.step-progress-fill {
  height: 100%;
  background-color: rgb(0, 0, 239);;
  transition: width 0.3s ease;
}


/* ─────────────────────────────────────────────
 *  Status page – title + inline stat tiles
 * ──────────────────────────────────────────── */
 .status-header {
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
}

/* back link */
.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: #6c7b8a;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* title + tiles row */
.status-top {
  display: flex;
  align-items: flex-end;              /* baseline‑ish */
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.25rem;
}

.status-title {
  flex-shrink: 0;                     /* never squeeze title */
  font-size: 2rem;
  margin: 0;
}

/* stat‑bar now expands to fill remaining space */
.stats-bar {
  flex: 1;                            /* take the rest of the row */
  display: flex;
  justify-content: space-between;     /* even spacing */
  margin-left: 2rem;                  /* gap after title */
  position: relative;
  z-index: 10;
}

.stat-item {
  flex: 1;                            /* equal widths */
  text-align: center;
  position: relative;
  padding: 0 1rem;                    /* breathing room */
}

/* vertical divider */
.stat-item:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;                           /* a bit inset from very top */
  width: 1px;
  height: 80%;                        /* spans nearly full height */
  background: #e5e7eb;
}

/* icon */
.stat-item i {
  font-size: 26px;
  color: #0066ff;                     /* same blue as screenshot */
  margin-bottom: 4px;
}

/* big number */
.stat-number {
  font-size: 1.875rem;                /* same weight as reference */
  font-weight: 600;
  line-height: 1.1;
}

/* small label */
.stat-label {
  font-size: 0.85rem;
  color: #6c7b8a;
  margin-top: 2px;
}

/* ───────────── responsive: stack on narrow screens ───────────── */
@media (max-width: 900px) {
  .status-top      { flex-direction: column; align-items: flex-start; }
  .stats-bar       { width: 100%; margin: 1.25rem 0 0; }
  .stat-item       { flex: 1 1 50%; padding: 1rem 0; }
  .stat-item::before { display: none; }           /* hide dividers */
}

/* ─────────────────────────────────────────────
 *  Scrape-progress section
 * ──────────────────────────────────────────── */
 .scrape-progress {
  padding: 0 2rem;        /* ← same 2 rem side-padding as .status-header */
  box-sizing: border-box; /* keep progress bar full-width inside padding */
}


/* progress bar */
.progress-wrapper {
  background: #f6f6f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 2.5rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #22c55e;            /* green */
  transition: width 0.3s ease;
}

.progress-label {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* timeline spine */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;                    /* aligns under markers */
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

/* timeline item */
.timeline-item {
  position: relative;
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-left: 40px;            /* keeps text aligned */
}

/* remove spine piece after last item */
.timeline-item:last-child::after {
  content: none;
}

/* marker (number or icon) */
.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
}

/* completed state */
.timeline-item.completed .timeline-marker {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

/* in-progress state */
.timeline-item.inprogress .timeline-marker {
  border-color: #22c55e;
  color: #22c55e;
}

/* content */
.timeline-content h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 500;
}

.timeline-content small {
  color: #6c7b8a;
  font-size: 0.8rem;
}


.done-button-wrapper {
  display: none;          /* invisible to start */
  text-align: center;
  margin-top: 2rem;
  opacity: 0;
  transition: opacity .4s ease;
}

/* JS adds .show when pipeline completes */
.done-button-wrapper.show {
  display: block;         /* becomes visible */
  opacity: 1;             /* fade-in */
}

/* playground sources */
details.sources {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

details.sources summary {
  cursor: pointer;
  font-weight: 600;         /* bold “Sources” title */
  list-style: none;         /* hide default caret */
  position: relative;
  padding-right: 1.2em;     /* space for our custom arrow */
  gap: 0.4rem;
  align-items: center;
  display: inline-flex;
  margin-bottom: 0 !important;
}

details.sources summary::after {
  content: "▾";             /* little down arrow */
  position: absolute;
  right: 0;
  transition: transform 0.2s ease;
}

details.sources[open] summary::after {
  transform: rotate(-180deg); /* arrow flips up when open */
}

details.sources ul {
  margin: 0.1rem 0 0 0.75rem;
  padding: 0;
  margin-top: 0 !important;
}

details.sources[open] > summary {   /* summary line */
  margin-bottom: 0 !important;                 /* kill bottom-margin */
}

details.sources[open] > ul {               /* the list wrapper  */
  margin-top: -40px !important;                /* kill top-margin   */
  padding-top: 0 !important;               /* kill top-padding  */
}

/* Pipeline Tiles Styles */
.pipeline-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.pipeline-tile {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.pipeline-tile:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.pipeline-tile.completed {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.pipeline-tile.inprogress {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: #6b7280;
  transition: all 0.3s ease;
}

.pipeline-tile.completed .tile-icon {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.pipeline-tile.inprogress .tile-icon {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
}

.tile-title {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  margin: 0;
}

.tile-status {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.pipeline-tile.completed .tile-status {
  color: #22c55e;
  font-weight: 600;
}

.pipeline-tile.inprogress .tile-status {
  color: #3b82f6;
  font-weight: 600;
}

.tile-progress {
  width: 100%;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}

.tile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
  min-width: 0%;
  display: none;
  visibility: hidden;
}

.pipeline-tile.completed .tile-progress-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  width: 100% !important;
  display: block !important;
  visibility: visible !important;
}

.pipeline-tile.inprogress .tile-progress-fill {
  width: 50% !important;
  display: block !important;
  visibility: visible !important;
}

/* Tile Dropdown Styles */
.tile-dropdown {
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
}

.dropdown-header:hover {
  background: #f9fafb;
  border-radius: 6px;
  padding: 0.5rem;
  margin: -0.5rem;
}

.dropdown-title {
  font-weight: 500;
  font-size: 0.875rem;
  color: #374151;
}

.link-count {
  background: #e5e7eb;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  background: #f3f4f6;
  color: #374151;
}

.dropdown-toggle i {
  transition: transform 0.2s ease;
}

.dropdown-toggle .fallback-arrow {
  display: none;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Show fallback arrow only if Font Awesome is not loaded */
.dropdown-toggle:not(:has(i)) .fallback-arrow {
  display: inline;
}

.dropdown-toggle.expanded i {
  transform: rotate(180deg);
}

.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0.5rem;
}

.dropdown-content.expanded {
  max-height: 200px;
  overflow-y: auto;
}

.no-links {
  color: #9ca3af;
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  background: #f9fafb;
  border-left: 3px solid #3b82f6;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.2s ease;
}

.link-item:hover {
  background: #f3f4f6;
  transform: translateX(2px);
}

.link-item .link-icon {
  color: #3b82f6;
  font-size: 0.75rem;
}

.link-item .link-text {
  flex: 1;
  word-break: break-all;
  line-height: 1.4;
}

.link-item .link-time {
  color: #9ca3af;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Scrollbar styling for dropdown content */
.dropdown-content::-webkit-scrollbar {
  width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Full-width Scraped Links Table Styles */
.scraped-links-table-container {
  margin-top: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
  position: relative;
  z-index: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #0066ff;
  color: white;
  border-bottom: 1px solid #e5e7eb;
}

.table-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.close-table-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.close-table-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.table-content {
  max-height: 400px;
  overflow-y: auto;
}

.scraped-links-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.scraped-links-table thead {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.scraped-links-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scraped-links-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.scraped-links-table tbody tr {
  transition: all 0.2s ease;
}

.scraped-links-table tbody tr:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

.scraped-links-table tbody tr.no-data {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

.scraped-links-table tbody tr.no-data:hover {
  background: transparent;
  transform: none;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.scraped {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.discovered {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-badge.visiting {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.broken {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-badge.unreachable {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.status-badge.rate-limited {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.status-badge.ssl-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* URL styling */
.url-cell {
  max-width: 400px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.8rem;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action buttons */
.action-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f3f4f6;
  color: #374151;
  border-color: #9ca3af;
}

.action-btn.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.action-btn.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

/* Time styling */
.time-cell {
  color: #6b7280;
  font-size: 0.8rem;
  white-space: nowrap;
}
