/* ============================================
   Tab 1: Field Recorder
   ============================================ */
.recorder-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-lg);
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-green), var(--accent-teal), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: var(--space-lg);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--accent-green);
    background: var(--bg-base);
    z-index: 1;
    transition: all 0.3s;
}

.timeline-item.active .timeline-dot {
    background: var(--accent-green);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}

.timeline-item.completed .timeline-dot {
    background: var(--accent-green);
}

.timeline-time {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-green);
    margin-bottom: var(--space-xs);
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.3s;
}

.timeline-item.active .timeline-card {
    border-color: var(--border-glow);
    background: rgba(52, 211, 153, 0.03);
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.timeline-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.tag {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
}

.tag-photo {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.tag-measure {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.tag-ai {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent-purple);
}

.tag-alert {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.tag-check {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

/* Progress Bar */
.progress-wrap {
    margin-bottom: var(--space-lg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    margin-bottom: var(--space-sm);
}

.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-teal));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Side Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* AI Assistant */
.ai-chat {
    max-height: 300px;
    overflow-y: auto;
}

.ai-msg {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    animation: msgIn 0.4s ease;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.ai-msg.ai {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.15);
    color: var(--text-secondary);
}

.ai-msg.alert {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Measurement Card */
.measure-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
}

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

.measure-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-cyan);
}

.measure-val.warning {
    color: var(--accent-amber);
}

.measure-val.danger {
    color: var(--accent-red);
}

