* {
  box-sizing: border-box;
}

body {
  background: #f0f4f8;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  margin: 0;
  padding: 2rem 1rem;
  color: #1e2f3e;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 1rem 2rem;
}

h1 {
  font-size: 1.7rem;
  margin: 0 0 0.2rem;
}

.sub {
  border-left: 3px solid #2c6e9e;
  padding-left: 1rem;
  margin: 0.5rem 0 1rem;
  color: #2c6e9e;
  font-size: 0.9rem;
}

.control-panel {
  background: #f8fafc;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.control-panel label {
  font-weight: 600;
  white-space: nowrap;
}

select, input {
  padding: 6px 12px;
  border: 1px solid #cbdde6;
  background: white;
  font-size: 0.9rem;
}

select {
  min-width: 180px;
}

input {
  min-width: 200px;
}

.prod-test-urls {
  font-family: monospace;
  font-size: 0.8rem;
  background: #eef2f7;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  gap: 1rem;
}
.prod-test-urls a {
  color: #1e2f3e;
  text-decoration: none;
  border-bottom: 1px dotted #cbdde6;
}
.prod-test-urls a:hover {
  border-bottom: 1px solid #1e2f3e;
}

.reset-icon {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 30px;
  color: #2c6e9e;
}

.reset-icon:hover {
  background: #e9f0f5;
}

.base-info {
  font-family: monospace;
  font-size: 0.75rem;
  background: #eef2f7;
  padding: 4px 12px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.base-info a {
  color: #1e2f3e;
  text-decoration: none;
  border-bottom: 1px dotted #cbdde6;
}

.base-info a:hover {
  border-bottom: 1px solid #1e2f3e;
}

.error-msg {
  color: #b33;
  font-size: 0.8rem;
  padding: 4px 12px;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2edf5;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: auto;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2edf5;
  vertical-align: middle;
}

th {
  background: #e9f0f5;
  text-align: left;
  border-bottom: 1px solid #cbdde6;
  position: sticky;
  top: 0;
  z-index: 10;
  cursor: pointer;
  transition: background 0.1s;
  width: auto;
}

td {
  word-break: break-word;
}

.category {
  background: #f8fafc;
  font-weight: 700;
  border-top: 2px solid #cbdde6;
  cursor: pointer;
}

.category td {
  background-color: #f8fafc;
  font-size: 0.85rem;
}

.category-summary {
  font-weight: normal;
  font-size: 0.75rem;
}

.collapse-indicator {
  display: inline-block;
  margin-right: 6px;
  font-family: monospace;
  font-weight: bold;
  transition: transform 0.1s;
}

.category.collapsed .collapse-indicator {
  transform: rotate(90deg);
}

.url-cell a {
  color: #2c3e50;
  text-decoration: none;
}

.url-cell a:hover {
  text-decoration: underline;
}

.status-bg {
  display: inline-block;
  width: 100%;
  padding: 2px 4px;
  border-radius: 4px;
}

.bg-success {
  background-color: #d4edda;
}

.bg-error {
  background-color: #f8d7da;
}

.bg-redirect {
  background-color: #fff3cd;
}

.bg-unauthorized {
  background-color: #ffe5b4;
}

.badge {
  background: #d4e3ed;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge.yes {
  background: #c0e0d0;
  color: #135b3a;
}

.badge.no {
  background: #f0e0e0;
  color: #a03d3d;
}

.mode-check {
  text-align: center;
  font-size: 1rem;
  font-weight: normal;
  color: #6c8ba0;
}

.summary {
  margin: 2rem 0 1rem;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.summary-block {
  flex: 1;
  min-width: 200px;
}

.summary-block h4 {
  margin: 0 0 0.5rem;
  border-bottom: 1px solid #cbdde6;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0.2rem 0;
}

.stat-detail {
  font-size: 0.75rem;
  color: #2c6e9e;
}

.comparison {
  margin-top: 8px;
  font-weight: 600;
  display: inline-block;
}

.comparison .main-line {
  color: #2b6e3c;
  display: block;
}

.comparison .sub-line {
  color: #6c7a89;
  font-weight: normal;
  font-size: 0.75rem;
  margin-top: 2px;
  display: block;
}

.comparison.green .main-line {
  color: #2b6e3c;
}

.comparison.red .main-line {
  color: #b33;
}

.comparison.orange .main-line {
  color: #e67e22;
}

button {
  background: #2c6e9e;
  border: none;
  color: white;
  padding: 6px 18px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 30px;
}

button:hover {
  background: #1f4f73;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.progress {
  font-size: 0.8rem;
  background: #eef2f7;
  padding: 4px 12px;
  margin-right: auto;
}

.error-toggle {
  background: #eef2f7;
  color: #1e2f3e;
  padding: 4px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
}

.error-toggle.active {
  background: #d4edda;
  color: #155724;
}

.col-compact {
  width: 45px !important;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

th.col-compact {
  text-align: center;
}

td.col-compact .status-bg a {
  display: none;
}

td.col-compact .status-bg {
  display: inline-block;
  width: auto;
  padding: 2px;
  text-align: center;
}

.copy-btn {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  background: #e9f0f5;
  padding: 6px 12px;
  border-radius: 30px;
  text-decoration: none;
  color: #2c6e9e;
  cursor: pointer;
}

.copy-btn:hover {
  background: #d4e3ed;
}

footer {
  font-size: 0.8rem;
  text-align: left;
  margin-top: 2rem;
  color: #5b7f95;
  border-top: 1px solid #e2edf5;
  padding-top: 1.5rem;
}

.status-loading {
  animation: pulse 1s infinite;
  opacity: 0.6;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}
