/*
 * PAGES.CSS - Специфичные стили страниц
 * Содержит: аутентификация, админ панель, чаты, продукты, клиенты
 */

/* ===== AUTHENTICATION PAGES ===== */
.auth-cover-left,
.auth-cover-right {
  display: flex;
  background-color: #ffffff;
  min-height: 100vh;
}

.auth-cover-right {
  background-color: #ffffff;
}

.auth-social-login {
  width: 5rem;
  display: flex;
  align-items: center;
  justify-content: start;
}

.separator {
  display: flex;
  align-items: center;
}

.separator .line {
  height: 1px;
  flex: 1;
  background-color: var(--border-color);
}

.separator p {
  padding: 0 1rem;
}

/* ===== ADMIN PANEL ===== */
.stars-5 {
  color: #5bcf73 !important;
}

.stars-4 {
  color: #a2bd4d !important;
}

.stars-3 {
  color: #e2ad53 !important;
}

.stars-2 {
  color: #f38660 !important;
}

.stars-1 {
  color: #c33d3d !important;
}

#filial_name {
  max-height: 50px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(to bottom, #def, #f6f6f6 75%, #fff);
  color: var(--primary-color) !important;
  box-shadow: 0 -66px 39px 0 rgba(0, 140, 255, 0.33);
}

.grd-gray {
  background-image: linear-gradient(to bottom, #fff 0%, #ddd 100%) !important;
}

/* ===== CHAT PAGES ===== */
.chat-item {
  cursor: pointer;
  transition: var(--transition-fast);
  border: none !important;
}

.chat-item:hover {
  background-color: var(--light-color);
}

.chat-item.active, .bg-grd-primary {
  background: linear-gradient(310deg, #00fbc6 0%, #00ea5b 100%) !important;
  color: black !important;
}

.chat-item.active .text-muted {
  color: rgba(255, 255, 255, 0.7);
}

.chat-item.active .badge {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.chat-sidebar {
  height: 100%;
  overflow-y: auto;
}

.chat-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  background-color: var(--bg-secondary);
}

.message {
  margin-bottom: 1rem;
}

.message-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  word-wrap: break-word;
}

.message-bubble.from-client {
  background-color: var(--primary-color);
  color: white;
  margin-left: auto;
}

.message-bubble.from-admin {
  background-color: white;
  color: var(--dark-color);
  border: 1px solid var(--border-color);
  margin-right: auto;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.chat-input-container {
  padding: 1rem;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

/* ===== PRODUCT PAGES ===== */
.product-table table thead {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 400;
}

.product-table table .product-category {
  font-size: 0.8rem;
  color: #878d96;
}

.product-table table .product-title {
  font-size: 0.97rem;
  color: #2f353c;
}

.product-table table .product-tags {
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.product-table table .product-tags .btn-tags {
  font-size: 0.75rem;
  background-color: #f6f6f6;
  color: #000000;
  padding: 2px 10px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
}

.product-table table .product-rating {
  font-size: 0.8rem;
  background-color: #ffffff;
  padding: 2px 5px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
  font-weight: 500;
  white-space: nowrap;
}

/* ===== CUSTOMER PAGES ===== */
.customer-notes {
  height: 480px;
  position: relative;
  overflow-y: scroll;
}

.customer-table table thead {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 400;
}

.customer-table table .customer-name {
  color: #000000;
}

.lable-table {
  text-transform: uppercase;
  padding: 1px 8px;
}

/* ===== REVIEW PAGES ===== */
.review-desc {
  width: 400px;
}

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}

.section-title h1:after {
  content: "";
  position: absolute;
  display: block;
  width: 80px;
  height: 3px;
  background-color: #474747;
  left: 0;
  right: 0;
  bottom: 0;
  top: 60px;
  margin: auto;
}

/* ===== ORDER PAGES ===== */
.order-title {
  font-size: 15px;
}

.order-offcanvas {
  width: 350px;
}

.dropdown-menu-share {
  width: -moz-max-content;
  width: max-content;
}

/* ===== DASHBOARD ===== */
.dashboard-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  color: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.dashboard-stat {
  text-align: center;
  padding: 1.5rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.dashboard-stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.dashboard-stat-label {
  color: var(--secondary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Welcome back image fix */
.welcome-back-img {
  text-align: center;
  overflow: hidden;
}

.welcome-back-img img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== RESPONSIVE PAGES ===== */
@media screen and (max-width: 768px) {
  .auth-cover-left,
  .auth-cover-right {
    flex-direction: column;
  }

  .chat-content {
    margin-left: 0;
  }

  .chat-sidebar {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-base);
  }

  .chat-sidebar.show {
    left: 0;
  }

  .review-desc {
    width: 100%;
  }

  .product-table {
    overflow-x: auto;
  }

  .customer-notes {
    height: 300px;
  }
}

@media screen and (max-width: 576px) {
  .dashboard-card {
    padding: 1rem;
  }

  .dashboard-stat {
    padding: 1rem;
  }

  .dashboard-stat-number {
    font-size: 1.5rem;
  }

  .message-bubble {
    max-width: 85%;
  }

  .product-table table .product-tags {
    max-width: 150px;
  }
}

/* ===== PRINT STYLES FOR PAGES ===== */
@media print {
  .chat-sidebar,
  .chat-input-container,
  .btn,
  .dropdown,
  .pagination {
    display: none !important;
  }

  .chat-content {
    margin-left: 0 !important;
  }

  .message-bubble {
    border: 1px solid #000 !important;
    background-color: transparent !important;
    color: #000 !important;
  }
}
