/* ========================================
   ОБЩИЕ КОМПОНЕНТЫ
   ======================================== */

/* Современные стили для страниц */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 60px 0;
  background: linear-gradient(135deg, #2c2c2c, #444);
  color: white;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-header h1 {
  font-size: 3em;
  margin: 0;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.page-header .subtitle {
  font-size: 1.2em;
  margin-top: 15px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Секции контента */
.content-section {
  margin: 60px 0;
  padding: 40px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Узкая секция (CTA) */
.content-section.narrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.content-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b0ff00, #9ee600);
}

.content-section h2 {
  color: #2c2c2c;
  font-size: 2.2em;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.content-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #b0ff00;
  border-radius: 2px;
}

.content-section h3 {
  color: #2c2c2c;
  font-size: 1.5em;
  margin: 30px 0 15px;
  padding-left: 20px;
  border-left: 4px solid #b0ff00;
}

.content-section p {
  font-size: 1.1em;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

/* Красивые карточки */
.modern-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b0ff00, #9ee600);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.modern-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Улучшенные изображения */
.modern-image {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.modern-image:hover {
  transform: scale(1.02);
}

.modern-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Красивые кнопки */
.modern-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(135deg, #b0ff00, #9ee600);
  color: #2c2c2c;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(176, 255, 0, 0.3);
  border: none;
  cursor: pointer;
}

.modern-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(176, 255, 0, 0.4);
  color: #2c2c2c;
}

.modern-button.secondary {
  background: linear-gradient(135deg, #2c2c2c, #444);
  color: white;
  box-shadow: 0 5px 15px rgba(44, 44, 44, 0.3);
}

.modern-button.secondary:hover {
  box-shadow: 0 8px 20px rgba(44, 44, 44, 0.4);
  color: white;
}

/* Сетки */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.modern-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin: 40px 0;
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Улучшенные списки */
.modern-list {
  list-style: none;
  padding: 0;
}

.modern-list li {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 30px;
}

.modern-list li:last-child {
  border-bottom: none;
}

.modern-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 15px;
  color: #b0ff00;
  font-weight: bold;
  font-size: 1.2em;
}

/* Цитаты */
.modern-quote {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid #b0ff00;
  padding: 30px;
  margin: 30px 0;
  border-radius: 10px;
  font-style: italic;
  font-size: 1.1em;
  color: #555;
}

/* Статистика */
.stats-section {
  background: linear-gradient(135deg, #2c2c2c, #444);
  color: white;
  padding: 60px 40px;
  border-radius: 15px;
  text-align: center;
  margin: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 3em;
  font-weight: bold;
  color: #b0ff00;
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.1em;
  opacity: 0.9;
}

/* Пагинация */
.pagination {
  text-align: center;
  margin: 30px 0;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 10px 15px;
  margin: 0 5px;
  background: white;
  color: #2c2c2c;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: #b0ff00;
  color: #2c2c2c;
  transform: translateY(-2px);
}

/* Сообщения */
.message {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: bold;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Загрузка */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #b0ff00;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Карточки */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
  padding: 20px;
  background: linear-gradient(135deg, #2c2c2c, #444);
  color: white;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: #b0ff00;
  color: #2c2c2c;
}

.btn-primary:hover {
  background: #9ee600;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #2c2c2c;
  color: white;
}

.btn-secondary:hover {
  background: #444;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #2c2c2c;
  border: 2px solid #2c2c2c;
}

.btn-outline:hover {
  background: #2c2c2c;
  color: white;
}

.btn-small {
  padding: 8px 15px;
  font-size: 12px;
}

.btn-large {
  padding: 15px 30px;
  font-size: 16px;
}

/* Формы */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #2c2c2c;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #b0ff00;
  box-shadow: 0 0 0 3px rgba(176, 255, 0, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group .required {
  color: #ff4444;
}

/* Алерты */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-left-color: #dc3545;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border-left-color: #ffc107;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-left-color: #17a2b8;
}

/* Бейджи */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-primary {
  background: #b0ff00;
  color: #2c2c2c;
}

.badge-secondary {
  background: #2c2c2c;
  color: white;
}

.badge-success {
  background: #28a745;
  color: white;
}

.badge-warning {
  background: #ffc107;
  color: #2c2c2c;
}

.badge-error {
  background: #dc3545;
  color: white;
}

/* Спиннеры */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #b0ff00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-large {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  color: #2c2c2c;
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
  font-weight: bold;
}

.modal-close:hover {
  color: #2c2c2c;
}

#modalClientContent {
  line-height: 1.6;
  color: #666;
}

#modalClientContent p {
  margin-bottom: 15px;
}

#modalClientInfo {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

#modalClientInfo p {
  margin-bottom: 10px;
}

#modalClientInfo a {
  color: #0073aa;
  text-decoration: none;
  transition: color 0.3s ease;
}

#modalClientInfo a:hover {
  color: #005a87;
  text-decoration: underline;
}

/* Таблицы */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.table th {
  background: #2c2c2c;
  color: white;
  font-weight: bold;
}

.table tr:hover {
  background: #f9f9f9;
}

.table-responsive {
  overflow-x: auto;
}

/* Списки */
.list {
  list-style: none;
  padding: 0;
}

.list-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item a {
  color: #2c2c2c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.list-item a:hover {
  color: #b0ff00;
}

/* Разделители */
.divider {
  height: 1px;
  background: #eee;
  margin: 30px 0;
}

.divider-dashed {
  border-top: 2px dashed #eee;
  height: 0;
}

/* Утилиты */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: #b0ff00;
}

.text-secondary {
  color: #2c2c2c;
}

.text-muted {
  color: #666;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 10px;
}
.mb-2 {
  margin-bottom: 20px;
}
.mb-3 {
  margin-bottom: 30px;
}

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 10px;
}
.mt-2 {
  margin-top: 20px;
}
.mt-3 {
  margin-top: 30px;
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: 10px;
}
.p-2 {
  padding: 20px;
}
.p-3 {
  padding: 30px;
}

/* Адаптивность компонентов */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2em;
  }

  .content-section {
    padding: 20px;
    margin: 30px 0;
  }

  .modern-grid,
  .modern-grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }

  .table-responsive {
    font-size: 14px;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Предотвращает зум на iOS */
  }
}

/* Карточки клиентов */
.client-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  padding: 20px;
  text-align: center;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.client-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: #0073aa;
}

.client-card:active {
  transform: translateY(-2px);
}

.client-card img {
  transition: transform 0.3s ease;
}

.client-card:hover img {
  transform: scale(1.05);
}

.client-card h3 {
  transition: color 0.3s ease;
}

.client-card:hover h3 {
  color: #0073aa !important;
}
