*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
}

.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-back {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}
.portal-back:hover { color: #2563eb; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon { font-size: 2rem; }

.brand-logo h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.tagline {
  font-size: 0.75rem;
  color: #64748b;
}

.main-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

.input-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.mode-tab {
  background: #f1f5f9;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
}

.mode-tab.active {
  background: #0f172a;
  color: #ffffff;
}

.input-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 640px) {
  .input-row { flex-direction: column; }
}

.input-row input, textarea {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
}

textarea {
  width: 100%;
  font-family: monospace;
  font-size: 0.85rem;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #1d4ed8;
}

.quick-examples {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: #64748b;
  flex-wrap: wrap;
}

.pill-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: #0f172a;
  margin: 4px 0;
}

.stat-desc {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Toolbar & Table */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.search-filter-box input {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 260px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-tool {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-pro-action {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #b45309;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.table-responsive {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow-x: auto;
}

.sitemap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sitemap-table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}

.sitemap-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.url-link {
  color: #2563eb;
  text-decoration: none;
  word-break: break-all;
}
.url-link:hover { text-decoration: underline; }

.app-footer {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 48px;
  border-top: 1px solid #e2e8f0;
}
