/* Transcript Webapp Styles - Ruffy Orange Glassmorphism */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f1419;
  --bg-tertiary: #1a1f2e;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #6b7280;
  --accent-primary: #C7662A;
  --accent-primary-light: #E08A52;
  --accent-primary-dark: #9E4F1F;
  --accent-rgb: 199, 102, 42;
  --accent-success: #22c55e;
  --accent-warning: #eab308;
  --accent-danger: #ef4444;
  --border-color: rgba(199, 102, 42, 0.12);
  --glass-bg: rgba(15, 20, 25, 0.82);
  --glass-border: rgba(199, 102, 42, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(199, 102, 42, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Background Effects */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

.bg-gradient-1 {
  position: absolute;
  top: -30%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(199, 102, 42, 0.22) 0%, rgba(199, 102, 42, 0.05) 40%, transparent 70%);
  filter: blur(40px);
  animation: float1 20s ease-in-out infinite;
}

.bg-gradient-2 {
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(158, 79, 31, 0.18) 0%, rgba(199, 102, 42, 0.04) 40%, transparent 70%);
  filter: blur(40px);
  animation: float2 25s ease-in-out infinite;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(199, 102, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(199, 102, 42, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-40px, 20px) rotate(-3deg); }
  66% { transform: translate(30px, -40px) rotate(3deg); }
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.nav-brand-link:hover {
  opacity: 0.9;
}

.nav-logo-img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nav-link svg {
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.15s ease, stroke 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link:hover svg {
  opacity: 0.85;
}

.nav-link-active {
  color: var(--text-primary);
  background: rgba(199, 102, 42, 0.2);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.nav-link-active svg {
  opacity: 1;
  stroke: var(--accent-primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-login-btn {
  font-size: 0.8125rem;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
}

/* Mobile menu toggle */
.nav-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(199, 102, 42, 0.3);
}

.nav-menu-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-menu-toggle.is-open .nav-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-menu-toggle.is-open .nav-menu-bar:nth-child(2) {
  opacity: 0;
}

.nav-menu-toggle.is-open .nav-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-mobile-panel.is-open {
  display: block;
}

.nav-mobile-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile-links .nav-link {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
}

body.nav-menu-open {
  overflow: hidden;
}

/* User Dropdown */
.nav-user-dropdown {
  position: relative;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.3125rem 0.75rem 0.3125rem 0.3125rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(199, 102, 42, 0.35);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.08);
}

.user-dropdown-trigger .avatar {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
}

.user-dropdown-trigger .username {
  font-weight: 500;
  font-size: 0.8125rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-trigger .dropdown-arrow {
  transition: transform 0.2s ease;
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-user-dropdown:has(.user-dropdown-menu.show) .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: rgba(15, 20, 25, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.875rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(199, 102, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1rem 0.875rem;
  background: linear-gradient(180deg, rgba(199, 102, 42, 0.08) 0%, transparent 100%);
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(199, 102, 42, 0.5);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.12);
}

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

.dropdown-username {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.25rem 0.5rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  margin: 0 0.375rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:last-child {
  margin-bottom: 0.5rem;
}

.dropdown-item:hover {
  background: rgba(199, 102, 42, 0.12);
  color: var(--text-primary);
}

.dropdown-item svg {
  opacity: 0.75;
  flex-shrink: 0;
}

.dropdown-item-danger {
  color: #f87171;
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.dropdown-item-danger svg {
  stroke: currentColor;
  opacity: 1;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

/* Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 1.5rem 2rem;
  align-items: start;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.footer-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

.footer-brand-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: flex-end;
  align-items: center;
}

.footer-nav a,
.footer-link-btn {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.footer-nav a:hover,
.footer-link-btn:hover {
  color: var(--accent-primary-light);
}

.footer-bottom {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}


/* Legal Pages */
.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-card {
  padding: 2.5rem;
}

.legal-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.legal-section h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 1rem 0 0.5rem;
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-section ul {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-section a:hover {
  color: var(--accent-primary-light);
}

.legal-section code {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-primary-light);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.cookie-table th,
.cookie-table td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--glass-border);
}

.cookie-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.cookie-table td {
  color: var(--text-secondary);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 1.25rem 2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner-content {
  flex: 1;
}

.cookie-banner-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner-content a {
  color: var(--accent-primary);
  text-decoration: none;
}

.cookie-banner-content a:hover {
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner-actions .btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: center;
  }

  .legal-card {
    padding: 1.5rem;
  }

  .legal-card h1 {
    font-size: 1.5rem;
  }
}

/* Cookie Declined Notice Modal */
.cookie-declined-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 1rem;
}

.cookie-declined-notice.hidden {
  display: none;
}

.cookie-declined-content {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow), var(--shadow-glow);
}

.cookie-declined-content h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.cookie-declined-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.cookie-declined-actions {
  display: flex;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(199, 102, 42, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(199, 102, 42, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Hero Section */
.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto 4rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(199, 102, 42, 0.15);
  border: 1px solid rgba(199, 102, 42, 0.3);
  color: var(--accent-primary-light);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Features */
.features-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  text-align: left;
  padding: 1.5rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(199, 102, 42, 0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Dashboard */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
}

.dash-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(199, 102, 42, 0.12) 0%, rgba(15, 20, 25, 0.6) 55%);
  border-color: rgba(199, 102, 42, 0.2);
}

.dash-hero-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(199, 102, 42, 0.25);
}

.dash-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary-light);
  margin-bottom: 0.25rem;
}

.dash-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.375rem;
  line-height: 1.2;
}

.dash-username {
  color: var(--accent-primary-light);
}

.dash-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.dash-admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-admin-row .admin-view-toggle,
.dash-admin-row .admin-tools {
  margin-top: 0;
  padding: 1rem 1.25rem;
}

.dash-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.dash-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dash-quick-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text-secondary);
}

.dash-quick-actions .action-card {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.dash-quick-actions .action-arrow {
  display: none;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.text-muted {
  color: var(--text-muted);
}

/* Admin View Toggle */
.admin-view-toggle {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
}

.toggle-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toggle-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.toggle-info svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.toggle-info strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.toggle-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(107, 114, 128, 0.3);
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-slider:hover {
  opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-blue,
.stat-icon-accent {
  background: rgba(199, 102, 42, 0.15);
  color: var(--accent-primary-light);
}

.stat-icon-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.stat-icon-purple {
  background: rgba(199, 102, 42, 0.12);
  color: var(--accent-primary-light);
}

.stat-icon-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger, #ef4444);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stat-label .stat-label-scope {
  font-weight: 500;
  font-size: 0.8125rem;
}

/* Dashboard Section */
.dashboard-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.25rem;
}

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

.ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.ticket-item:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
}

.ticket-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.ticket-id {
  font-weight: 600;
  color: var(--accent-primary);
}

.ticket-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.status-open {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-success);
}

.status-closed,
.status-auto_closed {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-secondary);
}

.status-deleted {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger, #ef4444);
}

.ticket-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.ticket-separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.ticket-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.ticket-messages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Dashboard Actions */
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.hero-logo {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 1rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(199, 102, 42, 0.35));
}

.action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.action-card:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: rgba(199, 102, 42, 0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.action-content {
  flex: 1;
}

.action-content h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.action-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.action-arrow {
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.empty-state svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
}

.filter-tab:hover {
  background: rgba(199, 102, 42, 0.1);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent-primary);
  color: white;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot-open {
  background: var(--accent-success);
}

.status-dot-closed {
  background: var(--text-muted);
}

.status-dot-deleted {
  background: var(--accent-danger, #ef4444);
}

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

/* Transcript Grid */
.transcript-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.transcript-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.transcript-card:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
  transform: translateY(-2px);
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.transcript-id {
  font-weight: 600;
  color: var(--accent-primary);
}

.transcript-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.transcript-body {
  flex: 1;
  margin-bottom: 0.75rem;
}

.transcript-category {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.transcript-guild {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.transcript-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.transcript-messages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
}

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

/* Tickets Table */
.tickets-table {
  overflow-x: auto;
  padding: 0;
}

.tickets-table table {
  width: 100%;
  border-collapse: collapse;
}

.tickets-table th,
.tickets-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.tickets-table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.tickets-table tbody tr {
  transition: background 0.2s;
}

.tickets-table tbody tr:hover {
  background: rgba(199, 102, 42, 0.05);
}

.ticket-id-cell a {
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
}

.ticket-id-cell a:hover {
  text-decoration: underline;
}

.ticket-status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.date-cell {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.count-cell {
  text-align: center;
}

.action-cell {
  text-align: right;
}

/* Search Page */
.search-page {
  max-width: 960px;
  margin: 0 auto;
}

.search-page-header {
  margin-bottom: 1.5rem;
}

.search-page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.375rem;
}

.search-panel {
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(160deg, rgba(199, 102, 42, 0.08) 0%, rgba(15, 20, 25, 0.85) 45%);
  border-color: rgba(199, 102, 42, 0.18);
}

.search-panel-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.search-icon {
  color: var(--accent-primary-light);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: rgba(199, 102, 42, 0.45);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.12);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.875rem 1rem;
}

.search-filter label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.search-filter input,
.search-filter select {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.4375rem;
  padding: 0.5rem 0.625rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-filter input:focus,
.search-filter select:focus {
  border-color: rgba(199, 102, 42, 0.4);
}

.search-filter--select {
  display: flex;
  flex-direction: column;
}

.search-filter--select .custom-select {
  width: 100%;
}

/* Custom Select */
.custom-select {
  position: relative;
}

.custom-select-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.4375rem;
  padding: 0.5rem 0.625rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.custom-select-trigger:hover {
  border-color: rgba(199, 102, 42, 0.35);
  background: rgba(199, 102, 42, 0.06);
}

.custom-select.is-open .custom-select-trigger {
  border-color: rgba(199, 102, 42, 0.5);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.12);
}

.custom-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.15s ease;
}

.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg);
  opacity: 0.9;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: rgba(15, 20, 25, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(199, 102, 42, 0.08);
  max-height: 220px;
  overflow-y: auto;
}

.custom-select-option {
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.custom-select-option:hover {
  background: rgba(199, 102, 42, 0.12);
  color: var(--text-primary);
}

.custom-select-option.is-selected {
  background: rgba(199, 102, 42, 0.2);
  color: var(--accent-primary-light);
  font-weight: 600;
}

.search-admin-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.search-admin-section .admin-view-toggle {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.admin-view-toggle--compact .toggle-content {
  gap: 0.75rem;
}

.admin-view-toggle--compact .toggle-info p {
  font-size: 0.8125rem;
}

.search-admin-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary-light);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(199, 102, 42, 0.15);
  border: 1px solid rgba(199, 102, 42, 0.3);
}

.search-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}


.search-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.search-chip {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(199, 102, 42, 0.15);
  border: 1px solid rgba(199, 102, 42, 0.25);
  color: var(--accent-primary-light);
}

.results-header {
  margin-bottom: 1rem;
}

.results-header h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.search-result {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.search-result:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.28);
  transform: translateY(-1px);
}

.result-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.result-ticket {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-primary-light);
}

.result-type-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

.result-type-message {
  background: rgba(199, 102, 42, 0.18);
  color: var(--accent-primary-light);
}

.result-type-ticket {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.result-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-left: auto;
}

.result-content {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.result-content-ticket .result-text-muted {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.result-content-ticket code {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--text-secondary);
}

.result-author {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 0.5rem;
}

.result-author-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.result-text {
  margin: 0.375rem 0 0;
}

.result-content mark {
  background: rgba(199, 102, 42, 0.35);
  color: var(--text-primary);
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
}

.result-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.result-meta .separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

.search-tips {
  padding: 1.5rem 1.75rem;
}

.search-tips h3 {
  margin-bottom: 1rem;
  font-size: 1.0625rem;
}

.search-tips ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-tips li {
  color: var(--text-secondary);
  padding: 0.5rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.search-tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.search-tips code {
  font-size: 0.8125rem;
  background: rgba(199, 102, 42, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--accent-primary-light);
}

/* Transcript View */
.transcript-view {
  max-width: 900px;
  margin: 0 auto;
}

.transcript-header-bar {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.transcript-header-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.transcript-header-logo {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  height: calc(100% + 40px);
  pointer-events: none;
  opacity: 0.45;
}

.transcript-header-logo::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -45%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139, 0, 0, 0.6) 0%, rgba(139, 0, 0, 0.3) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

.transcript-header-logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text-primary);
}

.transcript-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.transcript-title h1 {
  font-size: 1.5rem;
}

.transcript-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.transcript-meta .separator {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Messages Container */
.messages-container {
  padding: 1.5rem;
}

.messages-list {
  display: flex;
  flex-direction: column;
}

.message-group {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 1rem;
  margin: 0 -1rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.message-group:hover {
  background: rgba(199, 102, 42, 0.03);
}

/* Bot messages - no special highlighting, same as user messages */
.message-bot {
  /* No special styling - treat same as regular messages */
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

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

.author-bot {
  color: var(--accent-primary);
}

.bot-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.admin-badge {
  background: #f59e0b;
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

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

.edited-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.message-pin-badge {
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.95;
}

.message-group.message-pinned,
.message-continued.message-pinned {
  border-left: 3px solid #f0b132;
  padding-left: calc(1rem - 3px);
  margin-left: calc(-1rem + 3px);
  background: linear-gradient(90deg, rgba(240, 177, 50, 0.08) 0%, transparent 48%);
}

.message-continued.message-pinned {
  padding-left: calc(1rem - 3px);
  margin-left: calc(-1rem + 3px);
}

.message-continued-pin-row {
  margin-bottom: 0.2rem;
}

.pinned-messages-bar {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.pinned-messages-bar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f0b132;
  margin-bottom: 0.5rem;
}

.pinned-messages-bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pinned-messages-bar-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: rgba(240, 177, 50, 0.06);
  border: 1px solid rgba(240, 177, 50, 0.2);
  transition: background 0.15s, border-color 0.15s;
}

.pinned-messages-bar-link:hover {
  background: rgba(240, 177, 50, 0.12);
  border-color: rgba(240, 177, 50, 0.35);
}

.pinned-messages-bar-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pinned-messages-bar-preview {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}

.message-group[id^='message-'],
.message-continued[id^='message-'] {
  scroll-margin-top: 5.5rem;
}

.deleted-badge {
  font-size: 0.75rem;
  color: #ef4444;
  font-style: italic;
}

/* Deleted Messages */
.message-deleted {
  opacity: 0.6;
}

.message-deleted .message-avatar {
  filter: grayscale(100%);
}

.message-deleted .deleted-content {
  color: var(--text-muted);
  font-style: italic;
}

/* Customer Data in Components */
.component-customer-data {
  background: rgba(199, 102, 42, 0.05);
  border-left: 3px solid var(--accent-primary);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.customer-data-row {
  padding: 0.25rem 0;
  color: var(--text-secondary);
}

.customer-data-row strong {
  color: var(--text-primary);
}

/* Status Notification (Staff hat verifiziert, Kunde hat bestätigt, etc.) */
.status-notification {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(22, 101, 52, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 1rem 1.5rem;
  margin: 0.75rem -1.5rem;
  width: calc(100% + 3rem);
}

.status-notification-text {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.status-notification-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

/* Collapsible Notification (AGB & Datenschutz) */
.collapsible-notification {
  background: rgba(22, 101, 52, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-left: none;
  border-right: none;
  border-radius: 0;
  margin: 0.75rem -1.5rem;
  width: calc(100% + 3rem);
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.collapsible-header:hover {
  background: rgba(22, 101, 52, 0.2);
}

.collapsible-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.collapsible-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.collapsible-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.15rem;
}

.collapsible-arrow {
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.collapsible-notification.expanded .collapsible-arrow {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  background: rgba(15, 20, 25, 0.5);
}

.collapsible-notification.expanded .collapsible-content {
  max-height: 1000px;
  padding: 1rem 1.5rem;
}

.collapsible-customer-data {
  background: rgba(199, 102, 42, 0.1);
  border: 1px solid rgba(199, 102, 42, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.collapsible-customer-data .customer-data-row {
  padding: 0.25rem 0;
  color: var(--text-secondary);
}

.collapsible-customer-data .customer-data-row strong {
  color: var(--text-primary);
}

.collapsible-full-content {
  color: var(--text-secondary);
  line-height: 1.6;
  padding-bottom: 0.5rem;
}

.collapsible-full-content strong {
  color: var(--text-primary);
}

.collapsible-acceptance-info {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.collapsible-acceptance-info .acceptance-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.collapsible-agb-text {
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0.5rem 0;
}

.collapsible-agb-text strong {
  color: var(--text-primary);
}

/* AGB Request with Data Confirmed (green bar + blue collapsible box) */
.data-confirmed-notification {
  margin-bottom: 0;
}

.order-accepted-notification {
  /* Green box for order accepted - standalone, similar to status-notification */
}

.agb-collapsible-box {
  background: rgba(199, 102, 42, 0.15);
  border-top: 1px solid rgba(199, 102, 42, 0.3);
  border-bottom: 1px solid rgba(199, 102, 42, 0.3);
  border-left: none;
  border-right: none;
  margin: 1.25rem -1.5rem 0.75rem -1.5rem;
  width: calc(100% + 3rem);
  overflow: hidden;
}

.agb-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.agb-collapsible-header:hover {
  background: rgba(199, 102, 42, 0.1);
}

.agb-collapsible-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.agb-collapsible-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.agb-collapsible-title .info-icon {
  color: #ffffff;
  flex-shrink: 0;
}

.agb-collapsible-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.15rem;
}

.agb-collapsible-arrow {
  color: var(--accent-primary-light);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.agb-collapsible-box.expanded .agb-collapsible-arrow {
  transform: rotate(180deg);
}

.agb-collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  background: rgba(199, 102, 42, 0.05);
}

.agb-collapsible-box.expanded .agb-collapsible-content {
  max-height: 1000px;
  padding: 1rem 1.5rem;
}

.agb-customer-data {
  background: rgba(199, 102, 42, 0.1);
  border: 1px solid rgba(199, 102, 42, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.agb-customer-data .customer-data-row {
  padding: 0.2rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.agb-customer-data .customer-data-row strong {
  color: var(--text-primary);
}

/* Discord mention style */
.discord-mention {
  background: rgba(199, 102, 42, 0.2);
  color: var(--accent-primary-light);
  padding: 0 0.3rem;
  border-radius: 4px;
  font-weight: 500;
}

.agb-text-content {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.9rem;
}

.agb-text-content strong {
  color: var(--text-primary);
}

.agb-request-notice {
  text-align: center;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(199, 102, 42, 0.2);
}

/* Customer data submitted box (standalone, without green bar) */
.customer-data-box {
  margin: 0.75rem -1.5rem;
}

.customer-data-box .component-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(199, 102, 42, 0.2);
}

/* Order products display */
.order-products {
  background: rgba(199, 102, 42, 0.1);
  border: 1px solid rgba(199, 102, 42, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.order-category {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

.order-category:first-child {
  margin-top: 0;
}

.order-product-row {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.2rem 0 0.2rem 0.5rem;
}

.order-total {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(199, 102, 42, 0.2);
  color: var(--text-primary);
}

.order-acceptance-info {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Order accepted box (green collapsible) */
.order-accepted-box {
  /* Inherits from collapsible-notification (green) */
}

/* Green order products inside order-accepted-box */
.order-accepted-box .order-products {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.order-accepted-box .order-total {
  border-top: 1px solid rgba(34, 197, 94, 0.2);
}

/* Order Status Positions */
.order-status-positions {
  background: rgba(199, 102, 42, 0.1);
  border: 1px solid rgba(199, 102, 42, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.order-status-position {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(199, 102, 42, 0.1);
}

.order-status-position:last-child {
  border-bottom: none;
}

.order-status-position.position-completed {
  color: var(--text-primary);
}

.order-status-position.position-completed .position-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.order-status-position .position-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.order-status-position .position-name {
  flex: 1;
}

.order-status-progress {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(199, 102, 42, 0.2);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.order-status-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

.message-text {
  color: var(--text-secondary);
  line-height: 1.6;
  word-wrap: break-word;
}

.message-text strong {
  color: var(--text-primary);
}

.message-text a {
  color: var(--accent-primary);
  text-decoration: none;
}

.message-text a:hover {
  text-decoration: underline;
}

.message-text pre {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0.5rem 0;
}

.message-text code {
  background: var(--bg-tertiary);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
}

.message-text pre code {
  background: none;
  padding: 0;
}

/* Continued Messages - align with message-group content */
.message-continued {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.25rem 1rem;
  margin: 0 -1rem;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.message-continued:hover {
  background: rgba(199, 102, 42, 0.03);
}

.message-timestamp-hover {
  font-size: 0.65rem;
  color: transparent;
  width: 40px;
  min-width: 40px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.5rem;
  transition: color 0.2s;
}

.message-continued:hover .message-timestamp-hover {
  color: var(--text-muted);
}

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

/* Discord Components */
.discord-component {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem;
  margin: 0.5rem 0;
}

.component-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.component-description {
  color: var(--text-secondary);
  line-height: 1.5;
}

.component-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.component-button {
  background: rgba(199, 102, 42, 0.2);
  color: var(--accent-primary-light);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Discord API Embeds (https://discord.com/developers/resources/message#embed-object) */
.message-embeds {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Discord message.components: Action Row + Button + String Select (Discohook-nah) */
.message-components {
  margin-top: 0.6rem;
  max-width: min(600px, 100%);
}

.message-components-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msg-comp-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.msg-comp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  height: 32px;
  padding: 0 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.2;
}

.msg-comp-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.msg-comp-btn-primary {
  background: #5865f2;
  color: #fff;
}

.msg-comp-btn-primary:hover {
  background: #4752c4;
}

.msg-comp-btn-secondary {
  background: #4e5058;
  color: #fff;
}

.msg-comp-btn-secondary:hover {
  background: #5c5e66;
}

.msg-comp-btn-success {
  background: #248046;
  color: #fff;
}

.msg-comp-btn-success:hover {
  background: #1f703c;
}

.msg-comp-btn-danger {
  background: #da373c;
  color: #fff;
}

.msg-comp-btn-danger:hover {
  background: #c03539;
}

/* Link-Button = Secondary-Look + externes Link-Icon (wie Discord) */
.msg-comp-btn-link-secondary {
  background: rgba(151, 151, 159, 0.16);
  color: #0c0c0e;
  border-color: rgba(151, 151, 159, 0.2);
  cursor: pointer;
}

.msg-comp-btn-link-secondary:hover {
  background: rgba(151, 151, 159, 0.28);
  color: #0c0c0e;
  text-decoration: none;
}

.transcript-view .msg-comp-btn-link-secondary,
.message-content-wrapper .msg-comp-btn-link-secondary {
  color: var(--text-primary, #ebebed);
}

.transcript-view .msg-comp-btn-link-secondary:hover,
.message-content-wrapper .msg-comp-btn-link-secondary:hover {
  color: var(--text-primary, #ebebed);
}

.msg-comp-external-icon {
  flex-shrink: 0;
  margin-left: 0.15rem;
  opacity: 0.9;
}

.msg-comp-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.msg-comp-emoji {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
}

.msg-comp-emoji-unicode {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* String Select */
.msg-comp-select {
  flex: 1 1 200px;
  min-width: min(100%, 200px);
  max-width: 400px;
  position: relative;
}

.msg-comp-select summary::-webkit-details-marker {
  display: none;
}

.msg-comp-select summary {
  list-style: none;
}

.msg-comp-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--bg-tertiary, #2b2d31);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
}

.msg-comp-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.msg-comp-select-placeholder {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #949ba4;
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.transcript-view .msg-comp-select-placeholder,
.message-content-wrapper .msg-comp-select-placeholder {
  color: #949ba4;
}

@media (prefers-color-scheme: light) {
  .msg-comp-select-placeholder {
    color: #5c5e66;
  }
}

.msg-comp-select-chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--text-muted, #949ba4);
  line-height: 1;
  transition: transform 0.15s ease;
}

.msg-comp-select[open] .msg-comp-select-chevron {
  transform: rotate(180deg);
}

.msg-comp-dropdown-panel {
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-tertiary, #2b2d31);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.msg-comp-dropdown-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
  cursor: default;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.msg-comp-dropdown-option:last-child {
  border-bottom: none;
}

.msg-comp-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.msg-comp-opt-emoji {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 1px;
}

.msg-comp-dropdown-opt-ico .msg-comp-emoji-unicode {
  font-size: 1.25rem;
  line-height: 22px;
}

.msg-comp-dropdown-opt-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-comp-dropdown-opt-label {
  font-weight: 500;
  color: var(--text-primary, #f2f3f5);
  line-height: 1.25;
}

.msg-comp-dropdown-opt-desc {
  font-size: 0.8125rem;
  color: var(--text-muted, #b5bac1);
  line-height: 1.3;
}

.msg-comp-select-disabled .msg-comp-select-trigger {
  opacity: 0.55;
  cursor: not-allowed;
}

/* —— Components V2 (CV2) —— */
.cv2-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  max-width: min(520px, 100%);
}

.cv2-container {
  position: relative;
  max-width: 520px;
  border: 1px solid var(--glass-border, #434349);
  border-radius: 8px;
  background: var(--bg-tertiary, #2b2d31);
  padding: 1rem;
  box-sizing: border-box;
}

.cv2-container-accent {
  border-left: 4px solid var(--cv2-accent, #5865f2);
}

.cv2-container-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cv2-text-display {
  line-height: 1.375;
  word-break: break-word;
}

.cv2-text-display-in-container,
.cv2-container .cv2-text-display {
  font-size: 0.875rem;
}

.cv2-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.cv2-section-col-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cv2-section-col-acc--thumb {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: flex-start;
}

.cv2-section-col-acc--button {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: min(50%, 220px);
  min-width: 0;
}

.cv2-section-accessory-btn-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: min(50vw, 220px);
  min-width: 0;
}

.cv2-section-accessory-btn-wrap > .msg-comp-btn,
.cv2-section-accessory-btn-wrap > a.msg-comp-btn-link-secondary {
  max-width: 100%;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  max-height: 32px;
  padding: 0 12px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 1.15;
}

.cv2-section-accessory-btn-wrap .msg-comp-btn-inner {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.cv2-section-accessory-btn-wrap .msg-comp-btn-inner .msg-comp-emoji,
.cv2-section-accessory-btn-wrap .msg-comp-btn-inner .msg-comp-emoji-unicode {
  vertical-align: -0.15em;
}

.cv2-section-accessory-btn-wrap .msg-comp-external-icon {
  flex-shrink: 0;
  display: inline;
  vertical-align: middle;
}

.cv2-section-accessory-btn-wrap a.msg-comp-btn-link-secondary .msg-comp-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow: hidden;
}

.cv2-section-accessory-btn-wrap a.msg-comp-btn-link-secondary .msg-comp-external-icon {
  flex-shrink: 0;
}

.cv2-thumbnail-wrap {
  width: 85px;
  height: 85px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cv2-thumbnail-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cv2-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cv2-orphan-thumb .cv2-thumbnail-wrap {
  margin-top: 0.25rem;
}

.cv2-media-gallery {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  /* Weniger, breitere Kacheln im CV2-Container (~520px): nicht drei schmale Spalten */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.5rem;
}

.cv2-gallery-cell {
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
  min-height: 0;
}

.cv2-gallery-cell > a {
  display: block;
  width: 100%;
  line-height: 0;
}

.cv2-gallery-img {
  width: 100%;
  height: auto;
  max-height: min(320px, 50vh);
  object-fit: cover;
  object-position: center;
  display: block;
}

.cv2-gallery-video .cv2-gallery-vid {
  width: 100%;
  max-height: min(320px, 50vh);
  display: block;
  object-fit: cover;
}

/* Ein Medium: volle Containerbreite, deutlich größer, Seitenverhältnis sichtbar */
.cv2-media-gallery:has(> .cv2-gallery-cell:only-child) {
  grid-template-columns: 1fr;
}

.cv2-media-gallery:has(> .cv2-gallery-cell:only-child) .cv2-gallery-img,
.cv2-media-gallery:has(> .cv2-gallery-cell:only-child) .cv2-gallery-vid {
  max-height: min(520px, 72vh);
  width: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.18);
}

/* Zwei Medien: zwei gleich breite Spalten, quadratische Kacheln wie bei Discord */
.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) .cv2-gallery-cell {
  aspect-ratio: 1;
  max-height: min(360px, 48vw);
}

.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) .cv2-gallery-cell > a {
  height: 100%;
}

.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) .cv2-gallery-video {
  height: 100%;
}

.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) .cv2-gallery-img,
.cv2-media-gallery:has(> .cv2-gallery-cell:nth-child(2):last-child) .cv2-gallery-vid {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.cv2-file {
  margin: 0.15rem 0;
}

.cv2-file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--bg-secondary, #1e1f22);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  max-width: 100%;
}

.cv2-file-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cv2-file-missing {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

.cv2-separator {
  border: none;
  margin: 0;
  padding: 0;
  height: 0;
}

.cv2-separator-visible {
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}

.cv2-separator-hidden {
  border-top-color: transparent;
  height: 0;
}

.cv2-separator-large {
  margin: 0.5rem 0;
}

.discord-embed {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: var(--glass-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  max-width: 520px;
}

.discord-embed-rich,
.discord-embed-image,
.discord-embed-video,
.discord-embed-gifv,
.discord-embed-link,
.discord-embed-article {
  /* type-specific overrides if needed */
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.embed-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.embed-author a {
  color: var(--text-primary);
  text-decoration: none;
}

.embed-author a:hover {
  color: var(--accent-primary);
}

.embed-title-wrap {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.embed-title-link {
  color: var(--accent-primary);
  text-decoration: none;
}

.embed-title-link:hover {
  text-decoration: underline;
}

.embed-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.embed-description strong {
  color: var(--text-primary);
}

.embed-description a {
  color: var(--accent-primary);
  text-decoration: none;
}

.embed-description a:hover {
  text-decoration: underline;
}

/* Oben rechts neben Text (wie Discord-Client); großes image darunter */
.embed-top-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.embed-main-column {
  flex: 1;
  min-width: 0;
}

.embed-thumbnail-aside {
  flex-shrink: 0;
  align-self: flex-start;
  margin: 0;
  line-height: 0;
}

.embed-thumbnail-aside a {
  display: block;
}

.embed-thumbnail-aside img {
  width: 80px;
  height: 80px;
  max-width: 80px;
  max-height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
}

.embed-fields {
  margin: 0.5rem 0;
}

.embed-fields-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.embed-field {
  flex: 1;
  min-width: 120px;
}

.embed-field-block {
  margin-bottom: 0.5rem;
}

.embed-field-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.embed-field-value {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.embed-image {
  margin: 0.5rem 0;
}

.embed-image img {
  display: block;
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  object-fit: contain;
}

.embed-video {
  margin: 0.5rem 0;
}

.embed-video video {
  display: block;
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
}

.embed-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.embed-footer-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.embed-timestamp {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.embed-provider {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.embed-provider a {
  color: inherit;
  text-decoration: none;
}

.embed-provider a:hover {
  text-decoration: underline;
}

.embed-author-name {
  font-weight: 500;
}

.embed-fields-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.embed-field-cell .embed-field-name {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.embed-field-cell .embed-field-value {
  line-height: 1.35;
}

.embed-field-cell .dmd-p {
  margin: 0;
}

.embed-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.embed-gallery-item img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  object-fit: contain;
  vertical-align: middle;
}

.embed-footer-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.embed-footer-sep {
  opacity: 0.7;
}

.embed-footer-text {
  white-space: pre-wrap;
}

/* Discord-Markdown (Discohook-ähnlich) */
.message-text .dmd,
.component-description .dmd,
.embed-description .dmd,
.embed-field-value .dmd {
  line-height: 1.375;
}

.dmd-link {
  color: var(--accent-primary);
  word-break: break-word;
  text-decoration: none;
}

.dmd-link:hover {
  text-decoration: underline;
}

.dmd-code {
  background: var(--bg-secondary);
  padding: 0.1em 0.25em;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: ui-monospace, monospace;
}

.dmd-pre {
  margin: 0.35rem 0;
  max-width: 100%;
  overflow-x: auto;
}

.dmd-codeblock {
  display: block;
  padding: 0.6em 0.75em;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
}

.dmd-blockquote-wrap {
  display: flex;
  gap: 0.5rem;
  margin: 0.35rem 0;
}

.dmd-blockquote-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent-primary);
  opacity: 0.5;
  flex-shrink: 0;
}

.dmd-blockquote {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.dmd-mention {
  background: rgba(88, 101, 242, 0.15);
  color: var(--accent-primary);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 500;
}

.dmd-timestamp {
  background: rgba(128, 128, 128, 0.2);
  padding: 0 3px;
  border-radius: 3px;
  font-size: 0.95em;
}

.dmd-spoiler {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 0 2px;
}

.dmd-emoji {
  width: 1.25em;
  height: 1.25em;
  vertical-align: bottom;
  object-fit: contain;
}

.dmd-heading {
  margin: 0.5rem 0 0.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.dmd-footing {
  font-size: 0.8125em;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.dmd-p {
  margin: 0.15rem 0;
}

.dmd-ul,
.dmd-ol {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.dmd-ul .dmd-ul,
.dmd-ul .dmd-ol,
.dmd-ol .dmd-ul,
.dmd-ol .dmd-ol {
  margin: 0.15rem 0;
}

.dmd-title .dmd-link {
  color: inherit;
}

/* Attachments */
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.attachment {
  border-radius: var(--radius);
  overflow: hidden;
}

.attachment-image {
  max-width: 400px;
}

.attachment-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.attachment-image img:hover {
  opacity: 0.9;
}

.attachment-error {
  display: block;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.attachment-video {
  max-width: 500px;
}

.attachment-video video {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
}

.attachment-file {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
}

.file-download {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.file-download:hover {
  background: rgba(199, 102, 42, 0.1);
  color: var(--text-primary);
}

.file-name {
  font-weight: 500;
}

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

.empty-messages {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Responsive - Tablets (768px) */
@media (max-width: 768px) {
  .navbar-inner {
    padding: 0 1rem;
    height: 3.5rem;
  }

  .nav-center {
    display: none;
  }

  .nav-menu-toggle {
    display: flex;
  }

  .user-dropdown-trigger .username {
    display: none;
  }

  .user-dropdown-trigger .dropdown-arrow {
    display: none;
  }

  .user-dropdown-trigger {
    padding: 0.25rem;
    border-radius: 50%;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .container {
    padding: 1rem;
  }

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

  .search-filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-panel-main {
    flex-wrap: wrap;
  }

  .search-panel-main .btn {
    width: 100%;
  }

  .transcript-grid {
    grid-template-columns: 1fr;
  }

  /* Ticket Table → Card Layout on Mobile */
  .tickets-table {
    font-size: 0.875rem;
  }

  .tickets-table thead {
    display: none;
  }

  .tickets-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .tickets-table tbody tr {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
  }

  .tickets-table tbody tr:hover {
    background: rgba(199, 102, 42, 0.1);
  }

  .tickets-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .tickets-table td:last-child {
    border-bottom: none;
    padding-top: 0.75rem;
    justify-content: flex-end;
  }

  .tickets-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .tickets-table td:last-child::before {
    display: none;
  }

  /* Ticket ID cell - make it prominent */
  .tickets-table .ticket-id-cell {
    font-size: 1rem;
    font-weight: 600;
  }

  .message-group {
    gap: 0.75rem;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
  }

  .message-timestamp-hover {
    width: 32px;
    min-width: 32px;
  }

  .attachment-image {
    max-width: 100%;
  }

  .attachment-video {
    max-width: 100%;
  }
}

/* Page Headers */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Filter Bar Right Section */
.filter-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* View Toggle */
.view-toggle {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: calc(var(--radius) - 4px);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.view-btn:hover {
  color: var(--text-primary);
  background: rgba(199, 102, 42, 0.1);
}

.view-btn.active {
  background: var(--accent-primary);
  color: white;
}

/* Tickets Grid */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ticket-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.ticket-card:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
  transform: translateY(-2px);
}

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

.ticket-card-id {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-primary);
}

.ticket-card-body {
  flex: 1;
  margin-bottom: 1rem;
}

.ticket-card-category {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.ticket-card-server {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.ticket-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}

.ticket-card-messages {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.ticket-card-date {
  color: var(--text-muted);
}

/* Responsive for tickets grid */
@media (max-width: 768px) {
  .tickets-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .filter-tabs {
    justify-content: center;
  }

  .filter-right {
    justify-content: space-between;
  }
}

/* Delivery Celebration Box */
.delivery-celebration-box {
  position: relative;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-top: 1px solid rgba(34, 197, 94, 0.3);
  border-bottom: 1px solid rgba(34, 197, 94, 0.3);
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  margin: 1rem -1.5rem;
  width: calc(100% + 3rem);
  overflow: hidden;
  transition: all 0.3s ease;
}

.delivery-celebration-box:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.2) 100%);
}

.delivery-celebration-box .confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.delivery-header {
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
  text-align: center;
}

.delivery-header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.delivery-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.delivery-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.delivery-content {
  position: relative;
  z-index: 2;
}

.delivery-info {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.delivery-info .customer-data-row {
  padding: 0.25rem 0;
  color: rgba(255, 255, 255, 0.85);
}

.delivery-info .customer-data-row strong {
  color: #ffffff;
}

.delivery-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.delivery-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  text-decoration: none;
  color: white;
}

.delivery-button svg {
  stroke: white;
}

/* Payment Link Button */
.payment-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(199, 102, 42, 0.3);
  margin-top: 0.5rem;
}

.payment-link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(199, 102, 42, 0.5);
  background: linear-gradient(135deg, var(--accent-primary-light) 0%, var(--accent-primary-dark) 100%);
  text-decoration: none;
  color: white;
}

.payment-link-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(199, 102, 42, 0.4);
}

/* Ticket Closed Notification (Red box with info icon) */
.ticket-closed-notification {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(239, 68, 68, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 1rem 1.5rem;
  margin: 0.75rem -1.5rem;
  width: calc(100% + 3rem);
}

.ticket-closed-notification .closed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.ticket-closed-notification .closed-icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
}

.ticket-closed-notification-text {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

.ticket-closed-notification-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

.ticket-closed-notification .component-actions {
  margin-top: 0.75rem;
}

.ticket-closed-notification .component-button {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Legacy Ticket Warning */
.legacy-ticket-warning {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  background: rgba(234, 179, 8, 0.1);
  border: 2px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.1);
}

.legacy-ticket-warning .warning-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.legacy-ticket-warning .warning-content {
  flex: 1;
}

.legacy-ticket-warning .warning-content strong {
  display: block;
  color: var(--accent-warning);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.legacy-ticket-warning .warning-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* ==========================================
   MOBILE RESPONSIVE STYLES
   ========================================== */

/* Large Phones / Small Tablets (640px) */
@media (max-width: 640px) {
  /* Filter Bar - Stack vertically */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-right {
    justify-content: space-between;
  }

  /* Page Headers */
  .page-header h1 {
    font-size: 1.5rem;
  }

  /* Tickets Grid */
  .tickets-grid {
    grid-template-columns: 1fr;
  }
}

/* Smartphones (480px) */
@media (max-width: 480px) {
  /* Navigation */
  .navbar-inner {
    padding: 0 0.875rem;
    height: 3.25rem;
  }

  .nav-logo-text {
    font-size: 1rem;
  }

  .nav-logo-img {
    width: 1.875rem;
    height: 1.875rem;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .dash-admin-row {
    grid-template-columns: 1fr;
  }

  .dash-main-grid {
    grid-template-columns: 1fr;
  }

  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .dash-hero h1 {
    font-size: 1.5rem;
  }

  .user-dropdown-menu {
    width: min(280px, calc(100vw - 1.5rem));
    right: 0;
  }

  /* Container & Cards */
  .container {
    padding: 0.75rem;
  }

  .glass-card {
    padding: 1.25rem;
  }

  .messages-container {
    padding: 1rem;
  }

  /* Transcript Header */
  .transcript-header-bar {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .transcript-header-info {
    width: 100%;
  }

  .transcript-header-logo {
    display: none;
  }

  .transcript-meta {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  .transcript-meta .separator {
    display: none;
  }

  .transcript-meta > span {
    display: block;
    width: 100%;
  }

  .transcript-title h1 {
    font-size: 1.25rem;
  }

  .back-link {
    font-size: 0.875rem;
  }

  /* Grids - Full Width */
  .transcript-grid,
  .tickets-grid,
  .stats-grid,
  .features-section,
  .dashboard-actions {
    grid-template-columns: 1fr;
  }

  /* Message View */
  .message-group {
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin: 0 -0.5rem;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
  }

  .message-header {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  .message-timestamp-hover {
    display: none;
  }

  .message-content {
    font-size: 0.9rem;
  }

  .message-continued {
    padding-left: 0;
    margin-left: 40px;
  }

  /* Attachments */
  .attachment-image,
  .attachment-video {
    max-width: 100%;
  }

  .attachment-grid {
    grid-template-columns: 1fr;
  }

  /* Hero Section */
  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .hero-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
  }

  /* Special Boxes */
  .status-notification {
    padding: 0.75rem 1rem;
    margin: 0.5rem -1rem;
    width: calc(100% + 2rem);
  }

  .ticket-closed-notification {
    padding: 0.75rem 1rem;
    margin: 0.5rem -1rem;
    width: calc(100% + 2rem);
  }

  .welcome-box {
    padding: 1rem;
  }

  .legacy-ticket-warning {
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
  }

  /* Cookie Banner */
  .cookie-banner {
    padding: 1rem;
  }

  .cookie-banner-content {
    font-size: 0.875rem;
  }

  .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .cookie-banner-actions button {
    width: 100%;
  }

  /* Cookie Declined Notice */
  .cookie-declined-content {
    padding: 1.5rem 1rem;
    margin: 1rem;
    width: calc(100% - 2rem);
    max-width: none;
  }

  /* Feature Cards */
  .feature-card {
    padding: 1.25rem;
  }

  /* Stat Cards */
  .stat-card {
    padding: 1rem;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
  }

  /* Section Headers */
  .section-header h2 {
    font-size: 1rem;
  }

  /* Transcript Cards */
  .transcript-card {
    padding: 1rem;
  }

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

  /* Ticket Cards */
  .ticket-card {
    padding: 1rem;
  }

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

  /* Search */
  .search-filters {
    grid-template-columns: 1fr;
  }

  .result-status {
    margin-left: 0;
  }

  .search-input {
    width: 100%;
  }

  /* Component Discord Boxes */
  .component-box {
    padding: 1rem;
  }

  /* Order Box */
  .order-box {
    padding: 1rem;
  }

  /* AGB Box */
  .agb-box {
    padding: 1rem;
  }

  /* Delivery Box */
  .delivery-box {
    padding: 1rem;
  }

  .delivery-files-grid {
    grid-template-columns: 1fr;
  }

  /* Info Box */
  .info-box {
    padding: 1rem;
  }

  /* View Toggle - Smaller buttons */
  .view-btn {
    width: 32px;
    height: 32px;
  }

  /* Filter Tabs - Smaller */
  .filter-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Empty State */
  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state svg {
    width: 48px;
    height: 48px;
  }

  .empty-state h3 {
    font-size: 1.1rem;
  }
}

/* Extra Small Devices (360px) - e.g. Samsung Galaxy S series base */
@media (max-width: 360px) {
  .container {
    padding: 0.5rem;
  }

  .glass-card {
    padding: 1rem;
  }

  .transcript-title h1 {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
  }

  .message-continued {
    margin-left: 36px;
  }

  .navbar-inner {
    padding: 0 0.75rem;
  }

  .nav-logo-text {
    font-size: 0.9375rem;
  }
}

/* ==========================================
   KNOWLEDGE BASE STYLES
   ========================================== */

/* Modal Open State */
body.modal-open {
  overflow: hidden;
}

/* Admin Tools Section */
.admin-tools {
  margin-top: 1rem;
  padding: 1rem 1.5rem;
}

.admin-tools-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.admin-tools-header svg {
  color: var(--accent-primary);
}

.admin-tools-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* KB Modal Overlay */
.kb-modal-overlay,
.kb-chat-overlay,
.kb-processing-overlay,
.kb-entry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.kb-modal-overlay.hidden,
.kb-chat-overlay.hidden,
.kb-processing-overlay.hidden,
.kb-entry-overlay.hidden {
  display: none;
}

/* KB Modal */
.kb-modal,
.kb-chat-modal,
.kb-processing-modal,
.kb-entry-modal {
  background: rgba(12, 14, 18, 0.98);
  border: 1px solid rgba(199, 102, 42, 0.2);
  border-radius: 1rem;
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(199, 102, 42, 0.08);
  overflow: hidden;
}

.kb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(199, 102, 42, 0.14) 0%, rgba(12, 14, 18, 0.4) 55%);
  flex-shrink: 0;
}

.kb-modal-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.kb-modal-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5625rem;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(199, 102, 42, 0.3);
}

.kb-modal-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.kb-modal-subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.kb-modal-header h2 svg {
  color: var(--accent-primary-light);
  flex-shrink: 0;
}

.kb-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.kb-modal-close:hover {
  background: rgba(199, 102, 42, 0.15);
  border-color: rgba(199, 102, 42, 0.3);
  color: var(--text-primary);
}

/* KB Tabs */
.kb-modal-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

.kb-modal-tabs::-webkit-scrollbar {
  display: none;
}

.kb-tab {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.kb-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.kb-tab.active {
  background: rgba(199, 102, 42, 0.2);
  border-color: rgba(199, 102, 42, 0.35);
  color: var(--accent-primary-light);
  box-shadow: inset 0 0 0 1px rgba(199, 102, 42, 0.15);
}

.kb-tab-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.125rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kb-tab.active .kb-tab-badge {
  background: rgba(199, 102, 42, 0.35);
  color: #fff;
}

/* KB Modal Content */
.kb-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.kb-tab-content {
  display: none;
}

.kb-tab-content.active {
  display: block;
}

/* KB Stats Bar */
.kb-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(199, 102, 42, 0.08);
  border: 1px solid rgba(199, 102, 42, 0.18);
  border-radius: 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.kb-swipe-mode-btn {
  white-space: nowrap;
}

/* KB Loading */
.kb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.kb-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(199, 102, 42, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* KB Empty & Error States */
.kb-empty,
.kb-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.kb-error {
  color: var(--accent-danger);
}

/* KB Pending Filters */
.kb-pending-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.kb-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kb-filter-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* KB styled selects (custom appearance) */
.kb-modal select,
.kb-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 0.5rem center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 120px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kb-modal select:hover,
.kb-select:hover {
  border-color: rgba(199, 102, 42, 0.35);
}

.kb-modal select:focus,
.kb-select:focus {
  outline: none;
  border-color: rgba(199, 102, 42, 0.5);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.12);
}

.kb-filter-group select {
  min-width: 130px;
}

/* KB Pending List */
.kb-pending-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kb-pending-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.625rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.kb-pending-item:hover {
  background: rgba(199, 102, 42, 0.06);
  border-color: rgba(199, 102, 42, 0.25);
  transform: translateY(-1px);
}

/* Score Badge */
.kb-pending-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  flex-shrink: 0;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.kb-pending-score.score-high {
  background: linear-gradient(145deg, #22c55e, #16a34a);
}

.kb-pending-score.score-mid {
  background: linear-gradient(145deg, #eab308, #ca8a04);
}

.kb-pending-score.score-low {
  background: linear-gradient(145deg, #ef4444, #dc2626);
}

.kb-pending-info {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

.kb-pending-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kb-pending-id {
  font-weight: 600;
  color: var(--accent-primary);
}

.kb-pending-category {
  background: rgba(199, 102, 42, 0.15);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--accent-primary-light);
}

.kb-pending-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.kb-pending-messages,
.kb-pending-length,
.kb-pending-ratio,
.kb-pending-date {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.kb-pending-messages svg,
.kb-pending-length svg,
.kb-pending-ratio svg {
  opacity: 0.6;
}

.kb-pending-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* KB Entries */
.kb-entries-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kb-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  flex: 1;
  max-width: 400px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kb-search-box:focus-within {
  border-color: rgba(199, 102, 42, 0.4);
  box-shadow: 0 0 0 3px rgba(199, 102, 42, 0.1);
}

.kb-search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
  outline: none;
}

.kb-search-box svg {
  color: var(--text-muted);
}

.kb-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kb-entry-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(199, 102, 42, 0.45);
  border-radius: 0.625rem;
  gap: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.kb-entry-item:hover {
  background: rgba(199, 102, 42, 0.05);
  border-color: rgba(199, 102, 42, 0.2);
  border-left-color: var(--accent-primary);
}

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

.kb-entry-question,
.kb-entry-answer {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kb-entry-question strong,
.kb-entry-answer strong {
  color: var(--text-primary);
}

.kb-entry-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.kb-badge {
  background: rgba(199, 102, 42, 0.15);
  color: var(--accent-primary-light);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.kb-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* KB Staff */
.kb-staff-banner {
  padding: 0.75rem 1rem;
  background: rgba(199, 102, 42, 0.08);
  border: 1px solid rgba(199, 102, 42, 0.18);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.kb-staff-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.625rem;
}

.kb-staff-form input {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
}

.kb-staff-form input:focus {
  outline: none;
  border-color: rgba(199, 102, 42, 0.4);
}

.kb-staff-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kb-staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}

.kb-staff-item:hover {
  background: rgba(199, 102, 42, 0.05);
}

.kb-staff-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.kb-staff-name {
  font-weight: 500;
  color: var(--text-primary);
}

.kb-staff-id {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kb-staff-rank {
  background: rgba(199, 102, 42, 0.15);
  color: var(--accent-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* KB Settings */
.kb-settings-section {
  margin-bottom: 1rem;
  padding: 1rem 1.125rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.625rem;
}

.kb-settings-section h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  color: var(--accent-primary-light);
}

.kb-select,
.kb-textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
}

.kb-textarea {
  resize: vertical;
  min-height: 100px;
}

.kb-settings-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.kb-export-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* KB Pagination */
.kb-pagination {
  margin-top: 1rem;
}

.kb-pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.kb-page-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.kb-page-btn:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: rgba(199, 102, 42, 0.2);
}

.kb-page-info {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.kb-processing-modal,
.kb-entry-modal {
  max-width: 720px;
  max-height: 82vh;
}

.kb-processing-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.kb-processing-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.kb-processing-actions.hidden {
  display: none;
}

/* KB Pairs List */
.kb-pairs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kb-pair-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.125rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.625rem;
  transition: background 0.15s ease;
}

.kb-pair-item:hover {
  background: rgba(199, 102, 42, 0.05);
}

.kb-pair-checkbox {
  display: flex;
  align-items: flex-start;
  padding-top: 0.25rem;
}

.kb-pair-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.kb-pair-content {
  flex: 1;
}

.kb-pair-question,
.kb-pair-answer {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kb-pair-question strong,
.kb-pair-answer strong {
  color: var(--text-primary);
}

.kb-pair-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* KB Entry Modal Form */
.kb-entry-form {
  padding: 1.5rem;
}

.kb-form-group {
  margin-bottom: 1rem;
}

.kb-form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.kb-form-group input,
.kb-form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
}

.kb-form-group textarea {
  resize: vertical;
}

.kb-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* KB Chat Modal – sizing (visuals via shared modal rule) */
.kb-chat-modal {
  max-width: 620px;
  height: 80vh;
  max-height: 700px;
}

.kb-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* KB Chat Messages */
.kb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kb-chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  height: 100%;
}

.kb-chat-welcome svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.kb-chat-welcome h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.kb-chat-message {
  display: flex;
  max-width: 85%;
}

.kb-chat-message.user {
  margin-left: auto;
}

.kb-chat-message.assistant {
  margin-right: auto;
}

.kb-chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.kb-chat-message.user .kb-chat-bubble {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(199, 102, 42, 0.25);
}

.kb-chat-message.assistant .kb-chat-bubble {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

/* KB Typing Dots */
.kb-typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.25rem 0;
}

.kb-typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite both;
}

.kb-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.kb-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 80%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* KB Chat Input */
.kb-chat-input-container {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
}

.kb-chat-input-container textarea {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  outline: none;
}

.kb-chat-input-container textarea:focus {
  border-color: var(--accent-primary);
}

.kb-chat-send {
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.kb-chat-send:hover {
  background: var(--accent-primary-dark);
  transform: scale(1.05);
}

.kb-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* KB Chat Footer */
.kb-chat-footer {
  padding: 0.5rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
}

/* Danger Button */
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* KB Responsive */
@media (max-width: 768px) {
  .kb-modal,
  .kb-chat-modal,
  .kb-processing-modal,
  .kb-entry-modal {
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    width: 100%;
    border-radius: 0;
  }

  .kb-modal-header {
    padding: 1rem;
  }

  .kb-modal-header h2 {
    font-size: 1.1rem;
  }

  .kb-modal-tabs {
    padding: 0.5rem 0.75rem;
    gap: 0.125rem;
  }

  .kb-tab {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }

  .kb-tab-badge {
    padding: 0.0625rem 0.375rem;
    font-size: 0.675rem;
  }

  .kb-modal-content {
    padding: 1rem;
  }

  .kb-stats-bar {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.75rem;
  }

  .kb-pending-filters {
    flex-direction: column;
    gap: 0.75rem;
  }

  .kb-filter-group {
    width: 100%;
  }

  .kb-filter-group select {
    width: 100%;
  }

  .kb-pending-list {
    gap: 0.75rem;
  }

  .kb-pending-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
  }

  .kb-pending-score {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .kb-pending-info {
    flex: 1;
    min-width: calc(100% - 56px);
  }

  .kb-pending-stats {
    gap: 0.5rem;
  }

  .kb-pending-stats > span {
    font-size: 0.75rem;
  }

  .kb-pending-id {
    font-size: 0.9rem;
  }

  .kb-pending-actions {
    width: 100%;
    justify-content: stretch;
  }

  .kb-pending-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .kb-entries-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .kb-search-box {
    max-width: none;
  }

  .kb-entries-list {
    gap: 0.75rem;
  }

  .kb-entry-item {
    flex-direction: column;
    padding: 0.875rem;
  }

  .kb-entry-content {
    width: 100%;
  }

  .kb-entry-question,
  .kb-entry-answer {
    font-size: 0.85rem;
  }

  .kb-entry-meta {
    margin-top: 0.5rem;
    flex-wrap: wrap;
  }

  .kb-entry-actions {
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
  }

  .kb-staff-form {
    flex-direction: column;
    gap: 0.75rem;
  }

  .kb-staff-form input,
  .kb-staff-form select {
    width: 100%;
  }

  .kb-staff-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .kb-staff-item .btn {
    align-self: flex-end;
  }

  .kb-settings-section {
    padding: 1rem;
  }

  .kb-settings-section h3 {
    font-size: 0.95rem;
  }

  .kb-textarea {
    min-height: 120px;
    font-size: 0.85rem;
  }

  .kb-settings-actions {
    flex-direction: column;
  }

  .kb-settings-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .kb-export-buttons {
    flex-direction: column;
  }

  .kb-export-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .kb-pagination {
    padding: 0.75rem;
  }

  .kb-pagination-inner {
    flex-direction: column;
    gap: 0.75rem;
  }

  .kb-page-btn {
    padding: 0.5rem 0.875rem;
  }

  /* Processing Modal Mobile */
  .kb-processing-modal,
  .kb-entry-modal {
    max-width: 100%;
  }

  .kb-processing-content {
    padding: 1rem;
  }

  .kb-pairs-list {
    gap: 0.75rem;
  }

  .kb-pair-item {
    padding: 0.875rem;
  }

  .kb-pair-checkbox {
    align-items: flex-start;
  }

  .kb-pair-content {
    width: 100%;
  }

  .kb-pair-question,
  .kb-pair-answer {
    font-size: 0.85rem;
  }

  .kb-processing-actions {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .kb-processing-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Entry Form Mobile */
  .kb-entry-form {
    padding: 1rem;
  }

  .kb-form-group input,
  .kb-form-group textarea {
    font-size: 0.9rem;
  }

  .kb-form-group textarea {
    min-height: 100px;
  }

  /* Chat Modal Mobile */
  .kb-chat-modal {
    max-width: 100%;
  }

  .kb-chat-header-actions {
    gap: 0.25rem;
  }

  .kb-chat-header-actions .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  .kb-chat-messages {
    padding: 1rem;
  }

  .kb-chat-welcome {
    padding: 1.5rem;
  }

  .kb-chat-welcome svg {
    width: 40px;
    height: 40px;
  }

  .kb-chat-welcome h3 {
    font-size: 1rem;
  }

  .kb-chat-welcome p {
    font-size: 0.85rem;
  }

  .kb-chat-message {
    max-width: 90%;
  }

  .kb-chat-bubble {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .kb-chat-input-container {
    padding: 0.75rem;
  }

  .kb-chat-input-container textarea {
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
    min-height: 44px;
  }

  .kb-chat-send {
    width: 44px;
    height: 44px;
  }

  .kb-chat-footer {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .admin-tools-buttons {
    flex-direction: column;
  }

  .admin-tool-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .kb-tab {
    padding: 0.375rem 0.5rem;
    font-size: 0.7rem;
  }

  .kb-tab svg {
    width: 14px;
    height: 14px;
  }

  .kb-tab-badge {
    display: none;
  }

  .kb-stats-bar span {
    text-align: center;
  }

  .kb-pending-id {
    font-size: 0.85rem;
  }

  .kb-pending-category {
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
  }

  .kb-pending-messages,
  .kb-pending-date {
    font-size: 0.75rem;
  }

  .kb-entry-question,
  .kb-entry-answer {
    font-size: 0.8rem;
  }

  .kb-badge {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
  }

  .kb-chat-bubble {
    font-size: 0.85rem;
    padding: 0.625rem 0.875rem;
  }
}

/* KB Stats Bar with Swipe Button */
.kb-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kb-swipe-mode-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.kb-swipe-mode-btn:hover {
  background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-primary));
  transform: translateY(-1px);
}

.kb-swipe-mode-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   KB Swipe Mode - Tinder-Style Q&A Approval
   ============================================ */

body.swipe-mode-open {
  overflow: hidden;
}

.kb-swipe-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

/* Hidden state for swipe elements */
.kb-swipe-empty.hidden,
.kb-swipe-card-container.hidden,
.kb-swipe-indicator.hidden,
.kb-swipe-leaderboard.hidden,
.kb-swipe-edit-overlay.hidden,
.kb-swipe-loading.hidden,
.kb-swipe-summary.hidden {
  display: none !important;
}

/* Swipe Header */
.kb-swipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}

.kb-swipe-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kb-swipe-header-left h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.kb-swipe-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.kb-swipe-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.kb-swipe-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kb-swipe-counter {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.kb-swipe-leaderboard-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.kb-swipe-leaderboard-btn:hover {
  background: rgba(199, 102, 42, 0.1);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Progress Bar */
.kb-swipe-progress-container {
  height: 4px;
  background: var(--bg-tertiary);
}

.kb-swipe-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
  transition: width 0.3s ease;
}

/* Main Card Area */
.kb-swipe-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.kb-swipe-loading {
  text-align: center;
  color: var(--text-secondary);
}

.kb-swipe-loading p {
  margin-top: 1rem;
}

.kb-swipe-empty {
  text-align: center;
  color: var(--text-secondary);
}

.kb-swipe-empty svg {
  color: var(--accent-success);
  margin-bottom: 1rem;
}

.kb-swipe-empty h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.kb-swipe-empty p {
  margin-bottom: 1.5rem;
}

/* Card Container */
.kb-swipe-card-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  perspective: 1000px;
}

/* Main Card */
.kb-swipe-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center center;
}

.kb-swipe-card.swiping-left {
  transform: translateX(-150%) rotate(-30deg);
  opacity: 0;
}

.kb-swipe-card.swiping-right {
  transform: translateX(150%) rotate(30deg);
  opacity: 0;
}

.kb-swipe-card.entering {
  animation: cardEnter 0.3s ease;
}

@keyframes cardEnter {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Card Header */
.kb-swipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kb-swipe-ticket-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.kb-swipe-ticket-id {
  font-weight: 600;
  color: var(--accent-primary);
}

.kb-swipe-divider {
  color: var(--text-muted);
}

.kb-swipe-category {
  background: rgba(199, 102, 42, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.kb-swipe-qa-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.kb-swipe-card-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 1rem 0;
}

/* Card Sections */
.kb-swipe-section {
  margin-bottom: 1rem;
}

.kb-swipe-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kb-swipe-icon {
  font-size: 1rem;
}

.kb-swipe-question,
.kb-swipe-answer {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.kb-swipe-question {
  font-style: italic;
}

/* Swipe Indicators */
.kb-swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.25rem;
  pointer-events: none;
  opacity: 0.9;
  animation: indicatorPulse 0.3s ease;
}

@keyframes indicatorPulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.1); }
}

.kb-swipe-indicator-left {
  left: 2rem;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid var(--accent-danger);
  color: var(--accent-danger);
}

.kb-swipe-indicator-right {
  right: 2rem;
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid var(--accent-success);
  color: var(--accent-success);
}

/* Action Buttons */
.kb-swipe-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
}

.kb-swipe-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.kb-swipe-btn-icon {
  font-size: 1.5rem;
}

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

.kb-swipe-btn-key {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.kb-swipe-btn-reject:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-danger);
}

.kb-swipe-btn-reject:hover .kb-swipe-btn-label {
  color: var(--accent-danger);
}

.kb-swipe-btn-approve:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--accent-success);
}

.kb-swipe-btn-approve:hover .kb-swipe-btn-label {
  color: var(--accent-success);
}

.kb-swipe-btn-edit:hover {
  background: rgba(199, 102, 42, 0.1);
  border-color: var(--accent-primary);
}

.kb-swipe-btn-edit:hover .kb-swipe-btn-label {
  color: var(--accent-primary);
}

.kb-swipe-btn-skip:hover {
  background: rgba(234, 179, 8, 0.1);
  border-color: var(--accent-warning);
}

.kb-swipe-btn-skip:hover .kb-swipe-btn-label {
  color: var(--accent-warning);
}

/* Footer Stats */
.kb-swipe-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
}

.kb-swipe-streak {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.kb-swipe-streak-icon {
  font-size: 1.25rem;
}

.kb-swipe-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.kb-swipe-undo-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.kb-swipe-undo-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

.kb-swipe-undo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toast Notifications */
.kb-swipe-toasts {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.kb-swipe-toast {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  animation: toastSlideIn 0.3s ease;
}

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

.kb-swipe-toast.fade-out {
  animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastFadeOut {
  to {
    transform: translateY(-10px);
    opacity: 0;
  }
}

.kb-swipe-toast-info {
  background: rgba(199, 102, 42, 0.9);
  color: white;
}

.kb-swipe-toast-success {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.kb-swipe-toast-warning {
  background: rgba(234, 179, 8, 0.9);
  color: black;
}

.kb-swipe-toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

/* Leaderboard Panel */
.kb-swipe-leaderboard {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  width: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  z-index: 10002;
}

.kb-swipe-leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.kb-swipe-leaderboard-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.kb-swipe-leaderboard-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.kb-swipe-leaderboard-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.kb-swipe-leaderboard-list {
  padding: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.kb-swipe-leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}

.kb-swipe-leaderboard-item.kb-swipe-leaderboard-me {
  background: rgba(199, 102, 42, 0.1);
  border: 1px solid rgba(199, 102, 42, 0.2);
}

.kb-swipe-lb-rank {
  font-size: 1.1rem;
  width: 30px;
  text-align: center;
}

.kb-swipe-lb-name {
  flex: 1;
  font-weight: 500;
}

.kb-swipe-lb-approved {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Edit Modal */
.kb-swipe-edit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10003;
  padding: 1rem;
}

.kb-swipe-edit-modal {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  backdrop-filter: blur(20px);
}

.kb-swipe-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.kb-swipe-edit-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.kb-swipe-edit-form {
  padding: 1.5rem;
}

.kb-swipe-edit-form .kb-form-group {
  margin-bottom: 1rem;
}

.kb-swipe-edit-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kb-swipe-edit-form textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.kb-swipe-edit-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.kb-swipe-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .kb-swipe-header {
    padding: 0.75rem 1rem;
  }

  .kb-swipe-header-left h2 {
    font-size: 1rem;
  }

  .kb-swipe-main {
    padding: 1rem;
  }

  .kb-swipe-card {
    padding: 1rem;
  }

  .kb-swipe-ticket-info {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .kb-swipe-actions {
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .kb-swipe-btn {
    padding: 0.5rem 0.75rem;
    min-width: 60px;
  }

  .kb-swipe-btn-icon {
    font-size: 1.25rem;
  }

  .kb-swipe-btn-label {
    font-size: 0.6rem;
  }

  .kb-swipe-btn-key {
    display: none;
  }

  .kb-swipe-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .kb-swipe-leaderboard {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
  }

  .kb-swipe-indicator {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  .kb-swipe-indicator-left {
    left: 0.5rem;
  }

  .kb-swipe-indicator-right {
    right: 0.5rem;
  }
}

