/* === CSS-переменные === */
:root {
  --primary-color: #c4ff00;
  --primary-dark: #9cc400;
  --primary-light: #d8ff40;
  --dark-bg: #1b1b1d;
  --light-bg: #242529;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(196, 255, 0, 0.2);
  --text-light: #ffffff;
  --text-gray: #a0a0a0;
  --status-complete: #4caf50;
  --status-failed: #f44336;
  --status-in-progress: #2196f3;
  --status-waiting: #ff9800;
  --main-font: 'Montserrat', sans-serif;
}

/* === Сброс стилей === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--main-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-light);
  background-color: var(--dark-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* === Контейнер с ограничением ширины === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Кнопки === */
.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 14px;
}

.primary-button {
  background-color: var(--primary-color);
  color: var(--dark-bg);
  font-weight: 600;
}

.primary-button:hover {
  background-color: var(--primary-dark);
}

.secondary-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.secondary-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.danger-button {
  background-color: var(--status-failed);
  color: white;
}

.danger-button:hover {
  background-color: #d32f2f;
}

/* === Формы === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-light);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(196, 255, 0, 0.2);
}

.input-group {
  position: relative;
}

.input-suffix {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-gray);
}

/* === Карточки === */
.outlined-card {
  background-color: var(--light-bg);
  border-radius: 10px;
  border: 1px solid var(--border-highlight);
  overflow: hidden;
}

/* === Заголовок страницы === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-icon {
  color: var(--primary-color);
  font-size: 24px;
}

.page-description {
  color: var(--text-gray);
  margin-top: 5px;
}

.page-actions {
  display: flex;
  gap: 10px;
}

/* === Статусы === */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-waiting {
  background-color: rgba(255, 152, 0, 0.15);
  color: var(--status-waiting);
}

.status-in-progress {
  background-color: rgba(33, 150, 243, 0.15);
  color: var(--status-in-progress);
}

.status-complete {
  background-color: rgba(76, 175, 80, 0.15);
  color: var(--status-complete);
}

.status-failed {
  background-color: rgba(244, 67, 54, 0.15);
  color: var(--status-failed);
}

/* === Таблицы === */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 15px;
  text-align: left;
  color: var(--text-gray);
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:hover td {
  background-color: rgba(196, 255, 0, 0.05);
}

/* === Загрузчик === */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  gap: 15px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(196, 255, 0, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Модальные окна === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--light-bg);
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.2);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-light);
}

.modal-body {
  padding: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}

/* === Оповещения === */
.alert {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid var(--status-complete);
  color: var(--status-complete);
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  border-left: 4px solid var(--status-failed);
  color: var(--status-failed);
}

.alert-warning {
  background-color: rgba(255, 152, 0, 0.1);
  border-left: 4px solid var(--status-waiting);
  color: var(--status-waiting);
}

.alert-info {
  background-color: rgba(33, 150, 243, 0.1);
  border-left: 4px solid var(--status-in-progress);
  color: var(--status-in-progress);
}

/* === Адаптивность === */
@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .page-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .page-actions button {
    flex: 1;
  }
  
  .modal-content {
    width: 90%;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 20px;
  }
  
  .page-actions {
    flex-direction: column;
  }
  
  .modal-actions {
    flex-direction: column;
  }
}

.inactive-badge {
  background-color: #e74c3c;
  color: white;
}

.inactive-dev {
  opacity: 0.75;
  border-left: 3px solid #e74c3c;
}