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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 28px;
  color: #f0f6fc;
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #161b22;
  padding: 30px 40px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.modal h2 {
  margin-top: 0;
  color: #f0f6fc;
}

.modal p {
  color: #8b949e;
  margin-bottom: 20px;
}

.modal input {
  width: 100%;
  padding: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 16px;
  margin-bottom: 15px;
}

.modal button {
  width: 100%;
  padding: 10px;
  background: #238636;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
}

.modal button:hover {
  background: #2ea043;
}

.error-message {
  color: #f85149;
  margin-top: 10px;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

/* Фильтры */
.filters {
  background: #161b22;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}
.filter-row:last-of-type {
  margin-bottom: 15px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  min-width: 140px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  padding: 6px 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 14px;
  width: 100%;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #1f6feb;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 5px;
}

.filter-actions button {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#applyFilters {
  background: #238636;
  color: white;
}
#applyFilters:hover {
  background: #2ea043;
}

.reset-btn {
  background: #30363d;
  color: #e6edf3;
}
.reset-btn:hover {
  background: #484f58;
}

.logout-btn {
  background: #da3633;
  color: white;
  margin-left: auto;
}
.logout-btn:hover {
  background: #f85149;
}

/* Вкладки */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.tab {
  padding: 8px 20px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: white;
}

.tab-content {
  background: #161b22;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

.tab-content.hidden {
  display: none;
}

/* Таблицы */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #30363d;
  color: #8b949e;
  font-weight: 600;
  white-space: nowrap;
}

td {
  padding: 8px 12px;
  border-bottom: 1px solid #21262d;
  vertical-align: top;
  word-break: break-word;
}

tr:hover td {
  background: #1c2128;
}

.user-agent-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagination {
  margin-top: 15px;
  display: flex;
  justify-content: center;
}

#loadMore {
  background: #1f6feb;
  color: white;
  padding: 8px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
#loadMore:hover {
  background: #388bfd;
}
#loadMore:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }
  .filter-group {
    min-width: 100%;
  }
  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .logout-btn {
    margin-left: 0;
  }
  table {
    font-size: 12px;
  }
  th, td {
    padding: 6px 8px;
  }
}

.load-more-btn {
  background: #1f6feb;
  color: white;
  padding: 8px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin: 10px 0;
}
.load-more-btn:hover {
  background: #388bfd;
}
.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}