/* =============================================
   FORUMS / SUPPORT PAGES
   Modern Dark-Light Theme
   ============================================= */

/* ===== PAGE LAYOUT ===== */
.forums-page {
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 60px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.dark-mode .forums-page {
  background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
}

.forums-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== PAGE HEADER ===== */
.forums-header {
  margin-bottom: 40px;
}

.forums-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.forums-title {
  font-family: 'MuseoModerno', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

body.dark-mode .forums-title {
  color: #f1f5f9;
}

.forums-title span {
  color: #55bcc9;
}

.forums-subtitle {
  font-size: 15px;
  color: #64748b;
  margin: 8px 0 0 0;
}

body.dark-mode .forums-subtitle {
  color: #94a3b8;
}

/* ===== BUTTONS ===== */
.btn-forums-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #55bcc9 0%, #4aa8b4 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-forums-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(85, 188, 201, 0.3);
  color: #fff;
}

.btn-forums-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

body.dark-mode .btn-forums-secondary {
  color: #e2e8f0;
  background: #1a1a1a;
  border-color: #333;
}

.btn-forums-secondary:hover {
  border-color: #55bcc9;
  color: #55bcc9;
}

.btn-forums-danger {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #ef4444;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-forums-danger:hover {
  background: #dc2626;
}

/* ===== LAYOUT GRID ===== */
.forums-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .forums-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ===== SIDEBAR ===== */
.forums-sidebar {
  position: sticky;
  top: 100px;
}

@media (max-width: 900px) {
  .forums-sidebar {
    position: static;
  }
}

.sidebar-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  margin-bottom: 20px;
}

body.dark-mode .sidebar-card {
  background: #161616;
  border-color: #262626;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

body.dark-mode .sidebar-title {
  color: #64748b;
}

/* Search input */
.search-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.search-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

body.dark-mode .search-input {
  color: #f1f5f9;
  background: #0f0f0f;
  border-color: #333;
}

.search-input:focus {
  border-color: #55bcc9;
  background: #fff;
}

body.dark-mode .search-input:focus {
  background: #1a1a1a;
}

/* Filter select */
.filter-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

body.dark-mode .filter-select {
  color: #f1f5f9;
  background: #0f0f0f;
  border-color: #333;
}

.filter-select:focus {
  border-color: #55bcc9;
}

.filter-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #55bcc9;
  background: rgba(85, 188, 201, 0.1);
  border: 1px solid rgba(85, 188, 201, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(85, 188, 201, 0.15);
  border-color: #55bcc9;
}

body.dark-mode .filter-btn {
  background: rgba(85, 188, 201, 0.08);
  border-color: rgba(85, 188, 201, 0.2);
}

/* ===== THREAD LIST ===== */
.threads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.thread-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  transition: all 0.3s ease;
}

body.dark-mode .thread-card {
  background: #161616;
  border-color: #262626;
}

.thread-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: #55bcc9;
}

body.dark-mode .thread-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.thread-title-link {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

body.dark-mode .thread-title-link {
  color: #f1f5f9;
}

.thread-title-link:hover {
  color: #55bcc9;
}

.thread-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Status badges */
.status-badge {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: capitalize;
}

.status-open {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

body.dark-mode .status-open {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.status-resolved {
  background: rgba(85, 188, 201, 0.15);
  color: #0e7490;
}

body.dark-mode .status-resolved {
  background: rgba(85, 188, 201, 0.2);
  color: #55bcc9;
}

.status-closed {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

body.dark-mode .status-closed {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Thread meta */
.thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}

body.dark-mode .thread-meta {
  color: #94a3b8;
}

.thread-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.thread-meta-item i {
  font-size: 12px;
  color: #94a3b8;
}

body.dark-mode .thread-meta-item i {
  color: #64748b;
}

.category-tag {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
  text-transform: capitalize;
}

body.dark-mode .category-tag {
  color: #94a3b8;
  background: #262626;
}

/* Thread stats */
.thread-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

body.dark-mode .thread-stats {
  border-color: #262626;
}

.thread-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
}

body.dark-mode .thread-stat {
  color: #94a3b8;
}

.thread-stat i {
  color: #94a3b8;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

body.dark-mode .empty-state {
  background: #161616;
  border-color: #262626;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 16px;
  color: #94a3b8;
  font-size: 24px;
}

body.dark-mode .empty-state-icon {
  background: #262626;
  color: #64748b;
}

.empty-state h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

body.dark-mode .empty-state h4 {
  color: #f1f5f9;
}

.empty-state p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

body.dark-mode .empty-state p {
  color: #94a3b8;
}

/* ===== PAGINATION ===== */
.forums-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

body.dark-mode .page-btn {
  color: #94a3b8;
  background: #161616;
  border-color: #262626;
}

.page-btn:hover {
  border-color: #55bcc9;
  color: #55bcc9;
}

.page-btn.active {
  background: #55bcc9;
  border-color: #55bcc9;
  color: #fff;
}

/* ===== THREAD DETAIL PAGE ===== */
.thread-detail-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 24px;
}

body.dark-mode .thread-detail-card {
  background: #161616;
  border-color: #262626;
}

.thread-detail-header {
  padding: 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

body.dark-mode .thread-detail-header {
  border-color: #262626;
}

.thread-detail-title {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

body.dark-mode .thread-detail-title {
  color: #f1f5f9;
}

.thread-detail-meta {
  font-size: 14px;
  color: #64748b;
}

body.dark-mode .thread-detail-meta {
  color: #94a3b8;
}

.thread-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Status dropdown */
.status-dropdown {
  position: relative;
}

.status-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-mode .status-dropdown-btn {
  color: #e2e8f0;
  background: #1a1a1a;
  border-color: #333;
}

.status-dropdown-btn:hover {
  border-color: #55bcc9;
}

/* Messages list */
.messages-list {
  padding: 24px;
}

.message-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .message-item {
  border-color: #262626;
}

.message-item:last-child {
  border-bottom: none;
}

.message-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #55bcc9 0%, #4aa8b4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.message-item.admin-reply .message-avatar {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.message-content-wrapper {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.message-author {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

body.dark-mode .message-author {
  color: #f1f5f9;
}

.staff-badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #ef4444;
  border-radius: 4px;
  text-transform: uppercase;
}

.message-time {
  font-size: 13px;
  color: #94a3b8;
  margin-left: auto;
}

body.dark-mode .message-time {
  color: #64748b;
}

.message-body {
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

body.dark-mode .message-body {
  background: #0f0f0f;
  color: #cbd5e1;
}

.message-item.admin-reply .message-body {
  background: #fef2f2;
}

body.dark-mode .message-item.admin-reply .message-body {
  background: rgba(239, 68, 68, 0.1);
}

/* Reply form */
.reply-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 24px;
}

body.dark-mode .reply-card {
  background: #161616;
  border-color: #262626;
}

.reply-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

body.dark-mode .reply-card-title {
  color: #f1f5f9;
}

.reply-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  resize: vertical;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

body.dark-mode .reply-textarea {
  color: #f1f5f9;
  background: #0f0f0f;
  border-color: #333;
}

.reply-textarea:focus {
  border-color: #55bcc9;
  background: #fff;
}

body.dark-mode .reply-textarea:focus {
  background: #1a1a1a;
}

/* ===== CREATE THREAD PAGE ===== */
.create-thread-card {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 40px;
}

body.dark-mode .create-thread-card {
  background: #161616;
  border-color: #262626;
}

.create-thread-title {
  font-family: 'MuseoModerno', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin: 0 0 32px 0;
}

body.dark-mode .create-thread-title {
  color: #f1f5f9;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  margin-bottom: 8px;
}

body.dark-mode .form-group label {
  color: #94a3b8;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  color: #f1f5f9;
  background: #0f0f0f;
  border-color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #55bcc9;
  background: #fff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
  background: #1a1a1a;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 991.98px) {
  .forums-page {
    padding-top: 24px;
    padding-bottom: 100px;
  }
  
  .forums-header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .thread-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .thread-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .thread-detail-header {
    flex-direction: column;
  }
  
  .create-thread-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .forums-container {
    padding: 0 16px;
  }
  
  .forums-title {
    font-size: 24px;
  }
  
  .sidebar-card,
  .thread-card,
  .thread-detail-card,
  .reply-card {
    border-radius: 12px;
    padding: 20px;
  }
  
  .thread-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .message-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .message-header {
    flex-wrap: wrap;
  }
  
  .message-time {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
}
