/* ==========================================================================
   SKB FORUM & DIGITAL ASSET PLATFORM - COMPONENTS & FORUM VIEWS
   ========================================================================== */

/* 1. Global Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-left: 4px;
}

/* ==========================================================================
   Global Search Bar - Premium Modern Redesign
   ========================================================================== */
.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
  transition: all var(--transition-fast);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 0 10px 0 38px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.search-input-wrapper:focus-within {
  background: #ffffff;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(37, 99, 235, 0.08);
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 8px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  background: transparent;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.header-search input::placeholder {
  color: #94a3b8;
  font-weight: 450;
  transition: color 0.2s ease;
}

.search-input-wrapper:focus-within input::placeholder {
  color: #b0b9c6;
}

.search-icon-inside {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.search-svg-icon {
  width: 17px;
  height: 17px;
  stroke: #64748b;
  transition: all 0.2s ease;
}

.search-input-wrapper:hover .search-svg-icon {
  stroke: var(--primary, #2563eb);
}

.search-input-wrapper:focus-within .search-svg-icon {
  stroke: var(--primary, #2563eb);
  transform: scale(1.08);
}

.search-shortcut-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 2px 4px;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease;
}

.search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 20px;
  padding: 0 5px;
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  letter-spacing: -0.01em;
}

.header-search .search-clear-btn {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin-right: 4px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.header-search .search-clear-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.08);
}

.header-search .search-input-wrapper.has-value .search-clear-btn {
  display: inline-flex !important;
}

.header-search .search-input-wrapper.has-value .search-shortcut-badge {
  display: none !important;
}

.header-search .search-input-wrapper:not(.has-value) .search-clear-btn {
  display: none !important;
}

/* Header User Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  white-space: nowrap;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--points-bg);
  border: 1px solid var(--points-border);
  color: var(--points-gold);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.points-pill:hover {
  transform: scale(1.04);
}

.user-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-avatar-btn:hover {
  background: var(--bg-hover);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-display-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* User Menu Wrapper & Dropdown */
.user-menu-dropdown-wrapper {
  position: relative;
  display: inline-flex;
}

.user-dropdown-arrow {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 2px;
  transition: transform var(--transition-fast);
}

.user-menu-dropdown-wrapper.active .user-dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  z-index: 1000;
  display: none;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-dropdown-menu.show {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-dropdown-header {
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-dropdown-user-info {
  display: flex;
  flex-direction: column;
}

.user-dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.25;
}

.user-dropdown-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--primary-color, #2563eb);
}

.user-dropdown-item.user-dropdown-logout-item {
  color: #ef4444;
  font-weight: 600;
}

.user-dropdown-item.user-dropdown-logout-item:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.dropdown-item-icon {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}



/* 2. Breadcrumbs Bar */
.breadcrumbs-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-3) 0;
  font-size: 0.85rem;
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

.breadcrumbs-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-2);
  list-style: none;
  white-space: nowrap;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-light);
  font-size: 0.75rem;
}

.breadcrumb-item.active {
  color: var(--primary);
  font-weight: 600;
}

/* 3. Hero & Notice Bar */
.forum-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.forum-hero::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 680px;
}

/* 4. Category Grid & Row Layouts */
.category-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-xs);
}

.category-header {
  background: var(--bg-subtle);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.category-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 auto;
  min-width: 180px;
}

.category-header-badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
}

.category-row {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

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

.category-row:hover {
  background: #f8fafc;
}

.category-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-right: var(--space-4);
  flex-shrink: 0;
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-main-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.category-title-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.category-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.45;
}

.subcat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.subcat-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.subcat-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary);
}

.category-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-4);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 5. Thread List Table / Rows */
.threads-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.threads-toolbar {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.thread-filters {
  display: flex;
  gap: var(--space-2);
}

.filter-btn {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--border-light);
  box-shadow: var(--shadow-xs);
}

div.thread-row {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

div.thread-row:last-child {
  border-bottom: none;
}

div.thread-row:hover {
  background: #f8fafc;
}

div.thread-row.pinned {
  background: #fffdf5;
  border-left: 3.5px solid var(--warning);
}

.thread-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  margin-right: var(--space-4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

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

.thread-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.thread-stats-badge {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* 5.5 Threads Table Container & Table (Latest Firmware / Diagnostics / Profile) */
.threads-section {
  margin-top: 36px;
}

.threads-table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-top: 14px;
}

.threads-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

table.threads-table tr,
table.threads-table tr.threads-table-tr,
table.threads-table tr.thread-row {
  display: table-row !important;
}

table.threads-table th,
table.threads-table td {
  display: table-cell !important;
}

.threads-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.threads-table th:first-child,
.threads-table td:first-child {
  width: 44%;
  min-width: 300px;
}

.threads-table th:nth-child(2),
.threads-table td:nth-child(2) {
  width: 20%;
  min-width: 170px;
}

.threads-table th:nth-child(3),
.threads-table td:nth-child(3) {
  width: 16%;
  min-width: 140px;
}

.threads-table th:nth-child(4),
.threads-table td:nth-child(4) {
  width: 7%;
  text-align: center;
  white-space: nowrap;
}

.threads-table th:nth-child(5),
.threads-table td:nth-child(5) {
  width: 7%;
  text-align: center;
  white-space: nowrap;
}

.threads-table th:nth-child(6),
.threads-table td:nth-child(6) {
  width: 6%;
  text-align: right;
  white-space: nowrap;
  padding-right: 20px;
}

.threads-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-secondary);
  font-size: 0.88rem;
  background: var(--bg-card);
  transition: background var(--transition-fast);
}

.threads-table tr:last-child td {
  border-bottom: none;
}

.threads-table tr.threads-table-tr:hover td,
.threads-table tr.thread-row:hover td {
  background: #f8fafc;
  cursor: pointer;
}

.threads-table tr.pinned-thread td {
  background: #fffdf5;
}

.threads-table tr.pinned-thread td:first-child {
  border-left: 3.5px solid var(--warning);
}

/* Thread Title Column Styling */
.thread-title-col {
  line-height: 1.45;
}

.thread-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.thread-mobile-meta {
  display: none !important;
}

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

.pinned-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  margin-right: 8px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.thread-link-title {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.91rem;
  vertical-align: middle;
  transition: color var(--transition-fast);
}

.thread-link-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.attachment-counter-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  margin-left: 8px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Category Link Tag */
.cat-link-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
  transition: all var(--transition-fast);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-link-tag:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: var(--primary-hover);
}

/* Author Cell */
.author-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.avatar-circle-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  text-transform: uppercase;
}

.author-username {
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Stats */
.thread-stat-num {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.thread-replies-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  min-width: 26px;
  text-align: center;
}

/* 6. Thread Detail & Post View */
.thread-detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.thread-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 240px 1fr;
}

.post-author-sidebar {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border-light);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.author-details-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.author-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.author-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.author-company {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.author-info-list {
  width: 100%;
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: left;
}

.author-info-row {
  display: flex;
  justify-content: space-between;
}

.post-main-body {
  padding: var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-text-content {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.post-text-content h3 {
  color: var(--text-primary);
  font-size: 1.18rem;
  margin: var(--space-4) 0 var(--space-2);
}

.post-text-content ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.post-text-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  overflow-x: auto;
  margin: var(--space-4) 0;
}

/* YouTube Video Embeds & Thumbnails in Thread Post */
.youtube-videos-section {
  margin: var(--space-5) 0 var(--space-6) 0;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.youtube-videos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-light);
}

.youtube-videos-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.youtube-videos-icon {
  font-size: 1.25rem;
}

.youtube-videos-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.youtube-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.youtube-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.youtube-video-card {
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #1e293b;
}

.youtube-video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.youtube-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
  display: block;
}

.youtube-video-card:hover .youtube-thumb-img {
  transform: scale(1.04);
  filter: brightness(0.9);
}

.youtube-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 44px;
  background: rgba(33, 33, 33, 0.85);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.youtube-video-card:hover .youtube-play-btn {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.08);
}

.youtube-play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 3px;
}

.youtube-duration-pill {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.youtube-card-footer {
  padding: 10px 14px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.youtube-card-footer a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.youtube-card-footer a:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* Image Gallery in Thread Post */
.thread-images-section {
  margin: var(--space-5) 0 var(--space-6) 0;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.thread-images-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-light);
}

.thread-images-icon {
  font-size: 1.25rem;
}

.thread-images-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.thread-images-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 0 0;
}

.gallery-item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  cursor: pointer;
  position: relative;
  background: var(--bg-subtle);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-zoom-badge {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 14px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* 7. Attachment Download Box */
.attachments-box {
  margin-top: var(--space-6);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.attachments-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.attachment-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.attachment-card:last-child {
  margin-bottom: 0;
}

.attachment-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.attachment-action-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.attachment-points-pill {
  text-align: right;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
}

.attachment-points-value {
  font-weight: 800;
  color: var(--points-gold, #f59e0b);
  font-size: 0.95rem;
  white-space: nowrap;
}

.attachment-points-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.file-type-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--primary-border);
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
  word-break: break-all;
}

.file-submeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.file-meta-pill {
  font-weight: 600;
  color: var(--text-secondary);
}

/* 8. Profile Layout Grid */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  width: 100%;
}

@media (max-width: 900px) {
  .profile-layout-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
}

@media (max-width: 600px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .profile-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }
}

/* 9. Site Footer Component */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: var(--space-6) 0;
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.85rem;
}

.footer-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-weight: 500;
  font-size: 0.86rem;
}

.footer-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-nav-links a:hover {
  color: var(--primary);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icon-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social-icon-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.social-icon-btn.yt:hover { background: #FF0000; border-color: #FF0000; }
.social-icon-btn.tg:hover { background: #229ED9; border-color: #229ED9; }
.social-icon-btn.wa:hover { background: #25D366; border-color: #25D366; }
.social-icon-btn.fb:hover { background: #1877F2; border-color: #1877F2; }
.social-icon-btn.tw:hover { background: #0f1419; border-color: #0f1419; }

@media (max-width: 768px) {
  .site-footer {
    padding: var(--space-5) 0 calc(var(--space-6) + 48px) 0;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: var(--space-4);
  }
  .footer-nav-links {
    justify-content: center;
    gap: var(--space-4);
  }
  .footer-social-links {
    justify-content: center;
  }
}

/* 10. Scroll to Top Floating Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.85);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 990;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(0.96);
}

@media (max-width: 768px) {
  .scroll-to-top-btn {
    bottom: 76px; /* Positioned above mobile bottom bar */
    right: 18px;
    width: 40px;
    height: 40px;
  }
}

/* 11. Forum & Record Pagination Component (10 records per page) */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: 16px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-top: -1px;
}

.pagination-info {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pagination-info strong {
  color: var(--text-primary);
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--bg-subtle);
  color: var(--primary);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  cursor: default;
}

.pagination-btn.arrow-btn {
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 12px;
}

.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-subtle);
  border-color: var(--border-light);
  pointer-events: none;
}

.pagination-ellipsis {
  padding: 0 5px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 2px;
  user-select: none;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .pagination-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
    padding: 14px 12px;
  }
  .pagination-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .pagination-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.82rem;
    padding: 0 8px;
  }
}

/* ==========================================================================
   14. Dedicated Search Page & Results Layout
   ========================================================================== */

.search-page-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

/* Search Hero Card */
.search-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}

.search-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
}

.search-hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.search-page-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.45;
}

.search-stats-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Main Input Box */
.search-input-box-wrapper {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
}

.search-input-field-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-icon {
  position: absolute;
  left: 16px;
  font-size: 1.15rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-page-input-control {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 48px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.search-page-input-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.search-input-field-group .search-clear-btn {
  position: absolute;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  border: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-input-field-group .search-clear-btn:hover {
  background: var(--text-muted);
  color: #fff;
}

.search-submit-btn {
  height: 52px;
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.keyboard-hint {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category Filter Tabs / Pills */
.search-filter-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px dashed var(--border-light);
}

.search-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-pill-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-primary);
  transform: translateY(-1px);
}

.search-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.search-pill-btn .pill-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.search-pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Results Toolbar */
.search-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: 0 4px;
}

.search-summary-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.search-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.search-sort-select {
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.search-sort-select:focus {
  border-color: var(--primary);
  outline: none;
}

/* Results List & Thread Cards */
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.search-thread-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.search-thread-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.search-thread-card.is-pinned {
  background: #fffdf5;
  border-left: 4px solid var(--warning);
}

.search-card-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.search-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-thread-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-card-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-cat-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-thread-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.search-thread-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.search-thread-card:hover .search-thread-title a {
  color: var(--primary);
}

.search-thread-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Attachments Preview */
.search-attachments-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.attachment-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.search-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  background: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.search-file-pill.file-match {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary);
}

.file-ext-tag {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
}

.file-size-text {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Card Meta Bottom */
.search-card-meta-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.author-role-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}

/* Right Stats & Action Column */
.search-card-stats-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-light);
  padding-left: var(--space-4);
  min-width: 130px;
}

.search-stat-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-stat-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.search-stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.search-action-btn {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  white-space: nowrap;
}

/* Keyword Highlighting */
.search-highlight {
  background: rgba(254, 240, 138, 0.85);
  color: #854d0e;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.2);
}

/* Empty State Card */
.search-empty-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.search-empty-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.search-empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.search-empty-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.5;
}

.search-suggestions-box {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.suggestion-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.suggestion-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.suggestion-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.suggestion-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   15. Revamped Auth Modal (Login & Registration Split Card)
   ========================================================================== */

.auth-revamped-box {
  max-width: 880px !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
}

.auth-close-circle-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-close-circle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.08);
}

.auth-split-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 520px;
}

/* Left Brand Sidebar */
.auth-brand-sidebar {
  background: linear-gradient(155deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-sidebar::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.auth-sidebar-brand-header {
  position: relative;
  z-index: 2;
}

.auth-sidebar-tagline {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-top: 10px;
}

.auth-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  position: relative;
  z-index: 2;
}

.auth-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-benefit-text {
  display: flex;
  flex-direction: column;
}

.auth-benefit-text strong {
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.auth-benefit-text span {
  color: #94a3b8;
  font-size: 0.74rem;
  line-height: 1.35;
}

.auth-trust-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.trust-avatars-row {
  display: flex;
  align-items: center;
}

.trust-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  margin-left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
}

.trust-avatar:first-child {
  margin-left: 0;
}

.trust-text {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.3;
}

/* Right Form Panel */
.auth-form-panel {
  padding: 32px 32px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  max-height: 85vh;
}

.auth-segment-nav {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  gap: 4px;
  margin-bottom: 4px;
}

.auth-segment-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-segment-btn:hover {
  color: #1e293b;
}

.auth-segment-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-tab-badge {
  font-size: 0.66rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
}

.auth-header-block {
  margin-bottom: 2px;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px 0;
}

.auth-subtitle {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.35;
  margin: 0;
}

/* Demo Logins Bar */
.auth-demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.demo-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.demo-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.demo-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Input with Icon Styling */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 38px;
  padding-right: 38px;
  height: 44px;
  border-radius: 8px;
  font-size: 0.88rem;
  background: #f8fafc;
}

.input-with-icon .form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  z-index: 3;
  line-height: 1;
}

.password-toggle-btn:hover {
  color: var(--primary-color, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  opacity: 1;
}

.password-toggle-btn svg {
  display: block;
  pointer-events: none;
}

.forgot-pwd-link {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.forgot-pwd-link:hover {
  text-decoration: underline;
}

.auth-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
}

.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #475569;
  cursor: pointer;
}

.custom-checkbox-label input {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.auth-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-submit-btn {
  height: 46px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.auth-switch-footer {
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 10px;
}

.auth-switch-footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch-footer a:hover {
  text-decoration: underline;
}

/* Password Strength Meter */
.password-strength-wrap {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.strength-bar {
  height: 4px;
  flex: 1;
  background: #e2e8f0;
  border-radius: 2px;
  transition: background 0.25s ease;
}

.strength-bar.weak {
  background: #ef4444;
}

.strength-bar.medium {
  background: #f59e0b;
}

.strength-bar.strong {
  background: #10b981;
}

.strength-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

/* ==========================================================================
   Thread Edit Modal & Existing Attachment Manager
   ========================================================================== */
.existing-files-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.existing-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.existing-file-row.marked-removed {
  background: #fef2f2;
  border-color: #fecaca;
  opacity: 0.85;
}

.existing-file-row.marked-removed .existing-file-name {
  text-decoration: line-through;
  color: #991b1b;
}

.existing-file-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.existing-file-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.existing-file-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--primary-border);
}

.existing-file-details {
  min-width: 0;
  flex: 1;
}

.existing-file-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.existing-file-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.btn-remove-attachment {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-remove-attachment:hover {
  background: #fecaca;
  color: #b91c1c;
}

.btn-undo-attachment {
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.btn-undo-attachment:hover {
  background: #dbeafe;
}

/* ==========================================================================
   15. S3 File Manager Styles
   ========================================================================== */

.fm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.fm-dropzone-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px dashed #cbd5e1;
}

.fm-dropzone-card:hover,
.fm-dropzone-card.dragover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.04) !important;
  transform: translateY(-1px);
}

.fm-toolbar {
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.fm-filter-btn {
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.fm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
}

.fm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border-color: var(--border-medium);
}

.fm-card-preview {
  height: 140px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.fm-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.fm-card:hover .fm-card-preview img {
  transform: scale(1.05);
}

.fm-file-icon-large {
  font-size: 3.2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.fm-card-badge-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.fm-card-badge-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.fm-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fm-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-card-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

.fm-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

.fm-card-footer {
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fm-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  justify-content: flex-end;
}

.fm-card-actions .btn {
  padding: 5px 8px;
  font-size: 0.76rem;
}

.fm-share-slug-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.74rem;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .fm-grid {
    grid-template-columns: 1fr;
  }
  .fm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}




