/* ============================================
   HELPDESK COMPLETE REDESIGN - FRESH START
   ============================================ */

:root {
  --primary-blue: #3b82f6;
  --primary-blue-dark: #2563eb;
  --primary-blue-light: #60a5fa;
  --success-green: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-gray: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   HELPDESK HEADER
   ============================================ */
.helpdesk-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.helpdesk-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.helpdesk-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  transition: var(--transition);
}

.helpdesk-logo:hover {
  color: var(--primary-blue);
}

.helpdesk-logo i {
  font-size: 1.5rem;
  color: var(--primary-blue);
}

.helpdesk-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.helpdesk-nav-link {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: var(--transition);
}

.helpdesk-nav-link:hover {
  color: #1f2937;
  background: var(--bg-light);
}

.helpdesk-nav-link.active {
  color: #1f2937;
  background: var(--bg-light);
}

/* ============================================
   HELPDESK FOOTER
   ============================================ */
.helpdesk-footer {
  background: #0f172a;
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}

.helpdesk-footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.helpdesk-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.helpdesk-footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.helpdesk-footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.helpdesk-footer-section h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.helpdesk-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.helpdesk-footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.helpdesk-footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.helpdesk-footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* ============================================
   HERO SECTION - COMPACT & ELEGANT
   ============================================ */
.helpdesk-hero-elegant {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.helpdesk-hero-elegant::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 70% 30%,
    rgba(59, 130, 246, 0.05) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.hero-content-elegant {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-title-elegant {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle-elegant {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search-elegant {
  max-width: 700px;
  margin: 0 auto;
}

.search-box-elegant {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.search-box-elegant:focus-within {
  border-color: var(--primary-blue);
}

.search-box-elegant i {
  position: absolute;
  left: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-box-elegant input {
  flex: 1;
  padding: 1rem 1.25rem 1rem 3.25rem;
  background: #ffffff;
  border: none;
  font-size: 1rem;
  outline: none;
  color: var(--text-primary);
}

.search-box-elegant input::placeholder {
  color: var(--text-tertiary);
}

/* ============================================
   BREADCRUMB - ELEGANT
   ============================================ */
.breadcrumb-elegant {
  background: transparent;
  padding: 1.5rem 0 1rem;
  margin-bottom: 0;
}

.breadcrumb-elegant .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb-elegant .breadcrumb-item {
  color: var(--text-secondary);
}

.breadcrumb-elegant .breadcrumb-item a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: var(--transition);
}

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

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

.breadcrumb-elegant .breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-tertiary);
}

/* ============================================
   QUICK ACTIONS GRID
   ============================================ */
.quick-actions-section {
  padding: 2rem 0;
  background: var(--bg-white);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.quick-action-card {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.quick-action-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-blue-dark)
  );
}

.quick-action-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.quick-action-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   MY TICKETS PAGE
   ============================================ */
.tickets-page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.page-header-elegant {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-light);
}

.page-header-elegant h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.page-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Tickets List */
.tickets-list-elegant {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ticket-card-elegant {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.ticket-card-elegant:hover {
  border-color: var(--primary-blue);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.ticket-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.ticket-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.ticket-number-badge {
  background: var(--bg-gray);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: "Courier New", monospace;
}

.ticket-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.ticket-card-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ticket-card-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticket-card-info-item i {
  color: var(--text-tertiary);
}

.ticket-detail-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.ticket-detail-header {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.ticket-detail-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.ticket-detail-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Reply Section */
.reply-section-elegant {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
}

.reply-section-elegant h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.reply-section-elegant textarea {
  width: 100%;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
  transition: var(--transition);
}

.reply-section-elegant textarea:focus {
  border-color: var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.reply-actions-elegant {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.ticket-closed-notice-elegant {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: #15803d;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 0.75rem;
}

.ticket-closed-notice-elegant i {
  font-size: 1.5rem;
  color: #16a34a;
}

/* ============================================
   TICKET DETAIL - REDESIGNED THREAD LAYOUT
   ============================================ */

/* Main Container with Sidebar Layout */
.ticket-detail-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin-bottom: 2rem;
}

.ticket-thread-main {
  min-width: 0; /* Prevents flex overflow */
}

/* Thread Container */
.ticket-thread-container-new {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  min-height: 400px;
}

/* Message Bubbles - Chat Style */
.message-bubble {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  animation: slideIn 0.3s ease-out;
}

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

/* User Messages - Left Side */
.message-bubble.user-message {
  align-self: flex-start;
}

/* Staff Messages - Right Side */
.message-bubble.staff-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Avatar Styling */
.message-bubble-avatar {
  flex-shrink: 0;
}

.message-bubble-avatar img,
.message-bubble-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.message-bubble-avatar-placeholder {
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-blue-dark)
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.staff-message .message-bubble-avatar-placeholder {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Message Content */
.message-bubble-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Message Header */
.message-bubble-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.message-bubble-author {
  font-weight: 600;
  color: var(--text-primary);
}

.message-bubble-time {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.staff-badge-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #10b981;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Message Body Bubble */
.message-bubble-body {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
}

.staff-message .message-bubble-body {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
}

.user-message .message-bubble-body {
  background: white;
  border: 1px solid var(--border-color);
}

/* Original Message Highlight */
.message-bubble.original-message .message-bubble-body {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid var(--primary-blue);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Message Attachments */
.message-bubble-attachments {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.attachments-label-bubble {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attachment-item-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.attachment-item-bubble:hover {
  border-color: var(--primary-blue);
  background: #eff6ff;
  color: var(--primary-blue);
}

/* Ticket Metadata Sidebar */
.ticket-metadata-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.metadata-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.metadata-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-light);
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.metadata-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.metadata-value .badge {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

/* Timeline in Sidebar */
.ticket-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timeline-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  padding-top: 0.25rem;
}

.timeline-content strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

/* Reply Section at Bottom */
.reply-section-elegant {
  margin-top: 20px;
  border-top: 2px solid var(--border-light);
  padding-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ticket-detail-wrapper {
    grid-template-columns: 1fr;
  }

  .ticket-metadata-sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  .message-bubble {
    max-width: 95%;
  }

  .message-bubble-body {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .ticket-thread-container-new {
    padding: 1rem;
  }

  .metadata-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .message-bubble-avatar img,
  .message-bubble-avatar-placeholder {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .message-bubble-body {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
}

/* ============================================
   ARTICLE DETAIL PAGE
   ============================================ */
.article-detail-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
}

.article-main-content {
  min-width: 0;
}

.article-detail-header {
  margin-bottom: 2rem;
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-blue);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.article-detail-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.article-detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.article-author-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-blue-dark)
  );
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.article-author-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.article-publish-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.article-stats-info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-featured-image-elegant {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-featured-image-elegant img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body-elegant {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body-elegant h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.article-body-elegant h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.article-body-elegant p {
  margin-bottom: 1.25rem;
}

.article-body-elegant ul,
.article-body-elegant ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.article-body-elegant li {
  margin-bottom: 0.5rem;
}

.article-tags-elegant {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.article-tag-elegant {
  background: var(--bg-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.article-tag-elegant:hover {
  background: #eff6ff;
  color: var(--primary-blue);
}

.article-body-elegant code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-body-elegant pre {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Article Sidebar */
.article-sidebar-elegant {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card-elegant {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-elegant h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.related-articles-elegant {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-article-elegant {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  font-size: 0.9rem;
  line-height: 1.5;
}

.related-article-elegant:hover {
  background: var(--bg-light);
}

.related-article-elegant i {
  color: var(--primary-blue);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Article Feedback */
.article-feedback-elegant {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.article-feedback-elegant h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.feedback-buttons-elegant {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.feedback-btn-elegant {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.feedback-btn-elegant:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feedback-btn-elegant.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.feedback-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

.feedback-btn-elegant.active .feedback-count {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   SEARCH RESULTS PAGE
   ============================================ */
.search-results-header {
  text-align: center;
  margin: 2rem 0;
}

.search-results-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

.search-query-highlight {
  color: var(--primary-blue);
  font-weight: 600;
}

.search-results-info {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-result-card-elegant {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-result-card-elegant:hover {
  border-color: var(--primary-blue);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.search-result-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  color: var(--primary-blue);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.search-result-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.search-result-summary {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.search-result-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.search-result-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   CATEGORY PAGE
   ============================================ */
.category-page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.category-header-elegant {
  text-align: center;
  padding: 2.5rem 0;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 16px;
}

.category-icon-large-elegant {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-blue-dark)
  );
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.category-heading-elegant {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.category-description-elegant {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.category-article-count {
  display: inline-block;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
}

.category-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.category-article-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.category-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.category-article-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-light);
}

.category-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-article-card:hover .category-article-image img {
  transform: scale(1.05);
}

.category-article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-article-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.category-article-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.category-article-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state-elegant {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state-elegant i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
  color: var(--text-tertiary);
}

.empty-state-elegant h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.empty-state-elegant p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-elegant {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-elegant .page-item {
  list-style: none;
}

.pagination-elegant .page-link {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

.pagination-elegant .page-link:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: #eff6ff;
}

.pagination-elegant .page-item.active .page-link {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
}

.pagination-elegant .page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 9999;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--primary-blue-dark)
  );
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ============================================
   MODALS
   ============================================ */
.modal-elegant .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: var(--shadow-xl);
}

.modal-elegant .modal-header {
  border-bottom: 2px solid var(--border-light);
  padding: 1.5rem;
}

.modal-elegant .modal-title {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.modal-elegant .modal-body {
  padding: 1.5rem;
}

.modal-elegant .modal-footer {
  border-top: 2px solid var(--border-light);
  padding: 1.5rem;
}

.modal-elegant .form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.modal-elegant .form-control,
.modal-elegant .form-select {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.95rem;
  transition: var(--transition);
}

.modal-elegant .form-control:focus,
.modal-elegant .form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .article-detail-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-sidebar-elegant {
    position: static;
  }

  .helpdesk-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title-elegant {
    font-size: 2rem;
  }

  .page-header-elegant {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .category-articles-grid {
    grid-template-columns: 1fr;
  }

  .ticket-card-header {
    flex-direction: column;
    gap: 1rem;
  }

  .ticket-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticket-detail-title {
    font-size: 1.5rem;
  }

  .article-detail-title {
    font-size: 2rem;
  }

  .article-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .message-header-elegant {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .helpdesk-nav {
    display: none;
  }

  .helpdesk-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .search-box-elegant input {
    padding: 0.875rem 0.875rem 0.875rem 3rem;
  }

  .category-heading-elegant {
    font-size: 2rem;
  }

  .article-body-elegant {
    font-size: 1rem;
  }

  .feedback-buttons-elegant {
    flex-direction: column;
  }

  .feedback-btn-elegant {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title-elegant {
    font-size: 1.75rem;
  }

  .hero-subtitle-elegant {
    font-size: 1rem;
  }

  .page-header-elegant h1 {
    font-size: 1.5rem;
  }

  .ticket-card-title {
    font-size: 1.1rem;
  }

  .ticket-detail-title {
    font-size: 1.35rem;
  }

  .article-detail-title {
    font-size: 1.75rem;
  }

  .category-heading-elegant {
    font-size: 1.75rem;
  }

  .ticket-card-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .search-result-title {
    font-size: 1.15rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .helpdesk-header,
  .helpdesk-footer,
  .breadcrumb-elegant,
  .quick-actions-section,
  .article-sidebar-elegant,
  .article-feedback-elegant,
  .reply-section-elegant,
  .page-header-actions,
  .reading-progress-container {
    display: none !important;
  }

  .article-detail-container {
    grid-template-columns: 1fr;
  }

  .article-body-elegant {
    font-size: 12pt;
  }
}

.btn-primary {
  color: #fff;
  transition: background-color 0.2s ease, transform 0.15s ease;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-1px);
}

/* ============================================
   STICKY FOOTER - CLEAN SOLUTION
   ============================================ */

/* Only apply to helpdesk pages */
body:has(.helpdesk-footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body:has(.helpdesk-footer) > *:not(.helpdesk-footer) {
  flex-shrink: 0;
}

body:has(.helpdesk-footer) > div:first-of-type,
body:has(.helpdesk-footer) > main {
  flex: 1 0 auto;
}

.helpdesk-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* Ensure containers don't get squeezed */
.tickets-page-container,
.ticket-detail-container,
.category-page-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}
