:root {
    --bg-dark: hsl(222, 24%, 8%);
    --bg-panel: hsla(222, 20%, 12%, 0.7);
    --border-color: hsla(210, 20%, 25%, 0.4);
    --text-primary: hsl(210, 30%, 96%);
    --text-muted: hsl(210, 15%, 70%);
    
    --accent: hsl(172, 95%, 45%);
    --accent-glow: hsla(172, 95%, 45%, 0.2);
    
    /* State colors */
    --state-blocked-bg: hsla(350, 70%, 12%, 0.5);
    --state-blocked-border: hsl(350, 75%, 45%);
    --state-blocked-text: hsl(350, 90%, 75%);
    
    --state-ready-bg: hsla(42, 80%, 12%, 0.5);
    --state-ready-border: hsl(42, 85%, 48%);
    --state-ready-text: hsl(42, 95%, 72%);
    
    --state-completed-bg: hsla(145, 75%, 10%, 0.5);
    --state-completed-border: hsl(145, 80%, 40%);
    --state-completed-text: hsl(145, 85%, 75%);

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --shadow-premium: 0 16px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 1px hsla(210, 30%, 100%, 0.05);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 2rem;
}

/* Background glowing orbs */
.glass-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(172, 95%, 45%, 0.08) 0%, transparent 70%);
    top: -150px;
    left: -150px;
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.glass-bg-glow.secondary {
    top: 50%;
    right: -150px;
    left: auto;
    background: radial-gradient(circle, hsla(280, 95%, 55%, 0.04) 0%, transparent 70%);
    animation: pulseGlow 20s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(50px, 50px); }
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* HEADER STYLE */
.app-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
    padding: 2rem 1.5rem;
    width: 280px;
    min-width: 280px;
    height: calc(100vh - 3rem);
    position: sticky;
    top: 1.5rem;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), hsl(280, 90%, 55%));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    box-shadow: 0 0 20px hsla(172, 95%, 45%, 0.3);
}

.brand-logo svg {
    width: 24px;
    height: 24px;
}

.brand h1 {
    font-size: 1.4rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, hsl(210, 15%, 80%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.brand .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

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

.active-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: hsla(145, 80%, 15%, 0.3);
    border: 1px solid hsla(145, 80%, 40%, 0.3);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--state-completed-text);
}

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

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px var(--state-completed-border); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.process-selector-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.process-selector-container label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.glass-select {
    background: hsla(222, 20%, 8%, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.glass-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.glow-btn {
    background: linear-gradient(135deg, var(--accent), hsl(172, 90%, 35%));
    border: none;
    border-radius: 8px;
    color: var(--bg-dark);
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px hsla(172, 95%, 45%, 0.45);
}

.glow-btn:active {
    transform: translateY(0);
}

.app-grid {
    display: grid;
    grid-template-columns: 340px 1fr 400px;
    grid-template-rows: auto 1fr;
    gap: 1.25rem;
    height: calc(100vh - 4.5rem);
    min-height: 650px;
}

/* PANELS */
.grid-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: hsla(222, 20%, 10%, 0.4);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.panel-title h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* LEFT COLUMN: GATES LIST */
.instance-indicator {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: hsla(210, 20%, 25%, 0.4);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.gates-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gate-card {
    background: hsla(222, 20%, 8%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gate-card:hover {
    transform: translateX(4px);
    border-color: hsla(210, 20%, 40%, 0.6);
}

.gate-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

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

.gate-card-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.gate-state-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gate-state-pill.blocked {
    background: var(--state-blocked-bg);
    border: 1px solid var(--state-blocked-border);
    color: var(--state-blocked-text);
}

.gate-state-pill.ready {
    background: var(--state-ready-bg);
    border: 1px solid var(--state-ready-border);
    color: var(--state-ready-text);
    animation: goldPulse 2s infinite ease-in-out;
}

@keyframes goldPulse {
    0% { box-shadow: 0 0 0px hsla(42, 85%, 48%, 0); }
    50% { box-shadow: 0 0 8px hsla(42, 85%, 48%, 0.4); }
    100% { box-shadow: 0 0 0px hsla(42, 85%, 48%, 0); }
}

.gate-state-pill.completed {
    background: var(--state-completed-bg);
    border: 1px solid var(--state-completed-border);
    color: var(--state-completed-text);
}

.gate-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gate-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.gate-meta-item svg {
    width: 12px;
    height: 12px;
}

.gate-badge-ai {
    background: hsla(280, 95%, 55%, 0.15);
    border: 1px solid hsla(280, 95%, 55%, 0.4);
    color: hsl(280, 90%, 85%);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
}

/* DEPENDENCY CONNECTOR LINES */
.dependency-list {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* MIDDLE COLUMN: WORKSPACE */
.workspace-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    gap: 1rem;
    max-width: 400px;
    margin: auto;
}

.empty-state svg.large-icon {
    width: 64px;
    height: 64px;
    color: hsla(210, 20%, 35%, 0.5);
}

.empty-state h3 {
    color: var(--text-primary);
    font-weight: 600;
}

.gold-text {
    color: var(--state-ready-border);
    font-weight: 600;
}

/* ACTIVE WORKSPACE GATE LAYOUT */
.active-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.workspace-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.workspace-header .gate-type-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    background: hsla(210, 20%, 25%, 0.4);
    border-radius: 4px;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.workspace-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.workspace-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.evidence-form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.evidence-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.evidence-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.glass-input {
    background: hsla(222, 20%, 8%, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.glass-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* AI AGENT MODULE */
.ai-agent-card {
    background: hsla(280, 95%, 55%, 0.03);
    border: 1px solid hsla(280, 95%, 55%, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 32px 0 rgba(147, 51, 234, 0.05);
}

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

.ai-agent-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(280, 95%, 75%);
    font-weight: 700;
    font-size: 0.9rem;
}

.ai-agent-tag svg {
    width: 18px;
    height: 18px;
}

.model-pill {
    background: hsla(280, 95%, 55%, 0.15);
    border: 1px solid hsla(280, 95%, 55%, 0.4);
    color: hsl(280, 90%, 85%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

.ai-details-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: hsla(222, 20%, 6%, 0.5);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.ai-details-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.ai-details-row .label {
    color: var(--text-muted);
}

.ai-details-row .val {
    font-family: var(--font-mono);
    font-weight: 500;
}

.ai-prompt-box {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: hsla(222, 20%, 5%, 0.8);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    white-space: pre-wrap;
    border: 1px solid var(--border-color);
    max-height: 120px;
    overflow-y: auto;
}

.btn-trigger-ai {
    background: linear-gradient(135deg, hsl(280, 90%, 55%), hsl(260, 90%, 45%));
    border: none;
    color: white;
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-trigger-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.5);
}

.btn-trigger-ai:disabled {
    opacity: 0.5;
    transform: none;
    cursor: not-allowed;
}

.ai-output-box {
    margin-top: 1rem;
    background: hsla(145, 75%, 6%, 0.4);
    border: 1px solid hsla(145, 80%, 40%, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.ai-output-box h4 {
    color: var(--state-completed-text);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-output-box pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    white-space: pre-wrap;
    color: var(--text-primary);
}

/* RIGHT COLUMN: METRICS & AUDIT */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.metric-card {
    background: hsla(222, 20%, 8%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.metric-val {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}

.audit-ledger-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.25rem;
    gap: 1rem;
}

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

.ledger-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.glass-btn {
    background: hsla(210, 20%, 25%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s;
}

.glass-btn:hover:not(:disabled) {
    background: hsla(210, 20%, 35%, 0.6);
    border-color: var(--accent);
}

.glass-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ledger-log-container {
    flex: 1;
    background: hsla(222, 20%, 5%, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-ledger {
    color: var(--text-muted);
    text-align: center;
    margin: auto;
}

.ledger-entry {
    border-left: 2px solid var(--border-color);
    padding-left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ledger-entry.start { border-color: var(--accent); }
.ledger-entry.unlocked { border-color: var(--state-ready-border); }
.ledger-entry.completed { border-color: var(--state-completed-border); }

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

.ledger-title {
    font-weight: 500;
    color: var(--text-primary);
}

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

.ledger-ai-badge {
    background: hsla(280, 95%, 55%, 0.1);
    color: hsl(280, 95%, 80%);
    border: 1px solid hsla(280, 95%, 55%, 0.3);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    font-size: 0.6rem;
    display: inline-block;
    margin-top: 0.2rem;
}

/* APP FOOTER */
.app-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Loading animations */
.loading-spinner {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 2px solid var(--text-primary);
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   PHASE 2 VISUAL STYLING (TABS, BUILDER & REPLAY)
   ========================================================================== */

/* Navigation Tabs */
.app-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.nav-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    transition: all 0.3s;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: hsla(210, 20%, 25%, 0.15);
}

.nav-tab.active {
    color: var(--accent);
    background: hsla(172, 95%, 45%, 0.08);
    border: 1px solid hsla(172, 95%, 45%, 0.25);
    box-shadow: 0 0 15px rgba(172, 95%, 45%, 0.1);
}

/* Builder Layout Grid */
.builder-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    min-height: 650px;
}

.builder-workspace-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
}

.step-creator-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-right: 1px solid var(--border-color);
    padding-right: 1.5rem;
    overflow-y: auto;
}

.steps-list-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-left: 0.5rem;
}

/* Divider & Layout Utilities */
.border-top-divider {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.dependencies-checklist {
    background: hsla(222, 20%, 6%, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dependencies-checklist label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-muted);
}

.dependencies-checklist label:hover {
    color: var(--text-primary);
}

/* Dynamic Evidence Rows */
.evidence-row-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.evidence-row-item input {
    flex: 2;
}

.evidence-row-item select {
    flex: 1;
}

/* Builder Step Cards */
.builder-step-card {
    background: hsla(222, 20%, 8%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.builder-step-card:hover {
    border-color: hsla(210, 20%, 40%, 0.5);
}

.builder-step-card:active {
    cursor: grabbing;
}

.builder-step-card.dragging {
    opacity: 0.4;
    border: 1px dashed var(--accent);
    background: hsla(172, 95%, 45%, 0.05);
}

.builder-step-card.drag-over {
    border-top: 3px solid var(--accent);
    padding-top: calc(0.75rem - 2px);
}

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

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--state-blocked-border);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-remove-item:hover {
    background: hsla(350, 75%, 45%, 0.15);
}

/* Roles labels pill */
.role-pill-badge {
    background: hsla(210, 20%, 25%, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* History Replay drag-drop wrapper */
.replay-dropzone-wrapper {
    flex: 1;
    display: flex;
    background: hsla(222, 20%, 8%, 0.3);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    margin: 2rem 0;
    transition: all 0.3s;
    cursor: pointer;
}

.replay-dropzone-wrapper.dragover {
    border-color: var(--accent);
    background: hsla(172, 95%, 45%, 0.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

.pulsing-icon {
    animation: simplePulse 2s infinite alternate ease-in-out;
}

@keyframes simplePulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.08); opacity: 1; }
}

/* Replay frame details */
.replay-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: hsla(42, 80%, 12%, 0.4);
    border: 1px solid var(--state-ready-border);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.85rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}

/* AI Generator Panel Styling */
.ai-generator-panel {
    background: hsla(280, 95%, 55%, 0.02);
    border: 1px solid hsla(280, 95%, 55%, 0.1);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px hsla(280, 95%, 55%, 0.03);
    transition: all 0.3s ease;
}

.ai-generator-panel:hover {
    border-color: hsla(280, 95%, 55%, 0.25);
    box-shadow: 0 4px 25px hsla(280, 95%, 55%, 0.06);
}

.glow-btn-secondary {
    background: hsla(210, 20%, 25%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.glow-btn-secondary:hover:not(:disabled) {
    background: hsla(210, 20%, 35%, 0.6);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-edit-item {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.3s;
    margin-right: 0.25rem;
}

.btn-edit-item:hover {
    background: hsla(172, 95%, 45%, 0.15);
}

.builder-step-card.editing-highlight {
    border-color: hsl(43, 95%, 55%);
    box-shadow: 0 0 15px hsla(43, 95%, 45%, 0.4);
    background: hsla(43, 95%, 25%, 0.1);
}

.btn-advanced-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    outline: none;
}

.btn-advanced-toggle:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* Folder Tree List Styles */
.folder-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: hsla(210, 20%, 20%, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.folder-pill:hover {
    background: hsla(172, 95%, 45%, 0.08);
    border-color: hsla(172, 95%, 45%, 0.35);
    color: var(--text-primary);
    transform: translateX(4px);
}

.folder-pill.active {
    background: hsla(172, 95%, 45%, 0.15);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(172, 95%, 45%, 0.15);
}

.folder-pill svg {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.folder-pill.active svg {
    color: var(--accent);
}

/* File list grid item styles */
.file-list-row {
    display: grid;
    grid-template-columns: 1fr 100px 150px 80px;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: hsla(210, 20%, 15%, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    align-items: center;
    font-size: 0.8rem;
    transition: all 0.25s ease;
}

.file-list-row:hover {
    background: hsla(210, 20%, 25%, 0.4);
    border-color: hsla(172, 95%, 45%, 0.25);
}

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

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

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

.asset-dropzone-dragover {
    border-color: var(--accent) !important;
    background: hsla(172, 95%, 45%, 0.08) !important;
    box-shadow: 0 0 25px rgba(172, 95%, 45%, 0.25) !important;
    transform: scale(1.02);
}

/* ==========================================================================
   PROCESS REGISTRY (FOLDER TREE & EXPLORER) STYLING
   ========================================================================== */
.folder-tree-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 0.25rem;
}

.tree-node {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    position: relative;
    border: 1px solid transparent;
    user-select: none;
}

.tree-row:hover {
    background: hsla(210, 20%, 25%, 0.25);
    border-color: var(--border-color);
}

.tree-row.selected {
    background: hsla(172, 95%, 45%, 0.08);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.tree-row.selected svg {
    color: var(--accent) !important;
}

.tree-row.drag-hover {
    background: hsla(172, 95%, 45%, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.tree-children {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 0.75rem;
    border-left: 1px dashed var(--border-color);
    padding-left: 0.75rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.tree-row svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.tree-row:hover svg {
    color: var(--text-primary);
}

.tree-row.folder svg.folder-icon {
    color: var(--state-ready-border);
}

.tree-row.file svg.file-icon {
    color: var(--accent);
}

.tree-node-collapsed .tree-children {
    display: none;
}

.tree-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}

.tree-toggle-btn:hover {
    background: hsla(210, 20%, 35%, 0.4);
    color: var(--text-primary);
}

.tree-toggle-btn.collapsed svg {
    transform: rotate(-90deg);
}

.tree-toggle-btn svg {
    transition: transform 0.2s ease;
}

/* AI vs Human Process Badges */
.badge-ai-built {
    background: hsla(270, 75%, 15%, 0.5) !important;
    border: 1px solid hsl(270, 80%, 60%) !important;
    color: hsl(270, 85%, 85%) !important;
    font-weight: 700;
    box-shadow: 0 0 8px hsla(270, 80%, 60%, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-human-built {
    background: hsla(210, 20%, 15%, 0.5) !important;
    border: 1px solid var(--text-muted) !important;
    color: var(--text-primary) !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Vertical timeline styling */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border-color);
    margin-left: 0.5rem;
    margin-top: 0.5rem;
}

.timeline-item {
    position: relative;
    font-size: 0.75rem;
    line-height: 1.4;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1.25rem - 5px);
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    border: 2px solid var(--bg-dark);
}

.timeline-item.fork::before {
    background: var(--state-ready-border);
}

.timeline-item.upgrade::before {
    background: var(--accent);
}

.timeline-version {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 0.25rem;
}

.timeline-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    float: right;
}

.timeline-details {
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ==========================================================================
   PROCESS RANKINGS & VISIBILITY & MODAL OVERLAYS
   ========================================================================== */

/* Active Star rating selections */
.star-selector {
    transition: color 0.2s, transform 0.2s;
}
.star-selector:hover {
    transform: scale(1.2);
}
.star-selector.active {
    color: hsl(45, 100%, 55%) !important;
    text-shadow: 0 0 10px hsla(45, 100%, 55%, 0.4);
}

/* Visibility badges and states */
.badge-public {
    background: hsla(145, 75%, 10%, 0.5) !important;
    border: 1px solid hsl(145, 80%, 40%) !important;
    color: hsl(145, 85%, 75%) !important;
}

.badge-private {
    background: hsla(350, 70%, 12%, 0.5) !important;
    border: 1px solid hsl(350, 75%, 45%) !important;
    color: hsl(350, 90%, 75%) !important;
}

/* Glassmorphic Modal */
.modal-overlay {
    animation: fadeInOverlay 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-modal-container {
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Reviews List Styles */
.review-item-card {
    background: hsla(222, 20%, 4%, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: all 0.25s ease;
}

.review-item-card:hover {
    border-color: hsla(210, 20%, 35%, 0.5);
    background: hsla(222, 20%, 6%, 0.5);
}

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

.review-username {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.review-rating-stars {
    color: hsl(45, 100%, 55%);
    font-size: 0.75rem;
}

.review-usefulness-tag {
    font-size: 0.65rem;
    background: hsla(210, 20%, 25%, 0.4);
    color: var(--text-muted);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.review-comment-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.review-timestamp {
    font-size: 0.6rem;
    color: hsla(210, 10%, 60%, 0.6);
    text-align: right;
}

/* ==========================================================================
   DYNAMIC CREDENTIALS MANAGER & PREMIUM CARD GLOWS
   ========================================================================== */

.dynamic-keys-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

.credential-card {
    background: linear-gradient(135deg, hsla(222, 25%, 10%, 0.6), hsla(222, 25%, 5%, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.credential-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, hsla(172, 95%, 45%, 0.05), transparent 60%);
    pointer-events: none;
}

.credential-card:hover {
    border-color: hsla(172, 95%, 45%, 0.4);
    box-shadow: 0 8px 30px rgba(172, 95%, 45%, 0.08), 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.credential-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.05);
    padding-bottom: 0.5rem;
}

.credential-identity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.credential-key-icon {
    color: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.credential-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-all;
    letter-spacing: -0.01em;
}

.credential-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.credential-badge.active {
    background: hsla(172, 95%, 45%, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(172, 95%, 45%, 0.2);
}

.credential-badge.unset {
    background: hsla(350, 70%, 15%, 0.15);
    border: 1px solid var(--state-blocked-border);
    color: var(--state-blocked-text);
}

.credential-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsla(222, 20%, 4%, 0.5);
    border: 1px solid hsla(0, 0%, 100%, 0.04);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    position: relative;
    gap: 0.5rem;
}

.credential-masked-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}

.credential-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.credential-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.credential-btn:hover {
    color: var(--text-primary);
    background: hsla(0, 0%, 100%, 0.05);
}

.credential-btn.delete:hover {
    color: var(--state-blocked-text);
    background: hsla(350, 70%, 15%, 0.3);
}

.credential-btn.edit-toggle:hover {
    color: var(--accent);
    background: hsla(172, 95%, 45%, 0.1);
}

/* Edit Credential Form inside Card */
.credential-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.credential-edit-input-group {
    display: flex;
    align-items: center;
    background: hsla(222, 20%, 4%, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.credential-edit-input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.credential-edit-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    flex: 1;
    height: 32px;
}

.credential-form-btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Premium Register Custom Form */
.register-credential-box {
    background: hsla(222, 25%, 8%, 0.35);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.register-credential-box:focus-within,
.register-credential-box.expanded {
    border: 1px solid var(--accent);
    background: hsla(222, 25%, 8%, 0.6);
    box-shadow: 0 0 15px rgba(172, 95%, 45%, 0.05);
}

.register-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.05);
    padding-bottom: 0.5rem;
    margin: 0;
}

/* Suggestions dropdown */
.suggestion-list {
    background: hsla(222, 20%, 6%, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    max-height: 120px;
    overflow-y: auto;
    position: absolute;
    width: calc(100% - 2.5rem);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
}

.suggestion-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.suggestion-item:hover {
    color: var(--accent);
    background: hsla(172, 95%, 45%, 0.08);
}

/* Deletion Micro-animation */
.credential-card-deleting {
    transform: scale(0.9) translateY(10px) !important;
    opacity: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-color: transparent !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Creation Micro-animation */
@keyframes cardInsert {
    from {
        transform: translateY(-15px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.credential-card-new {
    animation: cardInsert 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHARED BACKLOG REDESIGN STYLING (task_86a6718d04)
   ───────────────────────────────────────────────────────────────────────────── */

/* View Toggle buttons */
.view-toggle-btn {
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text-muted);
}

.view-toggle-btn.active {
    background: var(--accent) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Owner Filter Chips */
.filter-chip {
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: hsla(222, 20%, 4%, 0.4);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-chip:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.filter-chip.active {
    background: hsla(172, 95%, 45%, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Backlog List View Row */
.backlog-list-row {
    cursor: pointer;
    background: hsla(222, 20%, 8%, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    width: 100%;
}

.backlog-list-row:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: hsla(222, 20%, 12%, 0.65);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 10px var(--accent-glow);
}

/* Drag handles for manual sorting */
.drag-handle {
    color: var(--text-muted);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: var(--accent);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Drag over styles */
.drag-over-item {
    border-top: 2px solid var(--accent) !important;
    background: hsla(172, 95%, 45%, 0.05) !important;
}

.drag-over-column {
    background: hsla(172, 95%, 45%, 0.03) !important;
    border-color: var(--accent) !important;
}

/* Compact Cards Layout and Hover glows */
.backlog-card {
    position: relative;
    overflow: hidden;
}

.backlog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(to bottom, var(--border-color), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.backlog-card:hover::before {
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.backlog-card-compact {
    cursor: pointer;
    background: hsla(222, 20%, 8%, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardInsert 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.backlog-card-compact:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 10px var(--accent-glow);
}

.backlog-card-compact-priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* Detailed Task View styling */
#backlog-detail-container select,
#backlog-detail-container input,
#backlog-detail-container textarea {
    transition: all 0.2s ease;
}

/* Manage AIs inputs design */
.ai-roster-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: hsla(0, 0%, 100%, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.ai-roster-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: hsla(280, 95%, 55%, 0.15);
    border: 1px solid hsla(280, 95%, 55%, 0.3);
    color: hsl(280, 90%, 85%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

/* Button small helper class */
.glow-btn.btn-sm, .glow-btn-secondary.btn-sm {
    padding: 0 0.85rem;
    font-size: 0.7rem;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 6px;
}

/* List view header styling */
.backlog-list-header {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 1.0rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    align-items: center;
    box-sizing: border-box;
}
.backlog-list-header > div {
    user-select: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}
.backlog-list-header > div:hover {
    color: var(--accent);
}
.backlog-list-header .sort-indicator {
    font-size: 0.6rem;
    color: var(--accent);
}

/* Unified AI/Assignee Avatars styling */
.assignee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: hsla(222, 20%, 15%, 0.65);
    border: 1.5px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    user-select: none;
}

.assignee-avatar:hover {
    transform: scale(1.1);
}

/* Agent specific color styling */
.assignee-avatar.agent-ccode {
    border-color: #a855f7; /* Claude Code: Purple */
    box-shadow: 0 0 8px hsla(270, 95%, 60%, 0.2);
}
.assignee-avatar.agent-claude-chat {
    border-color: #ec4899; /* Claude Chat: Pink */
    box-shadow: 0 0 8px hsla(330, 95%, 60%, 0.2);
}
.assignee-avatar.agent-ag {
    border-color: var(--accent); /* Antigravity: Teal */
    box-shadow: 0 0 10px var(--accent-glow);
}
.assignee-avatar.agent-codex {
    border-color: #10b981; /* Codex: Green */
    box-shadow: 0 0 8px hsla(142, 70%, 45%, 0.2);
}
.assignee-avatar.agent-gate7 {
    border-color: #3b82f6; /* Gate-7: Blue */
    box-shadow: 0 0 8px hsla(210, 80%, 55%, 0.2);
}
.assignee-avatar.operator-nathan {
    border-color: #f59e0b; /* Nathan: Amber */
    box-shadow: 0 0 10px hsla(38, 92%, 50%, 0.35);
}
.assignee-avatar.unassigned {
    border-color: var(--border-color);
    background: hsla(222, 10%, 10%, 0.4);
    box-shadow: none;
}


/* AI INSTRUCTIONS HUB MARKDOWN STYLING */
.markdown-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.92rem;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.markdown-content h1 {
    font-size: 1.6rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.markdown-content h2 {
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.4rem;
}

.markdown-content h3 {
    font-size: 1.15rem;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.4rem;
}

.markdown-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: hsla(222, 20%, 8%, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: hsl(172, 95%, 45%);
}

.markdown-content pre {
    background: hsla(222, 20%, 5%, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.markdown-content th {
    background: hsla(222, 20%, 10%, 0.6);
    color: var(--text-primary);
    font-weight: 600;
}

.markdown-content tr:nth-child(even) td {
    background: hsla(222, 20%, 8%, 0.25);
}

.markdown-content blockquote {
    border-left: 4px solid var(--border-color);
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    background: hsla(222, 20%, 10%, 0.2);
    border-radius: 0 6px 6px 0;
}

/* GitHub style alerts */
.markdown-content blockquote.alert-note {
    border-left-color: #3b82f6 !important;
    background: hsla(217, 90%, 10%, 0.25) !important;
}

.markdown-content blockquote.alert-tip {
    border-left-color: #10b981 !important;
    background: hsla(142, 80%, 10%, 0.2) !important;
}

.markdown-content blockquote.alert-warning {
    border-left-color: #f59e0b !important;
    background: hsla(38, 90%, 10%, 0.25) !important;
}

.markdown-content blockquote.alert-caution {
    border-left-color: #ef4444 !important;
    background: hsla(0, 95%, 10%, 0.25) !important;
}

.markdown-content blockquote.alert-important {
    border-left-color: #8b5cf6 !important;
    background: hsla(263, 90%, 12%, 0.25) !important;
}


