/* Buyer Pages Styles */

/* Sidebar Dashboard */
.dashboard-sidebar {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.dashboard-sidebar .user-info {
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
}

.dashboard-sidebar .user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  margin-bottom: 12px;
}

.dashboard-sidebar .sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-sidebar .sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--gray-700);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.dashboard-sidebar .sidebar-menu li a:hover,
.dashboard-sidebar .sidebar-menu li a.active {
  background: var(--gray-100);
  color: var(--primary);
  border-left-color: var(--primary);
}

.dashboard-sidebar .sidebar-menu li a i {
  width: 24px;
  margin-right: 12px;
}

/* Dashboard Cards */
.dashboard-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  height: 100%;
}

.dashboard-card .card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

.dashboard-card .card-icon.primary { background: var(--primary); }
.dashboard-card .card-icon.secondary { background: var(--secondary); }
.dashboard-card .card-icon.accent { background: var(--accent); }
.dashboard-card .card-icon.info { background: var(--info); }

.dashboard-card .card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 12px 0 4px;
}

.dashboard-card .card-label {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* Data Table */
.data-table {
  width: 100%;
}

.data-table thead th {
  background: var(--gray-100);
  padding: 14px 16px;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
  font-size: 0.9rem;
}

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: var(--gray-100);
}

/* Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.pending { background: #fff3cd; color: #856404; }
.status-badge.processing { background: #cce5ff; color: #004085; }
.status-badge.shipped { background: #d4edda; color: #155724; }
.status-badge.completed { background: #26a269; color: #fff; }
.status-badge.cancelled { background: #f8d7da; color: #721c24; }

/* Chat Interface */
.chat-container {
  height: 600px;
  display: flex;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.chat-sidebar {
  width: 300px;
  border-right: 1px solid var(--gray-200);
}

.chat-sidebar .chat-search {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.chat-sidebar .chat-list {
  overflow-y: auto;
  height: calc(100% - 60px);
}

.chat-list-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.2s;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: var(--gray-100);
}

.chat-list-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.chat-list-item .chat-info {
  flex: 1;
}

.chat-list-item .chat-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-list-item .chat-preview {
  font-size: 0.85rem;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-item .chat-meta {
  text-align: right;
}

.chat-list-item .chat-time {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.chat-list-item .unread-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--gray-100);
}

.message {
  max-width: 70%;
  margin-bottom: 16px;
}

.message.sent {
  margin-left: auto;
}

.message .message-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.message.received .message-content {
  background: var(--white);
  border-bottom-left-radius: 4px;
}

.message.sent .message-content {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message .message-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.message.sent .message-time {
  text-align: right;
}

.chat-input {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 25px;
  font-size: 0.95rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Order Tracking */
.tracking-timeline {
  position: relative;
  padding-left: 30px;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.tracking-step {
  position: relative;
  padding-bottom: 30px;
}

.tracking-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 2px solid var(--white);
}

.tracking-step.completed::before {
  background: var(--secondary);
}

.tracking-step.current::before {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 95, 180, 0.2);
}

.tracking-step .step-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tracking-step .step-time {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.tracking-step .step-desc {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-top: 8px;
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.auth-card .auth-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 40px;
  text-align: center;
  color: var(--white);
}

.auth-card .auth-header h2 {
  color: var(--white);
  margin-bottom: 8px;
}

.auth-card .auth-body {
  padding: 40px;
}

.social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-login .btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
}

/* Cart Page */
.cart-item {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-item .item-image {
  width: 120px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-100);
}

.cart-item .item-info {
  flex: 1;
}

.cart-item .item-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-item .item-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.cart-item .quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .quantity-control .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.cart-item .quantity-control input {
  width: 60px;
  text-align: center;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 6px;
}

.cart-summary {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
}

.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.cart-summary .summary-row:last-child {
  border-bottom: none;
}

.cart-summary .total-row {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 991px) {
  .chat-container {
    flex-direction: column;
    height: auto;
  }
  
  .chat-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }
  
  .chat-sidebar .chat-list {
    height: 200px;
  }
  
  .chat-messages {
    height: 400px;
  }
}

@media (max-width: 767px) {
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  
  .cart-item .item-image {
    width: 100%;
    height: 150px;
  }
}
