/* 96    . */

/* ===   === */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f5f7fa;
}

/* ===  === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===  === */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
  border: none;
  padding: 0.5rem 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.btn-success:hover {
  background: linear-gradient(135deg, #218838, #1ea085);
  transform: translateY(-2px);
}

/* ===  === */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1.5rem;
}

/* ===  === */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===  === */
.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border-left: 4px solid var(--danger-color);
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
  border-left: 4px solid var(--info-color);
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  border-left: 4px solid var(--warning-color);
}

/* ===  === */
.badge {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.badge-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

/* ===  === */
.navbar {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* ===   === */
.user-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
}

.user-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-rating {
  color: #ffc107;
  font-size: 1.1rem;
}

/* ===  === */
.stats-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stats-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* ===  === */
.order-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.order-status.new {
  background: #e3f2fd;
  color: #1976d2;
}

.order-status.in-progress {
  background: #fff3e0;
  color: #f57c00;
}

.order-status.completed {
  background: #e8f5e8;
  color: #388e3c;
}

.order-status.cancelled {
  background: #ffebee;
  color: #d32f2f;
}

/* ===  === */
.portfolio-item {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
}

/* ===  === */
.message-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.message-card.unread {
  border-left: 4px solid var(--primary-color);
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

.message-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===  === */
.notification-item {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.notification-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.notification-item.unread {
  border-left-color: var(--primary-color);
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
}

/* ===  === */
.search-form {
  background: white;
  border-radius: 50px;
  padding: 0.5rem;
  box-shadow: var(--box-shadow);
  border: 2px solid #f0f0f0;
  transition: var(--transition);
}

.search-form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.search-input {
  border: none;
  outline: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  width: 100%;
  background: transparent;
}

.search-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  color: white;
  font-weight: 500;
  transition: var(--transition);
}

.search-btn:hover {
  transform: scale(1.05);
}

/* ===  === */
.filter-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.filter-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

/* ===  === */
.pagination {
  justify-content: center;
  margin-top: 2rem;
}

.page-link {
  border: none;
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: var(--border-radius);
  color: var(--primary-color);
  transition: var(--transition);
}

.page-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
}

/* ===   === */
.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 15px 15px 0 0;
}

/* ===  === */
.spinner-custom {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===  === */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ===  === */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

/* ===  === */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .user-card {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .stats-card {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 1.8rem;
  }

  .order-card,
  .portfolio-item,
  .message-card {
    margin-bottom: 1rem;
  }

  .search-form {
    border-radius: 15px;
  }

  .search-btn {
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
  }
}

/* ===   === */
@media (prefers-color-scheme: dark) {
  :root {
    --dark-color: #f8f9fa;
    --light-color: #343a40;
  }

  body {
    background-color: #1a1a1a;
    color: var(--dark-color);
  }

  .card,
  .user-card,
  .order-card,
  .portfolio-item,
  .message-card,
  .notification-item,
  .filter-card {
    background: #2d2d2d;
    color: var(--dark-color);
  }

  .form-control,
  .form-select {
    background: #2d2d2d;
    border-color: #404040;
    color: var(--dark-color);
  }

  .form-control:focus,
  .form-select:focus {
    background: #2d2d2d;
    border-color: var(--primary-color);
  }
}

/* ===  === */
@media print {
  .navbar,
  .btn,
  .pagination,
  .modal {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  body {
    background: white;
    color: black;
  }
}

/* === ИСПРАВЛЕНИЯ ДЛЯ КНОПОК === */

/* Кнопки на темном фоне - белые обводки */
.hero-animated .btn-outline-light,
.bg-primary .btn-outline-light,
.bg-dark .btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-animated .btn-outline-light:hover,
.bg-primary .btn-outline-light:hover,
.bg-dark .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Кнопки на светлом фоне - цветные обводки */
.bg-light .btn-outline-primary,
.card .btn-outline-primary,
table .btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.bg-light .btn-outline-primary:hover,
.card .btn-outline-primary:hover,
table .btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Светящиеся кнопки на темном фоне */
.hero-animated .btn-glow,
.bg-primary .btn-glow,
.bg-dark .btn-glow {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.hero-animated .btn-glow:hover,
.bg-primary .btn-glow:hover,
.bg-dark .btn-glow:hover {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
  transform: translateY(-3px) scale(1.05);
}

/* Исправление для hero-section */
.hero-animated {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Плавающие частицы для hero */
.hero-animated::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 100px 100px, 150px 150px, 80px 80px;
  animation: float 20s linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

/* Стили для админ-панели */
.admin-dashboard {
    background: #f8f9fa;
    min-height: 100vh;
}

.stats-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stats-card .card-body {
    position: relative;
    overflow: hidden;
}

.stats-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.quick-action-btn {
    transition: all 0.3s ease;
    border-radius: 15px;
    border: 2px solid transparent;
    text-decoration: none;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: currentColor;
}

.activity-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

.activity-indicator.offline {
    background: #6c757d;
    animation: none;
}

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

/* Улучшенные карточки */
.enhanced-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.enhanced-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.enhanced-card .card-header {
    border-radius: 15px 15px 0 0;
    border: none;
    font-weight: 600;
}

/* Анимации загрузки */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Уведомления о блокировке */
.ban-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive улучшения */
@media (max-width: 768px) {
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .quick-action-btn {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        font-size: 0.9rem;
    }
}