/**
 * ALVIRAN Ticket Frontend Styles
 * Version: 12.0.0 - Dashboard-Aligned Redesign
 *
 * Performance: This file is now cacheable by browsers!
 */

/* ============================================
   RESET & VARIABLES
   ============================================ */
#alv-ticket-app,
#alv-ticket-app * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#alv-ticket-app {
  /* ── Colors ── */
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dark: #7c3aed;
  --gold: #f9c86c;
  --gold-dark: #f59e0b;
  --green: #34d399;
  --bg: #0a0a0f;
  --text: #f3f1fa;
  --text-muted: rgba(243, 241, 250, 0.6);
  --text-dim: rgba(243, 241, 250, 0.35);
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.15);

  /* ── New Dashboard tokens ── */
  --brand-glow: rgba(139, 92, 246, 0.15);
  --border-brand: rgba(139, 92, 246, 0.2);
  --surface-active: rgba(139, 92, 246, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* ── Spacing ── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;

  /* ── Radius (Dashboard-aligned) ── */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-btn: 14px;
  --radius-full: 999px;

  font-family:
    "Inter",
    "Outfit",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

#alv-ticket-app.alv-ready {
  opacity: 1;
}

/* ============================================
   BACKGROUND (Animated blobs)
   ============================================ */
#alv-ticket-app .alv-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  overflow: hidden;
}

#alv-ticket-app .alv-bg::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  filter: blur(50px);
  animation: alv-bgFloat1 25s ease-in-out infinite;
  will-change: transform;
}

#alv-ticket-app .alv-bg::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(249, 200, 108, 0.08) 0%, transparent 70%);
  filter: blur(50px);
  animation: alv-bgFloat2 30s ease-in-out infinite;
  will-change: transform;
}

@keyframes alv-bgFloat1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(5%, 10%) scale(1.1);
  }
}

@keyframes alv-bgFloat2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-5%, -10%) scale(1.05);
  }
}

/* ============================================
   SKELETON LOADING
   ============================================ */
#alv-ticket-app .alv-skeleton-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#alv-ticket-app .alv-skeleton-wrapper.hidden {
  display: none;
}

/* Skeleton base element */
#alv-ticket-app [class*="alv-skeleton-"]:not(.alv-skeleton-wrapper):not(.alv-skeleton-grid):not(.alv-skeleton-messages):not(.alv-skeleton-meta):not(.alv-skeleton-sidebar):not(.alv-skeleton-steps) {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.08) 50%,
      rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
  animation: alv-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes alv-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Header skeleton */
#alv-ticket-app .alv-skeleton-header {
  margin-bottom: 1.25rem;
}

#alv-ticket-app .alv-skeleton-title {
  width: 280px;
  height: 32px;
  margin-bottom: 12px;
}

#alv-ticket-app .alv-skeleton-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

#alv-ticket-app .alv-skeleton-badge {
  width: 80px;
  height: 28px;
  border-radius: 999px;
}

#alv-ticket-app .alv-skeleton-text-sm {
  width: 120px;
  height: 18px;
}

/* Steps skeleton */
#alv-ticket-app .alv-skeleton-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

#alv-ticket-app .alv-skeleton-step {
  height: 60px;
  border-radius: 12px;
}

/* Grid skeleton */
#alv-ticket-app .alv-skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}

/* Chat skeleton */
#alv-ticket-app .alv-skeleton-chat {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

#alv-ticket-app .alv-skeleton-chat-header {
  height: 52px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#alv-ticket-app .alv-skeleton-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

#alv-ticket-app .alv-skeleton-msg {
  height: 60px;
  max-width: 70%;
  border-radius: 12px;
}

#alv-ticket-app .alv-skeleton-msg-left {
  align-self: flex-start;
}

#alv-ticket-app .alv-skeleton-msg-right {
  align-self: flex-end;
}

#alv-ticket-app .alv-skeleton-input {
  height: 52px;
  margin: 1rem;
  border-radius: 10px;
}

/* Sidebar skeleton */
#alv-ticket-app .alv-skeleton-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#alv-ticket-app .alv-skeleton-payment {
  height: 200px;
  border-radius: 16px;
}

#alv-ticket-app .alv-skeleton-details {
  height: 180px;
  border-radius: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  #alv-ticket-app .alv-skeleton-grid {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-skeleton-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: kill backdrop-filter on always-visible elements */
@media (max-width: 768px) {
  #alv-ticket-app .alv-panel,
  #alv-ticket-app .alv-btn-secondary,
  #alv-ticket-app .alv-inline-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Keep old spinner for fallback */
@keyframes alv-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   LAYOUT
   ============================================ */
#alv-ticket-app .alv-main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

#alv-ticket-app .font-display {
  font-family: "Outfit", system-ui, sans-serif;
}

#alv-ticket-app .alv-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  position: relative;
}

/* ============================================
   PANELS
   ============================================ */
#alv-ticket-app .alv-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .25s, box-shadow .25s;
}

#alv-ticket-app .alv-panel:hover {
  border-color: var(--border-light);
}

/* Gradient variant (payment panel) */
#alv-ticket-app .alv-panel-gradient {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 100%);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

#alv-ticket-app .alv-panel-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

#alv-ticket-app .alv-panel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

#alv-ticket-app .alv-panel-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

#alv-ticket-app .alv-panel-body {
  padding: 1.25rem;
}

/* ============================================
   ICON BOXES
   ============================================ */
#alv-ticket-app .icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#alv-ticket-app .icon-box svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

#alv-ticket-app .icon-box-purple {
  background: rgba(139, 92, 246, 0.12);
}

#alv-ticket-app .icon-box-purple svg {
  stroke: var(--purple-light);
}

#alv-ticket-app .icon-box-gold {
  background: rgba(249, 200, 108, 0.12);
}

#alv-ticket-app .icon-box-gold svg {
  stroke: var(--gold);
}

#alv-ticket-app .icon-box-green {
  background: rgba(52, 211, 153, 0.12);
}

#alv-ticket-app .icon-box-green svg {
  stroke: var(--green);
}

/* ============================================
   BADGES
   ============================================ */
#alv-ticket-app .alv-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

#alv-ticket-app .status-pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

#alv-ticket-app .status-quoting,
#alv-ticket-app .status-delivering {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--purple-light);
}

#alv-ticket-app .status-waiting {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

#alv-ticket-app .status-fulfilled {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
  color: var(--green);
}

#alv-ticket-app .status-closed,
#alv-ticket-app .status-canceled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}

/* ============================================
   BUTTONS
   ============================================ */
#alv-ticket-app .alv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-btn);
  padding: 0.9rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

#alv-ticket-app .alv-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

#alv-ticket-app .alv-btn:not(:disabled):hover {
  transform: translateY(-3px) scale(1.02);
}

#alv-ticket-app .alv-btn:not(:disabled):active {
  transform: translateY(-1px) scale(0.98);
}

#alv-ticket-app .alv-btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0f0d19;
  box-shadow: 0 4px 20px rgba(249, 200, 108, 0.25);
}

#alv-ticket-app .alv-btn-primary:hover {
  box-shadow: 0 8px 30px rgba(249, 200, 108, 0.4);
}

#alv-ticket-app .alv-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

#alv-ticket-app .alv-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

#alv-ticket-app .alv-btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

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

/* ============================================
   INPUTS
   ============================================ */
#alv-ticket-app .alv-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  resize: none;
}

#alv-ticket-app .alv-input:focus {
  outline: none;
  border-color: var(--border-brand);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px var(--surface-active);
}

#alv-ticket-app .alv-input::placeholder {
  color: var(--text-dim);
}

/* ============================================
   COMPACT INLINE HEADER
   ============================================ */
#alv-ticket-app .alv-inline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

#alv-ticket-app .alv-ticket-id {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#alv-ticket-app .alv-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

#alv-ticket-app .alv-header-right a {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-decoration: none;
}

#alv-ticket-app .alv-header-right a:hover {
  color: var(--purple-light);
  text-decoration: underline;
}

/* ============================================
   AGENTS ONLINE
   ============================================ */
#alv-ticket-app .alv-agents-online {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
}

#alv-ticket-app .alv-agents-online::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 6px 2px rgba(52, 211, 153, 0.6),
    0 0 12px 4px rgba(52, 211, 153, 0.3);
  animation: alv-glow 2s ease-in-out infinite;
}

@keyframes alv-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ============================================
   ASSIGNED AGENT BADGE
   ============================================ */
#alv-ticket-app .alv-assigned-agent {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple-light);
}

#alv-ticket-app .alv-assigned-agent svg {
  stroke: var(--purple-light);
}

/* ============================================
   LIVE DEAL / OFFICIAL OFFER
   ============================================ */
#alv-ticket-app .alv-live-deal {
  background: linear-gradient(135deg,
      rgba(52, 211, 153, 0.06),
      rgba(52, 211, 153, 0.02));
  border: 2px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

#alv-ticket-app .alv-live-deal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #34d399, #10b981);
}

#alv-ticket-app .alv-live-deal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

#alv-ticket-app .alv-live-deal-header svg {
  width: 18px;
  height: 18px;
  stroke: var(--green);
}

#alv-ticket-app .alv-live-deal-header span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#alv-ticket-app .alv-live-deal-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

/* ============================================
   WELCOME OVERLAY
   ============================================ */
#alv-ticket-app .alv-welcome-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

#alv-ticket-app .alv-welcome-overlay.hidden {
  opacity: 0;
}

#alv-ticket-app .alv-welcome-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg,
      rgba(139, 92, 246, 0.2),
      rgba(139, 92, 246, 0.05));
  border: 2px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: alv-welcome-pulse 2s ease-in-out infinite;
}

#alv-ticket-app .alv-welcome-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--purple-light);
}

@keyframes alv-welcome-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

#alv-ticket-app .alv-welcome-text {
  text-align: center;
  max-width: 280px;
}

#alv-ticket-app .alv-welcome-text h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

#alv-ticket-app .alv-welcome-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   STATUS STEPS
   ============================================ */
#alv-ticket-app .alv-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

#alv-ticket-app .alv-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

#alv-ticket-app .alv-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.25s, border-color 0.25s, transform 0.25s, opacity 0.25s;
}

#alv-ticket-app .alv-step-text h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0;
}

#alv-ticket-app .alv-step-text span {
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.7;
}

#alv-ticket-app .alv-step.done .alv-step-dot {
  background: var(--purple-light);
  opacity: 0.6;
}

#alv-ticket-app .alv-step.done .alv-step-text h4 {
  color: var(--text-muted);
}

#alv-ticket-app .alv-step.active {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.15);
}

#alv-ticket-app .alv-step.active .alv-step-dot {
  background: var(--purple-light);
  box-shadow: 0 0 6px var(--purple), 0 0 12px rgba(139, 92, 246, 0.4);
  animation: alv-dotPulse 2s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes alv-dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

/* ============================================
   CHAT
   ============================================ */
#alv-ticket-app .alv-chat {
  display: flex;
  flex-direction: column;
  height: 72vh;
  min-height: 420px;
}

#alv-ticket-app .alv-chat-body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#alv-ticket-app .alv-chat-body::-webkit-scrollbar {
  width: 5px;
}

#alv-ticket-app .alv-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

#alv-ticket-app .alv-chat-footer {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border);
}

#alv-ticket-app .alv-chat-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

#alv-ticket-app .alv-chat-row textarea {
  min-height: 44px;
  flex: 1;
}

#alv-ticket-app .alv-chat-hint {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

/* ============================================
   MESSAGES
   ============================================ */
#alv-ticket-app .alv-messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#alv-ticket-app .alv-msg {
  max-width: 78%;
  min-width: 0;
  overflow: hidden;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

#alv-ticket-app .alv-msg p {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

#alv-ticket-app .alv-msg-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  text-align: right;
}

#alv-ticket-app .alv-msg-user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

#alv-ticket-app .alv-msg-support {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

#alv-ticket-app .alv-msg-system {
  align-self: center;
  max-width: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── System event messages (new separator design) ── */
#alv-ticket-app .alv-msg-system-event {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 0;
}

#alv-ticket-app .alv-msg-system-event::before,
#alv-ticket-app .alv-msg-system-event::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.055);
}

#alv-ticket-app .alv-msg-system-body {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 82%;
}

#alv-ticket-app .alv-msg-system-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.85;
}

#alv-ticket-app .alv-msg-system-text {
  font-size: 0.69rem;
  font-weight: 600;
  color: rgba(243, 241, 250, 0.52);
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alv-ticket-app .alv-msg-system-time {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(243, 241, 250, 0.3);
  flex-shrink: 0;
  line-height: 1;
}

/* ─ Lock / Match selected ─ */
/* Premium first ticket event */
#alv-ticket-app .alv-msg-system-event.is-request-card {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
}

#alv-ticket-app .alv-msg-system-event.is-request-card::before,
#alv-ticket-app .alv-msg-system-event.is-request-card::after {
  display: none;
}

#alv-ticket-app .alv-request-received-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(249, 200, 108, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(249, 200, 108, 0.12), rgba(52, 211, 153, 0.06) 55%, rgba(255, 255, 255, 0.035)),
    rgba(16, 15, 24, 0.9);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#alv-ticket-app .alv-request-received-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.88), rgba(52, 211, 153, 0.72), rgba(255, 255, 255, 0.18));
  opacity: 0.82;
}

#alv-ticket-app .alv-request-received-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -58px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(249, 200, 108, 0.09);
  filter: blur(18px);
  pointer-events: none;
}

#alv-ticket-app .alv-request-received-mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(249, 200, 108, 0.34);
  border-radius: 12px;
  color: #f9c86c;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 38%),
    rgba(249, 200, 108, 0.1);
  box-shadow: 0 10px 24px rgba(249, 200, 108, 0.1);
}

#alv-ticket-app .alv-request-received-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

#alv-ticket-app .alv-request-received-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#alv-ticket-app .alv-request-received-head strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-request-received-head span {
  flex-shrink: 0;
  color: rgba(249, 200, 108, 0.62);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

#alv-ticket-app .alv-request-received-main p {
  margin: 5px 0 10px;
  color: rgba(243, 241, 250, 0.66);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.46;
}

#alv-ticket-app .alv-request-received-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#alv-ticket-app .alv-request-received-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(243, 241, 250, 0.74);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 520px) {
  #alv-ticket-app .alv-msg-system-event.is-request-card {
    padding: 8px 0 10px;
  }

  #alv-ticket-app .alv-request-received-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
  }

  #alv-ticket-app .alv-request-received-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  #alv-ticket-app .alv-request-received-mark svg {
    width: 15px;
    height: 15px;
  }

  #alv-ticket-app .alv-request-received-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #alv-ticket-app .alv-request-received-head strong {
    white-space: normal;
  }

  #alv-ticket-app .alv-request-received-main p {
    font-size: 0.7rem;
  }

  #alv-ticket-app .alv-request-received-chips span {
    min-height: 22px;
    padding: 5px 7px;
    font-size: 0.58rem;
  }
}

#alv-ticket-app .alv-msg-system-event.is-lock::before,
#alv-ticket-app .alv-msg-system-event.is-lock::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(249, 200, 108, 0.12), rgba(255, 255, 255, 0.025));
}

#alv-ticket-app .alv-msg-system-event.is-lock .alv-msg-system-body {
  gap: 6px;
  padding: 4px 9px 4px 7px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(249, 200, 108, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-msg-system-event.is-lock .alv-msg-system-icon {
  color: rgba(52, 211, 153, 0.78);
  opacity: 1;
}

#alv-ticket-app .alv-msg-system-event.is-lock .alv-msg-system-text {
  color: rgba(255, 248, 234, 0.76);
  font-weight: 700;
  letter-spacing: 0;
}

#alv-ticket-app .alv-msg-system-event.is-lock .alv-msg-system-time {
  color: rgba(255, 248, 234, 0.38);
}

/* Delivery events */
#alv-ticket-app .alv-msg-system-event.is-delivery::before,
#alv-ticket-app .alv-msg-system-event.is-delivery::after {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.02), rgba(52, 211, 153, 0.2), rgba(249, 200, 108, 0.12));
}

#alv-ticket-app .alv-msg-system-event.is-delivery .alv-msg-system-body {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(249, 200, 108, 0.06));
  border-color: rgba(52, 211, 153, 0.26);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

#alv-ticket-app .alv-msg-system-event.is-delivery .alv-msg-system-icon,
#alv-ticket-app .alv-msg-system-event.is-delivery .alv-msg-system-text {
  color: #6ee7b7;
  opacity: 1;
}

#alv-ticket-app .alv-msg-system-event.is-delivery .alv-msg-system-time {
  color: rgba(110, 231, 183, 0.48);
}

/* ─ Request received / confirm ─ */
#alv-ticket-app .alv-msg-system-event.is-confirm::before,
#alv-ticket-app .alv-msg-system-event.is-confirm::after {
  background: rgba(139, 92, 246, 0.14);
}

#alv-ticket-app .alv-msg-system-event.is-confirm .alv-msg-system-body {
  background: rgba(139, 92, 246, 0.07);
  border-color: rgba(139, 92, 246, 0.2);
}

#alv-ticket-app .alv-msg-system-event.is-confirm .alv-msg-system-icon,
#alv-ticket-app .alv-msg-system-event.is-confirm .alv-msg-system-text {
  color: #a78bfa;
  opacity: 1;
}

#alv-ticket-app .alv-msg-system-event.is-confirm .alv-msg-system-time {
  color: rgba(167, 139, 250, 0.45);
}

/* ─ Coupon / Price ─ */
#alv-ticket-app .alv-msg-system-event.is-coupon::before,
#alv-ticket-app .alv-msg-system-event.is-coupon::after,
#alv-ticket-app .alv-msg-system-event.is-price::before,
#alv-ticket-app .alv-msg-system-event.is-price::after {
  background: rgba(249, 200, 108, 0.14);
}

#alv-ticket-app .alv-msg-system-event.is-coupon .alv-msg-system-body,
#alv-ticket-app .alv-msg-system-event.is-price .alv-msg-system-body {
  background: rgba(249, 200, 108, 0.07);
  border-color: rgba(249, 200, 108, 0.2);
}

#alv-ticket-app .alv-msg-system-event.is-coupon .alv-msg-system-icon,
#alv-ticket-app .alv-msg-system-event.is-coupon .alv-msg-system-text,
#alv-ticket-app .alv-msg-system-event.is-price .alv-msg-system-icon,
#alv-ticket-app .alv-msg-system-event.is-price .alv-msg-system-text {
  color: rgba(249, 200, 108, 0.88);
  opacity: 1;
}

#alv-ticket-app .alv-msg-system-event.is-coupon .alv-msg-system-time,
#alv-ticket-app .alv-msg-system-event.is-price .alv-msg-system-time {
  color: rgba(249, 200, 108, 0.38);
}

/* Message sender groups */
#alv-ticket-app .alv-msg-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  width: fit-content;
  max-width: 100%;
}

#alv-ticket-app .alv-msg-group-user {
  align-items: flex-end;
  align-self: flex-end;
  margin-left: auto;
}

#alv-ticket-app .alv-msg-group-support {
  align-items: flex-start;
  align-self: flex-start;
}

#alv-ticket-app .alv-msg-sender {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 0.3rem;
  margin-bottom: 2px;
}

#alv-ticket-app .alv-msg-sender-user {
  color: var(--text-muted);
  text-align: right;
}

#alv-ticket-app .alv-msg-sender-support {
  color: var(--purple-light);
}

#alv-ticket-app .alv-msg-edited {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}

/* ============================================
   ATTACHMENTS
   ============================================ */
#alv-ticket-app .alv-msg-attachment {
  display: block;
  margin: 8px 0 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  max-width: min(260px, 100%);
  position: relative;
}

#alv-ticket-app .alv-msg-attachment.verified {
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px rgba(249, 200, 108, 0.3);
}

#alv-ticket-app .alv-msg-attachment img {
  display: block;
  width: 100%;
  height: auto;
}

#alv-ticket-app .alv-msg-attachment:hover {
  opacity: 0.9;
}

#alv-ticket-app .alv-verified-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0a0f;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(249, 200, 108, 0.4);
  text-transform: uppercase;
}

/* ============================================
   LIGHTBOX
   ============================================ */
#alv-ticket-app .alv-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

#alv-ticket-app .alv-lightbox.active {
  display: flex;
}

#alv-ticket-app .alv-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  object-fit: contain;
}

#alv-ticket-app .alv-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(14, 15, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#alv-ticket-app .alv-lightbox-close:hover {
  background: rgba(28, 30, 40, 0.92);
  border-color: rgba(255, 255, 255, 0.26);
}

#alv-ticket-app .alv-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(14, 15, 20, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#alv-ticket-app .alv-lightbox-nav:hover {
  background: rgba(28, 30, 40, 0.92);
  border-color: rgba(255, 255, 255, 0.26);
}

#alv-ticket-app .alv-lightbox-prev {
  left: 20px;
}

#alv-ticket-app .alv-lightbox-next {
  right: 20px;
}

#alv-ticket-app .alv-lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#alv-ticket-app .alv-lightbox-nav.hidden,
#alv-ticket-app .alv-lightbox-counter.hidden {
  display: none !important;
}

/* ============================================
   RESOURCE PREVIEW (Account Showcase)
   ============================================ */
#alv-ticket-app .alv-resource-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.042) 0%, rgba(255, 255, 255, 0.016) 100%);
  border: 1px solid rgba(249, 200, 108, 0.18);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.9rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#alv-ticket-app .alv-resource-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(249, 200, 108, 0.7) 40%, rgba(249, 200, 108, 0.4) 100%);
}

#alv-ticket-app .alv-resource-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

#alv-ticket-app .alv-resource-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(249, 200, 108, 0.16), rgba(249, 200, 108, 0.06));
  border: 1px solid rgba(249, 200, 108, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

#alv-ticket-app .alv-resource-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--gold);
}

#alv-ticket-app .alv-resource-title {
  flex: 1;
  min-width: 0;
}

#alv-ticket-app .alv-resource-title h4 {
  margin: 0 0 2px;
  font-size: 0.88rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

#alv-ticket-app .alv-resource-title span {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
}

#alv-ticket-app .alv-resource-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(249, 200, 108, 0.1);
  border: 1px solid rgba(249, 200, 108, 0.22);
  font-size: 0.58rem;
  font-weight: 800;
  color: rgba(249, 200, 108, 0.88);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
  box-shadow: none;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-badge {
  display: inline-flex !important;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-carousel-tabs {
  display: none;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-carousel-viewport {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-carousel-track {
  transform: none !important;
}

#alv-ticket-app .alv-match-preview-empty {
  display: grid;
  gap: 12px;
  padding: 14px;
}

#alv-ticket-app .alv-match-preview-visual {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

#alv-ticket-app .alv-match-preview-lock {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(249, 200, 108, 0.11);
  border: 1px solid rgba(249, 200, 108, 0.2);
}

#alv-ticket-app .alv-match-preview-lock svg {
  width: 20px;
  height: 20px;
}

#alv-ticket-app .alv-match-preview-lines {
  display: grid;
  gap: 7px;
}

#alv-ticket-app .alv-match-preview-lines span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.055));
}

#alv-ticket-app .alv-match-preview-lines span:nth-child(1) {
  width: 88%;
}

#alv-ticket-app .alv-match-preview-lines span:nth-child(2) {
  width: 66%;
}

#alv-ticket-app .alv-match-preview-lines span:nth-child(3) {
  width: 44%;
}

#alv-ticket-app .alv-match-preview-copy {
  display: grid;
  gap: 3px;
}

#alv-ticket-app .alv-match-preview-copy strong {
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.25;
}

#alv-ticket-app .alv-match-preview-copy span {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

#alv-ticket-app .alv-match-preview-meta {
  display: grid;
  gap: 6px;
}

#alv-ticket-app .alv-match-preview-meta-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

#alv-ticket-app .alv-match-preview-meta-row span {
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-preview-meta-row strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Carousel tabs */
#alv-ticket-app .alv-carousel-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0.6rem;
  position: relative;
}

/* Scrollable tab strip */
#alv-ticket-app .alv-tabs-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding-bottom: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#alv-ticket-app .alv-tabs-scroll::-webkit-scrollbar {
  display: none;
}

/* Prev/Next arrow buttons */
#alv-ticket-app .alv-tab-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  padding: 0;
}

#alv-ticket-app .alv-tab-arrow:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  border-color: rgba(249, 200, 108, 0.3);
}

#alv-ticket-app .alv-tab-arrow.alv-tab-arrow-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

#alv-ticket-app .alv-carousel-tab {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

#alv-ticket-app .alv-carousel-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

#alv-ticket-app .alv-carousel-tab.active {
  background: rgba(249, 200, 108, 0.08);
  border-color: rgba(249, 200, 108, 0.3);
  color: var(--gold);
}

#alv-ticket-app .alv-carousel-tab svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* Carousel viewport */
#alv-ticket-app .alv-carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: height 0.24s ease;
}

/* Nav arrows sit outside overflow clip */
#alv-ticket-app .alv-resource-preview {
  position: relative;
}

#alv-ticket-app .alv-carousel-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#alv-ticket-app .alv-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  align-self: flex-start;
}

/* Hide tabs/counter when only 1 account */
#alv-ticket-app .alv-resource-preview.single-account .alv-carousel-tabs,
#alv-ticket-app .alv-resource-preview.single-account .alv-resource-badge {
  display: none !important;
}

/* Carousel slide content */
#alv-ticket-app .alv-slide-img {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  height: 100px;
}

#alv-ticket-app .alv-slide-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

#alv-ticket-app .alv-slide-label strong {
  color: var(--text);
  font-weight: 600;
}

/* Link card slide */
#alv-ticket-app .alv-slide-link {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
  min-height: 80px;
  overflow: hidden;
}

#alv-ticket-app .alv-slide-link-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#alv-ticket-app .alv-slide-link-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--purple-light);
  fill: none;
}

#alv-ticket-app .alv-slide-link-info {
  flex: 1;
  min-width: 0;
}

#alv-ticket-app .alv-slide-link-info h5 {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alv-ticket-app .alv-slide-link-info p {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alv-ticket-app .alv-slide-link-open {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--purple-light);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, opacity 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

#alv-ticket-app .alv-resource-content {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

#alv-ticket-app .alv-resource-image-wrap {
  position: relative;
  max-height: 180px;
  overflow: hidden;
}

#alv-ticket-app .alv-resource-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition:
    filter 0.4s ease,
    transform 0.4s ease;
  cursor: pointer;
}

#alv-ticket-app .alv-resource-image.blurred {
  filter: blur(15px) brightness(0.6);
  transform: scale(1.05);
}

#alv-ticket-app .alv-resource-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
}

#alv-ticket-app .alv-resource-close:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

#alv-ticket-app .alv-resource-close svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

#alv-ticket-app .alv-resource-image-wrap.revealed .alv-resource-close {
  display: flex;
}

#alv-ticket-app .alv-resource-gallery {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-padding: 8px;
  scroll-snap-type: x proximity;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.14);
  transition:
    filter 0.25s ease,
    opacity 0.25s ease;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#alv-ticket-app .alv-resource-gallery::-webkit-scrollbar {
  display: none;
}

#alv-ticket-app .alv-resource-gallery.blurred {
  filter: blur(8px) brightness(0.65);
  opacity: 0.75;
  pointer-events: none;
  user-select: none;
}

#alv-ticket-app .alv-resource-gallery-thumb {
  position: relative;
  width: auto;
  height: auto;
  aspect-ratio: 4 / 3;
  flex: 0 0 calc((100% - 24px) / 5);
  min-width: 46px;
  max-width: 64px;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 9px;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.028);
  cursor: pointer;
  opacity: 0.7;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

#alv-ticket-app .alv-resource-gallery-thumb:hover,
#alv-ticket-app .alv-resource-gallery-thumb:focus-visible {
  border-color: rgba(249, 200, 108, 0.45);
  opacity: 0.9;
}

#alv-ticket-app .alv-resource-gallery-thumb.active {
  border-color: rgba(249, 200, 108, 0.78);
  box-shadow: 0 0 0 1px rgba(249, 200, 108, 0.18), 0 8px 18px rgba(0, 0, 0, 0.18);
  opacity: 1;
}

#alv-ticket-app .alv-resource-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#alv-ticket-app .alv-resource-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.7);
  transition: opacity 0.3s ease;
}

#alv-ticket-app .alv-resource-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#alv-ticket-app .alv-resource-overlay-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.5rem;
  animation: alv-lock-pulse 2s ease-in-out infinite;
}

#alv-ticket-app .alv-resource-overlay-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--gold);
  stroke-width: 1.5;
}

@keyframes alv-lock-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

#alv-ticket-app .alv-resource-reveal-btn {
  background: linear-gradient(135deg, #f9c86c, #f59e0b);
  color: #0a0a0f;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 20px rgba(249, 200, 108, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#alv-ticket-app .alv-resource-reveal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(249, 200, 108, 0.4);
}


/* ============================================
   SIDEBAR
   ============================================ */
#alv-ticket-app .alv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#alv-ticket-app .alv-total-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

#alv-ticket-app .alv-total-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

#alv-ticket-app .alv-total-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.5px;
}

#alv-ticket-app .alv-trust-box {
  text-align: center;
  padding: 12px;
  background: rgba(52, 211, 153, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.1);
  border-radius: 8px;
  margin-bottom: 4px;
}

#alv-ticket-app .alv-trust-main {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

#alv-ticket-app .alv-trust-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

#alv-ticket-app .alv-trust-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--green);
  text-decoration: none;
  padding: 4px 8px;
  background: rgba(52, 211, 153, 0.08);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

#alv-ticket-app .alv-trust-link:hover {
  background: rgba(52, 211, 153, 0.15);
}

#alv-ticket-app .alv-trust-link svg {
  width: 12px;
  height: 12px;
}

#alv-ticket-app .alv-trust-delivery {
  display: flex;
  justify-content: center;
  gap: 12px;
}

#alv-ticket-app .alv-trust-delivery span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

#alv-ticket-app .alv-trust-delivery svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   ORDER HERO (replaces old summary section)
   ============================================ */
#alv-ticket-app .alv-order-hero {
  --hero-color: var(--purple);
  --hero-color-light: var(--purple-light);
  --hero-color-dim: rgba(139, 92, 246, 0.15);
  --hero-color-border: rgba(139, 92, 246, 0.2);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--hero-color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

@media (min-width: 1840px) {
  #alv-ticket-app .alv-main {
    z-index: 120;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero {
    position: fixed;
    top: 50vh;
    left: max(1.25rem, calc((100vw - 1200px) / 2 - 324px));
    right: auto;
    width: 300px;
    max-width: calc((100vw - 1200px) / 2 - 2rem);
    max-height: calc(100vh - 3rem);
    transform: translateY(-50%);
    background:
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
      linear-gradient(152deg, var(--hero-color-dim), rgba(15, 13, 22, 0.96) 44%, rgba(10, 10, 16, 0.98));
    border-color: var(--hero-color-border);
    border-radius: 22px;
    box-shadow:
      0 26px 70px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(255, 255, 255, 0.045),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    isolation: isolate;
    z-index: 1200;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.075), transparent 28%),
      radial-gradient(circle at 86% 12%, var(--hero-color-dim), transparent 36%);
    opacity: 0.9;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero > * {
    position: relative;
    z-index: 1;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-bar {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--hero-color-light), var(--hero-color), transparent);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-head {
    gap: 14px;
    padding: 18px 17px 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-rank-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background:
      radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.12), transparent 48%),
      var(--hero-color-dim);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px rgba(0, 0, 0, 0.24);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-rank-icon img {
    width: 38px;
    height: 38px;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-rank-name,
  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stat-val {
    color: rgba(255, 255, 255, 0.96);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-dd {
    color: rgba(255, 255, 255, 0.72);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-rank-name {
    font-size: 16px;
    letter-spacing: 0;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-game-pill {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--hero-color-border);
    color: var(--hero-color-light);
    line-height: 1.15;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-sub {
    color: rgba(255, 255, 255, 0.46);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stats {
    display: flex;
    gap: 6px;
    padding: 11px;
    border-top: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.025));
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stat-divider {
    display: none;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stat-lbl {
    color: rgba(255, 255, 255, 0.42);
    font-size: 9px;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-stat-val {
    font-size: 13.5px;
    line-height: 1.18;
    word-break: keep-all;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-details {
    display: grid;
    gap: 7px;
    padding: 12px 13px 14px;
    border-top-color: rgba(255, 255, 255, 0.07);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-dt {
    width: auto;
    color: rgba(255, 255, 255, 0.4);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-dd {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.3;
  }

  #alv-ticket-app .alv-sidebar > #alv-summary-section.alv-order-hero .alv-hero-more-btn {
    width: fit-content;
    margin-top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.72);
  }
}

#alv-ticket-app .alv-hero-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--hero-color), var(--hero-color-light), var(--hero-color));
}

#alv-ticket-app .alv-hero-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, var(--hero-color-dim) 0%, transparent 100%);
}

#alv-ticket-app .alv-hero-rank-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--hero-color-dim);
  border: 1px solid var(--hero-color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

#alv-ticket-app .alv-hero-rank-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

#alv-ticket-app .alv-hero-rank-icon svg {
  width: 28px;
  height: 28px;
}

#alv-ticket-app .alv-hero-info {
  flex: 1;
  min-width: 0;
}

#alv-ticket-app .alv-hero-rank-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#alv-ticket-app .alv-hero-rank-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alv-ticket-app .alv-hero-game-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--hero-color-dim);
  color: var(--hero-color-light);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

#alv-ticket-app .alv-hero-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stat row */
#alv-ticket-app .alv-hero-stats {
  display: flex;
  border-top: 1px solid var(--border);
}

#alv-ticket-app .alv-hero-stat {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
}

#alv-ticket-app .alv-hero-stat-divider {
  width: 1px;
  background: var(--border);
}

#alv-ticket-app .alv-hero-stat-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#alv-ticket-app .alv-hero-stat-val {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

#alv-ticket-app .alv-hero-gold {
  color: var(--gold);
  font-weight: 700;
}

/* Details section */
#alv-ticket-app .alv-hero-details {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}

#alv-ticket-app .alv-hero-row {
  display: flex;
  gap: 10px;
  font-size: 11px;
  padding: 3px 0;
}

#alv-ticket-app .alv-hero-dt {
  color: var(--text-dim);
  width: 44px;
  flex-shrink: 0;
}

#alv-ticket-app .alv-hero-dd {
  color: var(--text-muted);
  margin: 0;
  min-width: 0;
}

#alv-ticket-app .alv-hero-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-hero-details.expanded .alv-hero-truncate {
  white-space: normal;
  word-break: break-word;
}

#alv-ticket-app .alv-hero-more-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--hero-color-light);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

#alv-ticket-app .alv-hero-more-btn:hover {
  color: var(--text);
}

#alv-ticket-app .alv-hero-more-btn svg {
  transition: transform 0.2s;
}

#alv-ticket-app .alv-hero-details.expanded .alv-hero-more-btn svg {
  transform: rotate(180deg);
}

/* Game-specific color themes */
#alv-ticket-app .alv-order-hero[data-game-theme="valorant"] {
  --hero-color: #ef4444;
  --hero-color-light: #f87171;
  --hero-color-dim: rgba(239, 68, 68, 0.12);
  --hero-color-border: rgba(239, 68, 68, 0.2);
}

#alv-ticket-app .alv-order-hero[data-game-theme="fortnite"] {
  --hero-color: #3b82f6;
  --hero-color-light: #60a5fa;
  --hero-color-dim: rgba(59, 130, 246, 0.12);
  --hero-color-border: rgba(59, 130, 246, 0.2);
}

#alv-ticket-app .alv-order-hero[data-game-theme="roblox"] {
  --hero-color: #34d399;
  --hero-color-light: #6ee7b7;
  --hero-color-dim: rgba(52, 211, 153, 0.12);
  --hero-color-border: rgba(52, 211, 153, 0.2);
}

#alv-ticket-app .alv-order-hero[data-game-theme="other"] {
  --hero-color: rgba(243, 241, 250, 0.25);
  --hero-color-light: rgba(243, 241, 250, 0.5);
  --hero-color-dim: rgba(255, 255, 255, 0.05);
  --hero-color-border: rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
  #alv-ticket-app .alv-hero-head {
    padding: 12px;
  }
  #alv-ticket-app .alv-hero-rank-icon {
    width: 38px;
    height: 38px;
  }
  #alv-ticket-app .alv-hero-rank-icon img {
    width: 28px;
    height: 28px;
  }
  #alv-ticket-app .alv-hero-rank-name {
    font-size: 14px;
  }
  #alv-ticket-app .alv-hero-stat {
    padding: 8px 12px;
  }
  #alv-ticket-app .alv-hero-details {
    padding: 10px 12px 12px;
  }
}

/* ============================================
   PRICING / COUPON
   ============================================ */
#alv-ticket-app .alv-pay-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

#alv-ticket-app .alv-pay-grid .lbl {
  color: var(--text-dim);
}

#alv-ticket-app .alv-pay-grid .val {
  text-align: right;
  color: var(--text);
}

#alv-ticket-app .alv-pay-grid .divider {
  grid-column: span 2;
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0;
}

#alv-ticket-app .alv-pay-grid .total .lbl {
  font-weight: 600;
  color: var(--text);
}

#alv-ticket-app .alv-pay-grid .total .val {
  font-weight: 600;
  color: var(--gold);
}


/* ============================================
   LEGAL
   ============================================ */
#alv-ticket-app .alv-legal-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1.4;
}

#alv-ticket-app .alv-legal-label input {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

#alv-ticket-app .alv-legal-label a {
  color: var(--text-muted);
}

#alv-ticket-app .alv-legal-error {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.08);
  border-left: 2px solid #ef4444;
  border-radius: 4px;
  color: #fca5a5;
  font-size: 11px;
}

/* ============================================
   INFO LIST
   ============================================ */
#alv-ticket-app .alv-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#alv-ticket-app .alv-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

#alv-ticket-app .alv-info-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--green);
  flex-shrink: 0;
}

#alv-ticket-app .alv-info-item a {
  color: var(--purple-light);
  text-decoration: none;
}

#alv-ticket-app .alv-info-item a:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
#alv-ticket-app .alv-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

#alv-ticket-app .alv-footer-left {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#alv-ticket-app .alv-footer-left svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-dim);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  #alv-ticket-app .alv-grid {
    grid-template-columns: 1fr 280px;
    gap: 1rem;
  }

  #alv-ticket-app .alv-chat {
    height: 65vh;
  }
}

@media (max-width: 900px) {
  #alv-ticket-app .alv-grid {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  #alv-ticket-app .alv-chat {
    height: 55vh;
    min-height: 360px;
  }

  #alv-ticket-app .alv-inline-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-main {
    padding: 0.75rem;
  }

  #alv-ticket-app .alv-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  #alv-ticket-app .alv-step {
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-md);
  }

  #alv-ticket-app .alv-step-text h4 {
    font-size: 0.72rem;
  }

  #alv-ticket-app .alv-step-text span {
    font-size: 0.58rem;
  }

  #alv-ticket-app .alv-chat {
    height: 50vh;
    min-height: 320px;
  }

  #alv-ticket-app .alv-msg {
    max-width: 88%;
    font-size: 0.82rem;
  }

  #alv-ticket-app .alv-ticket-id {
    font-size: 1rem;
  }

  #alv-ticket-app .alv-inline-header {
    gap: 0.35rem;
  }

  #alv-ticket-app .alv-header-right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  #alv-ticket-app .alv-panel-body {
    padding: 1rem;
  }

  #alv-ticket-app .alv-carousel-tab {
    font-size: 0.58rem;
    padding: 5px 0;
  }

  #alv-ticket-app .alv-resource-preview {
    padding: 0.75rem;
  }
}

@media (max-width: 400px) {
  #alv-ticket-app .alv-steps {
    grid-template-columns: 1fr 1fr;
  }

  #alv-ticket-app .alv-chat {
    height: 45vh;
    min-height: 280px;
  }

  #alv-ticket-app .alv-total-value {
    font-size: 1.3rem;
  }

  #alv-ticket-app .alv-payment-buttons .alv-btn {
    height: 46px;
    font-size: 0.88rem;
  }
}

/* Payment buttons container. The active button design lives in the compact block below. */
#alv-ticket-app .alv-payment-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

/* ============================================
   UTILITY CLASSES (v11.1 — replaces inline styles)
   ============================================ */
#alv-ticket-app .alv-hidden {
  display: none !important;
}

.alv-relative {
  position: relative;
}

/* ── Component: Agent icon (was inline style) ── */
.alv-agent-icon-sm {
  width: 12px;
  height: 12px;
}

/* ── Component: Resource preview — no longer spans grid, lives in sidebar ── */

/* ── Component: Payment panel body ── */
.alv-payment-body {
  padding: var(--space-lg);
}

/* ── Component: Invoice button (was inline style) ── */
#btn-invoice {
  width: 100%;
  text-decoration: none;
  margin-bottom: 10px;
}


/* ── Component: Paid message (was inline style) ── */
#alv-paid-msg {
  margin: 0 0 var(--space-md);
  font-size: 12px;
  color: var(--green);
}

/* ============================================
   TYPING INDICATOR (v11.1 — WhatsApp-style)
   ============================================ */
#alv-ticket-app .alv-typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  animation: alv-typing-fade-in 0.25s ease;
}

@keyframes alv-typing-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#alv-ticket-app .alv-typing-indicator.alv-hidden {
  display: none;
}

#alv-ticket-app .alv-typing-bubble {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 18px;
  padding: 10px 14px;
}

#alv-ticket-app .alv-typing-bubble span {
  display: block;
  width: 7px;
  height: 7px;
  background: var(--purple-light);
  border-radius: 50%;
  opacity: 0.4;
  animation: alv-typing-bounce 1.4s ease-in-out infinite;
}

#alv-ticket-app .alv-typing-bubble span:nth-child(2) {
  animation-delay: 0.2s;
}

#alv-ticket-app .alv-typing-bubble span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes alv-typing-bounce {

  0%,
  60%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

#alv-ticket-app .alv-typing-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ============================================
   MESSAGE DELIVERY STATUS (v11.1 — checkmarks)
   ============================================ */
#alv-ticket-app .alv-msg-status {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

#alv-ticket-app .alv-msg-status svg {
  width: 14px;
  height: 14px;
}

#alv-ticket-app .alv-msg-sending {
  opacity: 0.5;
}

#alv-ticket-app .alv-msg-status .alv-check {
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#alv-ticket-app .alv-msg-status.alv-delivered .alv-check {
  stroke: var(--purple-light);
}

/* ============================================
   PERFORMANCE & ACCESSIBILITY
   ============================================ */

/* GPU hints for animated elements */
#alv-ticket-app .alv-bg::before,
#alv-ticket-app .alv-bg::after {
  will-change: transform;
}

#alv-ticket-app .alv-carousel-track {
  will-change: transform;
}

/* Layout isolation for heavy components */
#alv-ticket-app .alv-chat-body {
  contain: content;
}

#alv-ticket-app .alv-carousel-viewport {
  contain: layout style;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

  #alv-ticket-app .alv-bg::before,
  #alv-ticket-app .alv-bg::after {
    animation: none !important;
  }

  #alv-ticket-app .alv-step.active .alv-step-dot {
    animation: none !important;
  }

  #alv-ticket-app .alv-typing-bubble span {
    animation: none !important;
    opacity: 0.6;
  }

  #alv-ticket-app .alv-welcome-icon {
    animation: none !important;
  }

  #alv-ticket-app .alv-resource-overlay-icon {
    animation: none !important;
  }

  #alv-ticket-app .alv-carousel-track {
    transition: none !important;
  }

  #alv-ticket-app .alv-btn {
    transition: none !important;
  }

  #alv-ticket-app .alv-agents-online::before {
    animation: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   REPLY SYSTEM
   ═══════════════════════════════════════════════════════════════════ */

/* Row wrapper — real flex row with padding for reply btn space */
#alv-ticket-app .alv-msg-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  position: relative;
}

#alv-ticket-app .alv-msg-row-user {
  justify-content: flex-end;
}

#alv-ticket-app .alv-msg-row-support {
  justify-content: flex-start;
}

/* Reply button — flex sibling next to bubble, shown on row hover */
#alv-ticket-app .alv-reply-btn {
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 20, 35, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  padding: 0;
}

#alv-ticket-app .alv-reply-btn svg {
  stroke: rgba(255, 255, 255, 0.55);
  transition: stroke 0.15s;
  pointer-events: none;
  flex-shrink: 0;
}

/* Show on ROW hover — button is flex sibling so no gap/clipping issue */
#alv-ticket-app .alv-msg-row:hover .alv-reply-btn {
  opacity: 1;
  pointer-events: auto;
}

#alv-ticket-app .alv-reply-btn:hover {
  background: #f9c86c;
}

#alv-ticket-app .alv-reply-btn:hover svg {
  stroke: #1a1a2e;
}

/* No absolute positioning needed — button is inline in flex row */
#alv-ticket-app .alv-msg-group-support .alv-reply-btn,
#alv-ticket-app .alv-msg-group-user .alv-reply-btn {
  position: static;
  right: auto;
  left: auto;
}

/* Remove hover bridge — no longer needed with flex-sibling approach */
#alv-ticket-app .alv-msg-group::after {
  display: none;
}

/* CRITICAL: override the margin-left:auto from .alv-msg-group-user
   which was designed for flex-column context (messages container).
   Inside .alv-msg-row (flex-row), margin-left:auto would push reply-btn
   all the way to the left side of the screen, far from the bubble. */
#alv-ticket-app .alv-msg-row .alv-msg-group {
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-self: center;
}


/* Messages area: horizontal padding = space for reply buttons (within overflow:hidden chat-body) */
#alv-ticket-app .alv-messages {
  padding: 1rem 38px;
  overflow: visible;
}

/* Reply quote inside bubble */
#alv-ticket-app .alv-msg-reply-quote {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #f9c86c;
  border-radius: 4px;
  padding: 5px 8px;
  margin-bottom: 6px;
}

#alv-ticket-app .alv-msg-reply-quote-sender {
  font-size: 11px;
  font-weight: 700;
  color: #f9c86c;
  display: block;
  margin-bottom: 1px;
}

#alv-ticket-app .alv-msg-reply-quote-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Reply preview banner above input */
#alv-ticket-app .alv-reply-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(249, 200, 108, 0.06);
  border-left: 3px solid #f9c86c;
  border-radius: 0 8px 8px 0;
  padding: 7px 12px 7px 10px;
  margin: 6px 0 4px;
}

#alv-ticket-app .alv-reply-preview-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#alv-ticket-app .alv-reply-preview-sender {
  font-size: 11px;
  font-weight: 700;
  color: #f9c86c;
}

#alv-ticket-app .alv-reply-preview-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alv-ticket-app .alv-reply-cancel {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  padding: 3px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  line-height: 0;
}

#alv-ticket-app .alv-reply-cancel:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   CHAT IMAGE UPLOAD
   ═══════════════════════════════════════════════════════════════════ */

/* Upload button — small, inline, matches the aesthetic */
#alv-ticket-app .alv-upload-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  padding: 0;
}

#alv-ticket-app .alv-upload-btn:hover {
  border-color: #f9c86c;
  color: #f9c86c;
  background: rgba(249, 200, 108, 0.08);
}

#alv-ticket-app .alv-upload-btn.alv-uploading {
  opacity: 0.4;
  pointer-events: none;
}

#alv-ticket-app .alv-upload-btn svg {
  pointer-events: none;
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2;
}

/* Attachment thumbnail strip */
#alv-ticket-app .alv-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 2px;
}

#alv-ticket-app .alv-attach-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#alv-ticket-app .alv-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#alv-ticket-app .alv-attach-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

/* Upload error */
#alv-ticket-app .alv-upload-error {
  font-size: 12px;
  color: #f87171;
  padding: 4px 0 2px;
}

/* Attachment image — constrained by parent container */
#alv-ticket-app .alv-msg-attachment img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Chat input buttons: square, consistent height ── */
#alv-ticket-app #alv-send {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 12px;
  flex-shrink: 0;
}

#alv-ticket-app #alv-send svg {
  width: 20px !important;
  height: 20px !important;
}

#alv-ticket-app .alv-chat-row .alv-upload-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
}

#alv-ticket-app .alv-chat-row {
  align-items: center;
  gap: 8px;
}
/* ============================================
   MOBILE FIXES — Footer + Responsive Polish
   v14.1: Footer stacked on mobile, general cleanup
   ============================================ */

/* Footer: stack on mobile */
@media (max-width: 600px) {
  #alv-ticket-app .alv-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    padding: 0.75rem 0;
  }

  #alv-ticket-app .alv-footer-left {
    justify-content: center;
  }

  #alv-ticket-app .alv-footer .alv-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Aside panel: fix overflow on small screens */
@media (max-width: 900px) {
  #alv-ticket-app .alv-aside .alv-panel-body {
    padding: 0.75rem;
  }
}

/* ============================================================
   TRUST CHECKLIST (Ticket Frontend)
   ============================================================ */
#alv-ticket-app .alv-trust-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 1.75rem 0 1.25rem;
  width: 100%;
}
#alv-ticket-app .alv-trust-check-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.1rem 1.25rem;
  background: rgba(52,211,153,.04);
  border: 1px solid rgba(52,211,153,.14);
  border-radius: 14px;
  transition: border-color .2s;
  box-sizing: border-box;
  min-width: 0;
}
#alv-ticket-app .alv-trust-check-item:hover {
  border-color: rgba(52,211,153,.28);
}
#alv-ticket-app .alv-trust-check-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.2);
}
#alv-ticket-app .alv-trust-check-icon svg {
  width: 16px;
  height: 16px;
  stroke: #34d399;
  fill: none;
  flex-shrink: 0;
}
#alv-ticket-app .alv-trust-check-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
#alv-ticket-app .alv-trust-check-body strong {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  display: block;
}
#alv-ticket-app .alv-trust-check-body span {
  font-size: .75rem;
  color: rgba(243,241,250,.45);
  line-height: 1.4;
  display: block;
}
@media (max-width: 640px) {
  #alv-ticket-app .alv-trust-checklist {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #alv-ticket-app .alv-trust-check-item {
    padding: .9rem 1rem;
  }
}


/* ===== Ticket frontend polish pass ===== */
#alv-ticket-app {
  --alv-soft-card: rgba(255, 255, 255, 0.026);
  --alv-soft-line: rgba(255, 255, 255, 0.085);
}

#alv-ticket-app .alv-bg::before,
#alv-ticket-app .alv-bg::after {
  opacity: 0.42;
  animation: none;
}

#alv-ticket-app .alv-main {
  max-width: 1180px;
  padding-top: 1.25rem;
}

#alv-ticket-app .alv-inline-header {
  padding: 0.8rem 0.95rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--alv-soft-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.024);
  box-shadow: none;
}

#alv-ticket-app .alv-ticket-id {
  font-size: 1rem;
  letter-spacing: 0;
}

#alv-ticket-app .alv-header-right a {
  padding: 0.36rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  text-decoration: none;
}

#alv-ticket-app .alv-header-right a:hover {
  color: var(--gold);
  border-color: rgba(249, 200, 108, 0.24);
  text-decoration: none;
}

#alv-ticket-app .alv-agents-online {
  background: rgba(52, 211, 153, 0.055);
  border-color: rgba(52, 211, 153, 0.16);
}

#alv-ticket-app .alv-agents-online::before {
  animation: none;
  box-shadow: none;
}

#alv-ticket-app .alv-steps {
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

#alv-ticket-app .alv-step {
  padding: 0.58rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

#alv-ticket-app .alv-step.active {
  background: rgba(249, 200, 108, 0.06);
  border-color: rgba(249, 200, 108, 0.16);
}

#alv-ticket-app .alv-step.done .alv-step-dot,
#alv-ticket-app .alv-step.active .alv-step-dot {
  background: var(--gold);
  box-shadow: none;
  animation: none;
}

#alv-ticket-app .alv-step-text h4 {
  letter-spacing: 0;
}

#alv-ticket-app .alv-step-text span {
  color: rgba(243, 241, 250, 0.48);
}

#alv-ticket-app .alv-panel {
  background: var(--alv-soft-card);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#alv-ticket-app .alv-panel:hover {
  border-color: rgba(255, 255, 255, 0.11);
}

#alv-ticket-app .alv-panel-gradient {
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.045), rgba(255, 255, 255, 0.018));
  border-color: rgba(249, 200, 108, 0.16);
}

#alv-ticket-app .alv-panel-gradient::before {
  background: linear-gradient(90deg, transparent, rgba(249, 200, 108, 0.32), transparent);
}

#alv-ticket-app .icon-box-purple {
  background: rgba(249, 200, 108, 0.095);
}

#alv-ticket-app .icon-box-purple svg {
  stroke: var(--gold);
}

#alv-ticket-app .alv-welcome-overlay {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#alv-ticket-app .alv-welcome-icon {
  width: 42px;
  height: 42px;
  background: rgba(249, 200, 108, 0.08);
  border-color: rgba(249, 200, 108, 0.2);
  animation: none;
}

#alv-ticket-app .alv-welcome-icon svg {
  stroke: var(--gold);
}

#alv-ticket-app .alv-chat {
  height: 70vh;
}

#alv-ticket-app .alv-chat-footer {
  background: rgba(10, 10, 15, 0.72);
}

#alv-ticket-app .alv-input {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-payment-assurance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 0 12px;
}

#alv-ticket-app .alv-payment-assurance span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(52, 211, 153, 0.14);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.045);
  color: rgba(243, 241, 250, 0.74);
  font-size: 11px;
  font-weight: 700;
}

#alv-ticket-app .alv-payment-assurance span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

#alv-ticket-app .alv-total-display {
  margin-bottom: 12px;
}

#alv-ticket-app .alv-trust-box {
  border-color: var(--alv-soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

#alv-ticket-app .alv-trust-main {
  color: rgba(243, 241, 250, 0.82);
  line-height: 1.45;
}

#alv-ticket-app .alv-trust-checklist {
  gap: 0.7rem;
  margin-top: 1rem;
}

#alv-ticket-app .alv-trust-check-item {
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.032);
}

#alv-ticket-app .alv-trust-check-item:hover {
  transform: none;
}

@media (min-width: 1024px) {
  #alv-ticket-app .alv-trust-checklist {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  #alv-ticket-app .alv-inline-header {
    align-items: flex-start;
  }

  #alv-ticket-app .alv-header-right {
    width: 100%;
  }

  #alv-ticket-app .alv-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  #alv-ticket-app .alv-step {
    min-height: 64px;
  }
}

/* ===== Compact footer and trust strips ===== */
#alv-ticket-app .alv-payment-assurance {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: -2px 0 10px;
  min-width: 0;
}

#alv-ticket-app .alv-payment-assurance span {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(243, 241, 250, 0.58);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

#alv-ticket-app .alv-payment-assurance span::before {
  width: 5px;
  height: 5px;
  background: #34d399;
  opacity: 0.9;
}

#alv-ticket-app .alv-trust-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 10px;
}

#alv-ticket-app .alv-trust-check-item {
  align-items: center;
  gap: 0.58rem;
  min-height: 58px;
  padding: 0.68rem 0.78rem;
  border-color: rgba(52, 211, 153, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

#alv-ticket-app .alv-trust-check-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.075);
  border-color: rgba(52, 211, 153, 0.16);
}

#alv-ticket-app .alv-trust-check-icon svg {
  width: 14px;
  height: 14px;
}

#alv-ticket-app .alv-trust-check-body {
  gap: 0.08rem;
}

#alv-ticket-app .alv-trust-check-body strong {
  font-size: 0.78rem;
  line-height: 1.12;
}

#alv-ticket-app .alv-trust-check-body span {
  font-size: 0.68rem;
  line-height: 1.22;
  color: rgba(243, 241, 250, 0.42);
}

#alv-ticket-app .alv-footer {
  margin-top: 0;
  padding: 0.8rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  background: transparent;
}

#alv-ticket-app .alv-footer-left {
  color: rgba(243, 241, 250, 0.38);
  font-size: 0.7rem;
}

#alv-ticket-app .alv-footer-left svg {
  width: 13px;
  height: 13px;
  stroke: rgba(243, 241, 250, 0.38);
}

#alv-ticket-app .alv-footer .alv-btn {
  min-height: 0;
  height: auto;
  padding: 0.48rem 0.76rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.032);
  border-color: rgba(255, 255, 255, 0.09);
  color: rgba(243, 241, 250, 0.78);
  font-size: 0.76rem;
}

#alv-ticket-app .alv-footer .alv-btn:hover {
  border-color: rgba(249, 200, 108, 0.22);
  color: var(--gold);
  transform: none;
}

@media (max-width: 900px) {
  #alv-ticket-app .alv-trust-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-footer {
    align-items: stretch;
    padding: 0.75rem 0 0.9rem;
  }

  #alv-ticket-app .alv-footer .alv-btn {
    width: auto;
  }
}

@media (max-width: 520px) {
  #alv-ticket-app .alv-payment-assurance {
    gap: 8px;
  }

  #alv-ticket-app .alv-payment-assurance span {
    font-size: 9.5px;
  }

  #alv-ticket-app .alv-trust-checklist {
    grid-template-columns: 1fr;
  }
}

/* Ticket payment provider buttons: compact version of the shop checkout choices. */
#alv-ticket-app .alv-payment-buttons .alv-btn {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 8px;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  min-height: 50px;
  height: auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(14, 14, 18, 0.98);
  color: rgba(246, 243, 234, 0.9);
  text-align: left;
  box-shadow: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn::after {
  content: "";
  position: relative;
  z-index: 1;
  justify-self: end;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.38;
  transform: rotate(45deg);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#alv-ticket-app .alv-payment-buttons .alv-btn:active::after {
  opacity: 0.5;
  transform: rotate(45deg) translate(1px, -1px);
}

#alv-ticket-app .alv-payment-buttons .alv-btn .pay-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  fill: currentColor;
  stroke: none;
  box-sizing: border-box;
  filter: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn:hover:not(:disabled) .pay-icon {
  transform: none;
}

#alv-ticket-app .alv-ticket-pay-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

#alv-ticket-app .alv-ticket-pay-copy strong,
#alv-ticket-app .alv-payment-buttons .alv-btn .btn-text {
  display: block;
  overflow: hidden;
  color: rgba(246, 243, 234, 0.94);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-ticket-pay-copy small {
  display: block;
  overflow: hidden;
  color: rgba(246, 243, 234, 0.48);
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-btn-stripe,
#alv-ticket-app .alv-btn.alv-btn-stripe {
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(180deg, rgba(228, 198, 109, 0.075), rgba(228, 198, 109, 0.012)),
    rgba(14, 14, 18, 0.98);
  color: #e4c66d;
  box-shadow:
    inset 3px 0 0 rgba(228, 198, 109, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-btn-stripe .pay-icon,
#alv-ticket-app .alv-btn.alv-btn-stripe .pay-icon {
  border-color: rgba(228, 198, 109, 0.16);
  background: rgba(228, 198, 109, 0.085);
  color: #e4c66d;
}


#alv-ticket-app .alv-payment-buttons .alv-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(228, 198, 109, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

#alv-ticket-app .alv-payment-buttons .alv-btn:hover:not(:disabled)::after {
  opacity: 0.62;
  transform: rotate(45deg) translate(1px, -1px);
}

#alv-ticket-app .alv-payment-buttons .alv-btn:hover:not(:disabled) .alv-ticket-pay-copy strong {
  color: #fff8e8;
}

#alv-ticket-app .alv-payment-buttons .alv-btn:disabled {
  opacity: 0.62;
  filter: grayscale(0.58) saturate(0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(13, 13, 17, 0.96);
  border-color: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 2px 0 0 rgba(255, 255, 255, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#alv-ticket-app .alv-payment-buttons .alv-btn:disabled::after {
  opacity: 0.28;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.paid {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 44px;
  text-align: center;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.paid::after {
  content: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .pay-icon,
#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .alv-ticket-pay-copy {
  opacity: 0.74;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.processing .alv-ticket-pay-copy small {
  display: none;
}

/* Payment CTA readability: keep disabled checkout states structured, not clipped. */
#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending,
#alv-ticket-app .alv-payment-buttons .alv-btn:disabled.is-pending {
  opacity: 0.88;
  filter: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .alv-ticket-pay-copy,
#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .pay-icon {
  opacity: 1;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .alv-ticket-pay-copy strong,
#alv-ticket-app .alv-payment-buttons .alv-btn:disabled .alv-ticket-pay-copy strong {
  color: rgba(246, 243, 234, 0.92);
  font-weight: 780;
}

#alv-ticket-app .alv-payment-buttons .alv-btn.is-pending .alv-ticket-pay-copy small,
#alv-ticket-app .alv-payment-buttons .alv-btn:disabled .alv-ticket-pay-copy small {
  color: rgba(246, 243, 234, 0.55);
  font-weight: 650;
}

/* Progress bar: clearer movement without making it loud */
#alv-ticket-app .alv-steps {
  position: relative;
  isolation: isolate;
  counter-reset: alv-ticket-step;
  --alv-progress: 0%;
  gap: 0.58rem;
  margin-bottom: 1rem;
}

#alv-ticket-app .alv-steps::before,
#alv-ticket-app .alv-steps::after {
  content: "";
  position: absolute;
  left: 3.1rem;
  right: 3.1rem;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

#alv-ticket-app .alv-steps::before {
  background: rgba(255, 255, 255, 0.07);
}

#alv-ticket-app .alv-steps::after {
  right: auto;
  width: calc(var(--alv-progress) * 0.86);
  max-width: calc(100% - 6.2rem);
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.35), rgba(249, 200, 108, 0.95));
  box-shadow: 0 0 16px rgba(249, 200, 108, 0.16);
  transition: width 0.35s ease;
}

#alv-ticket-app .alv-step {
  position: relative;
  z-index: 1;
  counter-increment: alv-ticket-step;
  min-height: 68px;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(13, 13, 19, 0.78);
}

#alv-ticket-app .alv-step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
  opacity: 0.55;
  pointer-events: none;
}

#alv-ticket-app .alv-step-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111018;
  color: rgba(243, 241, 250, 0.5);
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.025);
}

#alv-ticket-app .alv-step-dot::before {
  content: counter(alv-ticket-step);
}

#alv-ticket-app .alv-step.done {
  border-color: rgba(249, 200, 108, 0.13);
  background: rgba(249, 200, 108, 0.03);
}

#alv-ticket-app .alv-step.done .alv-step-dot {
  border-color: rgba(249, 200, 108, 0.42);
  background: rgba(249, 200, 108, 0.16);
  color: var(--gold);
}

#alv-ticket-app .alv-step.done .alv-step-dot::before {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(-45deg);
}

#alv-ticket-app .alv-step.active {
  border-color: rgba(249, 200, 108, 0.28);
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.09), rgba(249, 200, 108, 0.025));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(249, 200, 108, 0.08);
}

#alv-ticket-app .alv-step.active .alv-step-dot {
  border-color: rgba(249, 200, 108, 0.55);
  background: var(--gold);
  color: #111018;
  box-shadow: 0 0 0 5px rgba(249, 200, 108, 0.09), 0 0 18px rgba(249, 200, 108, 0.24);
  animation: alv-stepGlow 2.4s ease-in-out infinite;
}

#alv-ticket-app .alv-step.active .alv-step-text h4 {
  color: #fff7df;
}

#alv-ticket-app .alv-step.active .alv-step-text span {
  color: rgba(249, 224, 174, 0.72);
}

#alv-ticket-app .alv-step.done .alv-step-text h4 {
  color: rgba(243, 241, 250, 0.78);
}

@keyframes alv-stepGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@media (max-width: 900px) {
  #alv-ticket-app .alv-steps::before,
  #alv-ticket-app .alv-steps::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #alv-ticket-app .alv-step.active .alv-step-dot {
    animation: none;
  }

  #alv-ticket-app .alv-steps::after {
    transition: none;
  }
}

/* ===== Ticket frontend QOL patch: chat, refresh, mobile comfort ===== */
#alv-ticket-app .alv-refreshing svg {
  animation: alv-spin 0.85s linear infinite;
}

#alv-ticket-app .alv-chat-row textarea {
  max-height: 126px;
  overflow-y: auto;
  line-height: 1.35;
}

#alv-ticket-app .alv-msg:has(.alv-msg-attachment:only-child),
#alv-ticket-app .alv-msg:not(:has(p)) {
  padding: 0.55rem;
}

@media (hover: none), (pointer: coarse) {
  #alv-ticket-app .alv-reply-btn {
    opacity: 1;
    pointer-events: auto;
    width: 30px;
    height: 30px;
    background: rgba(20, 20, 35, 0.86);
  }
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-main {
    padding: 0.65rem;
  }

  #alv-ticket-app .alv-inline-header {
    padding: 0.68rem 0.72rem;
    border-radius: 12px;
  }

  #alv-ticket-app .alv-steps {
    gap: 0.45rem;
    margin-bottom: 0.75rem;
  }

  #alv-ticket-app .alv-step {
    min-height: 58px;
    padding: 0.55rem 0.62rem;
  }

  #alv-ticket-app .alv-step-dot {
    width: 22px;
    height: 22px;
  }

  #alv-ticket-app .alv-chat {
    height: min(58dvh, 520px);
    min-height: 360px;
    border-radius: 14px;
  }

  #alv-ticket-app .alv-panel-header {
    padding: 0.72rem 0.88rem;
  }

  #alv-ticket-app .alv-messages {
    padding: 0.78rem 0.72rem;
  }

  #alv-ticket-app .alv-msg-row {
    gap: 4px;
  }

  #alv-ticket-app .alv-msg {
    max-width: calc(100% - 38px);
    border-radius: 14px;
  }

  #alv-ticket-app .alv-chat-footer {
    padding: 0.72rem;
  }

  #alv-ticket-app .alv-chat-row {
    gap: 0.45rem;
  }

  #alv-ticket-app #alv-send,
  #alv-ticket-app .alv-chat-row .alv-upload-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    border-radius: 11px;
  }

  #alv-ticket-app .alv-chat-hint {
    display: none;
  }

  #alv-ticket-app .alv-payment-buttons .alv-btn {
    min-height: 50px;
    height: auto;
    border-radius: 11px;
  }

  #alv-ticket-app .alv-trust-box {
    display: none;
  }
}

@media (max-width: 380px) {
  #alv-ticket-app .alv-steps {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-chat {
    min-height: 330px;
  }

  #alv-ticket-app .alv-payment-assurance {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

/* ===== Customer ticket UX patch: header, chat priority, mobile comfort ===== */
#alv-ticket-app {
  --ticket-glass: rgba(15, 15, 23, 0.84);
  --ticket-glass-strong: rgba(21, 21, 31, 0.94);
  --ticket-line: rgba(255, 255, 255, 0.1);
}

#alv-ticket-app .alv-inline-header {
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--ticket-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#alv-ticket-app .alv-ticket-id {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  line-height: 1.1;
}

#alv-ticket-app #alv-status-badge {
  height: 28px;
  padding: 0 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

#alv-ticket-app .alv-header-right {
  gap: 0.45rem;
}

#alv-ticket-app .alv-agents-online,
#alv-ticket-app .alv-assigned-agent {
  min-height: 28px;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
}

#alv-ticket-app .alv-header-right a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.58rem;
  border: 1px solid var(--ticket-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  font-weight: 650;
  text-decoration: none;
}

#alv-ticket-app .alv-header-right a:hover {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(167, 139, 250, 0.08);
  color: var(--text);
  text-decoration: none;
}

#alv-ticket-app #alv-refresh {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 10px;
  padding: 0;
}

#alv-ticket-app .alv-chat {
  height: min(76vh, 780px);
  min-height: 520px;
  overflow: hidden;
  border-color: rgba(167, 139, 250, 0.16);
}

#alv-ticket-app .alv-chat .alv-panel-header {
  min-height: 54px;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.075), rgba(255, 255, 255, 0.015));
}

#alv-ticket-app .alv-chat .icon-box-purple {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(167, 139, 250, 0.18);
}

#alv-ticket-app .alv-chat .alv-panel-header h3 {
  font-size: 0.86rem;
  letter-spacing: 0;
}

#alv-ticket-app .alv-chat-body {
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, rgba(167, 139, 250, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(0, 0, 0, 0.14));
}

#alv-ticket-app .alv-messages {
  gap: 0.74rem;
  padding: 1rem 1.1rem 1.15rem;
}

#alv-ticket-app .alv-msg-row {
  align-items: flex-end;
}

#alv-ticket-app .alv-msg {
  max-width: min(78%, 620px);
  padding: 0.78rem 0.92rem;
  border-radius: 16px;
  line-height: 1.48;
}

#alv-ticket-app .alv-msg-user {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.038));
  border-color: rgba(255, 255, 255, 0.1);
}

#alv-ticket-app .alv-msg-support {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.075));
  border-color: rgba(167, 139, 250, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

#alv-ticket-app .alv-msg-system {
  max-width: min(92%, 560px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-muted);
}

#alv-ticket-app .alv-msg-sender {
  padding: 0 0.38rem;
  font-size: 0.66rem;
  letter-spacing: 0.01em;
}

#alv-ticket-app .alv-chat-footer {
  background: rgba(10, 10, 15, 0.94);
  border-top-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 -16px 28px rgba(0, 0, 0, 0.18);
}

#alv-ticket-app .alv-chat-row textarea {
  min-height: 48px;
  padding: 0.78rem 0.9rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
}

#alv-ticket-app .alv-chat-row textarea:focus {
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(255, 255, 255, 0.065);
}

#alv-ticket-app #alv-send:not(:disabled) {
  color: #fff;
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, #8b5cf6, #6d5dfc);
  box-shadow: 0 10px 26px rgba(109, 93, 252, 0.26);
}

#alv-ticket-app .alv-chat-row .alv-upload-btn:not(:disabled):hover {
  border-color: rgba(249, 200, 108, 0.32);
  background: rgba(249, 200, 108, 0.09);
  color: var(--gold);
}

#alv-ticket-app .alv-jump-latest {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: -2px auto 10px;
  padding: 0.48rem 0.82rem;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 999px;
  background: rgba(24, 22, 36, 0.94);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

#alv-ticket-app .alv-jump-latest:hover {
  border-color: rgba(249, 200, 108, 0.38);
  color: var(--gold);
}

#alv-ticket-app .alv-resource-preview {
  border-width: 1px;
  border-color: rgba(249, 200, 108, 0.2);
  background: linear-gradient(160deg, rgba(249, 200, 108, 0.045), rgba(255, 255, 255, 0.018));
}

#alv-ticket-app .alv-resource-preview::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.75), rgba(167, 139, 250, 0.55));
}

#alv-ticket-app .alv-resource-title h4 {
  color: var(--text);
}

#alv-ticket-app .alv-resource-badge {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

#alv-ticket-app .alv-resource-reveal-btn {
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(249, 200, 108, 0.18);
}

@media (max-width: 900px) {
  #alv-ticket-app .alv-grid {
    gap: 0.85rem;
  }

  #alv-ticket-app .alv-sidebar {
    display: grid;
    gap: 0.85rem;
  }

  #alv-ticket-app .alv-chat {
    height: min(68dvh, 640px);
    min-height: 440px;
  }
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-main {
    padding: 0.6rem;
  }

  #alv-ticket-app .alv-inline-header {
    position: sticky;
    top: 0.45rem;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.72rem;
    padding: 0.58rem;
    border-radius: 13px;
  }

  #alv-ticket-app .alv-ticket-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.98rem;
  }

  #alv-ticket-app #alv-status-badge {
    justify-self: end;
  }

  #alv-ticket-app .alv-assigned-agent {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  #alv-ticket-app .alv-header-right {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.42rem;
    margin-left: 0;
  }

  #alv-ticket-app .alv-agents-online {
    justify-content: center;
    min-width: 0;
    font-size: 0.68rem;
  }

  #alv-ticket-app .alv-header-right a {
    justify-content: center;
    font-size: 0.68rem;
  }

  #alv-ticket-app .alv-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.46rem;
    margin-bottom: 0.72rem;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  #alv-ticket-app .alv-steps::-webkit-scrollbar {
    display: none;
  }

  #alv-ticket-app .alv-step {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding: 0.56rem 0.58rem;
    scroll-snap-align: none;
  }

  #alv-ticket-app .alv-steps::before,
  #alv-ticket-app .alv-steps::after {
    display: none;
  }

  #alv-ticket-app .alv-chat {
    height: min(66dvh, 620px);
    min-height: 430px;
    border-radius: 14px;
  }

  #alv-ticket-app .alv-chat .alv-panel-header {
    min-height: 46px;
    padding: 0.65rem 0.72rem;
  }

  #alv-ticket-app .alv-messages {
    padding: 0.72rem 0.62rem 0.95rem;
    gap: 0.62rem;
  }

  #alv-ticket-app .alv-msg {
    max-width: calc(100% - 34px);
    padding: 0.68rem 0.78rem;
    border-radius: 14px;
    font-size: 0.83rem;
  }

  #alv-ticket-app .alv-msg-system {
    max-width: 100%;
    border-radius: 12px;
  }

  #alv-ticket-app .alv-chat-footer {
    padding: 0.62rem;
  }

  #alv-ticket-app .alv-chat-row textarea {
    min-height: 44px;
    padding: 0.68rem 0.74rem;
  }

  #alv-ticket-app #alv-send,
  #alv-ticket-app .alv-chat-row .alv-upload-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  #alv-ticket-app .alv-jump-latest {
    bottom: 8px;
    padding: 0.44rem 0.72rem;
    font-size: 0.72rem;
  }

  #alv-ticket-app .alv-resource-preview {
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  #alv-ticket-app .alv-header-right {
    grid-template-columns: 1fr auto;
  }

  #alv-ticket-app .alv-agents-online {
    grid-column: 1 / -1;
  }

  #alv-ticket-app .alv-chat {
    height: 64dvh;
    min-height: 390px;
  }

  #alv-ticket-app .alv-step {
    min-height: 56px;
  }
}

/* Icon hardening for compact ticket controls */
#alv-ticket-app button#alv-refresh {
  color: rgba(243, 241, 250, 0.72) !important;
  background: rgba(255, 255, 255, 0.055);
}

#alv-ticket-app button#alv-refresh svg,
#alv-ticket-app button#alv-upload-btn svg,
#alv-ticket-app .alv-chat-row button.alv-upload-btn svg {
  display: block !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  opacity: 1 !important;
  transform: none !important;
}

#alv-ticket-app button#alv-refresh svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
}

#alv-ticket-app button#alv-upload-btn {
  color: rgba(243, 241, 250, 0.62) !important;
}

#alv-ticket-app button#alv-upload-btn:hover {
  color: var(--gold) !important;
}

#alv-ticket-app button#alv-upload-btn svg,
#alv-ticket-app .alv-chat-row button.alv-upload-btn svg {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px !important;
  min-height: 21px !important;
  stroke-width: 2.15 !important;
}

#alv-ticket-app button#alv-refresh svg path,
#alv-ticket-app button#alv-upload-btn svg path {
  fill: none !important;
  stroke: currentColor !important;
  vector-effect: non-scaling-stroke;
}

/* ===== Customer chat premium pass: message rhythm and preview card ===== */
#alv-ticket-app .alv-chat-empty {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  width: min(100%, 340px);
  margin: 2.3rem auto;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.032);
  color: var(--text-muted);
  text-align: center;
}

#alv-ticket-app .alv-chat-empty-kicker {
  color: var(--purple-light);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#alv-ticket-app .alv-chat-empty strong {
  color: var(--text);
  font-size: 0.92rem;
}

#alv-ticket-app .alv-chat-empty span:last-child {
  font-size: 0.78rem;
  line-height: 1.45;
}

#alv-ticket-app .alv-date-divider,
#alv-ticket-app .alv-unread-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  margin: 0.35rem 0 0.1rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

#alv-ticket-app .alv-date-divider::before,
#alv-ticket-app .alv-date-divider::after,
#alv-ticket-app .alv-unread-divider::before,
#alv-ticket-app .alv-unread-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

#alv-ticket-app .alv-date-divider span,
#alv-ticket-app .alv-unread-divider span {
  flex: 0 0 auto;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(10, 10, 15, 0.68);
}

#alv-ticket-app .alv-unread-divider {
  color: var(--gold);
}

#alv-ticket-app .alv-unread-divider span {
  border-color: rgba(249, 200, 108, 0.24);
  background: rgba(249, 200, 108, 0.08);
}

#alv-ticket-app .alv-msg-row {
  gap: 0.42rem;
}

#alv-ticket-app .alv-msg-row-compact {
  margin-top: -0.44rem;
}

#alv-ticket-app .alv-msg-row-compact .alv-msg-sender {
  display: none;
}

#alv-ticket-app .alv-msg {
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

#alv-ticket-app .alv-msg-user {
  color: rgba(243, 241, 250, 0.94);
  background: linear-gradient(180deg, rgba(44, 45, 56, 0.92), rgba(29, 30, 39, 0.92));
  border-color: rgba(255, 255, 255, 0.11);
  border-bottom-right-radius: 7px;
}

#alv-ticket-app .alv-msg-support {
  color: rgba(248, 247, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(92, 76, 150, 0.36), rgba(58, 48, 98, 0.28)),
    rgba(23, 22, 32, 0.96);
  border-color: rgba(167, 139, 250, 0.26);
  border-bottom-left-radius: 7px;
}

#alv-ticket-app .alv-msg-row-compact .alv-msg-user {
  border-top-right-radius: 10px;
}

#alv-ticket-app .alv-msg-row-compact .alv-msg-support {
  border-top-left-radius: 10px;
}

#alv-ticket-app .alv-msg p {
  font-size: 0.88rem;
  line-height: 1.52;
}

#alv-ticket-app .alv-msg-time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  margin-top: 0.38rem;
  font-size: 0.62rem;
  line-height: 1;
  color: rgba(243, 241, 250, 0.42);
  font-variant-numeric: tabular-nums;
}

#alv-ticket-app .alv-msg-sender {
  margin-bottom: 3px;
  color: rgba(243, 241, 250, 0.48);
  font-size: 0.62rem;
}

#alv-ticket-app .alv-msg-sender-support {
  color: rgba(199, 181, 255, 0.88);
}

#alv-ticket-app .alv-msg-system {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-msg-reply-quote {
  border-left-color: rgba(249, 200, 108, 0.48);
  background: rgba(0, 0, 0, 0.18);
}

#alv-ticket-app .alv-msg-attachment {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

#alv-ticket-app .alv-resource-preview {
  padding: 1rem;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.095);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(13, 13, 20, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-resource-preview::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 200, 108, 0.48), rgba(167, 139, 250, 0.38), transparent);
}

#alv-ticket-app .alv-resource-header {
  gap: 0.72rem;
  margin-bottom: 0.85rem;
}

#alv-ticket-app .alv-resource-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(249, 200, 108, 0.08);
  border-color: rgba(249, 200, 108, 0.18);
}

#alv-ticket-app .alv-resource-icon svg {
  width: 17px;
  height: 17px;
}

#alv-ticket-app .alv-resource-title h4 {
  font-size: 0.86rem;
  letter-spacing: 0;
}

#alv-ticket-app .alv-resource-title span {
  display: block;
  margin-top: 1px;
  font-size: 0.69rem;
  line-height: 1.35;
}

#alv-ticket-app .alv-carousel-viewport {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

#alv-ticket-app .alv-carousel-tab {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-carousel-tab.active {
  color: var(--text);
  background: rgba(249, 200, 108, 0.09);
}

#alv-ticket-app .alv-slide-link {
  min-height: 74px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

#alv-ticket-app .alv-slide-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(167, 139, 250, 0.09);
}

#alv-ticket-app .alv-slide-link-open {
  padding: 6px 9px;
  border-radius: 8px;
}

#alv-ticket-app .alv-resource-image-wrap {
  max-height: 168px;
}

#alv-ticket-app .alv-resource-image {
  height: 168px;
}

#alv-ticket-app .alv-resource-overlay {
  background: rgba(10, 10, 15, 0.78);
}

#alv-ticket-app .alv-resource-overlay-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 0.55rem;
  animation: none;
}

#alv-ticket-app .alv-resource-reveal-btn {
  padding: 0.52rem 0.86rem;
  border: 1px solid rgba(249, 200, 108, 0.34);
  background: rgba(249, 200, 108, 0.1);
  color: var(--gold);
  box-shadow: none;
}

#alv-ticket-app .alv-resource-reveal-btn:hover {
  transform: translateY(-1px);
  background: rgba(249, 200, 108, 0.14);
  box-shadow: none;
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-chat-empty {
    margin: 1.45rem auto;
    padding: 0.85rem;
  }

  #alv-ticket-app .alv-date-divider,
  #alv-ticket-app .alv-unread-divider {
    gap: 0.48rem;
    margin: 0.26rem 0 0.04rem;
    font-size: 0.64rem;
  }

  #alv-ticket-app .alv-msg-row-compact {
    margin-top: -0.34rem;
  }

  #alv-ticket-app .alv-msg p {
    font-size: 0.83rem;
  }
}

/* ===== Customer chat visual refinement: cleaner support surface ===== */
#alv-ticket-app .alv-chat {
  background: rgba(12, 12, 17, 0.98);
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-chat .alv-panel-header {
  background: rgba(17, 17, 24, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.075);
}

#alv-ticket-app .alv-chat .icon-box-purple {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

#alv-ticket-app .alv-chat .icon-box-purple svg {
  stroke: rgba(243, 241, 250, 0.72);
}

#alv-ticket-app .alv-chat-body {
  background:
    linear-gradient(180deg, rgba(16, 16, 22, 0.98), rgba(10, 10, 14, 0.98));
}

#alv-ticket-app .alv-messages {
  padding: 1.08rem 1.14rem 1.2rem;
}

#alv-ticket-app .alv-msg {
  min-width: 132px;
  max-width: min(74%, 640px);
  padding: 0.82rem 0.96rem 0.68rem;
  border-radius: 15px;
  box-shadow: none;
  text-align: left;
}

#alv-ticket-app .alv-msg p {
  color: rgba(248, 247, 255, 0.93);
  font-size: 0.9rem;
  line-height: 1.55;
}

#alv-ticket-app .alv-msg-user {
  background: #24252d;
  border-color: rgba(255, 255, 255, 0.105);
  border-bottom-right-radius: 6px;
}

#alv-ticket-app .alv-msg-support {
  background: #181a22;
  border-color: rgba(255, 255, 255, 0.105);
  border-bottom-left-radius: 6px;
  box-shadow: inset 2px 0 0 rgba(249, 200, 108, 0.42);
}

#alv-ticket-app .alv-msg-row-compact .alv-msg-user,
#alv-ticket-app .alv-msg-row-compact .alv-msg-support {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

#alv-ticket-app .alv-msg-sender {
  margin-bottom: 4px;
  padding: 0 0.12rem;
  color: rgba(243, 241, 250, 0.46);
  font-size: 0.64rem;
  font-weight: 750;
}

#alv-ticket-app .alv-msg-sender-support {
  color: rgba(249, 200, 108, 0.78);
}

#alv-ticket-app .alv-msg-time {
  margin-top: 0.46rem;
  color: rgba(243, 241, 250, 0.38);
  font-size: 0.63rem;
}

#alv-ticket-app .alv-msg-status.alv-delivered .alv-check {
  stroke: rgba(167, 139, 250, 0.82);
}

#alv-ticket-app .alv-msg-system {
  min-width: 0;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.075);
  color: rgba(243, 241, 250, 0.46);
}

#alv-ticket-app .alv-chat-footer {
  background: rgba(13, 13, 18, 0.98);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

#alv-ticket-app .alv-chat-row textarea {
  background: #14151c;
  border-color: rgba(255, 255, 255, 0.095);
  color: rgba(248, 247, 255, 0.94);
}

#alv-ticket-app .alv-chat-row textarea:focus {
  background: #171821;
  border-color: rgba(249, 200, 108, 0.32);
  box-shadow: 0 0 0 3px rgba(249, 200, 108, 0.07);
}

#alv-ticket-app #alv-send:not(:disabled) {
  background: #f9c86c;
  border-color: rgba(249, 200, 108, 0.44);
  color: #121217;
  box-shadow: none;
}

#alv-ticket-app #alv-send:not(:disabled):hover {
  background: #ffd88a;
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-msg {
    min-width: 112px;
    max-width: calc(100% - 30px);
    padding: 0.74rem 0.82rem 0.62rem;
  }

  #alv-ticket-app .alv-msg p {
    font-size: 0.84rem;
  }
}

/* ===== Customer chat character rebalance: clean, not dry ===== */
#alv-ticket-app .alv-chat {
  background: linear-gradient(180deg, #17131f 0%, #111119 46%, #0b0b10 100%);
  border-color: rgba(249, 200, 108, 0.13);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(167, 139, 250, 0.035);
}

#alv-ticket-app .alv-chat .alv-panel-header {
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.065), rgba(139, 92, 246, 0.07), rgba(255, 255, 255, 0.015));
  border-bottom-color: rgba(249, 200, 108, 0.105);
}

#alv-ticket-app .alv-chat-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

#alv-ticket-app .alv-chat-title h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.12;
}

#alv-ticket-app .alv-chat-title span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(243, 241, 250, 0.42);
  font-size: 0.67rem;
  font-weight: 650;
  line-height: 1.2;
}

#alv-ticket-app .alv-chat-title span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 9px rgba(52, 211, 153, 0.45);
}

#alv-ticket-app .alv-chat .icon-box-purple {
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.12), rgba(139, 92, 246, 0.08));
  border-color: rgba(249, 200, 108, 0.18);
}

#alv-ticket-app .alv-chat .icon-box-purple svg {
  stroke: rgba(249, 200, 108, 0.92);
}

#alv-ticket-app .alv-chat-body {
  background:
    linear-gradient(180deg, rgba(22, 19, 31, 0.98) 0%, rgba(13, 13, 19, 0.99) 58%, rgba(9, 9, 13, 1) 100%);
  box-shadow: inset 0 18px 34px rgba(0, 0, 0, 0.12);
}

#alv-ticket-app .alv-msg {
  min-width: 150px;
  max-width: min(76%, 660px);
  border-radius: 16px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-msg-user {
  background: linear-gradient(180deg, #33323e 0%, #272833 100%);
  border-color: rgba(167, 139, 250, 0.16);
  border-bottom-right-radius: 7px;
}

#alv-ticket-app .alv-msg-support {
  background: linear-gradient(180deg, #24202d 0%, #191a23 100%);
  border-color: rgba(249, 200, 108, 0.18);
  border-bottom-left-radius: 7px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.22),
    inset 2px 0 0 rgba(249, 200, 108, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#alv-ticket-app .alv-msg p {
  color: rgba(250, 249, 255, 0.94);
}

#alv-ticket-app .alv-msg-sender-support {
  color: rgba(249, 200, 108, 0.9);
}

#alv-ticket-app .alv-msg-status.alv-delivered .alv-check {
  stroke: rgba(249, 200, 108, 0.78);
}

#alv-ticket-app .alv-date-divider span {
  border-color: rgba(167, 139, 250, 0.12);
  background: rgba(20, 18, 29, 0.82);
  color: rgba(243, 241, 250, 0.52);
}

#alv-ticket-app .alv-unread-divider span {
  border-color: rgba(249, 200, 108, 0.34);
  background: rgba(249, 200, 108, 0.105);
  color: rgba(249, 200, 108, 0.94);
}

#alv-ticket-app .alv-chat-footer {
  background: linear-gradient(180deg, rgba(18, 17, 24, 0.98), rgba(11, 11, 15, 0.99));
  border-top-color: rgba(249, 200, 108, 0.095);
}

#alv-ticket-app .alv-chat-row textarea {
  background: rgba(23, 22, 31, 0.96);
  border-color: rgba(167, 139, 250, 0.13);
}

#alv-ticket-app .alv-chat-row textarea:focus {
  background: rgba(27, 25, 36, 0.98);
  border-color: rgba(249, 200, 108, 0.38);
  box-shadow: 0 0 0 3px rgba(249, 200, 108, 0.075);
}

#alv-ticket-app #alv-send:not(:disabled) {
  background: linear-gradient(180deg, #f9c86c, #e9aa38);
  border-color: rgba(249, 200, 108, 0.54);
  color: #111015;
  box-shadow: 0 9px 22px rgba(249, 200, 108, 0.18);
}

#alv-ticket-app #alv-send:not(:disabled):hover {
  background: linear-gradient(180deg, #ffd98b, #efb64c);
}

#alv-ticket-app .alv-chat-row .alv-upload-btn:not(:disabled):hover {
  border-color: rgba(167, 139, 250, 0.34);
  background: rgba(167, 139, 250, 0.09);
  color: rgba(249, 200, 108, 0.92) !important;
}

#alv-ticket-app .alv-resource-preview {
  border-color: rgba(249, 200, 108, 0.16);
  background:
    linear-gradient(180deg, rgba(249, 200, 108, 0.055), rgba(139, 92, 246, 0.035) 46%, rgba(13, 13, 20, 0.96));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-resource-title h4 {
  color: rgba(249, 200, 108, 0.95);
}

#alv-ticket-app .alv-resource-title span {
  color: rgba(243, 241, 250, 0.48);
}

#alv-ticket-app .alv-resource-icon {
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.13), rgba(139, 92, 246, 0.08));
  border-color: rgba(249, 200, 108, 0.22);
}

#alv-ticket-app .alv-carousel-viewport {
  border-color: rgba(249, 200, 108, 0.1);
  background: rgba(7, 7, 11, 0.32);
}

#alv-ticket-app .alv-resource-reveal-btn {
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.16), rgba(249, 200, 108, 0.08));
  border-color: rgba(249, 200, 108, 0.34);
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder {
  padding: 0.72rem;
  margin-bottom: 0.72rem;
  border-radius: 12px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder::before {
  height: 1px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-header {
  gap: 0.52rem;
  margin-bottom: 0.5rem;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-icon svg {
  width: 14px;
  height: 14px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-title h4 {
  font-size: 0.78rem;
  line-height: 1.1;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-title span {
  font-size: 0.64rem;
  line-height: 1.2;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-resource-badge {
  padding: 0.1rem 0.35rem;
  font-size: 0.54rem;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-carousel-viewport {
  border: 0;
  background: transparent;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-empty {
  gap: 0;
  padding: 0;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-visual,
#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-copy {
  display: none;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-meta-row {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 8px;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-meta-row span {
  font-size: 0.52rem;
  line-height: 1;
}

#alv-ticket-app .alv-resource-preview.alv-resource-placeholder .alv-match-preview-meta-row strong {
  width: 100%;
  font-size: 0.64rem;
  line-height: 1.12;
}

#alv-ticket-app .alv-match-offer {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
    rgba(8, 7, 13, 0.22);
}

#alv-ticket-app .alv-match-offer.is-locked {
  border-color: rgba(249, 200, 108, 0.22);
  background:
    linear-gradient(135deg, rgba(249, 200, 108, 0.06), rgba(255, 255, 255, 0.022) 52%, rgba(139, 92, 246, 0.026)),
    rgba(8, 7, 13, 0.28);
  box-shadow:
    inset 2px 0 0 rgba(249, 200, 108, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

#alv-ticket-app .alv-match-offer.is-above:not(.is-locked) {
  border-color: rgba(249, 200, 108, 0.16);
}

#alv-ticket-app .alv-match-offer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#alv-ticket-app .alv-match-offer.is-locked .alv-match-offer-top {
  justify-content: flex-start;
}

#alv-ticket-app .alv-match-option-pill,
#alv-ticket-app .alv-match-lock-check {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(243, 241, 250, 0.62);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-option-pill.is-above {
  border-color: rgba(249, 200, 108, 0.22);
  background: rgba(249, 200, 108, 0.08);
  color: rgba(249, 200, 108, 0.94);
}

#alv-ticket-app .alv-match-option-pill.is-locked,
#alv-ticket-app .alv-match-lock-check {
  border-color: rgba(249, 200, 108, 0.22);
  background: rgba(249, 200, 108, 0.055);
  color: rgba(255, 238, 202, 0.86);
}

#alv-ticket-app .alv-match-offer-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#alv-ticket-app .alv-match-offer-main span,
#alv-ticket-app .alv-match-offer-note {
  color: rgba(243, 241, 250, 0.5);
  font-size: 0.64rem;
  font-weight: 700;
}

#alv-ticket-app .alv-match-offer-main strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 800;
}

#alv-ticket-app .alv-match-offer-note.is-above {
  color: rgba(249, 200, 108, 0.92);
}

#alv-ticket-app .alv-match-lock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(249, 200, 108, 0.28);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.14), rgba(249, 200, 108, 0.08));
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease, color 140ms ease;
}

#alv-ticket-app .alv-match-lock-btn span {
  font-size: 0.74rem;
  line-height: 1.1;
}

#alv-ticket-app .alv-match-lock-btn small {
  color: rgba(243, 241, 250, 0.45);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.1;
}

#alv-ticket-app .alv-match-lock-btn:hover:not(:disabled) {
  border-color: rgba(249, 200, 108, 0.5);
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.22), rgba(249, 200, 108, 0.12));
  color: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

#alv-ticket-app .alv-match-lock-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

#alv-ticket-app .alv-match-lock-btn:focus-visible {
  outline: 2px solid rgba(249, 200, 108, 0.58);
  outline-offset: 2px;
}

#alv-ticket-app .alv-match-lock-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

#alv-ticket-app .alv-match-lock-btn.is-ready {
  border-color: rgba(249, 200, 108, 0.36);
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.18), rgba(249, 200, 108, 0.09));
}

#alv-ticket-app .alv-match-selected-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-selected-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}

#alv-ticket-app .alv-match-selected-check svg {
  width: 10px;
  height: 10px;
}

#alv-ticket-app .alv-match-lock-btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) {
  padding: 0.78rem;
  margin-bottom: 0.72rem;
  border-radius: 12px;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) .alv-resource-header {
  gap: 0.58rem;
  margin-bottom: 0.58rem;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) .alv-resource-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) .alv-resource-title h4 {
  font-size: 0.84rem;
  line-height: 1.1;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) .alv-resource-title span {
  font-size: 0.64rem;
  line-height: 1.2;
}

#alv-ticket-app .alv-resource-preview:not(.alv-resource-placeholder) .alv-carousel-viewport {
  border-radius: 10px;
}

#alv-ticket-app .alv-total-price-stack {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}

#alv-ticket-app .alv-selected-match-line {
  display: none;
}

#alv-ticket-app .alv-selected-match-line.alv-hidden {
  display: none;
}

#alv-ticket-app .alv-match-offer {
  gap: 7px;
  margin-top: 7px;
  padding: 8px;
  border-radius: 9px;
}

#alv-ticket-app .alv-match-offer-top {
  gap: 7px;
}

#alv-ticket-app .alv-match-offer-price {
  min-width: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-offer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#alv-ticket-app .alv-match-offer-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 0 9px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 120ms ease, opacity 140ms ease;
}

#alv-ticket-app .alv-match-lock-btn span {
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-btn svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  opacity: 0.72;
  transition: transform 140ms ease, opacity 140ms ease;
}

#alv-ticket-app .alv-match-lock-btn small {
  display: none;
}

#alv-ticket-app .alv-match-lock-btn.is-switch {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 241, 250, 0.72);
}

#alv-ticket-app .alv-match-lock-btn.is-ready {
  border-color: rgba(249, 200, 108, 0.22);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 238, 202, 0.88);
}

#alv-ticket-app .alv-match-lock-btn:hover:not(:disabled) {
  border-color: rgba(249, 200, 108, 0.32);
  background: rgba(249, 200, 108, 0.095);
  color: rgba(255, 246, 220, 0.96);
  transform: translateY(-1px);
}

#alv-ticket-app .alv-match-lock-btn:hover:not(:disabled) svg {
  opacity: 1;
  transform: translateX(2px);
}

#alv-ticket-app .alv-match-lock-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

#alv-ticket-app .alv-match-lock-btn.is-switch:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
}

#alv-ticket-app .alv-match-lock-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

#alv-ticket-app .alv-match-lock-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
  animation: alvModalIn 180ms ease both;
}

#alv-ticket-app .alv-match-lock-modal.alv-hidden {
  display: none;
}

@keyframes alvModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

#alv-ticket-app .alv-match-lock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 11, 0.74);
  backdrop-filter: blur(10px);
}

#alv-ticket-app .alv-match-lock-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(13, 12, 19, 0.98);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  animation: alvDialogIn 160ms ease-out both;
}

#alv-ticket-app .alv-match-lock-dialog::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.16), rgba(255, 255, 255, 0.38), rgba(249, 200, 108, 0.22));
}

#alv-ticket-app .alv-match-lock-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.115);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

#alv-ticket-app .alv-match-lock-close-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

#alv-ticket-app .alv-match-lock-close:hover {
  border-color: rgba(249, 200, 108, 0.35);
  background: rgba(249, 200, 108, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

#alv-ticket-app .alv-match-lock-close:focus-visible {
  outline: 2px solid rgba(249, 200, 108, 0.58);
  outline-offset: 2px;
}

#alv-ticket-app .alv-match-lock-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 42px 12px 0;
}

#alv-ticket-app .alv-match-lock-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(249, 200, 108, 0.095);
  border: 1px solid rgba(249, 200, 108, 0.2);
  color: rgba(249, 200, 108, 0.92);
}

#alv-ticket-app .alv-match-lock-kicker {
  display: block;
  margin-bottom: 3px;
  color: rgba(249, 200, 108, 0.82);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-lock-dialog h3 {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
}

#alv-ticket-app .alv-match-lock-dialog > p {
  margin: 0 0 13px;
  color: rgba(243, 241, 250, 0.58);
  font-size: 0.78rem;
  line-height: 1.5;
}

#alv-ticket-app .alv-match-lock-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(249, 200, 108, 0.07), rgba(249, 200, 108, 0.015) 34%),
    rgba(255, 255, 255, 0.042);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

#alv-ticket-app .alv-match-lock-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#alv-ticket-app .alv-match-lock-label,
#alv-ticket-app .alv-match-lock-summary-price span {
  color: rgba(243, 241, 250, 0.48);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-lock-summary-copy strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-summary-copy small {
  min-width: 0;
  color: rgba(52, 211, 153, 0.74);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-summary-price {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  justify-items: end;
  min-width: 76px;
  text-align: right;
}

#alv-ticket-app .alv-match-lock-summary-price strong {
  color: rgba(249, 200, 108, 0.95);
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-error {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 0.76rem;
}

#alv-ticket-app .alv-match-lock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

#alv-ticket-app .alv-match-lock-actions .alv-btn {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1;
}

#alv-ticket-app .alv-match-lock-actions .alv-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

#alv-ticket-app .alv-match-lock-actions .alv-btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.085);
  color: rgba(255, 255, 255, 0.9);
}

#alv-ticket-app #alv-match-lock-confirm {
  border: 1px solid rgba(249, 200, 108, 0.36);
  background: linear-gradient(180deg, rgba(249, 200, 108, 0.9), rgba(198, 135, 34, 0.9));
  color: rgba(12, 10, 15, 0.96);
  box-shadow: 0 10px 24px rgba(249, 200, 108, 0.18);
}

#alv-ticket-app #alv-match-lock-confirm:hover:not(:disabled) {
  border-color: rgba(249, 200, 108, 0.52);
  background: linear-gradient(180deg, rgba(255, 215, 143, 0.96), rgba(210, 148, 45, 0.96));
  box-shadow: 0 12px 28px rgba(249, 200, 108, 0.24);
}

#alv-ticket-app #alv-match-lock-confirm.is-loading {
  opacity: 0.82;
  pointer-events: none;
}

@media (max-width: 520px) {
  #alv-ticket-app .alv-match-lock-modal {
    padding: 14px;
  }

  #alv-ticket-app .alv-match-lock-dialog {
    padding: 18px;
  }

  #alv-ticket-app .alv-match-lock-header {
    margin-right: 38px;
  }

  #alv-ticket-app .alv-match-lock-summary {
    align-items: flex-start;
  }

  #alv-ticket-app .alv-match-lock-actions {
    grid-template-columns: 1fr;
  }
}

/* Account selection modal: quieter trust step before checkout */
#alv-ticket-app .alv-match-lock-dialog {
  width: min(520px, 100%);
  padding: 22px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    linear-gradient(145deg, rgba(20, 18, 25, 0.99), rgba(10, 10, 15, 0.99));
}

#alv-ticket-app .alv-match-lock-dialog::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 200, 108, 0.42), rgba(52, 211, 153, 0.2), transparent);
}

#alv-ticket-app .alv-match-lock-header {
  display: grid;
  gap: 6px;
  margin: 0 44px 16px 0;
}

#alv-ticket-app .alv-match-lock-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(249, 200, 108, 0.22);
  border-radius: 999px;
  background: rgba(249, 200, 108, 0.075);
  color: rgba(249, 200, 108, 0.9);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-lock-kicker.is-switch {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.075);
  color: rgba(125, 241, 194, 0.9);
}

#alv-ticket-app .alv-match-lock-dialog h3 {
  margin: 0;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

#alv-ticket-app .alv-match-lock-dialog > .alv-match-lock-header > p {
  margin: 0;
  color: rgba(243, 241, 250, 0.62);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.45;
}

#alv-ticket-app .alv-match-lock-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  margin: 0 0 12px;
}

#alv-ticket-app .alv-match-lock-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#alv-ticket-app .alv-match-lock-price-card,
#alv-ticket-app .alv-match-lock-fact,
#alv-ticket-app .alv-match-lock-selected {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

#alv-ticket-app .alv-match-lock-price-card {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

#alv-ticket-app .alv-match-lock-price-card span,
#alv-ticket-app .alv-match-lock-fact span,
#alv-ticket-app .alv-match-lock-selected span {
  color: rgba(243, 241, 250, 0.5);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#alv-ticket-app .alv-match-lock-price-card strong {
  color: rgba(249, 200, 108, 0.96);
  font-size: 1.32rem;
  font-weight: 950;
  line-height: 1;
}

#alv-ticket-app .alv-match-lock-facts {
  display: none;
}

#alv-ticket-app .alv-match-lock-fact {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
}

#alv-ticket-app .alv-match-lock-fact strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.1;
}

#alv-ticket-app .alv-match-lock-selected {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
}

#alv-ticket-app .alv-match-lock-selected strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-match-lock-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 12px;
  padding: 10px 11px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.055);
  color: rgba(207, 252, 231, 0.82);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
}

#alv-ticket-app .alv-match-lock-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(52, 211, 153, 0.92);
}

#alv-ticket-app .alv-match-lock-actions {
  grid-template-columns: 0.95fr 1.2fr;
  gap: 10px;
}

#alv-ticket-app .alv-match-lock-actions .alv-btn {
  min-height: 44px;
}

#alv-ticket-app .alv-match-lock-actions .alv-btn svg {
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-match-lock-dialog {
    padding: 18px;
  }

  #alv-ticket-app .alv-match-lock-header {
    margin-right: 38px;
  }

  #alv-ticket-app .alv-match-lock-body {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-match-lock-actions {
    grid-template-columns: 1fr;
  }
}

#alv-ticket-app .alv-payment-state {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

#alv-ticket-app .alv-payment-state strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
}

#alv-ticket-app .alv-payment-state span {
  color: rgba(243, 241, 250, 0.55);
  font-size: 0.72rem;
  line-height: 1.35;
}

#alv-ticket-app .alv-payment-state.is-success {
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(52, 211, 153, 0.07);
}

#alv-ticket-app .alv-payment-state.is-success strong {
  color: #34d399;
}

#alv-ticket-app .alv-payment-state.is-selected.alv-payment-match-card {
  gap: 7px;
  padding: 11px 12px 10px;
  border-color: rgba(255, 255, 255, 0.105);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(249, 200, 108, 0.045), rgba(249, 200, 108, 0) 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  position: relative;
  text-align: left;
}

#alv-ticket-app .alv-payment-state.is-selected.alv-payment-match-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(249, 200, 108, 0.04), rgba(249, 200, 108, 0.58), rgba(52, 211, 153, 0.34));
}

#alv-ticket-app .alv-payment-match-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

#alv-ticket-app .alv-payment-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: rgba(255, 248, 234, 0.82);
  font-size: 0.6rem;
  font-weight: 780;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

#alv-ticket-app .alv-payment-match-unlocked {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 7px;
  background: rgba(52, 211, 153, 0.055);
  color: rgba(183, 255, 226, 0.8);
  font-size: 0.58rem;
  font-weight: 780;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

#alv-ticket-app .alv-payment-match-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.9);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.08);
  color: #07130f;
  font-size: 0.58rem;
  font-weight: 950;
}

#alv-ticket-app .alv-payment-match-title {
  display: block;
  min-width: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-payment-match-copy {
  margin: 0;
  color: rgba(243, 241, 250, 0.56);
  font-size: 0.66rem;
  font-weight: 620;
  line-height: 1.32;
}

#alv-ticket-app .alv-payment-match-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

#alv-ticket-app .alv-payment-match-meta span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(243, 241, 250, 0.48);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#alv-ticket-app .alv-payment-match-meta span:first-child {
  color: rgba(163, 255, 218, 0.68);
}

@media (max-width: 600px) {
  #alv-ticket-app .alv-chat-title span {
    font-size: 0.63rem;
  }

  #alv-ticket-app .alv-msg {
    min-width: 128px;
    max-width: calc(100% - 28px);
  }
}

/* ===== Message bubble color fix: no dead grey bubbles ===== */
#alv-ticket-app .alv-msg {
  position: relative;
  border-width: 1px;
}

#alv-ticket-app .alv-msg-user {
  background:
    linear-gradient(155deg, rgba(111, 86, 184, 0.34) 0%, rgba(53, 45, 82, 0.88) 42%, rgba(30, 28, 44, 0.98) 100%);
  border-color: rgba(167, 139, 250, 0.28);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(139, 92, 246, 0.1);
}

#alv-ticket-app .alv-msg-user::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.2), transparent 42%);
  opacity: 0.55;
}

#alv-ticket-app .alv-msg-user p,
#alv-ticket-app .alv-msg-support p {
  position: relative;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

#alv-ticket-app .alv-msg-support {
  background:
    linear-gradient(155deg, rgba(249, 200, 108, 0.13) 0%, rgba(39, 32, 34, 0.92) 38%, rgba(20, 20, 27, 0.98) 100%);
  border-color: rgba(249, 200, 108, 0.23);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.25),
    inset 2px 0 0 rgba(249, 200, 108, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-msg-time {
  position: relative;
  color: rgba(255, 255, 255, 0.46);
}

#alv-ticket-app .alv-msg-sender-user {
  color: rgba(199, 181, 255, 0.82);
}

#alv-ticket-app .alv-msg-status.alv-delivered .alv-check {
  stroke: rgba(249, 200, 108, 0.86);
}

#alv-ticket-app .alv-msg-system {
  background: rgba(24, 22, 34, 0.72);
  border-color: rgba(167, 139, 250, 0.12);
  color: rgba(243, 241, 250, 0.58);
}

#alv-ticket-app .alv-msg-row-compact .alv-msg-user {
  background:
    linear-gradient(155deg, rgba(103, 80, 170, 0.3) 0%, rgba(49, 42, 76, 0.88) 42%, rgba(29, 27, 42, 0.98) 100%);
}

/* ===== Ticket frontend ambient background polish: quiet dark surface ===== */
body:has(#alv-ticket-app) {
  background: #17131d;
}

#alv-ticket-app {
  --bg: #17131d;
  --border: rgba(255, 255, 255, 0.09);
  --border-light: rgba(255, 255, 255, 0.15);
  --shadow-card:
    0 12px 30px rgba(4, 4, 8, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-bg {
  background:
    radial-gradient(circle at 50% -10%, rgba(249, 200, 108, 0.055), transparent 420px),
    linear-gradient(180deg, #191620 0%, #17131d 48%, #141219 100%);
}

#alv-ticket-app .alv-bg::before {
  opacity: 0.12;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.055) 0%, transparent 70%);
  filter: blur(55px);
  animation: none;
}

#alv-ticket-app .alv-bg::after {
  opacity: 0.08;
  background: radial-gradient(circle, rgba(249, 200, 108, 0.05) 0%, transparent 70%);
  filter: blur(55px);
  animation: none;
}

#alv-ticket-app .alv-skeleton-wrapper {
  background:
    radial-gradient(circle at 50% -12%, rgba(249, 200, 108, 0.05), transparent 360px),
    linear-gradient(180deg, #191620 0%, #17131d 100%);
}

#alv-ticket-app .alv-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.052) 0%, rgba(255, 255, 255, 0.026) 100%);
  border-color: rgba(255, 255, 255, 0.085);
}

#alv-ticket-app .alv-panel-gradient {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.055) 0%, rgba(255, 255, 255, 0.026) 100%);
}

#alv-ticket-app .alv-chat {
  background: linear-gradient(180deg, #16151b 0%, #121118 50%, #0f0f14 100%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 14px 32px rgba(4, 4, 8, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#alv-ticket-app .alv-chat .alv-panel-header {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
}

#alv-ticket-app .alv-chat-body {
  background:
    linear-gradient(180deg, rgba(19, 18, 25, 0.98) 0%, rgba(14, 14, 19, 0.99) 100%);
}

#alv-ticket-app .alv-chat-footer {
  background: linear-gradient(180deg, rgba(18, 17, 23, 0.98), rgba(13, 13, 18, 0.99));
}

#alv-ticket-app .alv-chat-row textarea {
  background: rgba(19, 18, 25, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== Ticket flow cleanup: calmer states, clearer checkout timing ===== */
#alv-ticket-app {
  --ticket-panel: rgba(255, 255, 255, 0.035);
  --ticket-panel-strong: rgba(255, 255, 255, 0.055);
  --ticket-line: rgba(255, 255, 255, 0.105);
  --ticket-line-soft: rgba(255, 255, 255, 0.075);
  --ticket-copy: rgba(246, 243, 234, 0.74);
  --ticket-muted: rgba(246, 243, 234, 0.52);
  --ticket-gold: #f2c76d;
}

#alv-ticket-app.alv-ticket-unavailable-active .alv-main {
  display: none;
}

#alv-ticket-app .alv-ticket-unavailable {
  position: relative;
  z-index: 2;
  min-height: min(760px, calc(100vh - 120px));
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem;
}

#alv-ticket-app .alv-ticket-unavailable-card {
  width: min(100%, 560px);
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--ticket-line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.024)),
    #121117;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

#alv-ticket-app .alv-ticket-unavailable-kicker,
#alv-ticket-app .alv-review-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #ff6f87;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#alv-ticket-app .alv-ticket-unavailable-kicker::before,
#alv-ticket-app .alv-review-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

#alv-ticket-app .alv-ticket-unavailable h1 {
  margin: 0.7rem 0 0.55rem;
  color: #fffaf0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.04;
  letter-spacing: 0;
}

#alv-ticket-app .alv-ticket-unavailable p {
  margin: 0;
  max-width: 48ch;
  color: var(--ticket-copy);
  font-size: 0.98rem;
  line-height: 1.6;
}

#alv-ticket-app .alv-ticket-unavailable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

#alv-ticket-app .alv-ticket-unavailable-actions .alv-btn {
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
}

#alv-ticket-app .alv-ticket-unavailable-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ticket-line-soft);
}

#alv-ticket-app .alv-ticket-unavailable-note span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ticket-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

#alv-ticket-app .alv-ticket-unavailable-note span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ticket-gold);
}

#alv-ticket-app .alv-main {
  padding-top: clamp(1.5rem, 3vw, 2.35rem);
}

#alv-ticket-app .alv-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

#alv-ticket-app .alv-sidebar {
  gap: 0.85rem;
}

#alv-ticket-app .alv-review-status {
  padding: 1rem;
  border: 1px solid rgba(249, 200, 108, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(249, 200, 108, 0.052), rgba(255, 255, 255, 0.022)),
    rgba(13, 13, 18, 0.82);
}

#alv-ticket-app .alv-review-status-head {
  display: grid;
  gap: 0.45rem;
}

#alv-ticket-app .alv-review-status-head strong {
  color: #fff7df;
  font-size: 1.02rem;
  line-height: 1.22;
}

#alv-ticket-app .alv-review-status p {
  margin: 0.7rem 0 0;
  color: var(--ticket-copy);
  font-size: 0.82rem;
  line-height: 1.55;
}

#alv-ticket-app .alv-review-timeline {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ticket-line-soft);
}

#alv-ticket-app .alv-review-timeline span {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(246, 243, 234, 0.7);
  font-size: 0.78rem;
  font-weight: 750;
}

#alv-ticket-app .alv-review-timeline b {
  color: var(--ticket-gold);
  font-size: 0.7rem;
}

#alv-ticket-app .alv-review-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

#alv-ticket-app .alv-review-foot span {
  padding: 0.34rem 0.55rem;
  border: 1px solid var(--ticket-line-soft);
  border-radius: 999px;
  color: var(--ticket-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  font-weight: 800;
}

#alv-ticket-app #alv-payment {
  border-radius: 14px;
  border-color: rgba(249, 200, 108, 0.18);
  background:
    linear-gradient(180deg, rgba(249, 200, 108, 0.065), rgba(255, 255, 255, 0.024)),
    rgba(13, 13, 18, 0.86);
  box-shadow: none;
}

#alv-ticket-app #alv-payment::before {
  opacity: 0.55;
}

#alv-ticket-app .alv-payment-body {
  padding: 1rem;
}

#alv-ticket-app .alv-total-display {
  align-items: flex-start;
  gap: 1rem;
  padding: 0 0 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom-color: var(--ticket-line-soft);
}

#alv-ticket-app .alv-total-label {
  color: var(--ticket-muted);
  letter-spacing: 0.04em;
}

#alv-ticket-app .alv-total-value {
  color: #fff3d0;
  font-size: 1.75rem;
  font-weight: 850;
  letter-spacing: 0;
}

#alv-ticket-app .alv-payment-buttons {
  margin: 0;
}

#alv-ticket-app .alv-payment-buttons .alv-btn {
  min-height: 50px;
  border-radius: 10px;
  justify-content: center;
  gap: 0.65rem;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .pay-icon {
  width: 18px;
  height: 18px;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-copy {
  align-items: center;
  text-align: center;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-copy strong {
  font-size: 0.9rem;
  letter-spacing: 0;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-copy small {
  margin-top: 0.1rem;
}

#alv-ticket-app .alv-trust-box {
  margin: 0.8rem 0 0;
  padding: 0.85rem 0 0;
  border: 0;
  border-top: 1px solid var(--ticket-line-soft);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

#alv-ticket-app .alv-trust-main {
  margin: 0 0 0.7rem;
  color: var(--ticket-copy);
  font-size: 0.78rem;
  line-height: 1.45;
}

#alv-ticket-app .alv-trust-links,
#alv-ticket-app .alv-trust-delivery {
  justify-content: flex-start;
}

#alv-ticket-app .alv-trust-links {
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

#alv-ticket-app .alv-trust-link {
  border: 1px solid var(--ticket-line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(246, 243, 234, 0.72);
}

#alv-ticket-app .alv-trust-link:hover {
  color: var(--ticket-gold);
  border-color: rgba(249, 200, 108, 0.24);
  background: rgba(249, 200, 108, 0.055);
}

#alv-ticket-app .alv-trust-delivery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

#alv-ticket-app .alv-trust-delivery span {
  justify-content: flex-start;
  color: var(--ticket-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

#alv-ticket-app .alv-ticket-awaiting-offer .alv-chat {
  min-height: 560px;
}

@media (max-width: 980px) {
  #alv-ticket-app .alv-grid {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-sidebar {
    order: -1;
  }

  #alv-ticket-app .alv-ticket-awaiting-offer .alv-chat {
    min-height: 460px;
  }
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-ticket-unavailable-actions .alv-btn,
  #alv-ticket-app .alv-payment-buttons .alv-btn {
    width: 100%;
  }

  #alv-ticket-app .alv-trust-delivery {
    grid-template-columns: 1fr;
  }
}

/* Ticket payment final cleanup */
#alv-ticket-app #alv-payment {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(14, 14, 18, 0.92);
}

#alv-ticket-app #alv-payment::before {
  display: none;
}

#alv-ticket-app .alv-payment-body {
  display: grid;
  gap: 0.85rem;
  padding: 1.05rem;
}

#alv-ticket-app .alv-total-display {
  padding-bottom: 0.8rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

#alv-ticket-app .alv-total-label {
  color: rgba(246, 243, 234, 0.55);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

#alv-ticket-app .alv-total-value {
  color: #fff2cf;
  font-size: clamp(1.6rem, 4vw, 1.9rem);
  line-height: 1;
}

#alv-ticket-app .alv-payment-state.is-selected.alv-payment-match-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.1rem 0 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  text-align: left;
}

#alv-ticket-app .alv-payment-state.is-selected.alv-payment-match-card::before {
  display: none;
}

#alv-ticket-app .alv-payment-match-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

#alv-ticket-app .alv-payment-match-label {
  min-width: 0;
  color: rgba(246, 243, 234, 0.55);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
}

#alv-ticket-app .alv-payment-match-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 55%;
  min-height: 20px;
  padding: 0 0.48rem;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.065);
  color: rgba(191, 255, 230, 0.82);
  font-size: 0.58rem;
  font-weight: 820;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-payment-match-title {
  margin-top: 0.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
}

#alv-ticket-app .alv-payment-match-copy {
  color: rgba(246, 243, 234, 0.6);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
}

#alv-ticket-app .alv-payment-match-note {
  color: rgba(249, 200, 108, 0.75);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.1;
}

#alv-ticket-app .alv-payment-buttons {
  margin: 0;
}

#alv-ticket-app .alv-payment-buttons .alv-btn {
  min-height: 52px;
  padding: 0.78rem 1rem;
  border: 1px solid rgba(241, 213, 151, 0.5) !important;
  border-radius: 11px;
  background-color: #d4b06a !important;
  background-image:
    linear-gradient(180deg, rgba(255, 249, 225, 0.42) 0%, rgba(255, 249, 225, 0.08) 32%, transparent 33%),
    linear-gradient(180deg, #efdca9 0%, #d4b06a 58%, #ad7c34 100%) !important;
  color: #14100a !important;
  box-shadow:
    0 13px 28px rgba(173, 124, 52, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(81, 52, 17, 0.2) !important;
}

#alv-ticket-app .alv-payment-buttons .alv-btn::before,
#alv-ticket-app .alv-payment-buttons .alv-btn::after {
  display: none !important;
  content: none !important;
}

#alv-ticket-app .alv-payment-buttons .alv-btn:hover:not(:disabled) {
  border-color: rgba(255, 231, 178, 0.7) !important;
  background-image:
    linear-gradient(180deg, rgba(255, 252, 237, 0.5) 0%, rgba(255, 249, 225, 0.12) 34%, transparent 35%),
    linear-gradient(180deg, #f4e5ba 0%, #dcba72 58%, #b9873e 100%) !important;
  color: #14100a !important;
  transform: translateY(-1px);
}

#alv-ticket-app .alv-payment-buttons .alv-btn:disabled {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
  background-image: none !important;
  color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: none !important;
  opacity: 1;
}

#alv-ticket-app .alv-ticket-pay-wallet {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(82, 58, 18, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 226, 0.34);
  color: #46300d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

#alv-ticket-app .alv-payment-buttons .alv-btn:disabled .alv-ticket-pay-wallet {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.48);
  box-shadow: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-wallet .pay-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-copy strong {
  color: inherit !important;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
}

#alv-ticket-app .alv-trust-box {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

#alv-ticket-app .alv-trust-main {
  margin: 0;
  color: rgba(246, 243, 234, 0.66);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
}

#alv-ticket-app .alv-trust-links,
#alv-ticket-app .alv-trust-delivery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin: 0;
}

#alv-ticket-app .alv-trust-link,
#alv-ticket-app .alv-trust-delivery span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 0.38rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246, 243, 234, 0.56);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

#alv-ticket-app .alv-trust-link:hover {
  color: rgba(249, 200, 108, 0.86);
  background: transparent;
}

#alv-ticket-app .alv-trust-link svg,
#alv-ticket-app .alv-trust-delivery svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  color: rgba(249, 200, 108, 0.72);
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-payment-match-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  #alv-ticket-app .alv-payment-match-status {
    max-width: 100%;
  }

  #alv-ticket-app .alv-trust-links,
  #alv-ticket-app .alv-trust-delivery {
    grid-template-columns: 1fr;
  }
}

/* Ticket payment polish v2 */
#alv-ticket-app #alv-payment {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.01)),
    rgba(13, 13, 17, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 38px rgba(0, 0, 0, 0.18);
}

#alv-ticket-app .alv-payment-body {
  gap: 0.9rem;
  padding: 1rem;
}

#alv-ticket-app .alv-total-display {
  align-items: center;
  padding-bottom: 0.82rem;
}

#alv-ticket-app .alv-total-label {
  color: rgba(246, 243, 234, 0.52);
  font-size: 0.74rem;
  font-weight: 700;
}

#alv-ticket-app .alv-total-value {
  color: #fff4d6;
  font-size: 1.86rem;
  font-weight: 780;
}

#alv-ticket-app .alv-payment-state.is-selected.alv-payment-match-card {
  gap: 0.42rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.012);
}

#alv-ticket-app .alv-payment-match-line {
  gap: 0.55rem;
}

#alv-ticket-app .alv-payment-match-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 760;
}

#alv-ticket-app .alv-payment-match-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

#alv-ticket-app .alv-payment-match-status {
  min-height: 21px;
  padding: 0 0.52rem;
  border-color: rgba(249, 200, 108, 0.2);
  background: rgba(249, 200, 108, 0.075);
  color: rgba(255, 230, 170, 0.9);
  font-size: 0.63rem;
  font-weight: 740;
}

#alv-ticket-app .alv-payment-match-title {
  display: -webkit-box;
  margin: -0.02rem 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.79rem;
  font-weight: 760;
  line-height: 1.24;
  max-height: 1.96rem;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#alv-ticket-app .alv-payment-match-copy {
  color: rgba(246, 243, 234, 0.58);
  font-size: 0.72rem;
  font-weight: 520;
}

#alv-ticket-app .alv-payment-match-note {
  color: rgba(246, 243, 234, 0.44);
  font-size: 0.68rem;
  font-weight: 620;
}

#alv-ticket-app .alv-payment-buttons .alv-btn {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  justify-content: center;
  min-height: 52px;
  padding: 0.72rem 1rem;
  gap: 0.68rem;
  border-radius: 12px;
}

#alv-ticket-app .alv-ticket-pay-wallet {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-color: rgba(20, 16, 10, 0.18);
  background: rgba(20, 16, 10, 0.1);
  color: #241807;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-wallet .pay-icon {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  fill: currentColor !important;
  stroke: none !important;
  opacity: 1 !important;
  box-sizing: content-box !important;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-wallet .pay-icon path {
  fill: currentColor !important;
  stroke: none !important;
}

#alv-ticket-app .alv-payment-buttons .alv-btn .alv-ticket-pay-copy strong {
  font-size: 0.86rem;
  font-weight: 820;
}

#alv-ticket-app .alv-trust-box {
  gap: 0.55rem;
  padding-top: 0.78rem;
}

#alv-ticket-app .alv-trust-main {
  position: relative;
  padding-left: 0.75rem;
  color: rgba(246, 243, 234, 0.56);
  font-size: 0.72rem;
  font-weight: 550;
}

#alv-ticket-app .alv-trust-main::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.44em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.9);
}

#alv-ticket-app .alv-trust-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

#alv-ticket-app .alv-trust-point {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 0.34rem;
  min-height: 34px;
  padding: 0.4rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
  color: rgba(246, 243, 234, 0.63);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

#alv-ticket-app .alv-trust-point:hover {
  color: rgba(249, 200, 108, 0.9);
  border-color: rgba(249, 200, 108, 0.18);
  background: rgba(249, 200, 108, 0.045);
}

#alv-ticket-app .alv-trust-point svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  color: rgba(249, 200, 108, 0.72);
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-trust-points {
    grid-template-columns: 1fr;
  }
}

/* Ticket message links */
#alv-ticket-app .alv-msg-text-rich {
  overflow-wrap: anywhere;
}

#alv-ticket-app .alv-msg-link-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin: 3px 0;
  padding: 4px 7px;
  border: 1px solid rgba(249, 200, 108, 0.12);
  border-radius: 8px;
  background: rgba(249, 200, 108, 0.045);
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease;
}

#alv-ticket-app .alv-msg-link-card:hover,
#alv-ticket-app .alv-msg-link-card:focus-visible {
  border-color: rgba(249, 200, 108, 0.24);
  background: rgba(249, 200, 108, 0.075);
  outline: none;
}

#alv-ticket-app .alv-msg-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 6px;
  background: transparent;
  color: rgba(249, 200, 108, 0.78);
}

#alv-ticket-app .alv-msg-link-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

#alv-ticket-app .alv-msg-link-copy {
  display: grid;
  min-width: 0;
  gap: 0;
}

#alv-ticket-app .alv-msg-link-copy strong,
#alv-ticket-app .alv-msg-link-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#alv-ticket-app .alv-msg-link-copy strong {
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.2;
}

#alv-ticket-app .alv-msg-link-copy small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.61rem;
  font-weight: 620;
  line-height: 1.1;
}

#alv-ticket-app .alv-msg-user .alv-msg-link-card {
  border-color: rgba(0, 0, 0, 0.09);
  background: rgba(0, 0, 0, 0.075);
}

#alv-ticket-app .alv-msg-user .alv-msg-link-icon {
  background: transparent;
}

#alv-ticket-app .alv-msg-user .alv-msg-link-copy small {
  color: rgba(20, 15, 4, 0.5);
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-msg-link-card {
    display: flex;
    width: 100%;
  }
}

/* Closed ticket state */
#alv-ticket-app .status-closed,
#alv-ticket-app .status-canceled {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(246, 243, 234, 0.62);
}

#alv-ticket-app .alv-closed-notice {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  width: min(440px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  padding: 0.95rem;
  border: 1px solid rgba(249, 200, 108, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(249, 200, 108, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(12, 14, 19, 0.88);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(16px);
}

#alv-ticket-app .alv-closed-notice.alv-hidden {
  display: none;
}

#alv-ticket-app .alv-closed-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(249, 200, 108, 0.28);
  border-radius: 10px;
  background: rgba(249, 200, 108, 0.08);
  color: rgba(249, 200, 108, 0.92);
}

#alv-ticket-app .alv-closed-notice-icon svg {
  width: 18px;
  height: 18px;
}

#alv-ticket-app .alv-closed-notice-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

#alv-ticket-app .alv-closed-notice-copy strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.2;
}

#alv-ticket-app .alv-closed-notice-copy p,
#alv-ticket-app .alv-closed-notice-copy span {
  margin: 0;
  color: rgba(246, 243, 234, 0.62);
  font-size: 0.78rem;
  line-height: 1.45;
}

#alv-ticket-app .alv-closed-notice-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.14rem;
}

#alv-ticket-app .alv-closed-notice-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 243, 234, 0.82);
  font-size: 0.72rem;
  font-weight: 760;
  text-decoration: none;
}

#alv-ticket-app .alv-closed-notice-actions a:hover {
  border-color: rgba(249, 200, 108, 0.26);
  color: rgba(249, 200, 108, 0.95);
  background: rgba(249, 200, 108, 0.055);
}

#alv-ticket-app.alv-ticket-closed .alv-chat-row,
#alv-ticket-app.alv-ticket-closed .alv-chat-hint,
#alv-ticket-app.alv-ticket-closed .alv-reply-preview,
#alv-ticket-app.alv-ticket-closed .alv-attach-preview {
  display: none !important;
}

#alv-ticket-app.alv-ticket-closed .alv-msg-reply-btn {
  display: none !important;
}

#alv-ticket-app.alv-ticket-closed #alv-msgs {
  filter: blur(3px);
  opacity: 0.42;
  pointer-events: none;
  transform: scale(0.997);
  transform-origin: center;
  user-select: none;
}

#alv-ticket-app.alv-ticket-closed .alv-chat-body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.16), rgba(8, 10, 14, 0.5)),
    rgba(8, 10, 14, 0.08);
}

@media (max-width: 560px) {
  #alv-ticket-app .alv-closed-notice {
    grid-template-columns: 1fr;
  }

  #alv-ticket-app .alv-closed-notice-actions {
    grid-column: 1;
  }

  #alv-ticket-app .alv-closed-notice-actions a {
    flex: 1 1 130px;
  }
}
