:root {
  --bg-main: #0B0E14;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(197, 168, 128, 0.5);
  
  --accent-gold: #D4AF37;
  --accent-gold-light: #F3E5AB;
  --accent-cyan: #38BDF8;
  --accent-emerald: #10B981;
  --accent-rose: #FB7185;
  --accent-amber: #F59E0B;

  --text-main: #F3F4F6;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(16px);
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.app-container {
  max-width: 1720px;
  width: 96%;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 28px;
  box-shadow: var(--shadow-card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 30%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-text {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.market-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.market-pill strong {
  color: var(--accent-cyan);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #D4AF37 0%, #AA8417 100%);
  color: #0B0E14;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* COMMAND BAR / STAT CARDS */
.command-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card .label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stat-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.batch-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.batch-score {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.score-denom {
  font-size: 1rem;
  color: var(--text-dim);
}

/* MAIN LAYOUT */
.main-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}

/* SIDEBAR / PATTERN LIST & CLIPART LIST */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.sidebar-search-box {
  margin-bottom: 12px;
}

.sb-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.sb-search-input:focus {
  border-color: var(--accent-gold);
}

.clipart-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.clipart-sidebar-list::-webkit-scrollbar {
  width: 5px;
}
.clipart-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.sb-clipart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.sb-clipart-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateX(2px);
}

.sb-clipart-item.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.sb-clipart-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: repeating-conic-gradient(#202530 0% 25%, #151820 0% 50%) 50% / 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sb-clipart-thumb img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}

.sb-clipart-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-clipart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sb-clipart-id {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.sb-clipart-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-clipart-name {
  font-size: 0.78rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.sb-clipart-cat {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-section {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

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

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.filter-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.pattern-grid::-webkit-scrollbar {
  width: 6px;
}
.pattern-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.pattern-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pattern-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.pattern-card.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.pattern-thumb-wrap {
  width: 100%;
  aspect-ratio: 1;
  background-size: 50%;
  background-repeat: repeat;
  background-position: center;
}

.pattern-card-meta {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 14, 20, 0.85);
}

.pat-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
}

.pat-score-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.score-high {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

/* MOTIF ROW */
.motif-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.motif-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.motif-box img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 6px;
}

.motif-caption {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.2;
}

/* INSPECTOR PANEL */
.inspector-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}

/* TABS */
.inspector-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--accent-gold-light);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  font-weight: 700;
}

.tab-content {
  display: none;
}

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

/* TILER VIEWPORT */
.tiler-viewport-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.viewport-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.tiler-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.badge-layout {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-controls label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-group {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle.active {
  background: var(--accent-gold);
  color: #0B0E14;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 1;
  margin: 16px auto;
  overflow: hidden;
  background-color: #12141C;
  cursor: grab;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(0, 0, 0, 0.35);
}

.canvas-wrapper:active {
  cursor: grabbing;
}

#tilerCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.reviewer-decision-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
}

.decision-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.decision-meta .label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
}

.status-badge {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.status-approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-flagged {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-rejected {
  background: rgba(244, 63, 94, 0.2);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.decision-actions {
  display: flex;
  gap: 10px;
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.metric-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38BDF8, #10B981);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.metric-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.35;
}

/* MOCKUPS DISPLAY */
.mockups-display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mockup-frame {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mockup-frame:first-child {
  grid-column: span 2;
}

.mockup-label {
  padding: 10px 16px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.mockup-frame img {
  width: 100%;
  display: block;
}

/* VIDEO PREVIEW */
.video-preview-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.video-info h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.video-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.video-container {
  max-width: 620px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
}

.video-container video {
  width: 100%;
  display: block;
}

/* SEO TAB */
.seo-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.seo-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.form-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
}

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-tag {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.guide-status-text {
  font-size: 0.85rem;
  color: var(--accent-emerald);
  margin-top: 8px;
}

/* ==========================================================================
   CLIPART LIBRARY TAB & ASSET CATALOG STYLES
   ========================================================================== */

.library-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.library-header-card {
  background: rgba(18, 24, 38, 0.7);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.library-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.library-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 8px;
  margin-bottom: 4px;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-accent {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

/* Recommendation Box */
.recommendation-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  animation: fadeIn 0.3s ease;
}

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

.rec-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rec-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rec-icon {
  font-size: 1.5rem;
}

.rec-header h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--accent-gold-light);
}

.rec-motifs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .rec-motifs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rec-motif-mini {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.rec-motif-mini img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.rec-motif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.rec-motif-role {
  font-size: 0.72rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Filter Bar & Search */
.library-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.library-search-input {
  width: 100%;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 12px 44px 12px 46px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.library-search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  background: rgba(15, 20, 32, 0.95);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.clear-search-btn:hover {
  color: var(--text-main);
}

/* Category Filter Pills */
.category-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-pill.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold-light);
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  font-weight: 600;
}

.category-pill .pill-count {
  font-size: 0.72rem;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
}

.library-meta-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.library-hint {
  font-style: italic;
}

/* Clipart Cards Grid */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.motif-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.motif-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(212, 175, 55, 0.1);
}

.motif-card-preview-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121620;
  /* Checkerboard pattern for transparency */
  background-image: 
    linear-gradient(45deg, #181d2a 25%, transparent 25%), 
    linear-gradient(-45deg, #181d2a 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #181d2a 75%), 
    linear-gradient(-45deg, transparent 75%, #181d2a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  padding: 16px;
}

.motif-card-preview-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

.motif-card:hover .motif-card-preview-wrap img {
  transform: scale(1.08);
}

.motif-sheet-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 14, 23, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--accent-gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.motif-vector-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.motif-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.motif-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.motif-id-tag {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.motif-category-crumb {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motif-card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.motif-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.motif-micro-tag {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
}

.motif-tones-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.motif-tone-label {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.tone-swatch-list {
  display: flex;
  gap: 4px;
}

.tone-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
}

.motif-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 8px;
}

.btn-motif-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border-subtle);
}

.btn-motif-png {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-motif-png:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: var(--accent-cyan);
}

.btn-motif-svg {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-motif-svg:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--accent-emerald);
}

.btn-motif-copy {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  width: 32px;
  flex: 0 0 32px;
  padding: 0;
}

.btn-motif-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* ==========================================================================
   5W SEO FRAMEWORK & PRODUCT MULTIPLIER STYLES
   ========================================================================== */

.seo-header-row {
  margin-bottom: 20px;
}

.multiplier-switcher {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.multiplier-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-gold);
}

.multiplier-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-multiplier {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-multiplier:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-multiplier.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.title-meta-header, .tags-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.char-count-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.formula-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

.formula-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

.chip-d1 {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.chip-d2 {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.chip-anchor {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.formula-sep {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.9rem;
}

.input-with-action {
  display: flex;
  gap: 10px;
}

.input-with-action .form-control {
  flex-grow: 1;
}

/* 5W Tags Grid Matrix */
.matrix-5w-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.tag-5w-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tag-5w-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.tag-5w-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.w-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.w-badge-WHO {
  background: rgba(168, 85, 247, 0.2);
  color: #C084FC;
}

.w-badge-WHAT {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
}

.w-badge-WHERE {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

.w-badge-WHEN {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.w-badge-WHY {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.tag-5w-len {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.tag-5w-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.tag-5w-rationale {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.value-delivery-card {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.delivery-icon {
  font-size: 1.4rem;
}

.delivery-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--accent-gold-light);
}

.delivery-specs-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   GUIDED ONE-BY-ONE REVIEW STEPPER STYLES
   ========================================================================== */

.guided-review-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(90deg, rgba(26, 36, 51, 0.95) 0%, rgba(18, 25, 36, 0.98) 100%);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 12px 12px 0 0;
}

.btn-nav {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-nav:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.guided-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guided-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-badge {
  font-size: 0.82rem;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.step-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.guided-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.guided-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #D4AF37 100%);
  border-radius: 3px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auto-advance-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.05em;
}

.btn-lg-action {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  padding: 10px 18px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px !important;
  transition: transform 0.1s ease, box-shadow 0.2s ease !important;
  cursor: pointer;
}

.btn-lg-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-lg-action:active {
  transform: scale(0.98);
}

.keyboard-legend-bar {
  padding: 10px 20px;
  background: rgba(11, 15, 25, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

.keyboard-legend-bar code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-gold-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
}

/* Completion Modal */
.review-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  animation: fadeIn 0.3s ease;
}

.review-modal-card {
  width: 90%;
  max-width: 520px;
  background: #151D2A;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.review-modal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.mstat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mval {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.mlbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #AA820A 100%);
  color: #0B0E14;
  border: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  filter: brightness(1.15);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   REVIEWER FEEDBACK & COMMENT SECTION
   ========================================================================== */

.reviewer-feedback-section {
  padding: 12px 20px;
  background: rgba(18, 26, 38, 0.95);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px 12px;
  transition: border-color 0.2s ease;
}

.feedback-input-row:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.feedback-icon {
  font-size: 1.1rem;
}

.feedback-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.88rem;
  padding: 8px 0;
  font-family: inherit;
}

.feedback-input::placeholder {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.feedback-quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-tag-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-tag:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
}

.quick-tag.active {
  background: var(--accent-gold);
  color: #0B0E14;
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* ==========================================================================
   APPROVED COLLECTION DEDICATED GALLERY TAB
   ========================================================================== */

.approved-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(20, 45, 34, 0.8) 0%, rgba(15, 28, 22, 0.95) 100%);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  margin-bottom: 24px;
}

.approved-gallery-info h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #34D399;
  display: flex;
  align-items: center;
  gap: 10px;
}

.approved-gallery-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.approved-pattern-card {
  background: #141C28;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.approved-pattern-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.2);
  border-color: #34D399;
}

.approved-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
}

.approved-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.approved-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.approved-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.approved-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.approved-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.approved-card-actions .btn {
  flex: 1;
  padding: 6px;
  font-size: 0.78rem;
  text-align: center;
}

/* Sidebar Filter Pills */
.sidebar-filters {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
  font-weight: 700;
}

/* ==========================================================================
   CLIPART CUTOUT & TRANSPARENCY QA INSPECTOR STYLES
   ========================================================================== */

.clipart-qa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(20, 24, 33, 0.95), rgba(12, 14, 20, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.clipart-qa-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.clipart-qa-title-wrap p {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.35;
}

.clipart-qa-stats-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qa-stat-pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.qa-stat-total strong { color: var(--accent-gold-light); }
.qa-stat-approved { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.qa-stat-approved strong { color: var(--accent-emerald); }
.qa-stat-flagged { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.qa-stat-flagged strong { color: var(--accent-amber); }
.qa-stat-rejected { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.qa-stat-rejected strong { color: #F87171; }
.qa-stat-unreviewed { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.2); }
.qa-stat-unreviewed strong { color: #94A3B8; }

/* QA Toolbar */
.clipart-qa-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.qa-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qa-filter-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.qa-filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.qa-filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
  font-weight: 700;
}

.qa-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.qa-select {
  padding: 6px 10px;
  font-size: 0.78rem;
  background: rgba(15, 18, 25, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.qa-select:focus {
  border-color: var(--accent-gold);
}

.qa-view-toggle-btns {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px;
}

.qa-view-btn {
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qa-view-btn.active {
  background: var(--accent-gold);
  color: #0B0E14;
}

/* ==========================================================================
   GUIDED QA INSPECTOR CARD & SPLIT STUDIO WORKSPACE
   ========================================================================== */

.qa-inspector-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

/* Stepper Header Navigation */
.guided-review-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
}

.btn-nav {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--accent-gold);
}

.guided-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 650px;
}

.guided-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.step-badge strong {
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-size: 0.95rem;
}

.step-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guided-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.guided-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-emerald));
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* 2-Column Split Studio Workspace */
.qa-split-workspace {
  display: grid;
  grid-template-columns: minmax(400px, 460px) 1fr;
  gap: 16px;
  padding: 12px 16px;
  align-items: start;
}

@media (max-width: 1200px) {
  .qa-split-workspace {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Square Stage & Stage Controls */
.qa-stage-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* Background Switcher */
.qa-bg-switcher {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.btn-qa-bg {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-qa-bg:hover {
  color: #fff;
}

.btn-qa-bg.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}

.swatch-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
}

.swatch-checker {
  background: repeating-conic-gradient(#808080 0% 25%, #ffffff 0% 50%) 50% / 6px 6px;
}
.swatch-dark { background: #111827; }
.swatch-white { background: #FFFFFF; }
.swatch-linen { background: #EFE5D2; }
.swatch-emerald { background: #162B1E; }
.swatch-crimson { background: #691A23; }

/* Interactive Square Clipart Stage */
.qa-stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  min-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
  transition: background 0.3s ease;
  margin-top: 6px;
}

.qa-stage-wrapper.bg-checkerboard {
  background-color: #1a1d24;
  background-image: 
    linear-gradient(45deg, #12141a 25%, transparent 25%), 
    linear-gradient(-45deg, #12141a 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #12141a 75%), 
    linear-gradient(-45deg, transparent 75%, #12141a 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.qa-stage-wrapper.bg-dark {
  background-color: #111827 !important;
  background-image: none !important;
}

.qa-stage-wrapper.bg-white {
  background-color: #FFFFFF !important;
  background-image: none !important;
}

.qa-stage-wrapper.bg-linen {
  background-color: #EFE5D2 !important;
  background-image: none !important;
}

.qa-stage-wrapper.bg-emerald {
  background-color: #162B1E !important;
  background-image: none !important;
}

.qa-stage-wrapper.bg-crimson {
  background-color: #691A23 !important;
  background-image: none !important;
}

.qa-stage-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
}

/* Smart Background Eraser Toolbar */
.eraser-studio-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-top: 6px;
  backdrop-filter: blur(8px);
}

.eraser-toolbar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.eraser-toolbar-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eraser-tool-group {
  display: flex;
  gap: 4px;
}

.eraser-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.eraser-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.eraser-tool-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(16, 185, 129, 0.2));
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.eraser-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eraser-slider-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.eraser-slider-item strong {
  color: var(--accent-gold);
  font-weight: 700;
  display: inline-block;
  min-width: 24px;
}

.eraser-range-input {
  width: 75px;
  height: 4px;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.eraser-range-input::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s;
}

.eraser-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.eraser-actions-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.eraser-hint-inline {
  font-size: 0.68rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

#qaStageImg, #qaStageCanvas {
  max-width: 86%;
  max-height: 86%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  cursor: crosshair;
  user-select: none;
  transform-origin: center center;
  will-change: transform;
}

#qaStageImg.qa-zoom-1, #qaStageCanvas.qa-zoom-1 { transform: scale(1); }
#qaStageImg.qa-zoom-2, #qaStageCanvas.qa-zoom-2 { transform: scale(1.6); }
#qaStageImg.qa-zoom-3, #qaStageCanvas.qa-zoom-3 { transform: scale(2.3); }
#qaStageImg.qa-zoom-fit, #qaStageCanvas.qa-zoom-fit { max-height: 70%; max-width: 70%; }

.qa-raw-comparison-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed var(--accent-gold);
  max-width: 40%;
}

.qa-raw-comparison-wrap img {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
}

.qa-raw-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
}

.qa-stage-overlay-tools {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  pointer-events: none;
}

.qa-stage-overlay-tools > * {
  pointer-events: auto;
}

.qa-zoom-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

/* Right Column: QA Decision & Feedback Panel */
.qa-panel-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 20, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  backdrop-filter: var(--glass-blur);
}

/* Motif Spec Card */
.qa-spec-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.qa-spec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-spec-details {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.qa-spec-details strong {
  color: var(--text-main);
}

/* Quality Issue Tags Grid */
.qa-card-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.block-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.qa-tags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.qa-tag {
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.qa-tag.active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #EF4444;
  color: #FCA5A5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
  font-weight: 700;
}

/* Feedback Input */
.feedback-input-row {
  display: flex;
  gap: 6px;
}

.feedback-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.feedback-input:focus {
  border-color: var(--accent-gold);
}

/* Action Buttons */
.qa-action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.btn-block-action {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5) !important;
  transform: translateY(-1px);
}

.secondary-actions-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.secondary-actions-row .btn {
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.keyboard-legend-bar {
  font-size: 0.74rem;
  color: var(--text-dim);
  text-align: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.keyboard-legend-bar code {
  color: var(--accent-gold-light);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

/* Status Badges for QA */
.status-unreviewed {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-qa-approved {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-qa-flagged {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-qa-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Horizontal Quick Strip */
.qa-quick-strip-wrap {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

.qa-quick-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.qa-strip-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
}

.dot-unreviewed { background: #64748B; }
.dot-approved { background: #10B981; }
.dot-flagged { background: #F59E0B; }
.dot-rejected { background: #EF4444; }

.qa-quick-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
}

.qa-strip-thumb {
  position: relative;
  flex: 0 0 54px;
  height: 54px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qa-strip-thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.qa-strip-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.qa-strip-thumb.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.qa-strip-thumb .status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.6);
}

/* Grid Matrix View */
.qa-grid-matrix-container {
  padding: 10px 0;
}

.qa-grid-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.qa-matrix-card {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.qa-matrix-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qa-matrix-card.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.qa-matrix-thumb-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.2s ease;
}

.qa-matrix-thumb-wrap img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
}

.qa-matrix-status-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.qa-matrix-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.qa-matrix-id {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.qa-matrix-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-matrix-category {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.qa-matrix-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.qa-issue-micro-badge {
  font-size: 0.65rem;
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.qa-matrix-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
}

.qa-matrix-actions button {
  flex: 1;
  padding: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-card-app {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.4);
}
.btn-card-app:hover {
  background: var(--accent-emerald);
  color: #fff;
}

.btn-card-rej {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-card-rej:hover {
  background: #EF4444;
  color: #fff;
}

/* ==========================================================================
   OPERATIONS TRACK BOARD & AI AGENT DISPATCHER STYLES
   ========================================================================== */

.trackboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  gap: 16px;
}

.trackboard-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #F9FAFB;
  margin: 0;
}

.trackboard-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 4px 0 0;
  line-height: 1.4;
}

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

/* METRICS BAR */
.trackboard-metrics-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.tb-metric-chip {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tb-metric-chip:hover, .tb-metric-chip.active {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-1px);
}

.tb-metric-chip.highlight {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
}

.tb-chip-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.tb-chip-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #F9FAFB;
  margin-top: 2px;
  font-family: var(--font-heading);
}

.tb-metric-chip.highlight .tb-chip-val {
  color: var(--accent-gold-light);
}

/* KANBAN BOARD 5-COLUMN CONTAINER */
.kanban-board-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-board-container::-webkit-scrollbar {
  height: 8px;
}
.kanban-board-container::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

/* KANBAN COLUMN */
.kanban-column {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 600px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s;
}

.kanban-column.stage-BACKLOG { border-top: 3px solid #64748B; }
.kanban-column.stage-IN_PROGRESS { border-top: 3px solid #38BDF8; }
.kanban-column.stage-QA_AUDIT { border-top: 3px solid #A855F7; }
.kanban-column.stage-PACKAGING { border-top: 3px solid #10B981; }
.kanban-column.stage-READY_FOR_RELEASE { border-top: 3px solid var(--accent-gold); }

.kanban-col-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #F1F5F9;
  letter-spacing: -0.01em;
}

.kanban-col-count {
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.kanban-col-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 480px;
}

/* TICKET CARD */
.ticket-card {
  background: rgba(26, 32, 48, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ticket-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

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

.ticket-id-tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  color: #94A3B8;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
}

.ticket-priority-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ticket-priority-badge.CRITICAL {
  background: rgba(244, 63, 94, 0.2);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.ticket-priority-badge.HIGH {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ticket-priority-badge.NORMAL {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ticket-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F8FAFC;
  line-height: 1.35;
  margin: 0;
}

.ticket-desc {
  font-size: 0.76rem;
  color: #94A3B8;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: #E2E8F0;
  width: fit-content;
}

.ticket-agent-badge .avatar {
  font-size: 0.95rem;
}

/* PROGRESS BAR */
.ticket-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #64748B;
  font-weight: 600;
}

.ticket-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.ticket-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #10B981);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.ticket-card.stage-READY_FOR_RELEASE .ticket-progress-fill {
  background: linear-gradient(90deg, #F59E0B, var(--accent-gold));
}

/* PAYLOAD PILLS */
.ticket-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ticket-chip {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  padding: 2px 7px;
  border-radius: 4px;
}

.ticket-chip.gold {
  color: var(--accent-gold-light);
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  font-weight: 600;
}

/* LOG PREVIEW */
.ticket-log-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.68rem;
  color: #94A3B8;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid #3B82F6;
}

/* CARD ACTIONS */
.ticket-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-ticket-run {
  flex: 1;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.25));
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-ticket-run:hover {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-ticket-inspect {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 9px;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ticket-inspect:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

.btn-ticket-delete {
  background: rgba(239, 68, 68, 0.1);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 6px 8px;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ticket-delete:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* SIDEBAR AGENT SQUAD ITEMS */
.sidebar-agent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  transition: all 0.15s ease;
}

.sidebar-agent-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.sb-agent-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sb-agent-avatar {
  font-size: 1.25rem;
}

.sb-agent-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #F3F4F6;
  margin: 0;
}

.sb-agent-role {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin: 1px 0 0;
  line-height: 1.2;
}

.sb-agent-status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sb-agent-status-badge.working {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* LIVE AGENT STREAMING HUD */
.live-stream-hud {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.live-stream-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38BDF8, #818CF8, #A855F7, #38BDF8);
  background-size: 200% 100%;
  animation: streamGradient 3s linear infinite;
}

@keyframes streamGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.hud-top-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hud-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot-pulse {
  width: 10px;
  height: 10px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10B981;
  animation: pulseBeacon 1.5s ease-in-out infinite;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.live-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #38BDF8;
}

.hud-active-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #E2E8F0;
}

.hud-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38BDF8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hud-content-grid {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-avatar-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1E293B;
  border: 2px solid #38BDF8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.hud-avatar-monogram {
  font-size: 1.1rem;
  font-weight: 800;
  color: #38BDF8;
}

.hud-details {
  flex: 1;
}

.hud-task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.hud-task-row h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #F8FAFC;
}

.hud-progress-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: #38BDF8;
  font-family: monospace;
}

.hud-step-desc {
  margin: 0 0 8px 0;
  font-size: 0.82rem;
  color: #94A3B8;
}

.hud-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.hud-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38BDF8, #818CF8);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* AUDIT MEMORY STATS CARDS */
.audit-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.audit-stat-card {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
}

.audit-stat-label {
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.audit-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #F8FAFC;
}

.audit-stat-val.highlight {
  color: #10B981;
}

.directive-card {
  background: #0F172A;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-left: 4px solid #A855F7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.directive-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.directive-id {
  font-weight: 700;
  color: #C084FC;
  font-size: 0.8rem;
}

.directive-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
  border-radius: 10px;
}

.directive-rule {
  font-size: 0.88rem;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 4px;
}

.directive-origin {
  font-size: 0.78rem;
  color: #94A3B8;
}



