body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #fff;
  color: #111;
  margin: 0;
  padding: 0;
}
.container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
h1, h2, h3, h4 { margin-top: 0; }
.form-row { display: flex; gap: 10px; margin: 10px 0; }
input[type=url], input[type=text], input[type=password] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
button {
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { background: #005fcc; }
a.chip {
  padding: 8px 12px;
  background: #eee;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.table-wrap {
  max-height: 500px;       /* fixed visible height */
  overflow-y: auto;         /* scroll inside only */
  border: 1px solid #eee;
  margin-top: 20px;
  border-radius: 8px;
  display: none;            /* hidden until crawl starts */
  transition: all 0.3s ease;
}

/* smoother scrollbar (optional) */
.table-wrap::-webkit-scrollbar { width: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #999; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td {
  border-bottom: 1px solid #eee;
  padding: 8px 10px;
  vertical-align: top;
}
th { background: #f9f9f9; text-align: left; }
tr:hover td { background: #f6faff; }
.status.ok { color: #16a34a; font-weight: 600; }
.status.redirect { color: #f59e0b; font-weight: 600; }
.status.bad { color: #dc2626; font-weight: 600; }
.status-description {
  font-size: 13px;
  color: #666;
  margin: 4px 0 8px 4px;
  line-height: 1.4;
}
.summary { 
  margin-top: 0; 
  padding-top: 0; 
}
.summary p:last-child {
  margin-bottom: 0;
}
.summary ul { list-style: disc; margin: 10px 0 0 20px; }
.login { max-width: 400px; margin: 80px auto; }
input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #0077ff;
  cursor: pointer;
}

/* Loader styles */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #444;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}
.loader p {
  margin-bottom: 0;
}
/* Loader fade-out once scan completes */
.loader.complete {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* optional – also collapse space after fade */
.loader.complete + .table-wrap {
  margin-top: 0;
}

#progress-count {
  font-weight: bold;
  color: #0077ff;
}
.spinner {
  border: 4px solid #eee;
  border-top: 4px solid #0077ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}
.spinner.done {
  border-color: #16a34a;
  border-top-color: #16a34a;
  animation: none;
}
.summary h5 {
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 15px;
  color: #b91c1c; /* dark red tone */
}
.summary ul {
  list-style: disc;
  margin: 0 0 10px 20px;
  padding: 0;
}
.summary ul li {
  margin: 4px 0;
}
.summary ul li small {
  font-size: 12px;
  color: #888;
  margin-left: 6px;
}
/* Collapsible broken link groups */
.broken-group {
  margin-bottom: 12px;
}

h5.collapsible {
  margin: 8px 0;
  font-size: 15px;
  color: #b91c1c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 6px;
  padding: 6px 10px;
  transition: background 0.2s ease;
}
h5.collapsible:hover {
  background: #fee2e2;
}
h5.collapsible .count {
  color: #444;
  font-weight: normal;
  font-size: 13px;
}
ul.collapsed {
  display: none;
  margin: 6px 0 0 20px;
  padding: 0;
}
ul.expanded {
  display: block;
  margin: 6px 0 0 20px;
  padding: 0;
}
ul.collapsed li,
ul.expanded li {
  list-style: disc;
  margin-left: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }
.hidden { display: none; }
